mirror of
https://github.com/labwc/labwc.git
synced 2026-05-03 06:47:22 -04:00
fix chromium popup on maximized window
This commit is contained in:
parent
df9537c809
commit
bc7498dc6f
1 changed files with 5 additions and 2 deletions
|
|
@ -43,10 +43,13 @@ popup_unconstrain(struct xdg_popup *popup)
|
|||
* than zero, typically with Qt apps. We therefore clamp it to avoid for
|
||||
* example the 'File' menu of a maximized window to end up on an another
|
||||
* output.
|
||||
* Also some apps open the menu exactly at the right border when maximized,
|
||||
* causing popup_box->x (or y?) to be in the next output. We subtract one
|
||||
* inside MAX to avoid the problem mentioned above.
|
||||
*/
|
||||
struct wlr_box *popup_box = &popup->wlr_popup->scheduled.geometry;
|
||||
struct output *output = output_nearest_to(parent_lx + MAX(popup_box->x, 0),
|
||||
parent_ly + MAX(popup_box->y, 0));
|
||||
struct output *output = output_nearest_to(parent_lx + MAX(popup_box->x - 1, 0),
|
||||
parent_ly + MAX(popup_box->y - 1, 0));
|
||||
struct wlr_box usable = output_usable_area_in_layout_coords(output);
|
||||
|
||||
/* Get offset of toplevel window from its surface */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue