summaryrefslogtreecommitdiff
path: root/src/Configmenu.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-05-12 01:23:48 +0000
committerDana Jansens <danakj@orodu.net>2002-05-12 01:23:48 +0000
commita0dbb0e13f19ac4cc2dddf3d94723174971df6d2 (patch)
treed7bdf020048925d67a697fbd1d3efdb720cc9cc0 /src/Configmenu.cc
parentf804f86c3eacc11091cbff2fa287799f925c2635 (diff)
couple of LinkedLists converted to STL lists in BScreen
changed teh calls to XSetInputFocus. Using the root window as the fallback when there is nothing to focus instead of the toolbar. Also, always using 'RevertToPointerRoot' instead of sometimes 'RevertToParent'
Diffstat (limited to 'src/Configmenu.cc')
-rw-r--r--src/Configmenu.cc21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/Configmenu.cc b/src/Configmenu.cc
index 0a219662..3282463e 100644
--- a/src/Configmenu.cc
+++ b/src/Configmenu.cc
@@ -1,4 +1,5 @@
// Configmenu.cc for Openbox
+// Copyright (c) 2002 - 2002 Ben Jansens <ben@orodu.net>
// Copyright (c) 2001 Sean 'Shaleh' Perry <shaleh@debian.org>
// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
//
@@ -184,32 +185,18 @@ void Configmenu::Focusmenu::itemSelected(int button, int index) {
case 1: // click to focus
configmenu->screen.setSloppyFocus(false);
configmenu->screen.setAutoRaise(false);
-
- if (! configmenu->screen.getOpenbox().focusedWindow())
- XSetInputFocus(configmenu->screen.getOpenbox().getXDisplay(),
- configmenu->screen.getToolbar()->getWindowID(),
- RevertToParent, CurrentTime);
- else
- XSetInputFocus(configmenu->screen.getOpenbox().getXDisplay(),
- configmenu->screen.getOpenbox().
- focusedWindow()->getClientWindow(),
- RevertToParent, CurrentTime);
-
+ // make windows all grab button1 clicks
configmenu->screen.reconfigure();
-
break;
case 2: // sloppy focus
configmenu->screen.setSloppyFocus(true);
-
+ // make windows stop grabbing button1 clicks
configmenu->screen.reconfigure();
-
break;
case 3: // auto raise with sloppy focus
- bool change = ((configmenu->screen.autoRaise()) ? false : true);
- configmenu->screen.setAutoRaise(change);
-
+ configmenu->screen.setAutoRaise(!configmenu->screen.autoRaise());
break;
}