Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: third_party/wayland-protocols/include/protocol/remote-shell-unstable-v1-client-protocol.h

Issue 2686533004: Use pixel coordinates for shadow underlay bounds (Closed)
Patch Set: remove unnecessary changes Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/wayland-protocols/include/protocol/remote-shell-unstable-v1-client-protocol.h
diff --git a/third_party/wayland-protocols/include/protocol/remote-shell-unstable-v1-client-protocol.h b/third_party/wayland-protocols/include/protocol/remote-shell-unstable-v1-client-protocol.h
index 989e6e4d77cdbc5f9fd8fc7cadc4ff90e65fa762..e537817a8ea37096a402188311ccf1937f983a66 100644
--- a/third_party/wayland-protocols/include/protocol/remote-shell-unstable-v1-client-protocol.h
+++ b/third_party/wayland-protocols/include/protocol/remote-shell-unstable-v1-client-protocol.h
@@ -396,6 +396,31 @@ struct zcr_remote_surface_v1_listener {
void (*state_type_changed)(void *data,
struct zcr_remote_surface_v1 *zcr_remote_surface_v1,
uint32_t state_type);
+ /**
+ * suggest a surface change
+ *
+ * The configure event asks the client to change surface state.
+ *
+ * The origin arguments specify the position, in the compositor
+ * coordinate space, of the virtual display used by the client to
+ * simulate multiple displays. The client must offset window
+ * positions in set_window_geometry requests by this origin in
+ * order to convert between coordinate spaces.
+ *
+ * Clients should arrange their surface for the new state, and then
+ * send an ack_configure request with the serial sent in this
+ * configure event at some point before committing the new surface.
+ *
+ * If the client receives multiple configure events before it can
+ * respond to one, it is free to discard all but the last event it
+ * received.
+ * @since 3
+ */
+ void (*configure)(void *data,
+ struct zcr_remote_surface_v1 *zcr_remote_surface_v1,
+ int32_t origin_x,
+ int32_t origin_y,
+ uint32_t serial);
};
/**
@@ -427,8 +452,10 @@ 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_SET_SYSTEM_MODAL 16
#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
+#define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SURFACE_SHADOW 18
+#define ZCR_REMOTE_SURFACE_V1_ACK_CONFIGURE 19
+#define ZCR_REMOTE_SURFACE_V1_SET_MOVING 20
+#define ZCR_REMOTE_SURFACE_V1_UNSET_MOVING 21
/**
* @ingroup iface_zcr_remote_surface_v1
@@ -505,11 +532,19 @@ zcr_remote_surface_v1_add_listener(struct zcr_remote_surface_v1 *zcr_remote_surf
/**
* @ingroup iface_zcr_remote_surface_v1
*/
-#define ZCR_REMOTE_SURFACE_V1_SET_MOVING_SINCE_VERSION 2
+#define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SURFACE_SHADOW_SINCE_VERSION 2
+/**
+ * @ingroup iface_zcr_remote_surface_v1
+ */
+#define ZCR_REMOTE_SURFACE_V1_ACK_CONFIGURE_SINCE_VERSION 3
+/**
+ * @ingroup iface_zcr_remote_surface_v1
+ */
+#define ZCR_REMOTE_SURFACE_V1_SET_MOVING_SINCE_VERSION 3
/**
* @ingroup iface_zcr_remote_surface_v1
*/
-#define ZCR_REMOTE_SURFACE_V1_UNSET_MOVING_SINCE_VERSION 2
+#define ZCR_REMOTE_SURFACE_V1_UNSET_MOVING_SINCE_VERSION 3
/** @ingroup iface_zcr_remote_surface_v1 */
static inline void
@@ -603,7 +638,7 @@ zcr_remote_surface_v1_set_scale(struct zcr_remote_surface_v1 *zcr_remote_surface
/**
* @ingroup iface_zcr_remote_surface_v1
*
- * Request that surface needs a rectangular shadow.
+ * [Deprecated] Request that surface needs a rectangular shadow.
*
* This is only a request that the surface should have a rectangular
* shadow. The compositor may choose to ignore this request.
@@ -827,6 +862,55 @@ zcr_remote_surface_v1_unset_system_modal(struct zcr_remote_surface_v1 *zcr_remot
/**
* @ingroup iface_zcr_remote_surface_v1
*
+ * Request that surface needs a rectangular shadow.
+ *
+ * This is only a request that the surface should have a rectangular
+ * shadow. The compositor may choose to ignore this request.
+ *
+ * The arguments are given in the remote surface coordinate space and
+ * specifies inner bounds of the shadow. Specifying zero width and height
+ * will disable the shadow.
+ */
+static inline void
+zcr_remote_surface_v1_set_rectangular_surface_shadow(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t x, int32_t y, int32_t width, int32_t height)
+{
+ wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1,
+ ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SURFACE_SHADOW, x, y, width, height);
+}
+
+/**
+ * @ingroup iface_zcr_remote_surface_v1
+ *
+ * When a configure event is received, if a client commits the
+ * surface in response to the configure event, then the client
+ * must make an ack_configure request sometime before the commit
+ * request, passing along the serial of the configure event.
+ *
+ * For instance, the compositor might use this information during display
+ * configuration to change its coordinate space for set_window_geometry
+ * requests only when the client has switched to the new coordinate space.
+ *
+ * If the client receives multiple configure events before it
+ * 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.
+ *
+ * A client may send multiple ack_configure requests before committing, but
+ * only the last request sent before a commit indicates which configure
+ * event the client really is responding to.
+ */
+static inline void
+zcr_remote_surface_v1_ack_configure(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t serial)
+{
+ wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1,
+ ZCR_REMOTE_SURFACE_V1_ACK_CONFIGURE, serial);
+}
+
+/**
+ * @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

Powered by Google App Engine
This is Rietveld 408576698