From 57230742d2edde716e90e3cb8413744909054c4f Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 5 Aug 2015 09:30:14 -0400 Subject: Finish converting libLumina to XCB-only and finish replacing any LX11 functions in lumina-desktop. --- lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lumina-desktop/panel-plugins/desktopswitcher') 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 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 } -- cgit