aboutsummaryrefslogtreecommitdiff
path: root/xwayland/xwm.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-07-09 11:49:45 +0200
committerSimon Ser <contact@emersion.fr>2023-07-09 12:18:49 +0200
commit76e2a74282b86c40180a41bdf408dac701169a74 (patch)
tree3b17a9691a4242e9349263beab75a933b62451f0 /xwayland/xwm.c
parent5bb005779484967d0b9824aa88563b661a70be51 (diff)
xwayland: use initializer for struct wlr_xwayland_resize_event
Ensures there are no fields with uninitialized memory. Also remove an outdated TODO: Xwayland only supports a single seat.
Diffstat (limited to 'xwayland/xwm.c')
-rw-r--r--xwayland/xwm.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index a8f2eb2d..81ea1e56 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -1240,10 +1240,6 @@ static void xwm_handle_net_wm_moveresize_message(struct wlr_xwm *xwm,
return;
}
- // TODO: we should probably add input or seat info to this but we would just
- // be guessing
- struct wlr_xwayland_resize_event resize_event;
-
int detail = ev->data.data32[2];
switch (detail) {
case _NET_WM_MOVERESIZE_MOVE:
@@ -1256,9 +1252,11 @@ static void xwm_handle_net_wm_moveresize_message(struct wlr_xwm *xwm,
case _NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT:
case _NET_WM_MOVERESIZE_SIZE_BOTTOM:
case _NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT:
- case _NET_WM_MOVERESIZE_SIZE_LEFT:
- resize_event.surface = xsurface;
- resize_event.edges = net_wm_edges_to_wlr(detail);
+ case _NET_WM_MOVERESIZE_SIZE_LEFT:;
+ struct wlr_xwayland_resize_event resize_event = {
+ .surface = xsurface,
+ .edges = net_wm_edges_to_wlr(detail),
+ };
wl_signal_emit_mutable(&xsurface->events.request_resize, &resize_event);
break;
case _NET_WM_MOVERESIZE_CANCEL: