mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-03-03 01:40:28 -05:00
fix: popup position constrain not work for some app
This commit is contained in:
parent
a06774d494
commit
65378f4dc8
4 changed files with 118 additions and 47 deletions
|
|
@ -96,3 +96,12 @@ Monitor *xytomon(double x, double y) {
|
|||
struct wlr_output *o = wlr_output_layout_output_at(output_layout, x, y);
|
||||
return o ? o->data : NULL;
|
||||
}
|
||||
|
||||
Monitor *get_monitor_nearest_to(int32_t lx, int32_t ly) {
|
||||
double closest_x, closest_y;
|
||||
wlr_output_layout_closest_point(output_layout, NULL, lx, ly, &closest_x,
|
||||
&closest_y);
|
||||
|
||||
return output_from_wlr_output(
|
||||
wlr_output_layout_output_at(output_layout, closest_x, closest_y));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue