diff options
author | Ken Moore <ken@pcbsd.org> | 2015-01-01 10:18:35 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-01-01 10:18:35 -0500 |
commit | 64c9ecca216ce03287908c510a7af3adff112832 (patch) | |
tree | ebfdb821a450121a8ebd9352b2c57ce0cdd3d0ef /lumina-desktop/LDesktop.cpp | |
parent | Make sure that any argv[] -> QString translations from CLI input are run thro... (diff) | |
download | lumina-64c9ecca216ce03287908c510a7af3adff112832.tar.gz lumina-64c9ecca216ce03287908c510a7af3adff112832.tar.bz2 lumina-64c9ecca216ce03287908c510a7af3adff112832.zip |
Large update of XLib -> XCB usage
1) Add ability for task manager to minimize/maximize window from details menu
2) Add quick check/movement of new windows to make sure they are not underneath any panels
Diffstat (limited to 'lumina-desktop/LDesktop.cpp')
-rw-r--r-- | lumina-desktop/LDesktop.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lumina-desktop/LDesktop.cpp b/lumina-desktop/LDesktop.cpp index 07225fad..16d74f9d 100644 --- a/lumina-desktop/LDesktop.cpp +++ b/lumina-desktop/LDesktop.cpp @@ -58,6 +58,20 @@ void LDesktop::hide(){ for(int i=0; i<PANELS.length(); i++){ PANELS[i]->hide(); } } +WId LDesktop::backgroundID(){ + if(bgWindow!=0){ return bgWindow->winId(); } + else{ return QX11Info::appRootWindow(); } +} + +QRect LDesktop::availableScreenGeom(){ + //Return a QRect containing the (global) screen area that is available (not under any panels) + if(bgDesktop!=0){ + return globalWorkRect; //saved from previous calculations + }else{ + return desktop->screenGeometry(desktopnumber); + } +} + void LDesktop::SystemLogout(){ LSession::handle()->systemWindow(); } @@ -419,6 +433,7 @@ void LDesktop::UpdateDesktopPluginArea(){ QRect rec = visReg.boundingRect(); //LSession::handle()->XCB->SetScreenWorkArea((unsigned int) desktopnumber, rec); //Now remove the X offset to place it on the current screen (needs widget-coords, not global) + globalWorkRect = rec; //save this for later rec.moveTopLeft( QPoint( rec.x()-desktop->screenGeometry(desktopnumber).x() , rec.y() ) ); //qDebug() << "DPlug Area:" << rec.x() << rec.y() << rec.width() << rec.height(); bgDesktop->setGeometry( rec ); |