mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-15 08:56:26 -05:00
rootston: add view_map and view_unmap
This commit is contained in:
parent
bfc0e95d2c
commit
c27fd1e1ee
7 changed files with 60 additions and 82 deletions
|
|
@ -181,9 +181,7 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
|
|||
wl_list_remove(&roots_surface->request_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_finish(roots_surface->view);
|
||||
free(roots_surface->view);
|
||||
view_destroy(roots_surface->view);
|
||||
free(roots_surface);
|
||||
}
|
||||
|
||||
|
|
@ -227,7 +225,7 @@ void handle_wl_shell_surface(struct wl_listener *listener, void *data) {
|
|||
roots_surface->surface_commit.notify = handle_surface_commit;
|
||||
wl_signal_add(&surface->surface->events.commit, &roots_surface->surface_commit);
|
||||
|
||||
struct roots_view *view = view_create();
|
||||
struct roots_view *view = view_create(desktop);
|
||||
if (!view) {
|
||||
free(roots_surface);
|
||||
return;
|
||||
|
|
@ -238,13 +236,11 @@ void handle_wl_shell_surface(struct wl_listener *listener, void *data) {
|
|||
|
||||
view->wl_shell_surface = surface;
|
||||
view->roots_wl_shell_surface = roots_surface;
|
||||
view->wlr_surface = surface->surface;
|
||||
view->resize = resize;
|
||||
view->close = close;
|
||||
roots_surface->view = view;
|
||||
view_init(view, desktop);
|
||||
wl_list_insert(&desktop->views, &view->link);
|
||||
|
||||
view_map(view, surface->surface);
|
||||
view_setup(view);
|
||||
|
||||
if (surface->state == WLR_WL_SHELL_SURFACE_STATE_TRANSIENT) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue