mirror of
https://github.com/labwc/labwc.git
synced 2025-11-01 22:58:47 -04:00
Use output_usable_area_scaled() helper
This commit is contained in:
parent
afe92654fd
commit
0fd26c63fa
1 changed files with 1 additions and 10 deletions
11
src/view.c
11
src/view.c
|
|
@ -208,16 +208,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_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;
|
||||
}
|
||||
|
||||
struct wlr_box usable = output_usable_area_scaled(output);
|
||||
int x_offset = edge == VIEW_EDGE_RIGHT
|
||||
? (usable.width + rc.gap) / 2 : rc.gap;
|
||||
int y_offset = edge == VIEW_EDGE_DOWN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue