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


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/4142

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/42/4142/1

fdo#56583 - avoid setting user time on unrealized windows.

Change-Id: Iab776088b1d168295d636069e1a92ba948241653
---
M vcl/unx/gtk/window/gtkframe.cxx
1 file changed, 10 insertions(+), 2 deletions(-)



diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 36be0b2..47aa654 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -822,9 +822,17 @@
         bGetSetUserTimeFn = false;
         p_gdk_x11_window_set_user_time = (setUserTimeFn)osl_getAsciiFunctionSymbol( 
GetSalData()->m_pPlugin, "gdk_x11_window_set_user_time" );
     }
+    bool bSet = false;
     if( p_gdk_x11_window_set_user_time )
-        p_gdk_x11_window_set_user_time( widget_get_window(GTK_WIDGET(i_pWindow)), i_nTime );
-    else
+    {
+        GdkWindow* pWin = widget_get_window(GTK_WIDGET(i_pWindow));
+        if( pWin ) // only if the window is realized.
+        {
+            p_gdk_x11_window_set_user_time( pWin, i_nTime );
+            bSet = true;
+        }
+    }
+    if( !bSet )
     {
         Display* pDisplay = GetGtkSalData()->GetGtkDisplay()->GetDisplay();
         Atom nUserTime = XInternAtom( pDisplay, "_NET_WM_USER_TIME", True );

-- 
To view, visit https://gerrit.libreoffice.org/4142
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab776088b1d168295d636069e1a92ba948241653
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-3-6
Gerrit-Owner: Michael Meeks <michael.meeks@suse.com>


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.