Handle clicks on release instead of press

This prevents the release event from going to the window behind if the
click closes the notification.
This commit is contained in:
Reto Schnyder 2017-06-29 20:04:14 +02:00
parent c8e6f317ab
commit d9977cbb41

View File

@ -820,7 +820,7 @@ gboolean x_mainloop_fd_dispatch(GSource * source, GSourceFunc callback,
case SelectionNotify: case SelectionNotify:
if (ev.xselection.property == xctx.utf8) if (ev.xselection.property == xctx.utf8)
break; break;
case ButtonPress: case ButtonRelease:
if (ev.xbutton.window == xctx.win) { if (ev.xbutton.window == xctx.win) {
x_handle_click(ev); x_handle_click(ev);
} }
@ -1060,7 +1060,7 @@ static void x_win_setup(void)
wa.background_pixmap = ParentRelative; wa.background_pixmap = ParentRelative;
wa.event_mask = wa.event_mask =
ExposureMask | KeyPressMask | VisibilityChangeMask | ExposureMask | KeyPressMask | VisibilityChangeMask |
ButtonPressMask | FocusChangeMask| StructureNotifyMask; ButtonReleaseMask | FocusChangeMask| StructureNotifyMask;
screen_info *scr = get_active_screen(); screen_info *scr = get_active_screen();
xctx.win = xctx.win =