e_foreign_shell: Add surface role error code 01/261601/1
authorSeunghun Lee <shiin.lee@samsung.com>
Thu, 22 Jul 2021 02:10:04 +0000 (11:10 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Thu, 22 Jul 2021 02:56:18 +0000 (11:56 +0900)
Needed for properly reporting surface role violations from
wtz_importer.import_shell.

Change-Id: I55d56798c608ff274e641bfd7313903457076172

src/bin/e_foreign_shell.c

index 25e074f992f67221325e15ab792f2b9fe73dce1e..a94dd2cec65601ef17a67c170be0ac9b9f93ec8c 100644 (file)
@@ -69,7 +69,8 @@ struct _E_Foreign_Shell
      } state;
 };
 
-static Eina_Hash *_exported_shell_hash = NULL;
+static const char *e_foreign_shell_role_name = "wtz_foreign_shell";
+static Eina_Hash  *_exported_shell_hash = NULL;
 
 static E_Exported_Shell *_e_exported_shell_create(struct wl_resource *resource, E_Client *ec);
 static void              _e_exported_shell_destroy(E_Exported_Shell *es);
@@ -193,6 +194,10 @@ e_foreign_shell_import(struct wl_resource *importer, struct wl_resource *resourc
         return EINA_FALSE;
      }
 
+   if (!e_comp_wl_surface_role_set(ec, e_foreign_shell_role_name,
+                                   importer, WTZ_IMPORTER_ERROR_ROLE))
+     return EINA_FALSE;
+
    fs = _e_foreign_shell_create(resource, ec, es);
    if (!fs)
      {