@@ -424,7 +424,7 @@ apply_scale_changes(_GLFWwindow *window, bool resize_framebuffer, bool update_cs
424424 double scale = _glfwWaylandWindowScale (window );
425425 if (resize_framebuffer ) resizeFramebuffer (window );
426426 _glfwInputWindowContentScale (window , (float )scale , (float )scale );
427- if (update_csd ) csd_set_visible (window , true ); // resize the csd iff the window currently has CSD
427+ if (update_csd ) csd_set_visible (window , csd_should_window_be_decorated ( window ) ); // resize the csd iff the window currently has CSD
428428 int buffer_scale = window -> wl .fractional_scale ? 1 : (int )scale ;
429429 wl_surface_set_buffer_scale (window -> wl .surface , buffer_scale );
430430}
@@ -824,7 +824,7 @@ apply_xdg_configure_changes(_GLFWwindow *window) {
824824 int width = window -> wl .pending .width , height = window -> wl .pending .height ;
825825 csd_set_window_geometry (window , & width , & height );
826826 bool resized = dispatchChangesAfterConfigure (window , width , height );
827- csd_set_visible (window , ! (window -> wl . decorations . serverSide || window -> monitor || window -> wl . current . toplevel_states & TOPLEVEL_STATE_FULLSCREEN ));
827+ csd_set_visible (window , csd_should_window_be_decorated (window ));
828828 debug ("Final window %llu content size: %dx%d resized: %d\n" , window -> id , width , height , resized );
829829 }
830830
@@ -967,7 +967,7 @@ setXdgDecorations(_GLFWwindow* window)
967967 zxdg_toplevel_decoration_v1_set_mode (window -> wl .xdg .decoration , window -> decorated ? ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE : ZXDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE );
968968 } else {
969969 window -> wl .decorations .serverSide = false;
970- csd_set_visible (window , window -> decorated );
970+ csd_set_visible (window , csd_should_window_be_decorated ( window ) );
971971 }
972972}
973973
@@ -1632,7 +1632,7 @@ void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
16321632 csd_set_window_geometry (window , & w , & h );
16331633 window -> wl .width = w ; window -> wl .height = h ;
16341634 resizeFramebuffer (window );
1635- csd_set_visible (window , true ); // resizes the csd iff the window currently has csd
1635+ csd_set_visible (window , csd_should_window_be_decorated ( window ) ); // resizes the csd iff the window currently has csd
16361636 commit_window_surface_if_safe (window );
16371637 inform_compositor_of_window_geometry (window , "SetWindowSize" );
16381638 }
0 commit comments