Merge lp:~smspillaz/compiz-core/compiz-core.place-plugin-use-screen-size-change into lp:compiz-core/0.9.5

Proposed by Sam Spilsbury
Status: Merged
Merged at revision: 2942
Proposed branch: lp:~smspillaz/compiz-core/compiz-core.place-plugin-use-screen-size-change
Merge into: lp:compiz-core/0.9.5
Diff against target: 666 lines (+154/-299)
8 files modified
cmake/CompizPlugin.cmake (+1/-0)
include/core/screen.h (+2/-2)
plugins/place/src/place.cpp (+110/-285)
plugins/place/src/place.h (+26/-4)
plugins/place/src/screen-size-change/src/screen-size-change.cpp (+2/-2)
plugins/place/src/screen-size-change/tests/screen-size-change/src/test-place-screen-size-change.cpp (+2/-0)
src/CMakeLists.txt (+7/-2)
src/screen.cpp (+4/-4)
To merge this branch: bzr merge lp:~smspillaz/compiz-core/compiz-core.place-plugin-use-screen-size-change
Reviewer Review Type Date Requested Status
Alan Griffiths Approve
Review via email: mp+89550@code.launchpad.net

Description of the change

Actually use the screen size change handling codepath in the place plugin

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'cmake/CompizPlugin.cmake'
--- cmake/CompizPlugin.cmake 2012-01-12 06:48:58 +0000
+++ cmake/CompizPlugin.cmake 2012-01-21 17:25:26 +0000
@@ -404,6 +404,7 @@
404 ${${_PLUGIN}_PKG_LIBRARIES}404 ${${_PLUGIN}_PKG_LIBRARIES}
405 ${${_PLUGIN}_LIBRARIES}405 ${${_PLUGIN}_LIBRARIES}
406 ${${_PLUGIN}_MOD_LIBRARIES}406 ${${_PLUGIN}_MOD_LIBRARIES}
407 compiz_core
407 )408 )
408409
409 install (410 install (
410411
=== modified file 'include/core/screen.h'
--- include/core/screen.h 2011-09-19 12:54:22 +0000
+++ include/core/screen.h 2012-01-21 17:25:26 +0000
@@ -330,9 +330,9 @@
330330
331 int outputDeviceForGeometry (const CompWindow::Geometry& gm);331 int outputDeviceForGeometry (const CompWindow::Geometry& gm);
332332
333 CompPoint vp ();333 const CompPoint & vp () const;
334334
335 CompSize vpSize ();335 const CompSize & vpSize () const;
336336
337 int desktopWindowCount ();337 int desktopWindowCount ();
338 unsigned int activeNum () const;338 unsigned int activeNum () const;
339339
=== modified file 'plugins/place/src/place.cpp'
--- plugins/place/src/place.cpp 2011-05-07 17:31:52 +0000
+++ plugins/place/src/place.cpp 2012-01-21 17:25:26 +0000
@@ -45,256 +45,92 @@
45 screen->updateSupportedWmHints ();45 screen->updateSupportedWmHints ();
46}46}
4747
48CompWindowList
49compiz::place::collectStrutWindows (const CompWindowList &all)
50{
51 CompWindowList l;
52
53 foreach (CompWindow *w, all)
54 {
55 if (!w->managed () ||
56 w->overrideRedirect ())
57 continue;
58
59 if (w->struts ())
60 l.push_back (w);
61 }
62
63 return l;
64}
65
66
48void67void
49PlaceScreen::doHandleScreenSizeChange (bool firstPass,68PlaceScreen::doHandleScreenSizeChange (int newWidth,
50 int newWidth,
51 int newHeight)69 int newHeight)
52{70{
53 int vpX, vpY, shiftX, shiftY;
54 CompRect extents;
55 XWindowChanges xwc;
56 CompRect vpRelRect, winRect, workArea;
57 int pivotX, pivotY;
58 unsigned int mask;
59 int curVpOffsetX = screen->vp ().x () * screen->width ();
60 int curVpOffsetY = screen->vp ().y () * screen->height ();
61
62 if (firstPass)
63 mStrutWindowCount = 0;
64 else
65 if (mResChangeFallbackHandle.active ())
66 {
67 mResChangeFallbackHandle.stop ();
68 }
69
70 foreach (CompWindow *w, screen->windows ())71 foreach (CompWindow *w, screen->windows ())
71 {72 {
72 if (!w->managed ())73 if (!w->managed ())
73 continue;74 continue;
7475
75 PLACE_WINDOW (w);
76
77 if (firstPass)
78 {
79 /* count the windows that have struts */
80 if (w->struts ())
81 mStrutWindowCount++;
82
83 /* for maximized/fullscreen windows, keep window coords before
84 * screen resize, as they are sometimes automaticall changed
85 * before the 2nd pass */
86
87 if (w->type () & CompWindowTypeFullscreenMask ||
88 (w->state () & (CompWindowStateMaximizedVertMask |
89 CompWindowStateMaximizedHorzMask)))
90 {
91 pw->mPrevServer.set (w->serverX (), w->serverY ());
92 }
93 }
94
95 if (w->wmType () & (CompWindowTypeDockMask |76 if (w->wmType () & (CompWindowTypeDockMask |
96 CompWindowTypeDesktopMask))77 CompWindowTypeDesktopMask))
97 {78 continue;
98 continue;79
99 }80 PlaceWindow::get (w)->adjustForSize (mPrevSize, CompSize (newWidth, newHeight));
10081 }
101 /* Also in the first pass, we save the rectangle of those windows that82}
102 * don't already have a saved one. So, skip those tat do. */83
10384const compiz::window::Geometry &
104 if (firstPass && pw->mSavedOriginal)85PlaceWindow::getGeometry () const
105 continue;86{
10687 return window->serverGeometry ();
107 winRect = ((CompRect) w->serverGeometry ());88}
10889
10990const CompPoint &
110 pivotX = winRect.x ();91PlaceWindow::getViewport () const
111 pivotY = winRect.y ();92{
11293 return screen->vp ();
113 if (w->type () & CompWindowTypeFullscreenMask ||94}
114 (w->state () & (CompWindowStateMaximizedVertMask |95
115 CompWindowStateMaximizedHorzMask)))96const CompRect &
116 {97PlaceWindow::getWorkarea (const compiz::window::Geometry &g) const
117 if (w->saveMask () & CWX)98{
118 winRect.setX (w->saveWc ().x);99 return screen->getWorkareaForOutput (screen->outputDeviceForGeometry (g));
119100}
120 if (w->saveMask () & CWY)101
121 winRect.setY (w->saveWc ().y);102const compiz::window::extents::Extents &
122103PlaceWindow::getExtents () const
123 if (w->saveMask () & CWWidth)104{
124 winRect.setWidth (w->saveWc ().width);105 return window->border ();
125106}
126 if (w->saveMask () & CWHeight)107
127 winRect.setHeight (w->saveWc ().height);108void
128109PlaceWindow::applyGeometry (compiz::window::Geometry &ng,
129 pivotX = pw->mPrevServer.x ();110 compiz::window::Geometry &og)
130 pivotY = pw->mPrevServer.y ();111{
131 }112 CompRect workArea = screen->getWorkareaForOutput (
132113 screen->outputDeviceForGeometry (og));
133 /* calculate target vp x, y index for window's pivot point */114
134 vpX = pivotX / newWidth;115 XWindowChanges xwc;
135 if (pivotX < 0)116 unsigned int mask = og.changeMask (ng);
136 vpX -= 1;117
137 vpY = pivotY / newHeight;118 xwc.x = ng.x ();
138 if (pivotY < 0)119 xwc.y = ng.y ();
139 vpY -= 1;120 xwc.width = ng.width ();
140121 xwc.height = ng.height ();
141 /* if window's target vp is to the left of the leftmost viewport on that122 xwc.border_width = ng.border ();
142 row, assign its target vp column as 0 (-s->x rel. to current vp) */123
143 if (screen->vp ().x () + vpX < 0)124 window->configureXWindow (mask, &xwc);
144 vpX = -screen->vp ().x ();125
145126 if ((window->actions () & MAXIMIZE_STATE) == MAXIMIZE_STATE &&
146 /* if window's target vp is above the topmost viewport on that column,127 (window->mwmDecor () & (MwmDecorAll | MwmDecorTitle)) &&
147 assign its target vp row as 0 (-s->y rel. to current vp) */128 !(window->state () & CompWindowStateFullscreenMask))
148 if (screen->vp ().y () + vpY < 0)129 {
149 vpY = -screen->vp ().y ();130 if (og.width () >= workArea.width () &&
150131 og.height () >= workArea.height ())
151 if (pw->mSavedOriginal)132 {
152 {133 sendMaximizationRequest ();
153 /* set position/size to saved original rectangle */
154 vpRelRect = pw->mOrigVpRelRect;
155
156 xwc.x = pw->mOrigVpRelRect.x () + vpX * screen->width ();
157 xwc.y = pw->mOrigVpRelRect.y () + vpY * screen->height ();
158 }
159 else
160 {
161 /* set position/size to window's current rectangle
162 (with position relative to target viewport) */
163 vpRelRect.setX (winRect.x () - vpX * mPrevSize.width ());
164 vpRelRect.setY (winRect.y () - vpY * mPrevSize.height ());
165 vpRelRect.setWidth (winRect.width ());
166 vpRelRect.setHeight (winRect.height ());
167
168 xwc.x = winRect.x ();
169 xwc.y = winRect.y ();
170
171 shiftX = vpX * (newWidth - screen->width ());
172 shiftY = vpY * (newWidth - screen->height ());
173
174 /* if coords. relative to viewport are outside new viewport area,
175 shift window left/up so that it falls inside */
176 if (vpRelRect.x () >= screen->width ())
177 shiftX -= vpRelRect.x () - (screen->width () - 1);
178 if (vpRelRect.y () >= screen->height ())
179 shiftY -= vpRelRect.y () - (screen->height () - 1);
180
181 if (shiftX)
182 xwc.x += shiftX;
183
184 if (shiftY)
185 xwc.y += shiftY;
186 }
187
188 mask = CWX | CWY | CWWidth | CWHeight;
189 xwc.width = vpRelRect.width ();
190 xwc.height = vpRelRect.height ();
191
192 /* Handle non-(0,0) current viewport by shifting by curVpOffsetX,Y,
193 and bring window to (0,0) by shifting by minus its vp offset */
194
195 xwc.x += curVpOffsetX - (screen->vp ().x () + vpX) * screen->width ();
196 xwc.y += curVpOffsetY - (screen->vp ().y () + vpY) * screen->height ();
197
198 workArea =
199 pw->doValidateResizeRequest (mask, &xwc, FALSE, FALSE);
200
201 xwc.x -= curVpOffsetX - (screen->vp ().x () + vpX) * screen->width ();
202 xwc.y -= curVpOffsetY - (screen->vp ().y () + vpY) * screen->height ();
203
204 /* Check if the new coordinates are different than current position and
205 size. If not, we can clear the corresponding mask bits. */
206 if (xwc.x == winRect.x ())
207 mask &= ~CWX;
208
209 if (xwc.y == winRect.y ())
210 mask &= ~CWY;
211
212 if (xwc.width == winRect.width ())
213 mask &= ~CWWidth;
214
215 if (xwc.height == winRect.height ())
216 mask &= ~CWHeight;
217
218 if (!pw->mSavedOriginal)
219 {
220 if (mask)
221 {
222 /* save window geometry (relative to viewport) so that it
223 can be restored later */
224 pw->mSavedOriginal = TRUE;
225 pw->mOrigVpRelRect = vpRelRect;
226 }
227 }
228 else if (pw->mOrigVpRelRect.x () + vpX * newWidth == xwc.x &&
229 pw->mOrigVpRelRect.y () + vpY * newHeight == xwc.y &&
230 pw->mOrigVpRelRect.width () == xwc.width &&
231 pw->mOrigVpRelRect.height () == xwc.height)
232 {
233 /* if size and position is back to original, clear saved rect */
234 pw->mSavedOriginal = FALSE;
235 }
236
237 if (firstPass) /* if first pass, don't actually move the window */
238 continue;
239
240 /* for maximized/fullscreen windows, update saved pos/size */
241 if (w->type () & CompWindowTypeFullscreenMask ||
242 (w->state () & (CompWindowStateMaximizedVertMask |
243 CompWindowStateMaximizedHorzMask)))
244 {
245 if (mask & CWX)
246 {
247 w->saveWc ().x = xwc.x;
248 w->saveMask () |= CWX;
249 }
250 if (mask & CWY)
251 {
252 w->saveWc ().y = xwc.y;
253 w->saveMask () |= CWY;
254 }
255 if (mask & CWWidth)
256 {
257 w->saveWc ().width = xwc.width;
258 w->saveMask () |= CWWidth;
259 }
260 if (mask & CWHeight)
261 {
262 w->saveWc ().height = xwc.height;
263 w->saveMask () |= CWHeight;
264 }
265
266 if (w->type () & CompWindowTypeFullscreenMask)
267 {
268 mask |= CWX | CWY | CWWidth | CWHeight;
269 xwc.x = vpX * screen->width ();
270 xwc.y = vpY * screen->height ();
271 xwc.width = screen->width ();
272 xwc.height = screen->height ();
273 }
274 else
275 {
276 if (w->state () & CompWindowStateMaximizedHorzMask)
277 {
278 mask |= CWX | CWWidth;
279 xwc.x = vpX * screen->width () + workArea.x () + w->border ().left;
280 xwc.width = workArea.width () -
281 (2 * w->serverGeometry ().border () +
282 w->border ().left + w->border ().right);
283 }
284 if (w->state () & CompWindowStateMaximizedVertMask)
285 {
286 mask |= CWY | CWHeight;
287 xwc.y = vpY * screen->height () + workArea.y () + w->border ().top;
288 xwc.height = workArea.height () -
289 (2 * w->serverGeometry ().border () +
290 w->border ().top + w->border ().bottom);
291 }
292 }
293 }
294 if (mask)
295 {
296 /* actually move/resize window in directions given by mask */
297 w->configureXWindow (mask, &xwc);
298 }134 }
299 }135 }
300}136}
@@ -304,12 +140,12 @@
304 int height)140 int height)
305{141{
306 /* If countdown is not finished yet (i.e. at least one struct window didn't142 /* If countdown is not finished yet (i.e. at least one struct window didn't
307 * update its struts), reset the count down and do the 2nd pass here */143 * update its struts), reset the count down and move windows around here */
308144
309 if (mStrutWindowCount > 0) /* no windows with struts found */145 if (mStrutWindowCount > 0) /* no windows with struts found */
310 {146 {
311 mStrutWindowCount = 0;147 mStrutWindowCount = 0;
312 doHandleScreenSizeChange (false, width, height);148 doHandleScreenSizeChange (width, height);
313 }149 }
314150
315 return false;151 return false;
@@ -319,45 +155,44 @@
319PlaceScreen::handleScreenSizeChange (int width,155PlaceScreen::handleScreenSizeChange (int width,
320 int height)156 int height)
321{157{
322 CompRect extents;158 if (mPrevSize == CompSize (width, height))
323
324 if (screen->width () == width && screen->height () == height)
325 return;159 return;
326160
327 mPrevSize.setWidth (screen->width ());161 mResChangeFallbackHandle.stop ();
328 mPrevSize.setHeight (screen->height ());162 mStrutWindows = compiz::place::collectStrutWindows (screen->windows ());
329163
330 if (mResChangeFallbackHandle.active ())164 /* Don't wait for strut windows to update if there are none */
331 mResChangeFallbackHandle.stop ();165 if (mStrutWindows.empty ())
332166 doHandleScreenSizeChange (width, height);
333 doHandleScreenSizeChange (true, width, height);
334
335 if (mStrutWindowCount == 0) /* no windows with struts found */
336 {
337 mResChangeFallbackHandle.stop ();
338 /* do the 2nd pass right here instead of handleEvent */
339
340 doHandleScreenSizeChange (false, width, height);
341 }
342 else167 else
343 {168 {
344 mResChangeFallbackHandle.setCallback (169 /* Wait for windows with set struts to update their struts, but
345 boost::bind (&PlaceScreen::handleScreenSizeChangeFallback,170 * if one of them isn't updating them, have a fallback to ignore them */
346 this, width, height));171 mResChangeFallbackHandle.setCallback (
172 boost::bind (&PlaceScreen::handleScreenSizeChangeFallback,
173 this, width, height));
347 mResChangeFallbackHandle.start ();174 mResChangeFallbackHandle.start ();
348 }175 }
176
349}177}
350178
351void179void
352PlaceScreen::handleEvent (XEvent *event)180PlaceScreen::handleEvent (XEvent *event)
353{181{
182 if (event->type == ConfigureNotify &&
183 event->xconfigure.window == screen->root ())
184 {
185 mPrevSize.setWidth (screen->width ());
186 mPrevSize.setHeight (screen->height ());
187 }
188
189 screen->handleEvent (event);
190
354 switch (event->type)191 switch (event->type)
355 {192 {
356 case ConfigureNotify:193 case ConfigureNotify:
357 {194 {
358195 if (event->xconfigure.window == screen->root ())
359 if (event->type == ConfigureNotify &&
360 event->xconfigure.window == screen->root ())
361 {196 {
362 handleScreenSizeChange (event->xconfigure.width,197 handleScreenSizeChange (event->xconfigure.width,
363 event->xconfigure.height);198 event->xconfigure.height);
@@ -373,23 +208,15 @@
373 w = screen->findWindow (event->xproperty.window);208 w = screen->findWindow (event->xproperty.window);
374 if (w)209 if (w)
375 {210 {
211 mStrutWindows.remove (w);
376 /* Only do when handling screen size change.212 /* Only do when handling screen size change.
377 ps->strutWindowCount is 0 at any other time */213 ps->strutWindowCount is 0 at any other time */
378 if (mStrutWindowCount > 0 &&214 if (mStrutWindows.empty ())
379 w->updateStruts ())215 doHandleScreenSizeChange (screen->width (),
380 {216 screen->height ()); /* 2nd pass */
381 mStrutWindowCount--;
382 screen->updateWorkarea ();
383
384 /* if this was the last window with struts */
385 if (!mStrutWindowCount)
386 doHandleScreenSizeChange (false, screen->width (),
387 screen->height ()); /* 2nd pass */
388 }
389 }217 }
390 }218 }
391 }219 }
392 screen->handleEvent (event);
393}220}
394221
395/* sort functions */222/* sort functions */
@@ -441,7 +268,7 @@
441268
442PlaceWindow::PlaceWindow (CompWindow *w) :269PlaceWindow::PlaceWindow (CompWindow *w) :
443 PluginClassHandler<PlaceWindow, CompWindow> (w),270 PluginClassHandler<PlaceWindow, CompWindow> (w),
444 mSavedOriginal (false),271 compiz::place::ScreenSizeChangeObject (w->serverGeometry ()),
445 window (w),272 window (w),
446 ps (PlaceScreen::get (screen))273 ps (PlaceScreen::get (screen))
447{274{
@@ -1689,12 +1516,10 @@
1689 unsigned int state,1516 unsigned int state,
1690 unsigned int mask)1517 unsigned int mask)
1691{1518{
1692 if (mSavedOriginal)1519 /* Don't restore geometry if the user moved the window */
1693 {1520 if (screen->grabExist ("move") ||
1694 if (screen->grabExist ("move") ||1521 screen->grabExist ("resize"))
1695 screen->grabExist ("resize"))1522 unset ();
1696 mSavedOriginal = false;
1697 }
16981523
1699 window->grabNotify (x, y, state, mask);1524 window->grabNotify (x, y, state, mask);
1700}1525}
17011526
=== modified file 'plugins/place/src/place.h'
--- plugins/place/src/place.h 2012-01-18 16:26:45 +0000
+++ plugins/place/src/place.h 2012-01-21 17:25:26 +0000
@@ -30,6 +30,19 @@
30#include <core/pluginclasshandler.h>30#include <core/pluginclasshandler.h>
3131
32#include "place_options.h"32#include "place_options.h"
33#include "screen-size-change.h"
34
35namespace compiz
36{
37
38 namespace place
39 {
40
41 CompWindowList collectStrutWindows (const CompWindowList &allWindows);
42
43 }
44
45}
3346
34class PlaceScreen :47class PlaceScreen :
35 public PluginClassHandler<PlaceScreen, CompScreen>,48 public PluginClassHandler<PlaceScreen, CompScreen>,
@@ -41,7 +54,7 @@
41 ~PlaceScreen ();54 ~PlaceScreen ();
4255
43 void handleEvent (XEvent *event);56 void handleEvent (XEvent *event);
44 void doHandleScreenSizeChange (bool, int, int);57 void doHandleScreenSizeChange (int, int);
45 bool handleScreenSizeChangeFallback (int width, int height);58 bool handleScreenSizeChangeFallback (int width, int height);
46 void handleScreenSizeChange (int width, int height);59 void handleScreenSizeChange (int width, int height);
47 bool getPointerPosition (CompPoint &p);60 bool getPointerPosition (CompPoint &p);
@@ -50,6 +63,7 @@
50 CompSize mPrevSize;63 CompSize mPrevSize;
51 int mStrutWindowCount;64 int mStrutWindowCount;
52 CompTimer mResChangeFallbackHandle;65 CompTimer mResChangeFallbackHandle;
66 CompWindowList mStrutWindows;
53 67
54 Atom fullPlacementAtom;68 Atom fullPlacementAtom;
55};69};
@@ -59,6 +73,7 @@
5973
60class PlaceWindow :74class PlaceWindow :
61 public PluginClassHandler<PlaceWindow, CompWindow>,75 public PluginClassHandler<PlaceWindow, CompWindow>,
76 public compiz::place::ScreenSizeChangeObject,
62 public WindowInterface77 public WindowInterface
63{78{
64 public:79 public:
@@ -76,10 +91,17 @@
76 XWindowChanges *xwc,91 XWindowChanges *xwc,
77 unsigned int source);92 unsigned int source);
78 void grabNotify (int, int, unsigned int, unsigned int); 93 void grabNotify (int, int, unsigned int, unsigned int);
79 bool mSavedOriginal;94
80 CompRect mOrigVpRelRect;
81 CompPoint mPrevServer;95 CompPoint mPrevServer;
82 96
97 protected:
98
99 void applyGeometry (compiz::window::Geometry &ng,
100 compiz::window::Geometry &og);
101 const compiz::window::Geometry & getGeometry () const;
102 const CompPoint & getViewport () const;
103 const CompRect & getWorkarea (const compiz::window::Geometry &g) const;
104 const compiz::window::extents::Extents & getExtents () const;
83105
84 private:106 private:
85 typedef enum {107 typedef enum {
86108
=== modified file 'plugins/place/src/screen-size-change/src/screen-size-change.cpp'
--- plugins/place/src/screen-size-change/src/screen-size-change.cpp 2012-01-20 06:27:10 +0000
+++ plugins/place/src/screen-size-change/src/screen-size-change.cpp 2012-01-21 17:25:26 +0000
@@ -21,6 +21,7 @@
21 */21 */
2222
23#include "screen-size-change.h"23#include "screen-size-change.h"
24#include <stdio.h>
2425
2526
26compiz::place::ScreenSizeChangeObject::ScreenSizeChangeObject (const compiz::window::Geometry &g) :27compiz::place::ScreenSizeChangeObject::ScreenSizeChangeObject (const compiz::window::Geometry &g) :
@@ -43,6 +44,7 @@
43 int curVpOffsetY = getViewport ().y () * newSize.height ();44 int curVpOffsetY = getViewport ().y () * newSize.height ();
4445
45 g = getGeometry ();46 g = getGeometry ();
47 compiz::window::Geometry og (g);
4648
47 pivotX = g.x ();49 pivotX = g.x ();
48 pivotY = g.y ();50 pivotY = g.y ();
@@ -117,8 +119,6 @@
117 g.setY (g.y () + curVpOffsetY - (getViewport ().y () + vpY) * newSize.height ());119 g.setY (g.y () + curVpOffsetY - (getViewport ().y () + vpY) * newSize.height ());
118120
119 unsigned int flags = 0;121 unsigned int flags = 0;
120
121 compiz::window::Geometry og (g);
122 const CompRect &workArea = getWorkarea (g);122 const CompRect &workArea = getWorkarea (g);
123123
124 compiz::place::clampGeometryToWorkArea (g, workArea, getExtents (), flags, newSize);124 compiz::place::clampGeometryToWorkArea (g, workArea, getExtents (), flags, newSize);
125125
=== modified file 'plugins/place/src/screen-size-change/tests/screen-size-change/src/test-place-screen-size-change.cpp'
--- plugins/place/src/screen-size-change/tests/screen-size-change/src/test-place-screen-size-change.cpp 2012-01-20 06:27:10 +0000
+++ plugins/place/src/screen-size-change/tests/screen-size-change/src/test-place-screen-size-change.cpp 2012-01-21 17:25:26 +0000
@@ -89,6 +89,8 @@
89MockScreenSizeChangeObject::applyGeometry (compiz::window::Geometry &n,89MockScreenSizeChangeObject::applyGeometry (compiz::window::Geometry &n,
90 compiz::window::Geometry &o)90 compiz::window::Geometry &o)
91{91{
92 EXPECT_EQ (mCurrentGeometry, o);
93
92 std::cout << "DEBUG: new geometry : " << n.x () << " "94 std::cout << "DEBUG: new geometry : " << n.x () << " "
93 << n.y () << " "95 << n.y () << " "
94 << n.width () << " "96 << n.width () << " "
9597
=== modified file 'src/CMakeLists.txt'
--- src/CMakeLists.txt 2012-01-20 15:42:52 +0000
+++ src/CMakeLists.txt 2012-01-21 17:25:26 +0000
@@ -77,6 +77,7 @@
77link_directories (77link_directories (
78 ${COMPIZ_LINK_DIRS}78 ${COMPIZ_LINK_DIRS}
79 ${CORE_MOD_LIBRARY_DIRS}79 ${CORE_MOD_LIBRARY_DIRS}
80 ${libdir}
80)81)
8182
82add_library (compiz_core SHARED83add_library (compiz_core SHARED
@@ -144,10 +145,14 @@
144145
145install (146install (
146 TARGETS compiz_core147 TARGETS compiz_core
148 LIBRARY DESTINATION ${COMPIZ_DESTDIR}${libdir}
149)
150
151install (
152 TARGETS compiz
147 RUNTIME DESTINATION ${COMPIZ_DESTDIR}${exec_prefix}153 RUNTIME DESTINATION ${COMPIZ_DESTDIR}${exec_prefix}
148 LIBRARY DESTINATION ${COMPIZ_DESTDIR}${libdir}
149 ARCHIVE DESTINATION ${COMPIZ_DESTDIR}${libdir}
150)154)
155
151add_subdirectory(tests)156add_subdirectory(tests)
152157
153enable_coverage_report( TARGETS compiz )158enable_coverage_report( TARGETS compiz )
154159
=== modified file 'src/screen.cpp'
--- src/screen.cpp 2012-01-20 12:59:05 +0000
+++ src/screen.cpp 2012-01-21 17:25:26 +0000
@@ -4180,14 +4180,14 @@
4180 return priv->screenNum;4180 return priv->screenNum;
4181}4181}
41824182
4183CompPoint4183const CompPoint &
4184CompScreen::vp ()4184CompScreen::vp () const
4185{4185{
4186 return priv->vp;4186 return priv->vp;
4187}4187}
41884188
4189CompSize4189const CompSize &
4190CompScreen::vpSize ()4190CompScreen::vpSize () const
4191{4191{
4192 return priv->vpSize;4192 return priv->vpSize;
4193}4193}

Subscribers

People subscribed via source and target branches