diff options
author | Olivier Fourdan <fourdan@xfce.org> | 2019-05-02 13:12:53 +0200 |
---|---|---|
committer | Olivier Fourdan <fourdan@xfce.org> | 2019-05-02 16:01:26 +0200 |
commit | e8e920cb170645449dc2367a29175f2bbbd4e61e (patch) | |
tree | c06769ca35d2a877e007951ec51e242bc47c6f1b /src/events.c | |
parent | ba3ed23733edb9b96bfab89a67d3cea5afc73e1b (diff) | |
download | xfwm4-e8e920cb170645449dc2367a29175f2bbbd4e61e.tar.gz |
events: Catch more XErrors
Many operations such as XI2's grab/ungrab can cause an XError for
various reasons, and X11 being asynchronous, those may end up being
caught in gdk's own code, causing the termination of xfwm4.
Catch XErrors in the relevant portions in xfwm4 code with error trap
push/pop before gdk get them.
Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
Diffstat (limited to 'src/events.c')
-rw-r--r-- | src/events.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/events.c b/src/events.c index ba58c19f9..155281f17 100644 --- a/src/events.c +++ b/src/events.c @@ -1087,9 +1087,11 @@ handleButtonPress (DisplayInfo *display_info, XfwmEventButton *event) } else { + myDisplayErrorTrapPush (display_info); xfwm_device_ungrab (display_info->devices, &display_info->devices->pointer, display_info->dpy, event->time); XSendEvent (display_info->dpy, screen_info->xfwm4_win, FALSE, SubstructureNotifyMask, event->meta.x); + myDisplayErrorTrapPopIgnored (display_info); } } } |