diff options
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/xwayland.h | 50 |
1 files changed, 44 insertions, 6 deletions
diff --git a/include/wlr/xwayland.h b/include/wlr/xwayland.h index c25d0eb0..2d968133 100644 --- a/include/wlr/xwayland.h +++ b/include/wlr/xwayland.h @@ -25,7 +25,6 @@ struct wlr_xwayland { struct wl_event_source *sigusr1_source; struct wl_listener destroy_listener; struct wlr_xwm *xwm; - struct wl_list displayable_surfaces; struct { struct wl_signal new_surface; @@ -66,14 +65,19 @@ struct wlr_xwayland_surface_size_hints { struct wlr_xwayland_surface { xcb_window_t window_id; + struct wlr_xwm *xwm; uint32_t surface_id; + struct wl_list link; + struct wl_list unpaired_link; struct wlr_surface *surface; - struct wl_listener surface_destroy_listener; int16_t x, y; uint16_t width, height; + uint16_t saved_width, saved_height; bool override_redirect; + bool mapped; + bool added; char *title; char *class; @@ -93,19 +97,33 @@ struct wlr_xwayland_surface { uint32_t hints_urgency; struct wlr_xwayland_surface_size_hints *size_hints; + // _NET_WM_STATE + bool fullscreen; + bool maximized_vert; + bool maximized_horz; + + bool has_alpha; + struct { struct wl_signal destroy; - struct wl_signal request_configure; + struct wl_signal request_move; + struct wl_signal request_resize; + struct wl_signal request_maximize; + struct wl_signal request_fullscreen; + struct wl_signal map_notify; + struct wl_signal unmap_notify; struct wl_signal set_title; struct wl_signal set_class; struct wl_signal set_parent; - struct wl_signal set_state; struct wl_signal set_pid; struct wl_signal set_window_type; } events; + struct wl_listener surface_destroy; + struct wl_listener surface_commit; + void *data; }; @@ -115,15 +133,35 @@ struct wlr_xwayland_surface_configure_event { uint16_t width, height; }; -void wlr_xwayland_destroy(struct wlr_xwayland *wlr_xwayland); +// TODO: maybe add a seat to these +struct wlr_xwayland_move_event { + struct wlr_xwayland_surface *surface; +}; + +struct wlr_xwayland_resize_event { + struct wlr_xwayland_surface *surface; + uint32_t edges; +}; + struct wlr_xwayland *wlr_xwayland_create(struct wl_display *wl_display, struct wlr_compositor *compositor); + +void wlr_xwayland_destroy(struct wlr_xwayland *wlr_xwayland); + void wlr_xwayland_surface_activate(struct wlr_xwayland *wlr_xwayland, - struct wlr_xwayland_surface *surface); + struct wlr_xwayland_surface *surface, bool activated); + void wlr_xwayland_surface_configure(struct wlr_xwayland *wlr_xwayland, struct wlr_xwayland_surface *surface, int16_t x, int16_t y, uint16_t width, uint16_t height); + void wlr_xwayland_surface_close(struct wlr_xwayland *wlr_xwayland, struct wlr_xwayland_surface *surface); +void wlr_xwayland_surface_set_maximized(struct wlr_xwayland *wlr_xwayland, + struct wlr_xwayland_surface *surface, bool maximized); + +void wlr_xwayland_surface_set_fullscreen(struct wlr_xwayland *wlr_xwayland, + struct wlr_xwayland_surface *surface, bool fullscreen); + #endif |