From dce9c89e589fa20e30166e09a019e1b8d8216601 Mon Sep 17 00:00:00 2001 From: Hosang Kim Date: Thu, 1 Feb 2018 17:00:05 +0900 Subject: [PATCH] ecore_wl2: add function to set window size by client. Change-Id: I5b69389b97c84d9592f6c64fa799035c923e714f --- src/lib/ecore_wl2/ecore_wl2_window.c | 37 ++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 2b79290..0925969 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -154,6 +154,27 @@ _ecore_wl2_window_configure_send(Ecore_Wl2_Window *win) _ecore_wl2_window_deactivate_send(win); } +//TIZEN_ONLY(20180201) : add function to set window size by client. +static void +_ecore_wl2_window_configure_send_by_client(Ecore_Wl2_Window *win) +{ + Ecore_Wl2_Event_Window_Configure *ev; + + ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Configure)); + if (!ev) return; + + ev->win = win->id; + ev->event_win = win->id; + ev->x = win->saved.x; + ev->y = win->saved.y; + ev->w = win->set_config.geometry.w; + ev->h = win->set_config.geometry.h; + ev->edges = !!win->req_config.resizing; + + ecore_event_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE, ev, NULL, NULL); +} +// + static void _configure_complete(Ecore_Wl2_Window *window) { @@ -755,9 +776,13 @@ _ecore_wl2_window_tz_ext_init(Ecore_Wl2_Window *window) (uint32_t)angle, x, y, w, h); if ((rot == (i * 90)) && - ((window->saved.w != w) || (window->saved.h != h))) + ((window->set_config.geometry.w != w) || (window->set_config.geometry.h != h))) { - _ecore_wl2_window_configure_send(window); + //TIZEN_ONLY(20180201) : add function to set window size by client. + window->set_config.geometry.w = w; + window->set_config.geometry.h = h; + _ecore_wl2_window_configure_send_by_client(window); + // } } } @@ -2198,9 +2223,13 @@ ecore_wl2_window_rotation_geometry_set(Ecore_Wl2_Window *win, int rot, int x, in rotation = ecore_wl2_window_rotation_get(win); if ((rotation % 90 != 0) || (rotation / 90 > 3) || (rotation < 0)) return; if ((i == (rotation / 90)) && - ((win->saved.w != w) || (win->saved.h != h))) + ((win->set_config.geometry.w != w) || (win->set_config.geometry.h != h))) { - _ecore_wl2_window_configure_send(win); + //TIZEN_ONLY(20180201) : add function to set window size by client. + win->set_config.geometry.w = w; + win->set_config.geometry.h = h; + _ecore_wl2_window_configure_send_by_client(win); + // } } -- 2.7.4