mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 18:39:48 +01:00
rootston: damage view when zxdg-popup-v6 is mapped/unmapped
This commit is contained in:
parent
891610081f
commit
19a525f3b5
2 changed files with 18 additions and 0 deletions
|
@ -177,6 +177,8 @@ struct roots_xdg_popup_v6 {
|
||||||
struct roots_view_child view_child;
|
struct roots_view_child view_child;
|
||||||
struct wlr_xdg_popup_v6 *wlr_popup;
|
struct wlr_xdg_popup_v6 *wlr_popup;
|
||||||
struct wl_listener destroy;
|
struct wl_listener destroy;
|
||||||
|
struct wl_listener map;
|
||||||
|
struct wl_listener unmap;
|
||||||
struct wl_listener new_popup;
|
struct wl_listener new_popup;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,18 @@ static void popup_handle_destroy(struct wl_listener *listener, void *data) {
|
||||||
popup_destroy((struct roots_view_child *)popup);
|
popup_destroy((struct roots_view_child *)popup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void popup_handle_map(struct wl_listener *listener, void *data) {
|
||||||
|
struct roots_xdg_popup_v6 *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_v6 *popup =
|
||||||
|
wl_container_of(listener, popup, unmap);
|
||||||
|
view_damage_whole(popup->view_child.view);
|
||||||
|
}
|
||||||
|
|
||||||
static struct roots_xdg_popup_v6 *popup_create(struct roots_view *view,
|
static struct roots_xdg_popup_v6 *popup_create(struct roots_view *view,
|
||||||
struct wlr_xdg_popup_v6 *wlr_popup);
|
struct wlr_xdg_popup_v6 *wlr_popup);
|
||||||
|
|
||||||
|
@ -50,6 +62,10 @@ static struct roots_xdg_popup_v6 *popup_create(struct roots_view *view,
|
||||||
view_child_init(&popup->view_child, view, wlr_popup->base->surface);
|
view_child_init(&popup->view_child, view, wlr_popup->base->surface);
|
||||||
popup->destroy.notify = popup_handle_destroy;
|
popup->destroy.notify = popup_handle_destroy;
|
||||||
wl_signal_add(&wlr_popup->base->events.destroy, &popup->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;
|
popup->new_popup.notify = popup_handle_new_popup;
|
||||||
wl_signal_add(&wlr_popup->base->events.new_popup, &popup->new_popup);
|
wl_signal_add(&wlr_popup->base->events.new_popup, &popup->new_popup);
|
||||||
return popup;
|
return popup;
|
||||||
|
|
Loading…
Reference in a new issue