mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 10:29:49 +01:00
Merge branch 'master' into fullscreen
This commit is contained in:
commit
a7a221698e
4 changed files with 10 additions and 3 deletions
|
@ -246,15 +246,12 @@ void view_destroy(struct roots_view *view) {
|
|||
view->fullscreen_output->fullscreen_view = NULL;
|
||||
}
|
||||
|
||||
wl_list_remove(&view->link);
|
||||
free(view);
|
||||
}
|
||||
|
||||
void view_init(struct roots_view *view, struct roots_desktop *desktop) {
|
||||
view->desktop = desktop;
|
||||
wl_signal_init(&view->events.destroy);
|
||||
|
||||
wl_list_insert(&desktop->views, &view->link);
|
||||
}
|
||||
|
||||
void view_setup(struct roots_view *view) {
|
||||
|
|
|
@ -99,6 +99,7 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
|
|||
wl_list_remove(&roots_surface->request_set_fullscreen.link);
|
||||
wl_list_remove(&roots_surface->set_state.link);
|
||||
wl_list_remove(&roots_surface->surface_commit.link);
|
||||
wl_list_remove(&roots_surface->view->link);
|
||||
view_destroy(roots_surface->view);
|
||||
free(roots_surface);
|
||||
}
|
||||
|
@ -151,6 +152,7 @@ void handle_wl_shell_surface(struct wl_listener *listener, void *data) {
|
|||
view->close = close;
|
||||
roots_surface->view = view;
|
||||
view_init(view, desktop);
|
||||
wl_list_insert(&desktop->views, &view->link);
|
||||
|
||||
view_setup(view);
|
||||
|
||||
|
|
|
@ -190,6 +190,7 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
|
|||
wl_list_remove(&roots_xdg_surface->destroy.link);
|
||||
wl_list_remove(&roots_xdg_surface->request_move.link);
|
||||
wl_list_remove(&roots_xdg_surface->request_resize.link);
|
||||
wl_list_remove(&roots_xdg_surface->view->link);
|
||||
view_destroy(roots_xdg_surface->view);
|
||||
free(roots_xdg_surface);
|
||||
}
|
||||
|
@ -249,6 +250,7 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) {
|
|||
view->close = close;
|
||||
roots_surface->view = view;
|
||||
view_init(view, desktop);
|
||||
wl_list_insert(&desktop->views, &view->link);
|
||||
|
||||
view_setup(view);
|
||||
}
|
||||
|
|
|
@ -102,6 +102,8 @@ static void set_fullscreen(struct roots_view *view, bool fullscreen) {
|
|||
static void handle_destroy(struct wl_listener *listener, void *data) {
|
||||
struct roots_xwayland_surface *roots_surface =
|
||||
wl_container_of(listener, roots_surface, destroy);
|
||||
struct wlr_xwayland_surface *xwayland_surface =
|
||||
roots_surface->view->xwayland_surface;
|
||||
wl_list_remove(&roots_surface->destroy.link);
|
||||
wl_list_remove(&roots_surface->request_configure.link);
|
||||
wl_list_remove(&roots_surface->request_move.link);
|
||||
|
@ -109,6 +111,9 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
|
|||
wl_list_remove(&roots_surface->request_maximize.link);
|
||||
wl_list_remove(&roots_surface->map_notify.link);
|
||||
wl_list_remove(&roots_surface->unmap_notify.link);
|
||||
if (xwayland_surface->mapped) {
|
||||
wl_list_remove(&roots_surface->view->link);
|
||||
}
|
||||
view_destroy(roots_surface->view);
|
||||
free(roots_surface);
|
||||
}
|
||||
|
@ -264,6 +269,7 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) {
|
|||
view->close = close;
|
||||
roots_surface->view = view;
|
||||
view_init(view, desktop);
|
||||
wl_list_insert(&desktop->views, &view->link);
|
||||
|
||||
if (!surface->override_redirect) {
|
||||
view_setup(view);
|
||||
|
|
Loading…
Reference in a new issue