forked from mirror/dwl
fix crash when a client is created while all outputs are disabled
This commit is contained in:
parent
c5275ca571
commit
8ec5e52e06
2 changed files with 7 additions and 2 deletions
|
@ -21,6 +21,9 @@
|
||||||
### Deprecated
|
### Deprecated
|
||||||
### Removed
|
### Removed
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
* Crash when a client is created while all outputs are disabled.
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
### Contributors
|
### Contributors
|
||||||
|
|
||||||
|
|
2
dwl.c
2
dwl.c
|
@ -800,8 +800,10 @@ commitnotify(struct wl_listener *listener, void *data)
|
||||||
* a wrong monitor.
|
* a wrong monitor.
|
||||||
*/
|
*/
|
||||||
applyrules(c);
|
applyrules(c);
|
||||||
|
if (c->mon) {
|
||||||
wlr_surface_set_preferred_buffer_scale(client_surface(c), (int)ceilf(c->mon->wlr_output->scale));
|
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);
|
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() */
|
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);
|
wlr_xdg_toplevel_set_wm_capabilities(c->surface.xdg->toplevel, WLR_XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN);
|
||||||
|
|
Loading…
Reference in a new issue