diff options
author | Ken Moore <moorekou@gmail.com> | 2015-12-08 10:51:02 -0500 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-12-08 10:51:02 -0500 |
commit | 6d1a6c3ac699790bf7ecb4ea9de8ae8a9227d077 (patch) | |
tree | a460599cb0eeb0dd49ee9227330edb1c10ef332b /lumina-wm-INCOMPLETE | |
parent | Ensure that when a desktop item opens it's context menu it hides the main des... (diff) | |
download | lumina-6d1a6c3ac699790bf7ecb4ea9de8ae8a9227d077.tar.gz lumina-6d1a6c3ac699790bf7ecb4ea9de8ae8a9227d077.tar.bz2 lumina-6d1a6c3ac699790bf7ecb4ea9de8ae8a9227d077.zip |
Add the size hints to libLumina X11, and enable the usage of it within teh WM.
Diffstat (limited to 'lumina-wm-INCOMPLETE')
-rw-r--r-- | lumina-wm-INCOMPLETE/LWindow.cpp | 19 | ||||
-rw-r--r-- | lumina-wm-INCOMPLETE/LXcbEventFilter.cpp | 4 |
2 files changed, 16 insertions, 7 deletions
diff --git a/lumina-wm-INCOMPLETE/LWindow.cpp b/lumina-wm-INCOMPLETE/LWindow.cpp index 2a89e2a4..ee7f7592 100644 --- a/lumina-wm-INCOMPLETE/LWindow.cpp +++ b/lumina-wm-INCOMPLETE/LWindow.cpp @@ -91,10 +91,19 @@ void LWindowFrame::InitWindow(){ VL->setContentsMargins(1,1,2,2); VL->setSpacing(0); //Have the window take the same initial size of the client window - QRect geom = LWM::SYSTEM->WM_Window_Geom(CID); - this->setGeometry( geom ); - qDebug() << "First Geom:" << geom; - if(geom.width() < 100 && geom.height() < 100){ this->resize(100,100); } + qDebug() << " - Load Size Hints"; + icccm_size_hints SH = LWM::SYSTEM->WM_ICCCM_GetNormalHints(CID); + qDebug() << " - - Got Normal Hints"; + if(!SH.isValid()){ SH = LWM::SYSTEM->WM_ICCCM_GetSizeHints(CID); } + qDebug() << " - - Start resizing..."; + if(SH.base_width>=0 && SH.base_height>=0){ this->resize(SH.base_width, SH.base_height); } + else if(SH.min_width>=0 && SH.min_height>=0){ this->resize(SH.min_width, SH.min_height); } + else if(SH.width>=0 && SH.height>=0){ this->resize(SH.width, SH.height); } + else{ + QRect geom = LWM::SYSTEM->WM_Window_Geom(CID); + this->setGeometry( geom ); + } + qDebug() << " - done"; //Now embed the native window into the frame WIN = QWindow::fromWinId(CID); @@ -462,4 +471,4 @@ void LWindowFrame::mouseReleaseEvent(QMouseEvent *ev){ activeState = Normal; QApplication::restoreOverrideCursor(); setMouseCursor( getStateAtPoint(ev->pos()) ); -}
\ No newline at end of file +} diff --git a/lumina-wm-INCOMPLETE/LXcbEventFilter.cpp b/lumina-wm-INCOMPLETE/LXcbEventFilter.cpp index 6d6cef55..abbe5a5a 100644 --- a/lumina-wm-INCOMPLETE/LXcbEventFilter.cpp +++ b/lumina-wm-INCOMPLETE/LXcbEventFilter.cpp @@ -183,7 +183,8 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag //============================== } } - return stopevent; + return false; + //never stop event handling (this will not impact the X events themselves - just the internal screensaver/WM/widgets) } bool XCBEventFilter::BlockInputEvent(WId win){ @@ -191,7 +192,6 @@ bool XCBEventFilter::BlockInputEvent(WId win){ // - Always let the screensaver know about the event first (need to reset timers and such) obj->emit NewInputEvent(); // - Check the state of the screensaver - if(obj->SSLocked){ qDebug() << "SS Locked"; return true; } // - Check the state of any fullscreen apps else if( win!=0 && !obj->FS_WINS.isEmpty()){ |