mirror of
https://github.com/swaywm/sway.git
synced 2026-04-26 06:46:26 -04:00
Issue #5066: Fix saved_border initialization in view_map
In view_map, the function view_update_csd_from_client is called conditionally before the container's border types are initialized from the configuration. This results in view_border being initialized inside view_update_csd_from_client from garbage values. This results in applications that take this path not having their borders restored when set to floating and then back to tiled. Moved this conditional call just after the next block that initializes the containers borders.
This commit is contained in:
parent
7ca9ef12f8
commit
a44c82cb1c
1 changed files with 4 additions and 4 deletions
|
|
@ -743,10 +743,6 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface,
|
||||||
&view->surface_new_subsurface);
|
&view->surface_new_subsurface);
|
||||||
view->surface_new_subsurface.notify = view_handle_surface_new_subsurface;
|
view->surface_new_subsurface.notify = view_handle_surface_new_subsurface;
|
||||||
|
|
||||||
if (decoration) {
|
|
||||||
view_update_csd_from_client(view, decoration);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (view->impl->wants_floating && view->impl->wants_floating(view)) {
|
if (view->impl->wants_floating && view->impl->wants_floating(view)) {
|
||||||
view->container->border = config->floating_border;
|
view->container->border = config->floating_border;
|
||||||
view->container->border_thickness = config->floating_border_thickness;
|
view->container->border_thickness = config->floating_border_thickness;
|
||||||
|
|
@ -757,6 +753,10 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface,
|
||||||
view_set_tiled(view, true);
|
view_set_tiled(view, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (decoration) {
|
||||||
|
view_update_csd_from_client(view, decoration);
|
||||||
|
}
|
||||||
|
|
||||||
if (config->popup_during_fullscreen == POPUP_LEAVE &&
|
if (config->popup_during_fullscreen == POPUP_LEAVE &&
|
||||||
view->container->workspace &&
|
view->container->workspace &&
|
||||||
view->container->workspace->fullscreen &&
|
view->container->workspace->fullscreen &&
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue