rev 5483 - in trunk/packages/kdebase/debian: . patches
Modestas Vainius
modax-guest at alioth.debian.org
Tue Jan 30 19:48:47 CET 2007
Author: modax-guest
Date: 2007-01-30 19:48:46 +0100 (Tue, 30 Jan 2007)
New Revision: 5483
Added:
trunk/packages/kdebase/debian/patches/21_kwin_win_tab_desktop_switch_fix.diff
Modified:
trunk/packages/kdebase/debian/changelog
Log:
Fix "kwin: switch desktop with win+tab key broken" in trunk, but still broken in etch. Port to etch too?
Modified: trunk/packages/kdebase/debian/changelog
===================================================================
--- trunk/packages/kdebase/debian/changelog 2007-01-30 17:54:06 UTC (rev 5482)
+++ trunk/packages/kdebase/debian/changelog 2007-01-30 18:48:46 UTC (rev 5483)
@@ -11,8 +11,13 @@
* Add portuguese debconf translation. Thanks to Carlos Lisboa
(Closes: #408021)
- -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Sat, 27 Jan 2007 19:57:25 +0100
+ +++ Changes by Modestas Vainius:
+ * Add patch from upstream svn to fix "switching desktops with win+tab
+ key broken" bug (patch no. 21) (Closes: #406549)
+
+ -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Tue, 30 Jan 2007 20:25:48 +0200
+
kdebase (4:3.5.6.dfsg.1-1) experimental; urgency=low
* New upstream release:
Added: trunk/packages/kdebase/debian/patches/21_kwin_win_tab_desktop_switch_fix.diff
===================================================================
--- trunk/packages/kdebase/debian/patches/21_kwin_win_tab_desktop_switch_fix.diff 2007-01-30 17:54:06 UTC (rev 5482)
+++ trunk/packages/kdebase/debian/patches/21_kwin_win_tab_desktop_switch_fix.diff 2007-01-30 18:48:46 UTC (rev 5483)
@@ -0,0 +1,122 @@
+Index: kdebase/kwin/events.cpp
+===================================================================
+--- kdebase/kwin/events.cpp (revision 626726)
++++ kdebase/kwin/events.cpp (revision 626727)
+@@ -451,10 +451,6 @@
+ if( electricBorder( e ))
+ return true;
+ break;
+- case MappingNotify:
+- XRefreshKeyboardMapping( &e->xmapping );
+- tab_box->updateKeyMapping();
+- break;
+ default:
+ break;
+ }
+Index: kdebase/kwin/tabbox.cpp
+===================================================================
+--- kdebase/kwin/tabbox.cpp (revision 626726)
++++ kdebase/kwin/tabbox.cpp (revision 626727)
+@@ -54,7 +54,6 @@
+
+ no_tasks = i18n("*** No Windows ***");
+ m = DesktopMode; // init variables
+- updateKeyMapping();
+ reconfigure();
+ reset();
+ connect(&delayedShowTimer, SIGNAL(timeout()), this, SLOT(show()));
+@@ -787,10 +786,6 @@
+ return bAll;
+ }
+
+-static const int MAX_KEYSYMS = 4;
+-static uint alt_keysyms[ MAX_KEYSYMS ];
+-static uint win_keysyms[ MAX_KEYSYMS ];
+-
+ static bool areModKeysDepressed( const KKeySequence& seq )
+ {
+ uint rgKeySyms[10];
+@@ -811,17 +806,18 @@
+ }
+ if( mod & KKey::ALT )
+ {
+- for( int i = 0;
+- i < MAX_KEYSYMS && alt_keysyms[ i ] != NoSymbol;
+- ++i )
+- rgKeySyms[nKeySyms++] = alt_keysyms[ i ];
++ rgKeySyms[nKeySyms++] = XK_Alt_L;
++ rgKeySyms[nKeySyms++] = XK_Alt_R;
+ }
+ if( mod & KKey::WIN )
+ {
+- for( int i = 0;
+- i < MAX_KEYSYMS && win_keysyms[ i ] != NoSymbol;
+- ++i )
+- rgKeySyms[nKeySyms++] = win_keysyms[ i ];
++ // It would take some code to determine whether the Win key
++ // is associated with Super or Meta, so check for both.
++ // See bug #140023 for details.
++ rgKeySyms[nKeySyms++] = XK_Super_L;
++ rgKeySyms[nKeySyms++] = XK_Super_R;
++ rgKeySyms[nKeySyms++] = XK_Meta_L;
++ rgKeySyms[nKeySyms++] = XK_Meta_R;
+ }
+
+ return areKeySymXsDepressed( false, rgKeySyms, nKeySyms );
+@@ -839,44 +835,6 @@
+ return false;
+ }
+
+-void TabBox::updateKeyMapping()
+- {
+- const int size = 6;
+- uint keysyms[ size ] = { XK_Alt_L, XK_Alt_R, XK_Super_L, XK_Super_R, XK_Meta_L, XK_Meta_R };
+- XModifierKeymap* map = XGetModifierMapping( qt_xdisplay() );
+- int altpos = 0;
+- int winpos = 0;
+- int winmodpos = -1;
+- int winmod = KKeyNative::modX( KKey::WIN );
+- while( winmod > 0 ) // get position of the set bit in winmod
+- {
+- winmod >>= 1;
+- ++winmodpos;
+- }
+- for( int i = 0;
+- i < MAX_KEYSYMS;
+- ++i )
+- alt_keysyms[ i ] = win_keysyms[ i ] = NoSymbol;
+- for( int i = 0;
+- i < size;
+- ++i )
+- {
+- KeyCode keycode = XKeysymToKeycode( qt_xdisplay(), keysyms[ i ] );
+- for( int j = 0;
+- j < map->max_keypermod;
+- ++j )
+- {
+- if( map->modifiermap[ 3 * map->max_keypermod + j ] == keycode ) // Alt
+- if( altpos < MAX_KEYSYMS )
+- alt_keysyms[ altpos++ ] = keysyms[ i ];
+- if( winmodpos >= 0 && map->modifiermap[ winmodpos * map->max_keypermod + j ] == keycode )
+- if( winpos < MAX_KEYSYMS )
+- win_keysyms[ winpos++ ] = keysyms[ i ];
+- }
+- }
+- XFreeModifiermap( map );
+- }
+-
+ void Workspace::slotWalkThroughWindows()
+ {
+ if ( root != qt_xrootwin() )
+Index: kdebase/kwin/tabbox.h
+===================================================================
+--- kdebase/kwin/tabbox.h (revision 626726)
++++ kdebase/kwin/tabbox.h (revision 626727)
+@@ -54,7 +54,6 @@
+ Workspace* workspace() const;
+
+ void reconfigure();
+- void updateKeyMapping();
+
+ protected:
+ void showEvent( QShowEvent* );
More information about the pkg-kde-commits
mailing list