discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=0d19a5914bddb315e6f1862c9fd8f897a831da09
commit 0d19a5914bddb315e6f1862c9fd8f897a831da09 Author: Mike Blumenkrantz <zm...@osg.samsung.com> Date: Fri Jul 24 16:35:21 2015 -0400 apply csd sizing transform for wayland configure events when not resizing, the sizes passed to configure should be based on the window size and not the surface size. in order to calculate this, it's necessary to keep track of the last-known window geometry for non-maximized states and create offsets with which to calculate new sizes this fixes directional maximizes as well as unmaximizing --- src/bin/e_comp_wl.c | 8 ++++++++ src/bin/e_comp_wl.h | 4 ++++ src/modules/wl_desktop_shell/e_mod_main.c | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index e0438a3..0dc651b 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 32a8cba..08a193f 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 ce0d14e..44baac2 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); --