Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: Tag: branch-exp E.h alert.c areas.c backgrounds.c desktops.c dialog.c draw.c events.c ewin-ops.c focus.c fx.c iclass.c iconify.c main.c menus.c moveresize.c progress.c session.c setup.c slideout.c startup.c text.c tooltips.c ttfont.c zoom.c Log Message: Multihead fixes, more ecore-x, cleanups. =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v retrieving revision 1.314.2.39 retrieving revision 1.314.2.40 diff -u -3 -r1.314.2.39 -r1.314.2.40 --- E.h 5 Sep 2004 22:24:35 -0000 1.314.2.39 +++ E.h 7 Sep 2004 20:06:52 -0000 1.314.2.40 @@ -66,11 +66,6 @@ #define ICLASS_ATTR_NO_CLIP 0x04 /* Don't apply clip mask */ #define ICLASS_ATTR_USE_CM 0x08 /* Use colormodifier */ -#define XSync(d, f) \ -{XImage *__xim; \ -__xim = XGetImage(d, VRoot.win, 0, 0, 1, 1, 0xffffffff, ZPixmap); \ -if (__xim) XDestroyImage(__xim);} - #ifdef HAS_XINERAMA #include <X11/extensions/Xinerama.h> #endif @@ -126,10 +121,10 @@ #endif #define FILEPATH_LEN_MAX 4096 -/* This turns on E's internal stack tracking system for coarse debugging */ + +/* This turns on E's internal stack tracking system for coarse debugging */ /* and being able to trace E for profiling/optimisation purposes (which */ /* believe it or not I'm actually doing) */ - /* #define DEBUG 1 */ #ifdef DEBUG @@ -487,6 +482,7 @@ typedef struct _background Background; typedef struct _ecursor ECursor; typedef struct _efont Efont; +typedef struct _textclass TextClass; typedef struct { @@ -620,7 +616,7 @@ } TextState; -typedef struct _textclass +struct _textclass { char *name; struct @@ -633,8 +629,7 @@ norm , active, sticky, sticky_active; int justification; unsigned int ref_count; -} -TextClass; +}; typedef struct _actiontype { @@ -1339,17 +1334,6 @@ void AlertX(const char *title, const char *ignore, const char *restart, const char *quit, const char *fmt, ...); -void InitStringList(void); -void AssignIgnoreFunction(int (*func) (const void *), - const void *params); -void AssignRestartFunction(int (*func) (const void *), - const void *params); -void AssignExitFunction(int (*func) (const void *), - const void *params); -void AssignTitleText(const char *text); -void AssignIgnoreText(const char *text); -void AssignRestartText(const char *text); -void AssignExitText(const char *text); /* areas.c */ void AreaFix(int *ax, int *ay); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/alert.c,v retrieving revision 1.34.2.2 retrieving revision 1.34.2.3 diff -u -3 -r1.34.2.2 -r1.34.2.3 --- alert.c 27 Aug 2004 21:31:52 -0000 1.34.2.2 +++ alert.c 7 Sep 2004 20:06:52 -0000 1.34.2.3 @@ -41,168 +41,6 @@ XFontSet xfs = NULL; -void -AlertInit(void) -{ - /* Set up all the text bits that belong on the GSOD */ - AssignTitleText(_("Enlightenment Message Dialog")); - AssignIgnoreText(_("Ignore this")); - AssignRestartText(_("Restart Enlightenment")); - AssignExitText(_("Quit Enlightenment")); - - /* We'll set up what the buttons do now, too */ - AssignRestartFunction(SessionExit, "restart"); - AssignExitFunction(SessionExit, NULL); -} - -void -AlertX(const char *title, const char *ignore, - const char *restart, const char *quit, const char *fmt, ...) -{ - char text[10240]; - va_list ap; - - EDBUG(7, "AlertX"); - - AssignTitleText(title); - AssignIgnoreText(ignore); - AssignRestartText(restart); - AssignExitText(quit); - - va_start(ap, fmt); - Evsnprintf(text, 10240, fmt, ap); - va_end(ap); - SoundPlay("SOUND_ALERT"); - ShowAlert(text); - - AssignTitleText(_("Enlightenment Message Dialog")); - AssignIgnoreText(_("Ignore this")); - AssignRestartText(_("Restart Enlightenment")); - AssignExitText(_("Quit Enlightenment")); - - EDBUG_RETURN_; -} - -void -Alert(const char *fmt, ...) -{ - char text[10240]; - va_list ap; - - EDBUG(7, "Alert"); - - va_start(ap, fmt); - Evsnprintf(text, 10240, fmt, ap); - va_end(ap); - SoundPlay("SOUND_ALERT"); - ShowAlert(text); - - EDBUG_RETURN_; -} - -void -AssignTitleText(const char *text) -{ - EDBUG(7, "AssignTitleText"); - - if (TitleText) - Efree(TitleText); - TitleText = Estrdup(text); - - EDBUG_RETURN_; -} - -void -AssignIgnoreText(const char *text) -{ - EDBUG(7, "AssignIgnoreText"); - - if (IgnoreText) - Efree(IgnoreText); - - if (text) - { - IgnoreText = Emalloc(strlen(text) + 6); - sprintf(IgnoreText, "(F1) %s", text); - } - else - { - IgnoreText = NULL; - } - - EDBUG_RETURN_; -} - -void -AssignRestartText(const char *text) -{ - EDBUG(7, "AssignRestartText"); - - if (RestartText) - Efree(RestartText); - - if (text) - { - RestartText = Emalloc(strlen(text) + 6); - sprintf(RestartText, "(F2) %s", text); - } - else - { - RestartText = NULL; - } - - EDBUG_RETURN_; -} - -void -AssignExitText(const char *text) -{ - EDBUG(7, "AssignExitText"); - - if (ExitText) - Efree(ExitText); - - if (text) - { - ExitText = Emalloc(strlen(text) + 6); - sprintf(ExitText, "(F3) %s", text); - } - else - { - ExitText = NULL; - } - - EDBUG_RETURN_; -} - -void -AssignIgnoreFunction(int (*FunctionToAssign) (const void *), const void *params) -{ - EDBUG(7, "AssignIgnoreFunction"); - IgnoreFunction = FunctionToAssign; - IgnoreParams = params; - EDBUG_RETURN_; -} - -void -AssignRestartFunction(int (*FunctionToAssign) (const void *), - const void *params) -{ - EDBUG(7, "AssignRestartFunction"); - RestartFunction = FunctionToAssign; - RestartParams = params; - EDBUG_RETURN_; -} - -void -AssignExitFunction(int (*FunctionToAssign) (const void *), const void *params) -{ - EDBUG(7, "AssignExitFunction"); - ExitFunction = FunctionToAssign; - ExitParams = params; - EDBUG_RETURN_; -} - #define DRAW_BOX_OUT(mdd, mgc, mwin, mx, my, mw, mh) \ AlertDrawBox(mdd, mgc, mwin, mx, my, mw, mh, \ colorful, cols[0], cols[2], cols[3]) @@ -680,3 +518,167 @@ EDBUG_RETURN_; } + +static void +AssignTitleText(const char *text) +{ + EDBUG(7, "AssignTitleText"); + + if (TitleText) + Efree(TitleText); + TitleText = Estrdup(text); + + EDBUG_RETURN_; +} + +static void +AssignIgnoreText(const char *text) +{ + EDBUG(7, "AssignIgnoreText"); + + if (IgnoreText) + Efree(IgnoreText); + + if (text) + { + IgnoreText = Emalloc(strlen(text) + 6); + sprintf(IgnoreText, "(F1) %s", text); + } + else + { + IgnoreText = NULL; + } + + EDBUG_RETURN_; +} + +static void +AssignRestartText(const char *text) +{ + EDBUG(7, "AssignRestartText"); + + if (RestartText) + Efree(RestartText); + + if (text) + { + RestartText = Emalloc(strlen(text) + 6); + sprintf(RestartText, "(F2) %s", text); + } + else + { + RestartText = NULL; + } + + EDBUG_RETURN_; +} + +static void +AssignExitText(const char *text) +{ + EDBUG(7, "AssignExitText"); + + if (ExitText) + Efree(ExitText); + + if (text) + { + ExitText = Emalloc(strlen(text) + 6); + sprintf(ExitText, "(F3) %s", text); + } + else + { + ExitText = NULL; + } + + EDBUG_RETURN_; +} + +#if 0 +static void +AssignIgnoreFunction(int (*FunctionToAssign) (const void *), const void *params) +{ + EDBUG(7, "AssignIgnoreFunction"); + IgnoreFunction = FunctionToAssign; + IgnoreParams = params; + EDBUG_RETURN_; +} +#endif + +static void +AssignRestartFunction(int (*FunctionToAssign) (const void *), + const void *params) +{ + EDBUG(7, "AssignRestartFunction"); + RestartFunction = FunctionToAssign; + RestartParams = params; + EDBUG_RETURN_; +} + +static void +AssignExitFunction(int (*FunctionToAssign) (const void *), const void *params) +{ + EDBUG(7, "AssignExitFunction"); + ExitFunction = FunctionToAssign; + ExitParams = params; + EDBUG_RETURN_; +} + +void +AlertInit(void) +{ + /* Set up all the text bits that belong on the GSOD */ + AssignTitleText(_("Enlightenment Message Dialog")); + AssignIgnoreText(_("Ignore this")); + AssignRestartText(_("Restart Enlightenment")); + AssignExitText(_("Quit Enlightenment")); + + /* We'll set up what the buttons do now, too */ + AssignRestartFunction(SessionExit, "restart"); + AssignExitFunction(SessionExit, NULL); +} + +void +AlertX(const char *title, const char *ignore, + const char *restart, const char *quit, const char *fmt, ...) +{ + char text[10240]; + va_list ap; + + EDBUG(7, "AlertX"); + + AssignTitleText(title); + AssignIgnoreText(ignore); + AssignRestartText(restart); + AssignExitText(quit); + + va_start(ap, fmt); + Evsnprintf(text, 10240, fmt, ap); + va_end(ap); + SoundPlay("SOUND_ALERT"); + ShowAlert(text); + + AssignTitleText(_("Enlightenment Message Dialog")); + AssignIgnoreText(_("Ignore this")); + AssignRestartText(_("Restart Enlightenment")); + AssignExitText(_("Quit Enlightenment")); + + EDBUG_RETURN_; +} + +void +Alert(const char *fmt, ...) +{ + char text[10240]; + va_list ap; + + EDBUG(7, "Alert"); + + va_start(ap, fmt); + Evsnprintf(text, 10240, fmt, ap); + va_end(ap); + SoundPlay("SOUND_ALERT"); + ShowAlert(text); + + EDBUG_RETURN_; +} =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/areas.c,v retrieving revision 1.71.2.7 retrieving revision 1.71.2.8 diff -u -3 -r1.71.2.7 -r1.71.2.8 --- areas.c 29 Aug 2004 14:06:46 -0000 1.71.2.7 +++ areas.c 7 Sep 2004 20:06:52 -0000 1.71.2.8 @@ -215,7 +215,7 @@ y = ((xy[i].y * (1024 - k)) + ((xy[i].y + dy) * k)) >> 10; EMoveWindow(disp, win[i], x, y); } - XSync(disp, False); + ecore_x_sync(); gettimeofday(&timev2, NULL); dsec = timev2.tv_sec - timev1.tv_sec; dusec = timev2.tv_usec - timev1.tv_usec; @@ -332,7 +332,7 @@ /* set hints up for it */ HintsSetDesktopViewport(); - XSync(disp, False); + ecore_x_sync(); ActionsResume(); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/backgrounds.c,v retrieving revision 1.5.2.7 retrieving revision 1.5.2.8 diff -u -3 -r1.5.2.7 -r1.5.2.8 --- backgrounds.c 5 Sep 2004 11:46:44 -0000 1.5.2.7 +++ backgrounds.c 7 Sep 2004 20:06:53 -0000 1.5.2.8 @@ -671,7 +671,7 @@ XSetForeground(disp, gc, bg->bg_solid.pixel); XFillRectangle(disp, win, gc, 0, 0, rw, rh); } - XSync(disp, False); + ecore_x_sync(); } if (gc) =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/desktops.c,v retrieving revision 1.95.2.16 retrieving revision 1.95.2.17 diff -u -3 -r1.95.2.16 -r1.95.2.17 --- desktops.c 5 Sep 2004 11:46:44 -0000 1.95.2.16 +++ desktops.c 7 Sep 2004 20:06:53 -0000 1.95.2.17 @@ -248,7 +248,7 @@ x = ((fx * (1024 - k)) + (tx * k)) >> 10; y = ((fy * (1024 - k)) + (ty * k)) >> 10; EMoveWindow(disp, win, x, y); - XSync(disp, False); + ecore_x_sync(); gettimeofday(&timev2, NULL); dsec = timev2.tv_sec - timev1.tv_sec; dusec = timev2.tv_usec - timev1.tv_usec; @@ -913,7 +913,7 @@ HandleDrawQueue(); HintsSetCurrentDesktop(); EMapWindow(disp, desks.desk[desk].win); - XSync(disp, False); + ecore_x_sync(); EDBUG_RETURN_; } @@ -939,7 +939,7 @@ #endif HandleDrawQueue(); HintsSetCurrentDesktop(); - XSync(disp, False); + ecore_x_sync(); EDBUG_RETURN_; } =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/dialog.c,v retrieving revision 1.91.2.8 retrieving revision 1.91.2.9 diff -u -3 -r1.91.2.8 -r1.91.2.9 --- dialog.c 27 Aug 2004 23:27:42 -0000 1.91.2.8 +++ dialog.c 7 Sep 2004 20:06:53 -0000 1.91.2.9 @@ -579,7 +579,7 @@ if (!FindDialog(d->win)) AddItem(d, d->name, d->win, LIST_TYPE_DIALOG); - XSync(disp, False); + ecore_x_sync(); DialogRedraw(d); Mode.queue_up = pq; } =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/draw.c,v retrieving revision 1.51.2.5 retrieving revision 1.51.2.6 diff -u -3 -r1.51.2.5 -r1.51.2.6 --- draw.c 31 Aug 2004 21:58:35 -0000 1.51.2.5 +++ draw.c 7 Sep 2004 20:06:54 -0000 1.51.2.6 @@ -371,7 +371,7 @@ { if (!pi) return; - XSync(disp, False); + ecore_x_sync(); XShmDetach(disp, pi->shminfo); shmdt(pi->shminfo->shmaddr); shmctl(pi->shminfo->shmid, IPC_RMID, 0); @@ -506,7 +506,7 @@ } if ((w <= 0) || (h <= 0)) return; - XSync(disp, False); + ecore_x_sync(); if (dst) { switch (dst->xim->bits_per_pixel) @@ -896,7 +896,7 @@ XCopyArea(disp, src, p_grab2->pmap, gc, 0, sy + (sh / 2), sw, 1, 0, 0); } - XSync(disp, False); + ecore_x_sync(); goto wheee; boo1: @@ -1026,7 +1026,7 @@ if (p_buf) { XShmPutImage(disp, dest, gc, p_buf->xim, 0, 0, dx, dy, pw, 1, False); - XSync(disp, False); + ecore_x_sync(); if (p_grab) EDestroyPixImg(p_grab); if (p_grab2) @@ -1100,7 +1100,7 @@ 1, 0, y); } } - XSync(disp, False); + ecore_x_sync(); } else { @@ -1271,7 +1271,7 @@ if (p_buf) { XShmPutImage(disp, dest, gc2, p_buf->xim, 0, 0, dx, dy, dw, dh, False); - XSync(disp, False); + ecore_x_sync(); if (p_grab) EDestroyPixImg(p_grab); if (p_buf) =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/events.c,v retrieving revision 1.69.2.9 retrieving revision 1.69.2.10 diff -u -3 -r1.69.2.9 -r1.69.2.10 --- events.c 29 Aug 2004 14:06:47 -0000 1.69.2.9 +++ events.c 7 Sep 2004 20:06:54 -0000 1.69.2.10 @@ -130,7 +130,7 @@ { XSetInputFocus(disp, ev->xkey.root, RevertToPointerRoot, CurrentTime); - XSync(disp, False); + ecore_x_sync(); ev->xkey.time = CurrentTime; XSendEvent(disp, ev->xkey.root, False, 0, ev); } =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/Attic/ewin-ops.c,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -3 -r1.1.2.6 -r1.1.2.7 --- ewin-ops.c 31 Aug 2004 21:58:35 -0000 1.1.2.6 +++ ewin-ops.c 7 Sep 2004 20:06:54 -0000 1.1.2.7 @@ -58,7 +58,7 @@ firstlast); if (firstlast == 0) firstlast = 1; - XSync(disp, False); + ecore_x_sync(); gettimeofday(&timev2, NULL); dsec = timev2.tv_sec - timev1.tv_sec; dusec = timev2.tv_usec - timev1.tv_usec; @@ -129,7 +129,7 @@ firstlast); if (firstlast == 0) firstlast = 1; - XSync(disp, False); + ecore_x_sync(); gettimeofday(&timev2, NULL); dsec = timev2.tv_sec - timev1.tv_sec; dusec = timev2.tv_usec - timev1.tv_usec; @@ -558,7 +558,7 @@ EMoveResizeWindow(disp, ewin->win, ewin->x, ewin->y, ewin->w, ewin->h); EMoveResizeWindow(disp, ewin->win_container, -30, -30, 1, 1); EwinBorderCalcSizes(ewin); - XSync(disp, False); + ecore_x_sync(); break; case 1: att.win_gravity = WestGravity; @@ -571,7 +571,7 @@ EMoveResizeWindow(disp, ewin->win, ewin->x, ewin->y, ewin->w, ewin->h); EMoveResizeWindow(disp, ewin->win_container, -30, -30, 1, 1); EwinBorderCalcSizes(ewin); - XSync(disp, False); + ecore_x_sync(); break; case 2: att.win_gravity = SouthGravity; @@ -583,7 +583,7 @@ EMoveResizeWindow(disp, ewin->win, ewin->x, ewin->y, ewin->w, ewin->h); EMoveResizeWindow(disp, ewin->win_container, -30, -30, 1, 1); EwinBorderCalcSizes(ewin); - XSync(disp, False); + ecore_x_sync(); break; case 3: att.win_gravity = SouthGravity; @@ -597,7 +597,7 @@ EMoveResizeWindow(disp, ewin->win, ewin->x, ewin->y, ewin->w, ewin->h); EMoveResizeWindow(disp, ewin->win_container, -30, -30, 1, 1); EwinBorderCalcSizes(ewin); - XSync(disp, False); + ecore_x_sync(); break; default: break; @@ -634,7 +634,7 @@ ewin->shaded = 0; ewin->w = b; MoveResizeEwin(ewin, ewin->x, ewin->y, ewin->client.w, ewin->client.h); - XSync(disp, False); + ecore_x_sync(); break; case 1: att.win_gravity = WestGravity; @@ -647,7 +647,7 @@ ewin->w = b; ewin->x = d; MoveResizeEwin(ewin, ewin->x, ewin->y, ewin->client.w, ewin->client.h); - XSync(disp, False); + ecore_x_sync(); break; case 2: att.win_gravity = SouthGravity; @@ -657,7 +657,7 @@ ewin->shaded = 0; ewin->h = b; MoveResizeEwin(ewin, ewin->x, ewin->y, ewin->client.w, ewin->client.h); - XSync(disp, False); + ecore_x_sync(); break; case 3: att.win_gravity = SouthGravity; @@ -670,7 +670,7 @@ ewin->h = b; ewin->y = d; MoveResizeEwin(ewin, ewin->x, ewin->y, ewin->client.w, ewin->client.h); - XSync(disp, False); + ecore_x_sync(); break; default: break; @@ -765,7 +765,7 @@ EMoveResizeWindow(disp, ewin->win_container, -30, -30, 1, 1); EMoveResizeWindow(disp, ewin->win, ewin->x, ewin->y, ewin->w, ewin->h); EwinBorderCalcSizes(ewin); - XSync(disp, False); + ecore_x_sync(); break; case 1: att.win_gravity = WestGravity; @@ -819,7 +819,7 @@ EMoveResizeWindow(disp, ewin->win_container, -30, -30, 1, 1); EMoveResizeWindow(disp, ewin->win, ewin->x, ewin->y, ewin->w, ewin->h); EwinBorderCalcSizes(ewin); - XSync(disp, False); + ecore_x_sync(); break; case 2: att.win_gravity = SouthGravity; @@ -871,7 +871,7 @@ EMoveResizeWindow(disp, ewin->win_container, -30, -30, 1, 1); EMoveResizeWindow(disp, ewin->win, ewin->x, ewin->y, ewin->w, ewin->h); EwinBorderCalcSizes(ewin); - XSync(disp, False); + ecore_x_sync(); break; case 3: att.win_gravity = SouthGravity; @@ -926,7 +926,7 @@ EMoveResizeWindow(disp, ewin->win_container, -30, -30, 1, 1); EMoveResizeWindow(disp, ewin->win, ewin->x, ewin->y, ewin->w, ewin->h); EwinBorderCalcSizes(ewin); - XSync(disp, False); + ecore_x_sync(); break; default: break; @@ -1027,7 +1027,7 @@ } ewin->w = b; MoveResizeEwin(ewin, ewin->x, ewin->y, ewin->client.w, ewin->client.h); - XSync(disp, False); + ecore_x_sync(); break; case 1: att.win_gravity = WestGravity; @@ -1083,7 +1083,7 @@ ewin->w = b; ewin->x = d; MoveResizeEwin(ewin, ewin->x, ewin->y, ewin->client.w, ewin->client.h); - XSync(disp, False); + ecore_x_sync(); break; case 2: att.win_gravity = SouthGravity; @@ -1137,7 +1137,7 @@ } ewin->h = b; MoveResizeEwin(ewin, ewin->x, ewin->y, ewin->client.w, ewin->client.h); - XSync(disp, False); + ecore_x_sync(); break; case 3: att.win_gravity = SouthGravity; @@ -1193,7 +1193,7 @@ ewin->h = b; ewin->y = d; MoveResizeEwin(ewin, ewin->x, ewin->y, ewin->client.w, ewin->client.h); - XSync(disp, False); + ecore_x_sync(); break; default: break; =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/focus.c,v retrieving revision 1.81.2.3 retrieving revision 1.81.2.4 diff -u -3 -r1.81.2.3 -r1.81.2.4 --- focus.c 22 Aug 2004 01:30:08 -0000 1.81.2.3 +++ focus.c 7 Sep 2004 20:06:54 -0000 1.81.2.4 @@ -471,9 +471,9 @@ /* allow click to pass thorugh */ if (win == ewin->win_container) { - XSync(disp, False); + ecore_x_sync(); XAllowEvents(disp, ReplayPointer, CurrentTime); - XSync(disp, False); + ecore_x_sync(); } } else if (ewin->focusclick) =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/fx.c,v retrieving revision 1.41.2.8 retrieving revision 1.41.2.9 diff -u -3 -r1.41.2.8 -r1.41.2.9 --- fx.c 1 Sep 2004 23:37:17 -0000 1.41.2.8 +++ fx.c 7 Sep 2004 20:06:55 -0000 1.41.2.9 @@ -411,7 +411,7 @@ XShmPutImage(disp, fx_raindrops_win, gc1, fx_raindrops_draw->xim, 0, 0, fx_raindrops[i].x, fx_raindrops[i].y, fx_raindrop_size, fx_raindrop_size, False); - XSync(disp, False); + ecore_x_sync(); } DoIn("FX_RAINDROPS_TIMEOUT", (0.066 /*/ (float)fx_raindrops_number */ ), FX_raindrops_timeout, 0, NULL); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/iclass.c,v retrieving revision 1.46.2.5 retrieving revision 1.46.2.6 diff -u -3 -r1.46.2.5 -r1.46.2.6 --- iclass.c 1 Sep 2004 23:37:17 -0000 1.46.2.5 +++ iclass.c 7 Sep 2004 20:06:55 -0000 1.46.2.6 @@ -1031,7 +1031,7 @@ XSetForeground(disp, gc, is->lolo.pixel); XDrawLine(disp, win, gc, w - 2, h - 1, w - 1, h - 1); XDrawLine(disp, win, gc, w - 1, h - 2, w - 1, h - 1); - XSync(disp, False); + ecore_x_sync(); break; case BEVEL_THICKPOINT: XSetForeground(disp, gc, is->hi.pixel); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/iconify.c,v retrieving revision 1.116.2.17 retrieving revision 1.116.2.18 diff -u -3 -r1.116.2.17 -r1.116.2.18 --- iconify.c 5 Sep 2004 11:46:44 -0000 1.116.2.17 +++ iconify.c 7 Sep 2004 20:06:55 -0000 1.116.2.18 @@ -177,7 +177,7 @@ XDrawLine(disp, VRoot.win, gc, x3 + 2, y3 + 2, x4 - 2, y4 - 2); XDrawLine(disp, VRoot.win, gc, x4 + 2, y4 + 2, x1 - 2, y1 - 2); - XSync(disp, False); + ecore_x_sync(); t2 = GetTime(); t = t2 - t1; t1 = t2; @@ -247,7 +247,7 @@ XDrawLine(disp, VRoot.win, gc, x3 + 2, y3 + 2, x4 - 2, y4 - 2); XDrawLine(disp, VRoot.win, gc, x4 + 2, y4 + 2, x1 - 2, y1 - 2); - XSync(disp, False); + ecore_x_sync(); t2 = GetTime(); t = t2 - t1; t1 = t2; =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/main.c,v retrieving revision 1.99.2.20 retrieving revision 1.99.2.21 diff -u -3 -r1.99.2.20 -r1.99.2.21 --- main.c 5 Sep 2004 22:24:35 -0000 1.99.2.20 +++ main.c 7 Sep 2004 20:06:55 -0000 1.99.2.21 @@ -205,11 +205,12 @@ ZoomInit(); EDirsSetup(); CommsInit(); - LoadSnapInfo(); /* Set default save file prefix if not already set */ ESetSavePrefix(NULL); + LoadSnapInfo(); + ecore_x_grab(); MapUnmap(0); ecore_x_ungrab(); @@ -257,7 +258,7 @@ #endif /* sync just to make sure */ - XSync(disp, False); + ecore_x_sync(); Mode.queue_up = DRAW_QUEUE_ENABLE; /* of course, we have to set the cursors */ @@ -302,7 +303,7 @@ Conf.desks.slidein = ps; } #endif - XSync(disp, False); + ecore_x_sync(); if (!Conf.mapslide && !Mode.wm.restart) CreateStartupDisplay(0); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/menus.c,v retrieving revision 1.147.2.13 retrieving revision 1.147.2.14 diff -u -3 -r1.147.2.13 -r1.147.2.14 --- menus.c 5 Sep 2004 11:46:45 -0000 1.147.2.13 +++ menus.c 7 Sep 2004 20:06:56 -0000 1.147.2.14 @@ -435,7 +435,7 @@ m->shown = 1; if (Mode.menus.current_depth == 0) { - XSync(disp, False); + ecore_x_sync(); GrabKeyboard(m->win); } =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/moveresize.c,v retrieving revision 1.22.2.6 retrieving revision 1.22.2.7 diff -u -3 -r1.22.2.6 -r1.22.2.7 --- moveresize.c 31 Aug 2004 21:58:35 -0000 1.22.2.6 +++ moveresize.c 7 Sep 2004 20:06:56 -0000 1.22.2.7 @@ -155,7 +155,7 @@ } StackDesktop(ewin->desktop); /* Restack to "un-float" */ - XSync(disp, False); + ecore_x_sync(); if (Conf.movemode > 0) ecore_x_ungrab(); @@ -379,7 +379,7 @@ ewin->bits[i].no_expose = 1; ICCCM_Configure(ewin); - XSync(disp, False); + ecore_x_sync(); if (Conf.resizemode > 0) ecore_x_ungrab(); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/progress.c,v retrieving revision 1.16.2.2 retrieving revision 1.16.2.3 diff -u -3 -r1.16.2.2 -r1.16.2.3 --- progress.c 22 Aug 2004 20:04:07 -0000 1.16.2.2 +++ progress.c 7 Sep 2004 20:06:56 -0000 1.16.2.3 @@ -206,7 +206,7 @@ EMapRaised(disp, p->win); EMapRaised(disp, p->n_win); EMapRaised(disp, p->p_win); - XSync(disp, False); + ecore_x_sync(); TextclassApply(p->ic, p->win, p->w - (p->h * 5), p->h, 0, 0, STATE_NORMAL, 0, p->tc, p->name); Mode.queue_up = pq; =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/session.c,v retrieving revision 1.75.2.10 retrieving revision 1.75.2.11 diff -u -3 -r1.75.2.10 -r1.75.2.11 --- session.c 5 Sep 2004 11:46:46 -0000 1.75.2.10 +++ session.c 7 Sep 2004 20:06:56 -0000 1.75.2.11 @@ -335,7 +335,10 @@ const char *sm_file; const char *smid = "-smid"; const char *single = "-single"; + +#if 0 const char *smfile = "-smfile"; +#endif const char *econfdir = "-econfdir"; const char *e_conf_dir; const char *ecachedir = "-ecachedir"; @@ -379,6 +382,9 @@ SmProp priorityProp; SmProp *props[7]; + if (EventDebug(EDBUG_TYPE_SESSION)) + Eprintf("set_save_props\n"); + programProp.name = (char *)SmProgram; programProp.type = (char *)SmLISTofARRAY8; programProp.num_vals = 1; @@ -469,14 +475,12 @@ restartVal[n++].value = buf; } #endif +#if 0 restartVal[n].length = strlen(smfile); restartVal[n++].value = (char *)smfile; restartVal[n].length = strlen(sm_file); restartVal[n++].value = (char *)sm_file; - restartVal[n].length = strlen(smid); - restartVal[n++].value = (char *)smid; - restartVal[n].length = strlen(sm_client_id); - restartVal[n++].value = sm_client_id; +#endif restartVal[n].length = strlen(econfdir); restartVal[n++].value = (char *)econfdir; restartVal[n].length = strlen(e_conf_dir); @@ -485,12 +489,21 @@ restartVal[n++].value = (char *)ecachedir; restartVal[n].length = strlen(e_cache_dir); restartVal[n++].value = (char *)e_cache_dir; + restartVal[n].length = strlen(smid); + restartVal[n++].value = (char *)smid; + restartVal[n].length = strlen(sm_client_id); + restartVal[n++].value = sm_client_id; restartProp.num_vals = n; /* SM specs require SmCloneCommand excludes "-smid" option */ cloneProp.num_vals = restartProp.num_vals - 2; + if (EventDebug(EDBUG_TYPE_SESSION)) + for (n = 0; n < restartProp.num_vals; n++) + Eprintf("restartVal[i]: %2d: %s\n", restartVal[n].length, + (char *)restartVal[n].value); + n = 0; props[n++] = &programProp; props[n++] = &userIDProp; @@ -515,6 +528,9 @@ static void callback_save_yourself2(SmcConn smc_conn, SmPointer client_data) { + if (EventDebug(EDBUG_TYPE_SESSION)) + Eprintf("callback_save_yourself2\n"); + /* dont need anymore */ /* autosave(); */ if (!Mode.wm.master) @@ -547,6 +563,9 @@ callback_save_yourself(SmcConn smc_conn, SmPointer client_data, int save_style, Bool shutdown, int interact_style, Bool fast) { + if (EventDebug(EDBUG_TYPE_SESSION)) + Eprintf("callback_save_yourself\n"); + if (Mode.wm.master) { char s[4096]; @@ -585,6 +604,9 @@ static void callback_die(SmcConn smc_conn, SmPointer client_data) { + if (EventDebug(EDBUG_TYPE_SESSION)) + Eprintf("callback_die\n"); + if (Mode.wm.master) SoundPlay("SOUND_EXIT"); EExit(0); @@ -595,6 +617,9 @@ static void callback_save_complete(SmcConn smc_conn, SmPointer client_data) { + if (EventDebug(EDBUG_TYPE_SESSION)) + Eprintf("callback_save_complete\n"); + smc_conn = 0; client_data = NULL; } @@ -602,6 +627,9 @@ static void callback_shutdown_cancelled(SmcConn smc_conn, SmPointer client_data) { + if (EventDebug(EDBUG_TYPE_SESSION)) + Eprintf("callback_shutdown_cancelled\n"); + SmcSaveYourselfDone(smc_conn, False); client_data = NULL; } @@ -614,6 +642,9 @@ static void ice_io_error_handler(IceConn connection) { + if (EventDebug(EDBUG_TYPE_SESSION)) + Eprintf("ice_io_error_handler\n"); + /* The less we do here the better - the default handler does an * exit(1) instead of closing the losing connection. */ connection = 0; =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/setup.c,v retrieving revision 1.139.2.11 retrieving revision 1.139.2.12 diff -u -3 -r1.139.2.11 -r1.139.2.12 --- setup.c 5 Sep 2004 22:24:35 -0000 1.139.2.11 +++ setup.c 7 Sep 2004 20:06:56 -0000 1.139.2.12 @@ -294,7 +294,7 @@ SubstructureRedirectMask | KeyPressMask | KeyReleaseMask | PointerMotionMask | ResizeRedirectMask | SubstructureNotifyMask); - XSync(disp, False); + ecore_x_sync(); Mode.wm.xselect = 0; /* warn, if necessary about X version problems */ =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/slideout.c,v retrieving revision 1.22.2.6 retrieving revision 1.22.2.7 diff -u -3 -r1.22.2.6 -r1.22.2.7 --- slideout.c 1 Sep 2004 23:37:20 -0000 1.22.2.6 +++ slideout.c 7 Sep 2004 20:06:56 -0000 1.22.2.7 @@ -61,7 +61,7 @@ w = ((fw * (1024 - k)) + (tw * k)) >> 10; h = ((fh * (1024 - k)) + (th * k)) >> 10; EMoveResizeWindow(disp, win, x, y, w, h); - XSync(disp, False); + ecore_x_sync(); gettimeofday(&timev2, NULL); dsec = timev2.tv_sec - timev1.tv_sec; dusec = timev2.tv_usec - timev1.tv_usec; @@ -203,7 +203,7 @@ XChangeWindowAttributes(disp, ButtonGetWindow(s->button[i]), CWWinGravity, &att); EMoveResizeWindow(disp, s->win, xx, yy, 1, 1); - XSync(disp, False); + ecore_x_sync(); EMapRaised(disp, s->win); SlideWindowSizeTo(s->win, xx + s->w, yy, xx, yy, 0, s->h, s->w, s->h, Conf.slidespeedmap); @@ -216,7 +216,7 @@ XChangeWindowAttributes(disp, ButtonGetWindow(s->button[i]), CWWinGravity, &att); EMoveResizeWindow(disp, s->win, xx, yy, 1, 1); - XSync(disp, False); + ecore_x_sync(); EMapRaised(disp, s->win); SlideWindowSizeTo(s->win, xx, yy, xx, yy, 0, s->h, s->w, s->h, Conf.slidespeedmap); @@ -229,7 +229,7 @@ XChangeWindowAttributes(disp, ButtonGetWindow(s->button[i]), CWWinGravity, &att); EMoveResizeWindow(disp, s->win, xx, yy, 1, 1); - XSync(disp, False); + ecore_x_sync(); EMapRaised(disp, s->win); SlideWindowSizeTo(s->win, xx, yy + s->h, xx, yy, s->w, 0, s->w, s->h, Conf.slidespeedmap); @@ -242,7 +242,7 @@ XChangeWindowAttributes(disp, ButtonGetWindow(s->button[i]), CWWinGravity, &att); EMoveResizeWindow(disp, s->win, xx, yy, 1, 1); - XSync(disp, False); + ecore_x_sync(); EMapRaised(disp, s->win); SlideWindowSizeTo(s->win, xx, yy, xx, yy, s->w, 0, s->w, s->h, Conf.slidespeedmap); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/startup.c,v retrieving revision 1.44.2.5 retrieving revision 1.44.2.6 diff -u -3 -r1.44.2.5 -r1.44.2.6 --- startup.c 5 Sep 2004 11:46:47 -0000 1.44.2.5 +++ startup.c 7 Sep 2004 20:06:57 -0000 1.44.2.6 @@ -133,7 +133,7 @@ gettimeofday(&timev1, NULL); EMoveWindow(disp, w1, x + xOffset, -y - yOffset); EMoveWindow(disp, w2, -x - xOffset, y + yOffset); - XSync(disp, False); + ecore_x_sync(); gettimeofday(&timev2, NULL); dsec = timev2.tv_sec - timev1.tv_sec; dusec = timev2.tv_usec - timev1.tv_usec; =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/text.c,v retrieving revision 1.43.2.2 retrieving revision 1.43.2.3 diff -u -3 -r1.43.2.2 -r1.43.2.3 --- text.c 27 Aug 2004 21:31:54 -0000 1.43.2.2 +++ text.c 7 Sep 2004 20:06:57 -0000 1.43.2.3 @@ -798,7 +798,7 @@ switch (ts->style.orientation) { case FONT_TO_UP: - XSync(disp, False); /* Workaround for crash seen with Absolute E (Imlib2?) */ + ecore_x_sync(); /* Workaround for crash seen with Absolute E (Imlib2?) */ imlib_context_set_drawable(win); ii = imlib_create_image_from_drawable(0, y, x, h, w, 0); imlib_context_set_image(ii); @@ -809,7 +809,7 @@ case FONT_TO_DOWN: EGetGeometry(disp, win, &rr, &win_x, &win_y, &win_w, &win_h, &win_b, &win_d); - XSync(disp, False); /* Workaround for crash seen with Absolute E (Imlib2?) */ + ecore_x_sync(); /* Workaround for crash seen with Absolute E (Imlib2?) */ imlib_context_set_drawable(win); ii = imlib_create_image_from_drawable(0, win_w - y - h, x, h, w, 0); imlib_context_set_image(ii); @@ -818,7 +818,7 @@ imlib_render_image_on_drawable_at_size(0, 0, w, h); break; case FONT_TO_LEFT: /* Holy carumba! That's for yoga addicts, maybe .... */ - XSync(disp, False); /* Workaround for crash seen with Absolute E (Imlib2?) */ + ecore_x_sync(); /* Workaround for crash seen with Absolute E (Imlib2?) */ imlib_context_set_drawable(win); ii = imlib_create_image_from_drawable(0, x, y, w, h, 0); imlib_context_set_image(ii); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/tooltips.c,v retrieving revision 1.65.2.3 retrieving revision 1.65.2.4 diff -u -3 -r1.65.2.3 -r1.65.2.4 --- tooltips.c 22 Aug 2004 20:04:07 -0000 1.65.2.3 +++ tooltips.c 7 Sep 2004 20:06:57 -0000 1.65.2.4 @@ -511,7 +511,7 @@ EMapRaised(disp, tt->s_win[2]); EMapRaised(disp, tt->s_win[3]); EMapRaised(disp, tt->win); - XSync(disp, False); + ecore_x_sync(); xx = tt->iclass->padding.left + iw; @@ -752,7 +752,7 @@ EUnmapWindow(disp, tt->s_win[1]); EUnmapWindow(disp, tt->s_win[2]); EUnmapWindow(disp, tt->s_win[3]); - XSync(disp, False); + ecore_x_sync(); EDBUG_RETURN_; } =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/ttfont.c,v retrieving revision 1.39.2.1 retrieving revision 1.39.2.2 diff -u -3 -r1.39.2.1 -r1.39.2.2 --- ttfont.c 31 Aug 2004 21:58:35 -0000 1.39.2.1 +++ ttfont.c 7 Sep 2004 20:06:57 -0000 1.39.2.2 @@ -120,8 +120,6 @@ #if TEST_TTFONT -#undef XSync - Display *disp; int @@ -143,7 +141,7 @@ win = XCreateSimpleWindow(disp, DefaultRootWindow(disp), 0, 0, 640, 480, 0, 0, 0); XMapWindow(disp, win); - XSync(disp, False); + ecore_x_sync(); gcv.subwindow_mode = IncludeInferiors; gc = XCreateGC(disp, win, GCSubwindowMode, &gcv); =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/zoom.c,v retrieving revision 1.23 retrieving revision 1.23.2.1 diff -u -3 -r1.23 -r1.23.2.1 --- zoom.c 4 May 2004 19:04:42 -0000 1.23 +++ zoom.c 7 Sep 2004 20:06:58 -0000 1.23.2.1 @@ -218,7 +218,7 @@ SwitchRes(0, 0, 0, 0, 0); XWarpPointer(disp, None, ewin->client.win, 0, 0, 0, 0, ewin->client.w / 2, ewin->client.h / 2); - XSync(disp, False); + ecore_x_sync(); zoom_last_ewin = NULL; } return; @@ -263,7 +263,7 @@ zoom_mask_2 = ZoomMask(0, 0, mode->hdisplay, y1); zoom_mask_3 = ZoomMask(x1 + ewin->client.w, 0, x2, mode->vdisplay); zoom_mask_4 = ZoomMask(0, y1 + ewin->client.h, mode->hdisplay, y2); - XSync(disp, False); + ecore_x_sync(); } } ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs