~ruther/dwl

8ec5e52e061cfefab0bfed354a8b98ea2f4fb775 — Leonardo Hernández Hernández 1 year, 1 month ago c5275ca
fix crash when a client is created while all outputs are disabled
2 files changed, 7 insertions(+), 2 deletions(-)

M CHANGELOG.md
M dwl.c
M CHANGELOG.md => CHANGELOG.md +3 -0
@@ 21,6 21,9 @@
### Deprecated
### Removed
### Fixed

* Crash when a client is created while all outputs are disabled.

### Security
### Contributors


M dwl.c => dwl.c +4 -2
@@ 800,8 800,10 @@ commitnotify(struct wl_listener *listener, void *data)
		 * a wrong monitor.
		 */
		applyrules(c);
		wlr_surface_set_preferred_buffer_scale(client_surface(c), (int)ceilf(c->mon->wlr_output->scale));
		wlr_fractional_scale_v1_notify_scale(client_surface(c), c->mon->wlr_output->scale);
		if (c->mon) {
			wlr_surface_set_preferred_buffer_scale(client_surface(c), (int)ceilf(c->mon->wlr_output->scale));
			wlr_fractional_scale_v1_notify_scale(client_surface(c), c->mon->wlr_output->scale);
		}
		setmon(c, NULL, 0); /* Make sure to reapply rules in mapnotify() */

		wlr_xdg_toplevel_set_wm_capabilities(c->surface.xdg->toplevel, WLR_XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN);