mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-04 13:29:56 -05:00
fix: popup surface set error geom
it will cause xfce4-panel can't see any popup menu when use right button click the dock panel
This commit is contained in:
parent
c0aa0a0d19
commit
6fee372144
1 changed files with 7 additions and 4 deletions
11
src/maomao.c
11
src/maomao.c
|
|
@ -2737,7 +2737,8 @@ buttonpress(struct wl_listener *listener, void *data) {
|
||||||
Client *tmpc;
|
Client *tmpc;
|
||||||
int ji;
|
int ji;
|
||||||
const MouseBinding *b;
|
const MouseBinding *b;
|
||||||
struct wlr_surface *old_pointer_focus_surface = seat->pointer_state.focused_surface;
|
struct wlr_surface *old_pointer_focus_surface =
|
||||||
|
seat->pointer_state.focused_surface;
|
||||||
|
|
||||||
handlecursoractivity();
|
handlecursoractivity();
|
||||||
wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
||||||
|
|
@ -3177,11 +3178,13 @@ void commitpopup(struct wl_listener *listener, void *data) {
|
||||||
return;
|
return;
|
||||||
popup->base->surface->data =
|
popup->base->surface->data =
|
||||||
wlr_scene_xdg_surface_create(popup->parent->data, popup->base);
|
wlr_scene_xdg_surface_create(popup->parent->data, popup->base);
|
||||||
if ((l && !l->mon) || (c && !c->mon))
|
if ((l && !l->mon) || (c && !c->mon)) {
|
||||||
|
wlr_xdg_popup_destroy(popup);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
box = type == LayerShell ? l->mon->m : c->mon->w;
|
box = type == LayerShell ? l->mon->m : c->mon->w;
|
||||||
box.x -= (type == LayerShell ? l->geom.x : c->geom.x);
|
box.x -= (type == LayerShell ? l->scene->node.x : c->geom.x);
|
||||||
box.y -= (type == LayerShell ? l->geom.y : c->geom.y);
|
box.y -= (type == LayerShell ? l->scene->node.y : c->geom.y);
|
||||||
wlr_xdg_popup_unconstrain_from_box(popup, &box);
|
wlr_xdg_popup_unconstrain_from_box(popup, &box);
|
||||||
wl_list_remove(&listener->link);
|
wl_list_remove(&listener->link);
|
||||||
free(listener);
|
free(listener);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue