apply upstream fix for window size allocation with gtk 3.19+

epel8
Tom Callaway 9 years ago
parent 5c3df2730b
commit 263c5a5b31

@ -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<wxPizzaChild*>(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)

@ -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 <tcallawa@redhat.com> - 3.0.2-19
- Add patch to resolve window sizing issue with gtk 3.19+
* Sun Mar 20 2016 Scott Talbert <swt@techie.net> - 3.0.2-18
- Add patch for wxEVT_MEDIA_XXX event types (for Phoenix)

Loading…
Cancel
Save