Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

Please unblock package kvirc

[ Reason ]
This fixes a crash when starting it on Wayland.

[ Impact ]
This allows using the app on Wayland.

[ Tests ]
I've checked the app on a KDE Wayland session on testing.

[ Risks ]
This shouldn't affect X11 users.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing


unblock kvirc/4:5.0.0+dfsg-5
diff -Nru kvirc-5.0.0+dfsg/debian/changelog kvirc-5.0.0+dfsg/debian/changelog
--- kvirc-5.0.0+dfsg/debian/changelog   2020-11-10 22:44:22.000000000 +0500
+++ kvirc-5.0.0+dfsg/debian/changelog   2021-07-10 12:26:08.000000000 +0500
@@ -1,3 +1,9 @@
+kvirc (4:5.0.0+dfsg-5) unstable; urgency=medium
+
+  * Fix a crash on Wayland (Closes: #935726).
+
+ -- Andrey Rahmatullin <w...@debian.org>  Sat, 10 Jul 2021 12:26:08 +0500
+
 kvirc (4:5.0.0+dfsg-4) unstable; urgency=medium
 
   * Team upload.
diff -Nru kvirc-5.0.0+dfsg/debian/patches/series 
kvirc-5.0.0+dfsg/debian/patches/series
--- kvirc-5.0.0+dfsg/debian/patches/series      2020-11-10 22:44:22.000000000 
+0500
+++ kvirc-5.0.0+dfsg/debian/patches/series      2021-07-10 12:26:08.000000000 
+0500
@@ -5,3 +5,4 @@
 enable-optimisation-with-debug.patch
 fix-rfc-links.patch
 upstream_fix-build-with-Qt-5.15.patch
+upstream-wayland-fixes.patch
diff -Nru kvirc-5.0.0+dfsg/debian/patches/upstream-wayland-fixes.patch 
kvirc-5.0.0+dfsg/debian/patches/upstream-wayland-fixes.patch
--- kvirc-5.0.0+dfsg/debian/patches/upstream-wayland-fixes.patch        
1970-01-01 05:00:00.000000000 +0500
+++ kvirc-5.0.0+dfsg/debian/patches/upstream-wayland-fixes.patch        
2021-07-10 12:26:08.000000000 +0500
@@ -0,0 +1,52 @@
+Description: Fix a crash and set the window icon on Wayland.
+Origin: backport, 
https://github.com/kvirc/KVIrc/commit/c8a6812fc26d6c240d7b99b517835e7cb9607e68
+Bug: https://github.com/kvirc/KVIrc/issues/2479
+Bug-Debian: https://bugs.debian.org/935726
+Last-Update: 2021-07-10
+
+diff --git a/src/kvirc/kernel/KviIpcSentinel.cpp 
b/src/kvirc/kernel/KviIpcSentinel.cpp
+index bfa60e6..df5f0e3 100644
+--- a/src/kvirc/kernel/KviIpcSentinel.cpp
++++ b/src/kvirc/kernel/KviIpcSentinel.cpp
+@@ -172,6 +172,12 @@ bool kvi_sendIpcMessage(const char * message)
+       }
+ #elif defined(COMPILE_X11_SUPPORT) && defined(COMPILE_QX11INFO_SUPPORT)
+ 
++#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
++      if (!QX11Info::isPlatformX11()) {
++              return false;
++      }
++#endif
++
+       kvi_ipcLoadAtoms();
+ 
+       Window sentinel = kvi_x11_findIpcSentinel(kvi_ipc_get_xrootwin());
+@@ -196,6 +202,12 @@ KviIpcSentinel::KviIpcSentinel() : QWidget(nullptr)
+       setWindowFlags(Qt::FramelessWindowHint);
+       setWindowTitle("kvirc4_ipc_sentinel");
+ #elif defined(COMPILE_X11_SUPPORT) && defined(COMPILE_QX11INFO_SUPPORT)
++
++#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
++      if (!QX11Info::isPlatformX11()) {
++              return;
++      }
++#endif
+       kvi_ipcLoadAtoms();
+ 
+       XChangeProperty(kvi_ipc_get_xdisplay(), winId(), 
kvi_atom_ipc_sentinel_window, XA_STRING, 8,
+diff --git a/src/kvirc/ui/KviMainWindow.cpp b/src/kvirc/ui/KviMainWindow.cpp
+index a3c6c50..c1b9391 100644
+--- a/src/kvirc/ui/KviMainWindow.cpp
++++ b/src/kvirc/ui/KviMainWindow.cpp
+@@ -105,7 +105,10 @@ KviMainWindow::KviMainWindow(QWidget * pParent)
+       // We try to avois this as much as possible, since it forces the use of 
the low-res 16x16 icon
+       setWindowIcon(*(g_pIconManager->getSmallIcon(KviIconManager::KVIrc)));
+ #endif
+-
++#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
++      // set name of the app desktop file; used by wayland to load the window 
icon
++      QGuiApplication::setDesktopFileName("kvirc");
++#endif
+       setWindowTitle(KVI_DEFAULT_FRAME_CAPTION);
+ 
+       m_pActiveContext = nullptr;

Reply via email to