wayland: regression: properly instantiate CSDs when there’s no decoration manager

* Set win->configure.csd_mode, not win->csd_mode. Otherwise our
  ‘configure’ handler will swap out the CSD_YES we set, for
  CSD_UNKNOWN(?), resulting in no CSDs at all.

* Don’t instantiate the CSDs in wayl_win_init(), let the ‘configure’
  event handler do that. Just like it does when we have a decoration
  manager emitting decoration configure events.
This commit is contained in:
Daniel Eklöf 2021-06-24 23:02:40 +02:00
parent 07128ee905
commit 20c0650dfd
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -1384,8 +1384,7 @@ wayl_win_init(struct terminal *term)
win->xdg_toplevel_decoration, &xdg_toplevel_decoration_listener, win);
} else {
/* No decoration manager - thus we *must* draw our own decorations */
win->csd_mode = CSD_YES;
csd_instantiate(win);
win->configure.csd_mode = CSD_YES;
LOG_WARN("no decoration manager available - using CSDs unconditionally");
}