interactive_move/resize: change code not to send wayland error 68/274068/1 accepted/tizen/unified/20220422.021107 submit/tizen/20220421.230427
authorDoyoun Kang <doyoun.kang@samsung.com>
Thu, 21 Apr 2022 01:41:31 +0000 (10:41 +0900)
committerJunseok Kim <juns.kim@samsung.com>
Thu, 21 Apr 2022 02:44:16 +0000 (11:44 +0900)
If an application requested interactive move/resize window when its window was maximized
or fullscreen, e sent the wayland error message.
So, an application was terminated after getting this message.

We changed code that e doesn't send wayland error message and just prints error log.

Change-Id: I49beb8756a77791380d828cacb631b4d5b018582

src/bin/e_comp_wl_shell.c
src/bin/e_xdg_shell_v6.c

index 12bdb3a..0a75979 100644 (file)
@@ -270,7 +270,10 @@ e_shell_e_client_interactive_move(E_Client *ec,
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
 
    if ((ec->maximized) || (ec->fullscreen))
-     return EINA_FALSE;
+     {
+        ELOGF("SHELL", "Deny interactive move. maximized:%d, fullscreen:%d", ec, ec->maximized, ec->fullscreen);
+        return EINA_FALSE;
+     }
 
    TRACE_DS_BEGIN(SHELL:SURFACE MOVE REQUEST CB);
 
@@ -311,7 +314,10 @@ e_shell_e_client_interactive_resize(E_Client *ec,
      return EINA_FALSE;
 
    if ((ec->maximized) || (ec->fullscreen))
-     return EINA_FALSE;
+     {
+        ELOGF("SHELL", "Deny interactive resize. maximized:%d, fullscreen:%d", ec, ec->maximized, ec->fullscreen);
+        return EINA_FALSE;
+     }
 
    TRACE_DS_BEGIN(SHELL:SURFACE RESIZE REQUEST CB);
 
index 082056f..a6bfafc 100644 (file)
@@ -707,9 +707,6 @@ _e_xdg_toplevel_cb_move(struct wl_client *client,
    if (!e_shell_e_client_interactive_move(toplevel->base.ec, res_seat))
      {
         ERR("Failed to move this Toplevel", NULL);
-        wl_resource_post_error(resource,
-                               WL_DISPLAY_ERROR_INVALID_OBJECT,
-                               "Can't move this surface");
         return;
      }
 }
@@ -730,9 +727,6 @@ _e_xdg_toplevel_cb_resize(struct wl_client *client,
    if (!e_shell_e_client_interactive_resize(toplevel->base.ec, resource, res_seat, edges))
      {
         ERR("Failed to resize this Toplevel", NULL);
-        wl_resource_post_error(resource,
-                               WL_DISPLAY_ERROR_INVALID_OBJECT,
-                               "Can't resize this surface");
         return;
      }
 }