From d9977cbb412458c88939ad02308ea3c8804e695f Mon Sep 17 00:00:00 2001 From: Reto Schnyder Date: Thu, 29 Jun 2017 20:04:14 +0200 Subject: [PATCH] Handle clicks on release instead of press This prevents the release event from going to the window behind if the click closes the notification. --- src/x11/x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/x11/x.c b/src/x11/x.c index 30399be..9f7ac20 100644 --- a/src/x11/x.c +++ b/src/x11/x.c @@ -820,7 +820,7 @@ gboolean x_mainloop_fd_dispatch(GSource * source, GSourceFunc callback, case SelectionNotify: if (ev.xselection.property == xctx.utf8) break; - case ButtonPress: + case ButtonRelease: if (ev.xbutton.window == xctx.win) { x_handle_click(ev); } @@ -1060,7 +1060,7 @@ static void x_win_setup(void) wa.background_pixmap = ParentRelative; wa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask | - ButtonPressMask | FocusChangeMask| StructureNotifyMask; + ButtonReleaseMask | FocusChangeMask| StructureNotifyMask; screen_info *scr = get_active_screen(); xctx.win =