Merge lp:~canonical-dx-team/unity/unity.paint_under_fullscreen into lp:unity

Proposed by Sam Spilsbury
Status: Rejected
Rejected by: Alex Launi
Proposed branch: lp:~canonical-dx-team/unity/unity.paint_under_fullscreen
Merge into: lp:unity
Diff against target: 70 lines (+15/-15)
1 file modified
src/unityshell.cpp (+15/-15)
To merge this branch: bzr merge lp:~canonical-dx-team/unity/unity.paint_under_fullscreen
Reviewer Review Type Date Requested Status
Mirco Müller (community) Disapprove
Review via email: mp+45286@code.launchpad.net

Description of the change

Paints unity under fullscreen windows if there are any

To post a comment you must log in.
Revision history for this message
Mirco Müller (macslow) wrote :

According to Sam this is not yet fully what they want to do, so it'll be left alone until he addresses the issue again from a different angle.

Revision history for this message
Mirco Müller (macslow) wrote :

The new work on this issue will be put in a new branch, so this is marked as "disapprove" to avoid others to waste time on trying to review it.

review: Disapprove

Unmerged revisions

730. By Sam Spilsbury

We have removed our own windows from the paint list - we can no longer
rely on them for paint order, so just paint underneath fullscreen windows
(since in reality we want to be on top of everything else).

This also cuts back the number of function calls we need - we can just
enable painting on fullscreen windows and nothing else

-------------- This line and the following will be ignored
--------------

modified:
  src/unityshell.cpp

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/unityshell.cpp'
2--- src/unityshell.cpp 2011-01-04 13:56:05 +0000
3+++ src/unityshell.cpp 2011-01-05 19:51:58 +0000
4@@ -258,7 +258,7 @@
5 {
6 CompWindowList &pl = _withRemovedNuxWindows = cScreen->getWindowPaintList ();
7 CompWindowList::iterator it = pl.end ();
8- const std::list <Window> &xwns = nux::XInputWindow::NativeHandleList ();
9+ const std::list <Window> &xwns = nux::XInputWindow::NativeHandleList ();
10
11 while (it != pl.begin ())
12 {
13@@ -267,7 +267,7 @@
14 if (std::find (xwns.begin (), xwns.end (), (*it)->id ()) != xwns.end ())
15 {
16 CompWindowList::iterator pit = it;
17- pl.erase (pit);
18+ pl.erase (pit);
19 }
20 }
21
22@@ -289,20 +289,11 @@
23 {
24 if (uScreen->doShellRepaint && uScreen->allowWindowPaint)
25 {
26- const std::list <Window> &xwns = nux::XInputWindow::NativeHandleList ();
27-
28- for (CompWindow *w = window; w && uScreen->doShellRepaint; w = w->prev)
29- {
30- if (std::find (xwns.begin (), xwns.end (), w->id ()) != xwns.end ())
31- {
32- uScreen->paintDisplay (region);
33- }
34- }
35+ /* Windows that are stacked above this one */
36+ uScreen->paintDisplay (region);
37 }
38
39- bool ret = gWindow->glDraw (matrix, attrib, region, mask);
40-
41- return ret;
42+ return gWindow->glDraw (matrix, attrib, region, mask);
43 }
44
45 /* Called whenever a window is mapped, unmapped, minimized etc */
46@@ -317,6 +308,12 @@
47 UnityWindow::stateChangeNotify (unsigned int lastState)
48 {
49 PluginAdapter::Default ()->NotifyStateChange (window, window->state (), lastState);
50+
51+ if (window->state () & CompWindowStateFullscreenMask)
52+ gWindow->glDrawSetEnabled (this, true);
53+ else
54+ gWindow->glDrawSetEnabled (this, false);
55+
56 window->stateChangeNotify (lastState);
57 }
58
59@@ -547,7 +544,10 @@
60 gWindow (GLWindow::get (window))
61 {
62 WindowInterface::setHandler (window);
63- GLWindowInterface::setHandler (gWindow);
64+ GLWindowInterface::setHandler (gWindow, false);
65+
66+ if (window->state () & CompWindowStateFullscreenMask)
67+ gWindow->glDrawSetEnabled (this, true);
68 }
69
70 UnityWindow::~UnityWindow ()