[Libreoffice-commits] core.git: vcl/inc vcl/unx
Caolán McNamara
caolanm at redhat.com
Thu Dec 21 14:24:55 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 3c96ded851bc6887693e4ecbc1f5961dc430613c
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/46911
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 078ff5589b58..48e019c29770 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 b05e675aaf5a..43f4094ac5b3 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1075,6 +1075,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;
@@ -1616,6 +1617,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;
@@ -2595,8 +2597,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();
@@ -2816,8 +2819,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();
@@ -2940,9 +2944,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