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

@@ -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);
}