forked from enlightenment/efl
Add function for setting/resetting window resize edges to remove
duplicated code. Resize the frame object before we update the window saved size. Remove (again) call to _ecore_evas_wayland_resize and set the resize edge of the window. NB: The call to _ecore_evas_wayland_resize ends up sending duplicate configure events here, hence whey it is removed. Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
6337b63977
commit
2c9a19503f
|
@ -36,6 +36,7 @@ EVAS_SMART_SUBCLASS_NEW(_smart_frame_type, _ecore_evas_wl_frame,
|
|||
static int _ecore_evas_wl_init_count = 0;
|
||||
static Ecore_Event_Handler *_ecore_evas_wl_event_hdls[5];
|
||||
|
||||
static void _ecore_evas_wayland_resize_edge_set(Ecore_Evas *ee, int edge);
|
||||
static void _ecore_evas_wayland_resize(Ecore_Evas *ee, int location);
|
||||
|
||||
/* local function prototypes */
|
||||
|
@ -264,20 +265,20 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
|
|||
evas_output_viewport_set(ee->evas, 0, 0, ev->w, ev->h);
|
||||
}
|
||||
|
||||
if (wdata->frame)
|
||||
evas_object_resize(wdata->frame, ev->w, ev->h);
|
||||
|
||||
if (wdata->win)
|
||||
{
|
||||
Ecore_Wl_Window *win;
|
||||
|
||||
win = wdata->win;
|
||||
|
||||
_ecore_evas_wayland_resize_edge_set(ee, win->edges);
|
||||
|
||||
win->server_allocation = win->allocation;
|
||||
ecore_wl_window_update_size(wdata->win, ev->w, ev->h);
|
||||
|
||||
_ecore_evas_wayland_resize(ee, win->edges);
|
||||
}
|
||||
|
||||
if (wdata->frame)
|
||||
evas_object_resize(wdata->frame, ev->w, ev->h);
|
||||
}
|
||||
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
|
@ -1267,6 +1268,24 @@ _ecore_evas_wl_common_screen_dpi_get(const Ecore_Evas *ee EINA_UNUSED, int *xdpi
|
|||
if (ydpi) *ydpi = dpi;
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_wayland_resize_edge_set(Ecore_Evas *ee, int edge)
|
||||
{
|
||||
if (!ee) return;
|
||||
if (!strcmp(ee->driver, "wayland_shm"))
|
||||
{
|
||||
#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM
|
||||
_ecore_evas_wayland_shm_resize_edge_set(ee, edge);
|
||||
#endif
|
||||
}
|
||||
else if (!strcmp(ee->driver, "wayland_egl"))
|
||||
{
|
||||
#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
|
||||
_ecore_evas_wayland_egl_resize_edge_set(ee, edge);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_wayland_resize(Ecore_Evas *ee, int location)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue