Merge lp:~smspillaz/compiz-core/compiz-core.maybe_fix_931473 into lp:compiz-core

Proposed by Tim Penhey on 2012-02-16
Status: Rejected
Rejected by: Sam Spilsbury on 2012-02-20
Proposed branch: lp:~smspillaz/compiz-core/compiz-core.maybe_fix_931473
Merge into: lp:compiz-core
Diff against target: 50 lines (+12/-4)
2 files modified
plugins/composite/src/window.cpp (+9/-3)
plugins/opengl/src/paint.cpp (+3/-1)
To merge this branch: bzr merge lp:~smspillaz/compiz-core/compiz-core.maybe_fix_931473
Reviewer Review Type Date Requested Status
Alan Griffiths 2012-02-16 Approve on 2012-02-16
Review via email: mp+93324@code.launchpad.net

Description of the change

Initially we only allowed windows to paint if they had been drawn on at least once, in order to prevent a race condition where the frame would be imperfect before the window draws. However, considering that drawing the decorations is tied in with the concept of drawing the window, if the application failed to draw on its window at all you'd get a big invisible block which blocked all input. So we made it so that the decorations should be drawn but not the window in that case.

There's probably a case where a window can be drawn without being fully damaged, and this tends to happen on override redirect windows like menus. So don't draw their (shadows) until the menu is painted by the application.

To post a comment you must log in.
Alan Griffiths (alan-griffiths) wrote :

(priv->window->isViewable () &&
(priv->cWindow->damaged () ||
!priv->window->overrideRedirect ())))

==>

bool PrivateWindow::hasViewableDamage()
{
    return
        (window->isViewable () &&
        (cWindow->damaged () ||
        !window->overrideRedirect ())));
}

Alan Griffiths (alan-griffiths) wrote :

Doesn't seem to do any harm.

review: Approve
Tim Penhey (thumper) wrote :

Apparently this patch made it worse. Chatting with didrocks.

Unmerged revisions

2999. By Sam Spilsbury on 2012-02-15

Only show the decorations of windows which aren't override redirect.

(LP #931473)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/composite/src/window.cpp'
2--- plugins/composite/src/window.cpp 2012-02-01 17:49:07 +0000
3+++ plugins/composite/src/window.cpp 2012-02-16 01:59:20 +0000
4@@ -268,7 +268,9 @@
5 return;
6
7 if (priv->window->shaded () ||
8- (priv->window->isViewable ()))
9+ (priv->window->isViewable () &&
10+ (priv->cWindow->damaged () ||
11+ !priv->window->overrideRedirect ())))
12 {
13 int x1, x2, y1, y2;
14
15@@ -339,7 +341,9 @@
16 return;
17
18 if (priv->window->shaded () || force ||
19- (priv->window->isViewable ()))
20+ (priv->window->isViewable () &&
21+ (priv->cWindow->damaged () ||
22+ !priv->window->overrideRedirect ())))
23 {
24 int border = priv->window->geometry ().border ();
25
26@@ -618,7 +622,9 @@
27 void
28 PrivateCompositeWindow::moveNotify (int dx, int dy, bool now)
29 {
30- if (window->shaded () || (window->isViewable ()))
31+ if (window->shaded () || (window->isViewable () &&
32+ (cWindow->damaged () ||
33+ !window->overrideRedirect ())))
34 {
35 int x, y, x1, x2, y1, y2;
36
37
38=== modified file 'plugins/opengl/src/paint.cpp'
39--- plugins/opengl/src/paint.cpp 2012-01-30 05:12:24 +0000
40+++ plugins/opengl/src/paint.cpp 2012-02-16 01:59:20 +0000
41@@ -337,7 +337,9 @@
42
43 if (!w->shaded ())
44 {
45- if (!w->isViewable ())
46+ if (!w->isViewable () &&
47+ (!CompositeWindow::get (w)->damaged () ||
48+ !w->overrideRedirect ()))
49 continue;
50 }
51

Subscribers

People subscribed via source and target branches