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:
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 =