Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h areas.c backgrounds.c comms.c coords.c desktops.c dialog.c
dock.c draw.c ecore-e16.h eobj.c events.c ewin-ops.c ewins.c
ewmh.c extinitwin.c focus.c fx.c gnome.c handlers.c hints.c
icccm.c iclass.c iconify.c main.c menus.c misc.c moveresize.c
pager.c progress.c session.c setup.c slideout.c text.c
tooltips.c ttfont.c warp.c x.c zoom.c
Log Message:
Fix server grabbing issues. Don't use ecore_x API for trivial stuff.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.421
retrieving revision 1.422
diff -u -3 -r1.421 -r1.422
--- E.h 7 May 2005 09:27:13 -0000 1.421
+++ E.h 7 May 2005 11:19:53 -0000 1.422
@@ -2248,6 +2248,11 @@
Display *EDisplayOpen(const char *dstr, int scr);
void EDisplayClose(void);
void EDisplayDisconnect(void);
+void EGrabServer(void);
+void EUngrabServer(void);
+int EServerIsGrabbed(void);
+void EFlush(void);
+void ESync(void);
void ERegisterWindow(Window win);
void EUnregisterWindow(Window win);
@@ -2349,4 +2354,3 @@
#define FILEPATH_LEN_MAX 4096
#include "emodule.h"
-#include "ecore-e16.h"
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/areas.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -3 -r1.84 -r1.85
--- areas.c 7 May 2005 09:27:14 -0000 1.84
+++ areas.c 7 May 2005 11:19:55 -0000 1.85
@@ -258,7 +258,7 @@
/* set hints up for it */
HintsSetDesktopViewport();
- ecore_x_sync();
+ ESync();
ActionsResume();
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/backgrounds.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- backgrounds.c 23 Apr 2005 08:28:02 -0000 1.26
+++ backgrounds.c 7 May 2005 11:19:55 -0000 1.27
@@ -654,7 +654,7 @@
XSetForeground(disp, gc, bg->bg_solid.pixel);
XFillRectangle(disp, win, gc, 0, 0, rw, rh);
}
- ecore_x_sync();
+ ESync();
}
if (gc)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/comms.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -3 -r1.68 -r1.69
--- comms.c 19 Mar 2005 16:39:59 -0000 1.68
+++ comms.c 7 May 2005 11:19:55 -0000 1.69
@@ -22,6 +22,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
+#include "ecore-e16.h"
struct _client
{
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/coords.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- coords.c 7 May 2005 09:27:14 -0000 1.28
+++ coords.c 7 May 2005 11:19:56 -0000 1.29
@@ -100,7 +100,7 @@
ImageclassApply(ic, eo->win, cw, ch, 1, 0, STATE_NORMAL, 0, ST_UNKNWN);
TextclassApply(ic, eo->win, cw, ch, 0, 0, STATE_NORMAL, 0, tc, s);
- XFlush(disp);
+ EFlush();
}
void
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/desktops.c,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -3 -r1.143 -r1.144
--- desktops.c 7 May 2005 09:27:14 -0000 1.143
+++ desktops.c 7 May 2005 11:19:56 -0000 1.144
@@ -1194,7 +1194,7 @@
HandleDrawQueue();
}
HintsSetCurrentDesktop();
- ecore_x_sync();
+ ESync();
}
static void
@@ -1224,7 +1224,7 @@
HandleDrawQueue();
}
HintsSetCurrentDesktop();
- ecore_x_sync();
+ ESync();
}
void
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/dialog.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -3 -r1.107 -r1.108
--- dialog.c 1 May 2005 11:27:34 -0000 1.107
+++ dialog.c 7 May 2005 11:19:56 -0000 1.108
@@ -649,7 +649,7 @@
if (!FindDialog(d->win))
AddItem(d, d->name, d->win, LIST_TYPE_DIALOG);
- ecore_x_sync();
+ ESync();
DialogRedraw(d);
Mode.queue_up = pq;
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/dock.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- dock.c 28 Apr 2005 22:01:53 -0000 1.24
+++ dock.c 7 May 2005 11:19:56 -0000 1.25
@@ -143,8 +143,6 @@
XMapWindow(disp, ewin->client.icon_win);
}
- ecore_x_ungrab();
-
ImageclassApply(ic, EoGetWin(ewin), ewin->client.w, ewin->client.h,
0, 0, STATE_NORMAL, 0, ST_BUTTON);
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/draw.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -3 -r1.65 -r1.66
--- draw.c 7 May 2005 09:27:14 -0000 1.65
+++ draw.c 7 May 2005 11:19:56 -0000 1.66
@@ -379,7 +379,7 @@
{
if (!pi)
return;
- ecore_x_sync();
+ ESync();
XShmDetach(disp, pi->shminfo);
shmdt(pi->shminfo->shmaddr);
shmctl(pi->shminfo->shmid, IPC_RMID, 0);
@@ -515,7 +515,9 @@
}
if ((w <= 0) || (h <= 0))
return;
- ecore_x_sync();
+
+ ESync();
+
if (dst)
{
switch (dst->xim->bits_per_pixel)
@@ -1196,7 +1198,7 @@
if ((!root_pi) || (!ewin_pi) || (!draw_pi))
{
Conf.movres.mode_move = 0;
- ecore_x_ungrab();
+ EUngrabServer();
DrawEwinShape(ewin, Conf.movres.mode_move, x, y, w, h,
firstlast);
goto done;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ecore-e16.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- ecore-e16.h 19 Mar 2005 16:40:01 -0000 1.7
+++ ecore-e16.h 7 May 2005 11:19:57 -0000 1.8
@@ -49,36 +49,6 @@
#define _ecore_x_disp disp
-#define ecore_x_init(dstr) \
- disp = XOpenDisplay(dstr)
-#define ecore_x_shutdown() \
- XCloseDisplay(disp)
-#define ecore_x_display_get() \
- disp
-
-#define ecore_x_sync() \
- XSync(disp, False)
-
-#define ecore_x_window_move(win, x, y) \
- XMoveWindow(disp, win, x, y)
-#define ecore_x_window_resize(win, w, h) \
- XResizeWindow(disp, win, w, h)
-#define ecore_x_window_move_resize(win, x, y, w, h) \
- XMoveResizeWindow(disp, win, x, y, w, h)
-
-#define ecore_x_pixmap_new(draw, w, h, dep) \
- XCreatePixmap(disp, draw, w, h, dep)
-#define ecore_x_pixmap_del(pmap) \
- XFreePixmap(disp, pmap)
-
-#define ecore_x_gc_new(draw) \
- XCreateGC(disp, draw, 0, NULL);
-#define ecore_x_gc_del(gc) \
- XFreeGC(disp, gc)
-
-void ecore_x_grab(void);
-void ecore_x_ungrab(void);
-
int ecore_x_client_message32_send(Ecore_X_Window win,
Ecore_X_Atom type,
long mask,
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/eobj.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- eobj.c 7 May 2005 09:27:14 -0000 1.26
+++ eobj.c 7 May 2005 11:19:57 -0000 1.27
@@ -22,6 +22,7 @@
*/
#include "E.h"
#include "ecompmgr.h"
+#include "ecore-e16.h"
void
EobjSetDesk(EObj * eo, int desk)
@@ -408,7 +409,7 @@
{
int k, x, y;
- ecore_x_grab();
+ EGrabServer();
ETimedLoopInit(0, 1024, speed);
for (k = 0; k <= 1024;)
@@ -421,7 +422,7 @@
}
EobjMove(eo, tx, ty);
- ecore_x_ungrab();
+ EUngrabServer();
}
void
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/events.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -3 -r1.85 -r1.86
--- events.c 1 May 2005 11:27:42 -0000 1.85
+++ events.c 7 May 2005 11:19:57 -0000 1.86
@@ -212,7 +212,7 @@
{
XSetInputFocus(disp, ev->xkey.root, RevertToPointerRoot,
CurrentTime);
- ecore_x_sync();
+ ESync();
ev->xkey.time = CurrentTime;
XSendEvent(disp, ev->xkey.root, False, 0, ev);
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewin-ops.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- ewin-ops.c 7 May 2005 09:27:14 -0000 1.29
+++ ewin-ops.c 7 May 2005 11:19:57 -0000 1.30
@@ -101,7 +101,7 @@
SoundPlay("SOUND_WINDOW_SLIDE");
if (Conf.slidemode > 0)
- ecore_x_grab();
+ EGrabServer();
ETimedLoopInit(0, 1024, speed);
for (k = 0; k <= 1024;)
@@ -125,7 +125,7 @@
Mode.doingslide = 0;
if (Conf.slidemode > 0)
- ecore_x_ungrab();
+ EUngrabServer();
SoundPlay("SOUND_WINDOW_SLIDE_END");
}
@@ -148,7 +148,7 @@
SoundPlay("SOUND_WINDOW_SLIDE");
if (Conf.slidemode > 0)
- ecore_x_grab();
+ EGrabServer();
ETimedLoopInit(0, 1024, speed);
for (k = 0; k <= 1024;)
@@ -187,7 +187,7 @@
Mode.doingslide = 0;
if (Conf.slidemode > 0)
- ecore_x_ungrab();
+ EUngrabServer();
SoundPlay("SOUND_WINDOW_SLIDE_END");
@@ -798,7 +798,7 @@
EoMoveResize(ewin, x, y, w, h);
EMoveResizeWindow(ewin->win_container, -30, -30, 1, 1);
EwinBorderCalcSizes(ewin);
- ecore_x_sync();
+ ESync();
EwinPropagateShapes(ewin);
Mode.queue_up = pq;
@@ -864,7 +864,7 @@
ewin->shaded = 0;
MoveResizeEwin(ewin, x, y, ewin->client.w, ewin->client.h);
- ecore_x_sync();
+ ESync();
EwinPropagateShapes(ewin);
Mode.queue_up = pq;
@@ -902,7 +902,7 @@
#if 0
Eprintf("EwinShade-B\n");
- ecore_x_grab();
+ EGrabServer();
#endif
switch (ewin->border->shadedir)
@@ -1066,10 +1066,10 @@
EMoveResizeWindow(ewin->win_container, -30, -30, 1, 1);
EwinBorderCalcSizes(ewin);
MoveEwin(ewin, EoGetX(ewin), EoGetY(ewin));
- ecore_x_sync();
+ ESync();
#if 0
- ecore_x_ungrab();
+ EUngrabServer();
Eprintf("EwinShade-E\n");
#endif
@@ -1109,7 +1109,7 @@
#if 0
Eprintf("EwinUnShade-B\n");
- ecore_x_grab();
+ EGrabServer();
#endif
switch (ewin->border->shadedir)
@@ -1301,10 +1301,10 @@
MoveResizeEwin(ewin, EoGetX(ewin), EoGetY(ewin), ewin->client.w,
ewin->client.h);
- ecore_x_sync();
+ ESync();
#if 0
- ecore_x_ungrab();
+ EUngrabServer();
Eprintf("EwinUnShade-E\n");
#endif
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewins.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -3 -r1.56 -r1.57
--- ewins.c 7 May 2005 09:27:14 -0000 1.56
+++ ewins.c 7 May 2005 11:19:57 -0000 1.57
@@ -625,7 +625,7 @@
int i, k, num, fx, fy, x, y, desk;
char doslide, manplace;
- ecore_x_grab();
+ EGrabServer();
/* adopt the new baby */
ewin = Adopt(ewin, win);
@@ -877,7 +877,7 @@
}
done:
- ecore_x_ungrab();
+ EUngrabServer();
}
EWin *
@@ -887,7 +887,7 @@
EWin *ewin;
Border *b;
- ecore_x_grab();
+ EGrabServer();
b = NULL;
if (bname)
@@ -906,7 +906,7 @@
MoveEwinToDesktopAt(ewin, EoGetDesk(ewin), EoGetX(ewin), EoGetY(ewin));
done:
- ecore_x_ungrab();
+ EUngrabServer();
return ewin;
}
@@ -921,7 +921,7 @@
Eprintf("EwinWithdraw %#lx %s state=%d\n", ewin->client.win,
EwinGetName(ewin), ewin->state);
- ecore_x_grab();
+ EGrabServer();
/* Park the client window on the root */
x = ewin->client.x;
@@ -933,8 +933,8 @@
ICCCM_Withdraw(ewin);
HintsDelWindowHints(ewin);
- ecore_x_sync();
- ecore_x_ungrab();
+ ESync();
+ EUngrabServer();
if (EwinIsInternal(ewin))
EwinDestroy(ewin);
@@ -1216,7 +1216,7 @@
static void
EwinEventPropertyNotify(EWin * ewin, XEvent * ev)
{
- ecore_x_grab();
+ EGrabServer();
EwinChangesStart(ewin);
HintsProcessPropertyChange(ewin, ev->xproperty.atom);
@@ -1224,7 +1224,7 @@
SyncBorderToEwin(ewin);
EwinChangesProcess(ewin);
- ecore_x_ungrab();
+ EUngrabServer();
}
static void
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewmh.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -3 -r1.69 -r1.70
--- ewmh.c 23 Apr 2005 08:28:02 -0000 1.69
+++ ewmh.c 7 May 2005 11:19:57 -0000 1.70
@@ -24,6 +24,7 @@
* Extended Window Manager Hints.
*/
#include "E.h"
+#include "ecore-e16.h"
/*
* _NET_WM_MOVERESIZE client message actions
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/extinitwin.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- extinitwin.c 23 Apr 2005 13:35:37 -0000 1.8
+++ extinitwin.c 7 May 2005 11:19:57 -0000 1.9
@@ -22,6 +22,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
+#include "ecore-e16.h"
#include <X11/keysym.h>
#include <sys/time.h>
@@ -39,10 +40,9 @@
if (EventDebug(EDBUG_TYPE_SESSION))
Eprintf("ExtInitWinMain enter\n");
- ecore_x_init(NULL);
- disp = ecore_x_display_get();
+ disp = EDisplayOpen(NULL, -1);
- ecore_x_grab();
+ EGrabServer();
#if 0
imlib_set_cache_size(2048 * 1024);
@@ -79,8 +79,8 @@
XSelectInput(disp, win, StructureNotifyMask);
- ecore_x_ungrab();
- ecore_x_sync();
+ EUngrabServer();
+ ESync();
{
Window w2, ww;
@@ -152,14 +152,14 @@
tv.tv_sec = 0;
tv.tv_usec = 50000;
select(0, NULL, NULL, NULL, &tv);
- ecore_x_sync();
+ ESync();
}
}
if (EventDebug(EDBUG_TYPE_SESSION))
Eprintf("ExtInitWinMain exit\n");
- ecore_x_shutdown();
+ EDisplayClose();
exit(0);
}
@@ -175,12 +175,12 @@
Eprintf("ExtInitWinCreate\n");
a = XInternAtom(disp, "ENLIGHTENMENT_RESTART_SCREEN", False);
- ecore_x_sync();
+ ESync();
if (fork())
{
/* Parent */
- ecore_x_ungrab();
+ EUngrabServer();
for (;;)
{
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/focus.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -3 -r1.94 -r1.95
--- focus.c 21 Mar 2005 19:03:03 -0000 1.94
+++ focus.c 7 May 2005 11:19:58 -0000 1.95
@@ -510,9 +510,9 @@
Eprintf("FocusHandleClick %#lx %#lx\n", win, ewin->win_container);
if (win == ewin->win_container)
{
- ecore_x_sync();
+ ESync();
XAllowEvents(disp, ReplayPointer, CurrentTime);
- ecore_x_sync();
+ ESync();
}
}
else if (ewin->focusclick)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/fx.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -3 -r1.46 -r1.47
--- fx.c 19 Mar 2005 16:40:02 -0000 1.46
+++ fx.c 7 May 2005 11:19:58 -0000 1.47
@@ -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);
- ecore_x_sync();
+ ESync();
}
DoIn("FX_RAINDROPS_TIMEOUT", (0.066 /*/ (float)fx_raindrops_number */ ),
FX_raindrops_timeout, 0, NULL);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/gnome.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- gnome.c 19 Mar 2005 16:40:02 -0000 1.47
+++ gnome.c 7 May 2005 11:19:58 -0000 1.48
@@ -22,6 +22,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
+#include "ecore-e16.h"
/* WIN_WM_NAME STRING - contains a string identifier for the WM's name */
#define XA_WIN_WM_NAME "_WIN_WM_NAME"
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/handlers.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -3 -r1.45 -r1.46
--- handlers.c 15 Apr 2005 21:07:45 -0000 1.45
+++ handlers.c 7 May 2005 11:19:58 -0000 1.46
@@ -56,7 +56,7 @@
case SIGILL:
if (disp)
- ecore_x_ungrab();
+ EUngrabServer();
DialogAlert(_
("Enlightenment performed an Illegal Instruction.\n" "\n"
"This most likely is due to you having installed an run
a\n"
@@ -70,7 +70,7 @@
case SIGFPE:
if (disp)
- ecore_x_ungrab();
+ EUngrabServer();
DialogAlert(_
("Enlightenment caused a Floating Point Exception.\n" "\n"
"This means that Enlightenment or support library routines
it calls\n"
@@ -89,7 +89,7 @@
abort();
loop_count++;
if (disp)
- ecore_x_ungrab();
+ EUngrabServer();
DialogAlert(_
("Enlightenment caused Segment Violation (Segfault)\n" "\n"
"This means that Enlightenment or support library routines
it calls\n"
@@ -105,7 +105,7 @@
case SIGBUS:
if (disp)
- ecore_x_ungrab();
+ EUngrabServer();
DialogAlert(_
("Enlightenment caused Bus Error.\n" "\n"
"It is suggested you check your hardware and OS
installation.\n"
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/hints.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- hints.c 23 Apr 2005 08:28:02 -0000 1.40
+++ hints.c 7 May 2005 11:19:58 -0000 1.41
@@ -24,6 +24,7 @@
* Feeble attempt to collect hint stuff in one place
*/
#include "E.h"
+#include "ecore-e16.h"
/*
* Functions that set X11-properties from E-internals
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/icccm.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -3 -r1.93 -r1.94
--- icccm.c 23 Apr 2005 08:28:02 -0000 1.93
+++ icccm.c 7 May 2005 11:19:58 -0000 1.94
@@ -22,6 +22,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
+#include "ecore-e16.h"
void
ICCCM_Init(void)
@@ -769,10 +770,10 @@
int x, y, w, h, d;
Window rt;
- ecore_x_grab();
+ EGrabServer();
EGetGeometry(ewin->client.win, &rt, &x, &y, &w, &h, &d, &d);
rl = EShapeGetRectangles(ewin->client.win, ShapeBounding, &rn, &ord);
- ecore_x_ungrab();
+ EUngrabServer();
if (rn < 1)
{
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/iclass.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -3 -r1.61 -r1.62
--- iclass.c 7 May 2005 09:27:14 -0000 1.61
+++ iclass.c 7 May 2005 11:19:58 -0000 1.62
@@ -772,7 +772,8 @@
if ((flags & ICLASS_ATTR_GLASS) || (bg == None))
bg = VRoot.win;
imlib_context_set_drawable(bg);
- ii = imlib_create_image_from_drawable(0, xx, yy, w, h, 1);
+ ii = imlib_create_image_from_drawable(0, xx, yy, w, h,
+ !EServerIsGrabbed());
imlib_context_set_image(ii);
imlib_context_set_drawable(win);
}
@@ -981,7 +982,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);
- ecore_x_sync();
+ ESync();
break;
case BEVEL_THICKPOINT:
XSetForeground(disp, gc, is->hi.pixel);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/iconify.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -3 -r1.141 -r1.142
--- iconify.c 2 May 2005 22:10:59 -0000 1.141
+++ iconify.c 7 May 2005 11:19:59 -0000 1.142
@@ -22,6 +22,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
+#include "ecore-e16.h"
#include <math.h>
typedef enum
@@ -146,7 +147,7 @@
if (Mode.wm.startup)
return;
- ecore_x_grab();
+ EGrabServer();
spd = 0.00001;
gcv.subwindow_mode = IncludeInferiors;
gcv.function = GXxor;
@@ -206,7 +207,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);
- ecore_x_sync();
+ ESync();
t2 = GetTime();
t = t2 - t1;
t1 = t2;
@@ -276,7 +277,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);
- ecore_x_sync();
+ ESync();
t2 = GetTime();
t = t2 - t1;
t1 = t2;
@@ -299,7 +300,7 @@
}
}
EFreeGC(gc);
- ecore_x_ungrab();
+ EUngrabServer();
}
static Iconbox *
@@ -785,7 +786,8 @@
mask = EWindowGetShapePixmap(EoGetWin(ewin));
imlib_context_set_drawable(draw);
im = imlib_create_scaled_image_from_drawable(mask, 0, 0, ww, hh,
- w, h, 1, 0);
+ w, h, !EServerIsGrabbed(),
+ 0);
imlib_context_set_image(im);
imlib_image_set_has_alpha(1); /* Should be set by imlib? */
}
@@ -795,7 +797,8 @@
draw = EoGetWin(ewin);
imlib_context_set_drawable(draw);
im = imlib_create_scaled_image_from_drawable(None, 0, 0, ww, hh,
- w, h, 1, 1);
+ w, h, !EServerIsGrabbed(),
+ 1);
imlib_context_set_image(im);
imlib_image_set_has_alpha(1); /* Should be set by imlib? */
}
@@ -824,7 +827,8 @@
imlib_context_set_colormap(None);
imlib_context_set_drawable(ewin->client.icon_pmap);
- im = imlib_create_image_from_drawable(ewin->client.icon_mask, 0, 0, w, h,
1);
+ im = imlib_create_image_from_drawable(ewin->client.icon_mask, 0, 0, w, h,
+ !EServerIsGrabbed());
imlib_context_set_image(im);
imlib_image_set_has_alpha(1); /* Should be set by imlib? */
imlib_context_set_colormap(VRoot.cmap);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/main.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -3 -r1.125 -r1.126
--- main.c 23 Apr 2005 13:35:37 -0000 1.125
+++ main.c 7 May 2005 11:19:59 -0000 1.126
@@ -267,12 +267,12 @@
#endif
/* sync just to make sure */
- ecore_x_sync();
+ ESync();
Mode.queue_up = DRAW_QUEUE_ENABLE;
/* let's make sure we set this up and go to our desk anyways */
DeskGoto(DesksGetCurrent());
- ecore_x_sync();
+ ESync();
#ifdef SIGCONT
for (i = 0; i < Mode.wm.child_count; i++)
@@ -314,7 +314,7 @@
if (disp)
{
- ecore_x_ungrab();
+ EUngrabServer();
GrabPointerRelease();
XAllowEvents(disp, AsyncBoth, CurrentTime);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/menus.c,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -3 -r1.188 -r1.189
--- menus.c 7 May 2005 09:27:15 -0000 1.188
+++ menus.c 7 May 2005 11:19:59 -0000 1.189
@@ -371,7 +371,7 @@
Eprintf("Mode_menus.context_ewin set %s\n",
EwinGetName(Mode_menus.context_ewin));
#endif
- ecore_x_sync();
+ ESync();
#if 1 /* ??? */
Mode_menus.list[0] = m;
Mode_menus.current_depth = 1;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/misc.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -3 -r1.64 -r1.65
--- misc.c 25 Apr 2005 16:02:54 -0000 1.64
+++ misc.c 7 May 2005 11:19:59 -0000 1.65
@@ -154,7 +154,7 @@
etl_fac = (k2 - k1) * speed / 1000.;
gettimeofday(&etl_tv_start, NULL);
- ecore_x_sync();
+ ESync();
}
int
@@ -173,7 +173,7 @@
etl_k = etl_k1 + tm * etl_fac;
y = ETimeCurve(etl_k1, etl_k2, etl_k, 2, 1.0);
- ecore_x_sync();
+ ESync();
CheckEvent();
return y;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/moveresize.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- moveresize.c 7 May 2005 09:27:16 -0000 1.39
+++ moveresize.c 7 May 2005 11:19:59 -0000 1.40
@@ -67,9 +67,6 @@
SoundPlay("SOUND_MOVE_START");
ModulesSignal(ESIGNAL_MOVE_START, NULL);
- if (Conf.movres.mode_move > 0)
- ecore_x_grab();
-
if (grab)
{
GrabPointerRelease();
@@ -120,7 +117,7 @@
if (!ewin)
{
if (Conf.movres.mode_move > 0)
- ecore_x_ungrab();
+ EUngrabServer();
if (Mode.mode == MODE_MOVE)
Conf.movres.mode_move = move_mode_real;
return 0;
@@ -158,9 +155,9 @@
ewin->shape_y - (EoGetY(d2) - EoGetY(d1)));
}
- ecore_x_sync();
+ ESync();
if (Conf.movres.mode_move > 0)
- ecore_x_ungrab();
+ EUngrabServer();
Efree(gwins);
Conf.movres.mode_move = move_mode_real;
@@ -190,6 +187,8 @@
/* If non opaque undraw our boxes */
if (Conf.movres.mode_move > 0)
{
+ EUngrabServer();
+
lst =
ListWinGroupMembersForEwin(ewin, GROUP_ACTION_MOVE, Mode.nogroup,
&num);
@@ -224,6 +223,9 @@
fl = 0; /* This is the first time we draw it */
}
+ if (Conf.movres.mode_move > 0)
+ EGrabServer();
+
DeskGetCurrentArea(&ax, &ay);
/* Redraw any windows that were in "move mode" */
@@ -266,7 +268,7 @@
ModulesSignal(ESIGNAL_RESIZE_START, NULL);
if (Conf.movres.mode_resize > 0)
- ecore_x_grab();
+ EGrabServer();
Mode.queue_up = 0;
@@ -371,7 +373,7 @@
if (!ewin)
{
if (Conf.movres.mode_resize > 0)
- ecore_x_ungrab();
+ EUngrabServer();
return 0;
}
Mode.queue_up = DRAW_QUEUE_ENABLE;
@@ -381,9 +383,9 @@
for (i = 0; i < ewin->border->num_winparts; i++)
ewin->bits[i].no_expose = 1;
- ecore_x_sync();
+ ESync();
if (Conf.movres.mode_resize > 0)
- ecore_x_ungrab();
+ EUngrabServer();
ModulesSignal(ESIGNAL_RESIZE_DONE, NULL);
@@ -412,6 +414,9 @@
if (Mode.mode == MODE_MOVE_PENDING)
{
+ if (Conf.movres.mode_move > 0)
+ EGrabServer();
+
for (i = 0; i < num; i++)
{
ewin1 = gwins[i];
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/pager.c,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -3 -r1.133 -r1.134
--- pager.c 25 Apr 2005 16:02:54 -0000 1.133
+++ pager.c 7 May 2005 11:19:59 -0000 1.134
@@ -137,7 +137,8 @@
imlib_context_set_drawable(src);
im = imlib_create_scaled_image_from_drawable(None, sx, sy, sw, sh,
- scale * dw, scale * dh, 1, 0);
+ scale * dw, scale * dh,
+ !EServerIsGrabbed(), 0);
imlib_context_set_image(im);
imlib_context_set_anti_alias(1);
imlib_render_pixmaps_for_whole_image_at_size(&pmap, &mask, dw, dh);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/progress.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- progress.c 23 Apr 2005 07:31:17 -0000 1.22
+++ progress.c 7 May 2005 11:19:59 -0000 1.23
@@ -167,7 +167,7 @@
EobjResize(p->p_win, w, p->h);
- XFlush(disp);
+ EFlush();
}
void
@@ -191,7 +191,7 @@
EobjMap(p->win, 0);
EobjMap(p->n_win, 0);
EobjMap(p->p_win, 0);
- ecore_x_sync();
+ ESync();
TextclassApply(p->ic, p->win->win, p->w - (p->h * 5), p->h, 0, 0,
STATE_NORMAL, 0, p->tc, p->win->name);
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/session.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -3 -r1.98 -r1.99
--- session.c 29 Apr 2005 16:33:35 -0000 1.98
+++ session.c 7 May 2005 11:19:59 -0000 1.99
@@ -22,6 +22,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
+#include "ecore-e16.h"
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
@@ -839,7 +840,7 @@
MapUnmap(1);
XSelectInput(disp, VRoot.win, 0);
ExtInitWinKill();
- XSync(disp, False);
+ ESync();
}
ModulesSignal(ESIGNAL_EXIT, NULL);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/setup.c,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -3 -r1.159 -r1.160
--- setup.c 23 Apr 2005 13:35:37 -0000 1.159
+++ setup.c 7 May 2005 11:20:00 -0000 1.160
@@ -46,7 +46,7 @@
switch (start)
{
case 0:
- ecore_x_grab();
+ EGrabServer();
XQueryTree(disp, VRoot.win, &rt, &par, &wlist, &num);
for (i = 0; i < num; i++)
{
@@ -65,7 +65,7 @@
}
/* Flush (get rid of unmap events) */
XSync(disp, True);
- ecore_x_ungrab();
+ EUngrabServer();
break;
case 1:
@@ -276,7 +276,7 @@
mask |= StructureNotifyMask;
XSelectInput(disp, VRoot.win, mask);
- ecore_x_sync();
+ ESync();
Mode.wm.xselect = 0;
/* warn, if necessary about X version problems */
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/slideout.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- slideout.c 23 Apr 2005 08:28:03 -0000 1.29
+++ slideout.c 7 May 2005 11:20:00 -0000 1.30
@@ -43,7 +43,7 @@
{
int k, x, y, w, h;
- ecore_x_grab();
+ EGrabServer();
ETimedLoopInit(0, 1024, speed);
for (k = 0; k <= 1024;)
@@ -58,7 +58,7 @@
}
EMoveResizeWindow(win, tx, ty, tw, th);
- ecore_x_ungrab();
+ EUngrabServer();
}
static Slideout *
@@ -180,7 +180,7 @@
EChangeWindowAttributes(ButtonGetWindow(s->button[i]),
CWWinGravity, &att);
EMoveResizeWindow(s->win, xx, yy, 1, 1);
- ecore_x_sync();
+ ESync();
EMapRaised(s->win);
SlideWindowSizeTo(s->win, xx + s->w, yy, xx, yy, 0, s->h, s->w, s->h,
Conf.slidespeedmap);
@@ -193,7 +193,7 @@
EChangeWindowAttributes(ButtonGetWindow(s->button[i]),
CWWinGravity, &att);
EMoveResizeWindow(s->win, xx, yy, 1, 1);
- ecore_x_sync();
+ ESync();
EMapRaised(s->win);
SlideWindowSizeTo(s->win, xx, yy, xx, yy, 0, s->h, s->w, s->h,
Conf.slidespeedmap);
@@ -206,7 +206,7 @@
EChangeWindowAttributes(ButtonGetWindow(s->button[i]),
CWWinGravity, &att);
EMoveResizeWindow(s->win, xx, yy, 1, 1);
- ecore_x_sync();
+ ESync();
EMapRaised(s->win);
SlideWindowSizeTo(s->win, xx, yy + s->h, xx, yy, s->w, 0, s->w, s->h,
Conf.slidespeedmap);
@@ -219,7 +219,7 @@
EChangeWindowAttributes(ButtonGetWindow(s->button[i]),
CWWinGravity, &att);
EMoveResizeWindow(s->win, xx, yy, 1, 1);
- ecore_x_sync();
+ ESync();
EMapRaised(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/text.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -3 -r1.52 -r1.53
--- text.c 19 Mar 2005 16:40:17 -0000 1.52
+++ text.c 7 May 2005 11:20:00 -0000 1.53
@@ -798,7 +798,6 @@
switch (ts->style.orientation)
{
case FONT_TO_UP:
- 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 +808,6 @@
case FONT_TO_DOWN:
XGetGeometry(disp, win, &rr, &win_x, &win_y, &win_w, &win_h,
&win_b, &win_d);
- 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 +816,6 @@
imlib_render_image_on_drawable_at_size(0, 0, w, h);
break;
case FONT_TO_LEFT: /* Holy carumba! That's for yoga addicts, maybe
.... */
- 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.76
retrieving revision 1.77
diff -u -3 -r1.76 -r1.77
--- tooltips.c 23 Apr 2005 07:31:17 -0000 1.76
+++ tooltips.c 7 May 2005 11:20:00 -0000 1.77
@@ -559,7 +559,7 @@
if (tt->win[i])
EobjMap(tt->win[i], 0);
- ecore_x_sync();
+ ESync();
xx = ic->padding.left + iw;
@@ -666,7 +666,7 @@
if (tt->win[i])
EobjUnmap(tt->win[i]);
- ecore_x_sync();
+ ESync();
}
/*
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ttfont.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- ttfont.c 19 Mar 2005 16:40:18 -0000 1.42
+++ ttfont.c 7 May 2005 11:20:01 -0000 1.43
@@ -142,7 +142,7 @@
win = XCreateSimpleWindow(disp, DefaultRootWindow(disp), 0, 0, 640, 480, 0,
0, 0);
XMapWindow(disp, win);
- ecore_x_sync();
+ ESync();
gcv.subwindow_mode = IncludeInferiors;
gc = ECreateGC(disp, win, GCSubwindowMode, &gcv);
@@ -166,13 +166,13 @@
#ifndef USE_ECORE_X
void
-ecore_x_grab(void)
+EGrabServer(void)
{
XGrabServer(disp);
}
void
-ecore_x_ungrab(void)
+EUngrabServer(void)
{
XUngrabServer(disp);
XFlush(disp);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/warp.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -3 -r1.61 -r1.62
--- warp.c 23 Apr 2005 13:30:03 -0000 1.61
+++ warp.c 7 May 2005 11:20:01 -0000 1.62
@@ -208,7 +208,7 @@
PropagateShapes(warpFocusWindow->win);
Mode.queue_up = pq;
- XFlush(disp);
+ EFlush();
}
static void
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/x.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -3 -r1.85 -r1.86
--- x.c 29 Apr 2005 17:37:30 -0000 1.85
+++ x.c 7 May 2005 11:20:01 -0000 1.86
@@ -366,11 +366,11 @@
{
xid->x = x;
xid->y = y;
- ecore_x_window_move(win, x, y);
+ XMoveWindow(disp, win, x, y);
}
}
else
- ecore_x_window_move(win, x, y);
+ XMoveWindow(disp, win, x, y);
}
void
@@ -385,11 +385,11 @@
{
xid->w = w;
xid->h = h;
- ecore_x_window_resize(win, w, h);
+ XResizeWindow(disp, win, w, h);
}
}
else
- ecore_x_window_resize(win, w, h);
+ XResizeWindow(disp, win, w, h);
}
void
@@ -410,11 +410,11 @@
xid->y = y;
xid->w = w;
xid->h = h;
- ecore_x_window_move_resize(win, x, y, w, h);
+ XMoveResizeWindow(disp, win, x, y, w, h);
}
}
else
- ecore_x_window_move_resize(win, x, y, w, h);
+ XMoveResizeWindow(disp, win, x, y, w, h);
}
void
@@ -740,7 +740,7 @@
{
xid->x = x;
xid->y = y;
- ecore_x_window_move(win, x, y);
+ XMoveWindow(disp, win, x, y);
}
}
else
@@ -995,9 +995,8 @@
return mask;
}
-#ifndef USE_ECORE_X
void
-ecore_x_grab(void)
+EGrabServer(void)
{
if (Mode.server_grabbed <= 0)
XGrabServer(disp);
@@ -1005,7 +1004,7 @@
}
void
-ecore_x_ungrab(void)
+EUngrabServer(void)
{
if (Mode.server_grabbed == 1)
{
@@ -1016,7 +1015,24 @@
if (Mode.server_grabbed < 0)
Mode.server_grabbed = 0;
}
-#endif
+
+int
+EServerIsGrabbed(void)
+{
+ return Mode.server_grabbed;
+}
+
+void
+EFlush(void)
+{
+ XFlush(disp);
+}
+
+void
+ESync(void)
+{
+ XSync(disp, False);
+}
Window
GetWinParent(Window win)
@@ -1119,10 +1135,10 @@
unsigned int num;
int i;
- ecore_x_grab();
+ EGrabServer();
if (!XQueryTree(disp, VRoot.win, &root_win, &parent_win, &list, &num))
{
- ecore_x_ungrab();
+ EUngrabServer();
return VRoot.win;
}
if (list)
@@ -1140,13 +1156,13 @@
continue;
XFree(list);
- ecore_x_ungrab();
+ EUngrabServer();
return child;
}
while (--i > 0);
XFree(list);
}
- ecore_x_ungrab();
+ EUngrabServer();
return VRoot.win;
}
@@ -1239,7 +1255,7 @@
if (w <= 0 || h <= 0)
return;
imlib_context_set_drawable(draw);
- im = imlib_create_image_from_drawable(None, 0, 0, w, h, 1);
+ im = imlib_create_image_from_drawable(None, 0, 0, w, h,
!EServerIsGrabbed());
imlib_context_set_image(im);
imlib_image_set_format("png");
sprintf(buf, "%s-%#lx-%d", txt, draw, seqn++);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/zoom.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- zoom.c 19 Mar 2005 16:40:18 -0000 1.26
+++ zoom.c 7 May 2005 11:20:02 -0000 1.27
@@ -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);
- ecore_x_sync();
+ ESync();
zoom_last_ewin = NULL;
}
return;
@@ -262,7 +262,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);
- ecore_x_sync();
+ ESync();
}
}
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs