summaryrefslogtreecommitdiffstats
path: root/sway/desktop/xdg_shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop/xdg_shell.c')
-rw-r--r--sway/desktop/xdg_shell.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c
index 6a7a3f7f..2b260357 100644
--- a/sway/desktop/xdg_shell.c
+++ b/sway/desktop/xdg_shell.c
@@ -107,7 +107,8 @@ static void get_constraints(struct sway_view *view, double *min_width,
107 *max_height = state->max_height > 0 ? state->max_height : DBL_MAX; 107 *max_height = state->max_height > 0 ? state->max_height : DBL_MAX;
108} 108}
109 109
110static const char *get_string_prop(struct sway_view *view, enum sway_view_prop prop) { 110static const char *get_string_prop(struct sway_view *view,
111 enum sway_view_prop prop) {
111 if (xdg_shell_view_from_view(view) == NULL) { 112 if (xdg_shell_view_from_view(view) == NULL) {
112 return NULL; 113 return NULL;
113 } 114 }
@@ -121,6 +122,16 @@ static const char *get_string_prop(struct sway_view *view, enum sway_view_prop p
121 } 122 }
122} 123}
123 124
125static void get_geometry(struct sway_view *view, struct wlr_box *box) {
126 struct sway_xdg_shell_view *xdg_shell_view =
127 xdg_shell_view_from_view(view);
128 if (xdg_shell_view == NULL) {
129 return;
130 }
131 struct wlr_xdg_surface *surface = view->wlr_xdg_surface;
132 wlr_xdg_surface_get_geometry(surface, box);
133}
134
124static uint32_t configure(struct sway_view *view, double lx, double ly, 135static uint32_t configure(struct sway_view *view, double lx, double ly,
125 int width, int height) { 136 int width, int height) {
126 struct sway_xdg_shell_view *xdg_shell_view = 137 struct sway_xdg_shell_view *xdg_shell_view =
@@ -231,6 +242,7 @@ static void destroy(struct sway_view *view) {
231static const struct sway_view_impl view_impl = { 242static const struct sway_view_impl view_impl = {
232 .get_constraints = get_constraints, 243 .get_constraints = get_constraints,
233 .get_string_prop = get_string_prop, 244 .get_string_prop = get_string_prop,
245 .get_geometry = get_geometry,
234 .configure = configure, 246 .configure = configure,
235 .set_activated = set_activated, 247 .set_activated = set_activated,
236 .set_tiled = set_tiled, 248 .set_tiled = set_tiled,