ee->prop.maximized = ecore_wl_window_maximized_get(wdata->win);
ee->prop.fullscreen = ecore_wl_window_fullscreen_get(wdata->win);
- if ((prev_max != ee->prop.maximized) ||
- (prev_full != ee->prop.fullscreen))
- {
- _ecore_evas_wl_common_state_update(ee);
-
- if (prev_full != ee->prop.fullscreen)
- _ecore_evas_wl_common_border_update(ee);
- }
-
- if (ee->prop.fullscreen)
- {
- _ecore_evas_wl_common_move(ee, ev->x, ev->y);
- ee->engine.func->fn_resize(ee, ev->w, ev->h);
-
- return ECORE_CALLBACK_PASS_ON;
- }
-
- if ((ee->x != ev->x) || (ee->y != ev->y))
- {
- ee->req.x = ev->x;
- ee->req.y = ev->y;
- if (ee->func.fn_move) ee->func.fn_move(ee);
- }
-
nw = ev->w;
nh = ev->h;
evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
if ((ee->rotation == 90) || (ee->rotation == 270))
{
- if (!ee->prop.maximized) nw = ev->w - fh;
+ nw = ev->w - fh;
nh = ev->h - fw;
}
else
{
- if (!ee->prop.maximized) nw = ev->w - fw;
+ nw = ev->w - fw;
nh = ev->h - fh;
}
}
- if (ee->prop.min.w > nw) nw = ee->prop.min.w;
- else if (nw > ee->prop.max.w) nw = ee->prop.max.w;
- if (ee->prop.min.h > nh) nh = ee->prop.min.h;
- else if (nh > ee->prop.max.h) nh = ee->prop.max.h;
+ if (prev_full != ee->prop.fullscreen)
+ _ecore_evas_wl_common_border_update(ee);
- if ((ee->w != nw) || (ee->h != nh))
+ if (ee->prop.fullscreen)
{
- ee->req.w = nw;
- ee->req.h = nh;
- ee->w = nw;
- ee->h = nh;
- if (ee->func.fn_resize) ee->func.fn_resize(ee);
-
- if ((ee->rotation == 90) || (ee->rotation == 270))
- {
- evas_output_size_set(ee->evas, ev->h, ev->w);
- evas_output_viewport_set(ee->evas, 0, 0, ev->h, ev->w);
- }
- else
- {
- evas_output_size_set(ee->evas, ev->w, ev->h);
- evas_output_viewport_set(ee->evas, 0, 0, ev->w, ev->h);
- }
+ _ecore_evas_wl_common_move(ee, ev->x, ev->y);
+ _ecore_evas_wl_common_resize(ee, nw, nh);
- if (wdata->frame)
- evas_object_resize(wdata->frame, ev->w, ev->h);
+ if (prev_full != ee->prop.fullscreen)
+ _ecore_evas_wl_common_state_update(ee);
- if (wdata->win)
- {
- _ecore_evas_wayland_resize_edge_set(ee, ev->edges);
- ecore_wl_window_update_size(wdata->win, ev->w, ev->h);
- }
+ return ECORE_CALLBACK_PASS_ON;
}
+ if ((ee->x != ev->x) || (ee->y != ev->y))
+ _ecore_evas_wl_common_move(ee, ev->x, ev->y);
+
+ if ((ee->w != ev->w) || (ee->h != ev->h))
+ _ecore_evas_wl_common_resize(ee, nw, nh);
+
+ if ((prev_max != ee->prop.maximized) ||
+ (prev_full != ee->prop.fullscreen))
+ _ecore_evas_wl_common_state_update(ee);
+
return ECORE_CALLBACK_PASS_ON;
}
_ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h)
{
Ecore_Evas_Engine_Wl_Data *wdata = ee->engine.data;
+ int orig_w, orig_h;
+ int ow, oh;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ee->req.w = w;
ee->req.h = h;
+ orig_w = w;
+ orig_h = h;
if (!ee->prop.fullscreen)
{
if (ee->prop.min.h > h) h = ee->prop.min.h;
else if (h > ee->prop.max.h) h = ee->prop.max.h;
+ orig_w = w;
+ orig_h = h;
+
evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
- w += fw;
- h += fh;
+ if ((ee->rotation == 90) || (ee->rotation == 270))
+ {
+ w += fh;
+ h += fw;
+ }
+ else
+ {
+ w += fw;
+ h += fh;
+ }
}
- if ((ee->w != w) || (ee->h != h))
+ evas_output_size_get(ee->evas, &ow, &oh);
+ if ((ow != w) || (oh != h))
{
- ee->w = w;
- ee->h = h;
+ ee->w = orig_w;
+ ee->h = orig_h;
if ((ee->rotation == 90) || (ee->rotation == 270))
{
if (wdata->frame)
evas_object_resize(wdata->frame, w, h);
+
+ /* if (wdata->win) */
+ /* ecore_wl_window_update_size(wdata->win, w, h); */
+
+ if (ee->func.fn_resize) ee->func.fn_resize(ee);
}
}
if (ee->prop.maximized == max) return;
wdata = ee->engine.data;
ecore_wl_window_maximized_set(wdata->win, max);
- _ecore_evas_wl_common_state_update(ee);
+// _ecore_evas_wl_common_state_update(ee);
}
void
if (ee->prop.fullscreen == full) return;
wdata = ee->engine.data;
ecore_wl_window_fullscreen_set(wdata->win, full);
- _ecore_evas_wl_common_state_update(ee);
+// _ecore_evas_wl_common_state_update(ee);
}
void
# include <Evas_Engine_Wayland_Egl.h>
/* local function prototypes */
-static void _ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h);
static void _ecore_evas_wl_move_resize(Ecore_Evas *ee, int x, int y, int w, int h);
static void _ecore_evas_wl_show(Ecore_Evas *ee);
static void _ecore_evas_wl_hide(Ecore_Evas *ee);
NULL, // post_render_set
_ecore_evas_wl_common_move,
NULL, // managed_move
- _ecore_evas_wl_resize,
+ _ecore_evas_wl_common_resize,
_ecore_evas_wl_move_resize,
_ecore_evas_wl_rotation_set,
NULL, // shaped_set
}
static void
-_ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h)
-{
- Ecore_Evas_Engine_Wl_Data *wdata;
- LOGFN(__FILE__, __LINE__, __FUNCTION__);
- int orig_w, orig_h;
- int ow, oh;
-
- if (!ee) return;
- if (w < 1) w = 1;
- if (h < 1) h = 1;
-
- ee->req.w = w;
- ee->req.h = h;
- orig_w = w;
- orig_h = h;
-
- wdata = ee->engine.data;
-
- if (!ee->prop.fullscreen)
- {
- int fw = 0, fh = 0;
-
- if (ee->prop.min.w > w) w = ee->prop.min.w;
- else if (w > ee->prop.max.w) w = ee->prop.max.w;
- if (ee->prop.min.h > h) h = ee->prop.min.h;
- else if (h > ee->prop.max.h) h = ee->prop.max.h;
-
- orig_w = w;
- orig_h = h;
-
- evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
- if ((ee->rotation == 90) || (ee->rotation == 270))
- {
- w += fh;
- h += fw;
- }
- else
- {
- w += fw;
- h += fh;
- }
- }
-
- evas_output_size_get(ee->evas, &ow, &oh);
- if ((ow != w) || (oh != h))
- {
- ee->w = orig_w;
- ee->h = orig_h;
-
- if ((ee->rotation == 90) || (ee->rotation == 270))
- {
- evas_output_size_set(ee->evas, h, w);
- evas_output_viewport_set(ee->evas, 0, 0, h, w);
- }
- else
- {
- evas_output_size_set(ee->evas, w, h);
- evas_output_viewport_set(ee->evas, 0, 0, w, h);
- }
-
- if (ee->prop.avoid_damage)
- {
- int pdam = 0;
-
- pdam = ecore_evas_avoid_damage_get(ee);
- ecore_evas_avoid_damage_set(ee, 0);
- ecore_evas_avoid_damage_set(ee, pdam);
- }
-
- if (wdata->frame)
- evas_object_resize(wdata->frame, w, h);
-
- if (wdata->win)
- ecore_wl_window_update_size(wdata->win, w, h);
-
- if (ee->func.fn_resize) ee->func.fn_resize(ee);
- }
-}
-
-static void
_ecore_evas_wl_move_resize(Ecore_Evas *ee, int x, int y, int w, int h)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if ((ee->x != x) || (ee->y != y))
_ecore_evas_wl_common_move(ee, x, y);
if ((ee->w != w) || (ee->h != h))
- _ecore_evas_wl_resize(ee, w, h);
+ _ecore_evas_wl_common_resize(ee, w, h);
}
static void
# include <sys/mman.h>
/* local function prototypes */
-static void _ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h);
static void _ecore_evas_wl_move_resize(Ecore_Evas *ee, int x, int y, int w, int h);
static void _ecore_evas_wl_show(Ecore_Evas *ee);
static void _ecore_evas_wl_hide(Ecore_Evas *ee);
NULL, // post_render_set
_ecore_evas_wl_common_move,
NULL, // managed_move
- _ecore_evas_wl_resize,
+ _ecore_evas_wl_common_resize,
_ecore_evas_wl_move_resize,
_ecore_evas_wl_rotation_set,
NULL, // shaped_set
}
static void
-_ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h)
-{
- Ecore_Evas_Engine_Wl_Data *wdata;
- int orig_w, orig_h;
- int ow, oh;
-
- LOGFN(__FILE__, __LINE__, __FUNCTION__);
-
- if (!ee) return;
- if (w < 1) w = 1;
- if (h < 1) h = 1;
-
- ee->req.w = w;
- ee->req.h = h;
- orig_w = w;
- orig_h = h;
-
- wdata = ee->engine.data;
-
- if (!ee->prop.fullscreen)
- {
- int fw = 0, fh = 0;
-
- if (ee->prop.min.w > w) w = ee->prop.min.w;
- else if (w > ee->prop.max.w) w = ee->prop.max.w;
- if (ee->prop.min.h > h) h = ee->prop.min.h;
- else if (h > ee->prop.max.h) h = ee->prop.max.h;
-
- orig_w = w;
- orig_h = h;
-
- evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
- if ((ee->rotation == 90) || (ee->rotation == 270))
- {
- w += fh;
- h += fw;
- }
- else
- {
- w += fw;
- h += fh;
- }
- }
-
- evas_output_size_get(ee->evas, &ow, &oh);
- if ((ow != w) || (oh != h))
- {
- ee->w = orig_w;
- ee->h = orig_h;
-
- if ((ee->rotation == 90) || (ee->rotation == 270))
- {
- evas_output_size_set(ee->evas, h, w);
- evas_output_viewport_set(ee->evas, 0, 0, h, w);
- }
- else
- {
- evas_output_size_set(ee->evas, w, h);
- evas_output_viewport_set(ee->evas, 0, 0, w, h);
- }
-
- if (ee->prop.avoid_damage)
- {
- int pdam = 0;
-
- pdam = ecore_evas_avoid_damage_get(ee);
- ecore_evas_avoid_damage_set(ee, 0);
- ecore_evas_avoid_damage_set(ee, pdam);
- }
-
- if (wdata->frame)
- evas_object_resize(wdata->frame, w, h);
-
- if (wdata->win)
- ecore_wl_window_update_size(wdata->win, w, h);
-
- if (ee->func.fn_resize) ee->func.fn_resize(ee);
- }
-}
-
-static void
_ecore_evas_wl_move_resize(Ecore_Evas *ee, int x, int y, int w, int h)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if ((ee->x != x) || (ee->y != y))
_ecore_evas_wl_common_move(ee, x, y);
if ((ee->w != w) || (ee->h != h))
- _ecore_evas_wl_resize(ee, w, h);
+ _ecore_evas_wl_common_resize(ee, w, h);
}
static void