aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/libLumina/LuminaUtils.cpp2
-rw-r--r--src-qt5/core/lumina-desktop/LSession.cpp14
-rw-r--r--src-qt5/core/lumina-desktop/LSession.h1
-rw-r--r--src-qt5/core/lumina-desktop/LXcbEventFilter.cpp7
4 files changed, 18 insertions, 6 deletions
diff --git a/src-qt5/core/libLumina/LuminaUtils.cpp b/src-qt5/core/libLumina/LuminaUtils.cpp
index fa38d6df..f429cb31 100644
--- a/src-qt5/core/libLumina/LuminaUtils.cpp
+++ b/src-qt5/core/libLumina/LuminaUtils.cpp
@@ -899,7 +899,7 @@ ResizeMenu::ResizeMenu(QWidget *parent) : QMenu(parent){
contents = 0;
connect(this, SIGNAL(aboutToShow()), this, SLOT(clearFlags()) );
connect(this, SIGNAL(aboutToHide()), this, SLOT(clearFlags()) );
- connect(cAct, SIGNAL(hovered()), this, SLOT(actionHovered()) );
+ connect(cAct, SIGNAL(hovered()), this, SLOT(clearFlags()) );
}
ResizeMenu::~ResizeMenu(){
diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp
index b1a4b55e..2ab01d79 100644
--- a/src-qt5/core/lumina-desktop/LSession.cpp
+++ b/src-qt5/core/lumina-desktop/LSession.cpp
@@ -48,8 +48,7 @@ LSession::LSession(int &argc, char ** argv) : LSingleApplication(argc, argv, "lu
TrayStopping = false;
screenTimer = new QTimer(this);
screenTimer->setSingleShot(true);
- screenTimer->setInterval(1000); //2 seconds - This needs to be long(ish) to prevent being called while
- // X is still setting up any screens
+ screenTimer->setInterval(50);
connect(screenTimer, SIGNAL(timeout()), this, SLOT(updateDesktops()) );
for(int i=1; i<argc; i++){
if( QString::fromLocal8Bit(argv[i]) == "--noclean" ){ cleansession = false; break; }
@@ -161,8 +160,8 @@ void LSession::setupSession(){
watcher->addPath( QDir::homePath()+"/Desktop" );
//connect internal signals/slots
- connect(this->desktop(), SIGNAL(screenCountChanged(int)), this, SLOT(screensChanged()) );
- connect(this->desktop(), SIGNAL(resized(int)), this, SLOT(screenResized(int)) );
+ //connect(this->desktop(), SIGNAL(screenCountChanged(int)), this, SLOT(screensChanged()) );
+ //connect(this->desktop(), SIGNAL(resized(int)), this, SLOT(screenResized(int)) );
connect(watcher, SIGNAL(directoryChanged(QString)), this, SLOT(watcherChange(QString)) );
connect(watcher, SIGNAL(fileChanged(QString)), this, SLOT(watcherChange(QString)) );
connect(this, SIGNAL(aboutToQuit()), this, SLOT(SessionEnding()) );
@@ -723,6 +722,13 @@ void LSession::playAudioFile(QString filepath){
// =======================
// XCB EVENT FILTER FUNCTIONS
// =======================
+void LSession::RootSizeChange(){
+ qDebug() << "Got Root Size Change";
+ if(DESKTOPS.isEmpty()){ return; } //Initial setup not run yet
+ screenTimer->start();
+ //QTimer::singleShot(0,this, SLOT(screensChanged()) );
+}
+
void LSession::WindowPropertyEvent(){
if(DEBUG){ qDebug() << "Window Property Event"; }
QList<WId> newapps = XCB->WindowList();
diff --git a/src-qt5/core/lumina-desktop/LSession.h b/src-qt5/core/lumina-desktop/LSession.h
index ae217bd8..bdcc94a4 100644
--- a/src-qt5/core/lumina-desktop/LSession.h
+++ b/src-qt5/core/lumina-desktop/LSession.h
@@ -61,6 +61,7 @@ public:
//Special functions for XCB event filter parsing only
// (DO NOT USE MANUALLY)
+ void RootSizeChange();
void WindowPropertyEvent();
void WindowPropertyEvent(WId);
void SysTrayDockRequest(WId);
diff --git a/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp b/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp
index 7ee4f974..c8321c49 100644
--- a/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp
+++ b/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp
@@ -17,6 +17,7 @@ XCBEventFilter::XCBEventFilter(LSession *sessionhandle) : QAbstractNativeEventFi
session = sessionhandle; //save this for interaction with the session later
TrayDmgFlag = 0;
stopping = false;
+ session->XCB->SelectInput(QX11Info::appRootWindow()); //make sure we get root window events
InitAtoms();
}
@@ -41,7 +42,11 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag
//qDebug() << " - Root Window:" << QX11Info::appRootWindow();
//qDebug() << " - Given Window:" << ((xcb_property_notify_event_t*)ev)->window;
//System-specific proprty change
- if( SysNotifyAtoms.contains( ((xcb_property_notify_event_t*)ev)->atom ) ){
+ if( ((xcb_property_notify_event_t*)ev)->window == QX11Info::appRootWindow() \
+ && ( ( ((xcb_property_notify_event_t*)ev)->atom == session->XCB->EWMH._NET_DESKTOP_GEOMETRY) \
+ || (((xcb_property_notify_event_t*)ev)->atom == session->XCB->EWMH._NET_WORKAREA) )){
+ session->RootSizeChange();
+ }else if( SysNotifyAtoms.contains( ((xcb_property_notify_event_t*)ev)->atom ) ){
//Update the status/list of all running windows
session->WindowPropertyEvent();
bgstack15