diff options
author | Ken Moore <moorekou@gmail.com> | 2015-08-05 09:30:14 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-08-05 09:30:14 -0400 |
commit | 57230742d2edde716e90e3cb8413744909054c4f (patch) | |
tree | 9ecb827de44742bd8aa72e90caaf6b830b857aa4 /lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp | |
parent | Oops, committed a temporary change to include the xcb-render library (not nec... (diff) | |
download | lumina-57230742d2edde716e90e3cb8413744909054c4f.tar.gz lumina-57230742d2edde716e90e3cb8413744909054c4f.tar.bz2 lumina-57230742d2edde716e90e3cb8413744909054c4f.zip |
Finish converting libLumina to XCB-only and finish replacing any LX11 functions in lumina-desktop.
Diffstat (limited to 'lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp')
-rw-r--r-- | lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp b/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp index c45687cd..8ce01c06 100644 --- a/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp +++ b/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp @@ -114,8 +114,8 @@ void LSysMenuQuick::UpdateMenu(){ ui->group_battery->setVisible(false); } //Workspace - val = LX11::GetCurrentDesktop(); - int tot = LX11::GetNumberOfDesktops(); + val = LSession::handle()->XCB->CurrentWorkspace(); + int tot = LSession::handle()->XCB->NumberOfWorkspaces(); ui->group_workspace->setVisible(val>=0 && tot>1); ui->label_wk_text->setText( QString(tr("%1 of %2")).arg(QString::number(val+1), QString::number(tot)) ); } @@ -157,20 +157,22 @@ void LSysMenuQuick::setCurrentBrightness(){ } void LSysMenuQuick::nextWorkspace(){ - int cur = LX11::GetCurrentDesktop(); - int tot = LX11::GetNumberOfDesktops(); + int cur = LSession::handle()->XCB->CurrentWorkspace(); + int tot = LSession::handle()->XCB->NumberOfWorkspaces(); + //qDebug()<< "Next Workspace:" << cur << tot; cur++; if(cur>=tot){ cur = 0; } //back to beginning - LX11::SetCurrentDesktop(cur); + //qDebug() << " - New Current:" << cur; + LSession::handle()->XCB->SetCurrentWorkspace(cur); ui->label_wk_text->setText( QString(tr("%1 of %2")).arg(QString::number(cur+1), QString::number(tot)) ); } void LSysMenuQuick::prevWorkspace(){ - int cur = LX11::GetCurrentDesktop(); - int tot = LX11::GetNumberOfDesktops(); + int cur = LSession::handle()->XCB->CurrentWorkspace(); + int tot = LSession::handle()->XCB->NumberOfWorkspaces(); cur--; if(cur<0){ cur = tot-1; } //back to last - LX11::SetCurrentDesktop(cur); + LSession::handle()->XCB->SetCurrentWorkspace(cur); ui->label_wk_text->setText( QString(tr("%1 of %2")).arg(QString::number(cur+1), QString::number(tot)) ); } |