Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hello,

As I've found with fdo#50920, if I've understood
XConvertSelection/SelectionNotify mechanism correctly, it's selection
owner (Mathematica in this case) who converts the selection to our
target type, and it appears that last (15th) atom is always corrupt
with Mathematica. Qt and GEN plugins don't have these crashes because
they don't abort() on X errors. So, it seems we should just use
gdk_error_trap_push() to prevent crashes with GTK plugin.
So, below is a trivial patch which solves two cases of crashes with
Mathematica. But I now have a question: should we maybe just call
gdk_error_trap_push() on GTK initialization and just ignore any X
errors in any context, or should we limit at what the patch does?

diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index 4d58110..86d3f56 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -839,8 +839,10 @@ extern "C" {
         sal_gtk_timeout_defer( pTSource );

         ImplSVData* pSVData = ImplGetSVData();
+        gdk_error_trap_push();
         if( pSVData->mpSalTimer )
             pSVData->mpSalTimer->CallCallback();
+        gdk_error_trap_pop();

         return TRUE;
     }
@@ -941,7 +943,9 @@ gboolean GtkData::userEventFn( gpointer data )

         pThis->GetGtkDisplay()->EventGuardRelease();

+        gdk_error_trap_push();
         pThis->GetGtkDisplay()->DispatchInternalEvent();
+        gdk_error_trap_pop();
     }

     return bContinue;


Regards,
Ruslan

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.