From ab5b07786a2f1f71251b1b7ccb2a0eeb156a0f9d Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Tue, 19 Jun 2001 15:05:03 +0000 Subject: [PATCH] more alt-tab hanging fixes. Requires update in libkdecore/kglobalaccel.cpp svn path=/trunk/kdebase/kwin/; revision=103034 --- workspace.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/workspace.cpp b/workspace.cpp index e8d3f7757f..300a13f716 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -834,12 +834,14 @@ bool Workspace::startKDEWalkThroughWindows() LeaveWindowMask | PointerMotionMask), GrabModeAsync, GrabModeAsync, None, None, kwin_time ) != GrabSuccess ) { - return FALSE; + XUngrabKeyboard( qt_xdisplay(), kwin_time ); + return FALSE; } if ( XGrabKeyboard(qt_xdisplay(), root, FALSE, GrabModeAsync, GrabModeAsync, kwin_time) != GrabSuccess ) { + XUngrabKeyboard( qt_xdisplay(), kwin_time ); XUngrabPointer( qt_xdisplay(), kwin_time); return FALSE; } @@ -858,12 +860,14 @@ bool Workspace::startWalkThroughDesktops( int mode ) LeaveWindowMask | PointerMotionMask), GrabModeAsync, GrabModeAsync, None, None, kwin_time ) != GrabSuccess ) { - return FALSE; + XUngrabKeyboard( qt_xdisplay(), kwin_time ); + return FALSE; } if ( XGrabKeyboard(qt_xdisplay(), root, FALSE, GrabModeAsync, GrabModeAsync, kwin_time) != GrabSuccess ) { + XUngrabKeyboard( qt_xdisplay(), kwin_time ); XUngrabPointer( qt_xdisplay(), kwin_time); return FALSE; } @@ -2575,6 +2579,12 @@ void Workspace::createKeybindings(){ walkBackThroughDesktopListKeycode = keys->currentKey( "Walk back through desktop list" ); walkThroughWindowsKeycode = keys->currentKey( "Walk through windows" ); walkBackThroughWindowsKeycode = keys->currentKey( "Walk back through windows" ); + keys->setItemRawModeEnabled( "Walk through desktops", TRUE ); + keys->setItemRawModeEnabled( "Walk back through desktops", TRUE ); + keys->setItemRawModeEnabled( "Walk through desktop list", TRUE ); + keys->setItemRawModeEnabled( "Walk back through desktop list", TRUE ); + keys->setItemRawModeEnabled( "Walk through windows", TRUE ); + keys->setItemRawModeEnabled( "Walk back through windows", TRUE ); } void Workspace::slotSwitchDesktop1(){