Commit 3189fc45 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Use ssd mode enums generated by qtwaylandscanner

parent f58aa34f
...@@ -35,24 +35,19 @@ protected: ...@@ -35,24 +35,19 @@ protected:
const quint32 ServerSideDecorationManagerInterfacePrivate::s_version = 1; const quint32 ServerSideDecorationManagerInterfacePrivate::s_version = 1;
namespace {
static uint32_t modeWayland(ServerSideDecorationManagerInterface::Mode mode) static uint32_t modeWayland(ServerSideDecorationManagerInterface::Mode mode)
{ {
switch (mode) { switch (mode) {
case ServerSideDecorationManagerInterface::Mode::None: case ServerSideDecorationManagerInterface::Mode::None:
return ORG_KDE_KWIN_SERVER_DECORATION_MODE_NONE; return ServerSideDecorationManagerInterfacePrivate::mode_None;
break;
case ServerSideDecorationManagerInterface::Mode::Client: case ServerSideDecorationManagerInterface::Mode::Client:
return ORG_KDE_KWIN_SERVER_DECORATION_MODE_CLIENT; return ServerSideDecorationManagerInterfacePrivate::mode_Client;
break;
case ServerSideDecorationManagerInterface::Mode::Server: case ServerSideDecorationManagerInterface::Mode::Server:
return ORG_KDE_KWIN_SERVER_DECORATION_MODE_SERVER; return ServerSideDecorationManagerInterfacePrivate::mode_Server;
break;
default: default:
Q_UNREACHABLE(); Q_UNREACHABLE();
} }
} }
}
void ServerSideDecorationManagerInterfacePrivate::org_kde_kwin_server_decoration_manager_create(Resource *resource, uint32_t id, wl_resource *surface) void ServerSideDecorationManagerInterfacePrivate::org_kde_kwin_server_decoration_manager_create(Resource *resource, uint32_t id, wl_resource *surface)
{ {
...@@ -137,19 +132,18 @@ protected: ...@@ -137,19 +132,18 @@ protected:
QVector<ServerSideDecorationInterfacePrivate*> ServerSideDecorationInterfacePrivate::s_all; QVector<ServerSideDecorationInterfacePrivate*> ServerSideDecorationInterfacePrivate::s_all;
void ServerSideDecorationInterfacePrivate::org_kde_kwin_server_decoration_request_mode(Resource *resource, uint32_t mode) void ServerSideDecorationInterfacePrivate::org_kde_kwin_server_decoration_request_mode(Resource *resource, uint32_t mode)
{ {
Q_UNUSED(resource) Q_UNUSED(resource)
ServerSideDecorationManagerInterface::Mode m = ServerSideDecorationManagerInterface::Mode::None; ServerSideDecorationManagerInterface::Mode m = ServerSideDecorationManagerInterface::Mode::None;
switch (mode) { switch (mode) {
case ORG_KDE_KWIN_SERVER_DECORATION_MODE_NONE: case ServerSideDecorationManagerInterfacePrivate::mode_None:
m = ServerSideDecorationManagerInterface::Mode::None; m = ServerSideDecorationManagerInterface::Mode::None;
break; break;
case ORG_KDE_KWIN_SERVER_DECORATION_MODE_CLIENT: case ServerSideDecorationManagerInterfacePrivate::mode_Client:
m = ServerSideDecorationManagerInterface::Mode::Client; m = ServerSideDecorationManagerInterface::Mode::Client;
break; break;
case ORG_KDE_KWIN_SERVER_DECORATION_MODE_SERVER: case ServerSideDecorationManagerInterfacePrivate::mode_Server:
m = ServerSideDecorationManagerInterface::Mode::Server; m = ServerSideDecorationManagerInterface::Mode::Server;
break; break;
default: default:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment