aboutsummaryrefslogtreecommitdiff
path: root/src/WorkspaceCmd.cc
diff options
context:
space:
mode:
authormathias <mathias>2005-05-06 09:22:53 (GMT)
committermathias <mathias>2005-05-06 09:22:53 (GMT)
commit6c057c6903151aab92309310087d5af455ecefce (patch)
tree1d4c98ad1637df09b89593b3e6a4a70245db4602 /src/WorkspaceCmd.cc
parent7d4f711204ab0b51d45eaff332708f529c11c9f5 (diff)
downloadfluxbox-6c057c6903151aab92309310087d5af455ecefce.zip
fluxbox-6c057c6903151aab92309310087d5af455ecefce.tar.bz2
Fix for #1160244, #1099704, #1094107:
if the xkb-extension is enabled and the user switches between his/her keyboardlayouts fluxbox's keybhandling doesn't work well anymore because xkeyevent.state contains also xkb-related flags and thus we have to handle that with caution. KeyUtils now contain 'isolateModifierMask()' to really work only on the modifiers. why not as part of cleanMods() ? because the XLookupString return false results, eg TextBox's would only print chars from the first keyboardlayout.
Diffstat (limited to 'src/WorkspaceCmd.cc')
-rw-r--r--src/WorkspaceCmd.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/WorkspaceCmd.cc b/src/WorkspaceCmd.cc
index 3e6d128..08473df 100644
--- a/src/WorkspaceCmd.cc
+++ b/src/WorkspaceCmd.cc
@@ -42,13 +42,13 @@
42#include <iostream> 42#include <iostream>
43 43
44void NextWindowCmd::execute() { 44void NextWindowCmd::execute() {
45
46 BScreen *screen = Fluxbox::instance()->keyScreen(); 45 BScreen *screen = Fluxbox::instance()->keyScreen();
47 if (screen != 0) { 46 if (screen != 0) {
48 Fluxbox *fb = Fluxbox::instance(); 47 Fluxbox *fb = Fluxbox::instance();
49 // special case for commands from key events 48 // special case for commands from key events
50 if (fb->lastEvent().type == KeyPress) { 49 if (fb->lastEvent().type == KeyPress) {
51 unsigned int mods = FbTk::KeyUtil::instance().cleanMods(fb->lastEvent().xkey.state); 50 unsigned int mods = FbTk::KeyUtil::instance().cleanMods(fb->lastEvent().xkey.state);
51 mods = FbTk::KeyUtil::instance().isolateModifierMask(mods);
52 if (mods == 0) // can't stacked cycle unless there is a mod to grab 52 if (mods == 0) // can't stacked cycle unless there is a mod to grab
53 screen->nextFocus(m_option | BScreen::CYCLELINEAR); 53 screen->nextFocus(m_option | BScreen::CYCLELINEAR);
54 else { 54 else {
@@ -71,6 +71,7 @@ void PrevWindowCmd::execute() {
71 // special case for commands from key events 71 // special case for commands from key events
72 if (fb->lastEvent().type == KeyPress) { 72 if (fb->lastEvent().type == KeyPress) {
73 unsigned int mods = FbTk::KeyUtil::instance().cleanMods(fb->lastEvent().xkey.state); 73 unsigned int mods = FbTk::KeyUtil::instance().cleanMods(fb->lastEvent().xkey.state);
74 mods = FbTk::KeyUtil::instance().isolateModifierMask(mods);
74 if (mods == 0) // can't stacked cycle unless there is a mod to grab 75 if (mods == 0) // can't stacked cycle unless there is a mod to grab
75 screen->prevFocus(m_option | BScreen::CYCLELINEAR); 76 screen->prevFocus(m_option | BScreen::CYCLELINEAR);
76 else { 77 else {