summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authorJay Catherwood <jay.catherwood@gmail.com>2010-08-09 10:54:37 -0400
committerJay Catherwood <jay.catherwood@gmail.com>2010-08-09 10:54:37 -0400
commit4e1a6651ca51e0d81b3526e9d88afaa92b8e405f (patch)
tree20253c9b3ac70d88908d88aa9c4e737ec9605f7b /src/window.cpp
parent0c072654d68ad865ca9a18d663712f0366589fcb (diff)
downloadunity-window-decorator-4e1a6651ca51e0d81b3526e9d88afaa92b8e405f.tar.gz
unity-window-decorator-4e1a6651ca51e0d81b3526e9d88afaa92b8e405f.tar.bz2
Fix gimp layers window disappearing
This fixes bug 1303. Under certain circumstances restack ends up being called with the window as its own aboveId, causing it to disappear.
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/window.cpp b/src/window.cpp
index c43b3c5..da62747 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -1346,7 +1346,10 @@ CompWindow::unmap ()
bool
PrivateWindow::restack (Window aboveId)
{
- if (window->prev)
+ if (aboveId && (aboveId == id || aboveId == frame))
+ // Don't try to raise a window above itself
+ return false;
+ else if (window->prev)
{
if (aboveId && (aboveId == window->prev->id () ||
aboveId == window->prev->frame ()))