[mutter] wayland-surface: Make bad xdg-shell versions crash the client



commit 1ed607f398eaba493c30f07ae36daa764b91bd53
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Sep 5 16:21:43 2014 -0700

    wayland-surface: Make bad xdg-shell versions crash the client
    
    Otherwise, we might continue with weird semantics.

 src/wayland/meta-wayland-surface.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 1dade05..771154a 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -752,7 +752,8 @@ xdg_shell_use_unstable_version (struct wl_client *client,
                                 int32_t version)
 {
   if (version != XDG_SHELL_VERSION_CURRENT)
-    g_warning ("Bad xdg_shell version: %d", version);
+    wl_resource_post_error (resource, WL_DISPLAY_ERROR_INVALID_OBJECT,
+                            "bad xdg-shell version: %d\n", version);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]