/[packages]/updates/5/libreoffice/current/SOURCES/0001-Resolves-rhbz-1396827-update-geom-on-mouse-click-as-.patch
ViewVC logotype

Contents of /updates/5/libreoffice/current/SOURCES/0001-Resolves-rhbz-1396827-update-geom-on-mouse-click-as-.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1142874 - (show annotations) (download)
Tue Aug 22 07:52:48 2017 UTC (6 years, 7 months ago) by neoclust
File size: 3024 byte(s)
New version 5.2.4
1 From b5411c190e798c27e18a67eb1472b465728c28a8 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
3 Date: Mon, 21 Nov 2016 10:22:27 +0000
4 Subject: [PATCH] Resolves: rhbz#1396827 update geom on mouse click as well as
5 motion
6
7 Change-Id: Ia361aa316fe3f5ecdd672d42de9bea7fcf142554
8 ---
9 vcl/unx/gtk3/gtk3gtkframe.cxx | 33 ++++++++++++++++++++++++---------
10 1 file changed, 24 insertions(+), 9 deletions(-)
11
12 diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
13 index 24ffcdd..d5ade01 100644
14 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx
15 +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
16 @@ -2582,10 +2582,6 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer
17 case 3: aEvent.mnButton = MOUSE_RIGHT; break;
18 default: return false;
19 }
20 - aEvent.mnTime = pEvent->time;
21 - aEvent.mnX = (long)pEvent->x_root - pThis->maGeometry.nX;
22 - aEvent.mnY = (long)pEvent->y_root - pThis->maGeometry.nY;
23 - aEvent.mnCode = GetMouseModCode( pEvent->state );
24
25 vcl::DeletionListener aDel( pThis );
26
27 @@ -2596,12 +2592,31 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer
28 closePopup();
29 }
30
31 - // --- RTL --- (mirror mouse pos)
32 - if( AllSettings::GetLayoutRTL() )
33 - aEvent.mnX = pThis->maGeometry.nWidth-1-aEvent.mnX;
34 + if (!aDel.isDeleted())
35 + {
36 + int frame_x = (int)(pEvent->x_root - pEvent->x);
37 + int frame_y = (int)(pEvent->y_root - pEvent->y);
38 + if (frame_x != pThis->maGeometry.nX || frame_y != pThis->maGeometry.nY)
39 + {
40 + pThis->maGeometry.nX = frame_x;
41 + pThis->maGeometry.nY = frame_y;
42 + ImplSVData* pSVData = ImplGetSVData();
43 + if (pSVData->maNWFData.mbCanDetermineWindowPosition)
44 + pThis->CallCallbackExc(SalEvent::Move, nullptr);
45 + }
46 + }
47
48 if (!aDel.isDeleted())
49 {
50 + aEvent.mnTime = pEvent->time;
51 + aEvent.mnX = (long)pEvent->x_root - pThis->maGeometry.nX;
52 + aEvent.mnY = (long)pEvent->y_root - pThis->maGeometry.nY;
53 + aEvent.mnCode = GetMouseModCode( pEvent->state );
54 +
55 + // --- RTL --- (mirror mouse pos)
56 + if( AllSettings::GetLayoutRTL() )
57 + aEvent.mnX = pThis->maGeometry.nWidth-1-aEvent.mnX;
58 +
59 pThis->CallCallbackExc( nEventType, &aEvent );
60 }
61
62 @@ -2777,7 +2792,7 @@ gboolean GtkSalFrame::signalMotion( GtkWidget*, GdkEventMotion* pEvent, gpointer
63 pThis->CallCallbackExc(SalEvent::Move, nullptr);
64 }
65
66 - if( ! aDel.isDeleted() )
67 + if (!aDel.isDeleted())
68 {
69 SalMouseEvent aEvent;
70 aEvent.mnTime = pEvent->time;
71 @@ -2793,7 +2808,7 @@ gboolean GtkSalFrame::signalMotion( GtkWidget*, GdkEventMotion* pEvent, gpointer
72 pThis->CallCallbackExc( SalEvent::MouseMove, &aEvent );
73 }
74
75 - if( ! aDel.isDeleted() )
76 + if (!aDel.isDeleted())
77 {
78 // ask for the next hint
79 gint x, y;
80 --
81 2.9.3
82

  ViewVC Help
Powered by ViewVC 1.1.30