diff --git a/wxGTK3-3.0.2-blank-menubar-toolbar.patch b/wxGTK3-3.0.2-blank-menubar-toolbar.patch new file mode 100644 index 0000000..c35b2ce --- /dev/null +++ b/wxGTK3-3.0.2-blank-menubar-toolbar.patch @@ -0,0 +1,53 @@ +From 57dce78348cbe93d53c1432ee224e27fdd726982 Mon Sep 17 00:00:00 2001 +From: Paul Cornett +Date: Wed, 25 May 2016 09:39:50 -0700 +Subject: [PATCH] Avoid blank menubar/toolbar when using wx[MT]B_DOCKABLE with + GTK+ 3.20 + +A GTK+ bug involving GtkHandleBox somehow prevents drawing of its child +since 3.19.7. Avoid this by disabling the docking functionality, which +is preferable to having the bar be blank. +See #17539 + +(cherry picked from commit 7e41ac405f4105a7703e37bffd8ab951159f5af0) +--- + src/gtk/menu.cpp | 7 ++++++- + src/gtk/toolbar.cpp | 7 ++++++- + 2 files changed, 12 insertions(+), 2 deletions(-) + +diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp +index 3c5426d..5aa3caf 100644 +--- a/src/gtk/menu.cpp ++++ b/src/gtk/menu.cpp +@@ -141,7 +141,12 @@ void wxMenuBar::Init(size_t n, wxMenu *menus[], const wxString titles[], long st + + m_menubar = gtk_menu_bar_new(); + +- if (style & wxMB_DOCKABLE) ++ if ((style & wxMB_DOCKABLE) ++#ifdef __WXGTK3__ ++ // using GtkHandleBox prevents menubar from drawing with GTK+ >= 3.19.7 ++ && gtk_check_version(3,19,7) ++#endif ++ ) + { + m_widget = gtk_handle_box_new(); + gtk_container_add(GTK_CONTAINER(m_widget), m_menubar); +diff --git a/src/gtk/toolbar.cpp b/src/gtk/toolbar.cpp +index 9416f83..addf63a 100644 +--- a/src/gtk/toolbar.cpp ++++ b/src/gtk/toolbar.cpp +@@ -388,7 +388,12 @@ bool wxToolBar::Create( wxWindow *parent, + #endif + GtkSetStyle(); + +- if (style & wxTB_DOCKABLE) ++ if ((style & wxTB_DOCKABLE) ++#ifdef __WXGTK3__ ++ // using GtkHandleBox prevents toolbar from drawing with GTK+ >= 3.19.7 ++ && gtk_check_version(3,19,7) ++#endif ++ ) + { + m_widget = gtk_handle_box_new(); + diff --git a/wxGTK3.spec b/wxGTK3.spec index b10f4ae..964bbc9 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 31%{?dist} +Release: 32%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -121,6 +121,10 @@ Patch25: %{name}-%{version}-unresizable-windows-hidpi.patch # For more details, see the upstream commit: # https://github.com/wxWidgets/wxWidgets/commit/ec023e99774d90e3ac16a3a5b4e55c6cdf9fb3c1 Patch26: %{name}-%{version}-check-radio-button-rendering.patch +# Fixes blank menubar/toolbar when using wx[MT]B_DOCKABLE with GTK+ 3.20 +# For more details, see the upstream commit: +# https://github.com/wxWidgets/wxWidgets/commit/57dce78348cbe93d53c1432ee224e27fdd726982 +Patch27: %{name}-%{version}-blank-menubar-toolbar.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported @@ -422,6 +426,9 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Sat Jan 07 2017 Scott Talbert - 3.0.2-32 +- Fix blank menubar/toolbar when using wx[MT]B_DOCKABLE (#1410729) + * Wed Dec 28 2016 Scott Talbert - 3.0.2-31 - Fix unresizable windows on HiDPI displays (#1402630) - Fix rendering of check and radio buttons on GTK+ 3.20+ (#1405841)