aboutsummaryrefslogtreecommitdiff
path: root/src/Tab.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2002-09-12 14:55:11 (GMT)
committerrathnor <rathnor>2002-09-12 14:55:11 (GMT)
commite54676573689d353bf53a4d6225ba1206ddf10fa (patch)
tree1f7dcc90b3613f46f469dcece4acf5ebfbe81221 /src/Tab.cc
parent8a728b46fd05b872b5daf9632af478f1c098dd4f (diff)
downloadfluxbox_pavel-e54676573689d353bf53a4d6225ba1206ddf10fa.zip
fluxbox_pavel-e54676573689d353bf53a4d6225ba1206ddf10fa.tar.bz2
Fixes to sticky window + focus handling. Particularly for
next/prevFocus crashes. Also, sticky windows are now always reassociated to the active workspace.
Diffstat (limited to 'src/Tab.cc')
-rw-r--r--src/Tab.cc23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/Tab.cc b/src/Tab.cc
index 8752c14..b39ca1c 100644
--- a/src/Tab.cc
+++ b/src/Tab.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Tab.cc,v 1.32 2002/09/08 19:41:59 fluxgen Exp $ 22// $Id: Tab.cc,v 1.33 2002/09/12 14:55:11 rathnor Exp $
23 23
24#include "Tab.hh" 24#include "Tab.hh"
25 25
@@ -283,20 +283,24 @@ void Tab::withdraw() {
283void Tab::stick() { 283void Tab::stick() {
284 Tab *tab; 284 Tab *tab;
285 285
286 bool wasstuck = m_win->isStuck();
287
286 //now do stick for all windows in the list 288 //now do stick for all windows in the list
287 for (tab = getFirst(this); tab != 0; tab = tab->m_next) { 289 for (tab = getFirst(this); tab != 0; tab = tab->m_next) {
288 FluxboxWindow *win = tab->m_win; //just for convenience 290 FluxboxWindow *win = tab->m_win; //just for convenience
289 if (win->isStuck()) { 291 if (wasstuck) {
290 win->blackbox_attrib.flags ^= BaseDisplay::ATTRIB_OMNIPRESENT; 292 win->blackbox_attrib.flags ^= BaseDisplay::ATTRIB_OMNIPRESENT;
291 win->blackbox_attrib.attrib ^= BaseDisplay::ATTRIB_OMNIPRESENT; 293 win->blackbox_attrib.attrib ^= BaseDisplay::ATTRIB_OMNIPRESENT;
292 win->stuck = false; 294 win->stuck = false;
293 if (!win->isIconic()) {
294 BScreen *screen = win->getScreen();
295 screen->reassociateWindow(win, screen->getCurrentWorkspace()->workspaceID(), true);
296 }
297 295
298 } else { 296 } else {
299 win->stuck = true; 297 win->stuck = true;
298 BScreen *screen = win->getScreen();
299 if (!win->isIconic() && !(win->getWorkspaceNumber() !=
300 screen->getCurrentWorkspaceID())) {
301 screen->reassociateWindow(win, screen->getCurrentWorkspaceID(), true);
302 }
303
300 win->blackbox_attrib.flags |= BaseDisplay::ATTRIB_OMNIPRESENT; 304 win->blackbox_attrib.flags |= BaseDisplay::ATTRIB_OMNIPRESENT;
301 win->blackbox_attrib.attrib |= BaseDisplay::ATTRIB_OMNIPRESENT; 305 win->blackbox_attrib.attrib |= BaseDisplay::ATTRIB_OMNIPRESENT;
302 } 306 }
@@ -936,9 +940,10 @@ void Tab::insert(Tab *tab) {
936 for (; last->m_next!=0; last=last->m_next); 940 for (; last->m_next!=0; last=last->m_next);
937 //do sticky before we connect it to the chain 941 //do sticky before we connect it to the chain
938 //sticky bit on window 942 //sticky bit on window
939 if (m_win->isStuck() && !tab->m_win->isStuck() || 943 if (m_win->isStuck() != tab->m_win->isStuck()) {
940 !m_win->isStuck() && tab->m_win->isStuck()) 944 tab->m_win->stuck = !m_win->stuck; // it will toggle
941 tab->m_win->stick(); //this will set all the m_wins in the list 945 tab->stick(); //this will set all the m_wins in the list
946 }
942 947
943 //connect the tab to this chain 948 //connect the tab to this chain
944 949