diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/ecore_wayland/Ecore_Wayland.h | 3 | ||||
-rw-r--r-- | src/lib/ecore_wayland/ecore_wl_window.c | 27 |
2 files changed, 8 insertions, 22 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 | ||