Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kf6-kwindowsystem for 
openSUSE:Factory checked in at 2024-05-11 18:19:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kf6-kwindowsystem (Old)
 and      /work/SRC/openSUSE:Factory/.kf6-kwindowsystem.new.1880 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kf6-kwindowsystem"

Sat May 11 18:19:56 2024 rev:3 rq:1173168 version:6.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kf6-kwindowsystem/kf6-kwindowsystem.changes      
2024-04-15 20:16:09.547474084 +0200
+++ 
/work/SRC/openSUSE:Factory/.kf6-kwindowsystem.new.1880/kf6-kwindowsystem.changes
    2024-05-11 18:23:50.844002829 +0200
@@ -1,0 +2,11 @@
+Mon May  6 12:23:01 UTC 2024 - Christophe Marin <[email protected]>
+
+- Update to 6.2.0
+  * New feature release
+  * For more details please see:
+  * https://kde.org/announcements/gear/6.2.0/
+- Changes since 6.1.0:
+  * Port to QNativeInterface::Private::QWaylandWindow
+  * Introduce KXcbEvent to initialize the memory of sent XCB events
+
+-------------------------------------------------------------------

Old:
----
  kwindowsystem-6.1.0.tar.xz
  kwindowsystem-6.1.0.tar.xz.sig

New:
----
  kwindowsystem-6.2.0.tar.xz
  kwindowsystem-6.2.0.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kf6-kwindowsystem.spec ++++++
--- /var/tmp/diff_new_pack.cEQvlZ/_old  2024-05-11 18:23:51.524027591 +0200
+++ /var/tmp/diff_new_pack.cEQvlZ/_new  2024-05-11 18:23:51.540028174 +0200
@@ -19,13 +19,13 @@
 %define qt6_version 6.6.0
 
 %define rname kwindowsystem
-# Full KF6 version (e.g. 6.1.0)
+# Full KF6 version (e.g. 6.2.0)
 %{!?_kf6_version: %global _kf6_version %{version}}
 # Last major and minor KF6 version (e.g. 6.0)
 %{!?_kf6_bugfix_version: %define _kf6_bugfix_version %(echo %{_kf6_version} | 
awk -F. '{print $1"."$2}')}
 %bcond_without released
 Name:           kf6-kwindowsystem
-Version:        6.1.0
+Version:        6.2.0
 Release:        0
 Summary:        KDE Access to window manager
 License:        LGPL-2.1-or-later

++++++ frameworks.keyring ++++++
Binary files /var/tmp/diff_new_pack.cEQvlZ/_old and 
/var/tmp/diff_new_pack.cEQvlZ/_new differ

++++++ kwindowsystem-6.1.0.tar.xz -> kwindowsystem-6.2.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwindowsystem-6.1.0/CMakeLists.txt 
new/kwindowsystem-6.2.0/CMakeLists.txt
--- old/kwindowsystem-6.1.0/CMakeLists.txt      2024-04-05 12:59:30.000000000 
+0200
+++ new/kwindowsystem-6.2.0/CMakeLists.txt      2024-05-03 14:27:28.000000000 
+0200
@@ -1,11 +1,11 @@
 cmake_minimum_required(VERSION 3.16)
 
-set(KF_VERSION "6.1.0") # handled by release scripts
+set(KF_VERSION "6.2.0") # handled by release scripts
 project(KWindowSystem VERSION ${KF_VERSION})
 
 # ECM setup
 include(FeatureSummary)
-find_package(ECM 6.1.0  NO_MODULE)
+find_package(ECM 6.2.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL "https://commits.kde.org/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwindowsystem-6.1.0/poqm/zh_CN/kwindowsystem6_qt.po 
new/kwindowsystem-6.2.0/poqm/zh_CN/kwindowsystem6_qt.po
--- old/kwindowsystem-6.1.0/poqm/zh_CN/kwindowsystem6_qt.po     2024-04-05 
12:59:30.000000000 +0200
+++ new/kwindowsystem-6.2.0/poqm/zh_CN/kwindowsystem6_qt.po     2024-05-03 
14:27:28.000000000 +0200
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: kdeorg\n"
-"PO-Revision-Date: 2024-04-03 19:13\n"
+"PO-Revision-Date: 2024-04-22 15:58\n"
 "Language-Team: Chinese Simplified\n"
 "Language: zh_CN\n"
 "MIME-Version: 1.0\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwindowsystem-6.1.0/src/kwaylandextras.cpp 
new/kwindowsystem-6.2.0/src/kwaylandextras.cpp
--- old/kwindowsystem-6.1.0/src/kwaylandextras.cpp      2024-04-05 
12:59:30.000000000 +0200
+++ new/kwindowsystem-6.2.0/src/kwaylandextras.cpp      2024-05-03 
14:27:28.000000000 +0200
@@ -62,3 +62,5 @@
         dv2->unexportWindow(window);
     }
 }
+
+#include "moc_kwaylandextras.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwindowsystem-6.1.0/src/kx11extras.cpp 
new/kwindowsystem-6.2.0/src/kx11extras.cpp
--- old/kwindowsystem-6.1.0/src/kx11extras.cpp  2024-04-05 12:59:30.000000000 
+0200
+++ new/kwindowsystem-6.2.0/src/kx11extras.cpp  2024-05-03 14:27:28.000000000 
+0200
@@ -19,6 +19,7 @@
 #include "kwindowsystem.h"
 #include "kwindowsystem_debug.h"
 #include "netwm.h"
+#include "kxcbevent_p.h"
 
 #include <QAbstractNativeEventFilter>
 #include <QGuiApplication>
@@ -869,8 +870,7 @@
     CHECK_X11_VOID
     create_atoms();
     // as described in ICCCM 4.1.4
-    xcb_client_message_event_t ev;
-    memset(&ev, 0, sizeof(ev));
+    KXcbEvent<xcb_client_message_event_t> ev;
     ev.response_type = XCB_CLIENT_MESSAGE;
     ev.window = win;
     ev.type = _wm_change_state;
@@ -884,7 +884,7 @@
                    false,
                    QX11Info::appRootWindow(),
                    XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | 
XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT,
-                   reinterpret_cast<const char *>(&ev));
+                   ev.buffer());
 }
 
 void KX11Extras::unminimizeWindow(WId win)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwindowsystem-6.1.0/src/kxcbevent_p.h 
new/kwindowsystem-6.2.0/src/kxcbevent_p.h
--- old/kwindowsystem-6.1.0/src/kxcbevent_p.h   1970-01-01 01:00:00.000000000 
+0100
+++ new/kwindowsystem-6.2.0/src/kxcbevent_p.h   2024-05-03 14:27:28.000000000 
+0200
@@ -0,0 +1,57 @@
+/*
+    SPDX-FileCopyrightText: 2024 Andreas Hartmetz <[email protected]>
+
+    SPDX-License-Identifier: LGPL-2.0-or-later
+*/
+
+#pragma once
+
+#include <string.h>
+
+/**
+ * KXcbEvent allocates an xcb event in a 32 bytes large, zero-initialized 
buffer to avoid
+ * out-of-bounds reads and uninitialized memory reads in xcb_send_event(). 
According to
+ * XCB documentation, the wire size of all XCB events is 32 bytes, and that 
many bytes will
+ * be read by xcb_send_event().
+ */
+template<class EventType, bool needsPadding = (sizeof(EventType) < 32)>
+struct KXcbEvent;
+
+template<class EventType>
+class KXcbEvent<EventType, false> : public EventType
+{
+public:
+    inline KXcbEvent()
+    {
+        static_assert(sizeof(*this) == s_evtSize);
+        memset(this, 0, s_evtSize);
+    }
+
+    inline const char *buffer() const
+    {
+        return reinterpret_cast<const char *>(this);
+    }
+
+private:
+    static constexpr size_t s_evtSize = 32;
+};
+
+template<class EventType>
+class KXcbEvent<EventType, true> : public EventType
+{
+public:
+    inline KXcbEvent()
+    {
+        static_assert(sizeof(*this) == s_evtSize);
+        memset(this, 0, s_evtSize);
+    }
+
+    inline const char *buffer() const
+    {
+        return reinterpret_cast<const char *>(this);
+    }
+
+private:
+    static constexpr size_t s_evtSize = 32;
+    char m_filler[s_evtSize - sizeof(EventType)];
+};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kwindowsystem-6.1.0/src/platforms/wayland/CMakeLists.txt 
new/kwindowsystem-6.2.0/src/platforms/wayland/CMakeLists.txt
--- old/kwindowsystem-6.1.0/src/platforms/wayland/CMakeLists.txt        
2024-04-05 12:59:30.000000000 +0200
+++ new/kwindowsystem-6.2.0/src/platforms/wayland/CMakeLists.txt        
2024-05-03 14:27:28.000000000 +0200
@@ -51,8 +51,8 @@
 target_link_libraries(KF6WindowSystemKWaylandPlugin
     KF6WindowSystem
     Wayland::Client
+    Qt::GuiPrivate
     Qt::WaylandClient
-    Qt::WaylandClientPrivate
     PkgConfig::XKBCommon
 )
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwindowsystem-6.1.0/src/platforms/wayland/plugin.cpp 
new/kwindowsystem-6.2.0/src/platforms/wayland/plugin.cpp
--- old/kwindowsystem-6.1.0/src/platforms/wayland/plugin.cpp    2024-04-05 
12:59:30.000000000 +0200
+++ new/kwindowsystem-6.2.0/src/platforms/wayland/plugin.cpp    2024-05-03 
14:27:28.000000000 +0200
@@ -36,3 +36,5 @@
 {
     return new WindowShadow();
 }
+
+#include "moc_plugin.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kwindowsystem-6.1.0/src/platforms/wayland/waylandxdgactivationv1.cpp 
new/kwindowsystem-6.2.0/src/platforms/wayland/waylandxdgactivationv1.cpp
--- old/kwindowsystem-6.1.0/src/platforms/wayland/waylandxdgactivationv1.cpp    
2024-04-05 12:59:30.000000000 +0200
+++ new/kwindowsystem-6.2.0/src/platforms/wayland/waylandxdgactivationv1.cpp    
2024-05-03 14:27:28.000000000 +0200
@@ -44,3 +44,5 @@
     provider->commit();
     return provider;
 }
+
+#include "moc_waylandxdgactivationv1_p.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kwindowsystem-6.1.0/src/platforms/wayland/waylandxdgforeignv2.cpp 
new/kwindowsystem-6.2.0/src/platforms/wayland/waylandxdgforeignv2.cpp
--- old/kwindowsystem-6.1.0/src/platforms/wayland/waylandxdgforeignv2.cpp       
2024-04-05 12:59:30.000000000 +0200
+++ new/kwindowsystem-6.2.0/src/platforms/wayland/waylandxdgforeignv2.cpp       
2024-05-03 14:27:28.000000000 +0200
@@ -103,3 +103,5 @@
 {
     return new WaylandXdgForeignImportedV2(handle, import_toplevel(handle));
 }
+
+#include "moc_waylandxdgforeignv2_p.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kwindowsystem-6.1.0/src/platforms/wayland/windoweffects.cpp 
new/kwindowsystem-6.2.0/src/platforms/wayland/windoweffects.cpp
--- old/kwindowsystem-6.1.0/src/platforms/wayland/windoweffects.cpp     
2024-04-05 12:59:30.000000000 +0200
+++ new/kwindowsystem-6.2.0/src/platforms/wayland/windoweffects.cpp     
2024-05-03 14:27:28.000000000 +0200
@@ -11,7 +11,7 @@
 #include <QExposeEvent>
 #include <QGuiApplication>
 
-#include <private/qwaylandwindow_p.h>
+#include <qpa/qplatformwindow_p.h>
 
 #include <QWaylandClientExtensionTemplate>
 #include <qwaylandclientextension.h>
@@ -22,6 +22,8 @@
 
 #include "surfacehelper.h"
 
+#include <wayland-client-protocol.h>
+
 static wl_region *createRegion(const QRegion &region)
 {
     QPlatformNativeInterface *native = qGuiApp->platformNativeInterface();
@@ -170,9 +172,9 @@
             m_windowWatchers.remove(window);
         });
         m_windowWatchers[window] << conn;
-        auto waylandWindow = dynamic_cast<QtWaylandClient::QWaylandWindow 
*>(window->handle());
+        auto waylandWindow = 
window->nativeInterface<QNativeInterface::Private::QWaylandWindow>();
         if (waylandWindow) {
-            auto conn = connect(waylandWindow, 
&QtWaylandClient::QWaylandWindow::wlSurfaceDestroyed, this, [this, window]() {
+            auto conn = connect(waylandWindow, 
&QNativeInterface::Private::QWaylandWindow::surfaceDestroyed, this, [this, 
window]() {
                 resetBlur(window);
                 resetContrast(window);
             });
@@ -394,3 +396,5 @@
         }
     }
 }
+
+#include "moc_windoweffects.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kwindowsystem-6.1.0/src/platforms/wayland/windowshadow.cpp 
new/kwindowsystem-6.2.0/src/platforms/wayland/windowshadow.cpp
--- old/kwindowsystem-6.1.0/src/platforms/wayland/windowshadow.cpp      
2024-04-05 12:59:30.000000000 +0200
+++ new/kwindowsystem-6.2.0/src/platforms/wayland/windowshadow.cpp      
2024-05-03 14:27:28.000000000 +0200
@@ -16,7 +16,7 @@
 #include <QExposeEvent>
 #include <QWaylandClientExtension>
 
-#include <private/qwaylandwindow_p.h>
+#include <qpa/qplatformwindow_p.h>
 
 class ShadowManager : public QWaylandClientExtensionTemplate<ShadowManager>, 
public QtWayland::org_kde_kwin_shadow_manager
 {
@@ -139,9 +139,9 @@
     }
 
     shadow = 
std::make_unique<Shadow>(ShadowManager::instance()->create(surface));
-    auto waylandWindow = dynamic_cast<QtWaylandClient::QWaylandWindow 
*>(window->handle());
+    auto waylandWindow = 
window->nativeInterface<QNativeInterface::Private::QWaylandWindow>();
     if (waylandWindow) {
-        connect(waylandWindow, 
&QtWaylandClient::QWaylandWindow::wlSurfaceDestroyed, this, 
&WindowShadow::internalDestroy, Qt::UniqueConnection);
+        connect(waylandWindow, 
&QNativeInterface::Private::QWaylandWindow::surfaceDestroyed, this, 
&WindowShadow::internalDestroy, Qt::UniqueConnection);
     }
 
     auto attach = [](const std::unique_ptr<Shadow> &shadow, auto attach_func, 
const KWindowShadowTile::Ptr &tile) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kwindowsystem-6.1.0/src/platforms/wayland/windowsystem.cpp 
new/kwindowsystem-6.2.0/src/platforms/wayland/windowsystem.cpp
--- old/kwindowsystem-6.1.0/src/platforms/wayland/windowsystem.cpp      
2024-04-05 12:59:30.000000000 +0200
+++ new/kwindowsystem-6.2.0/src/platforms/wayland/windowsystem.cpp      
2024-05-03 14:27:28.000000000 +0200
@@ -19,13 +19,11 @@
 #include <QPixmap>
 #include <QPoint>
 #include <QString>
+#include <QTimer>
 #include <QWaylandClientExtensionTemplate>
 #include <QWindow>
-#include <private/qwaylanddisplay_p.h>
-#include <private/qwaylandinputdevice_p.h>
-#include <private/qwaylandwindow_p.h>
 #include <qpa/qplatformnativeinterface.h>
-#include <qwaylandclientextension.h>
+#include <qpa/qplatformwindow_p.h>
 
 constexpr const char 
*c_kdeXdgForeignExportedProperty("_kde_xdg_foreign_exported_v2");
 constexpr const char 
*c_kdeXdgForeignImportedProperty("_kde_xdg_foreign_imported_v2");
@@ -150,7 +148,7 @@
 
     window->create();
 
-    auto waylandWindow = dynamic_cast<QtWaylandClient::QWaylandWindow 
*>(window->handle());
+    auto waylandWindow = 
window->nativeInterface<QNativeInterface::Private::QWaylandWindow>();
     if (!waylandWindow) {
         emitHandle({});
         return;
@@ -164,15 +162,14 @@
 
     // We want to use QObject::property(char*) and use dynamic properties on 
the object rather than
     // call QWaylandWindow::property(QString) and send it around.
-    auto *waylandWindowQObject = static_cast<QObject *>(waylandWindow);
-    WaylandXdgForeignExportedV2 *exported = 
waylandWindowQObject->property(c_kdeXdgForeignExportedProperty).value<WaylandXdgForeignExportedV2
 *>();
+    WaylandXdgForeignExportedV2 *exported = 
waylandWindow->property(c_kdeXdgForeignExportedProperty).value<WaylandXdgForeignExportedV2
 *>();
     if (!exported) {
         exported = exporter.exportToplevel(surfaceForWindow(window));
         exported->setParent(waylandWindow);
 
-        waylandWindowQObject->setProperty(c_kdeXdgForeignExportedProperty, 
QVariant::fromValue(exported));
-        connect(exported, &QObject::destroyed, waylandWindow, 
[waylandWindowQObject] {
-            waylandWindowQObject->setProperty(c_kdeXdgForeignExportedProperty, 
QVariant());
+        waylandWindow->setProperty(c_kdeXdgForeignExportedProperty, 
QVariant::fromValue(exported));
+        connect(exported, &QObject::destroyed, waylandWindow, [waylandWindow] {
+            waylandWindow->setProperty(c_kdeXdgForeignExportedProperty, 
QVariant());
         });
 
         connect(exported, &WaylandXdgForeignExportedV2::handleReceived, 
window, [window](const QString &handle) {
@@ -187,15 +184,14 @@
 
 void WindowSystem::unexportWindow(QWindow *window)
 {
-    auto waylandWindow = window ? dynamic_cast<QtWaylandClient::QWaylandWindow 
*>(window->handle()) : nullptr;
+    auto waylandWindow = window ? 
window->nativeInterface<QNativeInterface::Private::QWaylandWindow>() : nullptr;
     if (!waylandWindow) {
         return;
     }
 
-    auto *waylandWindowQObject = static_cast<QObject *>(waylandWindow);
-    WaylandXdgForeignExportedV2 *exported = 
waylandWindowQObject->property(c_kdeXdgForeignExportedProperty).value<WaylandXdgForeignExportedV2
 *>();
+    WaylandXdgForeignExportedV2 *exported = 
waylandWindow->property(c_kdeXdgForeignExportedProperty).value<WaylandXdgForeignExportedV2
 *>();
     delete exported;
-    
Q_ASSERT(!waylandWindowQObject->property(c_kdeXdgForeignExportedProperty).isValid());
+    
Q_ASSERT(!waylandWindow->property(c_kdeXdgForeignExportedProperty).isValid());
 }
 
 void WindowSystem::setMainWindow(QWindow *window, const QString &handle)
@@ -205,20 +201,19 @@
     }
 
     window->create();
-    auto waylandWindow = dynamic_cast<QtWaylandClient::QWaylandWindow 
*>(window->handle());
+    auto waylandWindow = 
window->nativeInterface<QNativeInterface::Private::QWaylandWindow>();
     if (!waylandWindow) {
         return;
     }
 
     // We want to use QObject::property(char*) and use dynamic properties on 
the object rather than
     // call QWaylandWindow::property(QString) and send it around.
-    auto *waylandWindowQObject = static_cast<QObject *>(waylandWindow);
-    auto *imported = 
waylandWindowQObject->property(c_kdeXdgForeignImportedProperty).value<WaylandXdgForeignImportedV2
 *>();
+    auto *imported = 
waylandWindow->property(c_kdeXdgForeignImportedProperty).value<WaylandXdgForeignImportedV2
 *>();
     // Window already parented with a different handle? Delete imported so we 
import the new one later.
     if (imported && imported->handle() != handle) {
         delete imported;
         imported = nullptr;
-        
Q_ASSERT(!waylandWindowQObject->property(c_kdeXdgForeignImportedProperty).isValid());
+        
Q_ASSERT(!waylandWindow->property(c_kdeXdgForeignImportedProperty).isValid());
     }
 
     // Don't bother.
@@ -260,7 +255,7 @@
     Q_ASSERT(window);
     Q_ASSERT(!handle.isEmpty());
 
-    auto waylandWindow = dynamic_cast<QtWaylandClient::QWaylandWindow 
*>(window->handle());
+    auto waylandWindow = 
window->nativeInterface<QNativeInterface::Private::QWaylandWindow>();
     if (!waylandWindow) {
         return;
     }
@@ -270,16 +265,16 @@
         return;
     }
 
-    auto *waylandWindowQObject = static_cast<QObject *>(waylandWindow);
-
-    
Q_ASSERT(!waylandWindowQObject->property(c_kdeXdgForeignImportedProperty).isValid());
+    
Q_ASSERT(!waylandWindow->property(c_kdeXdgForeignImportedProperty).isValid());
 
     WaylandXdgForeignImportedV2 *imported = importer.importToplevel(handle);
     imported->set_parent_of(surfaceForWindow(window)); // foreign parent.
     imported->setParent(waylandWindow); // memory owner.
 
-    waylandWindowQObject->setProperty(c_kdeXdgForeignImportedProperty, 
QVariant::fromValue(imported));
-    connect(imported, &QObject::destroyed, waylandWindow, 
[waylandWindowQObject] {
-        waylandWindowQObject->setProperty(c_kdeXdgForeignImportedProperty, 
QVariant());
+    waylandWindow->setProperty(c_kdeXdgForeignImportedProperty, 
QVariant::fromValue(imported));
+    connect(imported, &QObject::destroyed, waylandWindow, [waylandWindow] {
+        waylandWindow->setProperty(c_kdeXdgForeignImportedProperty, 
QVariant());
     });
 }
+
+#include "moc_windowsystem.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kwindowsystem-6.1.0/src/platforms/xcb/kselectionowner.cpp 
new/kwindowsystem-6.2.0/src/platforms/xcb/kselectionowner.cpp
--- old/kwindowsystem-6.1.0/src/platforms/xcb/kselectionowner.cpp       
2024-04-05 12:59:30.000000000 +0200
+++ new/kwindowsystem-6.2.0/src/platforms/xcb/kselectionowner.cpp       
2024-05-03 14:27:28.000000000 +0200
@@ -7,6 +7,7 @@
 #include "kselectionowner.h"
 
 #include "kwindowsystem.h"
+#include "kxcbevent_p.h"
 #include <config-kwindowsystem.h>
 
 #include <QAbstractNativeEventFilter>
@@ -168,7 +169,7 @@
 {
     state = Idle;
 
-    xcb_client_message_event_t ev;
+    KXcbEvent<xcb_client_message_event_t> ev;
     ev.response_type = XCB_CLIENT_MESSAGE;
     ev.format = 32;
     ev.window = root;
@@ -179,7 +180,7 @@
     ev.data.data32[3] = extra1;
     ev.data.data32[4] = extra2;
 
-    xcb_send_event(connection, false, root, XCB_EVENT_MASK_STRUCTURE_NOTIFY, 
(const char *)&ev);
+    xcb_send_event(connection, false, root, XCB_EVENT_MASK_STRUCTURE_NOTIFY, 
ev.buffer());
 
     // qDebug() << "Claimed selection";
 
@@ -512,14 +513,14 @@
         handled = handle_selection(ev->target, ev->property, ev->requestor);
     }
 
-    xcb_selection_notify_event_t xev;
+    KXcbEvent<xcb_selection_notify_event_t> xev;
     xev.response_type = XCB_SELECTION_NOTIFY;
     xev.selection = ev->selection;
     xev.requestor = ev->requestor;
     xev.target = ev->target;
     xev.property = handled ? ev->property : XCB_NONE;
 
-    xcb_send_event(c, false, ev->requestor, 0, (const char *)&xev);
+    xcb_send_event(c, false, ev->requestor, 0, xev.buffer());
 }
 
 bool KSelectionOwner::handle_selection(xcb_atom_t target_P, xcb_atom_t 
property_P, xcb_window_t requestor_P)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kwindowsystem-6.1.0/src/platforms/xcb/kwindowsystem.cpp 
new/kwindowsystem-6.2.0/src/platforms/xcb/kwindowsystem.cpp
--- old/kwindowsystem-6.1.0/src/platforms/xcb/kwindowsystem.cpp 2024-04-05 
12:59:30.000000000 +0200
+++ new/kwindowsystem-6.2.0/src/platforms/xcb/kwindowsystem.cpp 2024-05-03 
14:27:28.000000000 +0200
@@ -25,5 +25,3 @@
 {
     KX11Extras::setShowingDesktop(showing);
 }
-
-#include "moc_kwindowsystem_p_x11.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwindowsystem-6.1.0/src/platforms/xcb/kxmessages.cpp 
new/kwindowsystem-6.2.0/src/platforms/xcb/kxmessages.cpp
--- old/kwindowsystem-6.1.0/src/platforms/xcb/kxmessages.cpp    2024-04-05 
12:59:30.000000000 +0200
+++ new/kwindowsystem-6.2.0/src/platforms/xcb/kxmessages.cpp    2024-05-03 
14:27:28.000000000 +0200
@@ -8,6 +8,7 @@
 #include "kxmessages.h"
 #include "cptr_p.h"
 #include "kxutils_p.h"
+#include "kxcbevent_p.h"
 
 #if KWINDOWSYSTEM_HAVE_X11
 
@@ -238,7 +239,7 @@
     QByteArray msg = msg_P.toUtf8();
     const size_t len = msg.size();
 
-    xcb_client_message_event_t event;
+    KXcbEvent<xcb_client_message_event_t> event;
     event.response_type = XCB_CLIENT_MESSAGE;
     event.format = 8;
     event.sequence = 0;
@@ -253,7 +254,7 @@
         for (; i < 20; ++i) {
             event.data.data8[i] = 0;
         }
-        xcb_send_event(c, false, w, XCB_EVENT_MASK_PROPERTY_CHANGE, (const 
char *)&event);
+        xcb_send_event(c, false, w, XCB_EVENT_MASK_PROPERTY_CHANGE, 
event.buffer());
         event.type = followingMessage;
         pos += i;
     } while (pos <= len);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kwindowsystem-6.1.0/src/platforms/xcb/netwm.cpp 
new/kwindowsystem-6.2.0/src/platforms/xcb/netwm.cpp
--- old/kwindowsystem-6.1.0/src/platforms/xcb/netwm.cpp 2024-04-05 
12:59:30.000000000 +0200
+++ new/kwindowsystem-6.2.0/src/platforms/xcb/netwm.cpp 2024-05-03 
14:27:28.000000000 +0200
@@ -12,6 +12,7 @@
 
 #include "atoms_p.h"
 #include "netwm_p.h"
+#include "kxcbevent_p.h"
 
 #if KWINDOWSYSTEM_HAVE_X11 // FIXME
 
@@ -356,7 +357,7 @@
 
 static void send_client_message(xcb_connection_t *c, uint32_t mask, 
xcb_window_t destination, xcb_window_t window, xcb_atom_t message, const 
uint32_t data[])
 {
-    xcb_client_message_event_t event;
+    KXcbEvent<xcb_client_message_event_t> event;
     event.response_type = XCB_CLIENT_MESSAGE;
     event.format = 32;
     event.sequence = 0;
@@ -367,7 +368,7 @@
         event.data.data32[i] = data[i];
     }
 
-    xcb_send_event(c, false, destination, mask, (const char *)&event);
+    xcb_send_event(c, false, destination, mask, event.buffer());
 }
 
 template<class Z>
@@ -2778,7 +2779,7 @@
         fprintf(stderr, "NETWinInfo::setState (0x%lx, 0x%lx) (Client)\n", 
state, mask);
 #endif // NETWMDEBUG
 
-        xcb_client_message_event_t event;
+        KXcbEvent<xcb_client_message_event_t> event;
         event.response_type = XCB_CLIENT_MESSAGE;
         event.format = 32;
         event.sequence = 0;
@@ -2792,7 +2793,7 @@
             event.data.data32[1] = p->atom(_NET_WM_STATE_MODAL);
             event.data.data32[2] = 0l;
 
-            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
(const char *)&event);
+            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
event.buffer());
         }
 
         if ((mask & Sticky) && ((p->state & Sticky) != (state & Sticky))) {
@@ -2800,7 +2801,7 @@
             event.data.data32[1] = p->atom(_NET_WM_STATE_STICKY);
             event.data.data32[2] = 0l;
 
-            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
(const char *)&event);
+            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
event.buffer());
         }
 
         if ((mask & Max) && (((p->state & mask) & Max) != (state & Max))) {
@@ -2810,35 +2811,35 @@
                     event.data.data32[0] = 1;
                     event.data.data32[1] = 
p->atom(_NET_WM_STATE_MAXIMIZED_HORZ);
                     event.data.data32[2] = 
p->atom(_NET_WM_STATE_MAXIMIZED_VERT);
-                    xcb_send_event(p->conn, false, p->root, 
netwm_sendevent_mask, (const char *)&event);
+                    xcb_send_event(p->conn, false, p->root, 
netwm_sendevent_mask, event.buffer());
                 } else if ((wishstate & Max) == 0) {
                     event.data.data32[0] = 0;
                     event.data.data32[1] = 
p->atom(_NET_WM_STATE_MAXIMIZED_HORZ);
                     event.data.data32[2] = 
p->atom(_NET_WM_STATE_MAXIMIZED_VERT);
-                    xcb_send_event(p->conn, false, p->root, 
netwm_sendevent_mask, (const char *)&event);
+                    xcb_send_event(p->conn, false, p->root, 
netwm_sendevent_mask, event.buffer());
                 } else {
                     event.data.data32[0] = (wishstate & MaxHoriz) ? 1 : 0;
                     event.data.data32[1] = 
p->atom(_NET_WM_STATE_MAXIMIZED_HORZ);
                     event.data.data32[2] = 0;
-                    xcb_send_event(p->conn, false, p->root, 
netwm_sendevent_mask, (const char *)&event);
+                    xcb_send_event(p->conn, false, p->root, 
netwm_sendevent_mask, event.buffer());
 
                     event.data.data32[0] = (wishstate & MaxVert) ? 1 : 0;
                     event.data.data32[1] = 
p->atom(_NET_WM_STATE_MAXIMIZED_VERT);
                     event.data.data32[2] = 0;
-                    xcb_send_event(p->conn, false, p->root, 
netwm_sendevent_mask, (const char *)&event);
+                    xcb_send_event(p->conn, false, p->root, 
netwm_sendevent_mask, event.buffer());
                 }
             } else if ((wishstate & MaxVert) != (p->state & MaxVert)) {
                 event.data.data32[0] = (wishstate & MaxVert) ? 1 : 0;
                 event.data.data32[1] = p->atom(_NET_WM_STATE_MAXIMIZED_VERT);
                 event.data.data32[2] = 0;
 
-                xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
(const char *)&event);
+                xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
event.buffer());
             } else if ((wishstate & MaxHoriz) != (p->state & MaxHoriz)) {
                 event.data.data32[0] = (wishstate & MaxHoriz) ? 1 : 0;
                 event.data.data32[1] = p->atom(_NET_WM_STATE_MAXIMIZED_HORZ);
                 event.data.data32[2] = 0;
 
-                xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
(const char *)&event);
+                xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
event.buffer());
             }
         }
 
@@ -2847,7 +2848,7 @@
             event.data.data32[1] = p->atom(_NET_WM_STATE_SHADED);
             event.data.data32[2] = 0l;
 
-            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
(const char *)&event);
+            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
event.buffer());
         }
 
         if ((mask & SkipTaskbar) && ((p->state & SkipTaskbar) != (state & 
SkipTaskbar))) {
@@ -2855,7 +2856,7 @@
             event.data.data32[1] = p->atom(_NET_WM_STATE_SKIP_TASKBAR);
             event.data.data32[2] = 0l;
 
-            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
(const char *)&event);
+            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
event.buffer());
         }
 
         if ((mask & SkipPager) && ((p->state & SkipPager) != (state & 
SkipPager))) {
@@ -2863,7 +2864,7 @@
             event.data.data32[1] = p->atom(_NET_WM_STATE_SKIP_PAGER);
             event.data.data32[2] = 0l;
 
-            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
(const char *)&event);
+            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
event.buffer());
         }
 
         if ((mask & SkipSwitcher) && ((p->state & SkipSwitcher) != (state & 
SkipSwitcher))) {
@@ -2871,7 +2872,7 @@
             event.data.data32[1] = p->atom(_KDE_NET_WM_STATE_SKIP_SWITCHER);
             event.data.data32[2] = 0l;
 
-            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
(const char *)&event);
+            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
event.buffer());
         }
 
         if ((mask & Hidden) && ((p->state & Hidden) != (state & Hidden))) {
@@ -2879,7 +2880,7 @@
             event.data.data32[1] = p->atom(_NET_WM_STATE_HIDDEN);
             event.data.data32[2] = 0l;
 
-            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
(const char *)&event);
+            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
event.buffer());
         }
 
         if ((mask & FullScreen) && ((p->state & FullScreen) != (state & 
FullScreen))) {
@@ -2887,7 +2888,7 @@
             event.data.data32[1] = p->atom(_NET_WM_STATE_FULLSCREEN);
             event.data.data32[2] = 0l;
 
-            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
(const char *)&event);
+            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
event.buffer());
         }
 
         if ((mask & KeepAbove) && ((p->state & KeepAbove) != (state & 
KeepAbove))) {
@@ -2895,14 +2896,14 @@
             event.data.data32[1] = p->atom(_NET_WM_STATE_ABOVE);
             event.data.data32[2] = 0l;
 
-            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
(const char *)&event);
+            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
event.buffer());
 
             // deprecated variant
             event.data.data32[0] = (state & KeepAbove) ? 1 : 0;
             event.data.data32[1] = p->atom(_NET_WM_STATE_STAYS_ON_TOP);
             event.data.data32[2] = 0l;
 
-            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
(const char *)&event);
+            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
event.buffer());
         }
 
         if ((mask & KeepBelow) && ((p->state & KeepBelow) != (state & 
KeepBelow))) {
@@ -2910,7 +2911,7 @@
             event.data.data32[1] = p->atom(_NET_WM_STATE_BELOW);
             event.data.data32[2] = 0l;
 
-            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
(const char *)&event);
+            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
event.buffer());
         }
 
         if ((mask & DemandsAttention) && ((p->state & DemandsAttention) != 
(state & DemandsAttention))) {
@@ -2918,7 +2919,7 @@
             event.data.data32[1] = p->atom(_NET_WM_STATE_DEMANDS_ATTENTION);
             event.data.data32[2] = 0l;
 
-            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
(const char *)&event);
+            xcb_send_event(p->conn, false, p->root, netwm_sendevent_mask, 
event.buffer());
         }
 
         // Focused is not added here as it is effectively "read only" set by 
the WM, a client setting it would be silly

Reply via email to