summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-12-21 13:00:03 +0000
committerEike Rathke <erack@redhat.com>2017-12-21 18:15:52 +0100
commit236d245428ec290f9b5efe4cd68996a7d4e6509e (patch)
treef3c0a590299f7d5906efa6f3085804f910ece260
parentae08be01b10d3e7e483f93a1e5ed77354939601d (diff)
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@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
-rw-r--r--vcl/inc/unx/gtk/gtkframe.hxx1
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx11
2 files changed, 9 insertions, 3 deletions
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;
}