]> git.mdlowis.com Git - proto/labwc.git/commitdiff
src/overlay.c: minor refactor
authortokyo4j <hrak1529@gmail.com>
Sat, 2 Aug 2025 12:35:34 +0000 (21:35 +0900)
committerJohan Malm <johanmalm@users.noreply.github.com>
Mon, 4 Aug 2025 20:24:12 +0000 (21:24 +0100)
src/overlay.c

index 2aecf0075ca4a2b6150fd3764eed3bfbced12f3a..b7557b23becf04fff649e912e30be7222e59a7e6 100644 (file)
@@ -115,7 +115,8 @@ show_region_overlay(struct seat *seat, struct region *region)
        show_overlay(seat, &seat->overlay.region_rect, &geo);
 }
 
-static struct wlr_box get_edge_snap_box(enum view_edge edge, struct output *output)
+static struct wlr_box
+get_edge_snap_box(enum view_edge edge, struct output *output)
 {
        if (edge == VIEW_EDGE_UP && rc.snap_top_maximize) {
                return output_usable_area_in_layout_coords(output);
@@ -197,8 +198,7 @@ show_edge_overlay(struct seat *seat, enum view_edge edge,
                wl_event_source_timer_update(seat->overlay.timer, delay);
        } else {
                /* Show overlay now */
-               struct wlr_box box = get_edge_snap_box(seat->overlay.active.edge,
-                       seat->overlay.active.output);
+               struct wlr_box box = get_edge_snap_box(edge, output);
                show_overlay(seat, &seat->overlay.edge_rect, &box);
        }
 }