Merge lp:~compiz-team/compiz/compiz.expo.fix_1037142 into lp:compiz/0.9.8

Proposed by Sam Spilsbury
Status: Superseded
Proposed branch: lp:~compiz-team/compiz/compiz.expo.fix_1037142
Merge into: lp:compiz/0.9.8
Prerequisite: lp:~compiz-team/compiz/compiz.fix_1053820
Diff against target: 187 lines (+83/-29)
3 files modified
plugins/expo/src/expo.cpp (+0/-26)
src/event.cpp (+3/-3)
src/eventmanagement.h (+80/-0)
To merge this branch: bzr merge lp:~compiz-team/compiz/compiz.expo.fix_1037142
Reviewer Review Type Date Requested Status
Daniel van Vugt Needs Resubmitting
jenkins (community) continuous-integration Needs Fixing
Sam Spilsbury Needs Resubmitting
Review via email: mp+125989@code.launchpad.net

This proposal supersedes a proposal from 2012-09-24.

This proposal has been superseded by a proposal from 2012-09-28.

Commit message

Remove redundant checks in Expo which could cause grid to be triggered in expo. We'd be checking for a condition that could never be true, as we pass noOptions () to expoTerm. Better just to not have that check at all, since its useless in a post 0.8 world.

Description of the change

Remove redundant checks in Expo which could cause grid to be triggered in expo. We'd be checking for a condition that could never be true, as we pass noOptions () to expoTerm. Better just to not have that check at all, since its useless in a post 0.8 world.

Tested by the branch this one depends on.

To post a comment you must log in.
Revision history for this message
jenkins (martin-mrazik+qa) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

CI appears to be 404ing

Revision history for this message
Martin Mrazik (mrazik) wrote : Posted in a previous version of this proposal

> CI appears to be 404ing

Sorry. That is a but that needs to be workarounded every now and then. Should work now. This is the relevant error:

patching file plugins/expo/src/windows_on_viewport/src/windows-on-viewport.cpp
patching file plugins/expo/src/windows_on_viewport/tests/CMakeLists.txt
patching file plugins/expo/src/windows_on_viewport/tests/test-windows-on-viewport.cpp
patching file plugins/expo/src/client-list-generator.h
patching file plugins/expo/src/viewport-member-window.h
Patch 100_expo_layout.patch does not apply (enforce with -f)
dh_quilt_patch: quilt --quiltrc /dev/null push -a || test $? = 2 returned exit code 1
make[1]: *** [override_dh_quilt_patch] Error 1
make[1]: Leaving directory `/tmp/buildd/compiz-0.9.8.2+bzr3377'
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
E: Failed autobuilding of package

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal

Resubmit per the prereq branch.

review: Needs Resubmitting
Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

Actually, it should just be possible to have the fix inside the grid plugin in Q for now and leave the rest for later (which "properly" fixes it). I've split up the branches in this case, and this one is marked resubmit because it depends on the tests.

review: Needs Resubmitting
Revision history for this message
Sam Spilsbury (smspillaz) :
review: Needs Resubmitting
Revision history for this message
jenkins (martin-mrazik+qa) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
jenkins (martin-mrazik+qa) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The prerequisite link points to a superseded branch, which is sure to cause Tarmac/Jenkins confusion.

review: Needs Resubmitting
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

It doesn't matter anyways, we're not having this in the next 3 hours ....

Unmerged revisions

3387. By Sam Spilsbury

Merge lp:~compiz-team/compiz/compiz.fix_1053280

3386. By Sam Spilsbury

Remove redundant checks

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/expo/src/expo.cpp'
2--- plugins/expo/src/expo.cpp 2012-09-05 17:15:39 +0000
3+++ plugins/expo/src/expo.cpp 2012-09-24 11:55:23 +0000
4@@ -46,10 +46,6 @@
5 CompAction::State state,
6 CompOption::Vector& options)
7 {
8- Window xid = CompOption::getIntOptionNamed (options, "root", 0);
9- if (xid != screen->root ())
10- return false;
11-
12 if (expoMode)
13 {
14 dndState = DnDStart;
15@@ -67,10 +63,6 @@
16 CompAction::State state,
17 CompOption::Vector& options)
18 {
19- Window xid = CompOption::getIntOptionNamed (options, "root", 0);
20- if (xid != screen->root ())
21- return false;
22-
23 if (dndState == DnDDuring || dndState == DnDStart)
24 {
25 if (dndWindow)
26@@ -93,10 +85,6 @@
27 CompAction::State state,
28 CompOption::Vector& options)
29 {
30- Window xid = CompOption::getIntOptionNamed (options, "root", 0);
31- if (xid != screen->root ())
32- return false;
33-
34 if (screen->otherGrabExist ("expo", NULL))
35 return false;
36
37@@ -139,10 +127,6 @@
38 CompAction::State state,
39 CompOption::Vector& options)
40 {
41- Window xid = CompOption::getIntOptionNamed (options, "root", 0);
42- if (xid && xid != screen->root ())
43- return false;
44-
45 if (!expoMode)
46 return true;
47
48@@ -175,10 +159,6 @@
49 CompAction::State state,
50 CompOption::Vector& options)
51 {
52- Window xid = CompOption::getIntOptionNamed (options, "root", 0);
53- if (xid != screen->root ())
54- return false;
55-
56 if (!expoMode)
57 return false;
58
59@@ -195,9 +175,6 @@
60 CompOption::Vector& options)
61 {
62 unsigned int newX, newY;
63- Window xid = CompOption::getIntOptionNamed (options, "root", 0);
64- if (xid != screen->root ())
65- return false;
66
67 if (!expoMode)
68 return false;
69@@ -226,9 +203,6 @@
70 CompOption::Vector& options)
71 {
72 int newX, newY;
73- Window xid = CompOption::getIntOptionNamed (options, "root", 0);
74- if (xid != screen->root ())
75- return false;
76
77 if (!expoMode)
78 return false;
79
80=== modified file 'src/event.cpp'
81--- src/event.cpp 2012-09-24 11:55:23 +0000
82+++ src/event.cpp 2012-09-24 11:55:23 +0000
83@@ -111,6 +111,9 @@
84 if (!(option.value ().action ().state () & state))
85 return false;
86
87+ if (!option.value ().action ().active ())
88+ return false;
89+
90 return true;
91 }
92
93@@ -126,9 +129,6 @@
94 if (option.value ().action ().initiate ().empty ())
95 return false;
96
97- if (!option.value ().action ().active ())
98- return false;
99-
100 *action = &option.value ().action ();
101
102 return true;
103
104=== added file 'src/eventmanagement.h'
105--- src/eventmanagement.h 1970-01-01 00:00:00 +0000
106+++ src/eventmanagement.h 2012-09-24 11:55:23 +0000
107@@ -0,0 +1,80 @@
108+/*
109+ * Copyright © 2012 Canonical, Ltd.
110+ *
111+ * Permission to use, copy, modify, distribute, and sell this software
112+ * and its documentation for any purpose is hereby granted without
113+ * fee, provided that the above copyright notice appear in all copies
114+ * and that both that copyright notice and this permission notice
115+ * appear in supporting documentation, and that the name of
116+ * Canonical, Ltd. not be used in advertising or publicity pertaining to
117+ * distribution of the software without specific, written prior permission.
118+ * Canonical, Ltd. makes no representations about the suitability of this
119+ * software for any purpose. It is provided "as is" without express or
120+ * implied warranty.
121+ *
122+ * CANONICAL LTD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
123+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
124+ * NO EVENT SHALL Canonical, Ltd. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
125+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
126+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
127+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
128+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
129+ *
130+ * Author: Sam Spilsbury <sam.spilsbury@canonical.com>
131+ */
132+#ifndef _COMPIZ_EVENT_MANAGEMENT_H
133+#define _COMPIZ_EVENT_MANAGEMENT_H
134+
135+#include <boost/function.hpp>
136+
137+class CompScreenEdge;
138+class CompOption;
139+
140+namespace compiz
141+{
142+ namespace private_screen
143+ {
144+ struct GrabList;
145+ class EventManager;
146+ }
147+
148+ namespace events
149+ {
150+ namespace cps = compiz::private_screen;
151+ typedef std::vector <CompOption> EventArguments;
152+ typedef boost::function <bool (unsigned int, unsigned int)> ActionModsMatchesEventStateFunc;
153+
154+ int
155+ processButtonPressOnEdgeWindow (Window edgeWindow,
156+ Window root,
157+ Window eventWindow,
158+ Window eventRoot,
159+ cps::GrabList &grabList,
160+ const CompScreenEdge *screenEdge);
161+
162+ void
163+ setEventWindowInButtonPressArguments (EventArguments &arguments,
164+ Window eventWindow);
165+
166+ bool
167+ activateButtonPressOnWindowBindingOption (CompOption &option,
168+ unsigned int eventButton,
169+ unsigned int eventState,
170+ cps::EventManager &eventManager,
171+ const ActionModsMatchesEventStateFunc &matchEventState,
172+ EventArguments &arguments);
173+
174+ bool
175+ activateButtonPressOnEdgeBindingOption (CompOption &option,
176+ unsigned int eventButton,
177+ unsigned int eventState,
178+ int edge,
179+ cps::EventManager &eventManager,
180+ const ActionModsMatchesEventStateFunc &matchEventState,
181+ EventArguments &arguments);
182+ }
183+}
184+
185+
186+
187+#endif

Subscribers

People subscribed via source and target branches