diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2011-02-23 12:17:49 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2011-02-23 12:17:49 +0100 |
commit | 4f9bf8262890a3d4ddc607e2117c7e363762140c (patch) | |
tree | d1cda81efdfe57ee62733a25f89274d5ba4d76aa | |
parent | b922315e9caefabfcf3943e007242fe64834012f (diff) |
Revert "try to work around IM problems with KDE4 integration (bnc#665112)"libreoffice-3-3-1
This reverts commit b922315e9caefabfcf3943e007242fe64834012f.
I meant 3.3 branch, not 3.3.1.
-rw-r--r-- | vcl/unx/kde4/KDESalDisplay.cxx | 26 | ||||
-rw-r--r-- | vcl/unx/kde4/KDESalDisplay.hxx | 2 | ||||
-rw-r--r-- | vcl/unx/kde4/KDEXLib.cxx | 11 |
3 files changed, 0 insertions, 39 deletions
diff --git a/vcl/unx/kde4/KDESalDisplay.cxx b/vcl/unx/kde4/KDESalDisplay.cxx index 252429594e..b1eb0d6ca5 100644 --- a/vcl/unx/kde4/KDESalDisplay.cxx +++ b/vcl/unx/kde4/KDESalDisplay.cxx @@ -41,7 +41,6 @@ SalKDEDisplay::SalKDEDisplay( Display* pDisp ) { assert( selfptr == NULL ); selfptr = this; - xim_protocol = XInternAtom( pDisp_, "_XIM_PROTOCOL", False ); } SalKDEDisplay::~SalKDEDisplay() @@ -66,32 +65,7 @@ void SalKDEDisplay::Yield() XEvent event; XNextEvent( pDisp_, &event ); - if( checkDirectInputEvent( &event )) - return; qApp->x11ProcessEvent( &event ); } -// HACK: When using Qt event loop, input methods (japanese, etc.) will get broken because -// of XFilterEvent() getting called twice, once by Qt, once by LO (bnc#665112). -// This function is therefore called before any XEvent is passed to Qt event handling -// and if it is a keyboard event and no Qt widget is the active window (i.e. we are -// processing events for some LO window), then feed the event only to LO directly and skip Qt -// completely. Skipped events are KeyPress, KeyRelease and also _XIM_PROTOCOL client message -// (seems to be necessary too, hopefully there are not other internal XIM messages that -// would need this handling). -bool SalKDEDisplay::checkDirectInputEvent( XEvent* ev ) -{ - if( ev->xany.type == XLIB_KeyPress || ev->xany.type == KeyRelease - || ( ev->xany.type == ClientMessage && ev->xclient.message_type == xim_protocol )) - { - if( qApp->activeWindow() == NULL ) - { - Dispatch(ev); - return true; - } - } - return false; -} - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/kde4/KDESalDisplay.hxx b/vcl/unx/kde4/KDESalDisplay.hxx index 25a8b9f548..1a79c86a26 100644 --- a/vcl/unx/kde4/KDESalDisplay.hxx +++ b/vcl/unx/kde4/KDESalDisplay.hxx @@ -41,9 +41,7 @@ class SalKDEDisplay : public SalX11Display inline void EventGuardRelease() { osl_releaseMutex( hEventGuard_ ); } // virtual long Dispatch( XEvent *event ); virtual void Yield(); - bool checkDirectInputEvent( XEvent* ev ); private: - Atom xim_protocol; static SalKDEDisplay* selfptr; }; diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx index 1bca18e58a..1084ba2e5b 100644 --- a/vcl/unx/kde4/KDEXLib.cxx +++ b/vcl/unx/kde4/KDEXLib.cxx @@ -205,19 +205,8 @@ static GPollFunc old_gpoll = NULL; static gint gpoll_wrapper( GPollFD*, guint, gint ); #endif -static bool ( *old_qt_event_filter )( void* ); -static bool qt_event_filter( void* m ) -{ - if( old_qt_event_filter != NULL && old_qt_event_filter( m )) - return true; - if( SalKDEDisplay::self() && SalKDEDisplay::self()->checkDirectInputEvent( static_cast< XEvent* >( m ))) - return true; - return false; -} - void KDEXLib::setupEventLoop() { - old_qt_event_filter = QAbstractEventDispatcher::instance()->setEventFilter( qt_event_filter ); #ifdef GLIB_EVENT_LOOP_SUPPORT // Glib is simple, it has g_main_context_set_poll_func() for wrapping the sleep call. // The catch is that Qt has a bug that allows triggering timers even when they should |