mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-22 00:08:04 +02:00
Assume all capabilities on compositors that dont support reporting of capabilities
This commit is contained in:
5
glfw/wl_init.c
vendored
5
glfw/wl_init.c
vendored
@@ -675,10 +675,11 @@ static void registryHandleGlobal(void* data UNUSED,
|
|||||||
}
|
}
|
||||||
else if (is(xdg_wm_base))
|
else if (is(xdg_wm_base))
|
||||||
{
|
{
|
||||||
|
_glfw.wl.xdg_wm_base_version = 1;
|
||||||
#ifdef XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION
|
#ifdef XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION
|
||||||
version = min(XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION, version);
|
_glfw.wl.xdg_wm_base_version = min(XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION, version);
|
||||||
#endif
|
#endif
|
||||||
_glfw.wl.wmBase = wl_registry_bind(registry, name, &xdg_wm_base_interface, version);
|
_glfw.wl.wmBase = wl_registry_bind(registry, name, &xdg_wm_base_interface, _glfw.wl.xdg_wm_base_version);
|
||||||
xdg_wm_base_add_listener(_glfw.wl.wmBase, &wmBaseListener, NULL);
|
xdg_wm_base_add_listener(_glfw.wl.wmBase, &wmBaseListener, NULL);
|
||||||
}
|
}
|
||||||
else if (is(zxdg_decoration_manager_v1))
|
else if (is(zxdg_decoration_manager_v1))
|
||||||
|
|||||||
1
glfw/wl_platform.h
vendored
1
glfw/wl_platform.h
vendored
@@ -307,6 +307,7 @@ typedef struct _GLFWlibraryWayland
|
|||||||
struct wl_data_device_manager* dataDeviceManager;
|
struct wl_data_device_manager* dataDeviceManager;
|
||||||
struct wl_data_device* dataDevice;
|
struct wl_data_device* dataDevice;
|
||||||
struct xdg_wm_base* wmBase;
|
struct xdg_wm_base* wmBase;
|
||||||
|
int xdg_wm_base_version;
|
||||||
struct zxdg_decoration_manager_v1* decorationManager;
|
struct zxdg_decoration_manager_v1* decorationManager;
|
||||||
struct zwp_relative_pointer_manager_v1* relativePointerManager;
|
struct zwp_relative_pointer_manager_v1* relativePointerManager;
|
||||||
struct zwp_pointer_constraints_v1* pointerConstraints;
|
struct zwp_pointer_constraints_v1* pointerConstraints;
|
||||||
|
|||||||
8
glfw/wl_window.c
vendored
8
glfw/wl_window.c
vendored
@@ -1068,9 +1068,11 @@ create_window_desktop_surface(_GLFWwindow* window)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
xdg_toplevel_add_listener(window->wl.xdg.toplevel,
|
#ifdef XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION
|
||||||
&xdgToplevelListener,
|
if (_glfw.wl.xdg_wm_base_version < XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION)
|
||||||
window);
|
memset(&window->wl.wm_capabilities, 0xff, sizeof(window->wl.wm_capabilities));
|
||||||
|
#endif
|
||||||
|
xdg_toplevel_add_listener(window->wl.xdg.toplevel, &xdgToplevelListener, window);
|
||||||
if (_glfw.wl.decorationManager) {
|
if (_glfw.wl.decorationManager) {
|
||||||
window->wl.xdg.decoration = zxdg_decoration_manager_v1_get_toplevel_decoration(
|
window->wl.xdg.decoration = zxdg_decoration_manager_v1_get_toplevel_decoration(
|
||||||
_glfw.wl.decorationManager, window->wl.xdg.toplevel);
|
_glfw.wl.decorationManager, window->wl.xdg.toplevel);
|
||||||
|
|||||||
Reference in New Issue
Block a user