pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kwin: build version 5.12.5
Module Name: pkgsrc-wip
Committed By: Mark Davies <mark%ecs.vuw.ac.nz@localhost>
Pushed By: markd
Date: Fri Sep 3 17:11:50 2021 +1200
Changeset: 8f5a238b3b9838907f107e68a793a11e050abf13
Modified Files:
kwin/Makefile
kwin/PLIST
kwin/distinfo
Added Files:
kwin/patches/patch-activation.cpp
kwin/patches/patch-client.cpp
kwin/patches/patch-composite.cpp
kwin/patches/patch-composite.h
kwin/patches/patch-decorations_decoratedclient.cpp
kwin/patches/patch-decorations_decoratedclient.h
kwin/patches/patch-decorations_decorationbridge.cpp
kwin/patches/patch-decorations_decorationbridge.h
kwin/patches/patch-geometry.cpp
kwin/patches/patch-group.cpp
kwin/patches/patch-group.h
kwin/patches/patch-kcmkwin_kwincompositing_CMakeLists.txt
kwin/patches/patch-kcmkwin_kwindecoration_declarative-plugin_previewclient.cpp
kwin/patches/patch-kcmkwin_kwindecoration_declarative-plugin_previewclient.h
kwin/patches/patch-kcmkwin_kwindesktop_CMakeLists.txt
kwin/patches/patch-kcmkwin_kwinscreenedges_CMakeLists.txt
kwin/patches/patch-kcmkwin_kwintabbox_CMakeLists.txt
kwin/patches/patch-netinfo.cpp
kwin/patches/patch-plugins_qpa_integration.cpp
kwin/patches/patch-rules.cpp
kwin/patches/patch-sm.cpp
kwin/patches/patch-toplevel.cpp
kwin/patches/patch-toplevel.h
kwin/patches/patch-unmanaged.cpp
kwin/patches/patch-unmanaged.h
kwin/patches/patch-utils.cpp
Log Message:
kwin: build version 5.12.5
Last version for which libinput and udev were optional.
With some patches pulled from newer versions to build in current environment.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=8f5a238b3b9838907f107e68a793a11e050abf13
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
kwin/Makefile | 39 ++--
kwin/PLIST | 2 +
kwin/distinfo | 34 +++-
kwin/patches/patch-activation.cpp | 33 ++++
kwin/patches/patch-client.cpp | 82 ++++++++
kwin/patches/patch-composite.cpp | 48 +++++
kwin/patches/patch-composite.h | 15 ++
kwin/patches/patch-decorations_decoratedclient.cpp | 104 ++++++++++
kwin/patches/patch-decorations_decoratedclient.h | 78 ++++++++
.../patches/patch-decorations_decorationbridge.cpp | 95 +++++++++
kwin/patches/patch-decorations_decorationbridge.h | 65 ++++++
kwin/patches/patch-geometry.cpp | 218 +++++++++++++++++++++
kwin/patches/patch-group.cpp | 60 ++++++
kwin/patches/patch-group.h | 45 +++++
.../patch-kcmkwin_kwincompositing_CMakeLists.txt | 12 ++
...decoration_declarative-plugin_previewclient.cpp | 71 +++++++
...indecoration_declarative-plugin_previewclient.h | 43 ++++
.../patch-kcmkwin_kwindesktop_CMakeLists.txt | 12 ++
.../patch-kcmkwin_kwinscreenedges_CMakeLists.txt | 12 ++
.../patch-kcmkwin_kwintabbox_CMakeLists.txt | 12 ++
kwin/patches/patch-netinfo.cpp | 34 ++++
kwin/patches/patch-plugins_qpa_integration.cpp | 50 +++++
kwin/patches/patch-rules.cpp | 15 ++
kwin/patches/patch-sm.cpp | 15 ++
kwin/patches/patch-toplevel.cpp | 105 ++++++++++
kwin/patches/patch-toplevel.h | 50 +++++
kwin/patches/patch-unmanaged.cpp | 16 ++
kwin/patches/patch-unmanaged.h | 16 ++
kwin/patches/patch-utils.cpp | 16 ++
29 files changed, 1373 insertions(+), 24 deletions(-)
diffs:
diff --git a/kwin/Makefile b/kwin/Makefile
index 8c5def1618..2e8fac646d 100644
--- a/kwin/Makefile
+++ b/kwin/Makefile
@@ -1,13 +1,13 @@
# $NetBSD: Makefile,v 1.25 2016/01/10 20:01:05 markd Exp $
DISTNAME= kwin-${PLASMAVER}
-PKGREVISION= 1
CATEGORIES= x11
HOMEPAGE= https://www.kde.org/workspaces/plasmadesktop/
COMMENT= KDE Window manager
LICENSE= gnu-gpl-v2 AND gnu-fdl-v1.2
+PLASMAVER= 5.12.5
.include "../../meta-pkgs/kde/plasma5.mk"
BUILD_DEPENDS+= kdoctools>=5.19.0:../../devel/kdoctools
@@ -19,23 +19,24 @@ USE_TOOLS+= msgmerge pkg-config
SUBST_CLASSES+= fix-moc
SUBST_STAGE.fix-moc= post-configure
SUBST_MESSAGE.fix-moc= Cleaning up MOC includes
-SUBST_FILES.fix-moc= _KDE_build/kcmkwin/kwinscripts/CMakeFiles/kcm_kwin_scripts_autogen.dir/AutogenInfo.cmake
-SUBST_FILES.fix-moc+= _KDE_build/kcmkwin/kwincompositing/CMakeFiles/kwincompositing_autogen.dir/AutogenInfo.cmake
-SUBST_FILES.fix-moc+= _KDE_build/kcmkwin/kwinscreenedges/CMakeFiles/kcm_kwinscreenedges_autogen.dir/AutogenInfo.cmake
-SUBST_FILES.fix-moc+= _KDE_build/kcmkwin/kwinscreenedges/CMakeFiles/kcm_kwintouchscreen_autogen.dir/AutogenInfo.cmake
-SUBST_FILES.fix-moc+= _KDE_build/CMakeFiles/kwin_autogen.dir/AutogenInfo.cmake
-SUBST_SED.fix-moc= -e 's,;${PREFIX}/include;,;,g'
-
-#SUBST_CLASSES+= xdg
-#SUBST_STAGE.xdg= pre-configure
-#SUBST_MESSAGE.xdg= Install via examples dir.
-#SUBST_FILES.xdg= data/CMakeLists.txt
-#SUBST_FILES.xdg+= kcmkwin/kwincompositing/CMakeLists.txt
-#SUBST_FILES.xdg+= kcmkwin/kwinscripts/CMakeLists.txt
-#SUBST_FILES.xdg+= kcmkwin/kwintabbox/CMakeLists.txt
-#SUBST_FILES.xdg+= plugins/kdecorations/aurorae/src/CMakeLists.txt
-#SUBST_SED.xdg= -e 's:{KDE_INSTALL_CONFDIR}:{KDE_INSTALL_XDG_EX_DIR}:'
-#SUBST_SED.xdg+= -e 's:{CONFIG_INSTALL_DIR}:{KDE_INSTALL_XDG_EX_DIR}:'
+SUBST_FILES.fix-moc= _KDE_build/*/CMakeFiles/*_autogen.dir/AutogenInfo.json
+SUBST_FILES.fix-moc+= _KDE_build/*/*/CMakeFiles/*_autogen.dir/AutogenInfo.json
+SUBST_FILES.fix-moc+= _KDE_build/*/*/*/CMakeFiles/*_autogen.dir/AutogenInfo.json
+SUBST_FILES.fix-moc+= _KDE_build/plugins/*/*/*/CMakeFiles/*_autogen.dir/AutogenInfo.json
+SUBST_FILES.fix-moc+= _KDE_build/CMakeFiles/*_autogen.dir/AutogenInfo.json
+SUBST_NOOP_OK.fix-moc= yes
+SUBST_SED.fix-moc= -e 's;"${PREFIX}/include",;;g'
+
+SUBST_CLASSES+= xdg
+SUBST_STAGE.xdg= pre-configure
+SUBST_MESSAGE.xdg= Install via examples dir.
+SUBST_FILES.xdg= data/CMakeLists.txt
+SUBST_FILES.xdg+= kcmkwin/kwincompositing/CMakeLists.txt
+SUBST_FILES.xdg+= kcmkwin/kwinscripts/CMakeLists.txt
+SUBST_FILES.xdg+= kcmkwin/kwintabbox/CMakeLists.txt
+SUBST_FILES.xdg+= plugins/kdecorations/aurorae/src/CMakeLists.txt
+SUBST_SED.xdg= -e 's:{KDE_INSTALL_CONFDIR}:{KDE_INSTALL_XDG_EX_DIR}:'
+SUBST_SED.xdg+= -e 's:{CONFIG_INSTALL_DIR}:{KDE_INSTALL_XDG_EX_DIR}:'
MAKE_DIRS+= ${PKG_SYSCONFDIR}/xdg
CONF_FILES+= ${PREFIX}/share/examples/kde-xdg/aurorae.knsrc \
@@ -59,6 +60,4 @@ CONF_FILES+= ${PREFIX}/share/examples/kde-xdg/org_kde_kwin.categories \
.include "../../x11/qt5-qtbase/buildlink3.mk"
.include "../../x11/qt5-qtmultimedia/buildlink3.mk"
.include "../../x11/xcb-util-cursor/buildlink3.mk"
-.include "../../wip/libinput/buildlink3.mk"
-.include "../../wip/libudev/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/kwin/PLIST b/kwin/PLIST
index 9455226ee0..ae92198b7f 100644
--- a/kwin/PLIST
+++ b/kwin/PLIST
@@ -255,6 +255,8 @@ share/doc/HTML/pt_BR/kcontrol/windowbehaviour/index.cache.bz2
share/doc/HTML/pt_BR/kcontrol/windowbehaviour/index.docbook
share/doc/HTML/pt_BR/kcontrol/windowspecific/index.cache.bz2
share/doc/HTML/pt_BR/kcontrol/windowspecific/index.docbook
+share/doc/HTML/ru/kcontrol/desktop/index.cache.bz2
+share/doc/HTML/ru/kcontrol/desktop/index.docbook
share/doc/HTML/ru/kcontrol/kwineffects/index.cache.bz2
share/doc/HTML/ru/kcontrol/kwineffects/index.docbook
share/doc/HTML/ru/kcontrol/kwinscreenedges/index.cache.bz2
diff --git a/kwin/distinfo b/kwin/distinfo
index 961fc40cb8..99842ff39a 100644
--- a/kwin/distinfo
+++ b/kwin/distinfo
@@ -1,6 +1,32 @@
$NetBSD$
-SHA1 (kwin-5.18.5.tar.xz) = 4cb437be4e13971ddeac9c5e2f288603d1a6fe3b
-RMD160 (kwin-5.18.5.tar.xz) = 4e84a664016cbdf95a8bb072a8f246128a9e553a
-SHA512 (kwin-5.18.5.tar.xz) = b703891824ec31e8ae29df27a11499579ab95789a838e893d5904e40aeba27b0ddc04836038d5b4c062d75ceed277d07e67eeb1b4e957ccf414f03786037d562
-Size (kwin-5.18.5.tar.xz) = 6274772 bytes
+SHA1 (kwin-5.12.5.tar.xz) = e5fa367d42f0cfcbecd2f44169d52a428ef1bfc3
+RMD160 (kwin-5.12.5.tar.xz) = d52bdaabc4d1ebc9c0d5efc298f79d0ebfc2e001
+SHA512 (kwin-5.12.5.tar.xz) = 9a99645455f17b14ede45d656a83eb753fcd02c2ed4cca10045db84a75c610ba0732ffacca780805b3f990ab1ada6861f9036588d45c1bf487dbf1ff5bf9ba22
+Size (kwin-5.12.5.tar.xz) = 4981704 bytes
+SHA1 (patch-activation.cpp) = 4a8d4ee99571f4c48697e2d561b000e014a4bcbd
+SHA1 (patch-client.cpp) = 9cffd918463d1188bb8ffac011d10aa6a2b5fe18
+SHA1 (patch-composite.cpp) = 73d9fa94e2550d57c1b97e55ebc6dc536e3dd731
+SHA1 (patch-composite.h) = ddff2d2d28367fc3fbfaafd6b0684d7dd3a3aefc
+SHA1 (patch-decorations_decoratedclient.cpp) = 5ef7f6f600bdb335ea40aa0bb91df1b6502fd35e
+SHA1 (patch-decorations_decoratedclient.h) = f55a3dde85d8662a061a91c727591b63487a2161
+SHA1 (patch-decorations_decorationbridge.cpp) = d67840db736feb77e7d35a608a118e144e967ad7
+SHA1 (patch-decorations_decorationbridge.h) = d9d8c384ea03322064ef5ce3871a2d5064240a9a
+SHA1 (patch-geometry.cpp) = 1898cc385140c273b89a0d2aeb033c439ceee313
+SHA1 (patch-group.cpp) = 3882e35055474065090544fc99b512ade156326b
+SHA1 (patch-group.h) = 9363453feb125adfa46f931c9d76fcc941cbb023
+SHA1 (patch-kcmkwin_kwincompositing_CMakeLists.txt) = 77cf05fc7f9e75b969c746bf2bd051020354b785
+SHA1 (patch-kcmkwin_kwindecoration_declarative-plugin_previewclient.cpp) = 9a2cfc04a55b23e799d6499c5c0a04f0a00fcbfc
+SHA1 (patch-kcmkwin_kwindecoration_declarative-plugin_previewclient.h) = 1bb4d364466f81a6984c9a71a54e31e633cffa38
+SHA1 (patch-kcmkwin_kwindesktop_CMakeLists.txt) = ac855325440b14ea079a87b2ca1d79f69a7602d6
+SHA1 (patch-kcmkwin_kwinscreenedges_CMakeLists.txt) = 39972987c11dee5ebd701d41a2ab22d7ab063e1a
+SHA1 (patch-kcmkwin_kwintabbox_CMakeLists.txt) = 6d031cd693fd6c716b0db4f53cfddd7585655449
+SHA1 (patch-netinfo.cpp) = 2f92d0551397bdf463d3d67a8938b2f989e2e64f
+SHA1 (patch-plugins_qpa_integration.cpp) = d608a858ef9bcb058a63f3c6076da9fadaa43ff3
+SHA1 (patch-rules.cpp) = bf820f25ab638359620cc24e7b1a93db23b66ab2
+SHA1 (patch-sm.cpp) = 72c379ff7f5ab22b94fc3215f4ad921312c47f23
+SHA1 (patch-toplevel.cpp) = 06d9bea17ef488053099383303298e8485aef0e6
+SHA1 (patch-toplevel.h) = 6d0585156e99186310fff7345f1b168e6beba436
+SHA1 (patch-unmanaged.cpp) = 3cdb423f05a5c1dac43709462753ae217dfb089d
+SHA1 (patch-unmanaged.h) = 852d7434d52788e660817fa2ee76667dfc35a3ad
+SHA1 (patch-utils.cpp) = 80326d14aab541258a34f3225e79d0e690799eb5
diff --git a/kwin/patches/patch-activation.cpp b/kwin/patches/patch-activation.cpp
new file mode 100644
index 0000000000..93d8a5f056
--- /dev/null
+++ b/kwin/patches/patch-activation.cpp
@@ -0,0 +1,33 @@
+$NetBSD$
+
+Use XCB wherever possible
+commit a035401b55c55773bfaf5f279929c32977053562
+
+--- activation.cpp.orig 2018-05-01 12:52:19.000000000 +0000
++++ activation.cpp
+@@ -35,7 +35,6 @@ along with this program. If not, see <h
+ #include "activities.h"
+ #endif
+
+-#include <fixx11h.h>
+ #include <kstartupinfo.h>
+ #include <kstringhandler.h>
+ #include <KLocalizedString>
+@@ -633,7 +632,7 @@ bool Workspace::allowClientActivation(co
+ }
+
+ // Low or medium FSP, usertime comparism is possible
+- Time user_time = ac->userTime();
++ const xcb_timestamp_t user_time = ac->userTime();
+ qCDebug(KWIN_CORE) << "Activation, compared:" << c << ":" << time << ":" << user_time
+ << ":" << (NET::timestampCompare(time, user_time) >= 0);
+ return NET::timestampCompare(time, user_time) >= 0; // time >= user_time
+@@ -842,7 +841,7 @@ void Client::startupIdChanged()
+ workspace()->sendClientToDesktop(this, desktop, true);
+ if (asn_data.xinerama() != -1)
+ workspace()->sendClientToScreen(this, asn_data.xinerama());
+- Time timestamp = asn_id.timestamp();
++ const xcb_timestamp_t timestamp = asn_id.timestamp();
+ if (timestamp != 0) {
+ bool activate = workspace()->allowClientActivation(this, timestamp);
+ if (asn_data.desktop() != 0 && !isOnCurrentDesktop())
diff --git a/kwin/patches/patch-client.cpp b/kwin/patches/patch-client.cpp
new file mode 100644
index 0000000000..6f5bbef929
--- /dev/null
+++ b/kwin/patches/patch-client.cpp
@@ -0,0 +1,82 @@
+$NetBSD$
+
+Use XCB wherever possible
+commit a035401b55c55773bfaf5f279929c32977053562
+
+--- client.cpp.orig 2018-05-01 12:52:19.000000000 +0000
++++ client.cpp
+@@ -48,9 +48,7 @@ along with this program. If not, see <h
+ #include <QFile>
+ #include <QMouseEvent>
+ #include <QProcess>
+-// XLib
+-#include <X11/Xutil.h>
+-#include <fixx11h.h>
++// xcb
+ #include <xcb/xcb_icccm.h>
+ // system
+ #include <unistd.h>
+@@ -225,7 +223,7 @@ void Client::releaseWindow(bool on_shutd
+ // Grab X during the release to make removing of properties, setting to withdrawn state
+ // and repareting to root an atomic operation (http://lists.kde.org/?l=kde-devel&m=116448102901184&w=2)
+ grabXServer();
+- exportMappingState(WithdrawnState);
++ exportMappingState(XCB_ICCCM_WM_STATE_WITHDRAWN);
+ setModal(false); // Otherwise its mainwindow wouldn't get focus
+ hidden = true; // So that it's not considered visible anymore (can't use hideClient(), it would set flags)
+ if (!on_shutdown)
+@@ -789,7 +787,7 @@ void Client::setShade(ShadeMode mode)
+ m_wrapper.unmap();
+ m_client.unmap();
+ m_wrapper.selectInput(ClientWinMask | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY);
+- exportMappingState(IconicState);
++ exportMappingState(XCB_ICCCM_WM_STATE_ICONIC);
+ plainResize(s);
+ shade_geometry_change = false;
+ if (was_shade_mode == ShadeHover) {
+@@ -828,7 +826,7 @@ void Client::setShade(ShadeMode mode)
+ }
+ m_wrapper.map();
+ m_client.map();
+- exportMappingState(NormalState);
++ exportMappingState(XCB_ICCCM_WM_STATE_NORMAL);
+ if (isActive())
+ workspace()->requestFocus(this);
+ }
+@@ -917,12 +915,12 @@ void Client::updateVisibility()
+ void Client::exportMappingState(int s)
+ {
+ assert(m_client != XCB_WINDOW_NONE);
+- assert(!deleting || s == WithdrawnState);
+- if (s == WithdrawnState) {
++ assert(!deleting || s == XCB_ICCCM_WM_STATE_WITHDRAWN);
++ if (s == XCB_ICCCM_WM_STATE_WITHDRAWN) {
+ m_client.deleteProperty(atoms->wm_state);
+ return;
+ }
+- assert(s == NormalState || s == IconicState);
++ assert(s == XCB_ICCCM_WM_STATE_NORMAL || s == XCB_ICCCM_WM_STATE_ICONIC);
+
+ int32_t data[2];
+ data[0] = s;
+@@ -994,9 +992,9 @@ void Client::map()
+ m_wrapper.map();
+ m_client.map();
+ m_decoInputExtent.map();
+- exportMappingState(NormalState);
++ exportMappingState(XCB_ICCCM_WM_STATE_NORMAL);
+ } else
+- exportMappingState(IconicState);
++ exportMappingState(XCB_ICCCM_WM_STATE_ICONIC);
+ addLayerRepaint(visibleRect());
+ }
+
+@@ -1017,7 +1015,7 @@ void Client::unmap()
+ m_client.unmap();
+ m_decoInputExtent.unmap();
+ m_wrapper.selectInput(ClientWinMask | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY);
+- exportMappingState(IconicState);
++ exportMappingState(XCB_ICCCM_WM_STATE_ICONIC);
+ }
+
+ /**
diff --git a/kwin/patches/patch-composite.cpp b/kwin/patches/patch-composite.cpp
new file mode 100644
index 0000000000..f126f47945
--- /dev/null
+++ b/kwin/patches/patch-composite.cpp
@@ -0,0 +1,48 @@
+$NetBSD$
+
+Don't destroy DecorationRenderer in setup/finish compositing
+commit 9a68cbd9b110b529021c128ea6650ce6774f462a
+
+--- composite.cpp.orig 2018-05-01 12:52:19.000000000 +0000
++++ composite.cpp
+@@ -199,6 +199,8 @@ void Compositor::slotCompositingOptionsI
+ }
+ }
+
++ emit aboutToToggleCompositing();
++
+ auto supportedCompositors = kwinApp()->platform()->supportedCompositors();
+ const auto userConfigIt = std::find(supportedCompositors.begin(), supportedCompositors.end(), options->compositingMode());
+ if (userConfigIt != supportedCompositors.end()) {
+@@ -370,6 +372,9 @@ void Compositor::finish()
+ return;
+ m_finishing = true;
+ m_releaseSelectionTimer.start();
++
++ emit aboutToToggleCompositing();
++
+ if (Workspace::self()) {
+ foreach (Client * c, Workspace::self()->clientList())
+ m_scene->windowClosed(c, NULL);
+@@ -1185,9 +1190,6 @@ bool Client::setupCompositing()
+ if (!Toplevel::setupCompositing()){
+ return false;
+ }
+- if (isDecorated()) {
+- decoratedClient()->destroyRenderer();
+- }
+ updateVisibility(); // for internalKeep()
+ return true;
+ }
+@@ -1196,11 +1198,6 @@ void Client::finishCompositing(ReleaseRe
+ {
+ Toplevel::finishCompositing(releaseReason);
+ updateVisibility();
+- if (!deleting) {
+- if (isDecorated()) {
+- decoratedClient()->destroyRenderer();
+- }
+- }
+ // for safety in case KWin is just resizing the window
+ resetHaveResizeEffect();
+ }
diff --git a/kwin/patches/patch-composite.h b/kwin/patches/patch-composite.h
new file mode 100644
index 0000000000..1d3597b4e3
--- /dev/null
+++ b/kwin/patches/patch-composite.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Don't destroy DecorationRenderer in setup/finish compositing
+commit 9a68cbd9b110b529021c128ea6650ce6774f462a
+
+--- composite.h.orig 2018-05-01 12:52:19.000000000 +0000
++++ composite.h
+@@ -176,6 +176,7 @@ public Q_SLOTS:
+ Q_SIGNALS:
+ void compositingToggled(bool active);
+ void aboutToDestroy();
++ void aboutToToggleCompositing();
+ void sceneCreated();
+
+ protected:
diff --git a/kwin/patches/patch-decorations_decoratedclient.cpp b/kwin/patches/patch-decorations_decoratedclient.cpp
new file mode 100644
index 0000000000..9830d60943
--- /dev/null
+++ b/kwin/patches/patch-decorations_decoratedclient.cpp
@@ -0,0 +1,104 @@
+$NetBSD$
+
+changes from 5.18.5
+
+--- decorations/decoratedclient.cpp 2018-05-02 00:52:19.000000000 +1200
++++ decorations/decoratedclient.cpp 2020-05-06 02:45:27.000000000 +1200
+@@ -18,6 +18,7 @@
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *********************************************************************/
+ #include "decoratedclient.h"
++#include "decorationbridge.h"
+ #include "decorationpalette.h"
+ #include "decorationrenderer.h"
+ #include "abstract_client.h"
+@@ -31,6 +32,8 @@
+ #include <KDecoration2/Decoration>
+
+ #include <QDebug>
++#include <QStyle>
++#include <QToolTip>
+
+ namespace KWin
+ {
+@@ -64,6 +67,7 @@
+ if (oldSize.height() != m_clientSize.height()) {
+ emit decoratedClient->heightChanged(m_clientSize.height());
+ }
++ emit decoratedClient->sizeChanged(m_clientSize);
+ }
+ );
+ connect(client, &AbstractClient::desktopChanged, this,
+@@ -85,10 +89,9 @@
+ &Decoration::DecoratedClientImpl::signalShadeChange);
+ connect(client, &AbstractClient::keepAboveChanged, decoratedClient, &KDecoration2::DecoratedClient::keepAboveChanged);
+ connect(client, &AbstractClient::keepBelowChanged, decoratedClient, &KDecoration2::DecoratedClient::keepBelowChanged);
++ connect(Compositor::self(), &Compositor::aboutToToggleCompositing, this, &DecoratedClientImpl::destroyRenderer);
+ m_compositorToggledConnection = connect(Compositor::self(), &Compositor::compositingToggled, this,
+ [this, decoration]() {
+- delete m_renderer;
+- m_renderer = nullptr;
+ createRenderer();
+ decoration->update();
+ }
+@@ -113,9 +116,25 @@
+
+ connect(client, &AbstractClient::hasApplicationMenuChanged, decoratedClient, &KDecoration2::DecoratedClient::hasApplicationMenuChanged);
+ connect(client, &AbstractClient::applicationMenuActiveChanged, decoratedClient, &KDecoration2::DecoratedClient::applicationMenuActiveChanged);
++
++ m_toolTipWakeUp.setSingleShot(true);
++ connect(&m_toolTipWakeUp, &QTimer::timeout, this,
++ [this]() {
++ int fallAsleepDelay = QApplication::style()->styleHint(QStyle::SH_ToolTip_FallAsleepDelay);
++ this->m_toolTipFallAsleep.setRemainingTime(fallAsleepDelay);
++
++ QToolTip::showText(Cursor::pos(), this->m_toolTipText);
++ m_toolTipShowing = true;
++ }
++ );
+ }
+
+-DecoratedClientImpl::~DecoratedClientImpl() = default;
++DecoratedClientImpl::~DecoratedClientImpl()
++{
++ if (m_toolTipShowing) {
++ requestHideToolTip();
++ }
++}
+
+ void DecoratedClientImpl::signalShadeChange() {
+ emit decoratedClient()->shadedChanged(m_client->isShade());
+@@ -202,11 +221,21 @@
+
+ void DecoratedClientImpl::requestShowToolTip(const QString &text)
+ {
+- Q_UNUSED(text)
++ if (!DecorationBridge::self()->showToolTips()) {
++ return;
++ }
++
++ m_toolTipText = text;
++
++ int wakeUpDelay = QApplication::style()->styleHint(QStyle::SH_ToolTip_WakeUpDelay);
++ m_toolTipWakeUp.start(m_toolTipFallAsleep.hasExpired() ? wakeUpDelay : 20);
+ }
+
+ void DecoratedClientImpl::requestHideToolTip()
+ {
++ m_toolTipWakeUp.stop();
++ QToolTip::hideText();
++ m_toolTipShowing = false;
+ }
+
+ void DecoratedClientImpl::requestShowWindowMenu()
+@@ -245,5 +274,10 @@
+ return m_clientSize.height();
+ }
+
++QSize DecoratedClientImpl::size() const
++{
++ return m_clientSize;
++}
++
+ bool DecoratedClientImpl::isMaximizedVertically() const
+ {
diff --git a/kwin/patches/patch-decorations_decoratedclient.h b/kwin/patches/patch-decorations_decoratedclient.h
new file mode 100644
index 0000000000..685e1ffe55
--- /dev/null
+++ b/kwin/patches/patch-decorations_decoratedclient.h
@@ -0,0 +1,78 @@
+$NetBSD$
+
+changes from 5.18.5
+
+--- decorations/decoratedclient.h 2018-05-02 00:52:19.000000000 +1200
++++ decorations/decoratedclient.h 2020-05-06 02:45:27.000000000 +1200
+@@ -23,7 +23,9 @@
+
+ #include <KDecoration2/Private/DecoratedClientPrivate>
+
++#include <QDeadlineTimer>
+ #include <QObject>
++#include <QTimer>
+
+ namespace KWin
+ {
+@@ -40,7 +42,7 @@
+ Q_OBJECT
+ public:
+ explicit DecoratedClientImpl(AbstractClient *client, KDecoration2::DecoratedClient *decoratedClient, KDecoration2::Decoration *decoration);
+- virtual ~DecoratedClientImpl();
++ ~DecoratedClientImpl() override;
+ QString caption() const override;
+ WId decorationId() const override;
+ int desktop() const override;
+@@ -64,6 +66,7 @@
+ QPalette palette() const override;
+ QColor color(KDecoration2::ColorGroup group, KDecoration2::ColorRole role) const override;
+ bool providesContextHelp() const override;
++ QSize size() const override;
+ int width() const override;
+ WId windowId() const override;
+
+@@ -72,8 +75,8 @@
+ bool hasApplicationMenu() const override;
+ bool isApplicationMenuActive() const override;
+
+- void requestShowToolTip(const QString &text);
+- void requestHideToolTip();
++ void requestShowToolTip(const QString &text) override;
++ void requestHideToolTip() override;
+ void requestClose() override;
+ void requestContextHelp() override;
+ void requestToggleMaximization(Qt::MouseButtons buttons) override;
+@@ -85,7 +88,7 @@
+ void requestToggleOnAllDesktops() override;
+ void requestToggleShade() override;
+
+- void showApplicationMenu(int actionId);
++ void showApplicationMenu(int actionId) override;
+
+ AbstractClient *client() {
+ return m_client;
+@@ -93,7 +96,6 @@
+ Renderer *renderer() {
+ return m_renderer;
+ }
+- void destroyRenderer();
+ KDecoration2::DecoratedClient *decoratedClient() {
+ return KDecoration2::DecoratedClientPrivate::client();
+ }
+@@ -105,10 +107,16 @@
+
+ private:
+ void createRenderer();
++ void destroyRenderer();
+ AbstractClient *m_client;
+ QSize m_clientSize;
+ Renderer *m_renderer;
+ QMetaObject::Connection m_compositorToggledConnection;
++
++ QString m_toolTipText;
++ QTimer m_toolTipWakeUp;
++ QDeadlineTimer m_toolTipFallAsleep;
++ bool m_toolTipShowing = false;
+ };
+
+ }
diff --git a/kwin/patches/patch-decorations_decorationbridge.cpp b/kwin/patches/patch-decorations_decorationbridge.cpp
new file mode 100644
index 0000000000..4431813036
--- /dev/null
+++ b/kwin/patches/patch-decorations_decorationbridge.cpp
@@ -0,0 +1,95 @@
+$NetBSD$
+
+changes from 5.18.5
+
+--- decorations/decorationbridge.cpp 2018-05-02 00:52:19.000000000 +1200
++++ decorations/decorationbridge.cpp 2020-05-06 02:45:27.000000000 +1200
+@@ -65,9 +65,17 @@
+ : KDecoration2::DecorationBridge(parent)
+ , m_factory(nullptr)
+ , m_blur(false)
++ , m_showToolTips(false)
+ , m_settings()
+ , m_noPlugin(false)
+ {
++ KConfigGroup cg(KSharedConfig::openConfig(), "KDE");
++
++ // try to extract the proper defaults file from a lookandfeel package
++ const QString looknfeel = cg.readEntry(QStringLiteral("LookAndFeelPackage"), "org.kde.breeze.desktop");
++ m_lnfConfig = KSharedConfig::openConfig(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("plasma/look-and-feel/") + looknfeel + QStringLiteral("/contents/defaults")));
++
++ readDecorationOptions();
+ }
+
+ DecorationBridge::~DecorationBridge()
+@@ -75,9 +83,12 @@
+ s_self = nullptr;
+ }
+
+-static QString readPlugin()
++QString DecorationBridge::readPlugin()
+ {
+- return kwinApp()->config()->group(s_pluginName).readEntry("library", s_defaultPlugin);
++ //Try to get a default from look and feel
++ KConfigGroup cg(m_lnfConfig, "kwinrc");
++ cg = KConfigGroup(&cg, "org.kde.kdecoration2");
++ return kwinApp()->config()->group(s_pluginName).readEntry("library", cg.readEntry("library", s_defaultPlugin));
+ }
+
+ static bool readNoPlugin()
+@@ -87,7 +98,15 @@
+
+ QString DecorationBridge::readTheme() const
+ {
+- return kwinApp()->config()->group(s_pluginName).readEntry("theme", m_defaultTheme);
++ //Try to get a default from look and feel
++ KConfigGroup cg(m_lnfConfig, "kwinrc");
++ cg = KConfigGroup(&cg, "org.kde.kdecoration2");
++ return kwinApp()->config()->group(s_pluginName).readEntry("theme", cg.readEntry("theme", m_defaultTheme));
++}
++
++void DecorationBridge::readDecorationOptions()
++{
++ m_showToolTips = kwinApp()->config()->group(s_pluginName).readEntry("ShowToolTips", true);
+ }
+
+ void DecorationBridge::init()
+@@ -145,6 +164,8 @@
+
+ void DecorationBridge::reconfigure()
+ {
++ readDecorationOptions();
++
+ if (m_noPlugin != readNoPlugin()) {
+ m_noPlugin = !m_noPlugin;
+ // no plugin setting changed
+@@ -191,6 +212,7 @@
+ {
+ // reset all settings
+ m_blur = false;
++ m_recommendedBorderSize = QString();
+ m_theme = QString();
+ m_defaultTheme = QString();
+
+@@ -205,7 +227,13 @@
+ if (blurIt != decoSettingsMap.end()) {
+ m_blur = blurIt.value().toBool();
+ }
++ auto recBorderSizeIt = decoSettingsMap.find(QStringLiteral("recommendedBorderSize"));
++ if (recBorderSizeIt != decoSettingsMap.end()) {
++ m_recommendedBorderSize = recBorderSizeIt.value().toString();
++ }
+ findTheme(decoSettingsMap);
++
++ Q_EMIT metaDataLoaded();
+ }
+
+ void DecorationBridge::findTheme(const QVariantMap &map)
+@@ -285,6 +313,7 @@
+ QString b;
+ b.append(QStringLiteral("Plugin: %1\n").arg(m_plugin));
+ b.append(QStringLiteral("Theme: %1\n").arg(m_theme));
++ b.append(QStringLiteral("Plugin recommends border size: %1\n").arg(m_recommendedBorderSize.isNull() ? "No" : m_recommendedBorderSize));
+ b.append(QStringLiteral("Blur: %1\n").arg(m_blur));
+ const QMetaObject *metaOptions = m_settings->metaObject();
+ for (int i=0; i<metaOptions->propertyCount(); ++i) {
diff --git a/kwin/patches/patch-decorations_decorationbridge.h b/kwin/patches/patch-decorations_decorationbridge.h
new file mode 100644
index 0000000000..68c8d11a67
--- /dev/null
+++ b/kwin/patches/patch-decorations_decorationbridge.h
@@ -0,0 +1,65 @@
+$NetBSD$
+
+changes from 5.18.5
+
+--- decorations/decorationbridge.h 2018-05-02 00:52:19.000000000 +1200
++++ decorations/decorationbridge.h 2020-05-06 02:45:27.000000000 +1200
+@@ -24,6 +24,8 @@
+
+ #include <KDecoration2/Private/DecorationBridge>
+
++#include <KSharedConfig>
++
+ #include <QObject>
+ #include <QSharedPointer>
+
+@@ -42,11 +44,11 @@
+ namespace Decoration
+ {
+
+-class DecorationBridge : public KDecoration2::DecorationBridge
++class KWIN_EXPORT DecorationBridge : public KDecoration2::DecorationBridge
+ {
+ Q_OBJECT
+ public:
+- virtual ~DecorationBridge();
++ ~DecorationBridge() override;
+
+ void init();
+ KDecoration2::Decoration *createDecoration(AbstractClient *client);
+@@ -58,6 +60,13 @@
+ bool needsBlur() const {
+ return m_blur;
+ }
++ QString recommendedBorderSize() const {
++ return m_recommendedBorderSize;
++ }
++
++ bool showToolTips() const {
++ return m_showToolTips;
++ }
+
+ void reconfigure();
+
+@@ -67,13 +76,21 @@
+
+ QString supportInformation() const;
+
++Q_SIGNALS:
++ void metaDataLoaded();
++
+ private:
++ QString readPlugin();
+ void loadMetaData(const QJsonObject &object);
+ void findTheme(const QVariantMap &map);
+ void initPlugin();
+ QString readTheme() const;
++ void readDecorationOptions();
+ KPluginFactory *m_factory;
++ KSharedConfig::Ptr m_lnfConfig;
+ bool m_blur;
++ bool m_showToolTips;
++ QString m_recommendedBorderSize;
+ QString m_plugin;
+ QString m_defaultTheme;
+ QString m_theme;
diff --git a/kwin/patches/patch-geometry.cpp b/kwin/patches/patch-geometry.cpp
new file mode 100644
index 0000000000..9ec4dd0036
--- /dev/null
+++ b/kwin/patches/patch-geometry.cpp
@@ -0,0 +1,218 @@
+$NetBSD$
+
+Use XCB wherever possible
+commit a035401b55c55773bfaf5f279929c32977053562
+
+--- geometry.cpp.orig 2018-05-01 12:52:19.000000000 +0000
++++ geometry.cpp
+@@ -1621,47 +1621,47 @@ const QPoint Client::calculateGravitatio
+
+ // dx, dy specify how the client window moves to make space for the frame
+ switch(gravity) {
+- case NorthWestGravity: // move down right
++ case XCB_GRAVITY_NORTH_WEST: // move down right
+ default:
+ dx = borderLeft();
+ dy = borderTop();
+ break;
+- case NorthGravity: // move right
++ case XCB_GRAVITY_NORTH: // move right
+ dx = 0;
+ dy = borderTop();
+ break;
+- case NorthEastGravity: // move down left
++ case XCB_GRAVITY_NORTH_EAST: // move down left
+ dx = -borderRight();
+ dy = borderTop();
+ break;
+- case WestGravity: // move right
++ case XCB_GRAVITY_WEST: // move right
+ dx = borderLeft();
+ dy = 0;
+ break;
+- case CenterGravity:
++ case XCB_GRAVITY_CENTER:
+ break; // will be handled specially
+- case StaticGravity: // don't move
++ case XCB_GRAVITY_STATIC: // don't move
+ dx = 0;
+ dy = 0;
+ break;
+- case EastGravity: // move left
++ case XCB_GRAVITY_EAST: // move left
+ dx = -borderRight();
+ dy = 0;
+ break;
+- case SouthWestGravity: // move up right
++ case XCB_GRAVITY_SOUTH_WEST: // move up right
+ dx = borderLeft() ;
+ dy = -borderBottom();
+ break;
+- case SouthGravity: // move up
++ case XCB_GRAVITY_SOUTH: // move up
+ dx = 0;
+ dy = -borderBottom();
+ break;
+- case SouthEastGravity: // move up left
++ case XCB_GRAVITY_SOUTH_EAST: // move up left
+ dx = -borderRight();
+ dy = -borderBottom();
+ break;
+ }
+- if (gravity != CenterGravity) {
++ if (gravity != XCB_GRAVITY_CENTER) {
+ // translate from client movement to frame movement
+ dx -= borderLeft();
+ dy -= borderTop();
+@@ -1678,9 +1678,13 @@ const QPoint Client::calculateGravitatio
+
+ void Client::configureRequest(int value_mask, int rx, int ry, int rw, int rh, int gravity, bool from_tool)
+ {
++ const int configurePositionMask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y;
++ const int configureSizeMask = XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT;
++ const int configureGeometryMask = configurePositionMask | configureSizeMask;
++
+ // "maximized" is a user setting -> we do not allow the client to resize itself
+ // away from this & against the users explicit wish
+- qCDebug(KWIN_CORE) << this << bool(value_mask & (CWX|CWWidth|CWY|CWHeight)) <<
++ qCDebug(KWIN_CORE) << this << bool(value_mask & configureGeometryMask) <<
+ bool(maximizeMode() & MaximizeVertical) <<
+ bool(maximizeMode() & MaximizeHorizontal);
+
+@@ -1702,10 +1706,10 @@ void Client::configureRequest(int value_
+ ignore = rules()->checkIgnoreGeometry(false);
+ if (!ignore) { // the user is not interested, so we fix up dimensions
+ if (maximizeMode() == MaximizeVertical)
+- value_mask &= ~(CWY|CWHeight);
++ value_mask &= ~(XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_HEIGHT);
+ if (maximizeMode() == MaximizeHorizontal)
+- value_mask &= ~(CWX|CWWidth);
+- if (!(value_mask & (CWX|CWWidth|CWY|CWHeight))) {
++ value_mask &= ~(XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_WIDTH);
++ if (!(value_mask & configureGeometryMask)) {
+ ignore = true; // the modification turned the request void
+ }
+ }
+@@ -1716,15 +1720,15 @@ void Client::configureRequest(int value_
+ return; // nothing to (left) to do for use - bugs #158974, #252314, #321491
+ }
+
+- qCDebug(KWIN_CORE) << "PERMITTED" << this << bool(value_mask & (CWX|CWWidth|CWY|CWHeight));
++ qCDebug(KWIN_CORE) << "PERMITTED" << this << bool(value_mask & configureGeometryMask);
+
+ if (gravity == 0) // default (nonsense) value for the argument
+ gravity = m_geometryHints.windowGravity();
+- if (value_mask & (CWX | CWY)) {
++ if (value_mask & configurePositionMask) {
+ QPoint new_pos = calculateGravitation(true, gravity); // undo gravitation
+- if (value_mask & CWX)
++ if (value_mask & XCB_CONFIG_WINDOW_X)
+ new_pos.setX(rx);
+- if (value_mask & CWY)
++ if (value_mask & XCB_CONFIG_WINDOW_Y)
+ new_pos.setY(ry);
+
+ // clever(?) workaround for applications like xv that want to set
+@@ -1732,16 +1736,16 @@ void Client::configureRequest(int value_
+ // frame size due to kwin being a double-reparenting window
+ // manager
+ if (new_pos.x() == x() + clientPos().x() && new_pos.y() == y() + clientPos().y()
+- && gravity == NorthWestGravity && !from_tool) {
++ && gravity == XCB_GRAVITY_NORTH_WEST && !from_tool) {
+ new_pos.setX(x());
+ new_pos.setY(y());
+ }
+
+ int nw = clientSize().width();
+ int nh = clientSize().height();
+- if (value_mask & CWWidth)
++ if (value_mask & XCB_CONFIG_WINDOW_WIDTH)
+ nw = rw;
+- if (value_mask & CWHeight)
++ if (value_mask & XCB_CONFIG_WINDOW_HEIGHT)
+ nh = rh;
+ QSize ns = sizeForClientSize(QSize(nw, nh)); // enforces size if needed
+ new_pos = rules()->checkPosition(new_pos);
+@@ -1768,13 +1772,12 @@ void Client::configureRequest(int value_
+ workspace() -> updateClientArea();
+ }
+
+- if (value_mask & (CWWidth | CWHeight)
+- && !(value_mask & (CWX | CWY))) { // pure resize
++ if (value_mask & configureSizeMask && !(value_mask & configurePositionMask)) { // pure resize
+ int nw = clientSize().width();
+ int nh = clientSize().height();
+- if (value_mask & CWWidth)
++ if (value_mask & XCB_CONFIG_WINDOW_WIDTH)
+ nw = rw;
+- if (value_mask & CWHeight)
++ if (value_mask & XCB_CONFIG_WINDOW_HEIGHT)
+ nh = rh;
+ QSize ns = sizeForClientSize(QSize(nw, nh));
+
+@@ -1824,37 +1827,37 @@ void Client::resizeWithChecks(int w, int
+ gravity = m_geometryHints.windowGravity();
+ }
+ switch(gravity) {
+- case NorthWestGravity: // top left corner doesn't move
++ case XCB_GRAVITY_NORTH_WEST: // top left corner doesn't move
+ default:
+ break;
+- case NorthGravity: // middle of top border doesn't move
++ case XCB_GRAVITY_NORTH: // middle of top border doesn't move
+ newx = (newx + width() / 2) - (w / 2);
+ break;
+- case NorthEastGravity: // top right corner doesn't move
++ case XCB_GRAVITY_NORTH_EAST: // top right corner doesn't move
+ newx = newx + width() - w;
+ break;
+- case WestGravity: // middle of left border doesn't move
++ case XCB_GRAVITY_WEST: // middle of left border doesn't move
+ newy = (newy + height() / 2) - (h / 2);
+ break;
+- case CenterGravity: // middle point doesn't move
++ case XCB_GRAVITY_CENTER: // middle point doesn't move
+ newx = (newx + width() / 2) - (w / 2);
+ newy = (newy + height() / 2) - (h / 2);
+ break;
+- case StaticGravity: // top left corner of _client_ window doesn't move
++ case XCB_GRAVITY_STATIC: // top left corner of _client_ window doesn't move
+ // since decoration doesn't change, equal to NorthWestGravity
+ break;
+- case EastGravity: // // middle of right border doesn't move
++ case XCB_GRAVITY_EAST: // // middle of right border doesn't move
+ newx = newx + width() - w;
+ newy = (newy + height() / 2) - (h / 2);
+ break;
+- case SouthWestGravity: // bottom left corner doesn't move
++ case XCB_GRAVITY_SOUTH_WEST: // bottom left corner doesn't move
+ newy = newy + height() - h;
+ break;
+- case SouthGravity: // middle of bottom border doesn't move
++ case XCB_GRAVITY_SOUTH: // middle of bottom border doesn't move
+ newx = (newx + width() / 2) - (w / 2);
+ newy = newy + height() - h;
+ break;
+- case SouthEastGravity: // bottom right corner doesn't move
++ case XCB_GRAVITY_SOUTH_EAST: // bottom right corner doesn't move
+ newx = newx + width() - w;
+ newy = newy + height() - h;
+ break;
+@@ -1868,13 +1871,13 @@ void Client::NETMoveResizeWindow(int fla
+ int gravity = flags & 0xff;
+ int value_mask = 0;
+ if (flags & (1 << 8))
+- value_mask |= CWX;
++ value_mask |= XCB_CONFIG_WINDOW_X;
+ if (flags & (1 << 9))
+- value_mask |= CWY;
++ value_mask |= XCB_CONFIG_WINDOW_Y;
+ if (flags & (1 << 10))
+- value_mask |= CWWidth;
++ value_mask |= XCB_CONFIG_WINDOW_WIDTH;
+ if (flags & (1 << 11))
+- value_mask |= CWHeight;
++ value_mask |= XCB_CONFIG_WINDOW_HEIGHT;
+ configureRequest(value_mask, x, y, width, height, gravity, true);
+ }
+
diff --git a/kwin/patches/patch-group.cpp b/kwin/patches/patch-group.cpp
new file mode 100644
index 0000000000..6c9a0180ba
--- /dev/null
+++ b/kwin/patches/patch-group.cpp
@@ -0,0 +1,60 @@
+$NetBSD$
+
+Use XCB wherever possible
+commit a035401b55c55773bfaf5f279929c32977053562
+
+--- group.cpp.orig 2018-05-01 12:52:19.000000000 +0000
++++ group.cpp
+@@ -52,14 +52,14 @@ namespace KWin
+ // Group
+ //********************************************
+
+-Group::Group(Window leader_P)
++Group::Group(xcb_window_t leader_P)
+ : leader_client(NULL),
+ leader_wid(leader_P),
+ leader_info(NULL),
+ user_time(-1U),
+ refcount(0)
+ {
+- if (leader_P != None) {
++ if (leader_P != XCB_WINDOW_NONE) {
+ leader_client = workspace()->findClient(Predicate::WindowMatch, leader_P);
+ leader_info = new NETWinInfo(connection(), leader_P, rootWindow(),
+ 0, NET::WM2StartupId);
+@@ -78,7 +78,7 @@ QIcon Group::icon() const
+ {
+ if (leader_client != NULL)
+ return leader_client->icon();
+- else if (leader_wid != None) {
++ else if (leader_wid != XCB_WINDOW_NONE) {
+ QIcon ic;
+ NETWinInfo info(connection(), leader_wid, rootWindow(), NET::WMIcon, NET::WM2IconPixmap);
+ auto readIcon = [&ic, &info, this](int size, bool scale = true) {
+@@ -155,7 +155,7 @@ void Group::lostLeader()
+
+ Group* Workspace::findGroup(xcb_window_t leader) const
+ {
+- assert(leader != None);
++ assert(leader != XCB_WINDOW_NONE);
+ for (GroupList::ConstIterator it = groups.constBegin();
+ it != groups.constEnd();
+ ++it)
+@@ -811,7 +811,7 @@ void Client::checkGroup(Group* set_group
+ // try creating group with other windows with the same client leader
+ Group* new_group = workspace()->findClientLeaderGroup(this);
+ if (new_group == NULL)
+- new_group = new Group(None);
++ new_group = new Group(XCB_WINDOW_NONE);
+ if (new_group != in_group) {
+ if (in_group != NULL)
+ in_group->removeMember(this);
+@@ -828,7 +828,7 @@ void Client::checkGroup(Group* set_group
+ in_group = NULL;
+ }
+ if (new_group == NULL)
+- new_group = new Group(None);
++ new_group = new Group(XCB_WINDOW_NONE);
+ if (in_group != new_group) {
+ in_group = new_group;
+ in_group->addMember(this);
diff --git a/kwin/patches/patch-group.h b/kwin/patches/patch-group.h
new file mode 100644
index 0000000000..1a8641161c
--- /dev/null
+++ b/kwin/patches/patch-group.h
@@ -0,0 +1,45 @@
+$NetBSD$
+
+Use XCB wherever possible
+commit a035401b55c55773bfaf5f279929c32977053562
+
+--- group.h.orig 2018-05-01 12:52:19.000000000 +0000
++++ group.h
+@@ -23,8 +23,6 @@ along with this program. If not, see <h
+ #define KWIN_GROUP_H
+
+ #include "utils.h"
+-#include <X11/X.h>
+-#include <fixx11h.h>
+ #include <netwm.h>
+
+ namespace KWin
+@@ -36,9 +34,9 @@ class EffectWindowGroupImpl;
+ class Group
+ {
+ public:
+- Group(Window leader);
++ Group(xcb_window_t leader);
+ ~Group();
+- Window leader() const;
++ xcb_window_t leader() const;
+ const Client* leaderClient() const;
+ Client* leaderClient();
+ const ClientList& members() const;
+@@ -56,14 +54,14 @@ private:
+ void startupIdChanged();
+ ClientList _members;
+ Client* leader_client;
+- Window leader_wid;
++ xcb_window_t leader_wid;
+ NETWinInfo* leader_info;
+ xcb_timestamp_t user_time;
+ int refcount;
+ EffectWindowGroupImpl* effect_group;
+ };
+
+-inline Window Group::leader() const
++inline xcb_window_t Group::leader() const
+ {
+ return leader_wid;
+ }
diff --git a/kwin/patches/patch-kcmkwin_kwincompositing_CMakeLists.txt b/kwin/patches/patch-kcmkwin_kwincompositing_CMakeLists.txt
new file mode 100644
index 0000000000..d42d4d4dcb
--- /dev/null
+++ b/kwin/patches/patch-kcmkwin_kwincompositing_CMakeLists.txt
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- kcmkwin/kwincompositing/CMakeLists.txt.orig 2016-04-19 11:12:37.000000000 +0000
++++ kcmkwin/kwincompositing/CMakeLists.txt
+@@ -41,6 +41,7 @@ target_link_libraries(kwincompositing
+ KF5::Service
+ KF5::KCMUtils
+ KF5::NewStuff
++ kwineffects
+ kwin4_effect_builtins
+ )
+
diff --git a/kwin/patches/patch-kcmkwin_kwindecoration_declarative-plugin_previewclient.cpp b/kwin/patches/patch-kcmkwin_kwindecoration_declarative-plugin_previewclient.cpp
new file mode 100644
index 0000000000..29dc39953c
--- /dev/null
+++ b/kwin/patches/patch-kcmkwin_kwindecoration_declarative-plugin_previewclient.cpp
@@ -0,0 +1,71 @@
+$NetBSD$
+
+update to 5.18.5 version
+
+--- kcmkwin/kwindecoration/declarative-plugin/previewclient.cpp 2018-05-02 00:52:19.000000000 +1200
++++ kcmkwin/kwindecoration/declarative-plugin/previewclient.cpp 2020-05-06 02:45:27.000000000 +1200
+@@ -69,7 +69,6 @@
+ connect(this, &PreviewClient::maximizedVerticallyChanged, c, &DecoratedClient::maximizedVerticallyChanged);
+ connect(this, &PreviewClient::maximizedHorizontallyChanged, c, &DecoratedClient::maximizedHorizontallyChanged);
+ connect(this, &PreviewClient::minimizableChanged, c, &DecoratedClient::minimizeableChanged);
+-// connect(this, &PreviewClient::modalChanged, c, &DecoratedClient::modalChanged);
+ connect(this, &PreviewClient::movableChanged, c, &DecoratedClient::moveableChanged);
+ connect(this, &PreviewClient::onAllDesktopsChanged, c, &DecoratedClient::onAllDesktopsChanged);
+ connect(this, &PreviewClient::resizableChanged, c, &DecoratedClient::resizeableChanged);
+@@ -81,7 +80,6 @@
+ connect(this, &PreviewClient::heightChanged, c, &DecoratedClient::heightChanged);
+ connect(this, &PreviewClient::iconChanged, c, &DecoratedClient::iconChanged);
+ connect(this, &PreviewClient::paletteChanged, c, &DecoratedClient::paletteChanged);
+-// connect(this, &PreviewClient::, c, &DecoratedClient::);
+ connect(this, &PreviewClient::maximizedVerticallyChanged, this,
+ [this]() {
+ emit maximizedChanged(isMaximized());
+@@ -113,6 +111,11 @@
+ connect(this, &PreviewClient::bordersLeftEdgeChanged, this, emitEdgesChanged);
+ connect(this, &PreviewClient::bordersRightEdgeChanged, this, emitEdgesChanged);
+ connect(this, &PreviewClient::bordersBottomEdgeChanged, this, emitEdgesChanged);
++ auto emitSizeChanged = [this, c]() {
++ emit c->sizeChanged(c->size());
++ };
++ connect(this, &PreviewClient::widthChanged, this, emitSizeChanged);
++ connect(this, &PreviewClient::heightChanged, this, emitSizeChanged);
+
+ qApp->installEventFilter(this);
+ }
+@@ -135,6 +138,11 @@
+ return m_height;
+ }
+
++QSize PreviewClient::size() const
++{
++ return QSize(m_width, m_height);
++}
++
+ QString PreviewClient::caption() const
+ {
+ return m_caption;
+@@ -353,7 +361,7 @@
+
+ void PreviewClient::requestShowToolTip(const QString &text)
+ {
+- Q_UNUSED(text)
++ Q_UNUSED(text);
+ }
+
+ void PreviewClient::requestHideToolTip()
+@@ -367,7 +375,6 @@
+
+ void PreviewClient::requestContextHelp()
+ {
+- qDebug() << "context help requested";
+ }
+
+ void PreviewClient::requestToggleMaximization(Qt::MouseButtons buttons)
+@@ -430,7 +437,6 @@
+ if (m_##variable == variable) { \
+ return; \
+ } \
+- qDebug() << "Setting " << #variable << ":" << variable;\
+ m_##variable = variable; \
+ emit variable##Changed(m_##variable); \
+ }
diff --git a/kwin/patches/patch-kcmkwin_kwindecoration_declarative-plugin_previewclient.h b/kwin/patches/patch-kcmkwin_kwindecoration_declarative-plugin_previewclient.h
new file mode 100644
index 0000000000..ace9d08233
--- /dev/null
+++ b/kwin/patches/patch-kcmkwin_kwindecoration_declarative-plugin_previewclient.h
@@ -0,0 +1,43 @@
+$NetBSD$
+
+update to 5.18.5 version
+
+--- kcmkwin/kwindecoration/declarative-plugin/previewclient.h 2018-05-02 00:52:19.000000000 +1200
++++ kcmkwin/kwindecoration/declarative-plugin/previewclient.h 2020-05-06 02:45:27.000000000 +1200
+@@ -64,7 +64,7 @@
+ Q_PROPERTY(bool bordersBottomEdge READ bordersBottomEdge WRITE setBordersBottomEdge NOTIFY bordersBottomEdgeChanged)
+ public:
+ explicit PreviewClient(DecoratedClient *client, Decoration *decoration);
+- virtual ~PreviewClient();
++ ~PreviewClient() override;
+
+ QString caption() const override;
+ WId decorationId() const override;
+@@ -90,6 +90,7 @@
+
+ int width() const override;
+ int height() const override;
++ QSize size() const override;
+ QPalette palette() const override;
+ QColor color(ColorGroup group, ColorRole role) const override;
+ Qt::Edges adjacentScreenEdges() const override;
+@@ -97,8 +98,8 @@
+ bool hasApplicationMenu() const override;
+ bool isApplicationMenuActive() const override;
+
+- void requestShowToolTip(const QString &text);
+- void requestHideToolTip();
++ void requestShowToolTip(const QString &text) override;
++ void requestHideToolTip() override;
+ void requestClose() override;
+ void requestContextHelp() override;
+ void requestToggleMaximization(Qt::MouseButtons buttons) override;
+@@ -110,7 +111,7 @@
+ void requestShowApplicationMenu(const QRect &rect, int actionId) override;
+ void requestToggleOnAllDesktops() override;
+
+- void showApplicationMenu(int actionId);
++ void showApplicationMenu(int actionId) override;
+
+ void setCaption(const QString &caption);
+ void setActive(bool active);
diff --git a/kwin/patches/patch-kcmkwin_kwindesktop_CMakeLists.txt b/kwin/patches/patch-kcmkwin_kwindesktop_CMakeLists.txt
new file mode 100644
index 0000000000..3f0a5471fb
--- /dev/null
+++ b/kwin/patches/patch-kcmkwin_kwindesktop_CMakeLists.txt
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- kcmkwin/kwindesktop/CMakeLists.txt.orig 2016-04-19 11:12:37.000000000 +0000
++++ kcmkwin/kwindesktop/CMakeLists.txt
+@@ -21,6 +21,7 @@ target_link_libraries(kcm_kwindesktop
+ KF5::WindowSystem
+ KF5::XmlGui
+ ${X11_LIBRARIES}
++ kwineffects
+ kwin4_effect_builtins
+ )
+
diff --git a/kwin/patches/patch-kcmkwin_kwinscreenedges_CMakeLists.txt b/kwin/patches/patch-kcmkwin_kwinscreenedges_CMakeLists.txt
new file mode 100644
index 0000000000..fa04efe34b
--- /dev/null
+++ b/kwin/patches/patch-kcmkwin_kwinscreenedges_CMakeLists.txt
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- kcmkwin/kwinscreenedges/CMakeLists.txt.orig 2018-01-02 12:34:16.861372861 +0000
++++ kcmkwin/kwinscreenedges/CMakeLists.txt
+@@ -22,6 +22,7 @@ set(kcm_screenedges_LIBS
+ KF5::Service
+ KF5::Package
+ KF5::Plasma
++ kwineffects
+ kwin4_effect_builtins
+ )
+ target_link_libraries( kcm_kwinscreenedges ${X11_LIBRARIES} ${kcm_screenedges_LIBS})
diff --git a/kwin/patches/patch-kcmkwin_kwintabbox_CMakeLists.txt b/kwin/patches/patch-kcmkwin_kwintabbox_CMakeLists.txt
new file mode 100644
index 0000000000..3bb9446b64
--- /dev/null
+++ b/kwin/patches/patch-kcmkwin_kwintabbox_CMakeLists.txt
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- kcmkwin/kwintabbox/CMakeLists.txt.orig 2018-01-02 12:34:16.861372861 +0000
++++ kcmkwin/kwintabbox/CMakeLists.txt
+@@ -28,6 +28,7 @@ target_link_libraries(kcm_kwintabbox
+ KF5::NewStuff
+ KF5::Package
+ XCB::XCB
++ kwineffects
+ kwin4_effect_builtins
+ )
+
diff --git a/kwin/patches/patch-netinfo.cpp b/kwin/patches/patch-netinfo.cpp
new file mode 100644
index 0000000000..b8396f94ed
--- /dev/null
+++ b/kwin/patches/patch-netinfo.cpp
@@ -0,0 +1,34 @@
+$NetBSD$
+
+Use XCB wherever possible
+commit a035401b55c55773bfaf5f279929c32977053562
+
+--- netinfo.cpp.orig 2018-05-01 12:52:19.000000000 +0000
++++ netinfo.cpp
+@@ -160,7 +160,7 @@ void RootInfo::changeActiveWindow(xcb_wi
+ {
+ Workspace *workspace = Workspace::self();
+ if (Client* c = workspace->findClient(Predicate::WindowMatch, w)) {
+- if (timestamp == CurrentTime)
++ if (timestamp == XCB_CURRENT_TIME)
+ timestamp = c->userTime();
+ if (src != NET::FromApplication && src != FromTool)
+ src = NET::FromTool;
+@@ -173,7 +173,7 @@ void RootInfo::changeActiveWindow(xcb_wi
+ if (workspace->allowClientActivation(c, timestamp, false, true))
+ workspace->activateClient(c);
+ // if activation of the requestor's window would be allowed, allow activation too
+- else if (active_window != None
++ else if (active_window != XCB_WINDOW_NONE
+ && (c2 = workspace->findClient(Predicate::WindowMatch, active_window)) != NULL
+ && workspace->allowClientActivation(c2,
+ timestampCompare(timestamp, c2->userTime() > 0 ? timestamp : c2->userTime()), false, true)) {
+@@ -187,7 +187,7 @@ void RootInfo::changeActiveWindow(xcb_wi
+ void RootInfo::restackWindow(xcb_window_t w, RequestSource src, xcb_window_t above, int detail, xcb_timestamp_t timestamp)
+ {
+ if (Client* c = Workspace::self()->findClient(Predicate::WindowMatch, w)) {
+- if (timestamp == CurrentTime)
++ if (timestamp == XCB_WINDOW_NONE)
+ timestamp = c->userTime();
+ if (src != NET::FromApplication && src != FromTool)
+ src = NET::FromTool;
diff --git a/kwin/patches/patch-plugins_qpa_integration.cpp b/kwin/patches/patch-plugins_qpa_integration.cpp
new file mode 100644
index 0000000000..94d8a0f9cd
--- /dev/null
+++ b/kwin/patches/patch-plugins_qpa_integration.cpp
@@ -0,0 +1,50 @@
+$NetBSD$
+
+some changes from 5.18.5
+
+--- plugins/qpa/integration.cpp.orig 2018-05-01 12:52:19.000000000 +0000
++++ plugins/qpa/integration.cpp
+@@ -99,7 +99,11 @@ void Integration::initialize()
+ );
+ QPlatformIntegration::initialize();
+ auto dummyScreen = new Screen(-1);
++#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0))
++ QWindowSystemInterface::handleScreenAdded(dummyScreen);
++#else
+ screenAdded(dummyScreen);
++#endif
+ m_screens << dummyScreen;
+ m_inputContext.reset(QPlatformInputContextFactory::create(QStringLiteral("qtvirtualkeyboard")));
+ qunsetenv("QT_IM_MODULE");
+@@ -205,13 +209,31 @@ QPlatformOpenGLContext *Integration::cre
+ void Integration::initScreens()
+ {
+ QVector<Screen*> newScreens;
++ newScreens.reserve(qMax(screens()->count(), 1));
+ for (int i = 0; i < screens()->count(); i++) {
+ auto screen = new Screen(i);
++#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0))
++ QWindowSystemInterface::handleScreenAdded(screen);
++#else
+ screenAdded(screen);
++#endif
+ newScreens << screen;
+ }
++ if (newScreens.isEmpty()) {
++ auto dummyScreen = new Screen(-1);
++#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0))
++ QWindowSystemInterface::handleScreenAdded(dummyScreen);
++#else
++ screenAdded(dummyScreen);
++#endif
++ newScreens << dummyScreen;
++ }
+ while (!m_screens.isEmpty()) {
++#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0))
++ QWindowSystemInterface::handleScreenRemoved(m_screens.takeLast());
++#else
+ destroyScreen(m_screens.takeLast());
++#endif
+ }
+ m_screens = newScreens;
+ }
diff --git a/kwin/patches/patch-rules.cpp b/kwin/patches/patch-rules.cpp
new file mode 100644
index 0000000000..0b3b9d6064
--- /dev/null
+++ b/kwin/patches/patch-rules.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Use XCB wherever possible
+commit a035401b55c55773bfaf5f279929c32977053562
+
+--- rules.cpp.orig 2018-05-01 12:52:19.000000000 +0000
++++ rules.cpp
+@@ -20,7 +20,6 @@ along with this program. If not, see <h
+
+ #include "rules.h"
+
+-#include <fixx11h.h>
+ #include <kconfig.h>
+ #include <KXMessages>
+ #include <QRegExp>
diff --git a/kwin/patches/patch-sm.cpp b/kwin/patches/patch-sm.cpp
new file mode 100644
index 0000000000..ca93cb6b33
--- /dev/null
+++ b/kwin/patches/patch-sm.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Use XCB wherever possible
+commit a035401b55c55773bfaf5f279929c32977053562
+
+--- sm.cpp.orig 2018-05-01 12:52:19.000000000 +0000
++++ sm.cpp
+@@ -24,7 +24,6 @@ along with this program. If not, see <h
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <pwd.h>
+-#include <fixx11h.h>
+ #include <kconfig.h>
+
+ #include "workspace.h"
diff --git a/kwin/patches/patch-toplevel.cpp b/kwin/patches/patch-toplevel.cpp
new file mode 100644
index 0000000000..a92cde43f6
--- /dev/null
+++ b/kwin/patches/patch-toplevel.cpp
@@ -0,0 +1,105 @@
+$NetBSD$
+
+Use XCB wherever possible
+commit a035401b55c55773bfaf5f279929c32977053562
+
+--- toplevel.cpp.orig 2018-05-01 12:52:19.000000000 +0000
++++ toplevel.cpp
+@@ -45,11 +45,11 @@ Toplevel::Toplevel()
+ , ready_for_painting(true)
+ , m_isDamaged(false)
+ , m_client()
+- , damage_handle(None)
++ , damage_handle(XCB_NONE)
+ , is_shape(false)
+ , effect_window(NULL)
+ , m_clientMachine(new ClientMachine(this))
+- , wmClientLeaderWin(0)
++ , m_wmClientLeader(XCB_WINDOW_NONE)
+ , m_damageReplyPending(false)
+ , m_screen(0)
+ , m_skipCloseAnimation(false)
+@@ -62,7 +62,7 @@ Toplevel::Toplevel()
+
+ Toplevel::~Toplevel()
+ {
+- assert(damage_handle == None);
++ assert(damage_handle == XCB_NONE);
+ delete info;
+ }
+
+@@ -95,7 +95,7 @@ QRect Toplevel::decorationRect() const
+ return rect();
+ }
+
+-void Toplevel::detectShape(Window id)
++void Toplevel::detectShape(xcb_window_t id)
+ {
+ const bool wasShape = is_shape;
+ is_shape = Xcb::Extensions::self()->hasShape(id);
+@@ -113,7 +113,7 @@ void Toplevel::copyToDeleted(Toplevel* c
+ info = c->info;
+ m_client.reset(c->m_client, false);
+ ready_for_painting = c->ready_for_painting;
+- damage_handle = None;
++ damage_handle = XCB_NONE;
+ damage_region = c->damage_region;
+ repaints_region = c->repaints_region;
+ is_shape = c->is_shape;
+@@ -124,7 +124,7 @@ void Toplevel::copyToDeleted(Toplevel* c
+ resource_class = c->resourceClass();
+ m_clientMachine = c->m_clientMachine;
+ m_clientMachine->setParent(this);
+- wmClientLeaderWin = c->wmClientLeader();
++ m_wmClientLeader = c->wmClientLeader();
+ opaque_region = c->opaqueRegion();
+ m_screen = c->m_screen;
+ m_skipCloseAnimation = c->m_skipCloseAnimation;
+@@ -154,7 +154,7 @@ Xcb::Property Toplevel::fetchWmClientLea
+
+ void Toplevel::readWmClientLeader(Xcb::Property &prop)
+ {
+- wmClientLeaderWin = prop.value<xcb_window_t>(window());
++ m_wmClientLeader = prop.value<xcb_window_t>(window());
+ }
+
+ void Toplevel::getWmClientLeader()
+@@ -170,8 +170,9 @@ void Toplevel::getWmClientLeader()
+ QByteArray Toplevel::sessionId() const
+ {
+ QByteArray result = Xcb::StringProperty(window(), atoms->sm_client_id);
+- if (result.isEmpty() && wmClientLeaderWin && wmClientLeaderWin != window())
+- result = Xcb::StringProperty(wmClientLeaderWin, atoms->sm_client_id);
++ if (result.isEmpty() && m_wmClientLeader && m_wmClientLeader != window()) {
++ result = Xcb::StringProperty(m_wmClientLeader, atoms->sm_client_id);
++ }
+ return result;
+ }
+
+@@ -182,8 +183,9 @@ QByteArray Toplevel::sessionId() const
+ QByteArray Toplevel::wmCommand()
+ {
+ QByteArray result = Xcb::StringProperty(window(), XCB_ATOM_WM_COMMAND);
+- if (result.isEmpty() && wmClientLeaderWin && wmClientLeaderWin != window())
+- result = Xcb::StringProperty(wmClientLeaderWin, XCB_ATOM_WM_COMMAND);
++ if (result.isEmpty() && m_wmClientLeader && m_wmClientLeader != window()) {
++ result = Xcb::StringProperty(m_wmClientLeader, XCB_ATOM_WM_COMMAND);
++ }
+ result.replace(0, ' ');
+ return result;
+ }
+@@ -214,10 +216,11 @@ QByteArray Toplevel::wmClientMachine(boo
+ Returns client leader window for this client.
+ Returns the client window itself if no leader window is defined.
+ */
+-Window Toplevel::wmClientLeader() const
++xcb_window_t Toplevel::wmClientLeader() const
+ {
+- if (wmClientLeaderWin)
+- return wmClientLeaderWin;
++ if (m_wmClientLeader != XCB_WINDOW_NONE) {
++ return m_wmClientLeader;
++ }
+ return window();
+ }
+
diff --git a/kwin/patches/patch-toplevel.h b/kwin/patches/patch-toplevel.h
new file mode 100644
index 0000000000..e59aa511a7
--- /dev/null
+++ b/kwin/patches/patch-toplevel.h
@@ -0,0 +1,50 @@
+$NetBSD$
+
+Use XCB wherever possible
+commit a035401b55c55773bfaf5f279929c32977053562
+
+--- toplevel.h.orig 2018-05-01 12:52:19.000000000 +0000
++++ toplevel.h
+@@ -31,14 +31,10 @@ along with this program. If not, see <h
+ // Qt
+ #include <QObject>
+ #include <QMatrix4x4>
++#include <QUuid>
+ // xcb
+ #include <xcb/damage.h>
+ #include <xcb/xfixes.h>
+-// XLib
+-#include <X11/Xlib.h>
+-#include <fixx11h.h>
+-// system
+-#include <assert.h>
+ // c++
+ #include <functional>
+
+@@ -300,7 +296,7 @@ public:
+ QByteArray wmCommand();
+ QByteArray wmClientMachine(bool use_localhost) const;
+ const ClientMachine *clientMachine() const;
+- Window wmClientLeader() const;
++ xcb_window_t wmClientLeader() const;
+ virtual pid_t pid() const;
+ static bool resourceMatch(const Toplevel* c1, const Toplevel* c2);
+
+@@ -516,7 +512,7 @@ protected Q_SLOTS:
+ protected:
+ virtual ~Toplevel();
+ void setWindowHandles(xcb_window_t client);
+- void detectShape(Window id);
++ void detectShape(xcb_window_t id);
+ virtual void propertyNotifyEvent(xcb_property_notify_event_t *e);
+ virtual void damageNotifyEvent();
+ virtual void clientMessageEvent(xcb_client_message_event_t *e);
+@@ -570,7 +566,7 @@ private:
+ QByteArray resource_name;
+ QByteArray resource_class;
+ ClientMachine *m_clientMachine;
+- WId wmClientLeaderWin;
++ xcb_window_t m_wmClientLeader;
+ bool m_damageReplyPending;
+ QRegion opaque_region;
+ xcb_xfixes_fetch_region_cookie_t m_regionCookie;
diff --git a/kwin/patches/patch-unmanaged.cpp b/kwin/patches/patch-unmanaged.cpp
new file mode 100644
index 0000000000..1e39770a91
--- /dev/null
+++ b/kwin/patches/patch-unmanaged.cpp
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Use XCB wherever possible
+commit a035401b55c55773bfaf5f279929c32977053562
+
+--- unmanaged.cpp.orig 2018-05-01 12:52:19.000000000 +0000
++++ unmanaged.cpp
+@@ -46,7 +46,7 @@ Unmanaged::~Unmanaged()
+ {
+ }
+
+-bool Unmanaged::track(Window w)
++bool Unmanaged::track(xcb_window_t w)
+ {
+ GRAB_SERVER_DURING_CONTEXT
+ Xcb::WindowAttributes attr(w);
diff --git a/kwin/patches/patch-unmanaged.h b/kwin/patches/patch-unmanaged.h
new file mode 100644
index 0000000000..3977221bde
--- /dev/null
+++ b/kwin/patches/patch-unmanaged.h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Use XCB wherever possible
+commit a035401b55c55773bfaf5f279929c32977053562
+
+--- unmanaged.h.orig 2018-05-01 12:52:19.000000000 +0000
++++ unmanaged.h
+@@ -35,7 +35,7 @@ class Unmanaged
+ public:
+ explicit Unmanaged();
+ bool windowEvent(xcb_generic_event_t *e);
+- bool track(Window w);
++ bool track(xcb_window_t w);
+ static void deleteUnmanaged(Unmanaged* c);
+ virtual int desktop() const;
+ virtual QStringList activities() const;
diff --git a/kwin/patches/patch-utils.cpp b/kwin/patches/patch-utils.cpp
new file mode 100644
index 0000000000..f365028566
--- /dev/null
+++ b/kwin/patches/patch-utils.cpp
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Use XCB wherever possible
+commit a035401b55c55773bfaf5f279929c32977053562
+
+--- utils.cpp.orig 2018-05-01 12:52:19.000000000 +0000
++++ utils.cpp
+@@ -35,8 +35,6 @@ along with this program. If not, see <h
+ #include <QApplication>
+ #include <QDebug>
+
+-#include <X11/Xlib.h>
+-
+ #include <stdio.h>
+
+ #include "atoms.h"
Home |
Main Index |
Thread Index |
Old Index