forked from mirror/dwl
No need to send surface.leave/enter events
The scene graph implementation sends these for us, and it does so more accurately than our overly-simplified approach. Layer shell surfaces don't appear to receive these events at all, according to my WAYLAND_DEBUG experiments with bemenu and dtao. ΔSLOC: -4
This commit is contained in:
parent
4567979b16
commit
4eb54b55f3
1 changed files with 2 additions and 6 deletions
8
dwl.c
8
dwl.c
|
@ -1525,7 +1525,6 @@ void
|
||||||
maplayersurfacenotify(struct wl_listener *listener, void *data)
|
maplayersurfacenotify(struct wl_listener *listener, void *data)
|
||||||
{
|
{
|
||||||
LayerSurface *l = wl_container_of(listener, l, map);
|
LayerSurface *l = wl_container_of(listener, l, map);
|
||||||
wlr_surface_send_enter(l->layer_surface->surface, l->mon->wlr_output);
|
|
||||||
motionnotify(0);
|
motionnotify(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2091,15 +2090,12 @@ setmon(Client *c, Monitor *m, uint32_t newtags)
|
||||||
c->mon = m;
|
c->mon = m;
|
||||||
c->prev = c->geom;
|
c->prev = c->geom;
|
||||||
|
|
||||||
/* TODO leave/enter is not optimal but works */
|
/* Scene graph sends surface leave/enter events on move and resize */
|
||||||
if (oldmon) {
|
if (oldmon)
|
||||||
wlr_surface_send_leave(client_surface(c), oldmon->wlr_output);
|
|
||||||
arrange(oldmon);
|
arrange(oldmon);
|
||||||
}
|
|
||||||
if (m) {
|
if (m) {
|
||||||
/* Make sure window actually overlaps with the monitor */
|
/* Make sure window actually overlaps with the monitor */
|
||||||
resize(c, c->geom, 0);
|
resize(c, c->geom, 0);
|
||||||
wlr_surface_send_enter(client_surface(c), m->wlr_output);
|
|
||||||
c->tags = newtags ? newtags : m->tagset[m->seltags]; /* assign tags of target monitor */
|
c->tags = newtags ? newtags : m->tagset[m->seltags]; /* assign tags of target monitor */
|
||||||
setfullscreen(c, c->isfullscreen); /* This will call arrange(c->mon) */
|
setfullscreen(c, c->isfullscreen); /* This will call arrange(c->mon) */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue