aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/XLayer.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-01-25 18:09:11 (GMT)
committermarkt <markt>2007-01-25 18:09:11 (GMT)
commit0f07f98ae22cc769a57e85c19ecb5397c2084488 (patch)
tree5b8b87254da99799c342efbefcda51f9425c69fc /src/FbTk/XLayer.cc
parent69bac5d56ff60dfce108e3a25270aab8eaf2b345 (diff)
downloadfluxbox-0f07f98ae22cc769a57e85c19ecb5397c2084488.zip
fluxbox-0f07f98ae22cc769a57e85c19ecb5397c2084488.tar.bz2
don't raise windows above OverrideRedirect windows, or else they eventually get restacked on the bottom
Diffstat (limited to 'src/FbTk/XLayer.cc')
-rw-r--r--src/FbTk/XLayer.cc42
1 files changed, 14 insertions, 28 deletions
diff --git a/src/FbTk/XLayer.cc b/src/FbTk/XLayer.cc
index 0341563..8e1dfc1 100644
--- a/src/FbTk/XLayer.cc
+++ b/src/FbTk/XLayer.cc
@@ -90,38 +90,24 @@ void XLayer::stackBelowItem(XLayerItem *item, XLayerItem *above) {
90 if (!m_manager.isUpdatable()) 90 if (!m_manager.isUpdatable())
91 return; 91 return;
92 92
93 Window *winlist;
94 size_t winnum, size, num = item->numWindows();
95
96 // if there are no windows provided for above us, 93 // if there are no windows provided for above us,
97 // then we must have to go right to the top of the stack 94 // then we must restack the entire layer
95 // we can't do XRaiseWindow because a restack then causes OverrideRedirect
96 // windows to get pushed to the bottom
98 if (!above) { // must need to go right to top 97 if (!above) { // must need to go right to top
99 if (item->getWindows().front()->window()) 98 restack();
100 XRaiseWindow(FbTk::App::instance()->display(), item->getWindows().front()->window()); 99 return;
101
102 // if this XLayerItem has more than one window,
103 // then we'll stack the rest in under the front one too
104 // our size needs to be the number of windows in the group, since there isn't one above.
105 if (num > 1) {
106 winnum = 0;
107 // stack relative to top one (just raised)
108 size = num;
109 winlist = new Window[size];
110 } else {
111 // we've raised the window, nothing else to do
112 return;
113 }
114 } else {
115 // We do have a window to stack below
116
117 // so we put it on top, and fill the rest of the array with the ones to go below it.
118 winnum = 1;
119 size = num+1;
120 winlist = new Window[size];
121 // assume that above's window exists
122 winlist[0] = above->getWindows().back()->window();
123 } 100 }
124 101
102 Window *winlist;
103 size_t winnum = 1, size = item->numWindows()+1;
104
105 // We do have a window to stack below
106 // so we put it on top, and fill the rest of the array with the ones to go below it.
107 winlist = new Window[size];
108 // assume that above's window exists
109 winlist[0] = above->getWindows().back()->window();
110
125 // fill the rest of the array 111 // fill the rest of the array
126 XLayerItem::Windows::iterator it = item->getWindows().begin(); 112 XLayerItem::Windows::iterator it = item->getWindows().begin();
127 XLayerItem::Windows::iterator it_end = item->getWindows().end(); 113 XLayerItem::Windows::iterator it_end = item->getWindows().end();