aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/panel-plugins/desktopswitcher
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-08-05 09:30:14 -0400
committerKen Moore <moorekou@gmail.com>2015-08-05 09:30:14 -0400
commit57230742d2edde716e90e3cb8413744909054c4f (patch)
tree9ecb827de44742bd8aa72e90caaf6b830b857aa4 /lumina-desktop/panel-plugins/desktopswitcher
parentOops, committed a temporary change to include the xcb-render library (not nec... (diff)
downloadlumina-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/desktopswitcher')
-rw-r--r--lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp b/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp
index 7ab2fda1..a1de725d 100644
--- a/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp
+++ b/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp
@@ -5,6 +5,7 @@
// See the LICENSE file for full details
//===========================================
#include "LDesktopSwitcher.h"
+#include <LSession.h>
LDesktopSwitcher::LDesktopSwitcher(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal) {
iconOld = -1;
@@ -114,8 +115,8 @@ QAction* LDesktopSwitcher::newAction(int what, QString name) {
}
void LDesktopSwitcher::createMenu() {
- int cur = LX11::GetCurrentDesktop(); //current desktop number
- int tot = LX11::GetNumberOfDesktops(); //total number of desktops
+ int cur = LSession::handle()->XCB->CurrentWorkspace(); //current desktop number
+ int tot = LSession::handle()->XCB->NumberOfWorkspaces(); //total number of desktops
//qDebug() << "-- vor getCurrentDesktop SWITCH";
qDebug() << "Virtual Desktops:" << tot << cur;
menu->clear();
@@ -127,7 +128,7 @@ void LDesktopSwitcher::createMenu() {
}
void LDesktopSwitcher::menuActionTriggered(QAction* act) {
- LX11::SetCurrentDesktop(act->whatsThis().toInt());
+ LSession::handle()->XCB->SetCurrentWorkspace(act->whatsThis().toInt());
label->setToolTip(QString(tr("Workspace %1")).arg(act->whatsThis().toInt() +1));
QTimer::singleShot(500, this, SLOT(createMenu()) ); //make sure the menu gets updated
}
bgstack15