Merge lp:~sil2100/compiz/quickfix_1141079_raring into lp:compiz/raring

Proposed by Łukasz Zemczak
Status: Rejected
Rejected by: Łukasz Zemczak
Proposed branch: lp:~sil2100/compiz/quickfix_1141079_raring
Merge into: lp:compiz/raring
Diff against target: 231 lines (+121/-23)
6 files modified
debian/changelog (+1/-1)
src/event.cpp (+21/-19)
tests/system/xorg-gtest/tests/compiz_xorg_gtest_configure_window.cpp (+82/-0)
tests/xorg-gtest/include/compiz-xorg-gtest.h (+2/-1)
tests/xorg-gtest/plugins/testhelper/src/testhelper.cpp (+1/-0)
tests/xorg-gtest/src/compiz-xorg-gtest.cpp (+14/-2)
To merge this branch: bzr merge lp:~sil2100/compiz/quickfix_1141079_raring
Reviewer Review Type Date Requested Status
Daniel van Vugt Needs Resubmitting
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+153430@code.launchpad.net

Commit message

Remove the override_redirect xcreatewindow event assignment from revision 3606. This fixes the Qt menu regressions (LP: #1141079)

Description of the change

Merge from compiz trunk:
https://code.launchpad.net/~sil2100/compiz/quickfix_1141079/+merge/153427

- Problem:

The fix introduced in revision 3606 triggers a regression with Qt menus. It seems that passing on the override_redirect state from xcreatewindow results in this regression happening. Pop-up menus in Qt apps sometimes are detected as a separate window.

- Fix:

Remove the line that seems to trigger the regression (probably implicitly). Comments needed?

- Tests:

N/A

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Dunno what happened with those tests, might just want to run them again (unless gsettings changed upstream, in which case we need to fix that).

See my main commentary on the main review.

3638. By Łukasz Zemczak

Backport the changes from the lp:compiz branch of the same fix.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please target all fixes to lp:compiz first (0.9.10). And then lp:compiz/0.9.9 (the new raring branch) second.

review: Needs Resubmitting
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Unmerged revisions

3638. By Łukasz Zemczak

Backport the changes from the lp:compiz branch of the same fix.

3637. By Łukasz Zemczak

Remove the override_redirect xcreatewindow event assignment from revision 3606. This fixes the Qt menu regressions (LP: #1141079)

3636. By Sam Spilsbury

Use the actual change in window size to determine if we need to change
  the frame window size, don't just use the difference in frame extents
  to determine that.

  (LP: #1140505). Fixes: https://bugs.launchpad.net/bugs/1140505.

Approved by PS Jenkins bot, Andrea Azzarone.

3635. By Sam Spilsbury

Don't set lastFrameExtents unless the window geometry actually changed - as
that variable only exists to track changes in the actual geometry of
the window and not the apparant frame extents.

Added tests to verify that behaviour.

(LP: #1138517). Fixes: https://bugs.launchpad.net/bugs/1138517.

Approved by PS Jenkins bot, Timo Jyrinki, Andrea Azzarone.

3634. By PS Jenkins bot

Releasing 1:0.9.9~daily13.03.08-0ubuntu1 to ubuntu.

Approved by PS Jenkins bot.

3633. By Brandon Schaefer

Instead of not grabbing all the keys when IgnoreTap is set, add a patch to only not grab Super+P. Allowing part of this bug to say fix (LP:950160), while fixing bugs such as this (LP:1075207). This is only a patch for unity, otherwise it will not cause any problems with trunk compiz. Fixes: https://bugs.launchpad.net/bugs/1075207.

Approved by PS Jenkins bot, Andrea Azzarone.

3632. By PS Jenkins bot

Releasing 1:0.9.9~daily13.03.06-0ubuntu1 to ubuntu.

Approved by PS Jenkins bot.

3631. By Łukasz Zemczak

 Revert revision 3616, as the proposed fix causes serious regressions with Java Swing applications (LP: #1138517). That's no good!. Fixes: https://bugs.launchpad.net/bugs/1138517.

Approved by PS Jenkins bot, Didier Roche.

3630. By PS Jenkins bot

Releasing 1:0.9.9~daily13.03.01-0ubuntu1 to ubuntu.

Approved by PS Jenkins bot.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-03-29 07:23:54 +0000
3+++ debian/changelog 2013-04-02 14:45:27 +0000
4@@ -69,7 +69,7 @@
5
6 -- Automatic PS uploader <ps-jenkins@lists.canonical.com> Fri, 01 Mar 2013 04:02:19 +0000
7
8-compiz (1:0.9.9~daily13.02.28-0ubuntu1) raring; urgency=low
9+compiz (1:0.9.9~daily13.02.28-0ubuntu1~test1) raring; urgency=low
10
11 [ Sam Spilsbury ]
12 * [nvidia] Moving windows freezes and stutters on nvidia (especially
13
14=== modified file 'src/event.cpp'
15--- src/event.cpp 2013-02-10 05:01:50 +0000
16+++ src/event.cpp 2013-04-02 14:45:27 +0000
17@@ -1285,19 +1285,20 @@
18 * the window to the window list as we might get configure requests
19 * which require us to stack other windows relative to it. Setting
20 * some default values if this is the case. */
21- if (!XGetWindowAttributes (privateScreen.dpy, event->xcreatewindow.window, &wa))
22+ if (!XGetWindowAttributes (privateScreen.dpy, event->xcreatewindow.window, &wa)) {
23 privateScreen.setDefaultWindowAttributes (&wa);
24
25- /* That being said, we should store as much information as possible
26- * about it. There may be requests relative to this window that could
27- * use the data in the XCreateWindowEvent structure, especially the
28- * override redirect state */
29- wa.x = event->xcreatewindow.x;
30- wa.y = event->xcreatewindow.y;
31- wa.width = event->xcreatewindow.width;
32- wa.height = event->xcreatewindow.height;
33- wa.border_width = event->xcreatewindow.border_width;
34- wa.override_redirect = event->xcreatewindow.override_redirect;
35+ /* That being said, we should store as much information as possible
36+ * about it. There may be requests relative to this window that could
37+ * use the data in the XCreateWindowEvent structure, especially the
38+ * override redirect state */
39+ wa.x = event->xcreatewindow.x;
40+ wa.y = event->xcreatewindow.y;
41+ wa.width = event->xcreatewindow.width;
42+ wa.height = event->xcreatewindow.height;
43+ wa.border_width = event->xcreatewindow.border_width;
44+ wa.override_redirect = event->xcreatewindow.override_redirect;
45+ }
46
47 foreach (CompWindow *w, screen->windows ())
48 {
49@@ -1475,16 +1476,17 @@
50 * the window to the window list as we might get configure requests
51 * which require us to stack other windows relative to it. Setting
52 * some default values if this is the case. */
53- if (!XGetWindowAttributes (privateScreen.dpy, event->xcreatewindow.window, &wa))
54+ if (!XGetWindowAttributes (privateScreen.dpy, event->xcreatewindow.window, &wa)) {
55 privateScreen.setDefaultWindowAttributes (&wa);
56
57- /* That being said, we should store as much information as possible
58- * about it. There may be requests relative to this window that could
59- * use the data in the XCreateWindowEvent structure, especially the
60- * override redirect state */
61- wa.x = event->xreparent.x;
62- wa.y = event->xreparent.y;
63- wa.override_redirect = event->xreparent.override_redirect;
64+ /* That being said, we should store as much information as possible
65+ * about it. There may be requests relative to this window that could
66+ * use the data in the XCreateWindowEvent structure, especially the
67+ * override redirect state */
68+ wa.x = event->xreparent.x;
69+ wa.y = event->xreparent.y;
70+ wa.override_redirect = event->xreparent.override_redirect;
71+ }
72
73 PrivateWindow::createCompWindow (getTopWindow ()->id (), getTopServerWindow ()->id (), wa, event->xreparent.window);
74 break;
75
76=== modified file 'tests/system/xorg-gtest/tests/compiz_xorg_gtest_configure_window.cpp'
77--- tests/system/xorg-gtest/tests/compiz_xorg_gtest_configure_window.cpp 2013-03-06 13:18:07 +0000
78+++ tests/system/xorg-gtest/tests/compiz_xorg_gtest_configure_window.cpp 2013-04-02 14:45:27 +0000
79@@ -212,6 +212,12 @@
80 bool VerifySetFrameExtentsResponse (Window w, int left, int right, int top, int bottom);
81 bool VerifyWindowSize (Window w, int x, int y, int width, int height);
82
83+ /* Helper function for the Create*WindowOverrideRedirect* tests */
84+ void CreateWithAttrAndTest(int overrideCreate,
85+ bool shouldChangeOverride,
86+ int overrideChange,
87+ bool overrideAssert);
88+
89 protected:
90
91 ReparentedWindow CreateWindow (::Display *);
92@@ -750,3 +756,79 @@
93 currentWidth,
94 currentHeight));
95 }
96+
97+void
98+CompizXorgSystemConfigureWindowTest::CreateWithAttrAndTest(int overrideCreate,
99+ bool shouldChangeOverride,
100+ int overrideChange,
101+ bool overrideAssert)
102+{
103+ ::Display *dpy = Display ();
104+
105+ XGrabServer (dpy);
106+
107+ /* Create window attributes, set override as overrideCreate */
108+ XSetWindowAttributes attr;
109+ attr.override_redirect = overrideCreate;
110+
111+ /* Create a window with our custom attributes */
112+ unsigned int mask = CWOverrideRedirect;
113+ Window w = XCreateWindow (dpy, DefaultRootWindow (dpy),
114+ 0, 0, 100, 100, 0, CopyFromParent,
115+ InputOutput, CopyFromParent, mask,
116+ &attr);
117+
118+ if (shouldChangeOverride)
119+ {
120+ /* If we test the case of a attribute change, we don't destroy the window */
121+ attr.override_redirect = overrideChange;
122+ XChangeWindowAttributes (dpy, w, mask, &attr);
123+ }
124+ else
125+ {
126+ /* ...otherwise, destroy it serwer-side */
127+ XDestroyWindow (dpy, w);
128+ }
129+
130+ XSync (dpy, false);
131+
132+ XUngrabServer (dpy);
133+
134+ XSync (dpy, false);
135+
136+ /* Check if the created window had the attributes passed correctly */
137+ std::vector <long> data = WaitForWindowCreation (w);
138+ EXPECT_EQ (overrideAssert, IsOverrideRedirect (data));
139+
140+ /* In case we didn't do this before, destroy the window now */
141+ if (shouldChangeOverride)
142+ XDestroyWindow (dpy, w);
143+}
144+
145+TEST_F (CompizXorgSystemConfigureWindowTest, CreateDestroyWindowOverrideRedirectTrue)
146+{
147+ /* Create window with override_redirect = 1, destroy the window and check the
148+ * override */
149+ CreateWithAttrAndTest(1, false, 0, true);
150+}
151+
152+TEST_F (CompizXorgSystemConfigureWindowTest, CreateDestroyWindowOverrideRedirectFalse)
153+{
154+ /* Create window with override_redirect = 0, destroy the window and check the
155+ * override */
156+ CreateWithAttrAndTest(0, false, 0, false);
157+}
158+
159+TEST_F (CompizXorgSystemConfigureWindowTest, CreateChangeWindowOverrideRedirectTrue)
160+{
161+ /* Create window with override_redirect = 0, change the attributes after creation
162+ * to override_redirect = 1 and assert the override */
163+ CreateWithAttrAndTest(0, true, 1, true);
164+}
165+
166+TEST_F (CompizXorgSystemConfigureWindowTest, CreateChangeWindowOverrideRedirectFalse)
167+{
168+ /* Create window with override_redirect = 1, change the attributes after creation
169+ * to override_redirect = 0 and assert the override */
170+ CreateWithAttrAndTest(1, true, 0, false);
171+}
172
173=== modified file 'tests/xorg-gtest/include/compiz-xorg-gtest.h'
174--- tests/xorg-gtest/include/compiz-xorg-gtest.h 2013-02-23 10:47:18 +0000
175+++ tests/xorg-gtest/include/compiz-xorg-gtest.h 2013-04-02 14:45:27 +0000
176@@ -214,7 +214,8 @@
177 protected:
178
179 Atom FetchAtom (const char *);
180- void WaitForWindowCreation (Window w);
181+ std::vector <long> WaitForWindowCreation (Window w);
182+ bool IsOverrideRedirect (std::vector <long> &data);
183
184 virtual int GetEventMask ();
185
186
187=== modified file 'tests/xorg-gtest/plugins/testhelper/src/testhelper.cpp'
188--- tests/xorg-gtest/plugins/testhelper/src/testhelper.cpp 2013-02-14 12:12:53 +0000
189+++ tests/xorg-gtest/plugins/testhelper/src/testhelper.cpp 2013-04-02 14:45:27 +0000
190@@ -192,6 +192,7 @@
191
192 std::vector <long> data;
193 data.push_back (static_cast <long> (window->id ()));
194+ data.push_back (static_cast <long> (window->overrideRedirect ()));
195 ct::SendClientMessage (screen->dpy (),
196 ts->fetchAtom (ctm::TEST_HELPER_WINDOW_READY),
197 screen->root (),
198
199=== modified file 'tests/xorg-gtest/src/compiz-xorg-gtest.cpp'
200--- tests/xorg-gtest/src/compiz-xorg-gtest.cpp 2013-02-23 08:23:05 +0000
201+++ tests/xorg-gtest/src/compiz-xorg-gtest.cpp 2013-04-02 14:45:27 +0000
202@@ -738,7 +738,7 @@
203 std::auto_ptr <ct::MessageAtoms> mMessages;
204 };
205
206-void
207+std::vector <long>
208 ct::AutostartCompizXorgSystemTestWithTestHelper::WaitForWindowCreation (Window w)
209 {
210 ::Display *dpy = Display ();
211@@ -758,7 +758,19 @@
212
213 }
214
215- ASSERT_TRUE (requestAcknowledged);
216+ EXPECT_TRUE (requestAcknowledged);
217+
218+ std::vector <long> data;
219+ for (int i = 0; i < 5; ++i)
220+ data.push_back(static_cast <long> (event.xclient.data.l[i]));
221+
222+ return data;
223+}
224+
225+bool
226+ct::AutostartCompizXorgSystemTestWithTestHelper::IsOverrideRedirect (std::vector <long> &data)
227+{
228+ return (data[1] > 0) ? true : false;
229 }
230
231 Atom

Subscribers

People subscribed via source and target branches