diff options
author | Ken Moore <moorekou@gmail.com> | 2015-07-17 13:08:16 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-07-17 13:08:16 -0400 |
commit | 96bcdec1f14e8f880b0ef053c5436af3662b19b8 (patch) | |
tree | ef33e6d0220a92ca308f58dd2ad3e5ba48a6fc48 /libLumina | |
parent | Merge branch 'master' of github.com:pcbsd/lumina (diff) | |
download | lumina-96bcdec1f14e8f880b0ef053c5436af3662b19b8.tar.gz lumina-96bcdec1f14e8f880b0ef053c5436af3662b19b8.tar.bz2 lumina-96bcdec1f14e8f880b0ef053c5436af3662b19b8.zip |
Commit some quick fixes:
1) Switch some X11->XCB functions around (SetAsDesktop(), SetDisableWMActions()).
2) Fix up some QtQuick plugin detection routines (now it will properly see the user's quickplugins if any).
3) Connect the status change signal/slots for QtQuick plugins to try and detect script failures and remove the script (still not working reliably).
Diffstat (limited to 'libLumina')
-rw-r--r-- | libLumina/LuminaUtils.cpp | 10 | ||||
-rw-r--r-- | libLumina/LuminaX11.cpp | 17 | ||||
-rw-r--r-- | libLumina/LuminaX11.h | 2 |
3 files changed, 27 insertions, 2 deletions
diff --git a/libLumina/LuminaUtils.cpp b/libLumina/LuminaUtils.cpp index 5f5e5e11..9d1eaf0d 100644 --- a/libLumina/LuminaUtils.cpp +++ b/libLumina/LuminaUtils.cpp @@ -202,19 +202,24 @@ QStringList LUtils::listQuickPlugins(){ QDir dir(QDir::homePath()+"/.lumina/quickplugins"); QStringList files = dir.entryList(QStringList() << "quick-*.qml", QDir::Files | QDir::NoDotAndDotDot, QDir::Name); dir.cd(LOS::LuminaShare()+"quickplugins"); - files << files = dir.entryList(QStringList() << "quick-*.qml", QDir::Files | QDir::NoDotAndDotDot, QDir::Name); + files << dir.entryList(QStringList() << "quick-*.qml", QDir::Files | QDir::NoDotAndDotDot, QDir::Name); for(int i=0; i<files.length(); i++){ files[i] = files[i].section("quick-",1,100).section(".qml",0,0); //just grab the ID out of the middle of the filename } files.removeDuplicates(); + //qDebug() << "Found Quick Plugins:" << files; return files; } QStringList LUtils::infoQuickPlugin(QString ID){ //Returns: [Name, Description, Icon] + //qDebug() << "Find Quick Info:" << ID; QString path = findQuickPluginFile(ID); + //qDebug() << " - path:" << path; if(path.isEmpty()){ return QStringList(); } //invalid ID - QStringList contents = LUtils::readFile(path).filter("//").filter("=").filter("Plugin"); + QStringList contents = LUtils::readFile(path); if(contents.isEmpty()){ return QStringList(); } //invalid file (unreadable) + contents = contents.filter("//").filter("=").filter("Plugin"); //now just grab the comments + //qDebug() << " - Filtered Contents:" << contents; QStringList info; info << "" << "" << ""; for(int i=0; i<contents.length(); i++){ if(contents[i].contains("Plugin-Name=")){ info[0] = contents[i].section("Plugin-Name=",1,1).simplified(); } @@ -223,6 +228,7 @@ QStringList LUtils::infoQuickPlugin(QString ID){ //Returns: [Name, Description, } if(info[0].isEmpty()){ info[0]=ID; } if(info[2].isEmpty()){ info[2]="preferences-plugin"; } + //qDebug() << " - info:" << info; return info; } diff --git a/libLumina/LuminaX11.cpp b/libLumina/LuminaX11.cpp index 770f64db..cdbb038f 100644 --- a/libLumina/LuminaX11.cpp +++ b/libLumina/LuminaX11.cpp @@ -1183,9 +1183,18 @@ void LXCB::SetAsSticky(WId win){ xcb_flush(QX11Info::connection()); //apply it right away*/ } +// === SetDisableWMActions() === +void LXCB::SetDisableWMActions(WId win){ + //This disables all the various control that a WM allows for the window (except for allowing the "Sticky" state) + xcb_atom_t list[1]; + list[0] = EWMH._NET_WM_ACTION_STICK; + xcb_ewmh_set_wm_allowed_actions(&EWMH, win, 1, list); +} + // === SetAsPanel() === void LXCB::SetAsPanel(WId win){ if(win==0){ return; } + SetDisableWMActions(win); //also need to disable WM actions for this window //Disable Input focus (panel activation ruins task manager window detection routines) // - Disable Input flag in WM_HINTS xcb_icccm_wm_hints_t hints; @@ -1262,6 +1271,14 @@ void LXCB::SetAsPanel(WId win){ } +void LXCB::SetAsDesktop(WId win){ + if(win==0){ return; } + SetDisableWMActions(win); //also need to disable WM actions for this window + xcb_atom_t list[1]; + list[0] = EWMH._NET_WM_WINDOW_TYPE_DESKTOP; + xcb_ewmh_set_wm_window_type(&EWMH, win, 1, list); +} + // === CloseWindow() === void LXCB::CloseWindow(WId win){ if(win==0){ return; } diff --git a/libLumina/LuminaX11.h b/libLumina/LuminaX11.h index 468045d1..d098a740 100644 --- a/libLumina/LuminaX11.h +++ b/libLumina/LuminaX11.h @@ -145,7 +145,9 @@ public: //Window Modification void SetAsSticky(WId); //Stick to all workspaces + void SetDisableWMActions(WId); //Disable WM control (shortcuts/automatic functions) void SetAsPanel(WId); //Adjust all the window flags for a proper panel (cannot be done through Qt) + void SetAsDesktop(WId); //Adjust window flags to set as the desktop void CloseWindow(WId); //request that the window be closed void KillClient(WId); //Force the application that created the window to close void MinimizeWindow(WId); //request that the window be unmapped/minimized |