Merge lp:~compiz-team/compiz-snap-plugin/compiz_snap_plugin.fix_872177 into lp:compiz-snap-plugin

Proposed by Sam Spilsbury on 2011-10-11
Status: Merged
Merged at revision: 61
Proposed branch: lp:~compiz-team/compiz-snap-plugin/compiz_snap_plugin.fix_872177
Merge into: lp:compiz-snap-plugin
Diff against target: 51 lines (+24/-1)
2 files modified
src/snap.cpp (+23/-0)
src/snap.h (+1/-1)
To merge this branch: bzr merge lp:~compiz-team/compiz-snap-plugin/compiz_snap_plugin.fix_872177
Reviewer Review Type Date Requested Status
Jason Smith (community) 2011-10-11 Approve on 2011-10-11
Review via email: mp+78926@code.launchpad.net

Description of the change

To post a comment you must log in.
Jason Smith (jassmith) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/snap.cpp'
2--- src/snap.cpp 2011-10-07 15:32:24 +0000
3+++ src/snap.cpp 2011-10-11 09:11:26 +0000
4@@ -148,12 +148,35 @@
5 /*
6 * Detect visible windows edges
7 */
8+
9+bool
10+SnapWindow::bottomScreenEdgesAllowed ()
11+{
12+ if (grabbed & CompWindowGrabExternalAppMask)
13+ {
14+ CompPlugin *pMove;
15+
16+ pMove = CompPlugin::find ("move");
17+ if (pMove)
18+ {
19+ CompOption::Vector &moveOptions =
20+ pMove->vTable->getOptions ();
21+
22+ return !(CompOption::getBoolOptionNamed (moveOptions,
23+ "constrain_y", true));
24+ }
25+ }
26+
27+ return true;
28+}
29+
30 void
31 SnapWindow::updateWindowsEdges ()
32 {
33 CompRegion edgeRegion, resultRegion;
34 CompRect input;
35 bool remove = false;
36+ bool bottomScreenEdges = bottomScreenEdgesAllowed ();
37
38 // First add all the windows
39 foreach (CompWindow *w, screen->windows ())
40
41=== modified file 'src/snap.h'
42--- src/snap.h 2011-09-29 08:12:59 +0000
43+++ src/snap.h 2011-10-11 09:11:26 +0000
44@@ -133,7 +133,7 @@
45 // internal, avoids infinite notify loops
46 bool skipNotify;
47
48-
49+ bool bottomScreenEdgesAllowed ();
50 void move (int dx, int dy);
51 void resize (int dx, int dy, int dwidth, int dheight);
52

Subscribers

People subscribed via source and target branches

to all changes: