Browse Source

unhover all widgets when pointer leaves view

master
Alexandros Theodotou 3 years ago
parent
commit
947f29f208
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 17
      src/ztk_app.c

17
src/ztk_app.c

@ -213,6 +213,23 @@ post_event_to_widgets ( @@ -213,6 +213,23 @@ post_event_to_widgets (
}
}
break;
case PUGL_LEAVE_NOTIFY:
{
const PuglEventMotion * ev =
(const PuglEventMotion *) event;
if (w->state & ZTK_WIDGET_STATE_HOVERED)
{
w->state &=
(unsigned int)
~ZTK_WIDGET_STATE_HOVERED;
if (w->motion_event_cb)
{
w->motion_event_cb (
w, ev, w->user_data);
}
}
}
break;
case PUGL_SCROLL:
{
const PuglEventScroll * ev =

Loading…
Cancel
Save