Merge lp:~vanvugt/compiz/fix-1041047 into lp:compiz/0.9.8

Proposed by Daniel van Vugt
Status: Merged
Approved by: Sam Spilsbury
Approved revision: 3339
Merged at revision: 3340
Proposed branch: lp:~vanvugt/compiz/fix-1041047
Merge into: lp:compiz/0.9.8
Diff against target: 93 lines (+78/-0)
2 files modified
plugins/opengl/src/paint.cpp (+17/-0)
tests/manual/Unredirect.txt (+61/-0)
To merge this branch: bzr merge lp:~vanvugt/compiz/fix-1041047
Reviewer Review Type Date Requested Status
Sam Spilsbury Approve
jenkins (community) continuous-integration Approve
Review via email: mp+122836@code.launchpad.net

Commit message

Ensure unredirected windows don't stay unredirected if they're no longer
on top. (LP: #1041047)

Description of the change

Ensure unredirected windows don't stay unredirected if they're no longer
on top. (LP: #1041047)

HELP
Still one minor bug: Redirecting an unredirected window (like the menu-opening tests), you see a brief flicker which looks like the previous frame from before the window was unredirected.

Do we need to fix the flicker as part of this one?...

To post a comment you must log in.
Revision history for this message
jenkins (martin-mrazik+qa) wrote :
review: Approve (continuous-integration)
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Looks fine. The flicker can be fixed elsewhere.

I note that autotests are preferable to manual tests in this area, can we spend some time looking into how best we can do that ?

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/opengl/src/paint.cpp'
2--- plugins/opengl/src/paint.cpp 2012-09-05 09:54:30 +0000
3+++ plugins/opengl/src/paint.cpp 2012-09-05 10:23:23 +0000
4@@ -350,6 +350,23 @@
5 {
6 fullscreenWindow = w;
7 }
8+ else
9+ {
10+ CompositeWindow *cw = CompositeWindow::get (w);
11+ if (!cw->redirected ())
12+ {
13+ // 1. GLWindow::release to force gw->priv->needsRebind
14+ gw->release ();
15+
16+ // 2. GLWindow::bind, which redirects the window,
17+ // rebinds the pixmap, and then rebinds the pixmap
18+ // to a texture.
19+ gw->bind ();
20+
21+ // 3. Your window is now redirected again with the
22+ // latest pixmap contents.
23+ }
24+ }
25 }
26 }
27 }
28
29=== added file 'tests/manual/Unredirect.txt'
30--- tests/manual/Unredirect.txt 1970-01-01 00:00:00 +0000
31+++ tests/manual/Unredirect.txt 2012-09-05 10:23:23 +0000
32@@ -0,0 +1,61 @@
33+WINDOW UNREDIRECTION TESTS
34+===========================
35+Daniel van Vugt <daniel.van.vugt@canonical.com>
36+
37+
38+Browser unredirect with context menus
39+-------------------------------------
40+Setup:
41+#. Install Chromium or Chrome browser.
42+
43+Actions:
44+#. Open Chrome/Chromium and hit F11 to go full screen.
45+#. Right click on the web page to open a context menu.
46+#. Left click on the web page to close the context menu.
47+#. Right click on the web page to open a context menu.
48+#. Left click on the web page to close the context menu.
49+#. Press F11 to exit from full screen.
50+
51+Expected Result:
52+ Every time you right-clicked, the context menu should be visible.
53+
54+
55+Video unredirect with window menu
56+---------------------------------
57+Setup:
58+#. Install mplayer.
59+#. Get a video file you can play in mplayer.
60+
61+Actions:
62+#. Open the video in mplayer.
63+#. Hit F to go fullscreen.
64+#. Hit Alt+Space to open the window menu.
65+#. Hit Escape to close the window menu.
66+#. Hit Alt+Space to open the window menu.
67+#. Hit Escape to close the window menu.
68+#. Hit Escape to close the video.
69+
70+Expected Result:
71+ Every time you hit Alt+Space the window menu should have appeared and the
72+ video should still be playing behind it.
73+
74+
75+Video unredirect with transformed screen
76+----------------------------------------
77+Setup:
78+#. Install mplayer.
79+#. Get a video file you can play in mplayer.
80+
81+Actions:
82+#. Open the video in mplayer.
83+#. Hit F to go fullscreen.
84+#. Trigger expo mode (Super+E or mouse to top-left corner)
85+#. Leave expo mode (click on the full screen video)
86+#. Trigger expo mode again.
87+#. Leave expo mode (click on the full screen video)
88+#. Hit Escape to close the video.
89+
90+Expected Result:
91+ Every time you triggered expo mode, expo mode should have become visible and
92+ you should see the video still playing in the expo view.
93+

Subscribers

People subscribed via source and target branches