mirror of
https://github.com/swaywm/sway.git
synced 2026-04-26 06:46:26 -04:00
Style improvements and readability
This commit is contained in:
parent
2b77f143d9
commit
1fb9283849
1 changed files with 10 additions and 10 deletions
|
|
@ -74,12 +74,12 @@ static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec,
|
||||||
double height = e->ref_height + grow_height;
|
double height = e->ref_height + grow_height;
|
||||||
int min_width, max_width, min_height, max_height;
|
int min_width, max_width, min_height, max_height;
|
||||||
floating_calculate_constraints(&min_width, &max_width,
|
floating_calculate_constraints(&min_width, &max_width,
|
||||||
&min_height, &max_height);
|
&min_height, &max_height);
|
||||||
double bounded_width = fmax(min_width + border_width,
|
width = fmin(width, max_width - border_width)
|
||||||
fmin(width, max_width - border_width));
|
width = fmax(min_width + border_width, width);
|
||||||
double bounded_height = fmax(min_height + border_height,
|
width = fmax(width, 1);
|
||||||
fmin(height, max_height - border_height));
|
height = fmin(height, max_height - border_height);
|
||||||
width = fmax(bounded_width, 1);
|
height = fmax(min_height + border_height, height);
|
||||||
height = fmax(bounded_height, 1);
|
height = fmax(bounded_height, 1);
|
||||||
|
|
||||||
// Apply the view's min/max size
|
// Apply the view's min/max size
|
||||||
|
|
@ -87,11 +87,11 @@ static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec,
|
||||||
double view_min_width, view_max_width, view_min_height, view_max_height;
|
double view_min_width, view_max_width, view_min_height, view_max_height;
|
||||||
view_get_constraints(con->view, &view_min_width, &view_max_width,
|
view_get_constraints(con->view, &view_min_width, &view_max_width,
|
||||||
&view_min_height, &view_max_height);
|
&view_min_height, &view_max_height);
|
||||||
double bounded_view_width = fmax(view_min_width + border_width,
|
width = fmin(width, view_max_width - border_width);
|
||||||
fmin(width, view_max_width - border_width));
|
width = fmax(view_min_width + border_width, width);
|
||||||
double bounded_view_height = fmax(view_min_height + border_height,
|
|
||||||
fmin(height, view_max_height - border_height));
|
|
||||||
width = fmax(bounded_view_width, 1);
|
width = fmax(bounded_view_width, 1);
|
||||||
|
height = fmin(height, view_max_height - border_height);
|
||||||
|
height = fmax(view_min_height + border_height, height);
|
||||||
height = fmax(bounded_view_height, 1);
|
height = fmax(bounded_view_height, 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue