[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - vcl/inc vcl/unx

Caolán McNamara caolanm at redhat.com
Thu Dec 21 17:16:13 UTC 2017


 vcl/inc/unx/gtk/gtkframe.hxx  |    1 +
 vcl/unx/gtk3/gtk3gtkframe.cxx |   11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 236d245428ec290f9b5efe4cd68996a7d4e6509e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Dec 21 13:00:03 2017 +0000

    Resolves: tdf#114592 mark geometry as provisional
    
    when we predict what it will be and use that flag to decide
    to forward notification of arrival of confirmation of geometry
    
    Change-Id: I4a7334d75eb7977c85aebcf2b652cc4b2d6b25bb
    Reviewed-on: https://gerrit.libreoffice.org/46912
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>

diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 236cf29c29de..0c9b002cb264 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -217,6 +217,7 @@ class GtkSalFrame : public SalFrame
     GtkDragSource*                  m_pDragSource;
     bool                            m_bInDrag;
     GtkDnDTransferable*             m_pFormatConversionRequest;
+    bool                            m_bGeometryIsProvisional;
 #else
     GdkRegion*                      m_pRegion;
     bool                            m_bSetFocusOnMap;
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 725c64594d92..27a65caa3612 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1077,6 +1077,7 @@ void GtkSalFrame::InitCommon()
     m_pDragSource       = nullptr;
     m_bInDrag           = false;
     m_pFormatConversionRequest = nullptr;
+    m_bGeometryIsProvisional = false;
     m_ePointerStyle     = static_cast<PointerStyle>(0xffff);
     m_pSalMenu          = nullptr;
     m_nWatcherId        = 0;
@@ -1620,6 +1621,7 @@ void GtkSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u
 
         maGeometry.nX = nX;
         maGeometry.nY = nY;
+        m_bGeometryIsProvisional = true;
 
         m_bDefaultPos = false;
 
@@ -2627,8 +2629,9 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer
     {
         int frame_x = (int)(pEvent->x_root - pEvent->x);
         int frame_y = (int)(pEvent->y_root - pEvent->y);
-        if (frame_x != pThis->maGeometry.nX || frame_y != pThis->maGeometry.nY)
+        if (pThis->m_bGeometryIsProvisional || frame_x != pThis->maGeometry.nX || frame_y != pThis->maGeometry.nY)
         {
+            pThis->m_bGeometryIsProvisional = false;
             pThis->maGeometry.nX = frame_x;
             pThis->maGeometry.nY = frame_y;
             ImplSVData* pSVData = ImplGetSVData();
@@ -2851,8 +2854,9 @@ gboolean GtkSalFrame::signalMotion( GtkWidget*, GdkEventMotion* pEvent, gpointer
 
     int frame_x = (int)(pEvent->x_root - pEvent->x);
     int frame_y = (int)(pEvent->y_root - pEvent->y);
-    if (frame_x != pThis->maGeometry.nX || frame_y != pThis->maGeometry.nY)
+    if (pThis->m_bGeometryIsProvisional || frame_x != pThis->maGeometry.nX || frame_y != pThis->maGeometry.nY)
     {
+        pThis->m_bGeometryIsProvisional = false;
         pThis->maGeometry.nX = frame_x;
         pThis->maGeometry.nY = frame_y;
         ImplSVData* pSVData = ImplGetSVData();
@@ -2975,9 +2979,10 @@ gboolean GtkSalFrame::signalConfigure(GtkWidget*, GdkEventConfigure* pEvent, gpo
      * yet the gdkdisplay-x11.c code handling configure_events has
      * done this XTranslateCoordinates work since the day ~zero.
      */
-    if( x != pThis->maGeometry.nX || y != pThis->maGeometry.nY )
+    if (pThis->m_bGeometryIsProvisional || x != pThis->maGeometry.nX || y != pThis->maGeometry.nY )
     {
         bMoved = true;
+        pThis->m_bGeometryIsProvisional = false;
         pThis->maGeometry.nX = x;
         pThis->maGeometry.nY = y;
     }


More information about the Libreoffice-commits mailing list