aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/tree/view.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/tree/view.h')
-rw-r--r--include/sway/tree/view.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index e071e6c9..008361f7 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -112,7 +112,6 @@ struct sway_view {
112#if HAVE_XWAYLAND 112#if HAVE_XWAYLAND
113 struct wlr_xwayland_surface *wlr_xwayland_surface; 113 struct wlr_xwayland_surface *wlr_xwayland_surface;
114#endif 114#endif
115 struct wlr_wl_shell_surface *wlr_wl_shell_surface;
116 }; 115 };
117 116
118 struct { 117 struct {
@@ -132,7 +131,6 @@ struct sway_xdg_shell_view {
132 struct wl_listener commit; 131 struct wl_listener commit;
133 struct wl_listener request_move; 132 struct wl_listener request_move;
134 struct wl_listener request_resize; 133 struct wl_listener request_resize;
135 struct wl_listener request_maximize;
136 struct wl_listener request_fullscreen; 134 struct wl_listener request_fullscreen;
137 struct wl_listener set_title; 135 struct wl_listener set_title;
138 struct wl_listener set_app_id; 136 struct wl_listener set_app_id;
@@ -184,7 +182,7 @@ struct sway_xwayland_unmanaged {
184struct sway_view_child; 182struct sway_view_child;
185 183
186struct sway_view_child_impl { 184struct sway_view_child_impl {
187 void (*get_root_coords)(struct sway_view_child *child, int *sx, int *sy); 185 void (*get_view_coords)(struct sway_view_child *child, int *sx, int *sy);
188 void (*destroy)(struct sway_view_child *child); 186 void (*destroy)(struct sway_view_child *child);
189}; 187};
190 188
@@ -311,12 +309,22 @@ void view_destroy(struct sway_view *view);
311 309
312void view_begin_destroy(struct sway_view *view); 310void view_begin_destroy(struct sway_view *view);
313 311
312/**
313 * Map a view, ie. make it visible in the tree.
314 *
315 * `fullscreen` should be set to true (and optionally `fullscreen_output`
316 * should be populated) if the view should be made fullscreen immediately.
317 *
318 * `decoration` should be set to true if the client prefers CSD. The client's
319 * preference may be ignored.
320 */
314void view_map(struct sway_view *view, struct wlr_surface *wlr_surface, 321void view_map(struct sway_view *view, struct wlr_surface *wlr_surface,
315 bool fullscreen, struct wlr_output *fullscreen_output, bool decoration); 322 bool fullscreen, struct wlr_output *fullscreen_output, bool decoration);
316 323
317void view_unmap(struct sway_view *view); 324void view_unmap(struct sway_view *view);
318 325
319void view_update_size(struct sway_view *view, int width, int height); 326void view_update_size(struct sway_view *view);
327void view_center_surface(struct sway_view *view);
320 328
321void view_child_init(struct sway_view_child *child, 329void view_child_init(struct sway_view_child *child,
322 const struct sway_view_child_impl *impl, struct sway_view *view, 330 const struct sway_view_child_impl *impl, struct sway_view *view,