Commit 9bcc88b3 authored by domlaskowski's avatar domlaskowski Committed by Commit bot

third_party: Update remote shell protocol to version 2

The new requests enable the compositor to distinguish between dragging
and other geometry updates, which is needed for window positioning in
extended desktop mode.

BUG=642894
TEST=None

Review-Url: https://codereview.chromium.org/2295323003
Cr-Commit-Position: refs/heads/master@{#421340}
parent a0b3fb78
...@@ -427,6 +427,8 @@ zcr_remote_surface_v1_add_listener(struct zcr_remote_surface_v1 *zcr_remote_surf ...@@ -427,6 +427,8 @@ zcr_remote_surface_v1_add_listener(struct zcr_remote_surface_v1 *zcr_remote_surf
#define ZCR_REMOTE_SURFACE_V1_UNPIN 15 #define ZCR_REMOTE_SURFACE_V1_UNPIN 15
#define ZCR_REMOTE_SURFACE_V1_SET_SYSTEM_MODAL 16 #define ZCR_REMOTE_SURFACE_V1_SET_SYSTEM_MODAL 16
#define ZCR_REMOTE_SURFACE_V1_UNSET_SYSTEM_MODAL 17 #define ZCR_REMOTE_SURFACE_V1_UNSET_SYSTEM_MODAL 17
#define ZCR_REMOTE_SURFACE_V1_SET_MOVING 18
#define ZCR_REMOTE_SURFACE_V1_UNSET_MOVING 19
/** /**
* @ingroup iface_zcr_remote_surface_v1 * @ingroup iface_zcr_remote_surface_v1
...@@ -500,6 +502,14 @@ zcr_remote_surface_v1_add_listener(struct zcr_remote_surface_v1 *zcr_remote_surf ...@@ -500,6 +502,14 @@ zcr_remote_surface_v1_add_listener(struct zcr_remote_surface_v1 *zcr_remote_surf
* @ingroup iface_zcr_remote_surface_v1 * @ingroup iface_zcr_remote_surface_v1
*/ */
#define ZCR_REMOTE_SURFACE_V1_UNSET_SYSTEM_MODAL_SINCE_VERSION 1 #define ZCR_REMOTE_SURFACE_V1_UNSET_SYSTEM_MODAL_SINCE_VERSION 1
/**
* @ingroup iface_zcr_remote_surface_v1
*/
#define ZCR_REMOTE_SURFACE_V1_SET_MOVING_SINCE_VERSION 2
/**
* @ingroup iface_zcr_remote_surface_v1
*/
#define ZCR_REMOTE_SURFACE_V1_UNSET_MOVING_SINCE_VERSION 2
/** @ingroup iface_zcr_remote_surface_v1 */ /** @ingroup iface_zcr_remote_surface_v1 */
static inline void static inline void
...@@ -814,6 +824,35 @@ zcr_remote_surface_v1_unset_system_modal(struct zcr_remote_surface_v1 *zcr_remot ...@@ -814,6 +824,35 @@ zcr_remote_surface_v1_unset_system_modal(struct zcr_remote_surface_v1 *zcr_remot
ZCR_REMOTE_SURFACE_V1_UNSET_SYSTEM_MODAL); ZCR_REMOTE_SURFACE_V1_UNSET_SYSTEM_MODAL);
} }
/**
* @ingroup iface_zcr_remote_surface_v1
*
* Notifies the compositor when an interactive, user-driven move of the
* surface starts. The compositor may assume that subsequent
* set_window_geometry requests are position updates until it receives a
* unset_moving request.
*/
static inline void
zcr_remote_surface_v1_set_moving(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
{
wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1,
ZCR_REMOTE_SURFACE_V1_SET_MOVING);
}
/**
* @ingroup iface_zcr_remote_surface_v1
*
* Notifies the compositor when an interactive, user-driven move of the
* surface stops. The compositor may choose to stop the move regardless
* of this request.
*/
static inline void
zcr_remote_surface_v1_unset_moving(struct zcr_remote_surface_v1 *zcr_remote_surface_v1)
{
wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1,
ZCR_REMOTE_SURFACE_V1_UNSET_MOVING);
}
#define ZCR_NOTIFICATION_SURFACE_V1_DESTROY 0 #define ZCR_NOTIFICATION_SURFACE_V1_DESTROY 0
/** /**
......
...@@ -538,6 +538,27 @@ struct zcr_remote_surface_v1_interface { ...@@ -538,6 +538,27 @@ struct zcr_remote_surface_v1_interface {
*/ */
void (*unset_system_modal)(struct wl_client *client, void (*unset_system_modal)(struct wl_client *client,
struct wl_resource *resource); struct wl_resource *resource);
/**
* interactive move started
*
* Notifies the compositor when an interactive, user-driven move
* of the surface starts. The compositor may assume that subsequent
* set_window_geometry requests are position updates until it
* receives a unset_moving request.
* @since 2
*/
void (*set_moving)(struct wl_client *client,
struct wl_resource *resource);
/**
* interactive move stopped
*
* Notifies the compositor when an interactive, user-driven move
* of the surface stops. The compositor may choose to stop the move
* regardless of this request.
* @since 2
*/
void (*unset_moving)(struct wl_client *client,
struct wl_resource *resource);
}; };
#define ZCR_REMOTE_SURFACE_V1_CLOSE 0 #define ZCR_REMOTE_SURFACE_V1_CLOSE 0
......
...@@ -63,7 +63,7 @@ static const struct wl_message zcr_remote_shell_v1_events[] = { ...@@ -63,7 +63,7 @@ static const struct wl_message zcr_remote_shell_v1_events[] = {
}; };
WL_EXPORT const struct wl_interface zcr_remote_shell_v1_interface = { WL_EXPORT const struct wl_interface zcr_remote_shell_v1_interface = {
"zcr_remote_shell_v1", 1, "zcr_remote_shell_v1", 2,
3, zcr_remote_shell_v1_requests, 3, zcr_remote_shell_v1_requests,
2, zcr_remote_shell_v1_events, 2, zcr_remote_shell_v1_events,
}; };
...@@ -87,6 +87,8 @@ static const struct wl_message zcr_remote_surface_v1_requests[] = { ...@@ -87,6 +87,8 @@ static const struct wl_message zcr_remote_surface_v1_requests[] = {
{ "unpin", "", types + 0 }, { "unpin", "", types + 0 },
{ "set_system_modal", "", types + 0 }, { "set_system_modal", "", types + 0 },
{ "unset_system_modal", "", types + 0 }, { "unset_system_modal", "", types + 0 },
{ "set_moving", "2", types + 0 },
{ "unset_moving", "2", types + 0 },
}; };
static const struct wl_message zcr_remote_surface_v1_events[] = { static const struct wl_message zcr_remote_surface_v1_events[] = {
...@@ -95,8 +97,8 @@ static const struct wl_message zcr_remote_surface_v1_events[] = { ...@@ -95,8 +97,8 @@ static const struct wl_message zcr_remote_surface_v1_events[] = {
}; };
WL_EXPORT const struct wl_interface zcr_remote_surface_v1_interface = { WL_EXPORT const struct wl_interface zcr_remote_surface_v1_interface = {
"zcr_remote_surface_v1", 1, "zcr_remote_surface_v1", 2,
18, zcr_remote_surface_v1_requests, 20, zcr_remote_surface_v1_requests,
2, zcr_remote_surface_v1_events, 2, zcr_remote_surface_v1_events,
}; };
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
reset. reset.
</description> </description>
<interface name="zcr_remote_shell_v1" version="1"> <interface name="zcr_remote_shell_v1" version="2">
<description summary="remote_shell"> <description summary="remote_shell">
The global interface that allows clients to turn a wl_surface into a The global interface that allows clients to turn a wl_surface into a
"real window" which is remotely managed but can be stacked, activated "real window" which is remotely managed but can be stacked, activated
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
</event> </event>
</interface> </interface>
<interface name="zcr_remote_surface_v1" version="1"> <interface name="zcr_remote_surface_v1" version="2">
<description summary="A desktop window"> <description summary="A desktop window">
An interface that may be implemented by a wl_surface, for An interface that may be implemented by a wl_surface, for
implementations that provide a desktop-style user interface implementations that provide a desktop-style user interface
...@@ -379,6 +379,25 @@ ...@@ -379,6 +379,25 @@
</description> </description>
<arg name="state_type" type="uint"/> <arg name="state_type" type="uint"/>
</event> </event>
<!-- Version 2 additions -->
<request name="set_moving" since="2">
<description summary="interactive move started">
Notifies the compositor when an interactive, user-driven move of the
surface starts. The compositor may assume that subsequent
set_window_geometry requests are position updates until it receives a
unset_moving request.
</description>
</request>
<request name="unset_moving" since="2">
<description summary="interactive move stopped">
Notifies the compositor when an interactive, user-driven move of the
surface stops. The compositor may choose to stop the move regardless
of this request.
</description>
</request>
</interface> </interface>
<interface name="zcr_notification_surface_v1" version="1"> <interface name="zcr_notification_surface_v1" version="1">
......
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