]> git.mdlowis.com Git - proto/labwc.git/commitdiff
resistance: Do not consider edges of disabled outputs
authorJohn Lindgren <john@jlindgren.net>
Mon, 18 Jul 2022 03:39:36 +0000 (23:39 -0400)
committerJohan Malm <johanmalm@users.noreply.github.com>
Mon, 18 Jul 2022 21:06:12 +0000 (22:06 +0100)
src/resistance.c

index db19dbc699e1df65ffb70d520d4580ab7b9fb88e..96d4908e64ba04a8b5bb379b1b55ef83f77ab39d 100644 (file)
@@ -61,6 +61,10 @@ resistance_move_apply(struct view *view, double *x, double *y)
        }
 
        wl_list_for_each(output, &server->outputs, link) {
+               if (!output->wlr_output->enabled) {
+                       continue;
+               }
+
                mgeom = output_usable_area_in_layout_coords(output);
 
                if (!wlr_box_intersection(&intersection, &vgeom, &mgeom)
@@ -129,6 +133,10 @@ resistance_resize_apply(struct view *view, struct wlr_box *new_view_geo)
                return;
        }
        wl_list_for_each(output, &server->outputs, link) {
+               if (!output->wlr_output->enabled) {
+                       continue;
+               }
+
                mgeom = output_usable_area_in_layout_coords(output);
 
                if (!wlr_box_intersection(&intersection, &vgeom, &mgeom)