From 89dc082f892c636df32dcd491e49f8231c4d2502 Mon Sep 17 00:00:00 2001 From: Doyoun Kang Date: Thu, 21 Apr 2022 10:41:31 +0900 Subject: [PATCH] interactive_move/resize: change code not to send wayland error 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 | 10 ++++++++-- src/bin/e_xdg_shell_v6.c | 6 ------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/bin/e_comp_wl_shell.c b/src/bin/e_comp_wl_shell.c index 12bdb3a..0a75979 100644 --- a/src/bin/e_comp_wl_shell.c +++ b/src/bin/e_comp_wl_shell.c @@ -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); diff --git a/src/bin/e_xdg_shell_v6.c b/src/bin/e_xdg_shell_v6.c index 082056f..a6bfafc 100644 --- a/src/bin/e_xdg_shell_v6.c +++ b/src/bin/e_xdg_shell_v6.c @@ -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; } } -- 2.7.4