summaryrefslogtreecommitdiff
path: root/x11-wm/compiz/files/compiz-kde-4.9.patch
blob: 7b56da95c80528c04653707901168498b512795c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
From 3c6f698c12f455661807c4115feaa73007fc33d1 Mon Sep 17 00:00:00 2001
From: Dennis Kasprzyk <onestone@compiz.org>
Date: Mon, 06 Aug 2012 18:23:17 +0000
Subject: KDE 4.9 support.

Little modification for compatibility with KDE 4.8 patch was added by Sergey Popov

---
diff --git a/kde/window-decorator-kde4/window.cpp b/kde/window-decorator-kde4/window.cpp
index a65f99f..78d1a47 100644
--- a/kde/window-decorator-kde4/window.cpp
+++ b/kde/window-decorator-kde4/window.cpp
@@ -768,6 +768,22 @@ KWD::Window::transparentRect () const
     return QRect ();
 }
 
+KDecorationDefines::WindowOperation
+KWD::Window::buttonToWindowOperation(Qt::MouseButtons button)
+{
+    Options::MouseCommand com = buttonToCommand (button);
+
+    if (com == Options::MouseOperationsMenu)
+	return KDecorationDefines::OperationsOp;
+
+    return KDecorationDefines::NoOp;
+}
+
+
+#endif
+
+#if KDE_IS_VERSION(4,3,90) && !KDE_IS_VERSION(4, 8, 80)
+
 bool
 KWD::Window::isClientGroupActive ()
 {
@@ -837,19 +853,82 @@ KWD::Window::displayClientMenu (int index, const QPoint& pos)
     showWindowMenu (pos);
 }
 
-KDecorationDefines::WindowOperation
-KWD::Window::buttonToWindowOperation(Qt::MouseButtons button)
+#endif
+
+#if KDE_IS_VERSION(4,8,80)
+QString 
+KWD::Window::caption(int idx) const
 {
-    Options::MouseCommand com = buttonToCommand (button);
+    return mName;
+}
 
-    if (com == Options::MouseOperationsMenu)
-	return KDecorationDefines::OperationsOp;
+void
+KWD::Window::closeTab(long id)
+{
+    closeWindow ();
+}
 
-    return KDecorationDefines::NoOp;
+void
+KWD::Window::closeTabGroup()
+{
+    closeWindow ();
+}
+
+long
+KWD::Window::currentTabId() const
+{
+     return (long) mClientId;
+}
+
+QIcon
+KWD::Window::icon(int idx) const
+{
+    QIcon icon (mIcon);
+    icon.addPixmap (mMiniIcon);
+    return icon;
+}
+
+void
+KWD::Window::setCurrentTab(long id)
+{
+}
+
+void
+KWD::Window::showWindowMenu(const QPoint& pos, long id)
+{
+  showWindowMenu (pos);
+}
+
+void
+KWD::Window::tab_A_before_B(long A, long B)
+{
+}
+
+void
+KWD::Window::tab_A_behind_B(long A, long B)
+{
+}
+
+int
+KWD::Window::tabCount() const
+{
+    return 1;
+}
+
+long
+KWD::Window::tabId(int idx) const
+{
+    return (long) mClientId;
+}
+
+void
+KWD::Window::untab(long id, const QRect& newGeom)
+{
 }
 
 #endif
 
+
 void
 KWD::Window::createDecoration (void)
 {
@@ -987,14 +1066,14 @@ KWD::Window::updateBlurProperty (int topOffset,
 				 int leftOffset,
 				 int rightOffset)
 {
-    Atom    atom = Atoms::compizWindowBlurDecor;
-    QRegion topQRegion, bottomQRegion, leftQRegion, rightQRegion;
-    ::Region  topRegion = NULL;
-    ::Region  bottomRegion = NULL;
-    ::Region  leftRegion = NULL;
-    ::Region  rightRegion = NULL;
-    int     size = 0;
-    int     w, h;
+    Atom      atom = Atoms::compizWindowBlurDecor;
+    QRegion   topQRegion, bottomQRegion, leftQRegion, rightQRegion;
+    _XRegion *topRegion = NULL;
+    _XRegion *bottomRegion = NULL;
+    _XRegion *leftRegion = NULL;
+    _XRegion *rightRegion = NULL;
+    int       size = 0;
+    int       w, h;
 
     w = mGeometry.width () + mBorder.left + mBorder.right;
     h = mGeometry.height () + mBorder.top + mBorder.bottom;
diff --git a/kde/window-decorator-kde4/window.h b/kde/window-decorator-kde4/window.h
index c2b274b..1ddfbd1 100644
--- a/kde/window-decorator-kde4/window.h
+++ b/kde/window-decorator-kde4/window.h
@@ -114,7 +114,10 @@ class Window: public QObject, public KDecorationBridgeUnstable {
 	virtual bool compositingActive () const;
 #if KDE_IS_VERSION(4,3,90)
 	virtual QRect transparentRect () const;
-
+	virtual WindowOperation
+	    buttonToWindowOperation(Qt::MouseButtons button);
+#endif
+#if KDE_IS_VERSION(4,3,90) && !KDE_IS_VERSION(4, 8, 80)
 	virtual bool isClientGroupActive ();
 	virtual QList<ClientGroupItem> clientGroupItems () const;
 	virtual long itemId (int index);
@@ -126,10 +129,27 @@ class Window: public QObject, public KDecorationBridgeUnstable {
 	virtual void closeClientGroupItem (int index);
 	virtual void closeAllInClientGroup ();
 	virtual void displayClientMenu (int index, const QPoint& pos);
-
-	virtual WindowOperation
-	    buttonToWindowOperation(Qt::MouseButtons button);
+	
+#endif
+#if KDE_IS_VERSION(4,8,80)
+	using KDecorationBridge::caption;
+	virtual QString caption(int idx) const;
+	virtual void closeTab(long id);
+	virtual void closeTabGroup();
+	virtual long currentTabId() const;
+	using KDecorationBridge::icon;
+	virtual QIcon icon(int idx) const;
+	virtual void setCurrentTab(long id);
+	using KDecorationBridge::showWindowMenu;
+	virtual void showWindowMenu(const QPoint& pos, long id);
+	virtual void tab_A_before_B(long A, long B);
+	virtual void tab_A_behind_B(long A, long B);
+	virtual int tabCount() const;
+	virtual long tabId(int idx) const;
+	virtual void untab(long id, const QRect& newGeom);
 #endif
+	
+
 	virtual bool eventFilter (QObject* o, QEvent* e);
 
 	void handleActiveChange (void);
--
cgit v0.8.3.1-30-gff3a