Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
ecompmgr.c eobj.h ewin-ops.c ewin-ops.h ipc.c windowmatch.c
Log Message:
Composite manager - Prepare for handling unredirected windows, cleanups.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ecompmgr.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -3 -r1.50 -r1.51
--- ecompmgr.c 7 Aug 2005 10:51:07 -0000 1.50
+++ ecompmgr.c 10 Aug 2005 19:23:58 -0000 1.51
@@ -37,9 +37,6 @@
#include <stdio.h>
#include <string.h>
#include <math.h>
-#include <sys/poll.h>
-#include <sys/time.h>
-#include <time.h>
#include <unistd.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -83,7 +80,6 @@
struct
{
int class; /* FIXME - Remove? */
- int map_state; /* FIXME - Remove? */
int depth; /* FIXME - Remove? */
Visual *visual; /* FIXME - Remove? */
int border_width;
@@ -168,9 +164,10 @@
#define OPAQUE 0xffffffff
-#define WINDOW_SOLID 0
-#define WINDOW_TRANS 1
-#define WINDOW_ARGB 2
+#define WINDOW_UNREDIR 0
+#define WINDOW_SOLID 1
+#define WINDOW_TRANS 2
+#define WINDOW_ARGB 3
static void ECompMgrWinSetPicts(EObj * eo);
static void ECompMgrDamageAll(void);
@@ -972,7 +969,9 @@
/* Invalidate stuff changed by opacity */
ECompMgrWinInvalidate(eo, INV_OPACITY);
- if (EVisualIsARGB(cw->a.visual))
+ if (eo->noredir)
+ mode = WINDOW_UNREDIR;
+ else if (EVisualIsARGB(cw->a.visual))
mode = WINDOW_ARGB;
else if (cw->opacity != OPAQUE)
mode = WINDOW_TRANS;
@@ -996,9 +995,6 @@
D1printf("ECompMgrWinMap %#lx\n", eo->win);
- cw->a.map_state = IsViewable;
- cw->visible = 1;
-
#if CAN_DO_USABLE
cw->damage_bounds.x = cw->damage_bounds.y = 0;
cw->damage_bounds.width = cw->damage_bounds.height = 0;
@@ -1017,8 +1013,6 @@
D1printf("ECompMgrWinUnmap %#lx\n", eo->win);
- cw->visible = 0;
-
if (cw->extents != None)
ECompMgrDamageMergeObject(eo, cw->extents, 0);
@@ -1090,12 +1084,14 @@
#endif
cw->a.class = attr.class; /* FIXME - remove */
- cw->a.map_state = attr.map_state; /* FIXME - remove */
cw->a.depth = attr.depth;
cw->a.visual = attr.visual;
cw->a.border_width = attr.border_width;
- if (eo->type != EOBJ_TYPE_DESK)
+ if (eo->type == EOBJ_TYPE_DESK)
+ eo->noredir = 1;
+
+ if (!eo->noredir)
{
if (Conf_compmgr.mode == ECM_MODE_WINDOW)
XCompositeRedirectWindow(disp, eo->win, CompositeRedirectManual);
@@ -1292,21 +1288,22 @@
DeskBackgroundPictureFree((Desk *) eo);
cw->pixmap = None;
}
- else
+
+ if (!eo->noredir)
{
if (!eo->gone && Conf_compmgr.mode == ECM_MODE_WINDOW)
XCompositeUnredirectWindow(disp, eo->win, CompositeRedirectManual);
+ }
- ECompMgrWinInvalidate(eo, INV_ALL);
+ ECompMgrWinInvalidate(eo, INV_ALL);
- if (!eo->gone)
- {
- if (cw->picture != None)
- XRenderFreePicture(disp, cw->picture);
+ if (!eo->gone)
+ {
+ if (cw->picture != None)
+ XRenderFreePicture(disp, cw->picture);
- if (cw->damage != None)
- XDamageDestroy(disp, cw->damage);
- }
+ if (cw->damage != None)
+ XDamageDestroy(disp, cw->damage);
}
_EFREE(eo->cmhook);
@@ -1465,12 +1462,9 @@
if (!cw)
continue;
- D4printf(" - %#lx desk=%d shown=%d vis=%d dam=%d pict=%#lx\n",
- eo->win, eo->desk, eo->shown, cw->visible, cw->damaged,
- cw->picture);
+ D4printf(" - %#lx desk=%d shown=%d dam=%d pict=%#lx\n",
+ eo->win, eo->desk, eo->shown, cw->damaged, cw->picture);
- if (!cw->visible)
- continue;
#if CAN_DO_USABLE
if (!cw->usable)
continue;
@@ -1569,6 +1563,7 @@
switch (cw->mode)
{
+ case WINDOW_UNREDIR:
case WINDOW_SOLID:
D2printf(" * solid pict=%#lx d=%d l=%d\n",
cw->picture, eo->desk, eo->ilayer);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/eobj.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- eobj.h 7 Aug 2005 14:06:51 -0000 1.2
+++ eobj.h 10 Aug 2005 19:23:58 -0000 1.3
@@ -41,6 +41,7 @@
char gone;
#if USE_COMPOSITE
char shadow; /* Enable shadows */
+ char noredir; /* Do not redirect */
unsigned int opacity;
void *cmhook;
#endif
@@ -80,11 +81,12 @@
#define EoChangeOpacity(eo, _o) EobjChangeOpacity(EoObj(eo), _o)
#define EoSetShadow(eo, _x) (eo)->o.shadow = (_x)
#define EoGetShadow(eo) ((eo)->o.shadow)
+#define EoSetNoRedirect(eo, _x) (eo)->o.noredir = (_x)
+#define EoGetNoRedirect(eo) ((eo)->o.noredir)
#else
#define EoSetOpacity(eo, _o)
#define EoChangeOpacity(eo, _o)
#define EoSetShadow(eo, _x)
-#define EoGetShadow(eo) 0
#endif
#define EoMap(eo, raise) EobjMap(EoObj(eo), raise)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewin-ops.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -3 -r1.58 -r1.59
--- ewin-ops.c 4 Aug 2005 16:01:52 -0000 1.58
+++ ewin-ops.c 10 Aug 2005 19:23:58 -0000 1.59
@@ -68,6 +68,7 @@
{"skiplists", 4, 1, 1, EWIN_OP_SKIP_LISTS},
{"zoom", 2, 1, 0, EWIN_OP_ZOOM},
{"snap", 0, 1, 0, EWIN_OP_SNAP},
+ {"noredir", 4, 1, 1, EWIN_OP_NO_REDIRECT},
{NULL, 0, 0, 0, EWIN_OP_INVALID} /* Terminator */
};
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewin-ops.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ewin-ops.h 31 Mar 2005 19:04:35 -0000 1.2
+++ ewin-ops.h 10 Aug 2005 19:23:58 -0000 1.3
@@ -57,6 +57,7 @@
EWIN_OP_SKIP_LISTS,
EWIN_OP_ZOOM,
EWIN_OP_SNAP,
+ EWIN_OP_NO_REDIRECT,
} winop_e;
typedef struct
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ipc.c,v
retrieving revision 1.226
retrieving revision 1.227
diff -u -3 -r1.226 -r1.227
--- ipc.c 7 Aug 2005 20:33:16 -0000 1.226
+++ ipc.c 10 Aug 2005 19:23:58 -0000 1.227
@@ -465,6 +465,13 @@
if (SetEwinBoolean("shadow", &on, param1, 0))
EoSetShadow(ewin, !on);
break;
+
+ case EWIN_OP_NO_REDIRECT:
+ on = EoGetNoRedirect(ewin);
+ on = ewin->o.noredir;
+ if (SetEwinBoolean("noredir", &on, param1, 0))
+ EoSetNoRedirect(ewin, !on);
+ break;
#endif
case EWIN_OP_SHADE:
@@ -1087,7 +1094,7 @@
"State %i Shown %i Visibility %i Active
%i\n"
"Member of groups %i\n"
#if USE_COMPOSITE
- "Opacity %3i(%x) Shadow %i\n"
+ "Opacity %3i(%x) Shadow %i NoRedirect %i\n"
#else
"Opacity %3i\n"
#endif
@@ -1131,9 +1138,9 @@
ewin->state.iconified, EoIsSticky(ewin), ewin->state.shaded,
ewin->state.docked, ewin->state.state, EoIsShown(ewin),
ewin->state.visibility, ewin->state.active, ewin->num_groups,
- ewin->ewmh.opacity
+ ewin->ewmh.opacity >> 24
#if USE_COMPOSITE
- , EoGetOpacity(ewin), EoGetShadow(ewin)
+ , EoGetOpacity(ewin), EoGetShadow(ewin), EoGetNoRedirect(ewin)
#endif
);
}
@@ -1208,19 +1215,19 @@
lst = EobjListStackGet(&num);
- IpcPrintf("Num window T V D L pos size S F C Name\n");
+ IpcPrintf("Num window T V D S F L pos size C R Name\n");
for (i = 0; i < num; i++)
{
eo = lst[i];
- IpcPrintf(" %2d %#lx %d %d %2d %3d %5d,%5d %4dx%4d %d %d %d %s\n", i,
- eo->win, eo->type, eo->shown, eo->desk, eo->ilayer,
- eo->x, eo->y, eo->w, eo->h, eo->sticky, eo->floating,
+ IpcPrintf(" %2d %#lx %d %d %2d %d %d %3d %5d,%5d %4dx%4d %d %d %s\n",
+ i, eo->win, eo->type, eo->shown, eo->desk, eo->sticky,
+ eo->floating, eo->ilayer, eo->x, eo->y, eo->w, eo->h,
#if USE_COMPOSITE
(eo->cmhook) ? 1 : 0,
#else
0,
#endif
- eo->name);
+ !eo->noredir, eo->name);
}
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/windowmatch.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- windowmatch.c 1 Aug 2005 17:34:53 -0000 1.34
+++ windowmatch.c 10 Aug 2005 19:23:58 -0000 1.35
@@ -717,6 +717,10 @@
case EWIN_OP_SHADOW:
WINOP_GET_BOOL(ewin->o.shadow, args);
break;
+
+ case EWIN_OP_NO_REDIRECT:
+ WINOP_GET_BOOL(ewin->o.noredir, args);
+ break;
#endif
case EWIN_OP_TITLE:
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs