forked from enlightenment/efl
ecore_evas_x: Track changes in framespace size
If the framespace size has changed and by accident (or in fact, by design) the evas size + framespace size is equal to the size sent by the X server, ecore_evas_x was skipping the resize event. This patch adds a tracking of the framespace size so that we redraw the canvas if it changed. This will fix issues with the main menu (since it's in the framespace, 23 pixels tall with the default theme & scale). Note that all this is partly because the ecore evas size is the size without the framespace, so weird calculations are made during resize... Ref T5482
This commit is contained in:
parent
4488c51c5f
commit
76a668f022
|
@ -235,6 +235,10 @@ struct _Ecore_Evas
|
|||
int w, h;
|
||||
} expecting_resize;
|
||||
|
||||
struct {
|
||||
int w, h;
|
||||
} framespace;
|
||||
|
||||
struct {
|
||||
Eina_Hash *cursors;
|
||||
char *title;
|
||||
|
|
|
@ -1612,6 +1612,7 @@ _ecore_evas_x_event_window_configure(void *data EINA_UNUSED, int type EINA_UNUSE
|
|||
Ecore_Evas *ee;
|
||||
Ecore_X_Event_Window_Configure *e;
|
||||
Ecore_Evas_Engine_Data_X11 *edata;
|
||||
Eina_Bool framespace_resized = EINA_FALSE;
|
||||
int fw = 0, fh = 0, w, h;
|
||||
|
||||
e = event;
|
||||
|
@ -1646,8 +1647,16 @@ _ecore_evas_x_event_window_configure(void *data EINA_UNUSED, int type EINA_UNUSE
|
|||
if (!ECORE_EVAS_PORTRAIT(ee))
|
||||
SWAP_INT(fw, fh);
|
||||
|
||||
if ((fw != ee->framespace.w) || (fh != ee->framespace.h))
|
||||
{
|
||||
ee->framespace.w = fw;
|
||||
ee->framespace.h = fh;
|
||||
framespace_resized = EINA_TRUE;
|
||||
}
|
||||
|
||||
if (((ee->w + fw) != e->w) || ((ee->h + fh) != e->h) ||
|
||||
((ee->req.w + fw) != e->w) || ((ee->req.h + fh) != e->h))
|
||||
((ee->req.w + fw) != e->w) || ((ee->req.h + fh) != e->h) ||
|
||||
framespace_resized)
|
||||
{
|
||||
w = e->w;
|
||||
h = e->h;
|
||||
|
|
Loading…
Reference in New Issue