diff options
author | Ken Moore <ken@pcbsd.org> | 2014-12-18 07:47:48 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2014-12-18 07:47:48 -0500 |
commit | 71c2fda95224f0a04316c5f1059628d33564ca43 (patch) | |
tree | ca74dbe49dd2f555e73893e7f5f06154d6dab763 /lumina-desktop/panel-plugins/taskmanager | |
parent | Oops, forgot to add knowledge of the new "Wine" app category to the userbutton. (diff) | |
download | lumina-71c2fda95224f0a04316c5f1059628d33564ca43.tar.gz lumina-71c2fda95224f0a04316c5f1059628d33564ca43.tar.bz2 lumina-71c2fda95224f0a04316c5f1059628d33564ca43.zip |
Commit a checkpoint on the conversion of Lumina to Qt5.
It is functional at the moment, but still has a few rough edges with regards to the X11 background interface (due to the move from XLib to XCB in Qt5). This reulst in some of the window manager interactions not behaving properly (such as sticky status on panels).
Diffstat (limited to 'lumina-desktop/panel-plugins/taskmanager')
-rw-r--r-- | lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp | 27 | ||||
-rw-r--r-- | lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp | 2 |
2 files changed, 9 insertions, 20 deletions
diff --git a/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp b/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp index 6ea7854e..9dfc0979 100644 --- a/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp +++ b/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp @@ -5,6 +5,7 @@ // See the LICENSE file for full details //=========================================== #include "LTaskButton.h" +#include "LSession.h" LTaskButton::LTaskButton(QWidget *parent) : LTBWidget(parent){ actMenu = new QMenu(this); @@ -71,7 +72,7 @@ void LTaskButton::UpdateButton(){ LWINLIST = WINLIST; winMenu->clear(); - Lumina::STATES showstate = Lumina::NOSHOW; + LXCB::WINDOWSTATE showstate = LXCB::IGNORE; for(int i=0; i<WINLIST.length(); i++){ if(WINLIST[i].windowID() == 0){ WINLIST.removeAt(i); @@ -88,31 +89,19 @@ void LTaskButton::UpdateButton(){ if(cname.contains(" - ")){ cname = cname.section(" - ",-1); } } this->setToolTip(cname); - /* - if(this->icon().isNull()){ - this->setIcon( LXDG::findIcon(cname.toLower(),"") ); - if(this->icon().isNull()){ - this->setIcon( LXDG::findIcon("preferences-system-windows","") ); - noicon=true; - }else{ - noicon = false; - } - }else{ - noicon = false; - }*/ } bool junk; QAction *tmp = winMenu->addAction( WINLIST[i].icon(junk), WINLIST[i].text() ); tmp->setData(i); //save which number in the WINLIST this entry is for - Lumina::STATES stat = WINLIST[i].status(); - if(stat==Lumina::NOTIFICATION){ showstate = stat; } //highest priority - else if( stat==Lumina::ACTIVE && showstate != Lumina::NOTIFICATION){ showstate = stat; } //next priority - else if( stat==Lumina::Lumina::VISIBLE && showstate != Lumina::NOTIFICATION && showstate != Lumina::ACTIVE){ showstate = stat; } - else if(showstate == Lumina::INVISIBLE || showstate == Lumina::NOSHOW){ showstate = stat; } //anything is the same/better + LXCB::WINDOWSTATE stat = LSession::handle()->XCB->WindowState(WINLIST[i].windowID()); + if(stat==LXCB::ATTENTION){ showstate = stat; } //highest priority + else if( stat==LXCB::ACTIVE && showstate != LXCB::ATTENTION){ showstate = stat; } //next priority + else if( stat==LXCB::VISIBLE && showstate != LXCB::ATTENTION && showstate != LXCB::ACTIVE){ showstate = stat; } + else if(showstate == LXCB::INVISIBLE || showstate == LXCB::IGNORE){ showstate = stat; } //anything is the same/better } //Now setup the button appropriately // - visibility - if(showstate == Lumina::NOSHOW || WINLIST.length() < 1){ this->setVisible(false); } + if(showstate == LXCB::IGNORE || WINLIST.length() < 1){ this->setVisible(false); } else{ this->setVisible(true); } // - functionality if(WINLIST.length() == 1){ diff --git a/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp b/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp index 674c9088..8f131c9e 100644 --- a/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp +++ b/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp @@ -31,7 +31,7 @@ void LTaskManagerPlugin::UpdateButtons(){ //Make sure this only runs one at a time updating=true; //Get the current window list - QList<WId> winlist = LX11::WindowList(); + QList<WId> winlist = LSession::handle()->XCB->WindowList(); //qDebug() << "Update Buttons:" << winlist; //Now go through all the current buttons first for(int i=0; i<BUTTONS.length(); i++){ |