aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-30 21:20:31 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-05 18:01:43 +1000
commitacc2628c799170dea98380cda2237137137f182f (patch)
treeb28b186339b90b75a767b96c780f9a643ff70204 /sway/desktop
parentImplement type safe arguments and demote sway_container (diff)
downloadsway-acc2628c799170dea98380cda2237137137f182f.tar.gz
sway-acc2628c799170dea98380cda2237137137f182f.tar.zst
sway-acc2628c799170dea98380cda2237137137f182f.zip
Don't use wlr_output properties
These properties are before rotation.
Diffstat (limited to 'sway/desktop')
-rw-r--r--sway/desktop/output.c8
-rw-r--r--sway/desktop/render.c4
-rw-r--r--sway/desktop/xdg_shell.c8
-rw-r--r--sway/desktop/xdg_shell_v6.c8
4 files changed, 14 insertions, 14 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index c182bad6..792a7231 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -98,8 +98,8 @@ static bool get_surface_box(struct surface_iterator_data *data,
98 wlr_box_rotated_bounds(&box, data->rotation, &rotated_box); 98 wlr_box_rotated_bounds(&box, data->rotation, &rotated_box);
99 99
100 struct wlr_box output_box = { 100 struct wlr_box output_box = {
101 .width = output->wlr_output->width, 101 .width = output->width,
102 .height = output->wlr_output->height, 102 .height = output->height,
103 }; 103 };
104 104
105 struct wlr_box intersection; 105 struct wlr_box intersection;
@@ -249,8 +249,8 @@ bool output_has_opaque_overlay_layer_surface(struct sway_output *output) {
249 struct sway_layer_surface *sway_layer_surface = 249 struct sway_layer_surface *sway_layer_surface =
250 layer_from_wlr_layer_surface(wlr_layer_surface); 250 layer_from_wlr_layer_surface(wlr_layer_surface);
251 pixman_box32_t output_box = { 251 pixman_box32_t output_box = {
252 .x2 = output->wlr_output->width, 252 .x2 = output->width,
253 .y2 = output->wlr_output->height, 253 .y2 = output->height,
254 }; 254 };
255 pixman_region32_t surface_opaque_box; 255 pixman_region32_t surface_opaque_box;
256 pixman_region32_init(&surface_opaque_box); 256 pixman_region32_init(&surface_opaque_box);
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index 99b2cf3d..9d80f3c7 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -238,8 +238,8 @@ static void render_saved_view(struct sway_view *view,
238 }; 238 };
239 239
240 struct wlr_box output_box = { 240 struct wlr_box output_box = {
241 .width = output->wlr_output->width, 241 .width = output->width,
242 .height = output->wlr_output->height, 242 .height = output->height,
243 }; 243 };
244 244
245 struct wlr_box intersection; 245 struct wlr_box intersection;
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c
index e19d8e18..575f229d 100644
--- a/sway/desktop/xdg_shell.c
+++ b/sway/desktop/xdg_shell.c
@@ -59,10 +59,10 @@ static void popup_unconstrain(struct sway_xdg_popup *popup) {
59 // the output box expressed in the coordinate system of the toplevel parent 59 // the output box expressed in the coordinate system of the toplevel parent
60 // of the popup 60 // of the popup
61 struct wlr_box output_toplevel_sx_box = { 61 struct wlr_box output_toplevel_sx_box = {
62 .x = output->wlr_output->lx - view->x, 62 .x = output->lx - view->x,
63 .y = output->wlr_output->ly - view->y, 63 .y = output->ly - view->y,
64 .width = output->wlr_output->width, 64 .width = output->width,
65 .height = output->wlr_output->height, 65 .height = output->height,
66 }; 66 };
67 67
68 wlr_xdg_popup_unconstrain_from_box(wlr_popup, &output_toplevel_sx_box); 68 wlr_xdg_popup_unconstrain_from_box(wlr_popup, &output_toplevel_sx_box);
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c
index b23d4577..58fbd631 100644
--- a/sway/desktop/xdg_shell_v6.c
+++ b/sway/desktop/xdg_shell_v6.c
@@ -58,10 +58,10 @@ static void popup_unconstrain(struct sway_xdg_popup_v6 *popup) {
58 // the output box expressed in the coordinate system of the toplevel parent 58 // the output box expressed in the coordinate system of the toplevel parent
59 // of the popup 59 // of the popup
60 struct wlr_box output_toplevel_sx_box = { 60 struct wlr_box output_toplevel_sx_box = {
61 .x = output->wlr_output->lx - view->x, 61 .x = output->lx - view->x,
62 .y = output->wlr_output->ly - view->y, 62 .y = output->ly - view->y,
63 .width = output->wlr_output->width, 63 .width = output->width,
64 .height = output->wlr_output->height, 64 .height = output->height,
65 }; 65 };
66 66
67 wlr_xdg_popup_v6_unconstrain_from_box(wlr_popup, &output_toplevel_sx_box); 67 wlr_xdg_popup_v6_unconstrain_from_box(wlr_popup, &output_toplevel_sx_box);