[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara
caolanm at redhat.com
Mon Nov 7 16:17:38 UTC 2016
vcl/unx/gtk3/gtk3gtkframe.cxx | 54 +++++++++++++++++++++---------------------
1 file changed, 27 insertions(+), 27 deletions(-)
New commits:
commit 15b524a9a89712e486123c8e55e7e3d402b96d52
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Nov 7 16:14:46 2016 +0000
gtk3: focus jumping around the place under wayland + popovers
in impress slide sorter panel
do the "oops!, frame moved" callback before the "pointer was
moved" callback
Change-Id: I12f3c66ba15fea04d8dc74d0325582967ea93afe
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 9c647cb..02cb7d3 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -2784,39 +2784,39 @@ gboolean GtkSalFrame::signalMotion( GtkWidget*, GdkEventMotion* pEvent, gpointer
if (pThis->isFloatGrabWindow() && pEvent->window != widget_get_window(pThis->getMouseEventWidget()))
return true;
- SalMouseEvent aEvent;
- aEvent.mnTime = pEvent->time;
- aEvent.mnX = (long)pEvent->x_root - pThis->maGeometry.nX;
- aEvent.mnY = (long)pEvent->y_root - pThis->maGeometry.nY;
- aEvent.mnCode = GetMouseModCode( pEvent->state );
- aEvent.mnButton = 0;
-
- // --- RTL --- (mirror mouse pos)
- if( AllSettings::GetLayoutRTL() )
- aEvent.mnX = pThis->maGeometry.nWidth-1-aEvent.mnX;
-
vcl::DeletionListener aDel( pThis );
- pThis->CallCallbackExc( SalEvent::MouseMove, &aEvent );
+ 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)
+ {
+ pThis->maGeometry.nX = frame_x;
+ pThis->maGeometry.nY = frame_y;
+ pThis->CallCallbackExc(SalEvent::Move, nullptr);
+ }
if( ! aDel.isDeleted() )
{
- 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 )
- {
- pThis->maGeometry.nX = frame_x;
- pThis->maGeometry.nY = frame_y;
- pThis->CallCallbackExc( SalEvent::Move, nullptr );
- }
+ SalMouseEvent aEvent;
+ aEvent.mnTime = pEvent->time;
+ aEvent.mnX = (long)pEvent->x_root - pThis->maGeometry.nX;
+ aEvent.mnY = (long)pEvent->y_root - pThis->maGeometry.nY;
+ aEvent.mnCode = GetMouseModCode( pEvent->state );
+ aEvent.mnButton = 0;
- if( ! aDel.isDeleted() )
- {
- // ask for the next hint
- gint x, y;
- GdkModifierType mask;
- gdk_window_get_pointer( widget_get_window(GTK_WIDGET(pThis->m_pWindow)), &x, &y, &mask );
- }
+ // --- RTL --- (mirror mouse pos)
+ if( AllSettings::GetLayoutRTL() )
+ aEvent.mnX = pThis->maGeometry.nWidth-1-aEvent.mnX;
+
+ pThis->CallCallbackExc( SalEvent::MouseMove, &aEvent );
+ }
+
+ if( ! aDel.isDeleted() )
+ {
+ // ask for the next hint
+ gint x, y;
+ GdkModifierType mask;
+ gdk_window_get_pointer( widget_get_window(GTK_WIDGET(pThis->m_pWindow)), &x, &y, &mask );
}
return true;
More information about the Libreoffice-commits
mailing list