Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h actions.c borders.c draw.c main.c pager.c x.c
Log Message:
Attempt to fix segfaults caused by draw queue trouble.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -3 -r1.136 -r1.137
--- E.h 18 Aug 2003 22:03:10 -0000 1.136
+++ E.h 28 Sep 2003 19:21:34 -0000 1.137
@@ -3036,6 +3036,8 @@
extern char themename[FILEPATH_LEN_MAX];
extern char *command;
extern char mustdel;
+
+#define DRAW_QUEUE_ENABLE 1
extern char queue_up;
extern Menu *all_task_menu;
extern Menu *task_menu[ENLIGHTENMENT_CONF_NUM_DESKTOPS];
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/actions.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -3 -r1.107 -r1.108
--- actions.c 28 Sep 2003 19:08:25 -0000 1.107
+++ actions.c 28 Sep 2003 19:21:34 -0000 1.108
@@ -1025,7 +1025,7 @@
ForceUpdatePagersForDesktop(desks.current);
EDBUG_RETURN(0);
}
- queue_up = 1;
+ queue_up = DRAW_QUEUE_ENABLE;
mode.mode = MODE_NONE;
if (mode.noewin)
mode.ewin = NULL;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -3 -r1.98 -r1.99
--- borders.c 28 Sep 2003 19:08:26 -0000 1.98
+++ borders.c 28 Sep 2003 19:21:34 -0000 1.99
@@ -2936,7 +2936,6 @@
spd = min;
}
ewin->w = b;
- queue_up = 1;
MoveResizeEwin(ewin, ewin->x, ewin->y, ewin->client.w, ewin->client.h);
XSync(disp, False);
break;
@@ -2995,7 +2994,6 @@
ewin->w = b;
ewin->x = d;
ewin->reqx = d;
- queue_up = 1;
MoveResizeEwin(ewin, ewin->x, ewin->y, ewin->client.w, ewin->client.h);
XSync(disp, False);
break;
@@ -3050,7 +3048,6 @@
spd = min;
}
ewin->h = b;
- queue_up = 1;
MoveResizeEwin(ewin, ewin->x, ewin->y, ewin->client.w, ewin->client.h);
XSync(disp, False);
break;
@@ -3109,7 +3106,6 @@
ewin->h = b;
ewin->y = d;
ewin->reqy = d;
- queue_up = 1;
MoveResizeEwin(ewin, ewin->x, ewin->y, ewin->client.w, ewin->client.h);
XSync(disp, False);
break;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/draw.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- draw.c 12 Jul 2003 15:04:31 -0000 1.32
+++ draw.c 28 Sep 2003 19:21:34 -0000 1.33
@@ -55,7 +55,7 @@
if ((lst[i]->win == dq->win) && (lst[i]->shape_propagate))
{
already = 1;
- i = num;
+ break;
}
}
}
@@ -66,7 +66,7 @@
if ((lst[i]->win == dq->win) && (lst[i]->text))
{
already = 1;
- i = num;
+ break;
}
}
}
@@ -78,7 +78,7 @@
&& (!lst[i]->text))
{
already = 1;
- i = num;
+ break;
}
}
}
@@ -89,7 +89,7 @@
if ((lst[i]->win == dq->win) && (lst[i]->pager))
{
already = 1;
- i = num;
+ break;
}
}
}
@@ -117,7 +117,7 @@
lst[i]->h +=
(dq->y + dq->h) - (lst[i]->y + lst[i]->h);
already = 1;
- i = num;
+ break;
}
}
}
@@ -155,10 +155,11 @@
break;
}
already = 1;
- i = num;
+ break;
}
}
}
+
if (already)
{
if (dq)
@@ -184,58 +185,62 @@
{
for (i = num - 1; i >= 0; i--)
{
- if (lst[i]->shape_propagate)
+ dq = lst[i];
+ if (dq->shape_propagate)
{
- PropagateShapes(lst[i]->win);
-/* printf("S %x\n", lst[i]->win); */
+/* printf("S %x\n", dq->win); */
+ if (WinExists(dq->win))
+ PropagateShapes(dq->win);
}
- else if (lst[i]->text)
+ else if (dq->text)
{
- TclassApply(lst[i]->iclass, lst[i]->win, lst[i]->w, lst[i]->h,
- lst[i]->active, lst[i]->sticky, lst[i]->state,
- lst[i]->expose, lst[i]->tclass, lst[i]->text);
- Efree(lst[i]->text);
-/* printf("T %x\n", lst[i]->win); */
+/* printf("T %x\n", dq->win); */
+ if (WinExists(dq->win))
+ TclassApply(dq->iclass, dq->win, dq->w, dq->h, dq->active,
+ dq->sticky, dq->state, dq->expose, dq->tclass,
+ dq->text);
+ Efree(dq->text);
}
- else if (lst[i]->iclass)
+ else if (dq->iclass)
{
- IclassApply(lst[i]->iclass, lst[i]->win, lst[i]->w, lst[i]->h,
- lst[i]->active, lst[i]->sticky, lst[i]->state, 0);
-/* printf("I %x\n", lst[i]->win); */
+/* printf("I %x\n", dq->win); */
+ if (WinExists(dq->win))
+ IclassApply(dq->iclass, dq->win, dq->w, dq->h, dq->active,
+ dq->sticky, dq->state, 0);
}
- else if (lst[i]->pager)
+ else if (dq->pager)
{
+/* printf("P %x\n", dq->win); */
if (FindItem
- ((char *)(lst[i]->pager), 0, LIST_FINDBY_POINTER,
+ ((char *)(dq->pager), 0, LIST_FINDBY_POINTER,
LIST_TYPE_PAGER))
- PagerForceUpdate(lst[i]->pager);
-/* printf("P %x\n", lst[i]->win); */
+ PagerForceUpdate(dq->pager);
}
- else if (lst[i]->d)
+ else if (dq->d)
{
+/* printf("D %x\n", dq->d->ewin->client.win); */
if (FindItem
- ((char *)(lst[i]->d), 0, LIST_FINDBY_POINTER,
+ ((char *)(dq->d), 0, LIST_FINDBY_POINTER,
LIST_TYPE_DIALOG))
- DialogDrawItems(lst[i]->d, lst[i]->di, lst[i]->x,
- lst[i]->y, lst[i]->w, lst[i]->h);
-/* printf("D %x\n", lst[i]->d->ewin->client.win); */
+ DialogDrawItems(dq->d, dq->di, dq->x, dq->y, dq->w, dq->h);
}
- else if (lst[i]->redraw_pager)
+ else if (dq->redraw_pager)
{
+/* printf("p %x\n", dq->win); */
if (FindItem
- ((char *)(lst[i]->redraw_pager), 0, LIST_FINDBY_POINTER,
+ ((char *)(dq->redraw_pager), 0, LIST_FINDBY_POINTER,
LIST_TYPE_PAGER))
- PagerRedraw(lst[i]->redraw_pager, lst[i]->newbg);
-/* printf("p %x\n", lst[i]->win); */
+ PagerRedraw(dq->redraw_pager, dq->newbg);
}
- if (lst[i]->iclass)
- lst[i]->iclass->ref_count--;
- if (lst[i]->tclass)
- lst[i]->tclass->ref_count--;
- Efree(lst[i]);
+ if (dq->iclass)
+ dq->iclass->ref_count--;
+ if (dq->tclass)
+ dq->tclass->ref_count--;
+ Efree(dq);
}
Efree(lst);
}
+
queue_up = p_queue;
EDBUG_RETURN_;
}
@@ -1214,7 +1219,7 @@
UngrabX();
DrawEwinShape(ewin, mode.movemode, x, y, w, h,
firstlast);
- EDBUG_RETURN_;
+ goto exit;
}
EFillPixmap(root.win, root_pi->pmap, x1, y1, ewin->w,
ewin->h);
@@ -1346,6 +1351,8 @@
default:
break;
}
+
+ exit:
queue_up = pq;
EDBUG_RETURN_;
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/main.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -3 -r1.59 -r1.60
--- main.c 18 Aug 2003 21:54:27 -0000 1.59
+++ main.c 28 Sep 2003 19:21:34 -0000 1.60
@@ -298,7 +298,7 @@
mode.show_pagers = 0;
queue_up = 0;
EnableAllPagers();
- queue_up = 1;
+ queue_up = DRAW_QUEUE_ENABLE;
}
if (getpid() == master_pid && init_win_ext)
{
@@ -315,7 +315,7 @@
/* sync just to make sure */
XSync(disp, False);
- queue_up = 1;
+ queue_up = DRAW_QUEUE_ENABLE;
/* hello! we don't have a resizemode of 5! */
if (mode.resizemode == 5)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/pager.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- pager.c 12 Jul 2003 15:04:32 -0000 1.42
+++ pager.c 28 Sep 2003 19:21:34 -0000 1.43
@@ -737,9 +737,10 @@
DoIn(s, 1 / ((double)mode.pager_scanspeed), PagerUpdateTimeout,
0, p);
}
- queue_up = pq;
AddItem(p, "PAGER", p->win, LIST_TYPE_PAGER);
}
+
+ queue_up = pq;
}
void
@@ -945,6 +946,7 @@
if (!mode.show_pagers)
return;
+
if (queue_up)
{
DrawQueue *dq;
@@ -1104,6 +1106,7 @@
if (!mode.show_pagers)
return;
+
if (queue_up)
{
DrawQueue *dq;
@@ -1419,8 +1422,11 @@
void
PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
{
+ char pq;
ImageClass *ic = NULL;
+ pq = queue_up;
+
if (mode.pager_zoom)
{
ic = FindItem("PAGER_WIN", 0, LIST_FINDBY_NAME, LIST_TYPE_ICLASS);
@@ -1460,7 +1466,7 @@
{
Imlib_kill_image(pImlibData, im);
EUnmapWindow(disp, p->hi_win);
- return;
+ goto exit;
}
}
}
@@ -1490,7 +1496,7 @@
{
Imlib_kill_image(pImlibData, im);
EUnmapWindow(disp, p->hi_win);
- return;
+ goto exit;
}
}
}
@@ -1502,10 +1508,8 @@
}
else if (ic)
{
- char pq;
int xx, yy, ww, hh, i;
- pq = queue_up;
queue_up = 0;
if (w > h)
{
@@ -1527,7 +1531,7 @@
|| (py >= (y + h)))
{
EUnmapWindow(disp, p->hi_win);
- return;
+ goto exit;
}
}
}
@@ -1552,14 +1556,13 @@
|| (py >= (y + h)))
{
EUnmapWindow(disp, p->hi_win);
- return;
+ goto exit;
}
}
}
}
EMoveResizeWindow(disp, p->hi_win, x - (w / 2), y - (h / 2), w * 2,
h * 2);
- queue_up = pq;
}
else
{
@@ -1604,7 +1607,7 @@
{
EFreePixmap(disp, pmap);
EUnmapWindow(disp, p->hi_win);
- return;
+ goto exit;
}
}
}
@@ -1632,7 +1635,7 @@
{
EFreePixmap(disp, pmap);
EUnmapWindow(disp, p->hi_win);
- return;
+ goto exit;
}
}
}
@@ -1643,6 +1646,7 @@
}
p->hi_visible = 1;
}
+
if (mode.pager_title)
{
ToolTip *tt = NULL;
@@ -1654,6 +1658,9 @@
p->hi_visible = 1;
}
}
+
+ exit:
+ queue_up = pq;
}
void
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/x.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -3 -r1.54 -r1.55
--- x.c 20 Jul 2003 18:02:16 -0000 1.54
+++ x.c 28 Sep 2003 19:21:34 -0000 1.55
@@ -512,6 +512,7 @@
unsigned int *w, unsigned int *h, unsigned int *bw,
unsigned int *depth)
{
+ int ok;
EXID *xid;
xid = FindXID(win);
@@ -531,9 +532,17 @@
*depth = xid->depth;
if (root_return)
*root_return = root.win;
- return 1;
+ ok = 1;
}
- return XGetGeometry(d, win, root_return, x, y, w, h, bw, depth);
+ else
+ {
+ ok = XGetGeometry(d, win, root_return, x, y, w, h, bw, depth);
+ }
+#if 0
+ if (!ok)
+ printf("EGetGeometry win=%#x, error %d\n", (unsigned)win, ok);
+#endif
+ return ok;
}
void
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs