Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
alert.c borders.c config.c desktops.c ewins.c theme.c xwin.h
Log Message:
Fix segv's, X-errors, memleak, wrapping.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/alert.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -3 -r1.45 -r1.46
--- alert.c 16 Jul 2005 16:57:35 -0000 1.45
+++ alert.c 21 Aug 2005 21:00:54 -0000 1.46
@@ -301,7 +301,7 @@
XGrabServer(dd);
XSync(dd, False);
- for (i = 0; i < 600; i += 40)
+ for (i = 40; i < 600; i += 40)
{
ww = i;
hh = (i * 440) / 600;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.273
retrieving revision 1.274
diff -u -3 -r1.273 -r1.274
--- borders.c 20 Aug 2005 13:55:50 -0000 1.273
+++ borders.c 21 Aug 2005 21:00:54 -0000 1.274
@@ -875,6 +875,7 @@
{
EWin *ewin = wbit->ewin;
int part = wbit - ewin->bits;
+ int left = wbit->left;
GrabPointerRelease();
@@ -887,11 +888,12 @@
#endif
BorderWinpartChange(ewin, part, 0);
- if (wbit->win == Mode.events.last_bpress && !wbit->left &&
+ /* Beware! Actions may destroy the current border */
+ wbit->left = 0;
+
+ if (wbit->win == Mode.events.last_bpress && !left &&
ewin->border->part[part].aclass)
ActionclassEvent(ewin->border->part[part].aclass, ev, ewin);
-
- wbit->left = 0;
}
static void
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/config.c,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -3 -r1.136 -r1.137
--- config.c 21 Aug 2005 13:21:47 -0000 1.136
+++ config.c 21 Aug 2005 21:00:54 -0000 1.137
@@ -130,7 +130,7 @@
if (so == s) /* Skip empty lines */
break;
case_eol:
- *so++ = '\0'; /* Terminate and return */
+ *so = '\0'; /* Terminate and return */
goto done;
case '\r': /* Ignore */
break;
@@ -169,6 +169,17 @@
done:
bufptr = si;
+ /* Strip trailing whitespace */
+ si = so;
+ for (; so > s; so--)
+ {
+ ch = so[-1];
+ if (ch != ' ' && ch != '\t')
+ break;
+ }
+ if (so != si)
+ *so = '\0';
+
if (EventDebug(EDBUG_TYPE_CONFIG))
Eprintf("GetLine %s\n", s);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/desktops.c,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -3 -r1.171 -r1.172
--- desktops.c 21 Aug 2005 13:21:48 -0000 1.171
+++ desktops.c 21 Aug 2005 21:00:55 -0000 1.172
@@ -530,8 +530,16 @@
void
DeskGetArea(int desk, int *ax, int *ay)
{
- *ax = _DeskGet(desk)->current_area_x;
- *ay = _DeskGet(desk)->current_area_y;
+ Desk *d;
+
+ d = _DeskGet(desk);
+ if (!d)
+ {
+ *ax = *ay = 0;
+ return;
+ }
+ *ax = d->current_area_x;
+ *ay = d->current_area_y;
}
void
@@ -1654,7 +1662,7 @@
ic = ImageclassFind("SETTINGS_DESKTOP_AREA", 0);
if (ic)
ImageclassApply(ic, win, w, h, 0, 0, STATE_NORMAL, 0, ST_UNKNWN);
- for (i = 0; i < Conf.desks.num; i++)
+ for (i = 0; i < ENLIGHTENMENT_CONF_NUM_DESKTOPS; i++)
wins[i] = 0;
called = 1;
}
@@ -1667,7 +1675,7 @@
Pixmap pmap;
wins[i] = ECreateWindow(win, 0, 0, 64, 48, 0);
- XSetWindowBorderWidth(disp, wins[i], 1);
+ ESetWindowBorderWidth(wins[i], 1);
pmap = ECreatePixmap(wins[i], 64, 48, VRoot.depth);
ESetWindowBackgroundPixmap(wins[i], pmap);
@@ -1693,17 +1701,17 @@
num = tmp_desktops - 1;
if (num < 1)
num = 1;
- ERaiseWindow(wins[i]);
EMoveWindow(wins[i], (i * (w - 64 - 2)) / num,
(i * (h - 48 - 2)) / num);
+ ERaiseWindow(wins[i]);
EMapWindow(wins[i]);
}
for (i = tmp_desktops; i < Conf.desks.num; i++)
{
+ if (!wins[i])
+ continue;
EUnmapWindow(wins[i]);
- EDestroyWindow(wins[i]);
- wins[i] = None;
}
if (tmp_desktops > 1)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewins.c,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -3 -r1.99 -r1.100
--- ewins.c 21 Aug 2005 13:21:48 -0000 1.99
+++ ewins.c 21 Aug 2005 21:00:55 -0000 1.100
@@ -161,7 +161,7 @@
if (!EwinIsInternal(ewin))
{
XShapeSelectInput(disp, win, ShapeNotifyMask);
- XSetWindowBorderWidth(disp, win, 0);
+ ESetWindowBorderWidth(win, 0);
ewin->client.bw = 0;
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/theme.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -r1.51 -r1.52
--- theme.c 16 Jul 2005 16:57:44 -0000 1.51
+++ theme.c 21 Aug 2005 21:00:55 -0000 1.52
@@ -413,6 +413,8 @@
Efree(Conf.theme.name);
Conf.theme.name = fullfileof(theme);
+ if (Mode.theme.path)
+ Efree(Mode.theme.path);
Mode.theme.path = theme;
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/xwin.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- xwin.h 20 Aug 2005 13:55:51 -0000 1.4
+++ xwin.h 21 Aug 2005 21:00:55 -0000 1.5
@@ -85,6 +85,7 @@
#define ESelectInput(win, mask) XSelectInput(disp, win, mask)
#define EGetWindowAttributes(win, attr) XGetWindowAttributes(disp, win, attr)
#define EChangeWindowAttributes(win, mask, attr) XChangeWindowAttributes(disp,
win, mask, attr)
+#define ESetWindowBorderWidth(win, bw) XSetWindowBorderWidth(disp, win, bw)
#define ERaiseWindow(win) XRaiseWindow(disp, win)
#define ELowerWindow(win) XLowerWindow(disp, win)
#define EClearWindow(win) XClearWindow(disp, win)
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs