Mailinglist Archive: opensuse-commit (1942 mails)
| < Previous | Next > |
commit compiz-plugins-dmx
- From: root@xxxxxxxxxxxxxxx (h_root)
- Date: Mon, 17 Nov 2008 16:45:27 +0100
- Message-id: <20081117154527.E9FB267815D@xxxxxxxxxxxxxxx>
Hello community,
here is the log from the commit of package compiz-plugins-dmx
checked in at Mon Nov 17 16:45:27 CET 2008.
--------
--- compiz-plugins-dmx/compiz-plugins-dmx.changes 2008-10-15
21:14:03.000000000 +0200
+++ /mounts/work_src_done/STABLE/compiz-plugins-dmx/compiz-plugins-dmx.changes
2008-11-14 22:53:38.000000000 +0100
@@ -1,0 +2,6 @@
+Fri Nov 14 16:43:49 EST 2008 - davidr@xxxxxxxxxx
+
+- Update dmx-NOMAD.diff
+ * Fix DMX root window clipping.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ compiz-plugins-dmx.spec ++++++
--- /var/tmp/diff_new_pack.r13890/_old 2008-11-17 16:45:10.000000000 +0100
+++ /var/tmp/diff_new_pack.r13890/_new 2008-11-17 16:45:10.000000000 +0100
@@ -29,7 +29,7 @@
PreReq: %fillup_prereq
Requires: compiz
Version: 0.1.0
-Release: 3
+Release: 4
Summary: Compiz DMX plugins
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64 ppc ppc64 ia64
@@ -74,6 +74,9 @@
%{_datadir}/compiz/
%changelog
+* Fri Nov 14 2008 davidr@xxxxxxxxxx
+- Update dmx-NOMAD.diff
+ * Fix DMX root window clipping.
* Wed Oct 15 2008 davidr@xxxxxxxxxx
- Add patch dmx-NOMAD.diff
* Detect active window properly.
++++++ dmx-NOMAD.diff ++++++
--- /var/tmp/diff_new_pack.r13890/_old 2008-11-17 16:45:10.000000000 +0100
+++ /var/tmp/diff_new_pack.r13890/_new 2008-11-17 16:45:10.000000000 +0100
@@ -1,8 +1,8 @@
diff --git a/dmx.c b/dmx.c
-index a7d1c8e..38bdb55 100644
+index a7d1c8e..acdc522 100644
--- a/dmx.c
+++ b/dmx.c
-@@ -20,6 +20,7 @@ typedef struct _DmxDisplay {
+@@ -20,15 +20,23 @@ typedef struct _DmxDisplay {
Atom dmxRootAtom;
Atom dmxNameAtom;
@@ -10,18 +10,154 @@
} DmxDisplay;
typedef struct _DmxScreen {
-@@ -28,7 +29,9 @@ typedef struct _DmxScreen {
+ int windowPrivateIndex;
+ Window root;
++
++ DrawWindowProc drawWindow;
++ WindowMoveNotifyProc windowMoveNotify;
++ WindowResizeNotifyProc windowResizeNotify;
} DmxScreen;
typedef struct _DmxWindow {
- char *name;
+ char *name;
++ Region region;
+ Window supportingCmCheckWindow;
+ CompTimeoutHandle checkHandle;
} DmxWindow;
#define GET_DMX_CORE(c) \
-@@ -85,41 +88,110 @@ dmxWindowGetDmxNameProp (CompWindow *w)
+@@ -58,6 +66,129 @@ typedef struct _DmxWindow {
+ GET_DMX_SCREEN (w->screen, \
+ GET_DMX_DISPLAY (w->screen->display)))
+
++static Bool
++dmxDrawWindow (CompWindow *w,
++ const CompTransform *transform,
++ const FragmentAttrib *attrib,
++ Region region,
++ unsigned int mask)
++{
++ Region wRegion = w->region;
++ Bool status;
++
++ DMX_SCREEN (w->screen);
++ DMX_WINDOW (w);
++
++ if (dw->region)
++ w->region = dw->region;
++
++ UNWRAP (ds, w->screen, drawWindow);
++ status = (*w->screen->drawWindow) (w, transform, attrib, region, mask);
++ WRAP (ds, w->screen, drawWindow, dmxDrawWindow);
++
++ w->region = wRegion;
++
++ return status;
++}
++
++static void
++dmxWindowUpdateRootRegion (CompWindow *w)
++{
++ Region region = NULL;
++ CompWindow *c;
++ int dx = 0;
++ int dy = 0;
++
++ DMX_SCREEN (w->screen);
++
++ for (;;)
++ {
++ region = GET_DMX_WINDOW (w, ds)->region;
++ if (region)
++ break;
++
++ if (!w->parent)
++ return;
++
++ w = w->parent;
++ }
++
++ XSubtractRegion (w->region, &emptyRegion, region);
++
++ c = w;
++ for (;;)
++ {
++ DMX_WINDOW (c);
++
++ if (dw->name)
++ {
++ if (c->redirectSubwindows)
++ {
++ XOffsetRegion (c->region, dx, dy);
++ XSubtractRegion (region, c->region, region);
++ XOffsetRegion (c->region, -dx, -dy);
++ }
++ }
++ else
++ {
++ if (c->windows)
++ {
++ dx += c->attrib.x;
++ dy += c->attrib.y;
++ c = c->windows;
++ continue;
++ }
++ }
++
++ while (!c->next && (c != w))
++ {
++ dx -= c->parent->attrib.x;
++ dy -= c->parent->attrib.y;
++ c = c->parent;
++ }
++
++ if (c == w)
++ break;
++
++ c = c->next;
++ }
++}
++
++static void
++dmxWindowMoveNotify (CompWindow *w,
++ int dx,
++ int dy,
++ Bool immediate)
++{
++ DMX_SCREEN (w->screen);
++ DMX_WINDOW (w);
++
++ if (dw->name || dw->region)
++ dmxWindowUpdateRootRegion (w);
++
++ UNWRAP (ds, w->screen, windowMoveNotify);
++ (*w->screen->windowMoveNotify) (w, dx, dy, immediate);
++ WRAP (ds, w->screen, windowMoveNotify, dmxWindowMoveNotify);
++}
++
++static void
++dmxWindowResizeNotify (CompWindow *w,
++ int dx,
++ int dy,
++ int dwidth,
++ int dheight)
++{
++ DMX_SCREEN (w->screen);
++ DMX_WINDOW (w);
++
++ if (dw->name || dw->region)
++ dmxWindowUpdateRootRegion (w);
++
++ UNWRAP (ds, w->screen, windowResizeNotify);
++ (*w->screen->windowResizeNotify) (w, dx, dy, dwidth, dheight);
++ WRAP (ds, w->screen, windowResizeNotify, dmxWindowResizeNotify);
++}
++
+ static char *
+ dmxWindowGetDmxNameProp (CompWindow *w)
+ {
+@@ -85,41 +216,114 @@ dmxWindowGetDmxNameProp (CompWindow *w)
return name;
}
@@ -95,22 +231,29 @@
+ SubstructureNotifyMask |
+ StructureNotifyMask |
+ PropertyChangeMask);
-+
-+ w->activeChild = getActiveWindow (d, w->id);
- XCompositeRedirectSubwindows (d->display, w->id,
- CompositeRedirectManual);
- w->redirectSubwindows = TRUE;
-+ XQueryTree (d->display, w->id,
-+ &rootReturn, &parentReturn,
-+ &children, &nchildren);
++ w->activeChild = getActiveWindow (d, w->id);
- XSelectInput (d->display, w->id,
- SubstructureNotifyMask |
- StructureNotifyMask |
- PropertyChangeMask);
++ XQueryTree (d->display, w->id,
++ &rootReturn, &parentReturn,
++ &children, &nchildren);
+
+- XQueryTree (d->display, w->id,
+- &rootReturn, &parentReturn,
+- &children, &nchildren);
+ for (i = 0; i < nchildren; i++)
+ addWindow (w, children[i], i ? children[i - 1] : 0);
+
+- for (i = 0; i < nchildren; i++)
+- addWindow (w, children[i], i ? children[i - 1] : 0);
++ dmxWindowUpdateRootRegion (w);
+ }
+ }
+ else
@@ -119,18 +262,15 @@
+ {
+ while (w->windows)
+ removeWindow (w->windows);
-
-- XQueryTree (d->display, w->id,
-- &rootReturn, &parentReturn,
-- &children, &nchildren);
++
+ XSelectInput (d->display, w->id, StructureNotifyMask |
+ PropertyChangeMask);
-
-- for (i = 0; i < nchildren; i++)
-- addWindow (w, children[i], i ? children[i - 1] : 0);
++
+ w->redirectSubwindows = FALSE;
+ XCompositeUnredirectSubwindows (d->display, w->id,
+ CompositeRedirectManual);
++
++ dmxWindowUpdateRootRegion (w);
+ }
+ }
+}
@@ -157,7 +297,7 @@
return TRUE;
}
-@@ -183,16 +255,26 @@ dmxEnsureDmxRoot (CompWindow *ancestor,
+@@ -183,16 +387,26 @@ dmxEnsureDmxRoot (CompWindow *ancestor,
CompWindow *c;
unsigned int i;
@@ -190,7 +330,21 @@
}
if (*children)
-@@ -226,13 +308,8 @@ dmxWindowCheckDmxRoot (CompWindow *w)
+@@ -217,6 +431,13 @@ dmxWindowCheckDmxRoot (CompWindow *w)
+ if (!root)
+ return FALSE;
+
++ if (!dw->region)
++ {
++ dw->region = XCreateRegion ();
++ if (dw->region)
++ XSubtractRegion (w->region, &emptyRegion, dw->region);
++ }
++
+ for (i = 0; i < n; i++)
+ {
+ CompWindow *r;
+@@ -226,20 +447,12 @@ dmxWindowCheckDmxRoot (CompWindow *w)
ds->root = root[i];
r = dmxEnsureDmxRoot (w, root[i], &children, &nchildren);
@@ -206,7 +360,14 @@
}
ds->root = None;
-@@ -251,6 +328,19 @@ dmxHandleEvent (CompDisplay *d,
+
+- if (root)
+- free (root);
+-
+ return TRUE;
+ }
+
+@@ -251,6 +464,19 @@ dmxHandleEvent (CompDisplay *d,
DMX_DISPLAY (d);
@@ -226,7 +387,7 @@
UNWRAP (dd, d, handleEvent);
(*d->handleEvent) (d, event);
WRAP (dd, d, handleEvent, dmxHandleEvent);
-@@ -260,25 +350,59 @@ dmxHandleEvent (CompDisplay *d,
+@@ -260,25 +486,59 @@ dmxHandleEvent (CompDisplay *d,
if (event->xproperty.atom == dd->dmxNameAtom)
{
w = findWindowAtDisplay (d, event->xproperty.window);
@@ -290,7 +451,7 @@
}
static void
-@@ -310,9 +434,6 @@ dmxInitCore (CompPlugin *p,
+@@ -310,9 +570,6 @@ dmxInitCore (CompPlugin *p,
if (!checkPluginABI ("core", CORE_ABIVERSION))
return FALSE;
@@ -300,7 +461,7 @@
dc = malloc (sizeof (DmxCore));
if (!dc)
return FALSE;
-@@ -363,6 +484,9 @@ dmxInitDisplay (CompPlugin *plugin, CompDisplay *d)
+@@ -363,6 +620,9 @@ dmxInitDisplay (CompPlugin *plugin, CompDisplay *d)
dd->dmxNameAtom = XInternAtom (d->display, "DMX_NAME", 0);
dd->dmxRootAtom = XInternAtom (d->display, "DMX_ROOT", 0);
@@ -310,8 +471,14 @@
d->base.privates[displayPrivateIndex].ptr = dd;
WRAP (dd, d, handleEvent, dmxHandleEvent);
-@@ -404,14 +528,29 @@ dmxInitScreen (CompPlugin *plugin, CompScreen *s)
+@@ -402,16 +662,39 @@ dmxInitScreen (CompPlugin *plugin, CompScreen *s)
+
+ ds->root = None;
++ WRAP (ds, s, drawWindow, dmxDrawWindow);
++ WRAP (ds, s, windowMoveNotify, dmxWindowMoveNotify);
++ WRAP (ds, s, windowResizeNotify, dmxWindowResizeNotify);
++
s->base.privates[dd->screenPrivateIndex].ptr = ds;
+ XChangeProperty (s->display->display, s->grabWindow,
@@ -337,21 +504,26 @@
+ XDeleteProperty (s->display->display, s->root.id,
+ dd->dmxSupportingCmCheckAtom);
+
++ UNWRAP (ds, s, drawWindow);
++ UNWRAP (ds, s, windowMoveNotify);
++ UNWRAP (ds, s, windowResizeNotify);
++
freeWindowPrivateIndex (s, ds->windowPrivateIndex);
free (ds);
-@@ -428,7 +567,9 @@ dmxInitWindow (CompPlugin *plugin, CompWindow *w)
+@@ -428,7 +711,10 @@ dmxInitWindow (CompPlugin *plugin, CompWindow *w)
if (!dw)
return FALSE;
- dw->name = NULL;
+ dw->name = NULL;
++ dw->region = NULL;
+ dw->supportingCmCheckWindow = None;
+ dw->checkHandle = 0;
w->base.privates[ds->windowPrivateIndex].ptr = dw;
-@@ -444,25 +585,25 @@ dmxInitWindow (CompPlugin *plugin, CompWindow *w)
+@@ -444,25 +730,28 @@ dmxInitWindow (CompPlugin *plugin, CompWindow *w)
static void
dmxFiniWindow (CompPlugin *plugin, CompWindow *w)
{
@@ -381,6 +553,9 @@
free (dw->name);
}
++ if (dw->region)
++ XDestroyRegion (dw->region);
++
free (dw);
+ w->base.privates[ds->windowPrivateIndex].ptr = NULL;
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx
| < Previous | Next > |