Replace xdg-decoration (needs xdg_toplevel, GTK3 doesn't expose it) with org_kde_kwin_server_decoration (works with wl_surface which GDK provides). On KDE Wayland: binds the manager from the registry, creates a per-surface decoration object, requests mode=None (0). Falls back gracefully on GNOME (protocol not present, GTK's set_decorated(FALSE) already works). X11 fallback via gdk_window_set_decorations(0) unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
61 lines
1.8 KiB
C
61 lines
1.8 KiB
C
/* Generated by wayland-scanner 1.24.0 */
|
|
|
|
/*
|
|
* SPDX-FileCopyrightText: 2015 Martin Gräßlin
|
|
* SPDX-License-Identifier: LGPL-2.1-or-later
|
|
*/
|
|
|
|
#include <stdbool.h>
|
|
#include <stdlib.h>
|
|
#include <stdint.h>
|
|
#include "wayland-util.h"
|
|
|
|
#ifndef __has_attribute
|
|
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
|
|
#endif
|
|
|
|
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
|
|
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
|
|
#else
|
|
#define WL_PRIVATE
|
|
#endif
|
|
|
|
extern const struct wl_interface org_kde_kwin_server_decoration_interface;
|
|
extern const struct wl_interface wl_surface_interface;
|
|
|
|
static const struct wl_interface *server_decoration_types[] = {
|
|
NULL,
|
|
&org_kde_kwin_server_decoration_interface,
|
|
&wl_surface_interface,
|
|
};
|
|
|
|
static const struct wl_message org_kde_kwin_server_decoration_manager_requests[] = {
|
|
{ "create", "no", server_decoration_types + 1 },
|
|
};
|
|
|
|
static const struct wl_message org_kde_kwin_server_decoration_manager_events[] = {
|
|
{ "default_mode", "u", server_decoration_types + 0 },
|
|
};
|
|
|
|
WL_PRIVATE const struct wl_interface org_kde_kwin_server_decoration_manager_interface = {
|
|
"org_kde_kwin_server_decoration_manager", 1,
|
|
1, org_kde_kwin_server_decoration_manager_requests,
|
|
1, org_kde_kwin_server_decoration_manager_events,
|
|
};
|
|
|
|
static const struct wl_message org_kde_kwin_server_decoration_requests[] = {
|
|
{ "release", "", server_decoration_types + 0 },
|
|
{ "request_mode", "u", server_decoration_types + 0 },
|
|
};
|
|
|
|
static const struct wl_message org_kde_kwin_server_decoration_events[] = {
|
|
{ "mode", "u", server_decoration_types + 0 },
|
|
};
|
|
|
|
WL_PRIVATE const struct wl_interface org_kde_kwin_server_decoration_interface = {
|
|
"org_kde_kwin_server_decoration", 1,
|
|
2, org_kde_kwin_server_decoration_requests,
|
|
1, org_kde_kwin_server_decoration_events,
|
|
};
|
|
|