diff options
author | emersion <contact@emersion.fr> | 2018-03-27 17:27:58 -0400 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-03-27 17:27:58 -0400 |
commit | 4abca435cc1ca9d89c077f0d06419696213a36c4 (patch) | |
tree | 045d1add242bbe2071641851acfe09836b476573 /rootston | |
parent | 19a525f3b51ed16d400d92fe27553967833f85d9 (diff) |
rootston: damage view when xdg-popup is mapped/unmapped
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/xdg_shell.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/rootston/xdg_shell.c b/rootston/xdg_shell.c index 099e622c..923fbeb4 100644 --- a/rootston/xdg_shell.c +++ b/rootston/xdg_shell.c @@ -28,6 +28,16 @@ static void popup_handle_destroy(struct wl_listener *listener, void *data) { popup_destroy((struct roots_view_child *)popup); } +static void popup_handle_map(struct wl_listener *listener, void *data) { + struct roots_xdg_popup *popup = wl_container_of(listener, popup, map); + view_damage_whole(popup->view_child.view); +} + +static void popup_handle_unmap(struct wl_listener *listener, void *data) { + struct roots_xdg_popup *popup = wl_container_of(listener, popup, unmap); + view_damage_whole(popup->view_child.view); +} + static struct roots_xdg_popup *popup_create(struct roots_view *view, struct wlr_xdg_popup *wlr_popup); @@ -50,6 +60,10 @@ static struct roots_xdg_popup *popup_create(struct roots_view *view, view_child_init(&popup->view_child, view, wlr_popup->base->surface); popup->destroy.notify = popup_handle_destroy; wl_signal_add(&wlr_popup->base->events.destroy, &popup->destroy); + popup->map.notify = popup_handle_map; + wl_signal_add(&wlr_popup->base->events.map, &popup->map); + popup->unmap.notify = popup_handle_unmap; + wl_signal_add(&wlr_popup->base->events.unmap, &popup->unmap); popup->new_popup.notify = popup_handle_new_popup; wl_signal_add(&wlr_popup->base->events.new_popup, &popup->new_popup); return popup; |