~lbrulet-8/compiz-plugins-main/fix-876591

« back to all changes in this revision

Viewing changes to debian/patches/01-grid-fix-rev87.patch

  • Committer: Package Import Robot
  • Author(s): Didier Roche, David Barth, Didier Roche
  • Date: 2011-09-09 16:21:26 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: package-import@ubuntu.com-20110909162126-vf2y3xv7anhjtq5c
Tags: 1:0.9.5.94-0ubuntu1
[ David Barth ] 
* Test build for release (0.9.5.94) 
* Removed patches integrated upstream:
  - debian/patches/01_grid_defaults.patch
* Add another patch for the same grid, but with other changes
  - debian/patches/01-grid-fix-rev87.patch: prevent eye bleeding

[ Didier Roche ]
* debian/control: bump build-dep for ABI break

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
=== modified file 'src/grid.cpp'
 
2
--- compiz-plugins-main-0.9.5.94.orig/grid/src/grid.cpp 2011-08-25 10:50:22 +0000
 
3
+++ compiz-plugins-main-0.9.5.94/grid/src/grid.cpp      2011-09-02 17:08:08 +0000
 
4
@@ -377,9 +377,8 @@
 
5
 
 
6
        for (iter = animations.begin (); iter != animations.end () && animating; iter++)
 
7
        {
 
8
-               GLushort *color;
 
9
                Animation& anim = *iter;
 
10
-               float alpha = (float) optionGetFillColorAlpha () / 65535.0f * anim.opacity;
 
11
+               float alpha = ((float) optionGetFillColorAlpha () / 65535.0f) * anim.opacity;
 
12
 
 
13
                /* fill rectangle */
 
14
                glColor4f (((float) optionGetFillColorRed () / 65535.0f) * alpha,
 
15
@@ -397,16 +396,13 @@
 
16
                                              anim.currentRect.width () - 2,
 
17
                                              anim.currentRect.height () - 2);
 
18
 
 
19
-               /* draw outline */
 
20
-               color = optionGetOutlineColor ();
 
21
+               alpha = (float) (optionGetOutlineColorAlpha () / 65535.0f) * anim.opacity;
 
22
 
 
23
                /* draw outline */
 
24
                glColor4f (((float) optionGetOutlineColorRed () / 65535.0f) * alpha,
 
25
                           ((float) optionGetOutlineColorGreen () / 65535.0f) * alpha,
 
26
                           ((float) optionGetOutlineColorBlue () / 65535.0f) * alpha,
 
27
-                          ((float) optionGetOutlineColorAlpha () / 65535.0f) * anim.opacity);
 
28
-
 
29
-               glColor4us (color[0], color[1], color[2], anim.opacity * color[3]);
 
30
+                          alpha);
 
31
 
 
32
                glLineWidth (2.0);
 
33
 
 
34
@@ -421,7 +417,13 @@
 
35
        if (!animating)
 
36
        {
 
37
                /* fill rectangle */
 
38
-               glColor4usv (optionGetFillColor ());
 
39
+               float alpha = (float) optionGetFillColorAlpha () / 65535.0f;
 
40
+
 
41
+               /* fill rectangle */
 
42
+               glColor4f (((float) optionGetFillColorRed () / 65535.0f) * alpha,
 
43
+                          ((float) optionGetFillColorGreen () / 65535.0f) * alpha,
 
44
+                          ((float) optionGetFillColorBlue () / 65535.0f) * alpha,
 
45
+                          alpha);
 
46
                glRecti (rect.x1 (), rect.y2 (), rect.x2 (), rect.y1 ());
 
47
 
 
48
                /* Set outline rect smaller to avoid damage issues */
 
49
@@ -429,7 +431,14 @@
 
50
                                  rect.width () - 2, rect.height () - 2);
 
51
 
 
52
                /* draw outline */
 
53
-               glColor4usv (optionGetOutlineColor ());
 
54
+               alpha = (float) optionGetOutlineColorAlpha () / 65535.0f;
 
55
+
 
56
+               /* draw outline */
 
57
+               glColor4f (((float) optionGetOutlineColorRed () / 65535.0f) * alpha,
 
58
+                          ((float) optionGetOutlineColorGreen () / 65535.0f) * alpha,
 
59
+                          ((float) optionGetOutlineColorBlue () / 65535.0f) * alpha,
 
60
+                          alpha);
 
61
+
 
62
                glLineWidth (2.0);
 
63
                glBegin (GL_LINE_LOOP);
 
64
                glVertex2i (rect.x1 (), rect.y1 ());
 
65