mirror of
https://github.com/labwc/labwc.git
synced 2026-02-13 04:27:49 -05:00
Ensure the view signals are initialized early
This prevents a crash observed by the scaled-icon-buffer listening to the `view->events.set_icons` signal before it is initialized. For this to happen, the application needs to use the kde decoration protocol and set it on the xdg_surface before creating the xdg_toplevel. Fixes: #2798
This commit is contained in:
parent
6cb34f994c
commit
4d79f0057f
2 changed files with 3 additions and 2 deletions
|
|
@ -921,6 +921,8 @@ xdg_toplevel_new(struct wl_listener *listener, void *data)
|
|||
view->server = server;
|
||||
view->type = LAB_XDG_SHELL_VIEW;
|
||||
view->impl = &xdg_toplevel_view_impl;
|
||||
view_init(view);
|
||||
|
||||
xdg_toplevel_view->xdg_surface = xdg_surface;
|
||||
|
||||
/*
|
||||
|
|
@ -997,7 +999,6 @@ xdg_toplevel_new(struct wl_listener *listener, void *data)
|
|||
CONNECT_SIGNAL(toplevel, xdg_toplevel_view, request_show_window_menu);
|
||||
CONNECT_SIGNAL(xdg_surface, xdg_toplevel_view, new_popup);
|
||||
|
||||
view_init(view);
|
||||
wl_list_insert(&server->views, &view->link);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue