mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
xdg/wayland-shell: handle set_app_id and set_class events
This commit is contained in:
parent
e140682528
commit
e2ae63a7cf
5 changed files with 38 additions and 6 deletions
|
|
@ -93,6 +93,14 @@ handle_set_title(struct wl_listener *listener, void *data)
|
|||
view_update_title(view);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_set_class(struct wl_listener *listener, void *data)
|
||||
{
|
||||
struct view *view = wl_container_of(listener, view, set_app_id);
|
||||
assert(view);
|
||||
view_update_app_id(view);
|
||||
}
|
||||
|
||||
static void
|
||||
configure(struct view *view, struct wlr_box geo)
|
||||
{
|
||||
|
|
@ -300,8 +308,12 @@ xwayland_surface_new(struct wl_listener *listener, void *data)
|
|||
view->request_fullscreen.notify = handle_request_fullscreen;
|
||||
wl_signal_add(&xsurface->events.request_fullscreen,
|
||||
&view->request_fullscreen);
|
||||
|
||||
view->set_title.notify = handle_set_title;
|
||||
wl_signal_add(&xsurface->events.set_title, &view->set_title);
|
||||
|
||||
view->set_app_id.notify = handle_set_class;
|
||||
wl_signal_add(&xsurface->events.set_class, &view->set_app_id);
|
||||
|
||||
wl_list_insert(&view->server->views, &view->link);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue