mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-10-27 10:14:14 +00:00
Set unmanaged monitor and remove damageallmons
This commit is contained in:
parent
dd3f342530
commit
6144aa39cc
20
dwl.c
20
dwl.c
@ -383,7 +383,6 @@ static void activatex11(struct wl_listener *listener, void *data);
|
||||
static void configurex11(struct wl_listener *listener, void *data);
|
||||
static void createnotifyx11(struct wl_listener *listener, void *data);
|
||||
void commitnotifyx11(struct wl_listener *listener, void *data);
|
||||
static void damageallmons();
|
||||
static Atom getatom(xcb_connection_t *xc, const char *name);
|
||||
static void mapnotify_unmanaged(struct wl_listener *listener, void *data);
|
||||
static void renderindependents(struct wlr_output *output, struct timespec *now);
|
||||
@ -2622,20 +2621,7 @@ commitnotifyx11(struct wl_listener *listener, void *data)
|
||||
Client *c = wl_container_of(listener, c, commit);
|
||||
|
||||
// Damage the whole screen
|
||||
if (c->type == X11Managed)
|
||||
wlr_output_damage_add_whole(c->mon->damage);
|
||||
else
|
||||
damageallmons();
|
||||
}
|
||||
|
||||
void
|
||||
damageallmons()
|
||||
{
|
||||
Monitor *m;
|
||||
|
||||
wl_list_for_each(m, &mons, link)
|
||||
if (m && m->wlr_output && m->damage)
|
||||
wlr_output_damage_add_whole(m->damage);
|
||||
wlr_output_damage_add_whole(c->mon->damage);
|
||||
}
|
||||
|
||||
Atom
|
||||
@ -2656,8 +2642,10 @@ mapnotify_unmanaged(struct wl_listener *listener, void *data)
|
||||
{
|
||||
Client *c = wl_container_of(listener, c, map);
|
||||
wl_list_insert(&independents, &c->link);
|
||||
client_get_geometry(c, &c->geom);
|
||||
c->mon = xytomon(c->geom.x, c->geom.y);
|
||||
LISTEN(&c->surface.xwayland->surface->events.commit, &c->commit, commitnotifyx11);
|
||||
damageallmons();
|
||||
wlr_output_damage_add_whole(c->mon->damage);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user