aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libLumina/LuminaOS-DragonFly.cpp5
-rw-r--r--libLumina/LuminaOS-FreeBSD.cpp7
-rw-r--r--libLumina/LuminaOS-Linux.cpp5
-rw-r--r--libLumina/LuminaOS-template.cpp5
-rw-r--r--libLumina/LuminaOS.h5
-rw-r--r--libLumina/LuminaX11.cpp21
-rw-r--r--lumina-desktop/LSession.cpp1
-rw-r--r--lumina-desktop/panel-plugins/LTBWidget.h2
8 files changed, 39 insertions, 12 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);
diff --git a/lumina-desktop/LSession.cpp b/lumina-desktop/LSession.cpp
index 43a7ce79..7897966b 100644
--- a/lumina-desktop/LSession.cpp
+++ b/lumina-desktop/LSession.cpp
@@ -278,6 +278,7 @@ bool LSession::x11EventFilter(XEvent *event){
|| event->xproperty.atom == XInternAtom(QX11Info::display(),"_NET_WM_NAME",false) \
|| event->xproperty.atom == XInternAtom(QX11Info::display(),"_NET_WM_VISIBLE_NAME",false) \
|| event->xproperty.atom == XInternAtom(QX11Info::display(),"_NET_WM_ICON_NAME",false) \
+ || event->xproperty.atom == XInternAtom(QX11Info::display(),"_NET_WM_STATE",false) \
|| event->xproperty.atom == XInternAtom(QX11Info::display(),"_NET_WM_VISIBLE_ICON_NAME",false) ){
LSession::restoreOverrideCursor(); //restore the mouse cursor back to normal (new window opened?)
emit WindowListEvent();
diff --git a/lumina-desktop/panel-plugins/LTBWidget.h b/lumina-desktop/panel-plugins/LTBWidget.h
index 02097039..5252c619 100644
--- a/lumina-desktop/panel-plugins/LTBWidget.h
+++ b/lumina-desktop/panel-plugins/LTBWidget.h
@@ -25,7 +25,7 @@ private:
else if(cstate == Lumina::VISIBLE){ background = "background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 255, 255, 240), stop:0.505682 rgba(240, 240, 240, 150), stop:1 rgba(210, 210, 210, 55));"; border="border: 1px solid transparent;"; }
else if(cstate == Lumina::INVISIBLE){background = "background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(215, 215, 215, 240), stop:0.505682 rgba(184, 185, 186, 150), stop:1 rgba(221, 246, 255, 55));"; border="border: 1px solid transparent;"; }
else if(cstate == Lumina::ACTIVE){ background= "background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(241, 233, 156, 240), stop:0.355682 rgba(255, 243, 127, 150), stop:1 rgba(221, 246, 255, 55));"; border ="border: 1px solid transparent;"; }
- else if(cstate == Lumina::NOTIFICATION){ background= "background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(252, 187, 127, 240), stop:0.505682 rgba(255, 222, 197, 150), stop:1 rgba(221, 246, 255, 55));"; border="border: 1px solid transparent"; }
+ else if(cstate == Lumina::NOTIFICATION){ background= "background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(252, 187, 127, 240), stop:0.505682 rgba(255, 222, 197, 150), stop:1 rgba(221, 246, 255, 55));"; border="border: 1px solid transparent;"; }
QString raw = rawstyle;
this->setStyleSheet( raw.replace("%1",background).replace("%2", border) );
}
bgstack15