aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authorlofi <lofi@FreeBSD.org>2007-04-22 18:07:24 +0800
committerlofi <lofi@FreeBSD.org>2007-04-22 18:07:24 +0800
commit79de4556b45578a9989e79fbaa9ea3fdee4b04a1 (patch)
treea0300934aed4bdbba29fc6cf1b142267a7640522 /x11
parente9fb24056597965d6d6f8919db70578c706f6b94 (diff)
downloadfreebsd-ports-gnome-79de4556b45578a9989e79fbaa9ea3fdee4b04a1.tar.gz
freebsd-ports-gnome-79de4556b45578a9989e79fbaa9ea3fdee4b04a1.tar.zst
freebsd-ports-gnome-79de4556b45578a9989e79fbaa9ea3fdee4b04a1.zip
Prevent kdebase3 from deleting the Gamma Correction KDE Control Center
module (from kdegraphics3) on installation.
Diffstat (limited to 'x11')
-rw-r--r--x11/kde4-baseapps/Makefile3
-rw-r--r--x11/kde4-baseapps/files/patch-plugin-keyboard-handler.diff77
-rw-r--r--x11/kde4-runtime/Makefile3
-rw-r--r--x11/kde4-runtime/files/patch-plugin-keyboard-handler.diff77
-rw-r--r--x11/kde4-workspace/Makefile3
-rw-r--r--x11/kde4-workspace/files/patch-plugin-keyboard-handler.diff77
-rw-r--r--x11/kdebase3/Makefile3
-rw-r--r--x11/kdebase3/files/patch-plugin-keyboard-handler.diff77
-rw-r--r--x11/kdebase4-runtime/Makefile3
-rw-r--r--x11/kdebase4-runtime/files/patch-plugin-keyboard-handler.diff77
-rw-r--r--x11/kdebase4-workspace/Makefile3
-rw-r--r--x11/kdebase4-workspace/files/patch-plugin-keyboard-handler.diff77
-rw-r--r--x11/kdebase4/Makefile3
-rw-r--r--x11/kdebase4/files/patch-plugin-keyboard-handler.diff77
14 files changed, 553 insertions, 7 deletions
diff --git a/x11/kde4-baseapps/Makefile b/x11/kde4-baseapps/Makefile
index c8acd2d6337b..7019894baa04 100644
--- a/x11/kde4-baseapps/Makefile
+++ b/x11/kde4-baseapps/Makefile
@@ -104,7 +104,8 @@ pre-configure:
${REINPLACE_CMD} \
-e 's|-s|-u|g' \
${WRKSRC}/kioslave/media/services/media_safelyremove.desktop
-
+ ${REINPLACE_CMD} \
+ -e 's|kgamma.desktop||g' ${WRKSRC}/applnk/old_desktop_files
post-configure:
${REINPLACE_CMD} -e "s@^\s*Exec=.*\$$@Exec=ElectricEyes@" \
diff --git a/x11/kde4-baseapps/files/patch-plugin-keyboard-handler.diff b/x11/kde4-baseapps/files/patch-plugin-keyboard-handler.diff
new file mode 100644
index 000000000000..8d301d6d4e69
--- /dev/null
+++ b/x11/kde4-baseapps/files/patch-plugin-keyboard-handler.diff
@@ -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
diff --git a/x11/kde4-runtime/Makefile b/x11/kde4-runtime/Makefile
index c8acd2d6337b..7019894baa04 100644
--- a/x11/kde4-runtime/Makefile
+++ b/x11/kde4-runtime/Makefile
@@ -104,7 +104,8 @@ pre-configure:
${REINPLACE_CMD} \
-e 's|-s|-u|g' \
${WRKSRC}/kioslave/media/services/media_safelyremove.desktop
-
+ ${REINPLACE_CMD} \
+ -e 's|kgamma.desktop||g' ${WRKSRC}/applnk/old_desktop_files
post-configure:
${REINPLACE_CMD} -e "s@^\s*Exec=.*\$$@Exec=ElectricEyes@" \
diff --git a/x11/kde4-runtime/files/patch-plugin-keyboard-handler.diff b/x11/kde4-runtime/files/patch-plugin-keyboard-handler.diff
new file mode 100644
index 000000000000..8d301d6d4e69
--- /dev/null
+++ b/x11/kde4-runtime/files/patch-plugin-keyboard-handler.diff
@@ -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
diff --git a/x11/kde4-workspace/Makefile b/x11/kde4-workspace/Makefile
index c8acd2d6337b..7019894baa04 100644
--- a/x11/kde4-workspace/Makefile
+++ b/x11/kde4-workspace/Makefile
@@ -104,7 +104,8 @@ pre-configure:
${REINPLACE_CMD} \
-e 's|-s|-u|g' \
${WRKSRC}/kioslave/media/services/media_safelyremove.desktop
-
+ ${REINPLACE_CMD} \
+ -e 's|kgamma.desktop||g' ${WRKSRC}/applnk/old_desktop_files
post-configure:
${REINPLACE_CMD} -e "s@^\s*Exec=.*\$$@Exec=ElectricEyes@" \
diff --git a/x11/kde4-workspace/files/patch-plugin-keyboard-handler.diff b/x11/kde4-workspace/files/patch-plugin-keyboard-handler.diff
new file mode 100644
index 000000000000..8d301d6d4e69
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-plugin-keyboard-handler.diff
@@ -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
diff --git a/x11/kdebase3/Makefile b/x11/kdebase3/Makefile
index c8acd2d6337b..7019894baa04 100644
--- a/x11/kdebase3/Makefile
+++ b/x11/kdebase3/Makefile
@@ -104,7 +104,8 @@ pre-configure:
${REINPLACE_CMD} \
-e 's|-s|-u|g' \
${WRKSRC}/kioslave/media/services/media_safelyremove.desktop
-
+ ${REINPLACE_CMD} \
+ -e 's|kgamma.desktop||g' ${WRKSRC}/applnk/old_desktop_files
post-configure:
${REINPLACE_CMD} -e "s@^\s*Exec=.*\$$@Exec=ElectricEyes@" \
diff --git a/x11/kdebase3/files/patch-plugin-keyboard-handler.diff b/x11/kdebase3/files/patch-plugin-keyboard-handler.diff
new file mode 100644
index 000000000000..8d301d6d4e69
--- /dev/null
+++ b/x11/kdebase3/files/patch-plugin-keyboard-handler.diff
@@ -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
diff --git a/x11/kdebase4-runtime/Makefile b/x11/kdebase4-runtime/Makefile
index c8acd2d6337b..7019894baa04 100644
--- a/x11/kdebase4-runtime/Makefile
+++ b/x11/kdebase4-runtime/Makefile
@@ -104,7 +104,8 @@ pre-configure:
${REINPLACE_CMD} \
-e 's|-s|-u|g' \
${WRKSRC}/kioslave/media/services/media_safelyremove.desktop
-
+ ${REINPLACE_CMD} \
+ -e 's|kgamma.desktop||g' ${WRKSRC}/applnk/old_desktop_files
post-configure:
${REINPLACE_CMD} -e "s@^\s*Exec=.*\$$@Exec=ElectricEyes@" \
diff --git a/x11/kdebase4-runtime/files/patch-plugin-keyboard-handler.diff b/x11/kdebase4-runtime/files/patch-plugin-keyboard-handler.diff
new file mode 100644
index 000000000000..8d301d6d4e69
--- /dev/null
+++ b/x11/kdebase4-runtime/files/patch-plugin-keyboard-handler.diff
@@ -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
diff --git a/x11/kdebase4-workspace/Makefile b/x11/kdebase4-workspace/Makefile
index c8acd2d6337b..7019894baa04 100644
--- a/x11/kdebase4-workspace/Makefile
+++ b/x11/kdebase4-workspace/Makefile
@@ -104,7 +104,8 @@ pre-configure:
${REINPLACE_CMD} \
-e 's|-s|-u|g' \
${WRKSRC}/kioslave/media/services/media_safelyremove.desktop
-
+ ${REINPLACE_CMD} \
+ -e 's|kgamma.desktop||g' ${WRKSRC}/applnk/old_desktop_files
post-configure:
${REINPLACE_CMD} -e "s@^\s*Exec=.*\$$@Exec=ElectricEyes@" \
diff --git a/x11/kdebase4-workspace/files/patch-plugin-keyboard-handler.diff b/x11/kdebase4-workspace/files/patch-plugin-keyboard-handler.diff
new file mode 100644
index 000000000000..8d301d6d4e69
--- /dev/null
+++ b/x11/kdebase4-workspace/files/patch-plugin-keyboard-handler.diff
@@ -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
diff --git a/x11/kdebase4/Makefile b/x11/kdebase4/Makefile
index c8acd2d6337b..7019894baa04 100644
--- a/x11/kdebase4/Makefile
+++ b/x11/kdebase4/Makefile
@@ -104,7 +104,8 @@ pre-configure:
${REINPLACE_CMD} \
-e 's|-s|-u|g' \
${WRKSRC}/kioslave/media/services/media_safelyremove.desktop
-
+ ${REINPLACE_CMD} \
+ -e 's|kgamma.desktop||g' ${WRKSRC}/applnk/old_desktop_files
post-configure:
${REINPLACE_CMD} -e "s@^\s*Exec=.*\$$@Exec=ElectricEyes@" \
diff --git a/x11/kdebase4/files/patch-plugin-keyboard-handler.diff b/x11/kdebase4/files/patch-plugin-keyboard-handler.diff
new file mode 100644
index 000000000000..8d301d6d4e69
--- /dev/null
+++ b/x11/kdebase4/files/patch-plugin-keyboard-handler.diff
@@ -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