Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
Tag: branch-exp
E.h backgrounds.c ecompmgr.c events.c ewin-ops.c main.c misc.c
Log Message:
Compositing stuff.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.314.2.53
retrieving revision 1.314.2.54
diff -u -3 -r1.314.2.53 -r1.314.2.54
--- E.h 17 Oct 2004 08:47:24 -0000 1.314.2.53
+++ E.h 17 Oct 2004 22:28:10 -0000 1.314.2.54
@@ -1593,20 +1593,21 @@
#define ENABLE_DEBUG_EVENTS 1
#if ENABLE_DEBUG_EVENTS
-#define EDBUG_TYPE_EWINS 128
-#define EDBUG_TYPE_FOCUS 129
-#define EDBUG_TYPE_COMPRESSION 130
-#define EDBUG_TYPE_STACKING 131
-#define EDBUG_TYPE_RAISELOWER 132
-#define EDBUG_TYPE_MOVERESIZE 133
-#define EDBUG_TYPE_SESSION 134
-#define EDBUG_TYPE_SNAPS 135
+#define EDBUG_TYPE_EWINS 128
+#define EDBUG_TYPE_FOCUS 129
+#define EDBUG_TYPE_COMPRESSION 130
+#define EDBUG_TYPE_STACKING 131
+#define EDBUG_TYPE_RAISELOWER 132
+#define EDBUG_TYPE_MOVERESIZE 133
+#define EDBUG_TYPE_SESSION 134
+#define EDBUG_TYPE_SNAPS 135
#define EDBUG_TYPE_DESKS 136
-#define EDBUG_TYPE_DISPATCH 137
-#define EDBUG_TYPE_MODULES 138
-#define EDBUG_TYPE_CONFIG 139
-#define EDBUG_TYPE_IPC 140
-#define EDBUG_TYPE_GRABS 141
+#define EDBUG_TYPE_DISPATCH 137
+#define EDBUG_TYPE_MODULES 138
+#define EDBUG_TYPE_CONFIG 139
+#define EDBUG_TYPE_IPC 140
+#define EDBUG_TYPE_GRABS 141
+#define EDBUG_TYPE_EVENTS 142
int EventDebug(unsigned int type);
#else
#define EventDebug(type) 0
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/backgrounds.c,v
retrieving revision 1.5.2.11
retrieving revision 1.5.2.12
diff -u -3 -r1.5.2.11 -r1.5.2.12
--- backgrounds.c 10 Oct 2004 11:17:36 -0000 1.5.2.11
+++ backgrounds.c 17 Oct 2004 22:28:10 -0000 1.5.2.12
@@ -843,7 +843,7 @@
Pixmap
BackgroundGetPixmap(const Background * bg)
{
- return bg->pmap;
+ return (bg) ? bg->pmap : None;
}
static time_t
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/ecompmgr.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -3 -r1.1.2.1 -r1.1.2.2
--- ecompmgr.c 26 Sep 2004 20:09:50 -0000 1.1.2.1
+++ ecompmgr.c 17 Oct 2004 22:28:10 -0000 1.1.2.2
@@ -23,7 +23,7 @@
/* >>> Original copyright notice begin <<< */
/*
- * $Id: ecompmgr.c,v 1.1.2.1 2004/09/26 20:09:50 kwo Exp $
+ * $Id: ecompmgr.c,v 1.1.2.2 2004/10/17 22:28:10 kwo Exp $
*
* Copyright © 2003 Keith Packard
*
@@ -79,10 +79,6 @@
#define CAN_DO_USABLE 0
-#ifndef BUILD_ECOMPMGR
-#define BUILD_ECOMPMGR 0 /* Use -DBUILD_ECOMPMGR to build stand-alone version */
-#endif
-
#define USE_MOSTLY_ROOT_EVENTS 1
#define ENABLE_SHADOWS 0
@@ -91,30 +87,22 @@
#define ENABLE_DEBUG 1
#if ENABLE_DEBUG
-
-#if BUILD_ECOMPMGR
-static int dbg = 1;
-
-#define D1printf(fmt...) if(dbg&1)printf(fmt)
-#define D2printf(fmt...) if(dbg&2)printf(fmt)
-#else
#define EDBUG_TYPE_COMPMGR 160
#define EDBUG_TYPE_COMPMGR2 161
#define D1printf(fmt...) if(EventDebug(EDBUG_TYPE_COMPMGR))Eprintf(fmt)
#define D2printf(fmt...) if(EventDebug(EDBUG_TYPE_COMPMGR2))Eprintf(fmt)
-#endif
-
#else
-
#define D1printf(fmt...)
#define D2printf(fmt...)
-
#endif /* ENABLE_DEBUG */
-#define DEBUG_REPAINT 0
#define DEBUG_EVENTS 0
#define MONITOR_REPAINT 0
+#define set_ignore(dpy, seq)
+
+extern Atom _NET_WM_WINDOW_OPACITY;
+
typedef struct _Win ECmWinInfo; /* TBD */
typedef struct _Win
@@ -153,42 +141,30 @@
struct _Win *prev_trans;
} Win;
-static Win *list;
+static struct
+{
+ char enable;
+ char autoredirect;
+} Conf_compmgr;
-static Display *my_dpy;
-static int my_scr;
-static Window my_root;
+static struct
+{
+ char active;
+} Mode_compmgr;
+
+static Win *list;
static Picture rootPicture;
static Picture rootBuffer;
-static Picture rootTile;
+static Picture rootTile = None;
static XserverRegion allDamage;
static Bool clipChanged;
-/* find these once and be done with it */
-static Atom opacityAtom;
-
-static int root_height, root_width;
-
-#if BUILD_ECOMPMGR
-
-typedef struct _ignore
-{
- struct _ignore *next;
- unsigned long sequence;
-} ignore;
-
-static ignore *ignore_head, **ignore_tail = &ignore_head;
-#endif
-
#if HAS_NAME_WINDOW_PIXMAP
static Bool hasNamePixmap;
#endif
-/* opacity property name; sometime soon I'll write up an EWMH spec for it */
-#define OPACITY_PROP "_NET_WM_WINDOW_OPACITY"
-
#define TRANSLUCENT 0xe0000000
#define OPAQUE 0xffffffff
@@ -609,7 +585,7 @@
shadowImage = make_shadow(dpy, opacity, width, height);
if (!shadowImage)
return None;
- shadowPixmap = XCreatePixmap(dpy, my_root,
+ shadowPixmap = XCreatePixmap(dpy, VRoot.win,
shadowImage->width, shadowImage->height, 8);
shadowPicture = XRenderCreatePicture(dpy, shadowPixmap,
XRenderFindStandardFormat(dpy,
@@ -647,7 +623,7 @@
XRenderPictureAttributes pa;
XRenderColor c;
- pixmap = XCreatePixmap(dpy, my_root, 1, 1, argb ? 32 : 8);
+ pixmap = XCreatePixmap(dpy, VRoot.win, 1, 1, argb ? 32 : 8);
pa.repeat = True;
picture = XRenderCreatePicture(dpy, pixmap,
XRenderFindStandardFormat(dpy,
@@ -664,102 +640,59 @@
return picture;
}
-#if BUILD_ECOMPMGR
-
-static int xfixes_event, xfixes_error;
-static int damage_event, damage_error;
-static int composite_event, composite_error;
-static int composite_opcode;
-static int render_event, render_error;
-static Bool synchronize;
-
static void
-set_ignore(Display * dpy __UNUSED__, unsigned long sequence)
-{
- ignore *i = malloc(sizeof(ignore));
-
- if (!i)
- return;
- i->sequence = sequence;
- i->next = 0;
- *ignore_tail = i;
- ignore_tail = &i->next;
-}
-
-#else
-
-#define set_ignore(dpy, sequence)
-
-#endif /* BUILD_ECOMPMGR */
-
-static const char *backgroundProps[] = {
- "_XROOTPMAP_ID",
- "_XSETROOT_ID",
- 0,
-};
-
-static Picture
-root_tile(Display * dpy)
+ECompMgrRootInit(int init)
{
Picture picture;
- Atom actual_type;
Pixmap pixmap;
- int actual_format;
- unsigned long nitems;
- unsigned long bytes_after;
- unsigned char *prop;
Bool fill;
+ XRenderPictFormat *pictfmt;
XRenderPictureAttributes pa;
- int p;
- pixmap = None;
- for (p = 0; backgroundProps[p]; p++)
+ if (rootTile)
{
- if (XGetWindowProperty
- (dpy, my_root, XInternAtom(dpy, backgroundProps[p], False), 0, 4,
- False, AnyPropertyType, &actual_type, &actual_format, &nitems,
- &bytes_after, &prop) == Success
- && actual_type == XInternAtom(dpy, "PIXMAP", False)
- && actual_format == 32 && nitems == 1)
- {
- memcpy(&pixmap, prop, 4);
- XFree(prop);
- fill = False;
- break;
- }
+ XClearArea(disp, VRoot.win, 0, 0, 0, 0, True);
+ XRenderFreePicture(disp, rootTile);
+ rootTile = None;
+ if (!init)
+ return;
}
+
+ fill = False;
+ pixmap = BackgroundGetPixmap(desks.desk[0].bg);
if (!pixmap)
{
- pixmap = XCreatePixmap(dpy, my_root, 1, 1, DefaultDepth(dpy, my_scr));
+ pixmap = XCreatePixmap(disp, VRoot.win, 1, 1, VRoot.depth);
fill = True;
}
+
pa.repeat = True;
- picture = XRenderCreatePicture(dpy, pixmap,
- XRenderFindVisualFormat(dpy,
- DefaultVisual(dpy,
- my_scr)),
- CPRepeat, &pa);
+ pictfmt = XRenderFindVisualFormat(disp, VRoot.vis);
+ picture = XRenderCreatePicture(disp, pixmap, pictfmt, CPRepeat, &pa);
+
if (fill)
{
+ /* FIXME - use bg color */
XRenderColor c;
c.red = c.green = c.blue = 0x8080;
c.alpha = 0xffff;
- XRenderFillRectangle(dpy, PictOpSrc, picture, &c, 0, 0, 1, 1);
+ XRenderFillRectangle(disp, PictOpSrc, picture, &c, 0, 0, 1, 1);
}
- return picture;
+
+ rootTile = picture;
}
static void
paint_root(Display * dpy)
{
if (!rootTile)
- rootTile = root_tile(dpy);
+ ECompMgrRootInit(1);
D1printf("paint_root rootTile=%#lx\n", rootTile);
XRenderComposite(dpy, PictOpSrc,
rootTile, None, rootBuffer,
- 0, 0, 0, 0, 0, 0, root_width, root_height);
+ 0, 0, 0, 0, 0, 0, VRoot.w, VRoot.h);
}
static XserverRegion
@@ -856,6 +789,7 @@
{
Win *w;
Win *t = 0;
+ XRenderPictFormat *pictfmt;
D2printf("paint_all %#lx\n", region);
if (!region)
@@ -864,8 +798,8 @@
r.x = 0;
r.y = 0;
- r.width = root_width;
- r.height = root_height;
+ r.width = VRoot.w;
+ r.height = VRoot.h;
region = XFixesCreateRegion(dpy, &r, 1);
}
@@ -874,16 +808,13 @@
#else
if (!rootBuffer)
{
- Pixmap rootPixmap =
- XCreatePixmap(dpy, my_root, root_width, root_height,
- DefaultDepth(dpy, my_scr));
-
- rootBuffer = XRenderCreatePicture(dpy, rootPixmap,
- XRenderFindVisualFormat(dpy,
- DefaultVisual
- (dpy,
- my_scr)), 0,
- 0);
+ Pixmap rootPixmap;
+
+ rootPixmap =
+ XCreatePixmap(dpy, VRoot.win, VRoot.w, VRoot.h, VRoot.depth);
+
+ pictfmt = XRenderFindVisualFormat(disp, VRoot.vis);
+ rootBuffer = XRenderCreatePicture(dpy, rootPixmap, pictfmt, 0, 0);
XFreePixmap(dpy, rootPixmap);
}
#endif
@@ -891,11 +822,9 @@
XFixesSetPictureClipRegion(dpy, rootPicture, 0, 0, region);
#if MONITOR_REPAINT
XRenderComposite(dpy, PictOpSrc, blackPicture, None, rootPicture,
- 0, 0, 0, 0, 0, 0, root_width, root_height);
-#endif
-#if DEBUG_REPAINT
- printf("paint:");
+ 0, 0, 0, 0, 0, 0, VRoot.w, VRoot.h);
#endif
+
for (w = list; w; w = w->next)
{
#if CAN_DO_USABLE
@@ -923,9 +852,7 @@
w->picture = XRenderCreatePicture(dpy, draw,
format, CPSubwindowMode, &pa);
}
-#if DEBUG_REPAINT
- printf(" 0x%x", w->id);
-#endif
+
D2printf("paint %#lx %d %#lx\n", w->id, w->mode, w->picture);
if (clipChanged)
{
@@ -984,10 +911,7 @@
w->prev_trans = t;
t = w;
}
-#if DEBUG_REPAINT
- printf("\n");
- fflush(stdout);
-#endif
+
XFixesSetPictureClipRegion(dpy, rootBuffer, 0, 0, region);
paint_root(dpy);
for (w = t; w; w = w->prev_trans)
@@ -1072,7 +996,7 @@
{
XFixesSetPictureClipRegion(dpy, rootBuffer, 0, 0, None);
XRenderComposite(dpy, PictOpSrc, rootBuffer, None, rootPicture,
- 0, 0, 0, 0, 0, 0, root_width, root_height);
+ 0, 0, 0, 0, 0, 0, VRoot.w, VRoot.h);
}
}
@@ -1094,7 +1018,7 @@
{
XserverRegion parts;
- D2printf("repair_win %#lx\n", w->id);
+ D2printf("repair_win %#lx damaged=%d\n", w->id, w->damaged);
if (!w->damaged)
{
parts = win_extents(dpy, w);
@@ -1222,7 +1146,7 @@
else
#endif
#endif
- finish_unmap_win(my_dpy, w);
+ finish_unmap_win(disp, w);
}
/* Get the opacity prop from window
@@ -1238,7 +1162,7 @@
unsigned char *data;
data = NULL;
- XGetWindowProperty(dpy, w->id, opacityAtom, 0L, 1L, False,
+ XGetWindowProperty(dpy, w->id, _NET_WM_WINDOW_OPACITY, 0L, 1L, False,
XA_CARDINAL, &actual, &format, &n, &left, &data);
if (data)
{
@@ -1313,7 +1237,7 @@
{
Win *new = malloc(sizeof(Win));
Win **p;
- Display *dpy = my_dpy;
+ Display *dpy = disp;
if (!new)
return NULL;
@@ -1384,7 +1308,7 @@
}
static void
-restack_win(Display * dpy __UNUSED__, Win * w, Window new_above)
+restack_win(Win * w, Window new_above)
{
Window old_above;
@@ -1418,18 +1342,20 @@
static void
ECompMgrRootConfigure(void *prm __UNUSED__, XEvent * ev)
{
- Display *dpy = my_dpy;
+ Display *dpy = disp;
D1printf("ECompMgrRootConfigure root\n");
- if (ev->xconfigure.window == my_root)
+ if (ev->xconfigure.window == VRoot.win)
{
if (rootBuffer)
{
XRenderFreePicture(dpy, rootBuffer);
rootBuffer = None;
}
- root_width = ev->xconfigure.width;
- root_height = ev->xconfigure.height;
+#if 0 /* Should be handled elsewhere */
+ VRoot.w = ev->xconfigure.width;
+ VRoot.h = ev->xconfigure.height;
+#endif
}
return;
}
@@ -1437,7 +1363,7 @@
static void
ECompMgrWinConfigure(ECmWinInfo * w, XEvent * ev)
{
- Display *dpy = my_dpy;
+ Display *dpy = disp;
XserverRegion damage = None;
if (!w)
@@ -1482,7 +1408,7 @@
w->a.height = ev->xconfigure.height;
w->a.border_width = ev->xconfigure.border_width;
w->a.override_redirect = ev->xconfigure.override_redirect;
- restack_win(dpy, w, ev->xconfigure.above);
+ restack_win(w, ev->xconfigure.above);
if (damage)
{
@@ -1498,7 +1424,6 @@
static void
ECompMgrWinCirculate(ECmWinInfo * w, XEvent * ev)
{
- Display *dpy = my_dpy;
Window new_above;
D1printf("ECompMgrWinCirculate %#lx %#lx\n", ev->xany.window, w->id);
@@ -1507,7 +1432,7 @@
new_above = list->id;
else
new_above = None;
- restack_win(dpy, w, new_above);
+ restack_win(w, new_above);
clipChanged = True;
}
@@ -1573,7 +1498,7 @@
static void
ECompMgrWinDel(ECmWinInfo * w, Bool gone, Bool do_fade)
{
- Display *dpy = my_dpy;
+ Display *dpy = disp;
if (!w)
return;
@@ -1593,29 +1518,10 @@
do_fade = False;
}
-#if 0
-static void
-dump_win(Win * w)
-{
- printf("\t%08lx: %d x %d + %d + %d (%d)\n", w->id,
- w->a.width, w->a.height, w->a.x, w->a.y, w->a.border_width);
-}
-
-static void
-dump_wins(void)
-{
- Win *w;
-
- printf("windows:\n");
- for (w = list; w; w = w->next)
- dump_win(w);
-}
-#endif
-
static void
ECompMgrWinDamage(Win * w, XEvent * ev __UNUSED__)
{
- Display *dpy = my_dpy;
+ Display *dpy = disp;
XDamageNotifyEvent *de = (XDamageNotifyEvent *) ev;
if (!w)
@@ -1686,13 +1592,13 @@
static void
ECompMgrWinProperty(Win * w, XEvent * ev)
{
- Display *dpy = my_dpy;
+ Display *dpy = disp;
if (!w)
return;
/* check if Trans property was changed */
- if (ev->xproperty.atom == opacityAtom)
+ if (ev->xproperty.atom == _NET_WM_WINDOW_OPACITY)
{
/* reset mode and redraw window */
D1printf("ECompMgrWinProperty %#lx\n", w->id);
@@ -1705,13 +1611,13 @@
static void
ECompMgrRootExpose(void *prm __UNUSED__, XEvent * ev)
{
- Display *dpy = my_dpy;
+ Display *dpy = disp;
static XRectangle *expose_rects = 0;
static int size_expose = 0;
static int n_expose = 0;
int more = ev->xexpose.count + 1;
- if (ev->xexpose.window != my_root)
+ if (ev->xexpose.window != VRoot.win)
return;
D1printf("ECompMgrRootExpose %d %d %d\n", n_expose, size_expose,
@@ -1755,33 +1661,13 @@
if (!allDamage || autoRedirect)
return;
- paint_all(my_dpy, allDamage);
+ paint_all(disp, allDamage);
paint++;
- XSync(my_dpy, False);
+ XSync(disp, False);
allDamage = None;
clipChanged = False;
}
-static void
-prop_root_win(Display * dpy, XEvent * ev)
-{
- int p;
-
- for (p = 0; backgroundProps[p]; p++)
- {
- if (ev->xproperty.atom == XInternAtom(dpy, backgroundProps[p], False))
- {
- if (rootTile)
- {
- XClearArea(dpy, my_root, 0, 0, 0, 0, True);
- XRenderFreePicture(dpy, rootTile);
- rootTile = None;
- break;
- }
- }
- }
-}
-
#if BUILD_ECOMPMGR || USE_MOSTLY_ROOT_EVENTS
static Win *
@@ -1800,45 +1686,40 @@
static void
ECompMgrStart(void)
{
- Display *dpy = my_dpy;
- int scr = my_scr;
- Window root = my_root;
+ XRenderPictFormat *pictfmt;
XRenderPictureAttributes pa;
- /* get atoms */
- opacityAtom = XInternAtom(dpy, OPACITY_PROP, False);
+ if (!Conf_compmgr.enable || Mode_compmgr.active)
+ return;
+ Mode_compmgr.active = 1;
#if ENABLE_SHADOWS
if (compMode == CompClientShadows)
- gaussianMap = make_gaussian_map(dpy, shadowRadius);
+ gaussianMap = make_gaussian_map(disp, shadowRadius);
#endif
- root_width = DisplayWidth(dpy, scr);
- root_height = DisplayHeight(dpy, scr);
-
pa.subwindow_mode = IncludeInferiors;
- rootPicture = XRenderCreatePicture(dpy, root,
- XRenderFindVisualFormat(dpy,
- DefaultVisual(dpy,
- scr)),
- CPSubwindowMode, &pa);
+ pictfmt = XRenderFindVisualFormat(disp, VRoot.vis);
+ rootPicture =
+ XRenderCreatePicture(disp, VRoot.win, pictfmt, CPSubwindowMode, &pa);
+
#if ENABLE_SHADOWS
- blackPicture = solid_picture(dpy, True, 1, 0, 0, 0);
+ blackPicture = solid_picture(disp, True, 1, 0, 0, 0);
if (compMode == CompServerShadows)
- transBlackPicture = solid_picture(dpy, True, 0.3, 0, 0, 0);
+ transBlackPicture = solid_picture(disp, True, 0.3, 0, 0, 0);
#endif
allDamage = None;
clipChanged = True;
- XGrabServer(dpy);
+ XGrabServer(disp);
if (autoRedirect)
- XCompositeRedirectSubwindows(dpy, root, CompositeRedirectAutomatic);
+ XCompositeRedirectSubwindows(disp, VRoot.win, CompositeRedirectAutomatic);
else
{
- XCompositeRedirectSubwindows(dpy, root, CompositeRedirectManual);
- ESelectInputAdd(dpy, root,
+ XCompositeRedirectSubwindows(disp, VRoot.win, CompositeRedirectManual);
+ ESelectInputAdd(disp, VRoot.win,
SubstructureNotifyMask |
ExposureMask | StructureNotifyMask |
PropertyChangeMask);
@@ -1853,7 +1734,7 @@
unsigned int nchildren;
unsigned int i;
- XQueryTree(dpy, root, &root_return, &parent_return, &children,
+ XQueryTree(disp, VRoot.win, &root_return, &parent_return, &children,
&nchildren);
for (i = 0; i < nchildren; i++)
ECompMgrWinNew(children[i], i ? children[i - 1] : None);
@@ -1861,10 +1742,35 @@
}
#endif
- XUngrabServer(dpy);
+ XUngrabServer(disp);
if (!autoRedirect)
- paint_all(dpy, None);
+ paint_all(disp, None);
+}
+
+static void
+ECompMgrStop(void)
+{
+ if (!Mode_compmgr.active)
+ return;
+ Mode_compmgr.active = 0;
+
+ if (rootPicture)
+ XRenderFreePicture(disp, rootPicture);
+ rootPicture = None;
+
+ if (rootBuffer)
+ XRenderFreePicture(disp, rootBuffer);
+ rootBuffer = None;
+
+ if (rootTile)
+ XRenderFreePicture(disp, rootTile);
+ rootTile = None;
+
+ while (list)
+ ECompMgrWinDel(list, False, False);
+
+ XCompositeRedirectSubwindows(disp, VRoot.win, CompositeRedirectAutomatic);
}
#if BUILD_ECOMPMGR || USE_MOSTLY_ROOT_EVENTS
@@ -1934,13 +1840,13 @@
break;
case ReparentNotify:
- if (ev->xreparent.parent == my_root)
+ if (ev->xreparent.parent == VRoot.win)
goto case_CreateNotify;
ECompMgrWinDel(_GET_WIN(ev->xreparent.window), False, True);
break;
case ConfigureNotify:
- if (ev->xreparent.parent == my_root)
+ if (ev->xreparent.parent == VRoot.win)
ECompMgrRootConfigure(prm, ev);
else
ECompMgrWinConfigure(_GET_WIN(ev->xconfigure.window), ev);
@@ -1961,325 +1867,12 @@
case Expose:
ECompMgrRootExpose(prm, ev);
break;
-
- case PropertyNotify:
- prop_root_win(my_dpy, ev);
- break;
- }
-}
-
-#if BUILD_ECOMPMGR
-
-static void
-ECompMgrHandleEvent(Display * dpy __UNUSED__, XEvent * ev)
-{
- if (ev->xany.window == my_root)
- ECompMgrHandleRootEvent(ev, NULL);
- else
- ECompMgrHandleWindowEvent(ev, NULL);
-}
-
-#if DEBUG_EVENTS
-static int
-ev_serial(XEvent * ev)
-{
- if ((ev->type & 0x7f) != KeymapNotify)
- return ev->xany.serial;
- return NextRequest(ev->xany.display);
-}
-
-static const char *
-ev_name(XEvent * ev)
-{
- static char buf[128];
-
- switch (ev->type & 0x7f)
- {
- case Expose:
- return "Expose";
- case MapNotify:
- return "Map";
- case UnmapNotify:
- return "Unmap";
- case ReparentNotify:
- return "Reparent";
- case CirculateNotify:
- return "Circulate";
- default:
- if (ev->type == damage_event + XDamageNotify)
- return "Damage";
- sprintf(buf, "Event %d", ev->type);
- return buf;
- }
-}
-
-static Window
-ev_window(XEvent * ev)
-{
- switch (ev->type)
- {
- case Expose:
- return ev->xexpose.window;
- case MapNotify:
- return ev->xmap.window;
- case UnmapNotify:
- return ev->xunmap.window;
- case ReparentNotify:
- return ev->xreparent.window;
- case CirculateNotify:
- return ev->xcirculate.window;
- default:
- if (ev->type == damage_event + XDamageNotify)
- return ((XDamageNotifyEvent *) ev)->drawable;
- return 0;
- }
-}
-#endif
-
-static void
-discard_ignore(Display * dpy __UNUSED__, unsigned long sequence)
-{
- while (ignore_head)
- {
- if ((long)(sequence - ignore_head->sequence) > 0)
- {
- ignore *next = ignore_head->next;
-
- free(ignore_head);
- ignore_head = next;
- if (!ignore_head)
- ignore_tail = &ignore_head;
- }
- else
- break;
- }
-}
-
-static int
-should_ignore(Display * dpy, unsigned long sequence)
-{
- discard_ignore(dpy, sequence);
- return ignore_head && ignore_head->sequence == sequence;
-}
-
-static int
-error(Display * dpy, XErrorEvent * ev)
-{
- int o;
- const char *name = NULL;
-
- if (should_ignore(dpy, ev->serial))
- return 0;
-
- if (ev->request_code == composite_opcode &&
- ev->minor_code == X_CompositeRedirectSubwindows)
- {
- fprintf(stderr, "Another composite manager is already running\n");
- exit(1);
- }
-
- o = ev->error_code - xfixes_error;
- switch (o)
- {
- case BadRegion:
- name = "BadRegion";
- break;
- default:
- break;
- }
- o = ev->error_code - damage_error;
- switch (o)
- {
- case BadDamage:
- name = "BadDamage";
- break;
- default:
- break;
- }
- o = ev->error_code - render_error;
- switch (o)
- {
- case BadPictFormat:
- name = "BadPictFormat";
- break;
- case BadPicture:
- name = "BadPicture";
- break;
- case BadPictOp:
- name = "BadPictOp";
- break;
- case BadGlyphSet:
- name = "BadGlyphSet";
- break;
- case BadGlyph:
- name = "BadGlyph";
- break;
- default:
- break;
}
-
- printf("error %d request %d minor %d serial %ld\n",
- ev->error_code, ev->request_code, ev->minor_code, ev->serial);
-
-/* abort (); this is just annoying to most people */
- return 0;
}
static void
-usage(char *program)
-{
- fprintf(stderr, "usage: %s [-d display] [-n] [-s] [-c] [-a]\n", program);
- exit(1);
-}
-
-int
-main(int argc, char **argv)
-{
- Display *dpy;
- int scr;
- Window root;
- XEvent ev;
- struct pollfd ufd;
- int composite_major, composite_minor;
- char *display = 0;
- int o;
-
- while ((o = getopt(argc, argv, "d:scnfaS")) != -1)
- {
- switch (o)
- {
- case 'd':
- display = optarg;
- break;
-#if ENABLE_SHADOWS
- case 's':
- compMode = CompServerShadows;
- break;
- case 'c':
- compMode = CompClientShadows;
- break;
- case 'n':
- compMode = CompSimple;
- break;
-#endif
-#if ENABLE_FADING
- case 'f':
- fadeWindows = True;
- break;
-#endif
- case 'a':
- autoRedirect = True;
- break;
- case 'S':
- synchronize = True;
- break;
- default:
- usage(argv[0]);
- break;
- }
- }
-
- my_dpy = dpy = XOpenDisplay(display);
- if (!dpy)
- {
- fprintf(stderr, "Can't open display\n");
- exit(1);
- }
-
- XSetErrorHandler(error);
- if (synchronize)
- XSynchronize(dpy, 1);
-
- my_scr = scr = DefaultScreen(dpy);
- my_root = root = RootWindow(dpy, scr);
-
- if (!XRenderQueryExtension(dpy, &render_event, &render_error))
- {
- fprintf(stderr, "No render extension\n");
- exit(1);
- }
- if (!XQueryExtension(dpy, COMPOSITE_NAME, &composite_opcode,
- &composite_event, &composite_error))
- {
- fprintf(stderr, "No composite extension\n");
- exit(1);
- }
- XCompositeQueryVersion(dpy, &composite_major, &composite_minor);
-#if HAS_NAME_WINDOW_PIXMAP
- if (composite_major > 0 || composite_minor >= 2)
- hasNamePixmap = True;
-#endif
-
- if (!XDamageQueryExtension(dpy, &damage_event, &damage_error))
- {
- fprintf(stderr, "No damage extension\n");
- exit(1);
- }
- if (!XFixesQueryExtension(dpy, &xfixes_event, &xfixes_error))
- {
- fprintf(stderr, "No XFixes extension\n");
- exit(1);
- }
-
- ECompMgrStart();
-
- ufd.fd = ConnectionNumber(dpy);
- ufd.events = POLLIN;
-
- if (!autoRedirect)
- paint_all(dpy, None);
-
- for (;;)
- {
- /* dump_wins (); */
- do
- {
- if (autoRedirect)
- XFlush(dpy);
-
- if (!QLength(dpy))
- {
-#if ENABLE_FADING
- if (poll(&ufd, 1, fade_timeout()) == 0)
- {
- run_fades(dpy);
- break;
- }
-#endif
- }
-
- XNextEvent(dpy, &ev);
-
- if ((ev.type & 0x7f) != KeymapNotify)
- discard_ignore(dpy, ev.xany.serial);
-
-#if DEBUG_EVENTS
- printf("event %10.10s serial 0x%08x window 0x%08x\n",
- ev_name(&ev), ev_serial(&ev), ev_window(&ev));
-#endif
- if (!autoRedirect)
- ECompMgrHandleEvent(dpy, &ev);
- }
- while (QLength(dpy));
-
- ECompMgrIdle();
- }
-}
-
-#else
-
-static struct
-{
- char enable;
- char autoredirect;
-} Conf_compmgr;
-
-static void
ECompMgrInit(void)
{
- Display *dpy;
- int scr;
- Window root;
int events, errors;
if (!XDamageQueryExtension(disp, &events, &errors))
@@ -2291,10 +1884,6 @@
autoRedirect = Conf_compmgr.autoredirect;
D1printf("ECompMgrInit: enable=%d\n", Conf_compmgr.enable);
-
- dpy = my_dpy = disp;
- scr = my_scr = VRoot.scr;
- root = my_root = VRoot.win;
}
static void
@@ -2317,6 +1906,10 @@
EventCallbackRegister(VRoot.win, 0, ECompMgrHandleRootEvent, NULL);
break;
+ case ESIGNAL_BACKGROUND_CHANGE:
+ ECompMgrRootInit(0);
+ break;
+
case ESIGNAL_IDLE:
ECompMgrIdle();
break;
@@ -2336,6 +1929,50 @@
}
}
+static void
+CompMgrIpc(const char *params, Client * c __UNUSED__)
+{
+ const char *p;
+ char cmd[128], prm[4096];
+ int len;
+
+ cmd[0] = prm[0] = '\0';
+ p = params;
+ if (p)
+ {
+ len = 0;
+ sscanf(p, "%100s %4000s %n", cmd, prm, &len);
+ p += len;
+ }
+
+ if (!p || cmd[0] == '?')
+ {
+ IpcPrintf("CompMgr - on=%d\n", Mode_compmgr.active);
+ }
+ else if (!strcmp(cmd, "start"))
+ {
+ ECompMgrStart();
+ }
+ else if (!strcmp(cmd, "stop"))
+ {
+ ECompMgrStop();
+ }
+ else if (!strncmp(cmd, "list", 2))
+ {
+ /* TBD */
+ }
+}
+
+IpcItem CompMgrIpcArray[] = {
+ {
+ CompMgrIpc,
+ "compmgr", "cm",
+ "Composite manager functions",
+ " cm ? Show info\n"}
+ ,
+};
+#define N_IPC_FUNCS (sizeof(CompMgrIpcArray)/sizeof(IpcItem))
+
static const CfgItem CompMgrCfgItems[] = {
CFG_ITEM_BOOL(Conf_compmgr, enable, 0),
CFG_ITEM_BOOL(Conf_compmgr, autoredirect, 0),
@@ -2348,9 +1985,6 @@
EModule ModCompMgr = {
"compmgr", "cm",
ECompMgrSighan,
- {0, NULL}
- ,
+ {N_IPC_FUNCS, CompMgrIpcArray},
{N_CFG_ITEMS, CompMgrCfgItems}
};
-
-#endif /* BUILD_ECOMPMGR */
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/events.c,v
retrieving revision 1.69.2.12
retrieving revision 1.69.2.13
diff -u -3 -r1.69.2.12 -r1.69.2.13
--- events.c 26 Sep 2004 20:09:50 -0000 1.69.2.12
+++ events.c 17 Oct 2004 22:28:11 -0000 1.69.2.13
@@ -58,6 +58,10 @@
char throw_move_events_away = 0;
+static int evq_num = 0;
+static int evq_cur = 0;
+static XEvent *evq_ptr = NULL;
+
#define DOUBLE_CLICK_TIME 250 /* Milliseconds */
static void
@@ -178,6 +182,7 @@
case LeaveNotify:
TooltipsHandleEvent(); /* TBD */
+#if 0 /* FIXME - Why? */
if (((ev->type == KeyPress) || (ev->type == KeyRelease))
&& (ev->xkey.root != VRoot.win))
{
@@ -188,6 +193,7 @@
XSendEvent(disp, ev->xkey.root, False, 0, ev);
}
else
+#endif
{
#if 0 /* FIXME - TBD */
if (ev->type == KeyPress)
@@ -292,25 +298,17 @@
case ClientMessage: /* 33 */
HintsProcessClientMessage(&(ev->xclient));
break;
- default:
- if (ev->type == event_base_shape + ShapeNotify)
- ev->type = EX_EVENT_SHAPE_NOTIFY;
#ifdef USE_XRANDR
- else if (ev->type == event_base_randr + RRScreenChangeNotify)
- {
- ev->type = EX_EVENT_SCREEN_CHANGE_NOTIFY;
- XRRScreenChangeNotifyEvent *rrev =
- (XRRScreenChangeNotifyEvent *) ev;
- DialogOK("Wheee! (RRScreenChangeNotify)",
- "Screen size changed to\n%dx%d pixels (%dx%d millimeters)",
- rrev->width, rrev->height, rrev->mwidth, rrev->mheight);
- }
-#endif
-#ifdef USE_COMPOSITE
- else if (ev->type == event_base_damage + XDamageNotify)
- ev->type = EX_EVENT_DAMAGE_NOTIFY;
-#endif
+ case EX_EVENT_SCREEN_CHANGE_NOTIFY:
+ {
+ XRRScreenChangeNotifyEvent *rrev = (XRRScreenChangeNotifyEvent *) ev;
+
+ DialogOK("Wheee! (RRScreenChangeNotify)",
+ "Screen size changed to\n%dx%d pixels (%dx%d millimeters)",
+ rrev->width, rrev->height, rrev->mwidth, rrev->mheight);
+ }
break;
+#endif
}
/* The new event dispatcher */
@@ -333,20 +331,6 @@
EDBUG_RETURN_;
}
-void
-CheckEvent(void)
-{
- XEvent ev;
-
- /* FIXME - Event compression? */
- while (XPending(disp))
- {
- XNextEvent(disp, &ev);
- HandleEvent(&ev);
- }
- ModulesSignal(ESIGNAL_IDLE, NULL);
-}
-
static void
EventsCompress(XEvent * evq, int count)
{
@@ -357,8 +341,9 @@
/* Debug - should be taken out */
if (EventDebug(EDBUG_TYPE_COMPRESSION))
for (i = 0; i < count; i++)
- Eprintf("EventsCompress-1 %3d %s w=%#lx\n", i,
- EventName(evq[i].type), evq[i].xany.window);
+ if (evq[i].type)
+ Eprintf("EventsCompress-1 %3d %s w=%#lx\n", i,
+ EventName(evq[i].type), evq[i].xany.window);
/* Loop through event list, starting with latest */
for (i = count - 1; i > 0; i--)
@@ -460,14 +445,14 @@
}
static int
-EventsProcess(XEvent ** evq_ptr, int *evq_siz)
+EventsFetch(XEvent ** evq_p, int *evq_n)
{
int i, n, count;
- XEvent *evq = *evq_ptr;
- int qsz = *evq_siz;
+ XEvent *evq = *evq_p, *ev;
+ int qsz = *evq_n;
/* Fetch the entire event queue */
- for (i = count = 0; (n = XPending(disp)) > 0;)
+ for (i = count = qsz; (n = XPending(disp)) > 0;)
{
count += n;
if (count > qsz)
@@ -475,22 +460,102 @@
qsz = count;
evq = Erealloc(evq, sizeof(XEvent) * qsz);
}
- for (; i < count; i++)
- XNextEvent(disp, evq + i);
+ ev = evq + i;
+ for (; i < count; i++, ev++)
+ {
+ XNextEvent(disp, ev);
+
+ /* Map some event types to E internals */
+ if (ev->type == event_base_shape + ShapeNotify)
+ ev->type = EX_EVENT_SHAPE_NOTIFY;
+#ifdef USE_XRANDR
+ else if (ev->type == event_base_randr + RRScreenChangeNotify)
+ ev->type = EX_EVENT_SCREEN_CHANGE_NOTIFY;
+#endif
+#ifdef USE_COMPOSITE
+ else if (ev->type == event_base_damage + XDamageNotify)
+ ev->type = EX_EVENT_DAMAGE_NOTIFY;
+#endif
+ }
}
EventsCompress(evq, count);
- for (i = 0; i < count; i++)
+ *evq_p = evq;
+ *evq_n = qsz;
+
+ return count;
+}
+
+static int
+EventsProcess(XEvent ** evq_p, int *evq_n)
+{
+ int i;
+ XEvent *evq;
+ int qsz;
+
+ /* Fetch the entire event queue */
+ EventsFetch(evq_p, evq_n);
+ evq = *evq_p;
+ qsz = *evq_n;
+
+ for (i = 0; i < qsz; i++)
{
- if (evq[i].type)
- HandleEvent(evq + i);
+ evq_cur = i;
+ if (evq[i].type == 0)
+ continue;
+
+ if (EventDebug(EDBUG_TYPE_EVENTS))
+ Eprintf("EventsProcess %d type=%d\n", i, evq[i].type);
+
+ evq_cur = i;
+ HandleEvent(evq + i);
+ evq[i].type = 0;
}
- *evq_ptr = evq;
- *evq_siz = qsz;
+ return qsz;
+}
- return count;
+void
+CheckEvent(void)
+{
+ int i;
+ XEvent *evq;
+ int qsz;
+
+ /* Fetch the entire event queue */
+ EventsFetch(&evq_ptr, &evq_num);
+ evq = evq_ptr;
+ qsz = evq_num;
+
+ if (EventDebug(EDBUG_TYPE_EVENTS))
+ Eprintf("CheckEvent-B %d/%d\n", evq_cur, evq_num);
+
+ for (i = evq_cur + 1; i < qsz; i++)
+ {
+ evq_cur = i;
+ switch (evq[i].type)
+ {
+ case CreateNotify:
+ case DestroyNotify:
+ case ReparentNotify:
+ case UnmapNotify:
+ case MapNotify:
+ case ConfigureNotify:
+ case EX_EVENT_DAMAGE_NOTIFY:
+ if (EventDebug(EDBUG_TYPE_EVENTS))
+ Eprintf("CheckEvent %d type=%d\n", i, evq[i].type);
+
+ HandleEvent(evq + i);
+ evq[i].type = 0;
+ break;
+ }
+ }
+
+ if (EventDebug(EDBUG_TYPE_EVENTS))
+ Eprintf("CheckEvent-E\n");
+
+ ModulesSignal(ESIGNAL_IDLE, NULL);
}
#ifdef DEBUG
@@ -525,8 +590,6 @@
int count, pcount;
int fdsize;
int xfd, smfd;
- static int evq_num = 0;
- static XEvent *evq = NULL;
DBUG_STACKSTART;
@@ -550,7 +613,8 @@
time2 = 0.0;
/* time2 = time spent since we last were here */
- count = EventsProcess(&evq, &evq_num);
+ evq_num = 0;
+ count = EventsProcess(&evq_ptr, &evq_num);
DBUG_STACKCHECK;
@@ -560,22 +624,25 @@
DBUG_STACKCHECK;
- count = EventsProcess(&evq, &evq_num);
+ evq_num = 0;
+ count = EventsProcess(&evq_ptr, &evq_num);
if (count > 0)
XFlush(disp);
if (pcount > count)
count = pcount;
- if ((evq) && ((evq_num - count) > 64))
+ if ((evq_ptr) && ((evq_num - count) > 64))
{
evq_num = 0;
- Efree(evq);
- evq = NULL;
+ Efree(evq_ptr);
+ evq_ptr = NULL;
}
DBUG_STACKCHECK;
+ ModulesSignal(ESIGNAL_IDLE, NULL);
+
FD_ZERO(&fdset);
FD_SET(xfd, &fdset);
if (smfd >= 0)
@@ -615,8 +682,6 @@
&& (((smfd >= 0) && (!(FD_ISSET(smfd, &fdset)))) || (smfd < 0)))
HandleTimerEvent();
- ModulesSignal(ESIGNAL_IDLE, NULL);
-
DBUG_STACKCHECK;
EDBUG_RETURN_;
@@ -684,10 +749,23 @@
static const char *
EventName(unsigned int type)
{
+ static char buf[16];
+
if (type < N_EVENT_NAMES)
return TxtEventNames[type];
- return "Unknown";
+ switch (type)
+ {
+ case EX_EVENT_SHAPE_NOTIFY:
+ return "ShapeNotify";
+ case EX_EVENT_SCREEN_CHANGE_NOTIFY:
+ return "ScreenChangeNotify";
+ case EX_EVENT_DAMAGE_NOTIFY:
+ return "DamageNotify";
+ }
+
+ sprintf(buf, "%d", type);
+ return buf;
}
static const char *const TxtEventNotifyModeNames[] = {
@@ -723,6 +801,7 @@
void
EventShow(const XEvent * ev)
{
+ unsigned long ser = ev->xany.serial;
Window win = ev->xany.window;
const char *name = EventName(ev->type);
char *txt;
@@ -734,20 +813,20 @@
goto case_common;
case ButtonPress:
case ButtonRelease:
- Eprintf("EV-%s win=%#lx state=%#x button=%#x\n", name, win,
+ Eprintf("#%08lx EV-%s win=%#lx state=%#x button=%#x\n", ser, name, win,
ev->xbutton.state, ev->xbutton.button);
break;
case MotionNotify:
goto case_common;
case EnterNotify:
case LeaveNotify:
- Eprintf("EV-%s win=%#lx m=%s d=%s\n", name, win,
+ Eprintf("#%08lx EV-%s win=%#lx m=%s d=%s\n", ser, name, win,
EventNotifyModeName(ev->xcrossing.mode),
EventNotifyDetailName(ev->xcrossing.detail));
break;
case FocusIn:
case FocusOut:
- Eprintf("EV-%s win=%#lx m=%s d=%s\n", name, win,
+ Eprintf("#%08lx EV-%s win=%#lx m=%s d=%s\n", ser, name, win,
EventNotifyModeName(ev->xfocus.mode),
EventNotifyDetailName(ev->xfocus.detail));
break;
@@ -755,33 +834,37 @@
case Expose:
case GraphicsExpose:
case NoExpose:
- goto case_common;
+ Eprintf("#%08lx EV-%s: win=%#lx %d+%d %dx%d\n", ser, name, win,
+ ev->xexpose.x, ev->xexpose.y,
+ ev->xexpose.width, ev->xexpose.height);
+ break;
case VisibilityNotify:
- Eprintf("EV-%s win=%#lx state=%d\n", name, win, ev->xvisibility.state);
+ Eprintf("#%08lx EV-%s win=%#lx state=%d\n", ser, name, win,
+ ev->xvisibility.state);
break;
case CreateNotify:
case DestroyNotify:
case UnmapNotify:
case MapNotify:
case MapRequest:
- Eprintf("EV-%s ev=%#lx win=%#lx\n", name, win,
+ Eprintf("#%08lx EV-%s ev=%#lx win=%#lx\n", ser, name, win,
ev->xcreatewindow.window);
break;
case ReparentNotify:
- Eprintf("EV-%s ev=%#lx win=%#lx parent=%#lx\n", name, win,
+ Eprintf("#%08lx EV-%s ev=%#lx win=%#lx parent=%#lx\n", ser, name, win,
ev->xreparent.window, ev->xreparent.parent);
break;
case ConfigureNotify:
- Eprintf("EV-%s: ev=%#lx, win=%#lx %d+%d %dx%d bw=%d above=%#lx\n",
- name, win, ev->xconfigure.window,
- ev->xconfigure.x, ev->xconfigure.y,
- ev->xconfigure.width, ev->xconfigure.height,
- ev->xconfigure.border_width, ev->xconfigure.above);
+ Eprintf
+ ("#%08lx EV-%s: ev=%#lx, win=%#lx %d+%d %dx%d bw=%d above=%#lx\n",
+ ser, name, win, ev->xconfigure.window, ev->xconfigure.x,
+ ev->xconfigure.y, ev->xconfigure.width, ev->xconfigure.height,
+ ev->xconfigure.border_width, ev->xconfigure.above);
break;
case ConfigureRequest:
Eprintf
- ("EV-%s: win=%#lx parent=%#lx m=%#lx %d+%d %dx%d bw=%d above=%#lx stk=%d\n",
- name, ev->xconfigurerequest.window, win,
+ ("#%08lx EV-%s: win=%#lx parent=%#lx m=%#lx %d+%d %dx%d bw=%d above=%#lx
stk=%d\n",
+ ser, name, ev->xconfigurerequest.window, win,
ev->xconfigurerequest.value_mask, ev->xconfigurerequest.x,
ev->xconfigurerequest.y, ev->xconfigurerequest.width,
ev->xconfigurerequest.height, ev->xconfigurerequest.border_width,
@@ -790,16 +873,17 @@
case GravityNotify:
goto case_common;
case ResizeRequest:
- Eprintf("EV-%s: win=%#lx %dx%d\n",
- name, win, ev->xresizerequest.width, ev->xresizerequest.height);
+ Eprintf("#%08lx EV-%s: win=%#lx %dx%d\n",
+ ser, name, win, ev->xresizerequest.width,
+ ev->xresizerequest.height);
break;
case CirculateNotify:
case CirculateRequest:
goto case_common;
case PropertyNotify:
txt = XGetAtomName(disp, ev->xproperty.atom);
- Eprintf("EV-%s: win=%#lx Atom=%s(%ld)\n",
- name, win, txt, ev->xproperty.atom);
+ Eprintf("#%08lx EV-%s: win=%#lx Atom=%s(%ld)\n",
+ ser, name, win, txt, ev->xproperty.atom);
XFree(txt);
break;
case SelectionClear:
@@ -810,25 +894,25 @@
case ClientMessage:
txt = XGetAtomName(disp, ev->xclient.message_type);
Eprintf
- ("EV-%s win=%#lx ev_type=%s(%ld) data[0-3]= %08lx %08lx %08lx %08lx\n",
- name, win, txt, ev->xclient.message_type, ev->xclient.data.l[0],
- ev->xclient.data.l[1], ev->xclient.data.l[2],
+ ("#%08lx EV-%s win=%#lx ev_type=%s(%ld) data[0-3]= %08lx %08lx %08lx
%08lx\n",
+ ser, name, win, txt, ev->xclient.message_type,
+ ev->xclient.data.l[0], ev->xclient.data.l[1], ev->xclient.data.l[2],
ev->xclient.data.l[3]);
XFree(txt);
break;
case MappingNotify:
case_common:
- Eprintf("EV-%s win=%#lx\n", name, win);
+ Eprintf("#%08lx EV-%s win=%#lx\n", ser, name, win);
break;
default:
if (ev->type == event_base_shape + ShapeNotify)
- Eprintf("EV-ShapeNotify win=%#lx\n", win);
+ Eprintf("#%08lx EV-ShapeNotify win=%#lx\n", ser, win);
#ifdef USE_XRANDR
else if (ev->type == event_base_randr + RRScreenChangeNotify)
- Eprintf("EV-RRScreenChangeNotify win=%#lx\n", win);
+ Eprintf("#%08lx EV-RRScreenChangeNotify win=%#lx\n", ser, win);
#endif
else
- Eprintf("EV-??? Type=%d win=%#lx\n", ev->type, win);
+ Eprintf("#%08lx EV-%s win=%#lx\n", ser, name, win);
break;
}
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Attic/ewin-ops.c,v
retrieving revision 1.1.2.13
retrieving revision 1.1.2.14
diff -u -3 -r1.1.2.13 -r1.1.2.14
--- ewin-ops.c 17 Oct 2004 13:47:14 -0000 1.1.2.13
+++ ewin-ops.c 17 Oct 2004 22:28:11 -0000 1.1.2.14
@@ -685,7 +685,10 @@
speed = Conf.shadespeed;
+#if 0
+ Eprintf("EwinShade-B\n");
ecore_x_grab();
+#endif
switch (ewin->border->shadedir)
{
@@ -799,9 +802,11 @@
if (hh < 1)
hh = 1;
ww = ewin->client.w;
+#if 1 /* FIXME - TBD */
EMoveResizeWindow(disp, ewin->win_container,
ewin->border->border.left,
ewin->border->border.top, ww, hh);
+#endif
EMoveResizeWindow(disp, EoGetWin(ewin), EoGetX(ewin),
EoGetY(ewin), EoGetW(ewin), EoGetH(ewin));
EwinBorderCalcSizes(ewin);
@@ -875,7 +880,10 @@
break;
}
+#if 0
ecore_x_ungrab();
+ Eprintf("EwinShade-E\n");
+#endif
if (ewin->client.shaped)
EShapeCombineShape(disp, ewin->win_container, ShapeBounding, 0, 0,
@@ -909,7 +917,10 @@
speed = Conf.shadespeed;
+#if 0
+ Eprintf("EwinUnShade-B\n");
ecore_x_grab();
+#endif
switch (ewin->border->shadedir)
{
@@ -1032,11 +1043,13 @@
{
i = ((a * (1024 - k)) + (b * k)) >> 10;
EoSetH(ewin, i);
+#if 1 /* FIXME - TBD */
EMoveResizeWindow(disp, ewin->win_container,
ewin->border->border.left,
ewin->border->border.top, ewin->client.w,
EoGetH(ewin) - ewin->border->border.top -
ewin->border->border.bottom);
+#endif
EMoveResizeWindow(disp, EoGetWin(ewin), EoGetX(ewin),
EoGetY(ewin), EoGetW(ewin), EoGetH(ewin));
EwinBorderCalcSizes(ewin);
@@ -1113,7 +1126,10 @@
break;
}
+#if 0
ecore_x_ungrab();
+ Eprintf("EwinUnShade-E\n");
+#endif
if (ewin->client.shaped)
EShapeCombineShape(disp, ewin->win_container, ShapeBounding, 0, 0,
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/main.c,v
retrieving revision 1.99.2.26
retrieving revision 1.99.2.27
diff -u -3 -r1.99.2.26 -r1.99.2.27
--- main.c 10 Oct 2004 11:17:39 -0000 1.99.2.26
+++ main.c 17 Oct 2004 22:28:11 -0000 1.99.2.27
@@ -243,7 +243,9 @@
/* Set root window cursor */
ECsrApply(ECSR_ROOT, VRoot.win);
+#if 0
CheckEvent();
+#endif
#ifdef USE_EXT_INIT_WIN
/* Kill the E process owning the "init window" */
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/misc.c,v
retrieving revision 1.58.2.4
retrieving revision 1.58.2.5
diff -u -3 -r1.58.2.4 -r1.58.2.5
--- misc.c 29 Sep 2004 21:13:51 -0000 1.58.2.4
+++ misc.c 17 Oct 2004 22:28:11 -0000 1.58.2.5
@@ -151,8 +151,10 @@
Eprintf(const char *fmt, ...)
{
va_list args;
+ struct timeval tv;
- fprintf(stdout, "[%d] ", getpid());
+ gettimeofday(&tv, NULL);
+ fprintf(stdout, "[%d] %4ld.%06ld: ", getpid(), tv.tv_sec, tv.tv_usec);
va_start(args, fmt);
vfprintf(stdout, fmt, args);
va_end(args);
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs