Merge remote-tracking branch 'origin/5.12' into dev

Change-Id: I40724946222f7e51b3cf36a2ce1cd60d7801f41a
This commit is contained in:
Qt Forward Merge Bot 2018-09-11 03:01:14 +02:00
commit f2d2a4c3c2
17 changed files with 1889 additions and 36 deletions

View File

@ -74,7 +74,7 @@ Copyright (c) 2013 BMW Car IT GmbH"
"Name": "Wayland XDG Shell Protocol",
"QDocModule": "qtwaylandcompositor",
"QtUsage": "Used in the Qt Wayland Compositor, and the Qt Wayland platform plugin.",
"Files": "xdg-shell-unstable-v5.xml xdg-shell-unstable-v6.xml xdg-shell.xml ../../compositor/extensions/pregenerated/3rdparty/qwayland-server-xdg-shell-unstable-v5.cpp ../../compositor/extensions/pregenerated/3rdparty/qwayland-server-xdg-shell-unstable-v5_p.h ../../compositor/extensions/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-protocol.c ../../compositor/extensions/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-server-protocol_p.h",
"Files": " xdg-shell-unstable-v5.xml xdg-shell-unstable-v6.xml xdg-shell.xml ../../compositor/extensions/pregenerated/3rdparty/qwayland-server-xdg-shell-unstable-v5.cpp ../../compositor/extensions/pregenerated/3rdparty/qwayland-server-xdg-shell-unstable-v5_p.h ../../compositor/extensions/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-protocol.c ../../compositor/extensions/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-server-protocol_p.h ../../plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5.cpp ../../plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/qwayland-xdg-shell-unstable-v5_p.h ../../plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-client-protocol_p.h ../../plugins/shellintegration/xdg-shell-v5/pregenerated/3rdparty/wayland-xdg-shell-unstable-v5-protocol.c",
"Description": "The XDG-Shell protocol is an extended way to manage surfaces under Wayland compositors.",
"Homepage": "https://wayland.freedesktop.org",

View File

@ -101,15 +101,20 @@
"condition": "features.wayland-client && features.opengl && !features.opengles2 && features.xlib && libs.xcomposite && libs.glx",
"output": [ "privateFeature" ]
},
"drm-egl-server": {
"wayland-drm-egl-server-buffer": {
"label": "DRM EGL",
"condition": "features.wayland-client && features.opengl && features.egl && tests.drm-egl-server",
"output": [ "privateFeature" ]
},
"libhybris-egl-server": {
"wayland-libhybris-egl-server-buffer": {
"label": "libhybris EGL",
"condition": "features.wayland-client && features.opengl && features.egl && tests.libhybris-egl-server",
"output": [ "privateFeature" ]
},
"wayland-shm-emulation-server-buffer": {
"label": "Shm emulation server buffer integration",
"condition": "features.wayland-client && features.opengl",
"output": [ "privateFeature" ]
}
},
@ -130,8 +135,9 @@
"wayland-brcm",
"xcomposite-egl",
"xcomposite-glx",
"drm-egl-server",
"libhybris-egl-server"
"wayland-drm-egl-server-buffer",
"wayland-libhybris-egl-server-buffer",
"wayland-shm-emulation-server-buffer"
]
},
"wayland-client"

View File

@ -9,10 +9,10 @@ qtConfig(xcomposite-egl): \
SUBDIRS += xcomposite-egl
qtConfig(xcomposite-glx): \
SUBDIRS += xcomposite-glx
qtConfig(drm-egl-server): \
SUBDIRS += drm-egl-server
qtConfig(libhybris-egl-server): \
SUBDIRS += libhybris-egl-server
### TODO: make shm-emulation configurable
SUBDIRS += shm-emulation-server
qtConfig(wayland-drm-egl-server-buffer): \
SUBDIRS += drm-egl-server
qtConfig(wayland-libhybris-egl-server-buffer): \
SUBDIRS += libhybris-egl-server
qtConfig(wayland-shm-emulation-server-buffer): \
SUBDIRS += shm-emulation-server

View File

@ -49,6 +49,10 @@ namespace QtWaylandClient {
bool QWaylandWlShellIntegration::initialize(QWaylandDisplay *display)
{
qCWarning(lcQpaWayland) << "\"wl-shell\" is a deprecated shell extension, prefer using"
<< "\"xdg-shell-v6\" or \"xdg-shell\" if supported by the compositor"
<< "by setting the environment variable QT_WAYLAND_SHELL_INTEGRATION";
Q_FOREACH (QWaylandDisplay::RegistryGlobal global, display->globals()) {
if (global.interface == QLatin1String("wl_shell")) {
m_wlShell = new QtWayland::wl_shell(display->wl_registry(), global.id, 1);

View File

@ -0,0 +1,398 @@
// Hand-edited to resolve conflicts with xdg-shell stable
/*
* Copyright © 2008-2013 Kristian Høgsberg
* Copyright © 2013 Rafael Antognolli
* Copyright © 2013 Jasper St. Pierre
* Copyright © 2010-2013 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#include "qwayland-xdg-shell-unstable-v5_p.h"
QT_BEGIN_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers")
namespace QtWayland {
xdg_shell_v5::xdg_shell_v5(struct ::wl_registry *registry, int id, int version)
{
init(registry, id, version);
}
xdg_shell_v5::xdg_shell_v5(struct ::xdg_shell_v5 *obj)
: m_xdg_shell(obj)
{
init_listener();
}
xdg_shell_v5::xdg_shell_v5()
: m_xdg_shell(nullptr)
{
}
xdg_shell_v5::~xdg_shell_v5()
{
}
void xdg_shell_v5::init(struct ::wl_registry *registry, int id, int version)
{
m_xdg_shell = static_cast<struct ::xdg_shell_v5 *>(wl_registry_bind(registry, id, &xdg_shell_v5_interface, version));
init_listener();
}
void xdg_shell_v5::init(struct ::xdg_shell_v5 *obj)
{
m_xdg_shell = obj;
init_listener();
}
bool xdg_shell_v5::isInitialized() const
{
return m_xdg_shell != nullptr;
}
const struct wl_interface *xdg_shell_v5::interface()
{
return &::xdg_shell_v5_interface;
}
void xdg_shell_v5::destroy()
{
xdg_shell_destroy(
m_xdg_shell);
m_xdg_shell = nullptr;
}
void xdg_shell_v5::use_unstable_version(int32_t version)
{
xdg_shell_use_unstable_version(
m_xdg_shell,
version);
}
struct ::xdg_surface_v5 *xdg_shell_v5::get_xdg_surface(struct ::wl_surface *surface)
{
return xdg_shell_get_xdg_surface(
m_xdg_shell,
surface);
}
struct ::xdg_popup_v5 *xdg_shell_v5::get_xdg_popup(struct ::wl_surface *surface, struct ::wl_surface *parent, struct ::wl_seat *seat, uint32_t serial, int32_t x, int32_t y)
{
return xdg_shell_get_xdg_popup(
m_xdg_shell,
surface,
parent,
seat,
serial,
x,
y);
}
void xdg_shell_v5::pong(uint32_t serial)
{
xdg_shell_pong(
m_xdg_shell,
serial);
}
void xdg_shell_v5::xdg_shell_ping(uint32_t )
{
}
void xdg_shell_v5::handle_ping(
void *data,
struct ::xdg_shell_v5 *object,
uint32_t serial)
{
Q_UNUSED(object);
static_cast<xdg_shell_v5 *>(data)->xdg_shell_ping(
serial);
}
const struct xdg_shell_listener xdg_shell_v5::m_xdg_shell_listener = {
xdg_shell_v5::handle_ping
};
void xdg_shell_v5::init_listener()
{
xdg_shell_add_listener(m_xdg_shell, &m_xdg_shell_listener, this);
}
xdg_surface_v5::xdg_surface_v5(struct ::wl_registry *registry, int id, int version)
{
init(registry, id, version);
}
xdg_surface_v5::xdg_surface_v5(struct ::xdg_surface_v5 *obj)
: m_xdg_surface(obj)
{
init_listener();
}
xdg_surface_v5::xdg_surface_v5()
: m_xdg_surface(nullptr)
{
}
xdg_surface_v5::~xdg_surface_v5()
{
}
void xdg_surface_v5::init(struct ::wl_registry *registry, int id, int version)
{
m_xdg_surface = static_cast<struct ::xdg_surface_v5 *>(wl_registry_bind(registry, id, &xdg_surface_v5_interface, version));
init_listener();
}
void xdg_surface_v5::init(struct ::xdg_surface_v5 *obj)
{
m_xdg_surface = obj;
init_listener();
}
bool xdg_surface_v5::isInitialized() const
{
return m_xdg_surface != nullptr;
}
const struct wl_interface *xdg_surface_v5::interface()
{
return &::xdg_surface_v5_interface;
}
void xdg_surface_v5::destroy()
{
xdg_surface_destroy(
m_xdg_surface);
m_xdg_surface = nullptr;
}
void xdg_surface_v5::set_parent(struct ::xdg_surface_v5 *parent)
{
xdg_surface_set_parent(
m_xdg_surface,
parent);
}
void xdg_surface_v5::set_title(const QString &title)
{
xdg_surface_set_title(
m_xdg_surface,
title.toUtf8().constData());
}
void xdg_surface_v5::set_app_id(const QString &app_id)
{
xdg_surface_set_app_id(
m_xdg_surface,
app_id.toUtf8().constData());
}
void xdg_surface_v5::show_window_menu(struct ::wl_seat *seat, uint32_t serial, int32_t x, int32_t y)
{
xdg_surface_show_window_menu(
m_xdg_surface,
seat,
serial,
x,
y);
}
void xdg_surface_v5::move(struct ::wl_seat *seat, uint32_t serial)
{
xdg_surface_move(
m_xdg_surface,
seat,
serial);
}
void xdg_surface_v5::resize(struct ::wl_seat *seat, uint32_t serial, uint32_t edges)
{
xdg_surface_resize(
m_xdg_surface,
seat,
serial,
edges);
}
void xdg_surface_v5::ack_configure(uint32_t serial)
{
xdg_surface_ack_configure(
m_xdg_surface,
serial);
}
void xdg_surface_v5::set_window_geometry(int32_t x, int32_t y, int32_t width, int32_t height)
{
xdg_surface_set_window_geometry(
m_xdg_surface,
x,
y,
width,
height);
}
void xdg_surface_v5::set_maximized()
{
xdg_surface_set_maximized(
m_xdg_surface);
}
void xdg_surface_v5::unset_maximized()
{
xdg_surface_unset_maximized(
m_xdg_surface);
}
void xdg_surface_v5::set_fullscreen(struct ::wl_output *output)
{
xdg_surface_set_fullscreen(
m_xdg_surface,
output);
}
void xdg_surface_v5::unset_fullscreen()
{
xdg_surface_unset_fullscreen(
m_xdg_surface);
}
void xdg_surface_v5::set_minimized()
{
xdg_surface_set_minimized(
m_xdg_surface);
}
void xdg_surface_v5::xdg_surface_configure(int32_t , int32_t , wl_array *, uint32_t )
{
}
void xdg_surface_v5::handle_configure(
void *data,
struct ::xdg_surface_v5 *object,
int32_t width,
int32_t height,
wl_array *states,
uint32_t serial)
{
Q_UNUSED(object);
static_cast<xdg_surface_v5 *>(data)->xdg_surface_configure(
width,
height,
states,
serial);
}
void xdg_surface_v5::xdg_surface_close()
{
}
void xdg_surface_v5::handle_close(
void *data,
struct ::xdg_surface_v5 *object)
{
Q_UNUSED(object);
static_cast<xdg_surface_v5 *>(data)->xdg_surface_close();
}
const struct xdg_surface_listener xdg_surface_v5::m_xdg_surface_listener = {
xdg_surface_v5::handle_configure,
xdg_surface_v5::handle_close
};
void xdg_surface_v5::init_listener()
{
xdg_surface_add_listener(m_xdg_surface, &m_xdg_surface_listener, this);
}
xdg_popup_v5::xdg_popup_v5(struct ::wl_registry *registry, int id, int version)
{
init(registry, id, version);
}
xdg_popup_v5::xdg_popup_v5(struct ::xdg_popup_v5 *obj)
: m_xdg_popup(obj)
{
init_listener();
}
xdg_popup_v5::xdg_popup_v5()
: m_xdg_popup(nullptr)
{
}
xdg_popup_v5::~xdg_popup_v5()
{
}
void xdg_popup_v5::init(struct ::wl_registry *registry, int id, int version)
{
m_xdg_popup = static_cast<struct ::xdg_popup_v5 *>(wl_registry_bind(registry, id, &xdg_popup_v5_interface, version));
init_listener();
}
void xdg_popup_v5::init(struct ::xdg_popup_v5 *obj)
{
m_xdg_popup = obj;
init_listener();
}
bool xdg_popup_v5::isInitialized() const
{
return m_xdg_popup != nullptr;
}
const struct wl_interface *xdg_popup_v5::interface()
{
return &::xdg_popup_v5_interface;
}
void xdg_popup_v5::destroy()
{
xdg_popup_destroy(
m_xdg_popup);
m_xdg_popup = nullptr;
}
void xdg_popup_v5::xdg_popup_popup_done()
{
}
void xdg_popup_v5::handle_popup_done(
void *data,
struct ::xdg_popup_v5 *object)
{
Q_UNUSED(object);
static_cast<xdg_popup_v5 *>(data)->xdg_popup_popup_done();
}
const struct xdg_popup_listener xdg_popup_v5::m_xdg_popup_listener = {
xdg_popup_v5::handle_popup_done
};
void xdg_popup_v5::init_listener()
{
xdg_popup_add_listener(m_xdg_popup, &m_xdg_popup_listener, this);
}
}
QT_WARNING_POP
QT_END_NAMESPACE

View File

@ -0,0 +1,198 @@
// Hand-edited to resolve conflicts with xdg-shell stable
/*
* Copyright © 2008-2013 Kristian Høgsberg
* Copyright © 2013 Rafael Antognolli
* Copyright © 2013 Jasper St. Pierre
* Copyright © 2010-2013 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifndef QT_WAYLAND_XDG_SHELL_UNSTABLE_V5
#define QT_WAYLAND_XDG_SHELL_UNSTABLE_V5
#include "wayland-xdg-shell-unstable-v5-client-protocol_p.h"
#include <QByteArray>
#include <QString>
QT_BEGIN_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers")
namespace QtWayland {
class xdg_shell_v5
{
public:
xdg_shell_v5(struct ::wl_registry *registry, int id, int version);
xdg_shell_v5(struct ::xdg_shell_v5 *object);
xdg_shell_v5();
virtual ~xdg_shell_v5();
void init(struct ::wl_registry *registry, int id, int version);
void init(struct ::xdg_shell_v5 *object);
struct ::xdg_shell_v5 *object() { return m_xdg_shell; }
const struct ::xdg_shell_v5 *object() const { return m_xdg_shell; }
bool isInitialized() const;
static const struct ::wl_interface *interface();
enum version {
version_current = 5 // Always the latest version
};
enum error {
error_role = 0, // given wl_surface has another role
error_defunct_surfaces = 1, // xdg_shell was destroyed before children
error_not_the_topmost_popup = 2, // the client tried to map or destroy a non-topmost popup
error_invalid_popup_parent = 3 // the client specified an invalid popup parent surface
};
void destroy();
void use_unstable_version(int32_t version);
struct ::xdg_surface_v5 *get_xdg_surface(struct ::wl_surface *surface);
struct ::xdg_popup_v5 *get_xdg_popup(struct ::wl_surface *surface, struct ::wl_surface *parent, struct ::wl_seat *seat, uint32_t serial, int32_t x, int32_t y);
void pong(uint32_t serial);
protected:
virtual void xdg_shell_ping(uint32_t serial);
private:
void init_listener();
static const struct xdg_shell_listener m_xdg_shell_listener;
static void handle_ping(
void *data,
struct ::xdg_shell_v5 *object,
uint32_t serial);
struct ::xdg_shell_v5 *m_xdg_shell;
};
class xdg_surface_v5
{
public:
xdg_surface_v5(struct ::wl_registry *registry, int id, int version);
xdg_surface_v5(struct ::xdg_surface_v5 *object);
xdg_surface_v5();
virtual ~xdg_surface_v5();
void init(struct ::wl_registry *registry, int id, int version);
void init(struct ::xdg_surface_v5 *object);
struct ::xdg_surface_v5 *object() { return m_xdg_surface; }
const struct ::xdg_surface_v5 *object() const { return m_xdg_surface; }
bool isInitialized() const;
static const struct ::wl_interface *interface();
enum resize_edge {
resize_edge_none = 0,
resize_edge_top = 1,
resize_edge_bottom = 2,
resize_edge_left = 4,
resize_edge_top_left = 5,
resize_edge_bottom_left = 6,
resize_edge_right = 8,
resize_edge_top_right = 9,
resize_edge_bottom_right = 10
};
enum state {
state_maximized = 1, // the surface is maximized
state_fullscreen = 2, // the surface is fullscreen
state_resizing = 3,
state_activated = 4
};
void destroy();
void set_parent(struct ::xdg_surface_v5 *parent);
void set_title(const QString &title);
void set_app_id(const QString &app_id);
void show_window_menu(struct ::wl_seat *seat, uint32_t serial, int32_t x, int32_t y);
void move(struct ::wl_seat *seat, uint32_t serial);
void resize(struct ::wl_seat *seat, uint32_t serial, uint32_t edges);
void ack_configure(uint32_t serial);
void set_window_geometry(int32_t x, int32_t y, int32_t width, int32_t height);
void set_maximized();
void unset_maximized();
void set_fullscreen(struct ::wl_output *output);
void unset_fullscreen();
void set_minimized();
protected:
virtual void xdg_surface_configure(int32_t width, int32_t height, wl_array *states, uint32_t serial);
virtual void xdg_surface_close();
private:
void init_listener();
static const struct xdg_surface_listener m_xdg_surface_listener;
static void handle_configure(
void *data,
struct ::xdg_surface_v5 *object,
int32_t width,
int32_t height,
wl_array *states,
uint32_t serial);
static void handle_close(
void *data,
struct ::xdg_surface_v5 *object);
struct ::xdg_surface_v5 *m_xdg_surface;
};
class xdg_popup_v5
{
public:
xdg_popup_v5(struct ::wl_registry *registry, int id, int version);
xdg_popup_v5(struct ::xdg_popup_v5 *object);
xdg_popup_v5();
virtual ~xdg_popup_v5();
void init(struct ::wl_registry *registry, int id, int version);
void init(struct ::xdg_popup_v5 *object);
struct ::xdg_popup_v5 *object() { return m_xdg_popup; }
const struct ::xdg_popup_v5 *object() const { return m_xdg_popup; }
bool isInitialized() const;
static const struct ::wl_interface *interface();
void destroy();
protected:
virtual void xdg_popup_popup_done();
private:
void init_listener();
static const struct xdg_popup_listener m_xdg_popup_listener;
static void handle_popup_done(
void *data,
struct ::xdg_popup_v5 *object);
struct ::xdg_popup_v5 *m_xdg_popup;
};
}
QT_WARNING_POP
QT_END_NAMESPACE
#endif

View File

@ -0,0 +1,126 @@
/* Generated by wayland-scanner 1.13.0 */
// Hand-edited to resolve conflicts with xdg-shell stable
/*
* Copyright © 2008-2013 Kristian Høgsberg
* Copyright © 2013 Rafael Antognolli
* Copyright © 2013 Jasper St. Pierre
* Copyright © 2010-2013 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
extern const struct wl_interface wl_output_interface;
extern const struct wl_interface wl_seat_interface;
extern const struct wl_interface wl_surface_interface;
extern const struct wl_interface xdg_popup_v5_interface;
extern const struct wl_interface xdg_surface_v5_interface;
static const struct wl_interface *types[] = {
NULL,
NULL,
NULL,
NULL,
&xdg_surface_v5_interface,
&wl_surface_interface,
&xdg_popup_v5_interface,
&wl_surface_interface,
&wl_surface_interface,
&wl_seat_interface,
NULL,
NULL,
NULL,
&xdg_surface_v5_interface,
&wl_seat_interface,
NULL,
NULL,
NULL,
&wl_seat_interface,
NULL,
&wl_seat_interface,
NULL,
NULL,
&wl_output_interface,
};
static const struct wl_message xdg_shell_requests[] = {
{ "destroy", "", types + 0 },
{ "use_unstable_version", "i", types + 0 },
{ "get_xdg_surface", "no", types + 4 },
{ "get_xdg_popup", "nooouii", types + 6 },
{ "pong", "u", types + 0 },
};
static const struct wl_message xdg_shell_events[] = {
{ "ping", "u", types + 0 },
};
WL_EXPORT const struct wl_interface xdg_shell_v5_interface = {
"xdg_shell", 1,
5, xdg_shell_requests,
1, xdg_shell_events,
};
static const struct wl_message xdg_surface_requests[] = {
{ "destroy", "", types + 0 },
{ "set_parent", "?o", types + 13 },
{ "set_title", "s", types + 0 },
{ "set_app_id", "s", types + 0 },
{ "show_window_menu", "ouii", types + 14 },
{ "move", "ou", types + 18 },
{ "resize", "ouu", types + 20 },
{ "ack_configure", "u", types + 0 },
{ "set_window_geometry", "iiii", types + 0 },
{ "set_maximized", "", types + 0 },
{ "unset_maximized", "", types + 0 },
{ "set_fullscreen", "?o", types + 23 },
{ "unset_fullscreen", "", types + 0 },
{ "set_minimized", "", types + 0 },
};
static const struct wl_message xdg_surface_events[] = {
{ "configure", "iiau", types + 0 },
{ "close", "", types + 0 },
};
WL_EXPORT const struct wl_interface xdg_surface_v5_interface = {
"xdg_surface", 1,
14, xdg_surface_requests,
2, xdg_surface_events,
};
static const struct wl_message xdg_popup_requests[] = {
{ "destroy", "", types + 0 },
};
static const struct wl_message xdg_popup_events[] = {
{ "popup_done", "", types + 0 },
};
WL_EXPORT const struct wl_interface xdg_popup_v5_interface = {
"xdg_popup", 1,
1, xdg_popup_requests,
1, xdg_popup_events,
};

View File

@ -0,0 +1,12 @@
# Putting pregenerated files in a 3rdparty directory to avoid
# qtqa's license checking failing.
HEADERS += \
$$PWD/3rdparty/qwayland-xdg-shell-unstable-v5_p.h \
$$PWD/3rdparty/wayland-xdg-shell-unstable-v5-client-protocol_p.h
SOURCES += \
$$PWD/3rdparty/qwayland-xdg-shell-unstable-v5.cpp \
$$PWD/3rdparty/wayland-xdg-shell-unstable-v5-protocol.c
INCLUDEPATH += $$PWD/3rdparty

View File

@ -47,9 +47,9 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
QWaylandXdgPopupV5::QWaylandXdgPopupV5(struct ::xdg_popup *popup, QWaylandWindow *window)
QWaylandXdgPopupV5::QWaylandXdgPopupV5(struct ::xdg_popup_v5 *popup, QWaylandWindow *window)
: QWaylandShellSurface(window)
, QtWayland::xdg_popup(popup)
, QtWayland::xdg_popup_v5(popup)
, m_window(window)
{
if (window->display()->windowExtension())

View File

@ -51,7 +51,7 @@
// We mean it.
//
#include "qwayland-xdg-shell-unstable-v5.h"
#include "qwayland-xdg-shell-unstable-v5_p.h"
#include <wayland-client.h>
@ -68,11 +68,11 @@ class QWaylandWindow;
class QWaylandExtendedSurface;
class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgPopupV5 : public QWaylandShellSurface
, public QtWayland::xdg_popup
, public QtWayland::xdg_popup_v5
{
Q_OBJECT
public:
QWaylandXdgPopupV5(struct ::xdg_popup *popup, QWaylandWindow *window);
QWaylandXdgPopupV5(struct ::xdg_popup_v5 *popup, QWaylandWindow *window);
~QWaylandXdgPopupV5() override;
protected:

View File

@ -52,15 +52,10 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
QWaylandXdgShellV5::QWaylandXdgShellV5(struct ::xdg_shell *shell)
: QtWayland::xdg_shell(shell)
{
}
QWaylandXdgShellV5::QWaylandXdgShellV5(struct ::wl_registry *registry, uint32_t id)
: QtWayland::xdg_shell(registry, id, 1)
: QtWayland::xdg_shell_v5(registry, id, 1)
{
use_unstable_version(QtWayland::xdg_shell::version_current);
use_unstable_version(QtWayland::xdg_shell_v5::version_current);
}
QWaylandXdgShellV5::~QWaylandXdgShellV5()

View File

@ -51,7 +51,7 @@
// We mean it.
//
#include "qwayland-xdg-shell-unstable-v5.h"
#include "qwayland-xdg-shell-unstable-v5_p.h"
#include <QtCore/QSize>
#include <QtCore/QVector>
@ -72,10 +72,9 @@ class QWaylandInputDevice;
class QWaylandXdgSurfaceV5;
class QWaylandXdgPopupV5;
class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgShellV5 : public QtWayland::xdg_shell
class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgShellV5 : public QtWayland::xdg_shell_v5
{
public:
QWaylandXdgShellV5(struct ::xdg_shell *shell);
QWaylandXdgShellV5(struct ::wl_registry *registry, uint32_t id);
~QWaylandXdgShellV5() override;

View File

@ -51,6 +51,10 @@ namespace QtWaylandClient {
bool QWaylandXdgShellV5Integration::initialize(QWaylandDisplay *display)
{
qCWarning(lcQpaWayland) << "\"xdg-shell-v5\" is a deprecated shell extension, prefer using"
<< "\"xdg-shell-v6\" or \"xdg-shell\" if supported by the compositor"
<< "by setting the environment variable QT_WAYLAND_SHELL_INTEGRATION";
Q_FOREACH (QWaylandDisplay::RegistryGlobal global, display->globals()) {
if (global.interface == QLatin1String("xdg_shell")) {
m_xdgShell.reset(new QWaylandXdgShellV5(display->wl_registry(), global.id));

View File

@ -54,7 +54,7 @@ namespace QtWaylandClient {
QWaylandXdgSurfaceV5::QWaylandXdgSurfaceV5(QWaylandXdgShellV5 *shell, QWaylandWindow *window)
: QWaylandShellSurface(window)
, QtWayland::xdg_surface(shell->get_xdg_surface(window->object()))
, QtWayland::xdg_surface_v5(shell->get_xdg_surface(window->object()))
, m_window(window)
, m_shell(shell)
{
@ -105,12 +105,12 @@ void QWaylandXdgSurfaceV5::updateTransientParent(QWaylandWindow *parent)
void QWaylandXdgSurfaceV5::setTitle(const QString & title)
{
return QtWayland::xdg_surface::set_title(title);
return QtWayland::xdg_surface_v5::set_title(title);
}
void QWaylandXdgSurfaceV5::setAppId(const QString & appId)
{
return QtWayland::xdg_surface::set_app_id(appId);
return QtWayland::xdg_surface_v5::set_app_id(appId);
}
void QWaylandXdgSurfaceV5::raise()

View File

@ -51,7 +51,7 @@
// We mean it.
//
#include "qwayland-xdg-shell-unstable-v5.h"
#include "qwayland-xdg-shell-unstable-v5_p.h"
#include <QtWaylandClient/qtwaylandclientglobal.h>
#include <QtWaylandClient/private/qwaylandshellsurface_p.h>
@ -73,19 +73,19 @@ class QWaylandExtendedSurface;
class QWaylandXdgShellV5;
class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgSurfaceV5 : public QWaylandShellSurface
, public QtWayland::xdg_surface
, public QtWayland::xdg_surface_v5
{
Q_OBJECT
public:
QWaylandXdgSurfaceV5(QWaylandXdgShellV5 *shell, QWaylandWindow *window);
~QWaylandXdgSurfaceV5() override;
using QtWayland::xdg_surface::resize;
using QtWayland::xdg_surface_v5::resize;
void resize(QWaylandInputDevice *inputDevice, enum resize_edge edges);
void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) override;
using QtWayland::xdg_surface::move;
using QtWayland::xdg_surface_v5::move;
bool move(QWaylandInputDevice *inputDevice) override;
void setTitle(const QString &title) override;

View File

@ -6,9 +6,6 @@ QMAKE_USE += wayland-client
qtConfig(xkbcommon-evdev): \
QMAKE_USE += xkbcommon_evdev
WAYLANDCLIENTSOURCES += \
../../../3rdparty/protocol/xdg-shell-unstable-v5.xml
HEADERS += \
qwaylandxdgpopupv5_p.h \
qwaylandxdgshellv5_p.h \
@ -22,6 +19,8 @@ SOURCES += \
qwaylandxdgshellv5integration.cpp \
qwaylandxdgsurfacev5.cpp \
include (pregenerated/xdg-shell-v5.pri)
OTHER_FILES += \
xdg-shell-v5.json