From 39e80fa25c4ca003b5d2648ca518f674997a3a6b Mon Sep 17 00:00:00 2001 From: fluxgen Date: Fri, 30 Aug 2002 14:07:38 +0000 Subject: make sure we have valid keybindings while moving a window --- src/fluxbox.cc | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/src/fluxbox.cc b/src/fluxbox.cc index cc2e199..01e2c3f 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.72 2002/08/30 13:11:47 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.73 2002/08/30 14:07:38 fluxgen Exp $ #include "fluxbox.hh" @@ -1146,6 +1146,36 @@ void Fluxbox::handleKeyEvent(XKeyEvent &ke) { if (action==Keys::LASTKEYGRAB) //if action not found end case break; + // what to allow if moving + if (focused_window && focused_window->isMoving()) { + int allowed = false; + switch (action) { + case Keys::WORKSPACE: + case Keys::SENDTOWORKSPACE: + case Keys::WORKSPACE1: + case Keys::WORKSPACE2: + case Keys::WORKSPACE3: + case Keys::WORKSPACE4: + case Keys::WORKSPACE5: + case Keys::WORKSPACE6: + case Keys::WORKSPACE7: + case Keys::WORKSPACE8: + case Keys::WORKSPACE9: + case Keys::WORKSPACE10: + case Keys::WORKSPACE11: + case Keys::WORKSPACE12: + case Keys::NEXTWORKSPACE: + case Keys::PREVWORKSPACE: + case Keys::LEFTWORKSPACE: + case Keys::RIGHTWORKSPACE: + allowed = true; + break; + default: + allowed = false; + } + if (!allowed) break; + } + switch (action) { case Keys::WORKSPACE: // Workspace1 has id 0, hence -1 -- cgit v0.11.2