Hello community, here is the log from the commit of package cinnamon-session for openSUSE:Factory checked in at 2016-10-10 16:25:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cinnamon-session (Old) and /work/SRC/openSUSE:Factory/.cinnamon-session.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cinnamon-session" Changes: -------- --- /work/SRC/openSUSE:Factory/cinnamon-session/cinnamon-session.changes 2016-05-23 16:40:07.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.cinnamon-session.new/cinnamon-session.changes 2016-10-10 16:25:13.000000000 +0200 @@ -1,0 +2,7 @@ +Sat Oct 8 19:13:17 UTC 2016 - [email protected] + +- Add cinnamon-session-qt-5.7-styleoverride.patch: On Qt 5.7+ use + Gtk2 Platform Theme and don't set QT_STYLE_OVERRIDE to "gtk" + (boo#1002900). + +------------------------------------------------------------------- New: ---- cinnamon-session-qt-5.7-styleoverride.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cinnamon-session.spec ++++++ --- /var/tmp/diff_new_pack.lSiHFZ/_old 2016-10-10 16:25:15.000000000 +0200 +++ /var/tmp/diff_new_pack.lSiHFZ/_new 2016-10-10 16:25:15.000000000 +0200 @@ -25,11 +25,13 @@ Url: https://github.com/linuxmint/cinnamon-session Source: https://github.com/linuxmint/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: %{name}-logind.gschema.override +# PATCH-FIX-OPENSUSE cinnamon-session-qt-5.7-styleoverride.patch boo#1002900 [email protected] -- On Qt 5.7+ use Gtk2 Platform Theme and don't set QT_STYLE_OVERRIDE to "gtk". +Patch0: cinnamon-session-qt-5.7-styleoverride.patch BuildRequires: docutils BuildRequires: gnome-common BuildRequires: hicolor-icon-theme BuildRequires: libtool -BuildRequires: pkg-config +BuildRequires: pkgconfig BuildRequires: tcpd-devel BuildRequires: update-desktop-files BuildRequires: xmlto @@ -60,18 +62,24 @@ %prep %setup -q +%patch0 -p1 %build NOCONFIGURE=1 gnome-autogen.sh -%configure -make %{?_smp_mflags} +%configure \ +%if 0%{?suse_version} > 1320 || (0%{?sle_version} >= 120300 && 0%{?is_opensuse}) + --enable-qt57-theme-support +%else + --disable-qt57-theme-support +%endif +make %{?_smp_mflags} V=1 %install %make_install %find_lang %{name}-3.0 %{?no_lang_C} # We should own this directory. -mkdir -p %{buildroot}%{_datadir}/%{name}/sessions +mkdir -p %{buildroot}%{_datadir}/%{name}/sessions/ # Fix documentation location. mkdir -p %{buildroot}%{_docdir}/ @@ -79,7 +87,8 @@ %{buildroot}%{_docdir}/%{name}/ # Use systemd-logind for suspend by default. -install -Dm 0644 %{SOURCE1} %{buildroot}%{_datadir}/glib-2.0/schemas/org.cinnamon.desktop.session.gschema.override +install -Dpm 0644 %{SOURCE1} \ + %{buildroot}%{_datadir}/glib-2.0/schemas/org.cinnamon.desktop.session.gschema.override %post %desktop_database_post ++++++ cinnamon-session-qt-5.7-styleoverride.patch ++++++ --- a/cinnamon-session/main.c +++ b/cinnamon-session/main.c @@ -383,8 +383,16 @@ main (int argc, char **argv) */ csm_util_setenv ("GNOME_DESKTOP_SESSION_ID", "this-is-deprecated"); - /* Make QT5 apps follow the GTK style */ - csm_util_setenv ("QT_STYLE_OVERRIDE", "gtk"); + /* Make Qt5 apps follow the GTK+ style */ + if (!HAVE_QT57 && g_getenv ("QT_STYLE_OVERRIDE") == NULL) { + csm_util_setenv ("QT_STYLE_OVERRIDE", "gtk"); + } else if (HAVE_QT57 && g_getenv ("QT_STYLE_OVERRIDE") != NULL) { + g_unsetenv ("QT_STYLE_OVERRIDE"); + } + + if (HAVE_QT57 && g_getenv ("QT_QPA_PLATFORMTHEME") == NULL) { + csm_util_setenv ("QT_QPA_PLATFORMTHEME", "gtk2"); + } /* GTK Overlay scrollbars */ settings = g_settings_new ("org.cinnamon.desktop.interface"); --- a/configure.ac +++ b/configure.ac @@ -108,6 +108,19 @@ AC_SUBST(LOGIND_CFLAGS) AC_SUBST(LOGIND_LIBS) dnl ==================================================================== +dnl Check for Qt 5.7+ to set correct env var for theme/styling +dnl ==================================================================== +AC_DEFINE([HAVE_QT57], [0], [Have Qt 5.7+]) +AC_ARG_ENABLE(qt57_theme_support, + AS_HELP_STRING([--enable-qt57-theme-support], [Support GTK+ styles for Qt apps with Qt 5.7+]), + [enable_qt57_theme_support=yes], + [enable_qt57_theme_support=no]) + +if test x$enable_qt57_theme_support = xyes; then + AC_DEFINE([HAVE_QT57], [1]) +fi + +dnl ==================================================================== dnl X development libraries check dnl ====================================================================
