From 53e5ac45c86686ca56b225c3c868e104f3d62972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 25 May 2018 08:58:09 +0100 Subject: [PATCH] drop merge patches --- ...ure-titlebar-close-button-matches-ou.patch | 120 ------------------ libreoffice.spec | 15 +-- 2 files changed, 7 insertions(+), 128 deletions(-) delete mode 100644 0001-rhbz-1392145-ensure-titlebar-close-button-matches-ou.patch diff --git a/0001-rhbz-1392145-ensure-titlebar-close-button-matches-ou.patch b/0001-rhbz-1392145-ensure-titlebar-close-button-matches-ou.patch deleted file mode 100644 index 2ba1d8b..0000000 --- a/0001-rhbz-1392145-ensure-titlebar-close-button-matches-ou.patch +++ /dev/null @@ -1,120 +0,0 @@ -From af8675040370ab7911fe9045fe546338abee20d2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Fri, 16 Mar 2018 16:50:42 +0000 -Subject: [PATCH] rhbz#1392145 ensure titlebar close button matches 'outside' - direction - -Change-Id: I20e925c58adb56acd4d1a63720d330c8b6613441 ---- - vcl/inc/unx/gtk/gtkframe.hxx | 1 + - vcl/source/app/svmain.cxx | 3 ++- - vcl/unx/gtk3/gtk3gtkframe.cxx | 32 +++++++++++++++++++++++++++++++- - 3 files changed, 34 insertions(+), 2 deletions(-) - -diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx -index 0c9b002cb264..bf0ade47db2a 100644 ---- a/vcl/inc/unx/gtk/gtkframe.hxx -+++ b/vcl/inc/unx/gtk/gtkframe.hxx -@@ -173,6 +173,7 @@ class GtkSalFrame : public SalFrame - SalX11Screen m_nXScreen; - GtkWidget* m_pWindow; - #if GTK_CHECK_VERSION(3,0,0) -+ GtkHeaderBar* m_pHeaderBar; - GtkGrid* m_pTopLevelGrid; - #endif - GtkEventBox* m_pEventBox; -diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx -index 8f546feb5f78..63931e8f23b2 100644 ---- a/vcl/source/app/svmain.cxx -+++ b/vcl/source/app/svmain.cxx -@@ -31,7 +31,7 @@ - - #include - #include -- -+#include - #include - #include - #include -@@ -335,6 +335,7 @@ bool InitVCL() - OUString aLocaleString(SvtSysLocaleOptions().GetRealUILanguageTag().getGlibcLocaleString(".UTF-8")); - if (!aLocaleString.isEmpty()) - { -+ MsLangId::getSystemUILanguage(); //call this now to pin what the system UI really was - OUString envVar("LANGUAGE"); - osl_setEnvironment(envVar.pData, aLocaleString.pData); - } -diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx -index 27a65caa3612..c8c98f5c5255 100644 ---- a/vcl/unx/gtk3/gtk3gtkframe.cxx -+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx -@@ -74,6 +74,8 @@ - # include - #endif - -+#include -+ - #include - #include - -@@ -477,6 +479,7 @@ bool GtkSalFrame::doKeyCallback( guint state, - - GtkSalFrame::GtkSalFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) - : m_nXScreen( getDisplay()->GetDefaultXScreen() ) -+ , m_pHeaderBar(nullptr) - , m_pGraphics(nullptr) - , m_bGraphics(false) - { -@@ -489,6 +492,7 @@ GtkSalFrame::GtkSalFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) - - GtkSalFrame::GtkSalFrame( SystemParentData* pSysData ) - : m_nXScreen( getDisplay()->GetDefaultXScreen() ) -+ , m_pHeaderBar(nullptr) - , m_pGraphics(nullptr) - , m_bGraphics(false) - { -@@ -1241,6 +1245,27 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle ) - gtk_window_set_type_hint( GTK_WINDOW(m_pWindow), eType ); - gtk_window_set_gravity( GTK_WINDOW(m_pWindow), GDK_GRAVITY_STATIC ); - gtk_window_set_resizable( GTK_WINDOW(m_pWindow), bool(nStyle & SalFrameStyleFlags::SIZEABLE) ); -+ -+#if defined(GDK_WINDOWING_WAYLAND) -+ //rhbz#1392145 under wayland/csd if we've overridden the default widget direction in order to set LibreOffice's -+ //UI to the configured ui language but the system ui locale is a different text direction, then the toplevel -+ //built-in close button of the titlebar follows the overridden direction rather than continue in the same -+ //direction as every other titlebar on the user's desktop. So if they don't match set an explicit -+ //header bar with the desired 'outside' direction -+ if ((eType == GDK_WINDOW_TYPE_HINT_NORMAL || eType == GDK_WINDOW_TYPE_HINT_DIALOG) && GDK_IS_WAYLAND_DISPLAY(GtkSalFrame::getGdkDisplay())) -+ { -+ const bool bDesktopIsRTL = MsLangId::isRightToLeft(MsLangId::getSystemUILanguage()); -+ const bool bAppIsRTL = gtk_widget_get_default_direction() == GTK_TEXT_DIR_RTL; -+ if (bDesktopIsRTL != bAppIsRTL) -+ { -+ m_pHeaderBar = GTK_HEADER_BAR(gtk_header_bar_new()); -+ gtk_widget_set_direction(GTK_WIDGET(m_pHeaderBar), bDesktopIsRTL ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR); -+ gtk_header_bar_set_show_close_button(m_pHeaderBar, true); -+ gtk_window_set_titlebar(GTK_WINDOW(m_pWindow), GTK_WIDGET(m_pHeaderBar)); -+ gtk_widget_show(GTK_WIDGET(m_pHeaderBar)); -+ } -+ } -+#endif - } - else if( nStyle & SalFrameStyleFlags::FLOAT ) - gtk_window_set_type_hint( GTK_WINDOW(m_pWindow), GDK_WINDOW_TYPE_HINT_POPUP_MENU ); -@@ -1332,7 +1357,12 @@ void GtkSalFrame::SetTitle( const OUString& rTitle ) - { - m_aTitle = rTitle; - if( m_pWindow && ! isChild() ) -- gtk_window_set_title( GTK_WINDOW(m_pWindow), OUStringToOString( rTitle, RTL_TEXTENCODING_UTF8 ).getStr() ); -+ { -+ OString sTitle(OUStringToOString(rTitle, RTL_TEXTENCODING_UTF8)); -+ gtk_window_set_title(GTK_WINDOW(m_pWindow), sTitle.getStr()); -+ if (m_pHeaderBar) -+ gtk_header_bar_set_title(m_pHeaderBar, sTitle.getStr()); -+ } - } - - void GtkSalFrame::SetIcon( sal_uInt16 nIcon ) --- -2.14.3 - diff --git a/libreoffice.spec b/libreoffice.spec index 47c18dd..27219a1 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -270,14 +270,13 @@ Patch2: 0001-Resolves-rhbz-1432468-disable-opencl-by-default.patch Patch3: 0001-gtk3-only-for-3.20.patch Patch4: 0001-Related-tdf-105998-except-cut-and-paste-as-bitmap-in.patch Patch5: 0001-request-installation-of-langpack-via-packagekit.patch -Patch6: 0001-rhbz-1392145-ensure-titlebar-close-button-matches-ou.patch -Patch7: 0001-Related-rhbz-1396729-use-cairo_surface_create_simila.patch -Patch8: 0001-tdf-95843-Wait-for-fire_glxtest_process-also-in-head.patch -Patch9: 0001-Related-tdf-116951-rhbz-1569331-end-should-be-in-ter.patch -Patch10: 0001-Resolves-tdf-116951-rhbz-1569331-start-is-G_MAXINT.patch -Patch11: 0001-set-Referer-on-link-mediadescriptor.patch -Patch12: 0001-Resolves-tdf-117413-char-doubling-appearing-under-X-.patch -Patch13: 0001-Missing-template-clone-in-configmgr-dconf-mode.patch +Patch6: 0001-Related-rhbz-1396729-use-cairo_surface_create_simila.patch +Patch7: 0001-tdf-95843-Wait-for-fire_glxtest_process-also-in-head.patch +Patch8: 0001-Related-tdf-116951-rhbz-1569331-end-should-be-in-ter.patch +Patch9: 0001-Resolves-tdf-116951-rhbz-1569331-start-is-G_MAXINT.patch +Patch10: 0001-set-Referer-on-link-mediadescriptor.patch +Patch11: 0001-Resolves-tdf-117413-char-doubling-appearing-under-X-.patch +Patch12: 0001-Missing-template-clone-in-configmgr-dconf-mode.patch %if 0%{?rhel} # not upstreamed