mirror of
https://github.com/labwc/labwc.git
synced 2026-03-18 05:33:53 -04:00
view: add/improve some comments
This commit is contained in:
parent
3f223fe5b0
commit
df73a97efa
4 changed files with 31 additions and 7 deletions
|
|
@ -652,7 +652,11 @@ view_compute_near_cursor_position(struct view *view, struct wlr_box *geom)
|
|||
int x = (int)seat->cursor->x - (total_width / 2);
|
||||
int y = (int)seat->cursor->y - (total_height / 2);
|
||||
|
||||
/* Order of MIN/MAX is significant here */
|
||||
/*
|
||||
* Order of MIN/MAX is significant here (so that the top-left
|
||||
* corner of the view remains visible even if the view is larger
|
||||
* than the usable output area)
|
||||
*/
|
||||
x = MIN(x, usable.x + usable.width - total_width);
|
||||
geom->x = MAX(x, usable.x) + margin.left;
|
||||
y = MIN(y, usable.y + usable.height - total_height);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue