]> git.mdlowis.com Git - proto/labwc.git/commitdiff
src/output.c: remove output_usable_area_scaled()
authortokyo4j <hrak1529@gmail.com>
Mon, 23 Dec 2024 10:09:26 +0000 (19:09 +0900)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sat, 28 Dec 2024 23:03:34 +0000 (23:03 +0000)
include/labwc.h
src/output.c
src/view.c

index 798e0dbf9fd6511dfaa3ab4ba6bf96960a4c0aac..783560185e67d4427a4c548a469d56a18bd51dc4 100644 (file)
@@ -547,7 +547,6 @@ void output_update_usable_area(struct output *output);
 void output_update_all_usable_areas(struct server *server, bool layout_changed);
 bool output_get_tearing_allowance(struct output *output);
 struct wlr_box output_usable_area_in_layout_coords(struct output *output);
-struct wlr_box output_usable_area_scaled(struct output *output);
 void handle_output_power_manager_set_mode(struct wl_listener *listener,
        void *data);
 void output_enable_adaptive_sync(struct output *output, bool enabled);
index decdf07b9ff97f8f40e015ad980f3786204bc45d..62ad8cdd04450167b67549a38a3b772b21ee3bc4 100644 (file)
@@ -1008,24 +1008,6 @@ output_usable_area_in_layout_coords(struct output *output)
        return box;
 }
 
-struct wlr_box
-output_usable_area_scaled(struct output *output)
-{
-       if (!output) {
-               return (struct wlr_box){0};
-       }
-       struct wlr_box usable = output_usable_area_in_layout_coords(output);
-       if (usable.height == output->wlr_output->height
-                       && output->wlr_output->scale != 1) {
-               usable.height /= output->wlr_output->scale;
-       }
-       if (usable.width == output->wlr_output->width
-                       && output->wlr_output->scale != 1) {
-               usable.width /= output->wlr_output->scale;
-       }
-       return usable;
-}
-
 void
 handle_output_power_manager_set_mode(struct wl_listener *listener, void *data)
 {
index df7a1116039cbc55c8840bd677caebdca3cb6d6d..a896cb40e6e1154a8e3684bb209e207f113b0aad 100644 (file)
@@ -417,7 +417,7 @@ static struct wlr_box
 view_get_edge_snap_box(struct view *view, struct output *output,
                enum view_edge edge)
 {
-       struct wlr_box usable = output_usable_area_scaled(output);
+       struct wlr_box usable = output_usable_area_in_layout_coords(output);
        int x_offset = edge == VIEW_EDGE_RIGHT
                ? (usable.width + rc.gap) / 2 : rc.gap;
        int y_offset = edge == VIEW_EDGE_DOWN