forked from enlightenment/efl
Ecore_Evas (wayland): When we maximize windows, account for framespace
width and height so the window does not draw outside the output dimensions. Fixes ticket #1281 SVN revision: 75005
This commit is contained in:
parent
33d4af1e18
commit
cfe7431256
|
@ -957,6 +957,7 @@ _ecore_evas_wl_cb_window_configure(void *data __UNUSED__, int type __UNUSED__, v
|
||||||
{
|
{
|
||||||
Ecore_Evas *ee;
|
Ecore_Evas *ee;
|
||||||
Ecore_Wl_Event_Window_Configure *ev;
|
Ecore_Wl_Event_Window_Configure *ev;
|
||||||
|
int nw = 0, nh = 0;
|
||||||
|
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
|
@ -964,18 +965,30 @@ _ecore_evas_wl_cb_window_configure(void *data __UNUSED__, int type __UNUSED__, v
|
||||||
ee = ecore_event_window_match(ev->win);
|
ee = ecore_event_window_match(ev->win);
|
||||||
if (!ee) return ECORE_CALLBACK_PASS_ON;
|
if (!ee) return ECORE_CALLBACK_PASS_ON;
|
||||||
if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
|
if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
|
||||||
|
|
||||||
if ((ee->x != ev->x) || (ee->y != ev->y))
|
if ((ee->x != ev->x) || (ee->y != ev->y))
|
||||||
{
|
{
|
||||||
/* ee->x = ev->x; */
|
|
||||||
/* ee->y = ev->y; */
|
|
||||||
ee->req.x = ee->x;
|
ee->req.x = ee->x;
|
||||||
ee->req.y = ee->y;
|
ee->req.y = ee->y;
|
||||||
if (ee->func.fn_move) ee->func.fn_move(ee);
|
if (ee->func.fn_move) ee->func.fn_move(ee);
|
||||||
}
|
}
|
||||||
if ((ee->req.w != ev->w) || (ee->req.h != ev->h))
|
|
||||||
|
nw = ev->w;
|
||||||
|
nh = ev->h;
|
||||||
|
|
||||||
|
if (ee->prop.maximized)
|
||||||
{
|
{
|
||||||
ee->req.w = ev->w;
|
int fw = 0, fh = 0;
|
||||||
ee->req.h = ev->h;
|
|
||||||
|
evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
|
||||||
|
nw = ev->w - fw;
|
||||||
|
nh = ev->h - fh;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((ee->w != nw) || (ee->h != nh))
|
||||||
|
{
|
||||||
|
ee->req.w = nw;
|
||||||
|
ee->req.h = nh;
|
||||||
if (ee->func.fn_resize) ee->func.fn_resize(ee);
|
if (ee->func.fn_resize) ee->func.fn_resize(ee);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1100,6 +1100,7 @@ _ecore_evas_wl_cb_window_configure(void *data __UNUSED__, int type __UNUSED__, v
|
||||||
{
|
{
|
||||||
Ecore_Evas *ee;
|
Ecore_Evas *ee;
|
||||||
Ecore_Wl_Event_Window_Configure *ev;
|
Ecore_Wl_Event_Window_Configure *ev;
|
||||||
|
int nw = 0, nh = 0;
|
||||||
|
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
|
@ -1110,18 +1111,27 @@ _ecore_evas_wl_cb_window_configure(void *data __UNUSED__, int type __UNUSED__, v
|
||||||
|
|
||||||
if ((ee->x != ev->x) || (ee->y != ev->y))
|
if ((ee->x != ev->x) || (ee->y != ev->y))
|
||||||
{
|
{
|
||||||
/* ee->x = ev->x; */
|
|
||||||
/* ee->y = ev->y; */
|
|
||||||
ee->req.x = ee->x;
|
ee->req.x = ee->x;
|
||||||
ee->req.y = ee->y;
|
ee->req.y = ee->y;
|
||||||
if (ee->func.fn_move) ee->func.fn_move(ee);
|
if (ee->func.fn_move) ee->func.fn_move(ee);
|
||||||
}
|
}
|
||||||
if ((ee->req.w != ev->w) || (ee->req.h != ev->h))
|
|
||||||
|
nw = ev->w;
|
||||||
|
nh = ev->h;
|
||||||
|
|
||||||
|
if (ee->prop.maximized)
|
||||||
{
|
{
|
||||||
/* ee->w = ev->w; */
|
int fw = 0, fh = 0;
|
||||||
/* ee->h = ev->h; */
|
|
||||||
ee->req.w = ev->w;
|
evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
|
||||||
ee->req.h = ev->h;
|
nw = ev->w - fw;
|
||||||
|
nh = ev->h - fh;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((ee->w != nw) || (ee->h != nh))
|
||||||
|
{
|
||||||
|
ee->req.w = nw;
|
||||||
|
ee->req.h = nh;
|
||||||
if (ee->func.fn_resize) ee->func.fn_resize(ee);
|
if (ee->func.fn_resize) ee->func.fn_resize(ee);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue