From 566253fdf62bd3a3aa17b708f1c2c50c1946fec7 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Sep 27 2019 14:20:56 +0000 Subject: Set XCURSOR_SIZE only on wayland --- diff --git a/qgnomeplatform-cursor-only-on-wayland.patch b/qgnomeplatform-cursor-only-on-wayland.patch new file mode 100644 index 0000000..aa3b862 --- /dev/null +++ b/qgnomeplatform-cursor-only-on-wayland.patch @@ -0,0 +1,45 @@ +diff --git a/common/common.pro b/common/common.pro +index 99bb9e3..c244613 100644 +--- a/common/common.pro ++++ b/common/common.pro +@@ -8,6 +8,7 @@ CONFIG += c++11 \ + QT += core \ + dbus \ + theme_support-private \ ++ x11extras \ + widgets + + PKGCONFIG += gtk+-3.0 \ +diff --git a/common/gnomehintssettings.cpp b/common/gnomehintssettings.cpp +index b50bd34..2a1d172 100644 +--- a/common/gnomehintssettings.cpp ++++ b/common/gnomehintssettings.cpp +@@ -36,6 +36,8 @@ + #include + #include + ++#include ++ + Q_LOGGING_CATEGORY(QGnomePlatform, "qt.qpa.qgnomeplatform") + + const QDBusArgument &operator>>(const QDBusArgument &argument, QMap &map) +@@ -119,7 +121,8 @@ GnomeHintsSettings::GnomeHintsSettings() + m_hints[QPlatformTheme::IconPixmapSizes] = QVariant::fromValue(QList() << 512 << 256 << 128 << 64 << 32 << 22 << 16 << 8); + m_hints[QPlatformTheme::PasswordMaskCharacter] = QVariant(QChar(0x2022)); + +- cursorSizeChanged(); ++ if (!QX11Info::isPlatformX11()) ++ cursorSizeChanged(); + + // Watch for changes + QStringList watchList = { "changed::gtk-theme", "changed::icon-theme", "changed::cursor-blink-time", "changed::font-name", "changed::monospace-font-name", "changed::cursor-size" }; +@@ -177,7 +180,8 @@ void GnomeHintsSettings::gsettingPropertyChanged(GSettings *settings, gchar *key + } else if (changedProperty == QLatin1String("monospace-font-name")) { + gnomeHintsSettings->fontChanged(); + } else if (changedProperty == QLatin1String("cursor-size")) { +- gnomeHintsSettings->cursorSizeChanged(); ++ if (!QX11Info::isPlatformX11()) ++ gnomeHintsSettings->cursorSizeChanged(); + } else { + qCDebug(QGnomePlatform) << "GSetting property change: " << key; + } diff --git a/qgnomeplatform.spec b/qgnomeplatform.spec index a397bee..7359e3f 100644 --- a/qgnomeplatform.spec +++ b/qgnomeplatform.spec @@ -1,7 +1,7 @@ Name: qgnomeplatform Version: 0.5 -Release: 15%{?dist} +Release: 16%{?dist} Summary: Qt Platform Theme aimed to accommodate Gnome settings License: LGPLv2+ @@ -12,6 +12,7 @@ Source0: https://github.com/MartinBriza/QGnomePlatform/archive/%{version} Patch0: qgnomeplatform-gnome-decorations.patch Patch1: qgnomeplatform-fix-cursor-size.patch Patch2: qgnomeplatform-double-click-to-maximize.patch +Patch3: qgnomeplatform-cursor-only-on-wayland.patch BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(udev) @@ -60,6 +61,9 @@ make install INSTALL_ROOT=%{buildroot} -C %{_target_platform} %{_qt5_libdir}/qt5/plugins/wayland-decoration-client/libqgnomeplatformdecoration.so %changelog +* Fri Sep 27 2019 Jan Grulich - 0.5-16 +- Set XCURSOR_SIZE only on wayland + * Fri Sep 27 2019 Jan Grulich - 0.5-15 - Add support for double-click to maximize windows