GNOME Bugzilla – Bug 773141
constraints: Use ConstraintInfo window rect when placing
Last modified: 2016-10-19 07:15:31 UTC
This fixes for exampling opening a File menu on a window maximized on a second monitor.
Created attachment 337922 [details] [review] constraints: Use ConstraintInfo window rect when placing The frame rect will at this point be set for Wayland popups, since the popup is placed and constrained before the actual buffer will be attached. To still be able to calculate a proper monitor to be used for canstraining, use the ConstraintInfo::current dimensions instead, since they will have the expected size. This should not cause any issues with present paths since when a window is otherwise placed, it usually doesn't change monitor calculation result. This fixes opening a popup menu on a the monitor relative X position 0 on a non-right-most monitor on Wayland.
Review of attachment 337922 [details] [review]: I think you mean "the frame rect will at this point be *unset* for wayland popups" and that last sentence in the commit message is kinda hard to parse. ::: src/core/constraints.c @@ +466,3 @@ const MetaMonitorInfo *monitor_info; + placed_rect = info->current; To keep it as close as possible as it was, we could use x,y from get_frame_rect() and only width,height from info->current which would still fix this issue. That said, I think this is safe enough.
Pushed with the changes suggested during review.