mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 18:51:41 +02:00
Resize OS panels on font size change
This commit is contained in:
@@ -1929,9 +1929,10 @@ bool
|
||||
_glfwPlatformSetLayerShellConfig(_GLFWwindow* window, const GLFWLayerShellConfig *value) {
|
||||
#define config window->ns.layer_shell.config
|
||||
window->resizable = false;
|
||||
if (value) config = *value;
|
||||
const bool is_transparent = ![window->ns.object isOpaque];
|
||||
int background_blur = value->related.background_blur;
|
||||
if (!is_transparent || value->related.background_opacity >= 1.f) { background_blur = 0; }
|
||||
int background_blur = config.related.background_blur;
|
||||
if (!is_transparent || config.related.background_opacity >= 1.f) { background_blur = 0; }
|
||||
[window->ns.object setBackgroundColor:nil];
|
||||
_glfwPlatformSetWindowBlur(window, background_blur);
|
||||
window->ns.titlebar_hidden = true;
|
||||
@@ -1940,7 +1941,7 @@ _glfwPlatformSetLayerShellConfig(_GLFWwindow* window, const GLFWLayerShellConfig
|
||||
[window->ns.object setHasShadow:false];
|
||||
[window->ns.object setTitleVisibility:NSWindowTitleHidden];
|
||||
NSColorSpace *cs = nil;
|
||||
switch (value->related.color_space) {
|
||||
switch (config.related.color_space) {
|
||||
case SRGB_COLORSPACE: cs = [NSColorSpace sRGBColorSpace]; break;
|
||||
case DISPLAY_P3_COLORSPACE: cs = [NSColorSpace displayP3ColorSpace]; break;
|
||||
case DEFAULT_COLORSPACE: cs = nil; break; // using deviceRGBColorSpace causes a hang when transitioning to fullscreen
|
||||
|
||||
5
glfw/wl_window.c
vendored
5
glfw/wl_window.c
vendored
@@ -1741,9 +1741,10 @@ void _glfwPlatformHideWindow(_GLFWwindow* window)
|
||||
debug("Window %llu unmapped\n", window->id);
|
||||
}
|
||||
|
||||
bool _glfwPlatformSetLayerShellConfig(_GLFWwindow* window, const GLFWLayerShellConfig *value) {
|
||||
bool
|
||||
_glfwPlatformSetLayerShellConfig(_GLFWwindow* window, const GLFWLayerShellConfig *value) {
|
||||
if (!is_layer_shell(window)) return false;
|
||||
window->wl.layer_shell.config = *value;
|
||||
if (value) window->wl.layer_shell.config = *value;
|
||||
layer_set_properties(window);
|
||||
commit_window_surface(window);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user