summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2022-12-18 13:17:49 +0100
committerJonas Ådahl <jadahl@gmail.com>2022-12-18 13:17:49 +0100
commit6adc2e4b596c6b2f73d5fa64388d09a90bc35a7a (patch)
tree88bb5e1e75999a997cde573db3783ef73e936aed
parent4edcdd8a7f725ec2c115b3f2d22c5e9997635bd4 (diff)
downloadmutter-6adc2e4b596c6b2f73d5fa64388d09a90bc35a7a.tar.gz
pointer-lock/wayland: Fix coding style
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2772>
-rw-r--r--src/wayland/meta-pointer-lock-wayland.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wayland/meta-pointer-lock-wayland.c b/src/wayland/meta-pointer-lock-wayland.c
index e6f969a6b..dbc1b0b16 100644
--- a/src/wayland/meta-pointer-lock-wayland.c
+++ b/src/wayland/meta-pointer-lock-wayland.c
@@ -63,6 +63,7 @@ meta_pointer_lock_wayland_create_constraint (MetaPointerConfinementWayland *conf
ClutterInputDevice *pointer = clutter_seat_get_pointer (seat);
MetaPointerConstraint *constraint;
graphene_point_t point;
+ cairo_rectangle_int_t rect;
cairo_region_t *region;
float sx, sy, x, y;
@@ -75,7 +76,8 @@ meta_pointer_lock_wayland_create_constraint (MetaPointerConfinementWayland *conf
&sx, &sy);
meta_wayland_surface_get_absolute_coordinates (surface, sx, sy, &x, &y);
- region = cairo_region_create_rectangle (&(cairo_rectangle_int_t) { (int) x, (int) y, 1 , 1 });
+ rect = (cairo_rectangle_int_t) { .x = x, .y = y, .width = 1, .height = 1 };
+ region = cairo_region_create_rectangle (&rect);
constraint = meta_pointer_constraint_new (region, 0.0);
cairo_region_destroy (region);