diff options
Diffstat (limited to 'libLumina')
-rw-r--r-- | libLumina/LuminaOS-DragonFly.cpp | 5 | ||||
-rw-r--r-- | libLumina/LuminaOS-FreeBSD.cpp | 7 | ||||
-rw-r--r-- | libLumina/LuminaOS-Linux.cpp | 5 | ||||
-rw-r--r-- | libLumina/LuminaOS-template.cpp | 5 | ||||
-rw-r--r-- | libLumina/LuminaOS.h | 5 | ||||
-rw-r--r-- | libLumina/LuminaX11.cpp | 21 |
6 files changed, 37 insertions, 11 deletions
diff --git a/libLumina/LuminaOS-DragonFly.cpp b/libLumina/LuminaOS-DragonFly.cpp index 64bad97f..990bf9f7 100644 --- a/libLumina/LuminaOS-DragonFly.cpp +++ b/libLumina/LuminaOS-DragonFly.cpp @@ -15,6 +15,11 @@ static int screenbrightness = -1; QString LOS::AppPrefix(){ return "/usr/local/"; } //Prefix for applications QString LOS::SysPrefix(){ return "/usr/"; } //Prefix for system +//OS-specific application shortcuts (*.desktop files) +QString LOS::ControlPanelShortcut(){ return ""; } //system control panel +QString LOS::AppStoreShortcut(){ return ""; } //graphical app/pkg manager +QString LOS::QtConfigShortcut(){ return "/usr/local/bin/qtconfig-qt4"; } //qtconfig binary (NOT *.desktop file) + // ==== ExternalDevicePaths() ==== QStringList LOS::ExternalDevicePaths(){ //Returns: QStringList[<type>::::<filesystem>::::<path>] diff --git a/libLumina/LuminaOS-FreeBSD.cpp b/libLumina/LuminaOS-FreeBSD.cpp index 0e381660..a078687d 100644 --- a/libLumina/LuminaOS-FreeBSD.cpp +++ b/libLumina/LuminaOS-FreeBSD.cpp @@ -15,7 +15,12 @@ static int screenbrightness = -1; //OS-specific prefix(s) QString LOS::AppPrefix(){ return "/usr/local/"; } //Prefix for applications QString LOS::SysPrefix(){ return "/usr/"; } //Prefix for system - + +//OS-specific application shortcuts (*.desktop files) +QString LOS::ControlPanelShortcut(){ return "/usr/local/share/applications/pccontrol.desktop"; } //system control panel +QString LOS::AppStoreShortcut(){ return "/usr/local/share/applications/softmanager.desktop"; } //graphical app/pkg manager +QString LOS::QtConfigShortcut(){ return "/usr/local/bin/qtconfig-qt4"; } //qtconfig binary (NOT *.desktop file) + // ==== ExternalDevicePaths() ==== QStringList LOS::ExternalDevicePaths(){ //Returns: QStringList[<type>::::<filesystem>::::<path>] diff --git a/libLumina/LuminaOS-Linux.cpp b/libLumina/LuminaOS-Linux.cpp index f3ac854e..b7bb3685 100644 --- a/libLumina/LuminaOS-Linux.cpp +++ b/libLumina/LuminaOS-Linux.cpp @@ -17,6 +17,11 @@ static int screenbrightness = -1; QString LOS::AppPrefix(){ return "/usr/"; } //Prefix for applications QString LOS::SysPrefix(){ return "/usr/"; } //Prefix for system +//OS-specific application shortcuts (*.desktop files) +QString LOS::ControlPanelShortcut(){ return ""; } //system control panel +QString LOS::AppStoreShortcut(){ return ""; } //graphical app/pkg manager +QString LOS::QtConfigShortcut(){ return "/usr/bin/qtconfig-qt4"; } //qtconfig binary (NOT *.desktop file) + // ==== ExternalDevicePaths() ==== QStringList LOS::ExternalDevicePaths(){ //Returns: QStringList[<type>::::<filesystem>::::<path>] diff --git a/libLumina/LuminaOS-template.cpp b/libLumina/LuminaOS-template.cpp index 88d1b72e..0bfac22a 100644 --- a/libLumina/LuminaOS-template.cpp +++ b/libLumina/LuminaOS-template.cpp @@ -13,6 +13,11 @@ QString LOS::AppPrefix(){ return "/usr/local/"; } //Prefix for applications QString LOS::SysPrefix(){ return "/usr/"; } //Prefix for system +//OS-specific application shortcuts (*.desktop files) +QString LOS::ControlPanelShortcut(){ return ""; } //system control panel +QString LOS::AppStoreShortcut(){ return ""; } //graphical app/pkg manager +QString LOS::QtConfigShortcut(){ return ""; } //qtconfig binary (NOT *.desktop file) + // ==== ExternalDevicePaths() ==== QStringList LOS::ExternalDevicePaths(){ //Returns: QStringList[<type>::::<filesystem>::::<path>] diff --git a/libLumina/LuminaOS.h b/libLumina/LuminaOS.h index 84bc9806..6b755e03 100644 --- a/libLumina/LuminaOS.h +++ b/libLumina/LuminaOS.h @@ -25,6 +25,11 @@ public: static QString AppPrefix(); //Prefix for applications (/usr/local/ on FreeBSD) static QString SysPrefix(); //Prefix for system (/usr/ on FreeBSD) + //OS-specific application shortcuts (*.desktop files) + static QString ControlPanelShortcut(); + static QString AppStoreShortcut(); + static QString QtConfigShortcut(); + //Scan for mounted external devices static QStringList ExternalDevicePaths(); //Returns: QStringList[<type>::::<filesystem>::::<path>] //Note: <type> = [USB, HDRIVE, DVD, SDCARD, UNKNOWN] diff --git a/libLumina/LuminaX11.cpp b/libLumina/LuminaX11.cpp index 6b847df6..418e041f 100644 --- a/libLumina/LuminaX11.cpp +++ b/libLumina/LuminaX11.cpp @@ -551,33 +551,34 @@ int LX11::WindowDesktop(WId win){ LX11::WINDOWSTATE LX11::GetWindowState(WId win){ Display *disp = QX11Info::display(); - Atom SA = XInternAtom(disp, "_NET_WM_STATE", false); + Atom SA = XInternAtom(disp, "_NET_WM_STATE", true); Atom ATTENTION = XInternAtom(disp, "_NET_WM_STATE_DEMANDS_ATTENTION", false); Atom SKIPP = XInternAtom(disp, "_NET_WM_STATE_SKIP_PAGER", false); Atom HIDDEN = XInternAtom(disp, "_NET_WM_STATE_HIDDEN", false); Atom SKIPT = XInternAtom(disp, "_NET_WM_STATE_SKIP_TASKBAR", false); - Atom MODAL = XInternAtom(disp, "_NET_WM_STATE_MODAL", false); + //Atom MODAL = XInternAtom(disp, "_NET_WM_STATE_MODAL", false); Atom type; int format; unsigned long num, bytes; - unsigned char *data = 0; + unsigned long *data = 0; int status = XGetWindowProperty( disp, win, SA, 0, ~(0L), false, AnyPropertyType, - &type, &format, &num, &bytes, &data); + &type, &format, &num, &bytes, (unsigned char**) &data); LX11::WINDOWSTATE state = LX11::VISIBLE; if(status >= Success && data){ - Atom *array = (Atom*) data; for(unsigned int i=0; i<num; i++){ - if(array[i] == SKIPP || array[i]==SKIPT || array[i]==MODAL ){ + if(data[i] == SKIPP || data[i]==SKIPT){ state = LX11::IGNORE; + //qDebug() << "Ignore Window:" << win; break; - }else if(array[i]==HIDDEN){ - qDebug() << "Hidden Window:" << win; + }else if(data[i]==HIDDEN){ + //qDebug() << "Hidden Window:" << win; state = LX11::INVISIBLE; - }else if(array[i]==ATTENTION){ - qDebug() << "Attention Window: " << win; + }else if(data[i]==ATTENTION){ + //qDebug() << "Attention Window: " << win; state = LX11::ATTENTION; + break; //This state has priority over others } } XFree(data); |