diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index e0438a358..0dc651b8f 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -1096,6 +1096,14 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) ec->ignored = ignored; if (!ec->comp_data->mapped) goto unmapped; + if (ec->comp_data->shell.surface && ec->comp_data->shell.configure_send && (!ec->maximized) && (!ec->fullscreen)) + { + ec->comp_data->shell.window_offsets.l = ec->comp_data->shell.window.x; + ec->comp_data->shell.window_offsets.r = ec->client.w - ec->comp_data->shell.window.w - ec->comp_data->shell.window.x; + ec->comp_data->shell.window_offsets.t = ec->comp_data->shell.window.y; + ec->comp_data->shell.window_offsets.b = ec->client.h - ec->comp_data->shell.window.h - ec->comp_data->shell.window.y; + } + /* put state damages into surface */ if ((!e_comp->nocomp) && (ec->frame)) { diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index 32a8cba7b..08a193f96 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -261,6 +261,10 @@ struct _E_Comp_Wl_Client_Data void (*map)(struct wl_resource *resource); void (*unmap)(struct wl_resource *resource); Eina_Rectangle window; + struct + { + int l, r, t, b; + } window_offsets; } shell; E_Comp_Wl_Buffer_Ref buffer_ref; diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c index ce0d14ef9..44baac22d 100644 --- a/src/modules/wl_desktop_shell/e_mod_main.c +++ b/src/modules/wl_desktop_shell/e_mod_main.c @@ -620,6 +620,12 @@ _e_xdg_shell_surface_configure_send(struct wl_resource *resource, uint32_t edges if (ec->focused) _e_xdg_surface_state_add(resource, &states, XDG_SURFACE_STATE_ACTIVATED); + if ((!ec->maximized) && (!ec->fullscreen) && (!e_client_util_resizing_get(ec))) + { + width -= ec->comp_data->shell.window_offsets.l + ec->comp_data->shell.window_offsets.r; + height -= ec->comp_data->shell.window_offsets.t + ec->comp_data->shell.window_offsets.b; + } + if (ec->netwm.type != E_WINDOW_TYPE_POPUP_MENU) { serial = wl_display_next_serial(e_comp->wl_comp_data->wl.disp);