aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/LPanel.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-04-28 09:01:53 -0400
committerKen Moore <ken@pcbsd.org>2015-04-28 09:01:53 -0400
commitad63029ee8f2743c3d945cf120e82bcbc36eac2c (patch)
tree8a6735baa0d0c51ccc1caa1d7fd84af60fc01097 /lumina-desktop/LPanel.cpp
parentAdd a button to the userbutton "home dir" section for starting a search of th... (diff)
downloadlumina-ad63029ee8f2743c3d945cf120e82bcbc36eac2c.tar.gz
lumina-ad63029ee8f2743c3d945cf120e82bcbc36eac2c.tar.bz2
lumina-ad63029ee8f2743c3d945cf120e82bcbc36eac2c.zip
Final fix for the new panel window-reactivation routine: only re-activate the window if it is still visible on the screen
Diffstat (limited to 'lumina-desktop/LPanel.cpp')
-rw-r--r--lumina-desktop/LPanel.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lumina-desktop/LPanel.cpp b/lumina-desktop/LPanel.cpp
index 84c18bf2..3755e9a6 100644
--- a/lumina-desktop/LPanel.cpp
+++ b/lumina-desktop/LPanel.cpp
@@ -335,9 +335,12 @@ void LPanel::leaveEvent(QEvent *event){
if( !this->geometry().contains(QCursor::pos()) ){
//Move the panel back to it's "hiding" spot
if(hidden){ this->move(hidepoint); }
- //Only re-activate the old window if the panel is still currently active
- if(tmpID!=0 && (this->winId()==LSession::handle()->XCB->ActiveWindow()) ){ LSession::handle()->XCB->ActivateWindow(tmpID); }
- tmpID = 0;
+ //Only re-activate the old window if the panel is still currently active and the old window is still visible
+ if(tmpID!=0){
+ LXCB::WINDOWSTATE state = LSession::handle()->XCB->WindowState(tmpID);
+ if( state!=LXCB::IGNORE && state !=LXCB::INVISIBLE && (this->winId()==LSession::handle()->XCB->ActiveWindow()) ){ LSession::handle()->XCB->ActivateWindow(tmpID); }
+ tmpID = 0;
+ }
}
event->accept(); //just to quiet the compile warning
bgstack15