]> git.mdlowis.com Git - proto/labwc.git/commitdiff
view: initialise x+y variables to handle edge case
authorJohan Malm <jgm323@gmail.com>
Wed, 4 Aug 2021 20:43:07 +0000 (21:43 +0100)
committerJohan Malm <jgm323@gmail.com>
Wed, 4 Aug 2021 20:43:07 +0000 (21:43 +0100)
src/view.c

index e0f82b7b08e44518e7e6ba23d7f4e5d7a4eba38b..42d720f7f1d9002dcc800271afcb510c7ac36191 100644 (file)
@@ -147,7 +147,7 @@ view_move_to_edge(struct view *view, const char *direction)
        struct border border = view_border(view);
        struct wlr_box usable = output_usable_area_in_layout_coords(output);
 
-       int x, y;
+       int x = 0, y = 0;
        if (!strcasecmp(direction, "left")) {
                x = usable.x + border.left + GAP;
                y = view->y;