rev 5944 - in trunk/packages/kdebase/debian: . patches

Ana Beatriz Guerrero López ana at alioth.debian.org
Thu Apr 19 18:05:46 UTC 2007


Author: ana
Date: 2007-04-19 18:05:46 +0000 (Thu, 19 Apr 2007)
New Revision: 5944

Added:
   trunk/packages/kdebase/debian/patches/45_plugin-keyboard-handler.diff
Modified:
   trunk/packages/kdebase/debian/changelog
Log:
Patch i forgot


Modified: trunk/packages/kdebase/debian/changelog
===================================================================
--- trunk/packages/kdebase/debian/changelog	2007-04-19 17:38:19 UTC (rev 5943)
+++ trunk/packages/kdebase/debian/changelog	2007-04-19 18:05:46 UTC (rev 5944)
@@ -1,3 +1,9 @@
+kdebase (4:3.5.6.dfsg.2-2) unstable; urgency=low
+
+  * Add patch 45_plugin-keyboard-handler.diff to fix keyboard events handling.
+
+ -- Ana Beatriz Guerrero Lopez <ana at debian.org>  Thu, 19 Apr 2007 18:43:34 +0200
+
 kdebase (4:3.5.6.dfsg.2-1) unstable; urgency=low
 
   * Upload to unstable after Etch release. Some bugs fixed in this release:

Added: trunk/packages/kdebase/debian/patches/45_plugin-keyboard-handler.diff
===================================================================
--- trunk/packages/kdebase/debian/patches/45_plugin-keyboard-handler.diff	2007-04-19 17:38:19 UTC (rev 5943)
+++ trunk/packages/kdebase/debian/patches/45_plugin-keyboard-handler.diff	2007-04-19 18:05:46 UTC (rev 5944)
@@ -0,0 +1,77 @@
+------------------------------------------------------------------------
+r652585 | lunakl | 2007-04-11 16:26:32 +0200 (Wed, 11 Apr 2007) | 3 lines
+Changed paths:
+   M /branches/KDE/3.5/kdebase/nsplugins/viewer/qxteventloop.cpp
+
+Fix keyboard events handling.
+
+
+------------------------------------------------------------------------
+Index: nsplugins/viewer/qxteventloop.cpp
+===================================================================
+--- nsplugins/viewer/qxteventloop.cpp	(revision 652584)
++++ nsplugins/viewer/qxteventloop.cpp	(revision 652585)
+@@ -32,12 +32,16 @@
+ ** not clear to you.
+ **
+ **********************************************************************/
++
++#include <config.h>
++
+ #include "qxteventloop.h"
+ 
+ #if QT_VERSION >= 0x030100
+ 
+ #include <qapplication.h>
+ #include <qwidgetintdict.h>
++#include <kglobal.h>
+ 
+ // resolve the conflict between X11's FocusIn and QEvent::FocusIn
+ const int XFocusOut = FocusOut;
+@@ -52,6 +56,8 @@ const int XKeyRelease = KeyRelease;
+ 
+ Boolean qmotif_event_dispatcher( XEvent *event );
+ 
++static void handle_xquerykeymap( Display* dpy, XEvent* event );
++
+ class QXtEventLoopPrivate
+ {
+ public:
+@@ -147,6 +153,7 @@ void QXtEventLoopPrivate::unhook()
+ extern bool qt_try_modal( QWidget *, XEvent * ); // defined in qapplication_x11.cpp
+ Boolean qmotif_event_dispatcher( XEvent *event )
+ {
++    handle_xquerykeymap( qt_xdisplay(), event );
+     QApplication::sendPostedEvents();
+ 
+     QWidgetIntDict *mapper = &static_d->mapper;
+@@ -462,6 +469,29 @@ bool QXtEventLoop::processEvents( Proces
+     return ( (flags & WaitForMore) || ( pendingmask != 0 ) || nevents > 0 );
+ }
+ 
++#include <dlfcn.h>
++
++static char xquerykeymap_data[ 32 ];
++static int (*real_xquerykeymap)( Display*, char[32] ) = NULL;
++
++static void handle_xquerykeymap( Display* dpy, XEvent* event )
++{
++    if( real_xquerykeymap == NULL )
++        real_xquerykeymap = (int (*)( Display*, char[32] )) dlsym( RTLD_NEXT, "XQueryKeymap" );
++    if( event->type == XFocusIn || event->type == XKeyPress || event->type == XKeyRelease )
++        real_xquerykeymap( dpy, xquerykeymap_data );
++    if( event->type == XFocusOut )
++        memset( xquerykeymap_data, 0, 32 );
++}
++
++extern "C" KDE_EXPORT
++int XQueryKeymap( Display* , char k[32] )
++{
++    memcpy( k, xquerykeymap_data, 32 );
++    return 1;
++}
++
++
+ #include "qxteventloop.moc"
+ 
+ #endif




More information about the pkg-kde-commits mailing list