Hello community, here is the log from the commit of package compiz-plugins-dmx checked in at Thu Oct 16 01:17:49 CEST 2008. -------- --- compiz-plugins-dmx/compiz-plugins-dmx.changes 2008-09-30 20:42:04.000000000 +0200 +++ /d/STABLE/compiz-plugins-dmx/compiz-plugins-dmx.changes 2008-10-15 21:14:03.000000000 +0200 @@ -1,0 +2,10 @@ +Wed Oct 15 14:56:24 EDT 2008 - davidr@novell.com + +- Add patch dmx-NOMAD.diff + * Detect active window properly. + * Fix root window detection. + * Fix unload crash. + * Add missing metadata. + * Fix compositing manager detection. + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- dmx-NOMAD.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ compiz-plugins-dmx.spec ++++++ --- /var/tmp/diff_new_pack.HD3798/_old 2008-10-16 01:17:18.000000000 +0200 +++ /var/tmp/diff_new_pack.HD3798/_new 2008-10-16 01:17:18.000000000 +0200 @@ -29,11 +29,12 @@ PreReq: %fillup_prereq Requires: compiz Version: 0.1.0 -Release: 2 +Release: 3 Summary: Compiz DMX plugins BuildRoot: %{_tmppath}/%{name}-%{version}-build ExclusiveArch: %ix86 x86_64 ppc ppc64 ia64 Source: dmx.tar.bz2 +Patch: dmx-NOMAD.diff #%define _libsuffix %(echo %_lib | cut -b4-) %gconf_schemas_prereq @@ -48,6 +49,7 @@ %prep %setup -q -n dmx +%patch -p1 %build make @@ -72,6 +74,13 @@ %{_datadir}/compiz/ %changelog +* Wed Oct 15 2008 davidr@novell.com +- Add patch dmx-NOMAD.diff + * Detect active window properly. + * Fix root window detection. + * Fix unload crash. + * Add missing metadata. + * Fix compositing manager detection. * Tue Sep 30 2008 hfiguiere@suse.de - Fix gconf packaging. * Wed Sep 10 2008 hfiguiere@suse.de ++++++ dmx-NOMAD.diff ++++++ diff --git a/dmx.c b/dmx.c index a7d1c8e..38bdb55 100644 --- a/dmx.c +++ b/dmx.c @@ -20,6 +20,7 @@ typedef struct _DmxDisplay { Atom dmxRootAtom; Atom dmxNameAtom; + Atom dmxSupportingCmCheckAtom; } DmxDisplay; typedef struct _DmxScreen { @@ -28,7 +29,9 @@ typedef struct _DmxScreen { } DmxScreen; typedef struct _DmxWindow { - char *name; + char *name; + Window supportingCmCheckWindow; + CompTimeoutHandle checkHandle; } DmxWindow; #define GET_DMX_CORE(c) \ @@ -85,41 +88,110 @@ dmxWindowGetDmxNameProp (CompWindow *w) return name; } -static Bool -dmxWindowCheckDmxName (CompWindow *w) +static void +dmxWindowSupportingCmCheck (CompWindow *w, + Bool closeDown) { - CompDisplay *d = w->screen->display; - Window rootReturn, parentReturn; - Window *children; - unsigned int nchildren, i; + CompDisplay *d = w->screen->display; + DMX_DISPLAY (d); DMX_WINDOW (w); - if (w->redirectSubwindows || w->substructureRedirect || w->windows) - return FALSE; + dw->supportingCmCheckWindow = None; - if (dw->name) - return TRUE; + if (!closeDown) + { + Atom actual; + int result, format; + unsigned long n, left; + unsigned char *propData; + + result = XGetWindowProperty (d->display, w->id, + dd->dmxSupportingCmCheckAtom, 0L, 1L, + FALSE, XA_WINDOW, &actual, &format, + &n, &left, &propData); + if (result == Success && n && propData) + { + Window cmCheckWindow = *((unsigned long *) propData); + + XFree (propData); + + result = XGetWindowProperty (d->display, + cmCheckWindow, + dd->dmxSupportingCmCheckAtom, 0L, 1L, + FALSE, XA_WINDOW, &actual, &format, + &n, &left, &propData); + if (result == Success && n && propData) + { + dw->supportingCmCheckWindow = cmCheckWindow; + XFree (propData); + } + } + } - dw->name = dmxWindowGetDmxNameProp (w); - if (!dw->name) - return FALSE; + if (dw->supportingCmCheckWindow) + { + if (!w->redirectSubwindows) + { + Window rootReturn, parentReturn; + Window *children; + unsigned int nchildren, i; + + XCompositeRedirectSubwindows (d->display, w->id, + CompositeRedirectManual); + w->redirectSubwindows = TRUE; + + XSelectInput (d->display, w->id, + 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); - XSelectInput (d->display, w->id, - SubstructureNotifyMask | - StructureNotifyMask | - PropertyChangeMask); + for (i = 0; i < nchildren; i++) + addWindow (w, children[i], i ? children[i - 1] : 0); + } + } + else + { + if (w->redirectSubwindows) + { + 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); + } + } +} + +static Bool +dmxWindowCheckDmxName (CompWindow *w) +{ + DMX_WINDOW (w); + + if (!w->parent) + return FALSE; + + if (w->redirectSubwindows || w->substructureRedirect || w->windows) + return FALSE; + + if (!dw->name) + { + dw->name = dmxWindowGetDmxNameProp (w); + if (!dw->name) + return FALSE; + } + + dmxWindowSupportingCmCheck (w, FALSE); return TRUE; } @@ -183,16 +255,26 @@ dmxEnsureDmxRoot (CompWindow *ancestor, CompWindow *c; unsigned int i; - for (i = 0; i < npchildren; i++) - if (pchildren[i] == id) - addWindow (w, id, i ? pchildren[i - 1] : 0); + for (c = w->windows; c; c = c->next) + if (c->id == id) + break; + + if (!c) + { + for (i = 0; i < npchildren; i++) + if (pchildren[i] == id) + addWindow (w, id, i ? pchildren[i - 1] : 0); + + for (c = w->windows; c; c = c->next) + if (c->id == id) + break; + } if (pchildren) XFree (pchildren); - for (c = w->windows; c; c = c->next) - if (c->id == id) - return c; + if (c) + return c; } if (*children) @@ -226,13 +308,8 @@ dmxWindowCheckDmxRoot (CompWindow *w) ds->root = root[i]; r = dmxEnsureDmxRoot (w, root[i], &children, &nchildren); - if (r) - { - - dmxWindowCheckDmxName (r); - if (children) - XFree (children); - } + if (r && children) + XFree (children); } ds->root = None; @@ -251,6 +328,19 @@ dmxHandleEvent (CompDisplay *d, DMX_DISPLAY (d); + switch (event->type) { + case DestroyNotify: + w = findWindowAtDisplay (d, event->xdestroywindow.window); + if (w && w->parent) + { + DMX_WINDOW (w->parent); + + if (dw->name && dw->supportingCmCheckWindow == w->id) + dmxWindowSupportingCmCheck (w->parent, FALSE); + } + break; + } + UNWRAP (dd, d, handleEvent); (*d->handleEvent) (d, event); WRAP (dd, d, handleEvent, dmxHandleEvent); @@ -260,25 +350,59 @@ dmxHandleEvent (CompDisplay *d, if (event->xproperty.atom == dd->dmxNameAtom) { w = findWindowAtDisplay (d, event->xproperty.window); - if (w) + if (w && w->screen->root.redirectSubwindows) dmxWindowCheckDmxName (w); } else if (event->xproperty.atom == dd->dmxRootAtom) { w = findWindowAtDisplay (d, event->xproperty.window); - if (w) + if (w && w->screen->root.redirectSubwindows) dmxWindowCheckDmxRoot (w); } + else if (event->xproperty.atom == dd->dmxSupportingCmCheckAtom) + { + w = findWindowAtDisplay (d, event->xproperty.window); + if (w) + { + DMX_WINDOW (w); + + if (dw->name) + dmxWindowSupportingCmCheck (w, FALSE); + } + } break; } } +static Bool +dmxWindowCheck (void *closure) +{ + CompWindow *w = (CompWindow *) closure; + + DMX_WINDOW (w); + + if (!w->parent->substructureRedirect && !w->parent->redirectSubwindows) + XSelectInput (w->screen->display->display, w->id, + StructureNotifyMask | PropertyChangeMask); + + if (!dmxWindowCheckDmxName (w)) + dmxWindowCheckDmxRoot (w); + + dw->checkHandle = 0; + + return FALSE; +} + static void dmxWindowAdd (CompWindow *parent, CompWindow *w) { - if (!dmxWindowCheckDmxName (w)) - dmxWindowCheckDmxRoot (w); + DMX_WINDOW (w); + + if (!w->screen->root.redirectSubwindows || !w->parent) + return; + + dw->checkHandle = compAddTimeout (0, 0, dmxWindowCheck, w); } static void @@ -310,9 +434,6 @@ dmxInitCore (CompPlugin *p, if (!checkPluginABI ("core", CORE_ABIVERSION)) return FALSE; - if (!checkPluginABI ("glx", CORE_ABIVERSION)) - return FALSE; - dc = malloc (sizeof (DmxCore)); if (!dc) return FALSE; @@ -363,6 +484,9 @@ dmxInitDisplay (CompPlugin *plugin, CompDisplay *d) dd->dmxNameAtom = XInternAtom (d->display, "DMX_NAME", 0); dd->dmxRootAtom = XInternAtom (d->display, "DMX_ROOT", 0); + dd->dmxSupportingCmCheckAtom = + XInternAtom (d->display, "_DMX_SUPPORTING_CM_CHECK", 0); + d->base.privates[displayPrivateIndex].ptr = dd; WRAP (dd, d, handleEvent, dmxHandleEvent); @@ -404,14 +528,29 @@ dmxInitScreen (CompPlugin *plugin, CompScreen *s) s->base.privates[dd->screenPrivateIndex].ptr = ds; + XChangeProperty (s->display->display, s->grabWindow, + dd->dmxSupportingCmCheckAtom, + XA_WINDOW, 32, PropModeReplace, + (unsigned char *) &s->grabWindow, 1); + XChangeProperty (s->display->display, s->root.id, + dd->dmxSupportingCmCheckAtom, + XA_WINDOW, 32, PropModeReplace, + (unsigned char *) &s->grabWindow, 1); + return TRUE; } static void dmxFiniScreen (CompPlugin *plugin, CompScreen *s) { + DMX_DISPLAY (s->display); DMX_SCREEN (s); + XDeleteProperty (s->display->display, s->grabWindow, + dd->dmxSupportingCmCheckAtom); + XDeleteProperty (s->display->display, s->root.id, + dd->dmxSupportingCmCheckAtom); + freeWindowPrivateIndex (s, ds->windowPrivateIndex); free (ds); @@ -428,7 +567,9 @@ dmxInitWindow (CompPlugin *plugin, CompWindow *w) if (!dw) return FALSE; - dw->name = NULL; + dw->name = NULL; + dw->supportingCmCheckWindow = None; + dw->checkHandle = 0; w->base.privates[ds->windowPrivateIndex].ptr = dw; @@ -444,25 +585,25 @@ dmxInitWindow (CompPlugin *plugin, CompWindow *w) static void dmxFiniWindow (CompPlugin *plugin, CompWindow *w) { + DMX_SCREEN (w->screen); DMX_WINDOW (w); + if (!dw) + return; + + if (dw->checkHandle) + compRemoveTimeout (dw->checkHandle); + if (dw->name) { if (!w->destroyed) - { - CompDisplay *d = w->screen->display; - - XCompositeUnredirectSubwindows (d->display, - w->id, - CompositeRedirectManual); - w->redirectSubwindows = TRUE; - XSelectInput (d->display, w->id, 0); - } + dmxWindowSupportingCmCheck (w, TRUE); free (dw->name); } free (dw); + w->base.privates[ds->windowPrivateIndex].ptr = NULL; } static CompBool diff --git a/dmx.xml.in b/dmx.xml.in index 03bee85..1134db9 100644 --- a/dmx.xml.in +++ b/dmx.xml.in @@ -3,11 +3,6 @@ <!-- dmx metadata --> <plugin name="dmx" useBcop="true"> <category>Utility</category> - <deps> - <requirement> - <plugin>glx</plugin> - </requirement> - </deps> <_short>DMX <_long>DMX output compositing </plugin> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de