mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-24 20:51:10 +00:00
Merge branch 'master' into 'main'
GdkSurface: prevent popups from appearing offscreen in edge cases See merge request GNOME/gtk!5320
This commit is contained in:
commit
c86bc00330
@ -254,7 +254,7 @@ maybe_flip_position (int bounds_pos,
|
||||
*flipped = TRUE;
|
||||
secondary = rect_pos + (1 - rect_sign) * rect_size / 2 - offset - (1 - surface_sign) * surface_size / 2;
|
||||
|
||||
if (secondary >= bounds_pos && secondary + surface_size <= bounds_pos + bounds_size)
|
||||
if ((secondary >= bounds_pos && secondary + surface_size <= bounds_pos + bounds_size) || primary > bounds_pos + bounds_size)
|
||||
return secondary;
|
||||
|
||||
*flipped = FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user