mirror of
https://github.com/swaywm/sway.git
synced 2025-11-09 13:29:49 -05:00
sway views: add helpers to get view and layer from wlr_surface
This commit is contained in:
parent
d8c61c9763
commit
9ea4cc13a0
8 changed files with 73 additions and 0 deletions
|
|
@ -417,6 +417,11 @@ static void handle_set_window_type(struct wl_listener *listener, void *data) {
|
|||
view_execute_criteria(view);
|
||||
}
|
||||
|
||||
struct sway_view *view_from_wlr_xwayland_surface(
|
||||
struct wlr_xwayland_surface *xsurface) {
|
||||
return xsurface->data;
|
||||
}
|
||||
|
||||
void handle_xwayland_surface(struct wl_listener *listener, void *data) {
|
||||
struct sway_server *server = wl_container_of(listener, server,
|
||||
xwayland_surface);
|
||||
|
|
@ -470,6 +475,8 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) {
|
|||
|
||||
wl_signal_add(&xsurface->events.map, &xwayland_view->map);
|
||||
xwayland_view->map.notify = handle_map;
|
||||
|
||||
xsurface->data = xwayland_view;
|
||||
}
|
||||
|
||||
void handle_xwayland_ready(struct wl_listener *listener, void *data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue