Hello community,

here is the log from the commit of package libreoffice-libs-gui for 
openSUSE:11.4
checked in at Tue Apr 26 15:42:24 CEST 2011.



--------
--- old-versions/11.4/all/libreoffice-libs-gui/libreoffice-libs-gui.changes     
2011-02-16 16:49:16.000000000 +0100
+++ 11.4/libreoffice-libs-gui/libreoffice-libs-gui.changes      2011-04-12 
16:16:26.000000000 +0200
@@ -1,0 +2,6 @@
+Tue Apr 12 16:13:45 CEST 2011 - pmla...@suse.cz
+
+- vcl-input-methods-in-qt4.diff: non-working input methods in KDE4
+  (bnc#665112, swampid#39716)
+
+-------------------------------------------------------------------

Package does not exist at destination yet. Using Fallback 
old-versions/11.4/all/libreoffice-libs-gui
Destination is old-versions/11.4/UPDATES/all/libreoffice-libs-gui
calling whatdependson for 11.4-i586


New:
----
  vcl-input-methods-in-qt4.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libreoffice-libs-gui.spec ++++++
--- /var/tmp/diff_new_pack.Y81gCd/_old  2011-04-26 15:42:02.000000000 +0200
+++ /var/tmp/diff_new_pack.Y81gCd/_new  2011-04-26 15:42:02.000000000 +0200
@@ -21,7 +21,7 @@
 
 Name:           libreoffice-libs-gui
 Version:        3.3.1.2
-Release:        1.<RELEASE2>
+Release:        1.<RELEASE4>
 %define         piece             libs-gui
 %define         ooo_build_version 3.3.1.2
 %define         ooo_piece_version 3.3.1.2
@@ -89,6 +89,8 @@
 %define _use_internal_dependency_generator 0
 %define __find_requires /bin/sh %_sourcedir/lo-libs-gui-req %name
 Source101:      lo-libs-gui-req
+# non-working input methods in KDE4 (bnc#665112)
+Patch900:       vcl-input-methods-in-qt4.diff
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 ExclusiveArch:  %ix86 x86_64 ppc
 
@@ -139,6 +141,9 @@
 %setup -q -b1 -n libreoffice-%piece-%ooo_piece_version
 # move l10n sources to the main build dir
 mv ../libreoffice-l10n-%ooo_piece_version/* . && rmdir 
../libreoffice-l10n-%ooo_piece_version
+# extra fixes
+mkdir -p ooo-build/hotfixes
+cp %{P:900} ooo-build/hotfixes
 
 %build
 # setup env.

++++++ vcl-input-methods-in-qt4.diff ++++++
--- vcl/unx/kde4/KDESalDisplay.cxx.old  2010-11-11 16:22:48.000000000 +0100
+++ vcl/unx/kde4/KDESalDisplay.cxx      2011-02-22 19:37:17.000000000 +0100
@@ -41,6 +41,7 @@ SalKDEDisplay::SalKDEDisplay( Display* p
 {
     assert( selfptr == NULL );
     selfptr = this;
+    xim_protocol = XInternAtom( pDisp_, "_XIM_PROTOCOL", False );
 }
 
 SalKDEDisplay::~SalKDEDisplay()
@@ -65,7 +66,32 @@ 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: */
--- vcl/unx/kde4/KDESalDisplay.hxx.old  2010-11-11 16:22:48.000000000 +0100
+++ vcl/unx/kde4/KDESalDisplay.hxx      2011-02-22 19:37:17.000000000 +0100
@@ -41,7 +41,9 @@ class SalKDEDisplay : public SalX11Displ
         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;
 };
 
--- vcl/unx/kde4/KDEXLib.cxx.old        2010-12-14 17:02:02.000000000 +0100
+++ vcl/unx/kde4/KDEXLib.cxx    2011-02-22 19:37:17.000000000 +0100
@@ -205,8 +205,19 @@ 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

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to