mirror of
https://github.com/labwc/labwc.git
synced 2025-10-31 22:25:34 -04:00
src/output.c: remove output_usable_area_scaled()
This commit is contained in:
parent
66a3beb98b
commit
028e24dc13
3 changed files with 1 additions and 20 deletions
|
|
@ -547,7 +547,6 @@ void output_update_usable_area(struct output *output);
|
||||||
void output_update_all_usable_areas(struct server *server, bool layout_changed);
|
void output_update_all_usable_areas(struct server *server, bool layout_changed);
|
||||||
bool output_get_tearing_allowance(struct output *output);
|
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_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 handle_output_power_manager_set_mode(struct wl_listener *listener,
|
||||||
void *data);
|
void *data);
|
||||||
void output_enable_adaptive_sync(struct output *output, bool enabled);
|
void output_enable_adaptive_sync(struct output *output, bool enabled);
|
||||||
|
|
|
||||||
18
src/output.c
18
src/output.c
|
|
@ -1008,24 +1008,6 @@ output_usable_area_in_layout_coords(struct output *output)
|
||||||
return box;
|
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
|
void
|
||||||
handle_output_power_manager_set_mode(struct wl_listener *listener, void *data)
|
handle_output_power_manager_set_mode(struct wl_listener *listener, void *data)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -417,7 +417,7 @@ static struct wlr_box
|
||||||
view_get_edge_snap_box(struct view *view, struct output *output,
|
view_get_edge_snap_box(struct view *view, struct output *output,
|
||||||
enum view_edge edge)
|
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
|
int x_offset = edge == VIEW_EDGE_RIGHT
|
||||||
? (usable.width + rc.gap) / 2 : rc.gap;
|
? (usable.width + rc.gap) / 2 : rc.gap;
|
||||||
int y_offset = edge == VIEW_EDGE_DOWN
|
int y_offset = edge == VIEW_EDGE_DOWN
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue