~ruther/dwl

43228bd493f53f996a645156f0505b63e79a4f72 — Leonardo Hernández Hernández 3 years ago 03e167d
don't use fullscreen event in fullscreennotify()
2 files changed, 14 insertions(+), 3 deletions(-)

M client.h
M dwl.c
M client.h => client.h +10 -0
@@ 96,6 96,16 @@ client_is_float_type(Client *c)
}

static inline int
client_wants_fullscreen(Client *c)
{
#ifdef XWAYLAND
	if (client_is_x11(c))
		return c->surface.xwayland->fullscreen;
#endif
	return c->surface.xdg->toplevel->requested.fullscreen;
}

static inline int
client_is_unmanaged(Client *c)
{
#ifdef XWAYLAND

M dwl.c => dwl.c +4 -3
@@ 1042,13 1042,14 @@ void
fullscreennotify(struct wl_listener *listener, void *data)
{
	Client *c = wl_container_of(listener, c, fullscreen);
	struct wlr_xdg_toplevel_set_fullscreen_event *event = data;
	int fullscreen = client_wants_fullscreen(c);

	if (!c->mon) {
		/* if the client is not mapped yet, let mapnotify() call setfullscreen() */
		c->isfullscreen = event->fullscreen;
		c->isfullscreen = fullscreen;
		return;
	}
	setfullscreen(c, event->fullscreen);
	setfullscreen(c, fullscreen);
}

Monitor *

Do not follow this link