[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Re: Review Request: DamageNotify handling
From:       Thomas =?UTF-8?B?TMO8Ymtpbmc=?= <thomas.luebking () web ! de>
Date:       2011-07-10 11:37:35
Message-ID: 20110710133735.5708cb50 () web ! de
[Download RAW message or body]

Am Sun, 10 Jul 2011 08:52:54 -0000
schrieb Martin Gr=C3=A4=C3=9Flin <kde@martin-graesslin.com>:


> Could it be that this change is causing the screen to be black when
> starting kwin till you have the first repaint? It's just that I see
> this behavior since I recompiled today.

damageRatio isn't initialized, so yes "could" (if it was implicitly
1.0" or maybe is hanging over between suspend/resume)

Please try the attached patch (just adds initialisation & copies
damageRatio to deleted windows)

Thomas

[Attachment #3 (text/x-patch)]

diff --git a/kwin/composite.cpp b/kwin/composite.cpp
index 0952872..c29b22f 100644
--- a/kwin/composite.cpp
+++ b/kwin/composite.cpp
@@ -550,6 +550,7 @@ void Toplevel::setupCompositing()
         return;
     damage_handle = XDamageCreate(display(), frameId(), XDamageReportRawRectangles);
     damage_region = QRegion(0, 0, width(), height());
+    damageRatio = 0.0;
     effect_window = new EffectWindowImpl();
     effect_window->setWindow(this);
     unredirect = false;
@@ -570,6 +571,7 @@ void Toplevel::finishCompositing()
     XDamageDestroy(display(), damage_handle);
     damage_handle = None;
     damage_region = QRegion();
+    damageRatio = 0.0;
     repaints_region = QRegion();
     effect_window = NULL;
 #endif
diff --git a/kwin/toplevel.cpp b/kwin/toplevel.cpp
index c0d3370..5f6080d 100644
--- a/kwin/toplevel.cpp
+++ b/kwin/toplevel.cpp
@@ -41,6 +41,7 @@ Toplevel::Toplevel(Workspace* ws)
 #ifdef HAVE_XDAMAGE
     , damage_handle(None)
 #endif
+    , damageRatio(0.0)
     , is_shape(false)
     , effect_window(NULL)
     , wmClientLeaderWin(0)
@@ -119,6 +120,7 @@ void Toplevel::copyToDeleted(Toplevel* c)
     damage_handle = None;
 #endif
     damage_region = c->damage_region;
+    damageRatio = c->damageRatio;
     repaints_region = c->repaints_region;
     is_shape = c->is_shape;
     effect_window = c->effect_window;


_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic