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
=== modified file 'plugins/composite/src/window.cpp'
--- plugins/composite/src/window.cpp 2012-02-01 17:49:07 +0000
+++ plugins/composite/src/window.cpp 2012-02-16 01:59:20 +0000
@@ -268,7 +268,9 @@
268 return;268 return;
269269
270 if (priv->window->shaded () ||270 if (priv->window->shaded () ||
271 (priv->window->isViewable ()))271 (priv->window->isViewable () &&
272 (priv->cWindow->damaged () ||
273 !priv->window->overrideRedirect ())))
272 {274 {
273 int x1, x2, y1, y2;275 int x1, x2, y1, y2;
274276
@@ -339,7 +341,9 @@
339 return;341 return;
340342
341 if (priv->window->shaded () || force ||343 if (priv->window->shaded () || force ||
342 (priv->window->isViewable ()))344 (priv->window->isViewable () &&
345 (priv->cWindow->damaged () ||
346 !priv->window->overrideRedirect ())))
343 {347 {
344 int border = priv->window->geometry ().border ();348 int border = priv->window->geometry ().border ();
345349
@@ -618,7 +622,9 @@
618void622void
619PrivateCompositeWindow::moveNotify (int dx, int dy, bool now)623PrivateCompositeWindow::moveNotify (int dx, int dy, bool now)
620{624{
621 if (window->shaded () || (window->isViewable ()))625 if (window->shaded () || (window->isViewable () &&
626 (cWindow->damaged () ||
627 !window->overrideRedirect ())))
622 {628 {
623 int x, y, x1, x2, y1, y2;629 int x, y, x1, x2, y1, y2;
624630
625631
=== modified file 'plugins/opengl/src/paint.cpp'
--- plugins/opengl/src/paint.cpp 2012-01-30 05:12:24 +0000
+++ plugins/opengl/src/paint.cpp 2012-02-16 01:59:20 +0000
@@ -337,7 +337,9 @@
337337
338 if (!w->shaded ())338 if (!w->shaded ())
339 {339 {
340 if (!w->isViewable ())340 if (!w->isViewable () &&
341 (!CompositeWindow::get (w)->damaged () ||
342 !w->overrideRedirect ()))
341 continue;343 continue;
342 }344 }
343345

Subscribers

People subscribed via source and target branches