diff options
author | flz <flz@FreeBSD.org> | 2007-08-29 06:53:09 +0800 |
---|---|---|
committer | flz <flz@FreeBSD.org> | 2007-08-29 06:53:09 +0800 |
commit | af621f0c4028f62ead849f2d20e4b6d1de8f18e3 (patch) | |
tree | 49940aaa9ca6a1011cf5989b16ff6ad5de231438 /x11-wm/compiz-plugins-extra | |
parent | ec5946450a42cf2f390e17172b8fa03c9c060eb5 (diff) | |
download | freebsd-ports-gnome-af621f0c4028f62ead849f2d20e4b6d1de8f18e3.tar.gz freebsd-ports-gnome-af621f0c4028f62ead849f2d20e4b6d1de8f18e3.tar.zst freebsd-ports-gnome-af621f0c4028f62ead849f2d20e4b6d1de8f18e3.zip |
Add patches from git repository to fix the widget plugin.
PR: ports/115902
Submitted by: maintainer
Diffstat (limited to 'x11-wm/compiz-plugins-extra')
-rw-r--r-- | x11-wm/compiz-plugins-extra/Makefile | 2 | ||||
-rw-r--r-- | x11-wm/compiz-plugins-extra/files/patch-metadata-widget.xml.in | 10 | ||||
-rw-r--r-- | x11-wm/compiz-plugins-extra/files/patch-src-widget-widget.c | 288 |
3 files changed, 299 insertions, 1 deletions
diff --git a/x11-wm/compiz-plugins-extra/Makefile b/x11-wm/compiz-plugins-extra/Makefile index 671d72d4fee8..6f4b436cd1fc 100644 --- a/x11-wm/compiz-plugins-extra/Makefile +++ b/x11-wm/compiz-plugins-extra/Makefile @@ -7,7 +7,7 @@ PORTNAME= compiz-fusion-plugins-extra PORTVERSION= 0.5.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-wm MASTER_SITES= http://releases.compiz-fusion.org/${PORTVERSION}/ diff --git a/x11-wm/compiz-plugins-extra/files/patch-metadata-widget.xml.in b/x11-wm/compiz-plugins-extra/files/patch-metadata-widget.xml.in new file mode 100644 index 000000000000..5cac61b46763 --- /dev/null +++ b/x11-wm/compiz-plugins-extra/files/patch-metadata-widget.xml.in @@ -0,0 +1,10 @@ +--- metadata/widget.xml.in.orig 2007-08-13 08:12:47.000000000 -0400 ++++ metadata/widget.xml.in 2007-08-24 17:56:48.000000000 -0400 +@@ -6,6 +6,7 @@ + <deps> + <relation type="before"> + <plugin>fade</plugin> ++ <plugin>animation</plugin> + </relation> + </deps> + <display> diff --git a/x11-wm/compiz-plugins-extra/files/patch-src-widget-widget.c b/x11-wm/compiz-plugins-extra/files/patch-src-widget-widget.c new file mode 100644 index 000000000000..ce64f3ced01f --- /dev/null +++ b/x11-wm/compiz-plugins-extra/files/patch-src-widget-widget.c @@ -0,0 +1,288 @@ +--- src/widget/widget.c.orig 2007-08-24 18:24:42.000000000 -0400 ++++ src/widget/widget.c 2007-08-24 18:25:02.000000000 -0400 +@@ -68,7 +68,6 @@ + PreparePaintScreenProc preparePaintScreen; + DonePaintScreenProc donePaintScreen; + PaintWindowProc paintWindow; +- WindowAddNotifyProc windowAddNotify; + + WidgetState state; + +@@ -82,7 +81,9 @@ + { + Bool isWidget; + Bool wasUnmapped; ++ CompWindow *parentWidget; + CompTimeoutHandle matchUpdateHandle; ++ CompTimeoutHandle inferiorUpdateHandle; + WidgetPropertyState propertyState; + } WidgetWindow; + +@@ -106,6 +107,41 @@ + GET_WIDGET_SCREEN (w->screen, \ + GET_WIDGET_DISPLAY (w->screen->display))) + ++static void ++widgetUpdateTreeStatus (CompWindow *w) ++{ ++ CompWindow *p; ++ WidgetWindow *pww; ++ ++ WIDGET_SCREEN (w->screen); ++ ++ /* first clear out every reference to our window */ ++ for (p = w->screen->windows; p; p = p->next) ++ { ++ pww = GET_WIDGET_WINDOW (p, ws); ++ if (pww->parentWidget == w) ++ pww->parentWidget = NULL; ++ } ++ ++ for (p = w->screen->windows; p; p = p->next) ++ { ++ Window clientLeader; ++ ++ if (p->attrib.override_redirect) ++ clientLeader = getClientLeader (p); ++ else ++ clientLeader = p->clientLeader; ++ ++ if ((clientLeader == w->clientLeader) && (w->id != p->id)) ++ { ++ WIDGET_SCREEN (w->screen); ++ ++ pww = GET_WIDGET_WINDOW (p, ws); ++ pww->parentWidget = w; ++ } ++ } ++} ++ + static Bool + widgetUpdateWidgetStatus (CompWindow *w) + { +@@ -131,7 +167,7 @@ + return retval; + } + +-static void ++static Bool + widgetUpdateWidgetPropertyState (CompWindow *w) + { + CompDisplay *d = w->screen->display; +@@ -144,7 +180,7 @@ + WIDGET_WINDOW (w); + + result = XGetWindowProperty (d->display, w->id, wd->compizWidgetAtom, +- 0, 1L, FALSE, XA_CARDINAL, &retType, ++ 0, 1L, FALSE, AnyPropertyType, &retType, + &format, &nitems, &remain, &data); + + if (result == Success && nitems && data) +@@ -159,7 +195,7 @@ + else + ww->propertyState = PropertyNotSet; + +- widgetUpdateWidgetStatus (w); ++ return widgetUpdateWidgetStatus (w); + } + + static void +@@ -271,6 +307,8 @@ + map = !ww->isWidget || (ws->state != StateOff); + widgetUpdateWidgetMapState (w, map); + ++ widgetUpdateTreeStatus (w); ++ + (*d->matchPropertyChanged) (d, w); + } + } +@@ -295,19 +333,13 @@ + + switch (ws->state) { + case StateOff: ++ case StateFadeOut: + widgetSetWidgetLayerMapState (s, TRUE); + ws->fadeTime = 1000.0f * widgetGetFadeTime (s); + ws->state = StateFadeIn; + break; +- case StateFadeIn: +- ws->fadeTime = (1000.0f * widgetGetFadeTime (s)) - ws->fadeTime; +- ws->state = StateFadeOut; +- break; +- case StateFadeOut: +- ws->fadeTime = (1000.0f * widgetGetFadeTime (s)) - ws->fadeTime; +- ws->state = StateFadeIn; +- break; + case StateOn: ++ case StateFadeIn: + widgetSetWidgetLayerMapState (s, FALSE); + ws->fadeTime = 1000.0f * widgetGetFadeTime (s); + ws->state = StateFadeOut; +@@ -345,8 +377,33 @@ + w = findWindowAtDisplay (d, event->xproperty.window); + if (w) + { +- widgetUpdateWidgetPropertyState (w); +- (*d->matchPropertyChanged) (d, w); ++ if (widgetUpdateWidgetPropertyState (w)) ++ { ++ Bool map; ++ ++ WIDGET_SCREEN (w->screen); ++ WIDGET_WINDOW (w); ++ ++ map = !ww->isWidget || (ws->state != StateOff); ++ widgetUpdateWidgetMapState (w, map); ++ widgetUpdateTreeStatus (w); ++ (*d->matchPropertyChanged) (d, w); ++ } ++ } ++ } ++ else if (event->xproperty.atom == d->wmClientLeaderAtom) ++ { ++ CompWindow *w; ++ ++ w = findWindowAtDisplay (d, event->xproperty.window); ++ if (w) ++ { ++ WIDGET_WINDOW (w); ++ ++ if (ww->isWidget) ++ widgetUpdateTreeStatus (w); ++ else if (ww->parentWidget) ++ widgetUpdateTreeStatus (ww->parentWidget); + } + } + break; +@@ -368,7 +425,7 @@ + { + WIDGET_WINDOW (w); + +- if (!ww->isWidget) ++ if (!ww->isWidget && !ww->parentWidget) + { + CompOption o; + +@@ -409,12 +466,54 @@ + WIDGET_WINDOW (w); + + if (widgetUpdateWidgetStatus (w)) ++ { ++ widgetUpdateTreeStatus (w); + (*w->screen->display->matchPropertyChanged) (w->screen->display, w); ++ } + + ww->matchUpdateHandle = 0; + return FALSE; + } + ++static Bool ++widgetUpdateInferiors (void *closure) ++{ ++ CompWindow *w = (CompWindow *) closure; ++ Window clientLeader; ++ ++ WIDGET_WINDOW (w); ++ ++ if (w->attrib.override_redirect) ++ clientLeader = getClientLeader (w); ++ else ++ clientLeader = w->clientLeader; ++ ++ if (ww->isWidget) ++ { ++ widgetUpdateTreeStatus (w); ++ } ++ else if (clientLeader) ++ { ++ CompWindow *lw; ++ ++ lw = findWindowAtScreen (w->screen, clientLeader); ++ if (lw) ++ { ++ WidgetWindow *lww; ++ ++ WIDGET_SCREEN (w->screen); ++ lww = GET_WIDGET_WINDOW (lw, ws); ++ ++ if (lww->isWidget) ++ ww->parentWidget = lw; ++ else if (lww->parentWidget) ++ ww->parentWidget = lww->parentWidget; ++ } ++ } ++ ++ ww->inferiorUpdateHandle = 0; ++ return FALSE; ++} + + static void + widgetMatchPropertyChanged (CompDisplay *d, +@@ -435,20 +534,6 @@ + WRAP (wd, d, matchPropertyChanged, widgetMatchPropertyChanged); + } + +-static void +-widgetWindowAddNotify (CompWindow *w) +-{ +- WIDGET_SCREEN (w->screen); +- WIDGET_WINDOW (w); +- +- if (ww->isWidget) +- widgetUpdateWidgetMapState (w, (ws->state != StateOff)); +- +- UNWRAP (ws, w->screen, windowAddNotify); +- (*w->screen->windowAddNotify) (w); +- WRAP (ws, w->screen, windowAddNotify, widgetWindowAddNotify); +-} +- + static Bool + widgetPaintWindow (CompWindow *w, + const WindowPaintAttrib *attrib, +@@ -478,7 +563,7 @@ + fadeProgress = 1.0f - fadeProgress; + } + +- if (!ww->isWidget) ++ if (!ww->isWidget && !ww->parentWidget) + { + float progress; + +@@ -572,6 +657,7 @@ + map = !ww->isWidget || (ws->state != StateOff); + widgetUpdateWidgetMapState (w, map); + ++ widgetUpdateTreeStatus (w); + (*s->display->matchPropertyChanged) (s->display, w); + } + } +@@ -700,12 +786,18 @@ + return FALSE; + + ww->isWidget = FALSE; ++ ww->parentWidget = NULL; + ww->wasUnmapped = FALSE; + ww->matchUpdateHandle = 0; ++ ww->inferiorUpdateHandle = 0; + + w->privates[ws->windowPrivateIndex].ptr = ww; + +- widgetUpdateWidgetPropertyState (w); ++ if (widgetUpdateWidgetPropertyState (w)) ++ widgetUpdateWidgetMapState (w, (ws->state != StateOff)); ++ ++ ww->inferiorUpdateHandle = compAddTimeout (0, widgetUpdateInferiors, ++ (void *) w); + + return TRUE; + } +@@ -722,6 +814,9 @@ + if (ww->matchUpdateHandle) + compRemoveTimeout (ww->matchUpdateHandle); + ++ if (ww->inferiorUpdateHandle) ++ compRemoveTimeout (ww->inferiorUpdateHandle); ++ + free (ww); + } + |