mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-10-28 18:44:17 +00:00
Add XWayland damage tracking
This commit is contained in:
parent
2af3b1d588
commit
7996bfa7cc
17
dwl.c
17
dwl.c
@ -378,6 +378,7 @@ static struct wl_listener request_set_sel = {.notify = setsel};
|
|||||||
static void activatex11(struct wl_listener *listener, void *data);
|
static void activatex11(struct wl_listener *listener, void *data);
|
||||||
static void configurex11(struct wl_listener *listener, void *data);
|
static void configurex11(struct wl_listener *listener, void *data);
|
||||||
static void createnotifyx11(struct wl_listener *listener, void *data);
|
static void createnotifyx11(struct wl_listener *listener, void *data);
|
||||||
|
void commitnotifyx11(struct wl_listener *listener, void *data);
|
||||||
static Atom getatom(xcb_connection_t *xc, const char *name);
|
static Atom getatom(xcb_connection_t *xc, const char *name);
|
||||||
static void renderindependents(struct wlr_output *output, struct timespec *now);
|
static void renderindependents(struct wlr_output *output, struct timespec *now);
|
||||||
static void xwaylandready(struct wl_listener *listener, void *data);
|
static void xwaylandready(struct wl_listener *listener, void *data);
|
||||||
@ -1411,6 +1412,12 @@ mapnotify(struct wl_listener *listener, void *data)
|
|||||||
// Damage the whole screen
|
// Damage the whole screen
|
||||||
wlr_output_damage_add_whole(c->mon->damage);
|
wlr_output_damage_add_whole(c->mon->damage);
|
||||||
|
|
||||||
|
#ifdef XWAYLAND
|
||||||
|
if (c->type != XDGShell)
|
||||||
|
if (c->surface.xwayland->surface)
|
||||||
|
LISTEN(&c->surface.xwayland->surface->events.commit, &c->commit, commitnotifyx11);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (c->mon->fullscreenclient && c->mon->fullscreenclient == oldfocus
|
if (c->mon->fullscreenclient && c->mon->fullscreenclient == oldfocus
|
||||||
&& !c->isfloating && c->mon->lt[c->mon->sellt]->arrange) {
|
&& !c->isfloating && c->mon->lt[c->mon->sellt]->arrange) {
|
||||||
maximizeclient(c->mon->fullscreenclient);
|
maximizeclient(c->mon->fullscreenclient);
|
||||||
@ -2560,6 +2567,16 @@ createnotifyx11(struct wl_listener *listener, void *data)
|
|||||||
fullscreennotify);
|
fullscreennotify);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
commitnotifyx11(struct wl_listener *listener, void *data)
|
||||||
|
{
|
||||||
|
Client *c = wl_container_of(listener, c, commit);
|
||||||
|
|
||||||
|
// Damage the whole screen
|
||||||
|
if (c->mon)
|
||||||
|
wlr_output_damage_add_whole(c->mon->damage);
|
||||||
|
}
|
||||||
|
|
||||||
Atom
|
Atom
|
||||||
getatom(xcb_connection_t *xc, const char *name)
|
getatom(xcb_connection_t *xc, const char *name)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user