summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-12-21 13:00:03 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-12-21 15:24:34 +0100
commit3c96ded851bc6887693e4ecbc1f5961dc430613c (patch)
tree79d606bbe0253cc016e24595fd98fe513d724968
parent6db8e752c6075d69d5ff475e15a12317ac9aa4e2 (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/46911 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@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 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;
}