aboutsummaryrefslogtreecommitdiff
path: root/libLumina/LuminaX11.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2014-09-12 13:33:27 -0400
committerKen Moore <ken@pcbsd.org>2014-09-12 13:33:27 -0400
commit4a24ba032416349e297be1644f44486e4a9eea87 (patch)
treeae1b0a7a5c948dbc619e370c7842498c257c1dac /libLumina/LuminaX11.cpp
parentUpdate lumina-config to use the new OS prefix settings. (diff)
downloadlumina-4a24ba032416349e297be1644f44486e4a9eea87.tar.gz
lumina-4a24ba032416349e297be1644f44486e4a9eea87.tar.bz2
lumina-4a24ba032416349e297be1644f44486e4a9eea87.zip
Clean up the usage/detection of the "URGENT" window status, and also move the AppStore/ControlPanel/QtConfig shortcut definitions into the LuminaOS class for use in other OS's.
Diffstat (limited to 'libLumina/LuminaX11.cpp')
-rw-r--r--libLumina/LuminaX11.cpp21
1 files changed, 11 insertions, 10 deletions
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);
bgstack15