diff options
4 files changed, 27 insertions, 13 deletions
diff --git a/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp b/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp index 038872ff..d5098a40 100644 --- a/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp +++ b/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp @@ -7,7 +7,7 @@ #include "LXcbEventFilter.h" //For all the XCB interactions and atoms -// is accessed via +// is accessed via // session->XCB->EWMH.(atom name) // session->XCB->(do something) #include <LuminaX11.h> @@ -41,7 +41,7 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag //qDebug() << "Property Notify Event:"; //qDebug() << " - Root Window:" << QX11Info::appRootWindow(); //qDebug() << " - Given Window:" << ((xcb_property_notify_event_t*)ev)->window; - //System-specific proprty change + //System-specific property change if( ((xcb_property_notify_event_t*)ev)->window == QX11Info::appRootWindow() \ && ( ( ((xcb_property_notify_event_t*)ev)->atom == session->XCB->EWMH._NET_DESKTOP_GEOMETRY) \ || (((xcb_property_notify_event_t*)ev)->atom == session->XCB->EWMH._NET_WORKAREA) )){ diff --git a/src-qt5/core/lumina-desktop/LXcbEventFilter.h b/src-qt5/core/lumina-desktop/LXcbEventFilter.h index c56471c9..2946eacd 100644 --- a/src-qt5/core/lumina-desktop/LXcbEventFilter.h +++ b/src-qt5/core/lumina-desktop/LXcbEventFilter.h @@ -62,7 +62,7 @@ private: QList<xcb_atom_t> WinNotifyAtoms, SysNotifyAtoms; int TrayDmgFlag; //internal damage event offset value for the system tray bool stopping; - + void InitAtoms(){ //Initialize any special atoms that we need to save/use regularly //NOTE: All the EWMH atoms are already saved in session->XCB->EWMH @@ -73,7 +73,7 @@ private: << session->XCB->EWMH._NET_WM_VISIBLE_ICON_NAME \ << session->XCB->EWMH._NET_WM_ICON \ << session->XCB->EWMH._NET_WM_ICON_GEOMETRY; - + SysNotifyAtoms.clear(); SysNotifyAtoms << session->XCB->EWMH._NET_CLIENT_LIST \ << session->XCB->EWMH._NET_CLIENT_LIST_STACKING \ @@ -85,12 +85,12 @@ private: //_NET_SYSTEM_TRAY_OPCODE xcb_intern_atom_cookie_t cookie = xcb_intern_atom(QX11Info::connection(), 0, 23,"_NET_SYSTEM_TRAY_OPCODE"); xcb_intern_atom_reply_t *r = xcb_intern_atom_reply(QX11Info::connection(), cookie, NULL); - if(r){ - _NET_SYSTEM_TRAY_OPCODE = r->atom; + if(r){ + _NET_SYSTEM_TRAY_OPCODE = r->atom; free(r); } } - + public: XCBEventFilter(LSession *sessionhandle); void setTrayDamageFlag(int flag); @@ -98,7 +98,7 @@ public: //This function format taken directly from the Qt5.3 documentation virtual bool nativeEventFilter(const QByteArray &eventType, void *message, long *) Q_DECL_OVERRIDE; - + }; #endif diff --git a/src-qt5/core/lumina-desktop/SystemWindow.ui b/src-qt5/core/lumina-desktop/SystemWindow.ui index 6108815b..dfc3bed2 100644 --- a/src-qt5/core/lumina-desktop/SystemWindow.ui +++ b/src-qt5/core/lumina-desktop/SystemWindow.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>458</width> - <height>306</height> + <width>422</width> + <height>173</height> </rect> </property> <property name="windowTitle"> @@ -48,6 +48,19 @@ <number>0</number> </property> <item> + <spacer name="verticalSpacer_2"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item> <layout class="QHBoxLayout" name="horizontalLayout"> <item> <widget class="QToolButton" name="tool_logout"> diff --git a/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp b/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp index e6e89075..294b37be 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp @@ -14,7 +14,7 @@ LDesktopSwitcher::LDesktopSwitcher(QWidget *parent, QString id, bool horizontal) label = new QToolButton(this); label->setPopupMode(QToolButton::DelayedPopup); label->setAutoRaise(true); - label->setToolButtonStyle(Qt::ToolButtonIconOnly); + label->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); label->setIcon( LXDG::findIcon("format-view-carousel", "preferences-desktop-display") ); label->setToolTip(QString(tr("Workspace 1"))); connect(label, SIGNAL(clicked()), this, SLOT(openMenu())); @@ -44,7 +44,7 @@ void LDesktopSwitcher::setNumberOfDesktops(int number) { Atom atom = XInternAtom(display, "_NET_NUMBER_OF_DESKTOPS", False); XEvent xevent; xevent.type = ClientMessage; - xevent.xclient.type = ClientMessage; + xevent.xclient.type = ClientMessage; xevent.xclient.display = display; xevent.xclient.window = rootWindow; xevent.xclient.message_type = atom; @@ -129,7 +129,7 @@ void LDesktopSwitcher::createMenu() { 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; + //qDebug() << "Virtual Desktops:" << tot << cur; menu->clear(); for (int i = 0; i < tot; i++) { QString name = QString(tr("Workspace %1")).arg( QString::number(i+1) ); @@ -137,6 +137,7 @@ void LDesktopSwitcher::createMenu() { menu->addAction(newAction(i, name)); } label->setToolTip(QString(tr("Workspace %1")).arg(QString::number(cur + 1))); + label->setText( QString::number(cur+1) ); } void LDesktopSwitcher::menuActionTriggered(QAction* act) { |