mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-10-27 18:24:16 +00:00
call setmon() in mapnotify()
with this change cannot assign tags at open a window
This commit is contained in:
parent
144331e3b3
commit
1652d0a5d5
10
dwl.c
10
dwl.c
@ -888,6 +888,9 @@ createnotify(struct wl_listener *listener, void *data)
|
|||||||
c->surface.xdg = xdg_surface;
|
c->surface.xdg = xdg_surface;
|
||||||
c->bw = borderpx;
|
c->bw = borderpx;
|
||||||
|
|
||||||
|
/* set monitor, then it will be overwritten by applyrules */
|
||||||
|
setmon(c,selmon, 0);
|
||||||
|
|
||||||
LISTEN(&xdg_surface->surface->events.commit, &c->commit, commitnotify);
|
LISTEN(&xdg_surface->surface->events.commit, &c->commit, commitnotify);
|
||||||
LISTEN(&xdg_surface->events.map, &c->map, mapnotify);
|
LISTEN(&xdg_surface->events.map, &c->map, mapnotify);
|
||||||
LISTEN(&xdg_surface->events.unmap, &c->unmap, unmapnotify);
|
LISTEN(&xdg_surface->events.unmap, &c->unmap, unmapnotify);
|
||||||
@ -1315,6 +1318,10 @@ mapnotify(struct wl_listener *listener, void *data)
|
|||||||
|
|
||||||
/* Set initial monitor, tags, floating status, and focus */
|
/* Set initial monitor, tags, floating status, and focus */
|
||||||
applyrules(c);
|
applyrules(c);
|
||||||
|
|
||||||
|
arrange(c->mon);
|
||||||
|
if (VISIBLEON(c, c->mon))
|
||||||
|
focusclient(c, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -2454,6 +2461,9 @@ createnotifyx11(struct wl_listener *listener, void *data)
|
|||||||
c->bw = borderpx;
|
c->bw = borderpx;
|
||||||
c->isfullscreen = 0;
|
c->isfullscreen = 0;
|
||||||
|
|
||||||
|
/* set monitor, then it will be overwritten by applyrules */
|
||||||
|
setmon(c,selmon, 0);
|
||||||
|
|
||||||
/* Listen to the various events it can emit */
|
/* Listen to the various events it can emit */
|
||||||
LISTEN(&xwayland_surface->events.map, &c->map, mapnotify);
|
LISTEN(&xwayland_surface->events.map, &c->map, mapnotify);
|
||||||
LISTEN(&xwayland_surface->events.unmap, &c->unmap, unmapnotify);
|
LISTEN(&xwayland_surface->events.unmap, &c->unmap, unmapnotify);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user