mirror of
https://github.com/labwc/labwc.git
synced 2026-02-17 22:05:30 -05:00
layers: unconstrain popup within usable area
Helped-by: @Consolatis
This commit is contained in:
parent
8b8652e2b3
commit
fa82cf8afa
1 changed files with 5 additions and 4 deletions
|
|
@ -469,6 +469,7 @@ handle_new_popup(struct wl_listener *listener, void *data)
|
||||||
wlr_output_layout_get_box(server->output_layout,
|
wlr_output_layout_get_box(server->output_layout,
|
||||||
output->wlr_output, &output_box);
|
output->wlr_output, &output_box);
|
||||||
|
|
||||||
|
struct wlr_box usable = output_usable_area_in_layout_coords(output);
|
||||||
/*
|
/*
|
||||||
* Output geometry expressed in the coordinate system of the toplevel
|
* Output geometry expressed in the coordinate system of the toplevel
|
||||||
* parent of popup. We store this struct the lab_layer_popup struct
|
* parent of popup. We store this struct the lab_layer_popup struct
|
||||||
|
|
@ -476,10 +477,10 @@ handle_new_popup(struct wl_listener *listener, void *data)
|
||||||
* the bottom to the top layer.
|
* the bottom to the top layer.
|
||||||
*/
|
*/
|
||||||
struct wlr_box output_toplevel_sx_box = {
|
struct wlr_box output_toplevel_sx_box = {
|
||||||
.x = output_box.x - lx,
|
.x = usable.x - lx,
|
||||||
.y = output_box.y - ly,
|
.y = usable.y - ly,
|
||||||
.width = output_box.width,
|
.width = usable.width,
|
||||||
.height = output_box.height,
|
.height = usable.height,
|
||||||
};
|
};
|
||||||
struct lab_layer_popup *popup = create_popup(wlr_popup, surface->tree);
|
struct lab_layer_popup *popup = create_popup(wlr_popup, surface->tree);
|
||||||
popup->output_toplevel_sx_box = output_toplevel_sx_box;
|
popup->output_toplevel_sx_box = output_toplevel_sx_box;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue