[SCM] KDE Base Workspace module packaging branch, wheezy, updated. debian/4.8.4-4-13-gbdce9c0
José Manuel Santamaría Lema
santa-guest at alioth.debian.org
Mon Nov 26 17:03:36 UTC 2012
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-sc/kde-workspace.git;a=commitdiff;h=bdce9c0
The following commit has been merged in the wheezy branch:
commit bdce9c074018fefe9b34bb9b1b769976fc129173
Author: José Manuel Santamaría Lema <panfaust at gmail.com>
Date: Mon Nov 26 17:57:12 2012 +0100
Add upstream_dont-fail-to-render-gtk-menus.diff.
---
debian/changelog | 5 +
debian/patches/series | 1 +
.../upstream_dont-fail-to-render-gtk-menus.diff | 155 ++++++++++++++++++++
3 files changed, 161 insertions(+), 0 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 2c3ede4..25976ec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -28,6 +28,11 @@ kde-workspace (4:4.8.4-5) UNRELEASED; urgency=low
* Fix encoding of Polish (thanks to David Prévot). (Closes: #691953)
* Fix encoding of Spanish (thanks to Camaleón). (Closes: #692209)
+ [ José Manuel Santamaría Lema ]
+ * Backport upstream commit 0b7e46ddd6d3894f246512429b7a03e10fb3f53d to fix a
+ bug which breaks the rendering of gtk menus (you can't see them sometimes);
+ patch upstream_dont-fail-to-render-gtk-menus.diff. (Closes: #690428)
+
-- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Wed, 24 Oct 2012 17:06:28 -0300
kde-workspace (4:4.8.4-4) unstable; urgency=low
diff --git a/debian/patches/series b/debian/patches/series
index 6e2c47b..c26384e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -29,3 +29,4 @@ upstream_Use-cascaded-configs-for-other-modules-as-well.patch
upstream_Fix-the-kwin-KCM-to-read-cascaded-configs.patch
upstream_Make-sure-the-plasma-desktop-scripts-are-sorted-in-t.patch
upstream_Fix-deletion-of-preferred-application-launchers.patch
+upstream_dont-fail-to-render-gtk-menus.diff
diff --git a/debian/patches/upstream_dont-fail-to-render-gtk-menus.diff b/debian/patches/upstream_dont-fail-to-render-gtk-menus.diff
new file mode 100644
index 0000000..b8ca7e8
--- /dev/null
+++ b/debian/patches/upstream_dont-fail-to-render-gtk-menus.diff
@@ -0,0 +1,155 @@
+Author: Thomas Lübking <thomas.luebking at gmail.com>
+Author: José Manuel Santamaría Lema <panfaust at gmail.com>
+Origin: https://projects.kde.org/projects/kde/kde-workspace/repository/revisions/0b7e46ddd6d3894f246512429b7a03e10fb3f53d
+Description: This patch fixes a bug which breaks the rendering of gtk menus
+ This patch is a backport of the upstream commit 0b7e46ddd6d3894f246512429b7a03e10fb3f53d
+ The patch was originally written for the 4.9 branch and needed some changes, this is the
+ message of the upstream commit:
+
+ delay unsynced window ready_for_painting state
+
+ by at max 50ms (and thus trigger a full repaint with the state change)
+
+ BUG: 295254
+ REVIEW: 106173
+ FIXED-IN: 4.9.1
+
+--- a/kwin/client.cpp
++++ b/kwin/client.cpp
+@@ -2158,6 +2158,8 @@ void Client::getSyncCounter()
+ void Client::sendSyncRequest()
+ {
+ #ifdef HAVE_XSYNC
++ delete m_readyForPaintingTimer;
++ m_readyForPaintingTimer = 0;
+ if (syncRequest.counter == None || syncRequest.isPending)
+ return; // do NOT, NEVER send a sync request when there's one on the stack. the clients will just stop respoding. FOREVER! ...
+
+--- a/kwin/composite.cpp
++++ b/kwin/composite.cpp
+@@ -666,12 +666,22 @@ void Client::damageNotifyEvent(XDamageNo
+ if (syncRequest.counter == None) // cannot detect complete redraw, consider done now
+ ready_for_painting = true;
+ #else
+- ready_for_painting = true;
++ if (!ready_for_painting) {
++ ready_for_painting = true;
++ }
+ #endif
+
+ Toplevel::damageNotifyEvent(e);
+ }
+
++void Unmanaged::damageNotifyEvent(XDamageNotifyEvent* e)
++{
++ if (!ready_for_painting) { // avoid "setReadyForPainting()" function calling overhead
++ setReadyForPainting();
++ }
++ Toplevel::damageNotifyEvent(e);
++}
++
+ void Toplevel::addDamage(const QRect& r)
+ {
+ addDamage(r.x(), r.y(), r.width(), r.height());
+--- a/kwin/effects.cpp
++++ b/kwin/effects.cpp
+@@ -379,6 +379,16 @@ void EffectsHandlerImpl::slotClientAdded
+
+ void EffectsHandlerImpl::slotUnmanagedAdded(Unmanaged *u)
+ {
++ if (u->readyForPainting())
++ slotUnmanagedShown(u);
++ else
++ connect(u, SIGNAL(windowShown(KWin::Toplevel*)), SLOT(slotUnmanagedShown(KWin::Toplevel*)));
++}
++
++void EffectsHandlerImpl::slotUnmanagedShown(KWin::Toplevel *t)
++{
++ Q_ASSERT(dynamic_cast<Unmanaged*>(t));
++ Unmanaged *u = static_cast<Unmanaged*>(t);
+ setupUnmanagedConnections(u);
+ emit windowAdded(u->effectWindow());
+ }
+--- a/kwin/effects.h
++++ b/kwin/effects.h
+@@ -183,6 +183,7 @@ protected Q_SLOTS:
+ void slotDesktopChanged(int old);
+ void slotClientAdded(KWin::Client *c);
+ void slotUnmanagedAdded(KWin::Unmanaged *u);
++ void slotUnmanagedShown(KWin::Toplevel*);
+ void slotWindowClosed(KWin::Toplevel *c);
+ void slotClientActivated(KWin::Client *c);
+ void slotDeletedRemoved(KWin::Deleted *d);
+--- a/kwin/toplevel.cpp
++++ b/kwin/toplevel.cpp
+@@ -33,7 +33,7 @@ namespace KWin
+ Toplevel::Toplevel(Workspace* ws)
+ : vis(NULL)
+ , info(NULL)
+- , ready_for_painting(true)
++ , ready_for_painting(false)
+ , client(None)
+ , frame(None)
+ , wspace(ws)
+@@ -45,6 +45,10 @@ Toplevel::Toplevel(Workspace* ws)
+ , unredirect(false)
+ , unredirectSuspend(false)
+ {
++ m_readyForPaintingTimer = new QTimer(this);
++ m_readyForPaintingTimer->setSingleShot(true);
++ connect(m_readyForPaintingTimer, SIGNAL(timeout()), SLOT(setReadyForPainting()));
++ m_readyForPaintingTimer->start(50);
+ }
+
+ Toplevel::~Toplevel()
+@@ -326,6 +330,19 @@ void Toplevel::setOpacity(double new_opa
+ }
+ }
+
++void Toplevel::setReadyForPainting()
++{
++ if (!ready_for_painting) {
++ delete m_readyForPaintingTimer;
++ m_readyForPaintingTimer = 0;
++ ready_for_painting = true;
++ if (compositing()) {
++ addRepaintFull();
++ emit windowShown(this);
++ }
++ }
++}
++
+ void Toplevel::deleteEffectWindow()
+ {
+ delete effect_window;
+--- a/kwin/unmanaged.h
++++ b/kwin/unmanaged.h
+@@ -44,6 +44,7 @@ public:
+ virtual QSize clientSize() const;
+ virtual QRect transparentRect() const;
+ protected:
++ virtual void damageNotifyEvent(XDamageNotifyEvent* e);
+ virtual void debug(QDebug& stream) const;
+ virtual bool shouldUnredirect() const;
+ private:
+--- a/kwin/toplevel.h
++++ b/kwin/toplevel.h
+@@ -168,6 +168,7 @@ signals:
+ void geometryChanged();
+ void geometryShapeChanged(KWin::Toplevel* toplevel, const QRect& old);
+ void windowClosed(KWin::Toplevel* toplevel, KWin::Deleted* deleted);
++ void windowShown(KWin::Toplevel* toplevel);
+
+ protected:
+ virtual ~Toplevel();
+@@ -202,7 +203,10 @@ protected:
+ int bit_depth;
+ NETWinInfo2* info;
+ bool ready_for_painting;
++ QTimer *m_readyForPaintingTimer;
+ QRegion repaints_region; // updating, repaint just requires repaint of that area
++protected slots:
++ void setReadyForPainting();
+ private:
+ static QByteArray staticWindowRole(WId);
+ static QByteArray staticSessionId(WId);
--
KDE Base Workspace module packaging
More information about the pkg-kde-commits
mailing list