diff --git a/wxGTK3-3.0.2-size-alloc-fix.patch b/wxGTK3-3.0.2-size-alloc-fix.patch new file mode 100644 index 0000000..0e539d6 --- /dev/null +++ b/wxGTK3-3.0.2-size-alloc-fix.patch @@ -0,0 +1,36 @@ +diff -up wxWidgets-3.0.2/src/gtk/win_gtk.cpp.size-alloc-fix wxWidgets-3.0.2/src/gtk/win_gtk.cpp +--- wxWidgets-3.0.2/src/gtk/win_gtk.cpp.size-alloc-fix 2016-04-04 14:55:37.647728846 -0400 ++++ wxWidgets-3.0.2/src/gtk/win_gtk.cpp 2016-04-04 14:56:36.199637226 -0400 +@@ -192,8 +192,24 @@ static void pizza_remove(GtkContainer* c + } + + #ifdef __WXGTK3__ ++// Get preferred size of children, to avoid GTK+ warnings complaining ++// that they were size-allocated without asking their preferred size ++static void children_get_preferred_size(const GList* p) ++{ ++ for (; p; p = p->next) ++ { ++ const wxPizzaChild* child = static_cast(p->data); ++ if (gtk_widget_get_visible(child->widget)) ++ { ++ GtkRequisition req; ++ gtk_widget_get_preferred_size(child->widget, &req, NULL); ++ } ++ } ++} ++ + static void pizza_get_preferred_width(GtkWidget* widget, int* minimum, int* natural) + { ++ children_get_preferred_size(WX_PIZZA(widget)->m_children); + *minimum = 0; + gtk_widget_get_size_request(widget, natural, NULL); + if (*natural < 0) +@@ -202,6 +218,7 @@ static void pizza_get_preferred_width(Gt + + static void pizza_get_preferred_height(GtkWidget* widget, int* minimum, int* natural) + { ++ children_get_preferred_size(WX_PIZZA(widget)->m_children); + *minimum = 0; + gtk_widget_get_size_request(widget, NULL, natural); + if (*natural < 0) diff --git a/wxGTK3.spec b/wxGTK3.spec index b087415..d6c584f 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 18%{?dist} +Release: 19%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -61,6 +61,11 @@ Patch9: %{name}-%{version}-wayland-window-sizing2.patch # For more details, see the upstream commits: # https://github.com/wxWidgets/wxWidgets/commit/03903c1e459f108e0c464db24064e4cde84f174a Patch10: %{name}-%{version}-media-docs.patch +# Fixes issue with size allocation in GTK 3.19+ +# For more details, see the upstream commit: +# https://github.com/wxWidgets/wxWidgets/commit/9fea81c069f9d803d79c4ce82f87a00a6e10b490 +Patch11: %{name}-%{version}-size-alloc-fix.patch + BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported %if %{gtkver} == 3 @@ -184,6 +189,7 @@ This package provides XML documentation for the %{srcname} library. %patch8 -p1 -b .wayland-window-sizing1 %patch9 -p1 -b .wayland-window-sizing2 %patch10 -p1 -b .media-docs +%patch11 -p1 -b .size-alloc-fix # patch some installed files to avoid conflicts with 2.8.* sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in @@ -321,6 +327,9 @@ popd %doc docs/doxygen/out/xml/* %changelog +* Mon Apr 4 2016 Tom Callaway - 3.0.2-19 +- Add patch to resolve window sizing issue with gtk 3.19+ + * Sun Mar 20 2016 Scott Talbert - 3.0.2-18 - Add patch for wxEVT_MEDIA_XXX event types (for Phoenix)