From: Johan Malm Date: Wed, 18 May 2022 15:52:49 +0000 (+0100) Subject: resistance.c: initialize 'flags' to zero X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=87a64b64fa956c9b968be3a7589d12390e32f7fa;p=proto%2Flabwc.git resistance.c: initialize 'flags' to zero Failure to initialize this variable sometimes causes windows to stick to edges during move/resize. Issues #331 and #309 may be related to this --- diff --git a/src/resistance.c b/src/resistance.c index 4a3d99ba..a1d2aba4 100644 --- a/src/resistance.c +++ b/src/resistance.c @@ -44,7 +44,7 @@ resistance_move_apply(struct view *view, double *x, double *y) struct edges view_edges; /* The edges of the current view */ struct edges target_edges; /* The desired edges */ struct edges other_edges; /* The edges of the monitor/other view */ - struct edges flags; /* To be set in is_within_resistance_range() */ + struct edges flags = { 0 }; view_edges.left = view->x - border.left + 1; view_edges.top = view->y - border.top + 1;