summaryrefslogtreecommitdiff
path: root/desktop-shell
diff options
context:
space:
mode:
authorDerek Foreman <derek.foreman@collabora.com>2022-02-04 10:50:07 -0600
committerDerek Foreman <derek.foreman@collabora.com>2023-02-24 18:44:19 +0000
commit48c93e84e66fbc533dca695a4cff5c03f1337adc (patch)
treea0f68abc8363ddeb739c442942f21f33e98855fb /desktop-shell
parent59a0bd99bd17753346600688e8423603ffd5987f (diff)
downloadweston-48c93e84e66fbc533dca695a4cff5c03f1337adc.tar.gz
desktop-shell: Use weston_coord for saved position
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Diffstat (limited to 'desktop-shell')
-rw-r--r--desktop-shell/shell.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 716b565a..0d1d5a20 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -110,7 +110,7 @@ struct shell_surface {
struct wl_list children_list;
struct wl_list children_link;
- int32_t saved_x, saved_y;
+ struct weston_coord_global saved_pos;
bool saved_position_valid;
bool saved_rotation_valid;
int unresponsive, grabbed;
@@ -1511,7 +1511,8 @@ unset_fullscreen(struct shell_surface *shsurf)
if (shsurf->saved_position_valid)
weston_view_set_position(shsurf->view,
- shsurf->saved_x, shsurf->saved_y);
+ shsurf->saved_pos.c.x,
+ shsurf->saved_pos.c.y);
else
weston_view_set_initial_position(shsurf->view, shsurf->shell);
shsurf->saved_position_valid = false;
@@ -1538,7 +1539,8 @@ unset_maximized(struct shell_surface *shsurf)
if (shsurf->saved_position_valid)
weston_view_set_position(shsurf->view,
- shsurf->saved_x, shsurf->saved_y);
+ shsurf->saved_pos.c.x,
+ shsurf->saved_pos.c.y);
else
weston_view_set_initial_position(shsurf->view, shsurf->shell);
shsurf->saved_position_valid = false;
@@ -2114,8 +2116,7 @@ desktop_surface_committed(struct weston_desktop_surface *desktop_surface,
if ((shsurf->state.fullscreen || shsurf->state.maximized) &&
!shsurf->saved_position_valid) {
- shsurf->saved_x = shsurf->view->geometry.pos_offset.x;
- shsurf->saved_y = shsurf->view->geometry.pos_offset.y;
+ shsurf->saved_pos.c = shsurf->view->geometry.pos_offset;
shsurf->saved_position_valid = true;
if (!wl_list_empty(&shsurf->rotation.transform.link)) {