Merge lp:~brandontschaefer/compiz/window-max-semimax-animation into lp:compiz/0.9.9

Proposed by Brandon Schaefer
Status: Rejected
Rejected by: Brandon Schaefer
Proposed branch: lp:~brandontschaefer/compiz/window-max-semimax-animation
Merge into: lp:compiz/0.9.9
Diff against target: 183 lines (+84/-9)
3 files modified
plugins/grid/grid.xml.in (+12/-0)
plugins/grid/src/grid.cpp (+68/-8)
plugins/grid/src/grid.h (+4/-1)
To merge this branch: bzr merge lp:~brandontschaefer/compiz/window-max-semimax-animation
Reviewer Review Type Date Requested Status
Compiz Maintainers Pending
Review via email: mp+142996@code.launchpad.net
To post a comment you must log in.
3535. By Brandon Schaefer

* No need to draw if you're transparent

3536. By Brandon Schaefer

* Merged trunk

[ Jussi Pakkanen ]
* Build warning "multiple rules generate gtk/gnome/compiz.desktop.
  build will not be correct; continuing anyway" (LP: #1086789)
* Build uses pyrexc without checking that it exists (LP: #1086704)
[ Iven Hsu ]
* KWD: Appmenu always pops up at top-left corner of the screen (LP:
  #1089863)
[ Matija Skala ]
* findcompiz_install doesn't work (LP: #1051595)
[ Michail Bitzes ]
* [regression-r3320] firepaint doesn't paint any fire any more (LP:
  #1048505)
[ Timo Jyrinki ]
* Default blacklist string shouldn't contain double escape (LP:
  #1091103)
[ Scott Moreau <email address hidden>, MC Return <email address hidden>, Sam Spilsbury ]
* [needs-packaging] Wishlist: Missing plug-In: Wizard (LP: #1012330)
[ Brandon Schaefer ]
* Window management - When a monitor is disconnected, the windows do
  not move to the remaining monitor and the Launcher pips do not
  update (LP: #1002246)
[ MC Return ]
* [regression] thumbnail plugin does not build any more (LP: #1020825)
* [regression-r3320][GLES]: showmouse plugin does not work anymore at
  all (LP: #1048267)
[ Robert M <email address hidden>, Sam Spilsbury ]
* CCSM segfaults if no settings found (LP: #1092651)
[ Daniel van Vugt ]
* [regression] Window resize granularity is lost when restored after
  using Grid (LP: #925867)
* compiz_test_resize_logic: Multiple errors: Conditional jump or move
  depends on uninitialised value(s) (LP: #1097179)
* Add support for blacklisting some drivers from using unredirected
  fullscreen windows (LP: #1089246)
* [regression] compiz spends 31% of its CPU time in regexec() (LP:
  #1095001)
* GLShaderCache::priv [PrivateShaderCache] is leaked (LP: #1097664)
* [regression] r3523: Restored windows' contents are offset from (not
  aligned with) their frames (LP: #1089279)
* On ARM lp:compiz defaults to GL instead of GLES and FTBFS unless you
  -DBUILD_GLES=ON (LP: #1088414)
* [regression][GLES] wallpaper plugin does not build any more (LP:
  #1020830)
* [regression-r3320] firepaint doesn't paint any fire any more (LP:
  #1048505)
* findcompiz_install doesn't work (LP: #1051595)
* [Regression] Minimizing a window creates an input-insensitive area
  if you have unityshell loaded (LP: #1089811)
* [clang] lp:compiz r3523 FTBFS: unused function
  'ListValueToSettingValueList' [-Werror,-Wunused-function] (LP:
  #1089250)
* compiz fails to configure on arm with -DCOMPIZ_BUILD_TESTING=ON
  [package 'gl' not found] (LP: #1088419)
* PrivateGLScreen::projection is leaked (LP: #1097657)
* [clang] Multiple segfaults in test: SetSemantics (LP: #1089251)
* Plugin names are not sorted (they're shown in directory order) when
  cmake is run (LP: #1096780)
* Windows don't respond to input (mouse clicks) if XShape is disabled
  or unavailable (LP: #1087193)
* cmake suggests (kind of) expo is disabled but it still builds
  correctly. (LP: #1083027)
* EGL/GLES compiz builds do a eglWaitGL (synchronous wait) on every
  frame, likely to slow things down (LP: #1086779)
* Incorrect detection of shader support on fglrx (LP: #1026920)
* 1:0.9.8+bzr3319-0ubuntu1 regression: keeps setting gsettings keys to
  wrong values (LP: #1063617)
* resize leaks memory in multiple locations calling
  resize::CompScreenImpl::findWindow() -> operator new() (LP:
  #1097126)
[ Andrea Azzarone ]
* Modal dialogs don't appear on the same workspace/monitor as their
  parent window (LP: #754508)
* Multimonitor: New windows open on the wrong monitor, Place Plugin
  settings silently ignored (LP: #874146)
[ Sam Spilsbury ]
* [regression][GLES] cubeaddon plugin does not build any more (LP:
  #1020823)
* [regression-r3320] Animations and modules/plugins missing in Ubuntu
  12.10 and 13.04 (LP: #1069112)
* [nvidia] Moving or resizing windows freezes and stutters on nvidia
  (especially if some other window is redrawing). (LP: #1027211)
* Clicking on semi-maximized windows in a different workspace fails to
  switch to the correct workspace (LP: #1037164)
* CCSM segfaults if no settings found (LP: #1092651)
* Building compiz with clang++ on raring fails to build libgtest (LP:
  #1095906)
* Using grid-resize prevents windows from maximizing correctly (LP:
  #1093757)
* 1:0.9.8+bzr3319-0ubuntu1 regression: keeps setting gsettings keys to
  wrong values (LP: #1063617)
* ccp can fail to compile, as CompizPlugin is not included (LP:
  #1090845)
* opengl plugin FTBFS with clang (LP: #1095915)
[ Łukasz 'sil2100' Zemczak ]
* FTBFS after python2.7 upgrade - missing pyconfig.h (LP: #1088996)
[ Automatic PS uploader ]
* Automatic snapshot from revision 3554

3537. By Brandon Schaefer

* If the preview fades away, then keep the window under the orange glow.

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

criss-cross merge...opps...removing and new branch can be found here...
https://code.launchpad.net/~brandontschaefer/compiz/window-max-semi-animation/+merge/143163

Unmerged revisions

3537. By Brandon Schaefer

* If the preview fades away, then keep the window under the orange glow.

3536. By Brandon Schaefer

* Merged trunk

[ Jussi Pakkanen ]
* Build warning "multiple rules generate gtk/gnome/compiz.desktop.
  build will not be correct; continuing anyway" (LP: #1086789)
* Build uses pyrexc without checking that it exists (LP: #1086704)
[ Iven Hsu ]
* KWD: Appmenu always pops up at top-left corner of the screen (LP:
  #1089863)
[ Matija Skala ]
* findcompiz_install doesn't work (LP: #1051595)
[ Michail Bitzes ]
* [regression-r3320] firepaint doesn't paint any fire any more (LP:
  #1048505)
[ Timo Jyrinki ]
* Default blacklist string shouldn't contain double escape (LP:
  #1091103)
[ Scott Moreau <email address hidden>, MC Return <email address hidden>, Sam Spilsbury ]
* [needs-packaging] Wishlist: Missing plug-In: Wizard (LP: #1012330)
[ Brandon Schaefer ]
* Window management - When a monitor is disconnected, the windows do
  not move to the remaining monitor and the Launcher pips do not
  update (LP: #1002246)
[ MC Return ]
* [regression] thumbnail plugin does not build any more (LP: #1020825)
* [regression-r3320][GLES]: showmouse plugin does not work anymore at
  all (LP: #1048267)
[ Robert M <email address hidden>, Sam Spilsbury ]
* CCSM segfaults if no settings found (LP: #1092651)
[ Daniel van Vugt ]
* [regression] Window resize granularity is lost when restored after
  using Grid (LP: #925867)
* compiz_test_resize_logic: Multiple errors: Conditional jump or move
  depends on uninitialised value(s) (LP: #1097179)
* Add support for blacklisting some drivers from using unredirected
  fullscreen windows (LP: #1089246)
* [regression] compiz spends 31% of its CPU time in regexec() (LP:
  #1095001)
* GLShaderCache::priv [PrivateShaderCache] is leaked (LP: #1097664)
* [regression] r3523: Restored windows' contents are offset from (not
  aligned with) their frames (LP: #1089279)
* On ARM lp:compiz defaults to GL instead of GLES and FTBFS unless you
  -DBUILD_GLES=ON (LP: #1088414)
* [regression][GLES] wallpaper plugin does not build any more (LP:
  #1020830)
* [regression-r3320] firepaint doesn't paint any fire any more (LP:
  #1048505)
* findcompiz_install doesn't work (LP: #1051595)
* [Regression] Minimizing a window creates an input-insensitive area
  if you have unityshell loaded (LP: #1089811)
* [clang] lp:compiz r3523 FTBFS: unused function
  'ListValueToSettingValueList' [-Werror,-Wunused-function] (LP:
  #1089250)
* compiz fails to configure on arm with -DCOMPIZ_BUILD_TESTING=ON
  [package 'gl' not found] (LP: #1088419)
* PrivateGLScreen::projection is leaked (LP: #1097657)
* [clang] Multiple segfaults in test: SetSemantics (LP: #1089251)
* Plugin names are not sorted (they're shown in directory order) when
  cmake is run (LP: #1096780)
* Windows don't respond to input (mouse clicks) if XShape is disabled
  or unavailable (LP: #1087193)
* cmake suggests (kind of) expo is disabled but it still builds
  correctly. (LP: #1083027)
* EGL/GLES compiz builds do a eglWaitGL (synchronous wait) on every
  frame, likely to slow things down (LP: #1086779)
* Incorrect detection of shader support on fglrx (LP: #1026920)
* 1:0.9.8+bzr3319-0ubuntu1 regression: keeps setting gsettings keys to
  wrong values (LP: #1063617)
* resize leaks memory in multiple locations calling
  resize::CompScreenImpl::findWindow() -> operator new() (LP:
  #1097126)
[ Andrea Azzarone ]
* Modal dialogs don't appear on the same workspace/monitor as their
  parent window (LP: #754508)
* Multimonitor: New windows open on the wrong monitor, Place Plugin
  settings silently ignored (LP: #874146)
[ Sam Spilsbury ]
* [regression][GLES] cubeaddon plugin does not build any more (LP:
  #1020823)
* [regression-r3320] Animations and modules/plugins missing in Ubuntu
  12.10 and 13.04 (LP: #1069112)
* [nvidia] Moving or resizing windows freezes and stutters on nvidia
  (especially if some other window is redrawing). (LP: #1027211)
* Clicking on semi-maximized windows in a different workspace fails to
  switch to the correct workspace (LP: #1037164)
* CCSM segfaults if no settings found (LP: #1092651)
* Building compiz with clang++ on raring fails to build libgtest (LP:
  #1095906)
* Using grid-resize prevents windows from maximizing correctly (LP:
  #1093757)
* 1:0.9.8+bzr3319-0ubuntu1 regression: keeps setting gsettings keys to
  wrong values (LP: #1063617)
* ccp can fail to compile, as CompizPlugin is not included (LP:
  #1090845)
* opengl plugin FTBFS with clang (LP: #1095915)
[ Łukasz 'sil2100' Zemczak ]
* FTBFS after python2.7 upgrade - missing pyconfig.h (LP: #1088996)
[ Automatic PS uploader ]
* Automatic snapshot from revision 3554

3535. By Brandon Schaefer

* No need to draw if you're transparent

3534. By Brandon Schaefer

* Adds window preview (ish) animation.
* Adds 2 options to ccsm, one is draw duration and enabling window preview

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/grid/grid.xml.in'
2--- plugins/grid/grid.xml.in 2012-10-15 10:31:51 +0000
3+++ plugins/grid/grid.xml.in 2013-01-12 01:36:20 +0000
4@@ -539,6 +539,18 @@
5 <_long>Draw Window Resize Indicator</_long>
6 <default>true</default>
7 </option>
8+ <option name="draw_preview" type="bool">
9+ <_short>Draw Window Preview</_short>
10+ <_long>Draw window preview where the window will be resized</_long>
11+ <default>true</default>
12+ </option>
13+ <option name="draw_duration" type="int">
14+ <_short>Draw Duration</_short>
15+ <_long>Draw Resize Duration</_long>
16+ <default>350</default>
17+ <min>250</min>
18+ <max>1000</max>
19+ </option>
20 <option name="outline_color" type="color">
21 <_short>Outline Color</_short>
22 <_long>Color of the resize indicator outline</_long>
23
24=== modified file 'plugins/grid/src/grid.cpp'
25--- plugins/grid/src/grid.cpp 2013-01-03 15:43:56 +0000
26+++ plugins/grid/src/grid.cpp 2013-01-12 01:36:20 +0000
27@@ -25,6 +25,7 @@
28 #include <boost/bind.hpp>
29 #include "grid.h"
30 #include "grabhandler.h"
31+#include "math.h"
32
33 using namespace GridWindowType;
34 namespace cgw = compiz::grid::window;
35@@ -289,7 +290,7 @@
36 currentRect.x () == desiredRect.x ()) ||
37 (gw->resizeCount < 1) || (gw->resizeCount > 5))
38 gw->resizeCount = 1;
39-
40+
41 switch (gw->resizeCount)
42 {
43 case 1:
44@@ -384,11 +385,11 @@
45 gw->isGridMaximized = false;
46 }
47
48- int dw = (lastBorder.left + lastBorder.right) -
49+ int dw = (lastBorder.left + lastBorder.right) -
50 (gw->window->border ().left +
51 gw->window->border ().right);
52-
53- int dh = (lastBorder.top + lastBorder.bottom) -
54+
55+ int dh = (lastBorder.top + lastBorder.bottom) -
56 (gw->window->border ().top +
57 gw->window->border ().bottom);
58
59@@ -584,6 +585,61 @@
60 glDisable (GL_BLEND);
61 }
62
63+void
64+GridScreen::glPaintWindowPreview (const GLMatrix& transform, CompOutput *output)
65+{
66+ std::vector<Animation>::iterator iter;
67+ GLMatrix wTransform (transform);
68+ GLWindowPaintAttrib wAttrib;
69+ unsigned int mask;
70+
71+ CompWindow *cw = screen->findWindow (CompOption::getIntOptionNamed (o, "window"));
72+
73+ if (!cw)
74+ return;
75+
76+ GLWindow *glWindow = GLWindow::get(cw);
77+
78+ if (!glWindow || glWindow->textures().empty())
79+ return;
80+
81+ wAttrib.opacity = OPAQUE;
82+ wAttrib.brightness = BRIGHT;
83+ wAttrib.saturation = COLOR;
84+
85+ wTransform.toScreenSpace (output, -DEFAULT_Z_CAMERA);
86+
87+ for (iter = animations.begin (); iter != animations.end () && animating; ++iter)
88+ {
89+ Animation& anim = *iter;
90+
91+ if (!anim.fadingOut && anim.timer > 0.0f)
92+ {
93+ mask = glWindow->lastMask ();
94+ mask |= PAINT_WINDOW_TRANSFORMED_MASK;
95+ mask |= PAINT_WINDOW_TRANSLUCENT_MASK;
96+ mask |= PAINT_WINDOW_BLEND_MASK;
97+
98+ int width = cw->width() + cw->border().left + cw->border().right;
99+ int height = cw->height() + cw->border().top + cw->border().bottom;
100+ float scaleX = (float)(anim.currentRect.x2() - anim.currentRect.x1()) / width;
101+ float scaleY = (float)(anim.currentRect.y2() - anim.currentRect.y1()) / height;
102+
103+ float translateX = (anim.currentRect.x1() - cw->x()) + cw->border().left * scaleX;
104+ float translateY = (anim.currentRect.y1() - cw->y()) + cw->border().top * scaleY;
105+
106+ wTransform.translate (cw->x(), cw->y(), 0.0f);
107+ wTransform.scale(scaleX, scaleY, 1.0f);
108+ wTransform.translate (translateX / scaleX - cw->x(), translateY / scaleY - cw->y(), 0.0f);
109+
110+ float curve = powf(25, -anim.progress);
111+ wAttrib.opacity = OPAQUE * curve;
112+
113+ glWindow->glDraw(wTransform, wAttrib, infiniteRegion, mask);
114+ }
115+ }
116+}
117+
118 bool
119 GridScreen::glPaintOutput (const GLScreenPaintAttrib &attrib,
120 const GLMatrix &matrix,
121@@ -597,6 +653,9 @@
122
123 glPaintRectangle (attrib, matrix, output);
124
125+ if (optionGetDrawPreview ())
126+ glPaintWindowPreview(matrix, output);
127+
128 return status;
129 }
130
131@@ -757,7 +816,7 @@
132 lastSlot = desiredSlot;
133
134 if (edge == NoEdge || target == GridUnknown)
135- desiredSlot.setGeometry (0, 0, 0, 0);
136+ desiredSlot.setGeometry (0, 0, 0, 0);
137
138 if (cScreen)
139 cScreen->damageRegion (desiredSlot);
140@@ -1063,7 +1122,7 @@
141 currentRect = CompRect (0, 0, 0, 0);
142 opacity = 0.0f;
143 timer = 0.0f;
144- duration = 250;
145+ duration = optionGetDrawDuration();
146 complete = false;
147 fadingOut = false;
148 }
149@@ -1137,8 +1196,9 @@
150 grabMask (0),
151 pointerBufDx (0),
152 pointerBufDy (0),
153- resizeCount (0),
154- lastTarget (GridUnknown)
155+ resizeCount (0),
156+ lastTarget (GridUnknown),
157+ sizeHintsFlags(0)
158 {
159 WindowInterface::setHandler (window);
160 }
161
162=== modified file 'plugins/grid/src/grid.h'
163--- plugins/grid/src/grid.h 2012-11-05 00:54:07 +0000
164+++ plugins/grid/src/grid.h 2013-01-12 01:36:20 +0000
165@@ -87,7 +87,8 @@
166 TopRight
167 };
168
169-class Animation
170+class Animation :
171+ public GridOptions
172 {
173 public:
174
175@@ -136,6 +137,8 @@
176 void glPaintRectangle (const GLScreenPaintAttrib&,
177 const GLMatrix&, CompOutput *);
178
179+ void glPaintWindowPreview (const GLMatrix&, CompOutput *);
180+
181 bool glPaintOutput (const GLScreenPaintAttrib &,
182 const GLMatrix &, const CompRegion &,
183 CompOutput *, unsigned int);

Subscribers

People subscribed via source and target branches