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

Change-Id: I27420ad626a0c6a18b9a11c6ffdc102006fe78e0
This commit is contained in:
Qt Forward Merge Bot 2018-09-18 03:00:45 +02:00
commit 6252a08923
9 changed files with 125 additions and 694 deletions

View File

@ -8,8 +8,8 @@
"Description": "Wayland is a protocol for a compositor to talk to its clients.", "Description": "Wayland is a protocol for a compositor to talk to its clients.",
"Homepage": "https://wayland.freedesktop.org", "Homepage": "https://wayland.freedesktop.org",
"Version": "1.10.0", "Version": "1.6.1",
"DownloadLocation": "https://cgit.freedesktop.org/wayland/wayland/tag/?id=1.10.0", "DownloadLocation": "https://cgit.freedesktop.org/wayland/wayland/tag/?id=1.6.1",
"LicenseId": "HPND", "LicenseId": "HPND",
"License": "HPND License", "License": "HPND License",
"LicenseFile": "HPND_LICENSE.txt", "LicenseFile": "HPND_LICENSE.txt",

File diff suppressed because it is too large Load Diff

View File

@ -234,7 +234,6 @@
This request must be used in response to some sort of user action This request must be used in response to some sort of user action
like a button press, key press, or touch down event. like a button press, key press, or touch down event.
</description> </description>
<arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/> <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/>
<arg name="serial" type="uint" summary="the serial of the user event"/> <arg name="serial" type="uint" summary="the serial of the user event"/>
<arg name="x" type="int" summary="the x position to pop up the window menu at"/> <arg name="x" type="int" summary="the x position to pop up the window menu at"/>
@ -338,25 +337,34 @@
0x0000 - 0x0FFF: xdg-shell core values, documented below. 0x0000 - 0x0FFF: xdg-shell core values, documented below.
0x1000 - 0x1FFF: GNOME 0x1000 - 0x1FFF: GNOME
0x2000 - 0x2FFF: EFL
</description> </description>
<entry name="maximized" value="1" summary="the surface is maximized"> <entry name="maximized" value="1" summary="the surface is maximized">
The surface is maximized. The window geometry specified in the configure <description summary="the surface is maximized">
event must be obeyed by the client. The surface is maximized. The window geometry specified in the configure
event must be obeyed by the client.
</description>
</entry> </entry>
<entry name="fullscreen" value="2" summary="the surface is fullscreen"> <entry name="fullscreen" value="2" summary="the surface is fullscreen">
The surface is fullscreen. The window geometry specified in the configure <description summary="the surface is fullscreen">
event must be obeyed by the client. The surface is fullscreen. The window geometry specified in the configure
event must be obeyed by the client.
</description>
</entry> </entry>
<entry name="resizing" value="3"> <entry name="resizing" value="3" summary="the surface is being resized">
The surface is being resized. The window geometry specified in the <description summary="the surface is being resized">
configure event is a maximum; the client cannot resize beyond it. The surface is being resized. The window geometry specified in the
Clients that have aspect ratio or cell sizing configuration can use configure event is a maximum; the client cannot resize beyond it.
a smaller size, however. Clients that have aspect ratio or cell sizing configuration can use
a smaller size, however.
</description>
</entry> </entry>
<entry name="activated" value="4"> <entry name="activated" value="4" summary="the surface is now activated">
Client window decorations should be painted as if the window is <description summary="the surface is now activated">
active. Do not assume this means that the window actually has Client window decorations should be painted as if the window is
keyboard or pointer focus. active. Do not assume this means that the window actually has
keyboard or pointer focus.
</description>
</entry> </entry>
</enum> </enum>
@ -387,7 +395,6 @@
can respond to one, it is free to discard all but the last can respond to one, it is free to discard all but the last
event it received. event it received.
</description> </description>
<arg name="width" type="int"/> <arg name="width" type="int"/>
<arg name="height" type="int"/> <arg name="height" type="int"/>
<arg name="states" type="array"/> <arg name="states" type="array"/>
@ -398,8 +405,8 @@
<description summary="ack a configure event"> <description summary="ack a configure event">
When a configure event is received, if a client commits the When a configure event is received, if a client commits the
surface in response to the configure event, then the client surface in response to the configure event, then the client
must make a ack_configure request before the commit request, must make an ack_configure request sometime before the commit
passing along the serial of the configure event. request, passing along the serial of the configure event.
For instance, the compositor might use this information to move For instance, the compositor might use this information to move
a surface to the top left only when the client has drawn itself a surface to the top left only when the client has drawn itself
@ -407,6 +414,14 @@
If the client receives multiple configure events before it If the client receives multiple configure events before it
can respond to one, it only has to ack the last configure event. can respond to one, it only has to ack the last configure event.
A client is not required to commit immediately after sending
an ack_configure request - it may even ack_configure several times
before its next surface commit.
The compositor expects that the most recently received
ack_configure request at the time of a commit indicates which
configure event the client is responding to.
</description> </description>
<arg name="serial" type="uint" summary="the serial from the configure event"/> <arg name="serial" type="uint" summary="the serial from the configure event"/>
</request> </request>

View File

@ -1,5 +1,6 @@
/* Generated by wayland-scanner 1.13.0 */ /* Generated by wayland-scanner 1.13.0 */
// Hand-edited to resolve conflicts with xdg-shell stable // Hand-edited to resolve conflicts with xdg-shell stable
// And make it build with libwayland < 1.10
#ifndef XDG_SHELL_UNSTABLE_V5_CLIENT_PROTOCOL_H #ifndef XDG_SHELL_UNSTABLE_V5_CLIENT_PROTOCOL_H
#define XDG_SHELL_UNSTABLE_V5_CLIENT_PROTOCOL_H #define XDG_SHELL_UNSTABLE_V5_CLIENT_PROTOCOL_H
@ -362,11 +363,13 @@ xdg_shell_get_user_data(struct xdg_shell_v5 *xdg_shell)
return wl_proxy_get_user_data((struct wl_proxy *) xdg_shell); return wl_proxy_get_user_data((struct wl_proxy *) xdg_shell);
} }
#if WAYLAND_VERSION_MAJOR > 1 || WAYLAND_VERSION_MINOR >= 10
static inline uint32_t static inline uint32_t
xdg_shell_get_version(struct xdg_shell_v5 *xdg_shell) xdg_shell_get_version(struct xdg_shell_v5 *xdg_shell)
{ {
return wl_proxy_get_version((struct wl_proxy *) xdg_shell); return wl_proxy_get_version((struct wl_proxy *) xdg_shell);
} }
#endif
/** /**
* @ingroup iface_xdg_shell * @ingroup iface_xdg_shell
@ -687,11 +690,13 @@ xdg_surface_get_user_data(struct xdg_surface_v5 *xdg_surface)
return wl_proxy_get_user_data((struct wl_proxy *) xdg_surface); return wl_proxy_get_user_data((struct wl_proxy *) xdg_surface);
} }
#if WAYLAND_VERSION_MAJOR > 1 || WAYLAND_VERSION_MINOR >= 10
static inline uint32_t static inline uint32_t
xdg_surface_get_version(struct xdg_surface_v5 *xdg_surface) xdg_surface_get_version(struct xdg_surface_v5 *xdg_surface)
{ {
return wl_proxy_get_version((struct wl_proxy *) xdg_surface); return wl_proxy_get_version((struct wl_proxy *) xdg_surface);
} }
#endif
/** /**
* @ingroup iface_xdg_surface * @ingroup iface_xdg_surface
@ -1081,11 +1086,13 @@ xdg_popup_get_user_data(struct xdg_popup_v5 *xdg_popup)
return wl_proxy_get_user_data((struct wl_proxy *) xdg_popup); return wl_proxy_get_user_data((struct wl_proxy *) xdg_popup);
} }
#if WAYLAND_VERSION_MAJOR > 1 || WAYLAND_VERSION_MINOR >= 10
static inline uint32_t static inline uint32_t
xdg_popup_get_version(struct xdg_popup_v5 *xdg_popup) xdg_popup_get_version(struct xdg_popup_v5 *xdg_popup)
{ {
return wl_proxy_get_version((struct wl_proxy *) xdg_popup); return wl_proxy_get_version((struct wl_proxy *) xdg_popup);
} }
#endif
/** /**
* @ingroup iface_xdg_popup * @ingroup iface_xdg_popup

View File

@ -235,11 +235,6 @@ private:
void registry_global(uint32_t id, const QString &interface, uint32_t version) override; void registry_global(uint32_t id, const QString &interface, uint32_t version) override;
void registry_global_remove(uint32_t id) override; void registry_global_remove(uint32_t id) override;
static void shellHandleConfigure(void *data, struct wl_shell *shell,
uint32_t time, uint32_t edges,
struct wl_surface *surface,
int32_t width, int32_t height);
}; };
} }

View File

@ -67,7 +67,7 @@
#include <QtCore/QDebug> #include <QtCore/QDebug>
#include <wayland-client-core.h> #include <wayland-client.h>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE

View File

@ -772,9 +772,6 @@ bool Scanner::process()
printf(" that->m_resource_map.remove(resource->client(), resource);\n"); printf(" that->m_resource_map.remove(resource->client(), resource);\n");
printf(" that->%s_destroy_resource(resource);\n", interfaceNameStripped); printf(" that->%s_destroy_resource(resource);\n", interfaceNameStripped);
printf(" delete resource;\n"); printf(" delete resource;\n");
printf("#if !WAYLAND_VERSION_CHECK(1, 2, 0)\n");
printf(" free(client_resource);\n");
printf("#endif\n");
printf(" }\n"); printf(" }\n");
printf("\n"); printf("\n");

View File

@ -161,14 +161,7 @@ void Surface::surface_commit(Resource *resource)
Q_UNUSED(resource); Q_UNUSED(resource);
if (m_buffer) { if (m_buffer) {
#if WAYLAND_VERSION_CHECK(1, 2, 0)
struct ::wl_shm_buffer *shm_buffer = wl_shm_buffer_get(m_buffer); struct ::wl_shm_buffer *shm_buffer = wl_shm_buffer_get(m_buffer);
#else
struct ::wl_buffer *shm_buffer = 0;
if (wl_buffer_is_shm(static_cast<struct ::wl_buffer*>(m_buffer->data)))
shm_buffer = static_cast<struct ::wl_buffer*>(m_buffer->data);
#endif
if (shm_buffer) { if (shm_buffer) {
int stride = wl_shm_buffer_get_stride(shm_buffer); int stride = wl_shm_buffer_get_stride(shm_buffer);
uint format = wl_shm_buffer_get_format(shm_buffer); uint format = wl_shm_buffer_get_format(shm_buffer);

View File

@ -59,6 +59,7 @@ void XdgSurfaceV6::zxdg_surface_v6_get_toplevel(QtWaylandServer::zxdg_surface_v6
void XdgSurfaceV6::zxdg_surface_v6_set_window_geometry(QtWaylandServer::zxdg_surface_v6::Resource *resource, int32_t x, int32_t y, int32_t width, int32_t height) void XdgSurfaceV6::zxdg_surface_v6_set_window_geometry(QtWaylandServer::zxdg_surface_v6::Resource *resource, int32_t x, int32_t y, int32_t width, int32_t height)
{ {
Q_UNUSED(resource);
if (m_toplevel) { if (m_toplevel) {
QRect geometry(x, y, width, height); QRect geometry(x, y, width, height);
emit m_toplevel->mockToplevel()->windowGeometryRequested(geometry); emit m_toplevel->mockToplevel()->windowGeometryRequested(geometry);