diff --git a/glfw/wl_window.c b/glfw/wl_window.c index 76488f8b8..e07725845 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -1553,6 +1553,11 @@ void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height) void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height) { + if (is_layer_shell(window)) { + _glfwInputError(GLFW_FEATURE_UNAVAILABLE, + "Wayland: Resizing of layer shell surfaces is not supported"); + return; + } if (width != window->wl.width || height != window->wl.height) { window->wl.user_requested_content_size.width = width; window->wl.user_requested_content_size.height = height; diff --git a/kitty/main.py b/kitty/main.py index 88f5237d4..99c0b7083 100644 --- a/kitty/main.py +++ b/kitty/main.py @@ -211,7 +211,16 @@ def set_cocoa_global_shortcuts(opts: Options) -> dict[str, SingleKey]: return global_shortcuts +_is_panel_kitten = False + + +def is_panel_kitten() -> bool: + return _is_panel_kitten + + def _run_app(opts: Options, args: CLIOptions, bad_lines: Sequence[BadLine] = (), talk_fd: int = -1) -> None: + global _is_panel_kitten + _is_panel_kitten = run_app.cached_values_name == 'panel' if is_macos: global_shortcuts = set_cocoa_global_shortcuts(opts) if opts.macos_custom_beam_cursor: diff --git a/kitty/rc/resize_os_window.py b/kitty/rc/resize_os_window.py index aab80c4f6..ca2024416 100644 --- a/kitty/rc/resize_os_window.py +++ b/kitty/rc/resize_os_window.py @@ -3,7 +3,18 @@ from typing import TYPE_CHECKING -from .base import MATCH_WINDOW_OPTION, ArgsType, Boss, PayloadGetType, PayloadType, RCOptions, RemoteCommand, ResponseType, Window +from .base import ( + MATCH_WINDOW_OPTION, + ArgsType, + Boss, + PayloadGetType, + PayloadType, + RCOptions, + RemoteCommand, + RemoteControlErrorWithoutTraceback, + ResponseType, + Window, +) if TYPE_CHECKING: from kitty.cli_stub import ResizeOSWindowRCOptions as CLIOptions @@ -77,6 +88,9 @@ using this option means that you will not be notified of failures. } def response_from_kitty(self, boss: Boss, window: Window | None, payload_get: PayloadGetType) -> ResponseType: + from kitty.main import is_panel_kitten + if is_panel_kitten(): + raise RemoteControlErrorWithoutTraceback('Resizing of panels created by the panel kitten is not supported') windows = self.windows_for_match_payload(boss, window, payload_get) if windows: ac = payload_get('action')