/[packages]/updates/5/libreoffice/current/SOURCES/0001-Resolves-rhbz-1351224-wayland-grab-related-crashes.patch
ViewVC logotype

Diff of /updates/5/libreoffice/current/SOURCES/0001-Resolves-rhbz-1351224-wayland-grab-related-crashes.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1142873 by neoclust, Mon Aug 21 23:46:24 2017 UTC revision 1142874 by neoclust, Tue Aug 22 07:52:48 2017 UTC
# Line 1  Line 1 
1  From ef70b6a3b0a2e1cc27c890d4c648bac4f276d6ff Mon Sep 17 00:00:00 2001  From 5c9d1063505335ea9734936c5549bc68acf7f5f9 Mon Sep 17 00:00:00 2001
2  From: rpmbuild <rpmbuild@fedoraproject.org>  From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
3  Date: Thu, 7 Jul 2016 15:56:54 +0100  Date: Fri, 1 Jul 2016 15:42:34 +0100
4  Subject: [PATCH] Resolves: rhbz#1351224 wayland grab related crashes  Subject: [PATCH] Resolves: rhbz#1351224 wayland grab related crashes
5    
6  only one popup active at a time. Try and find the right path through the  only one popup active at a time. Try and find the right path through the
# Line 8  uncanny valley which allows popups to ap Line 8  uncanny valley which allows popups to ap
8  happens to them, forward keyboard input to their parents, dismiss when the  happens to them, forward keyboard input to their parents, dismiss when the
9  mouse is clicked outside them and not crash if another popup wants to appear  mouse is clicked outside them and not crash if another popup wants to appear
10  to replace it  to replace it
11    
12    gtk3: XEmbed isn't going to happen
13    
14    Change-Id: I7a7589a159a7fccdc224262bf5f91f8d98f5f619
15    (cherry picked from commit fe7b8bc9fdb57087ba9daa22cdec77d735eb71cd)
16    
17    gtk3: if a popup is withdrawn close the popup
18    
19    we don't always get the click that causes the popup
20    to be withdrawn when the mouse is clicked outside
21    the application during a grab
22    
23    Change-Id: I2dbef23813972ebd75c8899711a2d1309110f968
24    (cherry picked from commit 1190e7385291fb0e6cd3505e88e589c80b02db00)
25    
26    Change-Id: If4b39df41ca3dccde1e506d5328b06731a8c80eb
27  ---  ---
28   vcl/inc/unx/gtk/gtkframe.hxx  |   9 ++-   vcl/inc/unx/gtk/gtkframe.hxx  |   9 ++-
29   vcl/unx/gtk3/gtk3gtkframe.cxx | 171 +++++++++++++++++++-----------------------   vcl/unx/gtk3/gtk3gtkframe.cxx | 173 +++++++++++++++++++-----------------------
30   2 files changed, 84 insertions(+), 96 deletions(-)   2 files changed, 85 insertions(+), 97 deletions(-)
31    
32  diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx  diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
33  index d5aa627..06f9162 100644  index 4677923..a660567 100644
34  --- a/vcl/inc/unx/gtk/gtkframe.hxx  --- a/vcl/inc/unx/gtk/gtkframe.hxx
35  +++ b/vcl/inc/unx/gtk/gtkframe.hxx  +++ b/vcl/inc/unx/gtk/gtkframe.hxx
36  @@ -268,6 +268,8 @@ class GtkSalFrame : public SalFrame  @@ -269,6 +269,8 @@ class GtkSalFrame : public SalFrame
37   #endif   #endif
38   #else   #else
39       static gboolean     signalExpose( GtkWidget*, GdkEventExpose*, gpointer );       static gboolean     signalExpose( GtkWidget*, GdkEventExpose*, gpointer );
# Line 26  index d5aa627..06f9162 100644 Line 42  index d5aa627..06f9162 100644
42   #endif   #endif
43       static gboolean     signalFocus( GtkWidget*, GdkEventFocus*, gpointer );       static gboolean     signalFocus( GtkWidget*, GdkEventFocus*, gpointer );
44       static gboolean     signalMap( GtkWidget*, GdkEvent*, gpointer );       static gboolean     signalMap( GtkWidget*, GdkEvent*, gpointer );
45  @@ -298,7 +300,6 @@ class GtkSalFrame : public SalFrame  @@ -299,7 +301,6 @@ class GtkSalFrame : public SalFrame
46       static GdkNativeWindow findTopLevelSystemWindow( GdkNativeWindow aWindow );       static GdkNativeWindow findTopLevelSystemWindow( GdkNativeWindow aWindow );
47    
48       static int m_nFloats;       static int m_nFloats;
# Line 34  index d5aa627..06f9162 100644 Line 50  index d5aa627..06f9162 100644
50    
51       bool isFloatGrabWindow() const       bool isFloatGrabWindow() const
52       {       {
53  @@ -337,7 +338,6 @@ class GtkSalFrame : public SalFrame  @@ -335,7 +336,6 @@ class GtkSalFrame : public SalFrame
54    
55       void setMinMaxSize();       void setMinMaxSize();
56       void createNewWindow( ::Window aParent, bool bXEmbed, SalX11Screen nXScreen );       void createNewWindow( ::Window aParent, bool bXEmbed, SalX11Screen nXScreen );
# Line 42  index d5aa627..06f9162 100644 Line 58  index d5aa627..06f9162 100644
58    
59       void AllocateFrame();       void AllocateFrame();
60       void TriggerPaintEvent();       void TriggerPaintEvent();
61  @@ -364,7 +364,6 @@ public:  @@ -366,7 +366,6 @@ public:
62       // be swallowed       // be swallowed
63       bool Dispatch( const XEvent* pEvent );       bool Dispatch( const XEvent* pEvent );
64       void grabPointer(bool bGrab, bool bOwnerEvents = false);       void grabPointer(bool bGrab, bool bOwnerEvents = false);
# Line 50  index d5aa627..06f9162 100644 Line 66  index d5aa627..06f9162 100644
66    
67       static GtkSalDisplay*  getDisplay();       static GtkSalDisplay*  getDisplay();
68       static GdkDisplay*     getGdkDisplay();       static GdkDisplay*     getGdkDisplay();
69  @@ -420,6 +419,10 @@ public:  @@ -424,6 +423,10 @@ public:
70       void startDrag(gint nButton, gint nDragOriginX, gint nDragOriginY,       void startDrag(gint nButton, gint nDragOriginX, gint nDragOriginY,
71                      GdkDragAction sourceActions, GtkTargetList* pTargetList);                      GdkDragAction sourceActions, GtkTargetList* pTargetList);
72    
# Line 62  index d5aa627..06f9162 100644 Line 78  index d5aa627..06f9162 100644
78       virtual ~GtkSalFrame();       virtual ~GtkSalFrame();
79    
80  diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx  diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
81  index db2c25d..41d4c2e 100644  index 2320356..04af596 100644
82  --- a/vcl/unx/gtk3/gtk3gtkframe.cxx  --- a/vcl/unx/gtk3/gtk3gtkframe.cxx
83  +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx  +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
84  @@ -106,7 +106,6 @@  @@ -107,7 +107,6 @@
85   using namespace com::sun::star;   using namespace com::sun::star;
86    
87   int GtkSalFrame::m_nFloats = 0;   int GtkSalFrame::m_nFloats = 0;
# Line 73  index db2c25d..41d4c2e 100644 Line 89  index db2c25d..41d4c2e 100644
89    
90   #if defined ENABLE_GMENU_INTEGRATION   #if defined ENABLE_GMENU_INTEGRATION
91   static GDBusConnection* pSessionBus = nullptr;   static GDBusConnection* pSessionBus = nullptr;
92  @@ -1297,13 +1296,6 @@ void GtkSalFrame::Init( SystemParentData* pSysData )  @@ -1292,13 +1291,6 @@ void GtkSalFrame::Init( SystemParentData* pSysData )
93       //FIXME: Handling embedded windows, is going to be fun ...       //FIXME: Handling embedded windows, is going to be fun ...
94   }   }
95    
# Line 87  index db2c25d..41d4c2e 100644 Line 103  index db2c25d..41d4c2e 100644
103   void GtkSalFrame::SetExtendedFrameStyle( SalExtStyle nStyle )   void GtkSalFrame::SetExtendedFrameStyle( SalExtStyle nStyle )
104   {   {
105       if( nStyle != m_nExtStyle && ! isChild() )       if( nStyle != m_nExtStyle && ! isChild() )
106  @@ -1443,30 +1435,26 @@ void GtkSalFrame::Show( bool bVisible, bool bNoActivate )  @@ -1433,30 +1425,26 @@ void GtkSalFrame::Show( bool bVisible, bool bNoActivate )
107               if( ! bNoActivate && (m_nStyle & SalFrameStyleFlags::TOOLWINDOW) )               if( ! bNoActivate && (m_nStyle & SalFrameStyleFlags::TOOLWINDOW) )
108                   m_bSetFocusOnMap = true;                   m_bSetFocusOnMap = true;
109    
# Line 126  index db2c25d..41d4c2e 100644 Line 142  index db2c25d..41d4c2e 100644
142           }           }
143           else           else
144           {           {
145  @@ -1475,12 +1463,10 @@ void GtkSalFrame::Show( bool bVisible, bool bNoActivate )  @@ -1465,12 +1453,10 @@ void GtkSalFrame::Show( bool bVisible, bool bNoActivate )
146                   m_nFloats--;                   m_nFloats--;
147                   if( ! getDisplay()->GetCaptureFrame() && m_nFloats == 0)                   if( ! getDisplay()->GetCaptureFrame() && m_nFloats == 0)
148                   {                   {
# Line 142  index db2c25d..41d4c2e 100644 Line 158  index db2c25d..41d4c2e 100644
158                   }                   }
159               }               }
160               gtk_widget_hide( m_pWindow );               gtk_widget_hide( m_pWindow );
161  @@ -2085,37 +2071,32 @@ void GtkSalFrame::grabPointer( bool bGrab, bool bOwnerEvents )  @@ -2070,37 +2056,32 @@ void GtkSalFrame::grabPointer( bool bGrab, bool bOwnerEvents )
162       if (!m_pWindow)       if (!m_pWindow)
163           return;           return;
164    
# Line 195  index db2c25d..41d4c2e 100644 Line 211  index db2c25d..41d4c2e 100644
211   }   }
212    
213   void GtkSalFrame::CaptureMouse( bool bCapture )   void GtkSalFrame::CaptureMouse( bool bCapture )
214  @@ -2557,6 +2538,22 @@ bool GtkSalFrame::HidePopover(sal_uIntPtr nId)  @@ -2562,6 +2543,22 @@ void GtkSalFrame::StartToolKitMoveBy()
215   #endif                                  pEvent->button.time);
216   }   }
217    
218  +void GtkSalFrame::WithDrawn()  +void GtkSalFrame::WithDrawn()
# Line 218  index db2c25d..41d4c2e 100644 Line 234  index db2c25d..41d4c2e 100644
234   gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer frame )   gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer frame )
235   {   {
236       UpdateLastInputEventTime(pEvent->time);       UpdateLastInputEventTime(pEvent->time);
237  @@ -2588,62 +2585,33 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer  @@ -2593,69 +2590,40 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer
238       aEvent.mnY      = (long)pEvent->y_root - pThis->maGeometry.nY;       aEvent.mnY      = (long)pEvent->y_root - pThis->maGeometry.nY;
239       aEvent.mnCode   = GetMouseModCode( pEvent->state );       aEvent.mnCode   = GetMouseModCode( pEvent->state );
240    
# Line 289  index db2c25d..41d4c2e 100644 Line 305  index db2c25d..41d4c2e 100644
305  -            {  -            {
306  -                pThis->maGeometry.nX = frame_x;  -                pThis->maGeometry.nX = frame_x;
307  -                pThis->maGeometry.nY = frame_y;  -                pThis->maGeometry.nY = frame_y;
308  -                pThis->CallCallback( SALEVENT_MOVE, nullptr );  -                pThis->CallCallback( SalEvent::Move, nullptr );
309  -            }  -            }
310  +            pThis->maGeometry.nX = frame_x;  +            pThis->maGeometry.nX = frame_x;
311  +            pThis->maGeometry.nY = frame_y;  +            pThis->maGeometry.nY = frame_y;
312  +            pThis->CallCallback( SALEVENT_MOVE, nullptr );  +            pThis->CallCallback( SalEvent::Move, nullptr );
313           }           }
314       }       }
315    
316  @@ -2787,6 +2755,13 @@ gboolean GtkSalFrame::signalMotion( GtkWidget*, GdkEventMotion* pEvent, gpointer       return true;
317     }
318    
319    -gboolean GtkSalFrame::signalScroll( GtkWidget*, GdkEventScroll* pEvent, gpointer frame )
320    +gboolean GtkSalFrame::signalScroll(GtkWidget*, GdkEventScroll* pEvent, gpointer frame)
321     {
322         UpdateLastInputEventTime(pEvent->time);
323    
324    @@ -2757,6 +2725,13 @@ gboolean GtkSalFrame::signalMotion( GtkWidget*, GdkEventMotion* pEvent, gpointer
325    
326       GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);       GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
327    
# Line 311  index db2c25d..41d4c2e 100644 Line 335  index db2c25d..41d4c2e 100644
335       SalMouseEvent aEvent;       SalMouseEvent aEvent;
336       aEvent.mnTime   = pEvent->time;       aEvent.mnTime   = pEvent->time;
337       aEvent.mnX      = (long)pEvent->x_root - pThis->maGeometry.nX;       aEvent.mnX      = (long)pEvent->x_root - pThis->maGeometry.nX;
338  @@ -3027,12 +3002,15 @@ gboolean GtkSalFrame::signalUnmap( GtkWidget*, GdkEvent*, gpointer frame )  @@ -2972,12 +2947,15 @@ gboolean GtkSalFrame::signalUnmap( GtkWidget*, GdkEvent*, gpointer frame )
339       return false;       return false;
340   }   }
341    
# Line 328  index db2c25d..41d4c2e 100644 Line 352  index db2c25d..41d4c2e 100644
352       vcl::DeletionListener aDel( pThis );       vcl::DeletionListener aDel( pThis );
353    
354       if( pThis->m_pIMHandler )       if( pThis->m_pIMHandler )
355  @@ -3187,11 +3165,18 @@ gboolean GtkSalFrame::signalWindowState( GtkWidget*, GdkEvent* pEvent, gpointer  @@ -3132,11 +3110,18 @@ gboolean GtkSalFrame::signalWindowState( GtkWidget*, GdkEvent* pEvent, gpointer
356           pThis->TriggerPaintEvent();           pThis->TriggerPaintEvent();
357       }       }
358    

Legend:
Removed from v.1142873  
changed lines
  Added in v.1142874

  ViewVC Help
Powered by ViewVC 1.1.30