[weston,1/6] libweston: Pass the serial along with the other data in the show_window_menu API

Submitted by Dima Ryazanov on Dec. 5, 2016, 3:36 a.m.

Details

Message ID 20161205033635.20086-2-dima@gmail.com
State New
Headers show
Series "Implement xdg-shell's show_window_menu API" ( rev: 1 ) in Wayland

Not browsing as part of any series.

Commit Message

Dima Ryazanov Dec. 5, 2016, 3:36 a.m.
We'll need it later to actually display a popup menu.

Signed-off-by: Dima Ryazanov <dima@gmail.com>
---
 libweston-desktop/internal.h          | 2 +-
 libweston-desktop/libweston-desktop.c | 4 ++--
 libweston-desktop/libweston-desktop.h | 4 ++--
 libweston-desktop/xdg-shell-v5.c      | 3 ++-
 libweston-desktop/xdg-shell-v6.c      | 2 +-
 5 files changed, 8 insertions(+), 7 deletions(-)

Patch hide | download patch | download mbox

diff --git a/libweston-desktop/internal.h b/libweston-desktop/internal.h
index a9c974b..e7044a4 100644
--- a/libweston-desktop/internal.h
+++ b/libweston-desktop/internal.h
@@ -54,7 +54,7 @@  void
 weston_desktop_api_show_window_menu(struct weston_desktop *desktop,
 				    struct weston_desktop_surface *surface,
 				    struct weston_seat *seat,
-				    int32_t x, int32_t y);
+				    uint32_t serial, int32_t x, int32_t y);
 void
 weston_desktop_api_set_parent(struct weston_desktop *desktop,
 			      struct weston_desktop_surface *surface,
diff --git a/libweston-desktop/libweston-desktop.c b/libweston-desktop/libweston-desktop.c
index 0ee1139..c867d73 100644
--- a/libweston-desktop/libweston-desktop.c
+++ b/libweston-desktop/libweston-desktop.c
@@ -178,10 +178,10 @@  void
 weston_desktop_api_show_window_menu(struct weston_desktop *desktop,
 				    struct weston_desktop_surface *surface,
 				    struct weston_seat *seat,
-				    int32_t x, int32_t y)
+				    uint32_t serial, int32_t x, int32_t y)
 {
 	if (desktop->api.show_window_menu != NULL)
-		desktop->api.show_window_menu(surface, seat, x, y,
+		desktop->api.show_window_menu(surface, seat, serial, x, y,
 					      desktop->user_data);
 }
 
diff --git a/libweston-desktop/libweston-desktop.h b/libweston-desktop/libweston-desktop.h
index f77ab55..befecdf 100644
--- a/libweston-desktop/libweston-desktop.h
+++ b/libweston-desktop/libweston-desktop.h
@@ -62,8 +62,8 @@  struct weston_desktop_api {
 	void (*committed)(struct weston_desktop_surface *surface,
 			  int32_t sx, int32_t sy, void *user_data);
 	void (*show_window_menu)(struct weston_desktop_surface *surface,
-				 struct weston_seat *seat, int32_t x, int32_t y,
-				 void *user_data);
+				 struct weston_seat *seat, uint32_t serial,
+				 int32_t x, int32_t y, void *user_data);
 	void (*set_parent)(struct weston_desktop_surface *surface,
 			   struct weston_desktop_surface *parent,
 			   void *user_data);
diff --git a/libweston-desktop/xdg-shell-v5.c b/libweston-desktop/xdg-shell-v5.c
index 08cf71e..9074e4b 100644
--- a/libweston-desktop/xdg-shell-v5.c
+++ b/libweston-desktop/xdg-shell-v5.c
@@ -362,7 +362,8 @@  weston_desktop_xdg_surface_protocol_show_window_menu(struct wl_client *wl_client
 		weston_desktop_surface_get_implementation_data(dsurface);
 
 	weston_desktop_xdg_surface_ensure_added(surface);
-	weston_desktop_api_show_window_menu(surface->desktop, dsurface, seat, x, y);
+	weston_desktop_api_show_window_menu(surface->desktop,
+					    dsurface, seat, serial, x, y);
 }
 
 static void
diff --git a/libweston-desktop/xdg-shell-v6.c b/libweston-desktop/xdg-shell-v6.c
index 30f6d82..cab9808 100644
--- a/libweston-desktop/xdg-shell-v6.c
+++ b/libweston-desktop/xdg-shell-v6.c
@@ -365,7 +365,7 @@  weston_desktop_xdg_toplevel_protocol_show_window_menu(struct wl_client *wl_clien
 	}
 
 	weston_desktop_api_show_window_menu(toplevel->base.desktop,
-					    dsurface, seat, x, y);
+					    dsurface, seat, serial, x, y);
 }
 
 static void