diff options
5 files changed, 9 insertions, 29 deletions
diff --git a/src/lib/ecore_wayland/Ecore_Wayland.h b/src/lib/ecore_wayland/Ecore_Wayland.h index 899f80e0c3..f9b70c7958 100644 --- a/src/lib/ecore_wayland/Ecore_Wayland.h +++ b/src/lib/ecore_wayland/Ecore_Wayland.h | |||
@@ -125,7 +125,7 @@ struct _Ecore_Wl_Window | |||
125 | } pointer; | 125 | } pointer; |
126 | 126 | ||
127 | int id, surface_id; | 127 | int id, surface_id; |
128 | int edges, rotation; | 128 | int rotation; |
129 | 129 | ||
130 | Eina_Rectangle allocation; | 130 | Eina_Rectangle allocation; |
131 | 131 | ||
@@ -213,6 +213,7 @@ struct _Ecore_Wl_Event_Window_Configure | |||
213 | unsigned int win; | 213 | unsigned int win; |
214 | unsigned int event_win; | 214 | unsigned int event_win; |
215 | int x, y, w, h; | 215 | int x, y, w, h; |
216 | int edges; | ||
216 | }; | 217 | }; |
217 | 218 | ||
218 | struct _Ecore_Wl_Event_Dnd_Enter | 219 | struct _Ecore_Wl_Event_Dnd_Enter |
diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c index 8307f654c1..661e825df0 100644 --- a/src/lib/ecore_wayland/ecore_wl_window.c +++ b/src/lib/ecore_wayland/ecore_wl_window.c | |||
@@ -10,7 +10,7 @@ static void _ecore_wl_window_cb_configure(void *data, struct wl_shell_surface *s | |||
10 | static void _ecore_wl_window_cb_popup_done(void *data, struct wl_shell_surface *shell_surface EINA_UNUSED); | 10 | static void _ecore_wl_window_cb_popup_done(void *data, struct wl_shell_surface *shell_surface EINA_UNUSED); |
11 | static void _ecore_wl_window_cb_surface_enter(void *data, struct wl_surface *surface, struct wl_output *output EINA_UNUSED); | 11 | static void _ecore_wl_window_cb_surface_enter(void *data, struct wl_surface *surface, struct wl_output *output EINA_UNUSED); |
12 | static void _ecore_wl_window_cb_surface_leave(void *data, struct wl_surface *surface, struct wl_output *output EINA_UNUSED); | 12 | static void _ecore_wl_window_cb_surface_leave(void *data, struct wl_surface *surface, struct wl_output *output EINA_UNUSED); |
13 | static void _ecore_wl_window_configure_send(Ecore_Wl_Window *win, int w, int h); | 13 | static void _ecore_wl_window_configure_send(Ecore_Wl_Window *win, int w, int h, int edges); |
14 | static char *_ecore_wl_window_id_str_get(unsigned int win_id); | 14 | static char *_ecore_wl_window_id_str_get(unsigned int win_id); |
15 | 15 | ||
16 | /* local variables */ | 16 | /* local variables */ |
@@ -219,17 +219,6 @@ ecore_wl_window_buffer_attach(Ecore_Wl_Window *win, struct wl_buffer *buffer, in | |||
219 | case ECORE_WL_WINDOW_BUFFER_TYPE_SHM: | 219 | case ECORE_WL_WINDOW_BUFFER_TYPE_SHM: |
220 | if (win->surface) | 220 | if (win->surface) |
221 | { | 221 | { |
222 | if (win->edges & 4) // resizing from the left | ||
223 | x = win->server.w - win->allocation.w; | ||
224 | else | ||
225 | x = 0; | ||
226 | |||
227 | if (win->edges & 1) // resizing from the top | ||
228 | y = win->server.h - win->allocation.h; | ||
229 | else | ||
230 | y = 0; | ||
231 | |||
232 | win->edges = 0; | ||
233 | win->has_buffer = (buffer != NULL); | 222 | win->has_buffer = (buffer != NULL); |
234 | 223 | ||
235 | /* if (buffer) */ | 224 | /* if (buffer) */ |
@@ -357,9 +346,8 @@ ecore_wl_window_maximized_set(Ecore_Wl_Window *win, Eina_Bool maximized) | |||
357 | if (win->shell_surface) | 346 | if (win->shell_surface) |
358 | wl_shell_surface_set_toplevel(win->shell_surface); | 347 | wl_shell_surface_set_toplevel(win->shell_surface); |
359 | win->type = ECORE_WL_WINDOW_TYPE_TOPLEVEL; | 348 | win->type = ECORE_WL_WINDOW_TYPE_TOPLEVEL; |
360 | _ecore_wl_window_configure_send(win, win->saved.w, win->saved.h); | 349 | _ecore_wl_window_configure_send(win, win->saved.w, win->saved.h, 0); |
361 | } | 350 | } |
362 | win->edges = 0; | ||
363 | } | 351 | } |
364 | 352 | ||
365 | EAPI Eina_Bool | 353 | EAPI Eina_Bool |
@@ -397,9 +385,8 @@ ecore_wl_window_fullscreen_set(Ecore_Wl_Window *win, Eina_Bool fullscreen) | |||
397 | if (win->shell_surface) | 385 | if (win->shell_surface) |
398 | wl_shell_surface_set_toplevel(win->shell_surface); | 386 | wl_shell_surface_set_toplevel(win->shell_surface); |
399 | win->type = ECORE_WL_WINDOW_TYPE_TOPLEVEL; | 387 | win->type = ECORE_WL_WINDOW_TYPE_TOPLEVEL; |
400 | _ecore_wl_window_configure_send(win, win->saved.w, win->saved.h); | 388 | _ecore_wl_window_configure_send(win, win->saved.w, win->saved.h, 0); |
401 | } | 389 | } |
402 | win->edges = 0; | ||
403 | } | 390 | } |
404 | 391 | ||
405 | EAPI Eina_Bool | 392 | EAPI Eina_Bool |
@@ -719,10 +706,7 @@ _ecore_wl_window_cb_configure(void *data, struct wl_shell_surface *shell_surface | |||
719 | 706 | ||
720 | if ((win->allocation.w != w) || (win->allocation.h != h)) | 707 | if ((win->allocation.w != w) || (win->allocation.h != h)) |
721 | { | 708 | { |
722 | if (win->type == ECORE_WL_WINDOW_TYPE_TOPLEVEL) | 709 | _ecore_wl_window_configure_send(win, w, h, edges); |
723 | win->edges = edges; | ||
724 | |||
725 | _ecore_wl_window_configure_send(win, w, h); | ||
726 | } | 710 | } |
727 | } | 711 | } |
728 | 712 | ||
@@ -761,7 +745,7 @@ _ecore_wl_window_cb_surface_leave(void *data, struct wl_surface *surface, struct | |||
761 | } | 745 | } |
762 | 746 | ||
763 | static void | 747 | static void |
764 | _ecore_wl_window_configure_send(Ecore_Wl_Window *win, int w, int h) | 748 | _ecore_wl_window_configure_send(Ecore_Wl_Window *win, int w, int h, int edges) |
765 | { | 749 | { |
766 | Ecore_Wl_Event_Window_Configure *ev; | 750 | Ecore_Wl_Event_Window_Configure *ev; |
767 | 751 | ||
@@ -774,6 +758,7 @@ _ecore_wl_window_configure_send(Ecore_Wl_Window *win, int w, int h) | |||
774 | ev->y = win->allocation.y; | 758 | ev->y = win->allocation.y; |
775 | ev->w = w; | 759 | ev->w = w; |
776 | ev->h = h; | 760 | ev->h = h; |
761 | ev->edges = edges; | ||
777 | ecore_event_add(ECORE_WL_EVENT_WINDOW_CONFIGURE, ev, NULL, NULL); | 762 | ecore_event_add(ECORE_WL_EVENT_WINDOW_CONFIGURE, ev, NULL, NULL); |
778 | } | 763 | } |
779 | 764 | ||
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index 4b99563e60..901ff4e01d 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c | |||
@@ -275,7 +275,7 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_ | |||
275 | 275 | ||
276 | win = wdata->win; | 276 | win = wdata->win; |
277 | 277 | ||
278 | _ecore_evas_wayland_resize_edge_set(ee, win->edges); | 278 | _ecore_evas_wayland_resize_edge_set(ee, ev->edges); |
279 | 279 | ||
280 | win->server.w = win->allocation.w; | 280 | win->server.w = win->allocation.w; |
281 | win->server.h = win->allocation.h; | 281 | win->server.h = win->allocation.h; |
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c index 6fd5627265..1709c50acf 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c | |||
@@ -330,9 +330,6 @@ _ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h) | |||
330 | 330 | ||
331 | win = wdata->win; | 331 | win = wdata->win; |
332 | 332 | ||
333 | _ecore_evas_wayland_egl_resize_edge_set(ee, win->edges); | ||
334 | win->edges = 0; | ||
335 | |||
336 | win->server.w = win->allocation.w; | 333 | win->server.w = win->allocation.w; |
337 | win->server.h = win->allocation.h; | 334 | win->server.h = win->allocation.h; |
338 | ecore_wl_window_update_size(wdata->win, w, h); | 335 | ecore_wl_window_update_size(wdata->win, w, h); |
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c index 9e8fc4d2c4..05060a7e3f 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c | |||
@@ -324,9 +324,6 @@ _ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h) | |||
324 | 324 | ||
325 | win = wdata->win; | 325 | win = wdata->win; |
326 | 326 | ||
327 | _ecore_evas_wayland_shm_resize_edge_set(ee, win->edges); | ||
328 | win->edges = 0; | ||
329 | |||
330 | win->server.w = win->allocation.w; | 327 | win->server.w = win->allocation.w; |
331 | win->server.h = win->allocation.h; | 328 | win->server.h = win->allocation.h; |
332 | ecore_wl_window_update_size(wdata->win, w, h); | 329 | ecore_wl_window_update_size(wdata->win, w, h); |