~ubuntu-branches/ubuntu/jaunty/compiz/jaunty-proposed

« back to all changes in this revision

Viewing changes to debian/patches/040_resolve-animation-fade-conflict_from_upstream.patch

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2009-02-10 10:39:03 UTC
  • mfrom: (0.101.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090210103903-lbxs9kycjwydh5s8
Tags: 1:0.7.9+git20090211-0ubuntu1
* build from the 0.8 git branch
  - fixes focus problem (LP: #274407)
  - fixes problem with latest libmetacity decoration (LP: #327793)
  - enable new gnomecompat plugin by default
* debian/patches:
 - updated 013-add-cursor-theme-support.patch
 - updated 018_use_metacity_settings.patch
 - updated 029_default_options
 - updated 035_ignore_workspaces
 - updated 037_fullscreen_stacking_fixes.patch (mostly merged upstream
   just the move plugin changes remain)
 - dropped 027_default_to_gnome_terminal
 - dropped 040_resolve-animation-fade-conflict_from_upstream.patch
 - dropped 047_no_display_compiz_desktop.patch
 - dropped 048_from_git_fix_placement.patch
 - dropped 050-scale-keybinding-toggle.patch
 - dropped 051-new-kde4-plasma-api.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
diff --git a/metadata/fade.xml.in b/metadata/fade.xml.in
2
 
index cfe0661..2f18e30 100644
3
 
--- a/metadata/fade.xml.in
4
 
+++ b/metadata/fade.xml.in
5
 
@@ -3,6 +3,12 @@
6
 
        <_short>Fading Windows</_short>
7
 
        <_long>Fade in windows when mapped and fade out windows when unmapped</_long>
8
 
        <deps>
9
 
+           <requirement>
10
 
+               <plugin>regex</plugin>
11
 
+           </requirement>
12
 
+           <relation type="after">
13
 
+               <plugin>regex</plugin>
14
 
+           </relation>
15
 
            <relation type="before">
16
 
                <plugin>cube</plugin>
17
 
                <plugin>scale</plugin>
18
 
diff --git a/plugins/fade.c b/plugins/fade.c
19
 
index 7412e57..23ff18a 100644
20
 
--- a/plugins/fade.c
21
 
+++ b/plugins/fade.c
22
 
@@ -37,6 +37,8 @@ typedef struct _FadeDisplay {
23
 
     HandleEventProc           handleEvent;
24
 
     MatchExpHandlerChangedProc matchExpHandlerChanged;
25
 
     int                               displayModals;
26
 
+    Bool                      suppressMinimizeOpenClose;
27
 
+    CompMatch                 alwaysFadeWindowMatch;
28
 
 } FadeDisplay;
29
 
 
30
 
 #define FADE_SCREEN_OPTION_FADE_SPEED            0
31
 
@@ -394,6 +396,22 @@ fadeRemoveDisplayModal (CompDisplay *d,
32
 
     }
33
 
 }
34
 
 
35
 
+/* Returns whether this window should be faded
36
 
+ * on open and close events. */
37
 
+static Bool
38
 
+isFadeWinForOpenClose (CompWindow *w)
39
 
+{
40
 
+    FADE_DISPLAY (w->screen->display);
41
 
+    FADE_SCREEN (w->screen);
42
 
+
43
 
+    if (fs->opt[FADE_SCREEN_OPTION_MINIMIZE_OPEN_CLOSE].value.b &&
44
 
+       !fd->suppressMinimizeOpenClose)
45
 
+    {
46
 
+       return TRUE;
47
 
+    }
48
 
+    return matchEval (&fd->alwaysFadeWindowMatch, w);
49
 
+}
50
 
+
51
 
 static void
52
 
 fadeHandleEvent (CompDisplay *d,
53
 
                 XEvent      *event)
54
 
@@ -409,10 +427,8 @@ fadeHandleEvent (CompDisplay *d,
55
 
        {
56
 
            FADE_SCREEN (w->screen);
57
 
 
58
 
-           if (!fs->opt[FADE_SCREEN_OPTION_MINIMIZE_OPEN_CLOSE].value.b)
59
 
-               break;
60
 
-
61
 
-           if (w->texture->pixmap && matchEval (&fs->match, w))
62
 
+           if (w->texture->pixmap && isFadeWinForOpenClose (w) &&
63
 
+               matchEval (&fs->match, w))
64
 
            {
65
 
                FADE_WINDOW (w);
66
 
 
67
 
@@ -439,10 +455,10 @@ fadeHandleEvent (CompDisplay *d,
68
 
 
69
 
            fw->shaded = w->shaded;
70
 
 
71
 
-           if (!fs->opt[FADE_SCREEN_OPTION_MINIMIZE_OPEN_CLOSE].value.b)
72
 
-               break;
73
 
-
74
 
-           if (!fw->shaded && w->texture->pixmap && matchEval (&fs->match, w))
75
 
+           if (fs->opt[FADE_SCREEN_OPTION_MINIMIZE_OPEN_CLOSE].value.b &&
76
 
+               !fd->suppressMinimizeOpenClose &&
77
 
+               !fw->shaded && w->texture->pixmap &&
78
 
+               matchEval (&fs->match, w))
79
 
            {
80
 
                if (fw->opacity == 0xffff)
81
 
                    fw->opacity = 0xfffe;
82
 
@@ -462,13 +478,13 @@ fadeHandleEvent (CompDisplay *d,
83
 
        w = findWindowAtDisplay (d, event->xmap.window);
84
 
        if (w)
85
 
        {
86
 
-           FADE_SCREEN(w->screen);
87
 
-
88
 
-           if (!fs->opt[FADE_SCREEN_OPTION_MINIMIZE_OPEN_CLOSE].value.b)
89
 
-               break;
90
 
-
91
 
-           fadeWindowStop (w);
92
 
+           FADE_SCREEN (w->screen);
93
 
 
94
 
+           if (fs->opt[FADE_SCREEN_OPTION_MINIMIZE_OPEN_CLOSE].value.b &&
95
 
+               !fd->suppressMinimizeOpenClose)
96
 
+           {
97
 
+               fadeWindowStop (w);
98
 
+           }
99
 
            if (w->state & CompWindowStateDisplayModalMask)
100
 
                fadeAddDisplayModal (d, w);
101
 
        }
102
 
@@ -575,7 +591,7 @@ fadeDamageWindowRect (CompWindow *w,
103
 
        }
104
 
        else if (matchEval (&fs->match, w))
105
 
        {
106
 
-           if (fs->opt[FADE_SCREEN_OPTION_MINIMIZE_OPEN_CLOSE].value.b)
107
 
+           if (isFadeWinForOpenClose (w))
108
 
            {
109
 
                fw->opacity = 0;
110
 
            }
111
 
@@ -661,6 +677,16 @@ fadeInitDisplay (CompPlugin  *p,
112
 
 
113
 
     fd->displayModals = 0;
114
 
 
115
 
+    fd->suppressMinimizeOpenClose = (findActivePlugin ("animation") != NULL);
116
 
+
117
 
+    /* Always fade opening and closing of screen-dimming layer of 
118
 
+       logout window and gksu. */
119
 
+    matchInit (&fd->alwaysFadeWindowMatch);
120
 
+    matchAddExp (&fd->alwaysFadeWindowMatch, 0, "title=gksu");
121
 
+    matchAddExp (&fd->alwaysFadeWindowMatch, 0, "title=x-session-manager");
122
 
+    matchAddExp (&fd->alwaysFadeWindowMatch, 0, "title=gnome-session");
123
 
+    matchUpdate (d, &fd->alwaysFadeWindowMatch);
124
 
+
125
 
     WRAP (fd, d, handleEvent, fadeHandleEvent);
126
 
     WRAP (fd, d, matchExpHandlerChanged, fadeMatchExpHandlerChanged);
127
 
 
128
 
@@ -677,6 +703,8 @@ fadeFiniDisplay (CompPlugin  *p,
129
 
 
130
 
     freeScreenPrivateIndex (d, fd->screenPrivateIndex);
131
 
 
132
 
+    matchFini (&fd->alwaysFadeWindowMatch);
133
 
+
134
 
     UNWRAP (fd, d, handleEvent);
135
 
     UNWRAP (fd, d, matchExpHandlerChanged);
136