diff options
author | Derek Foreman <derek.foreman@collabora.com> | 2022-08-31 11:48:05 -0500 |
---|---|---|
committer | Pekka Paalanen <pq@iki.fi> | 2022-09-23 12:08:34 +0000 |
commit | bb8ef7d271c371b01a1ba8115b75701ed9538340 (patch) | |
tree | c9d151365f783ff27ffcd3706abb7fee8ffb2773 /desktop-shell | |
parent | 5c352b8f4fa15f08978cc51f72f9a96c35f40c8c (diff) | |
download | weston-bb8ef7d271c371b01a1ba8115b75701ed9538340.tar.gz |
libweston: Refactor point in output test
This is arguably a little nicer without calling the pixman functions
directly.
In the future when we have different datatypes for coordinates in different
spaces, this test will only be valid on global coordinates, so this change
is also a precursor to stronger type validation.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Diffstat (limited to 'desktop-shell')
-rw-r--r-- | desktop-shell/shell.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 48005831..922b16b6 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -3836,7 +3836,7 @@ weston_view_set_initial_position(struct weston_view *view, } wl_list_for_each(output, &compositor->output_list, link) { - if (pixman_region32_contains_point(&output->region, ix, iy, NULL)) { + if (weston_output_contains_point(output, ix, iy)) { target_output = output; break; } @@ -4251,8 +4251,7 @@ shell_reposition_view_on_output_change(struct weston_view *view) * otherwise, move it to the first output. */ visible = 0; wl_list_for_each(output, &ec->output_list, link) { - if (pixman_region32_contains_point(&output->region, - x, y, NULL)) { + if (weston_output_contains_point(output, x, y)) { visible = 1; break; } |