[compiz] [kde-workspace] kwin/libkdecorations: KDecorationBridge becomes private again

Martin Gräßlin mgraesslin at kde.org
Fri Mar 22 01:18:30 PDT 2013


Git commit c1469413f36d4e4cd9dd49e70bc5d660cf2f3c55 by Martin Gräßlin.
Committed on 17/03/2013 at 12:24.
Pushed by graesslin into branch 'master'.

KDecorationBridge becomes private again

With 4933f08ae49328e36e2654434d28917310882ee5 the KDecorationBridge
interface became public to allow Compiz to easily implement the class.

>From a KWin perspective this change did not make much sense. The Bridge
is meant to be the interface towards KWin. It is an internal interface
and exporting it doesn't change the fact that it is internal.

The change got introduced in a time when it was still common to use
Compiz in the kde-workspaces. This has changed. None of the top ten
distributions on distrowatch are shipping the integration parts of Compiz
in an up to date version. Most distros are still on Compiz 0.8, which
requires manual patching to keep up with changes in the decoration API.
Distros on Compiz 0.9 are not shipping the KDE integration - this
includes Ubuntu.

Given this development it is no longer justified to have additional work
on KWin side and because of that the API which should be internal is
marked as internal again.

In case Compiz is still interested in providing the kde-window-decorator
the header file can easily be pulled from our repository. In addition
this patch includes a method
int decoration_bridge_version()
which returns the current bridge API version. Kde-window-decorator can
resolve this method and verify that the version is not higher than what
is supported. The version number is provided in kdecoration.h by the
define KWIN_DECORATION_BRIDGE_API_VERSION. We will increate the version
number once per release in case the bridge changed. 4.11 will have the
version number 1.

This change in behavior has been discussed and agreed in [1].

The change also unexports KDecorationBridgeUnstable. This class should
have never been exported, it was incorrect and the parent class had not
been exported anyway. This is just a note to indicate that it is not an
ABI break and there is no reason to increase the so number.

[1] http://lists.kde.org/?l=kwin&m=136335502805911&w=2

CCMAIL: compiz at lists.freedesktop.org
CCMAIL: dev at lists.compiz.org

REVIEW: 109536

M  +0    -1    kwin/libkdecorations/CMakeLists.txt
M  +9    -0    kwin/libkdecorations/kdecoration.cpp
M  +5    -0    kwin/libkdecorations/kdecoration.h
M  +1    -9    kwin/libkdecorations/kdecorationbridge.h

http://commits.kde.org/kde-workspace/c1469413f36d4e4cd9dd49e70bc5d660cf2f3c55

diff --git a/kwin/libkdecorations/CMakeLists.txt b/kwin/libkdecorations/CMakeLists.txt
index aae3c8b..4fa03bc 100644
--- a/kwin/libkdecorations/CMakeLists.txt
+++ b/kwin/libkdecorations/CMakeLists.txt
@@ -24,5 +24,4 @@ install( FILES
     kdecoration.h
     kdecorationfactory.h
     kcommondecoration.h
-    kdecorationbridge.h
     DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel )
diff --git a/kwin/libkdecorations/kdecoration.cpp b/kwin/libkdecorations/kdecoration.cpp
index 7ccbdb6..780842e 100644
--- a/kwin/libkdecorations/kdecoration.cpp
+++ b/kwin/libkdecorations/kdecoration.cpp
@@ -658,4 +658,13 @@ void KDecorationOptions::setTitleButtonsRight(const QString& b)
     d->title_buttons_right = b;
 }
 
+extern "C" {
+
+int decoration_bridge_version()
+{
+    return KWIN_DECORATION_BRIDGE_API_VERSION;
+}
+
+}
+
 #include "kdecoration.moc"
diff --git a/kwin/libkdecorations/kdecoration.h b/kwin/libkdecorations/kdecoration.h
index 15d233e..0959e74 100644
--- a/kwin/libkdecorations/kdecoration.h
+++ b/kwin/libkdecorations/kdecoration.h
@@ -47,6 +47,11 @@ DEALINGS IN THE SOFTWARE.
         KWIN_EXPORT int decoration_version() { return KWIN_DECORATION_API_VERSION; } \
     }
 
+#define KWIN_DECORATION_BRIDGE_API_VERSION 1
+extern "C" {
+    int decoration_bridge_version();
+}
+
 class KConfig;
 
 /** @defgroup kdecoration KWin decorations library */
diff --git a/kwin/libkdecorations/kdecorationbridge.h b/kwin/libkdecorations/kdecorationbridge.h
index 7e1f264..a050e55 100644
--- a/kwin/libkdecorations/kdecorationbridge.h
+++ b/kwin/libkdecorations/kdecorationbridge.h
@@ -28,18 +28,12 @@ DEALINGS IN THE SOFTWARE.
 #include "kdecoration.h"
 #include <QWidget>
 
-/** @addtogroup kdecoration */
-/** @{ */
-
 /**
  * @short Bridge class for communicating between decorations and KWin core.
  *
  * This class allows communication between decorations and KWin core while allowing
  * to keep binary compatibility. Decorations do not need to use it directly at all.
  */
-// This class is supposed to keep binary compatibility, just like KDecoration.
-// Extending should be done the same way, i.e. inheriting KDecorationBridge2 from it
-// and adding new functionality there.
 class KDecorationBridge : public KDecorationDefines
 {
 public:
@@ -91,7 +85,7 @@ public:
     virtual void grabXServer(bool grab) = 0;
 };
 
-class KWIN_EXPORT KDecorationBridgeUnstable
+class KDecorationBridgeUnstable
     : public KDecorationBridge
 {
 public:
@@ -117,6 +111,4 @@ public:
     virtual WindowOperation buttonToWindowOperation(Qt::MouseButtons button) = 0;
 };
 
-/** @} */
-
 #endif


More information about the compiz mailing list