wayland: Drop support for kwin specific decoration management

KWin has supported the shared and formalised zxdg_decoration since
Plasma 5.16 which came out mid 2019.

Whilst it made sense to support them both for a while, it should not be
needed for future SDL releases.
This commit is contained in:
David Edmundson
2021-04-07 16:16:23 +01:00
committed by Sam Lantinga
parent a92cca1ab8
commit f6a09ef1a9
5 changed files with 0 additions and 114 deletions

View File

@@ -49,7 +49,6 @@
#include "xdg-shell-client-protocol.h"
#include "xdg-shell-unstable-v6-client-protocol.h"
#include "xdg-decoration-unstable-v1-client-protocol.h"
#include "org-kde-kwin-server-decoration-manager-client-protocol.h"
#include "keyboard-shortcuts-inhibit-unstable-v1-client-protocol.h"
#include "idle-inhibit-unstable-v1-client-protocol.h"
@@ -427,8 +426,6 @@ display_handle_global(void *data, struct wl_registry *registry, uint32_t id,
d->data_device_manager = wl_registry_bind(d->registry, id, &wl_data_device_manager_interface, SDL_min(3, version));
} else if (strcmp(interface, "zxdg_decoration_manager_v1") == 0) {
d->decoration_manager = wl_registry_bind(d->registry, id, &zxdg_decoration_manager_v1_interface, 1);
} else if (strcmp(interface, "org_kde_kwin_server_decoration_manager") == 0) {
d->kwin_server_decoration_manager = wl_registry_bind(d->registry, id, &org_kde_kwin_server_decoration_manager_interface, 1);
#ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH
} else if (strcmp(interface, "qt_touch_extension") == 0) {

View File

@@ -68,7 +68,6 @@ typedef struct {
struct zwp_pointer_constraints_v1 *pointer_constraints;
struct wl_data_device_manager *data_device_manager;
struct zxdg_decoration_manager_v1 *decoration_manager;
struct org_kde_kwin_server_decoration_manager *kwin_server_decoration_manager;
struct zwp_keyboard_shortcuts_inhibit_manager_v1 *key_inhibitor_manager;
struct zwp_idle_inhibit_manager_v1 *idle_inhibit_manager;

View File

@@ -36,7 +36,6 @@
#include "xdg-shell-client-protocol.h"
#include "xdg-shell-unstable-v6-client-protocol.h"
#include "xdg-decoration-unstable-v1-client-protocol.h"
#include "org-kde-kwin-server-decoration-manager-client-protocol.h"
#include "idle-inhibit-unstable-v1-client-protocol.h"
static float get_window_scale_factor(SDL_Window *window) {
@@ -673,9 +672,6 @@ Wayland_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
if ((viddata->decoration_manager) && (wind->server_decoration)) {
const enum zxdg_toplevel_decoration_v1_mode mode = bordered ? ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE : ZXDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE;
zxdg_toplevel_decoration_v1_set_mode(wind->server_decoration, mode);
} else if ((viddata->kwin_server_decoration_manager) && (wind->kwin_server_decoration)) {
const enum org_kde_kwin_server_decoration_manager_mode mode = bordered ? ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_SERVER : ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_NONE;
org_kde_kwin_server_decoration_request_mode(wind->kwin_server_decoration, mode);
}
}
@@ -866,13 +862,6 @@ int Wayland_CreateWindow(_THIS, SDL_Window *window)
const enum zxdg_toplevel_decoration_v1_mode mode = bordered ? ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE : ZXDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE;
zxdg_toplevel_decoration_v1_set_mode(data->server_decoration, mode);
}
} else if (c->kwin_server_decoration_manager) {
data->kwin_server_decoration = org_kde_kwin_server_decoration_manager_create(c->kwin_server_decoration_manager, data->surface);
if (data->kwin_server_decoration) {
const SDL_bool bordered = (window->flags & SDL_WINDOW_BORDERLESS) == 0;
const enum org_kde_kwin_server_decoration_manager_mode mode = bordered ? ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_SERVER : ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_NONE;
org_kde_kwin_server_decoration_request_mode(data->kwin_server_decoration, mode);
}
}
region = wl_compositor_create_region(c->compositor);
@@ -1054,10 +1043,6 @@ void Wayland_DestroyWindow(_THIS, SDL_Window *window)
zxdg_toplevel_decoration_v1_destroy(wind->server_decoration);
}
if (wind->kwin_server_decoration) {
org_kde_kwin_server_decoration_release(wind->kwin_server_decoration);
}
if (wind->idle_inhibitor) {
zwp_idle_inhibitor_v1_destroy(wind->idle_inhibitor);
}

View File

@@ -64,7 +64,6 @@ typedef struct {
EGLSurface egl_surface;
struct zwp_locked_pointer_v1 *locked_pointer;
struct zxdg_toplevel_decoration_v1 *server_decoration;
struct org_kde_kwin_server_decoration *kwin_server_decoration;
struct zwp_keyboard_shortcuts_inhibitor_v1 *key_inhibitor;
struct zwp_idle_inhibitor_v1 *idle_inhibitor;