From cb6e1b73efde8ad936da39421acaa215629462cd Mon Sep 17 00:00:00 2001 From: drago01 Date: Wed, 28 Jan 2009 09:43:55 +0000 Subject: [PATCH] Backport some KDE-4.2 fixes from upstream --- compiz-0.7.8-kde42-crash.patch | 66 ++++++++++++++++++++++++++++++++ compiz-0.7.8-kde42-krunner.patch | 19 +++++++++ compiz.spec | 13 ++++++- 3 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 compiz-0.7.8-kde42-crash.patch create mode 100644 compiz-0.7.8-kde42-krunner.patch diff --git a/compiz-0.7.8-kde42-crash.patch b/compiz-0.7.8-kde42-crash.patch new file mode 100644 index 0000000..00f89e2 --- /dev/null +++ b/compiz-0.7.8-kde42-crash.patch @@ -0,0 +1,66 @@ +Implement KDecorationBridge unstable API, needed for KDE 4.2. +--- + +diff --git a/kde/window-decorator-kde4/window.cpp b/kde/window-decorator-kde4/window.cpp +index d2d362b..68c856b 100644 +--- a/kde/window-decorator-kde4/window.cpp ++++ b/kde/window-decorator-kde4/window.cpp +@@ -764,6 +764,31 @@ KWD::Window::grabXServer (bool) + } + + void ++KWD::Window::repaintShadow (void) ++{ ++} ++ ++bool ++KWD::Window::compositingActive (void) const ++{ ++ return true; ++} ++ ++bool ++KWD::Window::shadowsActive (void) const ++{ ++ /* we are drawing the shadows ourselves, no need for the ++ decoration engine to do so */ ++ return false; ++} ++ ++double ++KWD::Window::opacity (void) const ++{ ++ return 1.0; ++} ++ ++void + KWD::Window::createDecoration (void) + { + KDecoration *decor; +diff --git a/kde/window-decorator-kde4/window.h b/kde/window-decorator-kde4/window.h +index bdf2c47..034e6fe 100644 +--- a/kde/window-decorator-kde4/window.h ++++ b/kde/window-decorator-kde4/window.h +@@ -45,7 +45,7 @@ class QMenu; + + namespace KWD + { +-class Window:public QWidget, public KDecorationBridge { ++class Window:public QWidget, public KDecorationBridgeUnstable { + Q_OBJECT public: + + enum Type +@@ -104,6 +104,12 @@ class Window:public QWidget, public KDecorationBridge { + virtual Qt::WFlags initialWFlags (void) const; + virtual void grabXServer (bool grab); + ++ /* unstable API */ ++ virtual void repaintShadow (); ++ virtual bool compositingActive () const; ++ virtual bool shadowsActive () const; ++ virtual double opacity () const; ++ + void handleActiveChange (void); + void updateFrame (WId frame); + void updateWindowGeometry (void); + diff --git a/compiz-0.7.8-kde42-krunner.patch b/compiz-0.7.8-kde42-krunner.patch new file mode 100644 index 0000000..3de71af --- /dev/null +++ b/compiz-0.7.8-kde42-krunner.patch @@ -0,0 +1,19 @@ +diff --git a/kde/window-decorator-kde4/decorator.cpp b/kde/window-decorator-kde4/decorator.cpp +index 96b818d..0bf4718 100644 +--- a/kde/window-decorator-kde4/decorator.cpp ++++ b/kde/window-decorator-kde4/decorator.cpp +@@ -649,9 +649,10 @@ KWD::Decorator::x11EventFilter (XEvent *xevent) + } + else if (action == Atoms::toolkitActionRunDialogAtom) + { +- QDBusInterface krunner ("org.kde.krunner", "/Interface", +- "org.kde.krunner.Interface"); +- krunner.call ("display", ""); ++ QDBusInterface krunner ("org.kde.krunner", "/App", ++ "org.kde.krunner.App"); ++ if (krunner.isValid ()) ++ krunner.call ("display"); + } + else if (action == Atoms::toolkitActionForceQuitDialogAtom) + { + diff --git a/compiz.spec b/compiz.spec index 67a987c..aa69045 100644 --- a/compiz.spec +++ b/compiz.spec @@ -14,7 +14,7 @@ URL: http://www.go-compiz.org License: GPLv2+ and LGPLv2+ and MIT Group: User Interface/Desktops Version: 0.7.8 -Release: 11%{?dist} +Release: 12%{?dist} Summary: OpenGL window and compositing manager BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -80,6 +80,12 @@ Patch124: compiz-0.7.8-mem-leak-fixes.patch # Make the terminal keybinding work (RH #439665) Patch125: compiz-0.7.8-gnome-terminal.patch +# KDE-4.2 fixes from upstream: +# 814809ffffe47f829b784f7bd246026bfcdecf0f +Patch126: compiz-0.7.8-kde42-crash.patch +# 4cc1d813a9748c3740662233a2add3fe65a4c533 +Patch127: compiz-0.7.8-kde42-krunner.patch + %description Compiz is one of the first OpenGL-accelerated compositing window managers for the X Window System. The integration allows it to perform @@ -164,6 +170,8 @@ touch configure %patch123 -p1 -b .initial-plugins %patch124 -p1 -b .mem-leaks %patch125 -p1 -b .terminal +%patch126 -p1 -b .kde-crash +%patch127 -p1 -b .krunner %build rm -rf $RPM_BUILD_ROOT @@ -380,6 +388,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Jan 28 2009 Adel Gadllah - 0.7.8-12 +- Backport some KDE-4.2 fixes from upstream + * Tue Jan 27 2009 Adel Gadllah - 0.7.8-11 - Make the terminal keybinding work (RH #439665)