forked from enlightenment/enlightenment
and if apps are fast at requesting lots of geom just after map.. handle it
properly with respect to frames... SVN revision: 12942
This commit is contained in:
parent
37fa60dd0b
commit
084229f03d
|
@ -358,6 +358,17 @@ e_border_move(E_Border *bd, int x, int y)
|
||||||
E_Event_Border_Move *ev;
|
E_Event_Border_Move *ev;
|
||||||
|
|
||||||
E_OBJECT_CHECK(bd);
|
E_OBJECT_CHECK(bd);
|
||||||
|
if (bd->new_client)
|
||||||
|
{
|
||||||
|
E_Border_Pending_Move_Resize *pnd;
|
||||||
|
|
||||||
|
pnd = E_NEW(E_Border_Pending_Move_Resize, 1);
|
||||||
|
pnd->move = 1;
|
||||||
|
pnd->x = x;
|
||||||
|
pnd->y = y;
|
||||||
|
bd->pending_move_resize = evas_list_append(bd->pending_move_resize, pnd);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ((x == bd->x) && (y == bd->y)) return;
|
if ((x == bd->x) && (y == bd->y)) return;
|
||||||
bd->x = x;
|
bd->x = x;
|
||||||
bd->y = y;
|
bd->y = y;
|
||||||
|
@ -380,6 +391,17 @@ e_border_resize(E_Border *bd, int w, int h)
|
||||||
{
|
{
|
||||||
E_Event_Border_Resize *ev;
|
E_Event_Border_Resize *ev;
|
||||||
E_OBJECT_CHECK(bd);
|
E_OBJECT_CHECK(bd);
|
||||||
|
if (bd->new_client)
|
||||||
|
{
|
||||||
|
E_Border_Pending_Move_Resize *pnd;
|
||||||
|
|
||||||
|
pnd = E_NEW(E_Border_Pending_Move_Resize, 1);
|
||||||
|
pnd->resize = 1;
|
||||||
|
pnd->w = w;
|
||||||
|
pnd->h = h;
|
||||||
|
bd->pending_move_resize = evas_list_append(bd->pending_move_resize, pnd);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ((w == bd->w) && (h == bd->h)) return;
|
if ((w == bd->w) && (h == bd->h)) return;
|
||||||
bd->w = w;
|
bd->w = w;
|
||||||
bd->h = h;
|
bd->h = h;
|
||||||
|
@ -406,6 +428,20 @@ e_border_move_resize(E_Border *bd, int x, int y, int w, int h)
|
||||||
E_Event_Border_Resize *rev;
|
E_Event_Border_Resize *rev;
|
||||||
|
|
||||||
E_OBJECT_CHECK(bd);
|
E_OBJECT_CHECK(bd);
|
||||||
|
if (bd->new_client)
|
||||||
|
{
|
||||||
|
E_Border_Pending_Move_Resize *pnd;
|
||||||
|
|
||||||
|
pnd = E_NEW(E_Border_Pending_Move_Resize, 1);
|
||||||
|
pnd->move = 1;
|
||||||
|
pnd->resize = 1;
|
||||||
|
pnd->x = x;
|
||||||
|
pnd->y = y;
|
||||||
|
pnd->w = w;
|
||||||
|
pnd->h = h;
|
||||||
|
bd->pending_move_resize = evas_list_append(bd->pending_move_resize, pnd);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ((x == bd->x) && (y == bd->y) && (w == bd->w) && (h == bd->h)) return;
|
if ((x == bd->x) && (y == bd->y) && (w == bd->w) && (h == bd->h)) return;
|
||||||
bd->x = x;
|
bd->x = x;
|
||||||
bd->y = y;
|
bd->y = y;
|
||||||
|
@ -809,6 +845,11 @@ e_border_idler_before(void)
|
||||||
static void
|
static void
|
||||||
_e_border_free(E_Border *bd)
|
_e_border_free(E_Border *bd)
|
||||||
{
|
{
|
||||||
|
while (bd->pending_move_resize)
|
||||||
|
{
|
||||||
|
free(bd->pending_move_resize->data);
|
||||||
|
bd->pending_move_resize = evas_list_remove_list(bd->pending_move_resize, bd->pending_move_resize);
|
||||||
|
}
|
||||||
if (bd->border_menu)
|
if (bd->border_menu)
|
||||||
{
|
{
|
||||||
e_object_del(E_OBJECT(bd->border_menu));
|
e_object_del(E_OBJECT(bd->border_menu));
|
||||||
|
@ -2100,6 +2141,7 @@ _e_border_eval(E_Border *bd)
|
||||||
|
|
||||||
if (bd->new_client)
|
if (bd->new_client)
|
||||||
{
|
{
|
||||||
|
bd->new_client = 0;
|
||||||
printf("##- NEW CLIENT SETUP 0x%x\n", bd->client.win);
|
printf("##- NEW CLIENT SETUP 0x%x\n", bd->client.win);
|
||||||
if (bd->re_manage)
|
if (bd->re_manage)
|
||||||
{
|
{
|
||||||
|
@ -2181,6 +2223,28 @@ _e_border_eval(E_Border *bd)
|
||||||
bd->changes.pos = 1;
|
bd->changes.pos = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
while (bd->pending_move_resize)
|
||||||
|
{
|
||||||
|
E_Border_Pending_Move_Resize *pnd;
|
||||||
|
|
||||||
|
pnd = bd->pending_move_resize->data;
|
||||||
|
if (pnd->move)
|
||||||
|
{
|
||||||
|
bd->x = pnd->x - bd->client_inset.l;
|
||||||
|
bd->y = pnd->y - bd->client_inset.t;
|
||||||
|
bd->changes.pos = 1;
|
||||||
|
}
|
||||||
|
if (pnd->resize)
|
||||||
|
{
|
||||||
|
bd->w = pnd->w + bd->client_inset.l + bd->client_inset.r;
|
||||||
|
bd->h = pnd->h + bd->client_inset.t + bd->client_inset.b;
|
||||||
|
bd->client.w = pnd->w;
|
||||||
|
bd->client.h = pnd->h;
|
||||||
|
bd->changes.size = 1;
|
||||||
|
}
|
||||||
|
free(pnd);
|
||||||
|
bd->pending_move_resize = evas_list_remove_list(bd->pending_move_resize, bd->pending_move_resize);
|
||||||
|
}
|
||||||
ecore_x_icccm_move_resize_send(bd->client.win,
|
ecore_x_icccm_move_resize_send(bd->client.win,
|
||||||
bd->x + bd->client_inset.l,
|
bd->x + bd->client_inset.l,
|
||||||
bd->y + bd->client_inset.t,
|
bd->y + bd->client_inset.t,
|
||||||
|
@ -2352,7 +2416,6 @@ _e_border_eval(E_Border *bd)
|
||||||
bd->changes.reset_gravity = 0;
|
bd->changes.reset_gravity = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bd->new_client = 0;
|
|
||||||
bd->changed = 0;
|
bd->changed = 0;
|
||||||
|
|
||||||
bd->changes.stack = 0;
|
bd->changes.stack = 0;
|
||||||
|
|
|
@ -16,14 +16,15 @@ typedef enum _E_Transition
|
||||||
E_TRANSITION_DECELERATE
|
E_TRANSITION_DECELERATE
|
||||||
} E_Transition;
|
} E_Transition;
|
||||||
|
|
||||||
typedef struct _E_Border E_Border;
|
typedef struct _E_Border E_Border;
|
||||||
typedef struct _E_Event_Border_Resize E_Event_Border_Resize;
|
typedef struct _E_Border_Pending_Move_Resize E_Border_Pending_Move_Resize;
|
||||||
typedef struct _E_Event_Border_Move E_Event_Border_Move;
|
typedef struct _E_Event_Border_Resize E_Event_Border_Resize;
|
||||||
typedef struct _E_Event_Border_Add E_Event_Border_Add;
|
typedef struct _E_Event_Border_Move E_Event_Border_Move;
|
||||||
typedef struct _E_Event_Border_Remove E_Event_Border_Remove;
|
typedef struct _E_Event_Border_Add E_Event_Border_Add;
|
||||||
typedef struct _E_Event_Border_Show E_Event_Border_Show;
|
typedef struct _E_Event_Border_Remove E_Event_Border_Remove;
|
||||||
typedef struct _E_Event_Border_Hide E_Event_Border_Hide;
|
typedef struct _E_Event_Border_Show E_Event_Border_Show;
|
||||||
typedef struct _E_Event_Border_Desk_Set E_Event_Border_Desk_Set;
|
typedef struct _E_Event_Border_Hide E_Event_Border_Hide;
|
||||||
|
typedef struct _E_Event_Border_Desk_Set E_Event_Border_Desk_Set;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#ifndef E_BORDER_H
|
#ifndef E_BORDER_H
|
||||||
|
@ -178,6 +179,7 @@ struct _E_Border
|
||||||
|
|
||||||
Evas_List *stick_desks;
|
Evas_List *stick_desks;
|
||||||
E_Menu *border_menu;
|
E_Menu *border_menu;
|
||||||
|
Evas_List *pending_move_resize;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
unsigned int visible : 1;
|
unsigned int visible : 1;
|
||||||
|
@ -192,6 +194,13 @@ struct _E_Border
|
||||||
} changes;
|
} changes;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct _E_Border_Pending_Move_Resize
|
||||||
|
{
|
||||||
|
int x, y, w, h;
|
||||||
|
unsigned char move : 1;
|
||||||
|
unsigned char resize : 1;
|
||||||
|
};
|
||||||
|
|
||||||
struct _E_Event_Border_Resize
|
struct _E_Event_Border_Resize
|
||||||
{
|
{
|
||||||
E_Border *border;
|
E_Border *border;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#ifdef E_TYPEDEFS
|
#ifdef E_TYPEDEFS
|
||||||
|
|
||||||
/* Object safety/debugging checks */
|
/* Object safety/debugging checks */
|
||||||
/* */
|
/* */
|
||||||
/* OBJECT_PARANOIA_CHECK is paranoid and checkes pointers and traps segv's */
|
/* OBJECT_PARANOIA_CHECK is paranoid and checkes pointers and traps segv's */
|
||||||
|
@ -8,7 +9,7 @@
|
||||||
/* OBJECT_CHECK is a simple null pointer and magic number check with no */
|
/* OBJECT_CHECK is a simple null pointer and magic number check with no */
|
||||||
/* debug output */
|
/* debug output */
|
||||||
|
|
||||||
#define OBJECT_PARANOIA_CHECK
|
//#define OBJECT_PARANOIA_CHECK
|
||||||
//#define OBJECT_CHECK
|
//#define OBJECT_CHECK
|
||||||
|
|
||||||
#ifndef __GLIBC__
|
#ifndef __GLIBC__
|
||||||
|
|
Loading…
Reference in New Issue