From ff74a613035f6897a5cc8106285c31392871abc6 Mon Sep 17 00:00:00 2001 From: "alexjnewt@hotmail.com" Date: Thu, 27 Feb 2014 19:49:08 -0500 Subject: [PATCH 01/94] Fixed GTK3 bug with wx-config - Fixed a unused-direct-shlib-dependency error --- .gitignore | 2 + sources | 2 + wx-config | 45 ++++++ wxGTK3-3.0.0-gtk3_build.patch | 20 +++ wxGTK3.spec | 262 ++++++++++++++++++++++++++++++++++ 5 files changed, 331 insertions(+) create mode 100644 wx-config create mode 100644 wxGTK3-3.0.0-gtk3_build.patch create mode 100644 wxGTK3.spec diff --git a/.gitignore b/.gitignore index e69de29..a506246 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +/wxWidgets-3.0.0-docs-html.tar.bz2 +/wxWidgets-3.0.0.tar.bz2 diff --git a/sources b/sources index e69de29..3f2354d 100644 --- a/sources +++ b/sources @@ -0,0 +1,2 @@ +d356e1a86c33d7ebe1f5c4a94e844f37 wxWidgets-3.0.0-docs-html.tar.bz2 +241998efc12205172ed24c18788ea2cd wxWidgets-3.0.0.tar.bz2 diff --git a/wx-config b/wx-config new file mode 100644 index 0000000..014cfaf --- /dev/null +++ b/wx-config @@ -0,0 +1,45 @@ +#! /bin/sh +# +# Multilib-aware wrapper for the wx-config script +# +# Usage: wx-config [--arch ] +# + +version=3.0 + +if [ $# -ge 2 ]; then + if [ $1 = "--arch" ]; then + arch=$2 + shift 2 + fi +fi + +if [ -z $arch ]; then + arch=`uname -m` +fi + +case $arch in + i?86|ppc|s390|sparc|arm*|ia64) + libdir=/usr/lib + ;; + x86_64|ppc64|s390x|sparc64) + libdir=/usr/lib64 + ;; + *) + echo "Unsupported architecture '$arch'" + exit 8 + ;; +esac + +wxconfig=$libdir/wx/config/gtk2-unicode-$version +# special case when using 32-bit userspace and 64-bit kernel +if [ ! -f $wxconfig -a \( $arch = ppc64 -o $arch = sparc64 \) ]; then + wxconfig=/usr/lib/wx/config/gtk2-unicode-$version +fi + +if [ -x $wxconfig ]; then + exec $wxconfig $@ +else + echo "wxWidgets3-devel isn't installed for architecture '$arch'" + exit 9 +fi diff --git a/wxGTK3-3.0.0-gtk3_build.patch b/wxGTK3-3.0.0-gtk3_build.patch new file mode 100644 index 0000000..1038981 --- /dev/null +++ b/wxGTK3-3.0.0-gtk3_build.patch @@ -0,0 +1,20 @@ +Index: /wxWidgets/trunk/src/gtk/toplevel.cpp +=================================================================== +--- src/gtk/toplevel.cpp (revision 74977) ++++ src/gtk/toplevel.cpp (revision 75182) +@@ -39,4 +39,7 @@ + #include // XA_CARDINAL + #include "wx/unix/utilsx11.h" ++#endif ++#ifdef GDK_WINDOWING_WAYLAND ++ #include + #endif + +@@ -731,5 +734,5 @@ + #if defined(GDK_WINDOWING_WAYLAND) && GTK_CHECK_VERSION(3,10,0) + else if ( +- GDK_IS_WAYLAND_SCREEN(gtk_window_get_screen(GTK_WINDOW(m_widget))) && ++ GDK_IS_WAYLAND_DISPLAY(gtk_widget_get_display(m_widget)) && + gtk_check_version(3,10,0) == NULL) + { + diff --git a/wxGTK3.spec b/wxGTK3.spec new file mode 100644 index 0000000..880abc2 --- /dev/null +++ b/wxGTK3.spec @@ -0,0 +1,262 @@ +%global srcname wxWidgets +%global wxgtkname wxGTK3 +%global wxbasename wxBase3 +#RHEL 6 does not have gtk3 +#RHEL prior to 6 is unsupported by this package +%if 0%{?el6} +%global gtkver 2 +%else +%global gtkver 3 +%endif + +Name: %{wxgtkname} +Version: 3.0.0 +Release: 4%{?dist} +Summary: GTK port of the wxWidgets GUI library +License: wxWidgets +Group: System Environment/Libraries +URL: http://www.wxwidgets.org/ +Source0: http://downloads.sf.net/wxwindows/%{srcname}-%{version}.tar.bz2 +Source1: http://downloads.sf.net/wxwindows/%{srcname}-%{version}-docs-html.tar.bz2 +Source10: wx-config + +# http://trac.wxwidgets.org/ticket/15667 +Patch0: %{name}-3.0.0-gtk3_build.patch + +BuildRequires: gtk%{gtkver}-devel +#Note webkitgtk (GTK2) does not appear to be supported +%if %{gtkver} == 3 +BuildRequires: webkitgtk3-devel +%endif +BuildRequires: zlib-devel +BuildRequires: libpng-devel +BuildRequires: libjpeg-devel +BuildRequires: libtiff-devel +BuildRequires: expat-devel +BuildRequires: SDL-devel +BuildRequires: libgnomeprintui22-devel +BuildRequires: libGLU-devel +BuildRequires: libSM-devel +BuildRequires: gstreamer-plugins-base-devel +BuildRequires: GConf2-devel +BuildRequires: gettext +BuildRequires: cppunit-devel +BuildRequires: libmspack-devel + +Provides: %{srcname} = %{version}-%{release} +Requires: %{wxbasename}%{?_isa} = %{version}-%{release} + +%description +wxWidgets is the GTK port of the C++ cross-platform wxWidgets +GUI library, offering classes for all common GUI controls as well as a +comprehensive set of helper classes for most common application tasks, +ranging from networking to HTML display and image manipulation. + + +%package devel +Group: Development/Libraries +Summary: Development files for the wxGTK3 library +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-gl = %{version}-%{release} +Requires: %{name}-media = %{version}-%{release} +Requires: %{wxbasename} = %{version}-%{release} +Requires: gtk%{gtkver}-devel +Requires: libGLU-devel +Provides: %{srcname}-devel = %{version}-%{release} + +%description devel +This package include files needed to link with the wxGTK3 library. +wxWidgets is the GTK port of the C++ cross-platform wxWidgets +GUI library, offering classes for all common GUI controls as well as a +comprehensive set of helper classes for most common application tasks, +ranging from networking to HTML display and image manipulation. + + +%package gl +Summary: OpenGL add-on for the wxWidgets library +Group: System Environment/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description gl +OpenGL (a 3D graphics API) add-on for the wxWidgets library. +wxWidgets is the GTK port of the C++ cross-platform wxWidgets +GUI library, offering classes for all common GUI controls as well as a +comprehensive set of helper classes for most common application tasks, +ranging from networking to HTML display and image manipulation. + + +%package media +Summary: Multimedia add-on for the wxWidgets library +Group: System Environment/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description media +Multimedia add-on for the wxWidgets library. +wxWidgets is the GTK port of the C++ cross-platform wxWidgets +GUI library, offering classes for all common GUI controls as well as a +comprehensive set of helper classes for most common application tasks, +ranging from networking to HTML display and image manipulation. + + +%package -n %{wxbasename} +Summary: Non-GUI support classes from the wxWidgets library +Group: System Environment/Libraries + +%description -n %{wxbasename} +Every wxWidgets application must link against this library. It contains +mandatory classes that any wxWidgets code depends on (like wxString) and +portability classes that abstract differences between platforms. wxBase can +be used to develop console mode applications -- it does not require any GUI +libraries or the X Window System. + + +%package docs +Group: Development/Libraries +Summary: Documentation for the wxGTK3 library +Requires: %{name}%{?_isa} = %{version}-%{release} +Provides: %{srcname}-docs = %{version}-%{release} +BuildArch: noarch + +%description docs +This package provides documentation for the %{srcname} library. + + +%prep +%setup -q -n %{srcname}-%{version} -a 1 + +# in case of gtk3 +%if %{gtkver} == 3 +%patch0 -p0 -b .GTK3 +sed -i -e 's|gtk2|gtk3|' %{SOURCE10} +%endif + +# patch some installed files to avoid conflicts with 2.8.* +sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in +sed -i -e 's|wxstd.mo|wxstd3.mo|' Makefile.in +sed -i -e 's|wxmsw.mo|wxmsw3.mo|' Makefile.in + +# rename docs directory +mv %{srcname}-%{version} html + +sed -i -e 's|/usr/lib\b|%{_libdir}|' wx-config.in configure + +# fix plugin dir for 64-bit +sed -i -e 's|/lib|/%{_lib}|' src/unix/stdpaths.cpp + + +%build +# likely still dereferences type-punned pointers +CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" +CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" +# fix unused-direct-shlib-dependency error: +export LDFLAGS="-Wl,--as-needed" + +%configure \ + --with-gtk=%{gtkver} \ + --with-opengl \ + --with-sdl \ + --with-gnomeprint \ + --with-libmspack \ + --enable-intl \ + --enable-no_deps \ + --disable-rpath \ + --enable-ipv6 \ + --disable-catch_segvs \ + --disable-compat28 + +make %{?_smp_mflags} + +%install +%makeinstall + +# install our multilib-aware wrapper +rm %{buildroot}%{_bindir}/wx-config +rm %{buildroot}%{_bindir}/wxrc +install -p -m 755 %{SOURCE10} %{buildroot}%{_bindir}/wx-config-3.0 + +# move bakefiles to avoid conflicts with 2.8.* +mkdir %{buildroot}%{_datadir}/bakefile/presets/wx3 +mv %{buildroot}%{_datadir}/bakefile/presets/*.* %{buildroot}%{_datadir}/bakefile/presets/wx3 + +%find_lang wxstd3 +%find_lang wxmsw3 +cat wxmsw3.lang >> wxstd3.lang + +%check +pushd tests +make %{?_smp_mflags} test +popd + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%post gl -p /sbin/ldconfig +%postun gl -p /sbin/ldconfig + +%post media -p /sbin/ldconfig +%postun media -p /sbin/ldconfig + +%post -n %{wxbasename} -p /sbin/ldconfig +%postun -n %{wxbasename} -p /sbin/ldconfig + +%files -f wxstd3.lang +%doc docs/changes.txt docs/gpl.txt docs/lgpl.txt docs/licence.txt +%doc docs/licendoc.txt docs/preamble.txt docs/readme.txt +%{_libdir}/libwx_gtk%{gtkver}u_adv-*.so.* +%{_libdir}/libwx_gtk%{gtkver}u_aui-*.so.* +%{_libdir}/libwx_gtk%{gtkver}u_core-*.so.* +%{_libdir}/libwx_gtk%{gtkver}u_html-*.so.* +%{_libdir}/libwx_gtk%{gtkver}u_propgrid-*.so.* +%{_libdir}/libwx_gtk%{gtkver}u_qa-*.so.* +%{_libdir}/libwx_gtk%{gtkver}u_ribbon-*.so.* +%{_libdir}/libwx_gtk%{gtkver}u_richtext-*.so.* +%{_libdir}/libwx_gtk%{gtkver}u_stc-*.so.* +%if %{gtkver} == 3 +%{_libdir}/libwx_gtk%{gtkver}u_webview-*.so.* +%endif +%{_libdir}/libwx_gtk%{gtkver}u_xrc-*.so.* + +%files devel +%{_bindir}/wx-config* +%{_bindir}/wxrc-3.0 +%{_includedir}/wx-3.0 +%{_libdir}/libwx_*.so +%{_libdir}/wx +%{_datadir}/aclocal/wxwin3.m4 +%{_datadir}/bakefile/presets/wx3/ + +%files gl +%{_libdir}/libwx_gtk%{gtkver}u_gl-*.so.* + +%files media +%{_libdir}/libwx_gtk%{gtkver}u_media-*.so.* + +%files -n %{wxbasename} +%doc docs/changes.txt docs/gpl.txt docs/lgpl.txt docs/licence.txt +%doc docs/licendoc.txt docs/preamble.txt docs/readme.txt +%{_libdir}/libwx_baseu-*.so.* +%{_libdir}/libwx_baseu_net-*.so.* +%{_libdir}/libwx_baseu_xml-*.so.* + +%files docs +%doc html + +%changelog +* Wed Feb 19 2014 Jeremy Newton - 3.0.0-4 +- Fixed GTK3 bug with wx-config +- Fixed a unused-direct-shlib-dependency error + +* Mon Feb 17 2014 Jeremy Newton - 3.0.0-3 +- Added patch to avoid build fail on gtk 3.10+ +- Reverted patching to make devel package compatible with wxGTK-devel +- Added combatibility for RHEL 6+ +- Changed all mention of GTK3 and GTK2 to GTK for consistency + +* Mon Feb 10 2014 Jeremy Newton - 3.0.0-2 +- Changed to build against gtk3 +- Add webkit to build requires +- Removed patching to make devel package compatible with wxGTK-devel +- Disable 2.8.* combatibility (redundant functionality) + +* Sat Jan 4 2014 Jeremy Newton - 3.0.0-1 +- Initial build of wxwidgets version 3, mostly based on wxGTK spec From 5d8810e546dcb06651d960524dd0077b385fc83c Mon Sep 17 00:00:00 2001 From: "alexjnewt@hotmail.com" Date: Sun, 2 Mar 2014 09:26:14 -0500 Subject: [PATCH 02/94] Minor fix --- wxGTK3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index 880abc2..a66025a 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -113,7 +113,7 @@ libraries or the X Window System. %package docs Group: Development/Libraries Summary: Documentation for the wxGTK3 library -Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} Provides: %{srcname}-docs = %{version}-%{release} BuildArch: noarch From bc8166e15b3911e36e28322457598f811eef1766 Mon Sep 17 00:00:00 2001 From: "alexjnewt@hotmail.com" Date: Mon, 17 Mar 2014 22:33:17 -0400 Subject: [PATCH 03/94] Minor fix --- wxGTK3.spec | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index a66025a..0623237 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -21,7 +21,7 @@ Source1: http://downloads.sf.net/wxwindows/%{srcname}-%{version}-docs-htm Source10: wx-config # http://trac.wxwidgets.org/ticket/15667 -Patch0: %{name}-3.0.0-gtk3_build.patch +Patch0: %{name}-3.0.0-gtk3_build.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported @@ -60,7 +60,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}-gl = %{version}-%{release} Requires: %{name}-media = %{version}-%{release} Requires: %{wxbasename} = %{version}-%{release} -Requires: gtk%{gtkver}-devel +Requires: gtk%{gtkver}-devel Requires: libGLU-devel Provides: %{srcname}-devel = %{version}-%{release} @@ -161,8 +161,7 @@ export LDFLAGS="-Wl,--as-needed" --enable-no_deps \ --disable-rpath \ --enable-ipv6 \ - --disable-catch_segvs \ - --disable-compat28 + --disable-catch_segvs make %{?_smp_mflags} @@ -242,6 +241,9 @@ popd %doc html %changelog +* Mon Mar 17 2014 Jeremy Newton - 3.0.0-5 +- Renable combat28 - without it causes bugs RH#1076617 and a few others + * Wed Feb 19 2014 Jeremy Newton - 3.0.0-4 - Fixed GTK3 bug with wx-config - Fixed a unused-direct-shlib-dependency error From e6c1c37645e7cd423698f7eee99583e622bde244 Mon Sep 17 00:00:00 2001 From: "alexjnewt@hotmail.com" Date: Tue, 18 Mar 2014 07:09:06 -0400 Subject: [PATCH 04/94] Another minor fix --- wxGTK3.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index 0623237..f689059 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -160,8 +160,7 @@ export LDFLAGS="-Wl,--as-needed" --enable-intl \ --enable-no_deps \ --disable-rpath \ - --enable-ipv6 \ - --disable-catch_segvs + --enable-ipv6 make %{?_smp_mflags} @@ -241,6 +240,9 @@ popd %doc html %changelog +* Tue Mar 18 2014 Jeremy Newton - 3.0.0-6 +- Removed disable-catch_segvs, see RH#1076617 + * Mon Mar 17 2014 Jeremy Newton - 3.0.0-5 - Renable combat28 - without it causes bugs RH#1076617 and a few others From f5015074d2f3c5e535f113fd9ef6bf73bbbf1a7a Mon Sep 17 00:00:00 2001 From: "alexjnewt@hotmail.com" Date: Tue, 18 Mar 2014 07:10:47 -0400 Subject: [PATCH 05/94] Forgot to bump the release ver --- wxGTK3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index f689059..316c077 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries From 992ca3af33b18d6638a98eca3d0b75fe43a39ee5 Mon Sep 17 00:00:00 2001 From: "alexjnewt@hotmail.com" Date: Thu, 3 Apr 2014 22:16:56 -0400 Subject: [PATCH 06/94] Temp fix for devel... still working out a good solution --- wxGTK3.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index 316c077..ae463cd 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.0 -Release: 6%{?dist} +Release: 7%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -62,6 +62,7 @@ Requires: %{name}-media = %{version}-%{release} Requires: %{wxbasename} = %{version}-%{release} Requires: gtk%{gtkver}-devel Requires: libGLU-devel +Conflicts: wxGTK-devel Provides: %{srcname}-devel = %{version}-%{release} %description devel @@ -171,6 +172,7 @@ make %{?_smp_mflags} rm %{buildroot}%{_bindir}/wx-config rm %{buildroot}%{_bindir}/wxrc install -p -m 755 %{SOURCE10} %{buildroot}%{_bindir}/wx-config-3.0 +ln -s %{buildroot}%{_bindir}/wx-config-3.0 %{buildroot}%{_bindir}/wx-config # move bakefiles to avoid conflicts with 2.8.* mkdir %{buildroot}%{_datadir}/bakefile/presets/wx3 @@ -240,6 +242,10 @@ popd %doc html %changelog +* Thu Apr 3 2014 Jeremy Newton - 3.0.0-7 +- Removed wxGTK-devel compatiblity in favour for a wx-config symlink + see bug RH#1077718 + * Tue Mar 18 2014 Jeremy Newton - 3.0.0-6 - Removed disable-catch_segvs, see RH#1076617 From bf340e965ddde1f1e5241d025ee7f42374a9c133 Mon Sep 17 00:00:00 2001 From: "alexjnewt@hotmail.com" Date: Thu, 3 Apr 2014 23:16:17 -0400 Subject: [PATCH 07/94] Minor fix to last commit --- wxGTK3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index ae463cd..44d808c 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -172,7 +172,7 @@ make %{?_smp_mflags} rm %{buildroot}%{_bindir}/wx-config rm %{buildroot}%{_bindir}/wxrc install -p -m 755 %{SOURCE10} %{buildroot}%{_bindir}/wx-config-3.0 -ln -s %{buildroot}%{_bindir}/wx-config-3.0 %{buildroot}%{_bindir}/wx-config +ln -s %{_bindir}/wx-config-3.0 %{buildroot}%{_bindir}/wx-config # move bakefiles to avoid conflicts with 2.8.* mkdir %{buildroot}%{_datadir}/bakefile/presets/wx3 From a13e2dbe0152b31cc592a2e0d5839b6a8f089866 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 8 Jun 2014 00:00:52 -0500 Subject: [PATCH 08/94] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- wxGTK3.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index 44d808c..bc4ca2a 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.0 -Release: 7%{?dist} +Release: 8%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -242,6 +242,9 @@ popd %doc html %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 3.0.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Thu Apr 3 2014 Jeremy Newton - 3.0.0-7 - Removed wxGTK-devel compatiblity in favour for a wx-config symlink see bug RH#1077718 From b365113aad9c36b961fd87daa331e6d3cd9a03cf Mon Sep 17 00:00:00 2001 From: "alexjnewt@hotmail.com" Date: Fri, 11 Jul 2014 19:50:40 -0400 Subject: [PATCH 09/94] Update to 3.0.1, fixes RH#1111903 --- .gitignore | 2 ++ sources | 4 ++-- wxGTK3-3.0.0-gtk3_build.patch | 20 -------------------- wxGTK3.spec | 18 ++++-------------- 4 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 wxGTK3-3.0.0-gtk3_build.patch diff --git a/.gitignore b/.gitignore index a506246..135635a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ /wxWidgets-3.0.0-docs-html.tar.bz2 /wxWidgets-3.0.0.tar.bz2 +/wxWidgets-3.0.1-docs-html.tar.bz2 +/wxWidgets-3.0.1.tar.bz2 diff --git a/sources b/sources index 3f2354d..bae4198 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -d356e1a86c33d7ebe1f5c4a94e844f37 wxWidgets-3.0.0-docs-html.tar.bz2 -241998efc12205172ed24c18788ea2cd wxWidgets-3.0.0.tar.bz2 +47dbdd5adf5a7a2c9d3dd58b3d78c9c7 wxWidgets-3.0.1-docs-html.tar.bz2 +dad1f1cd9d4c370cbc22700dc492da31 wxWidgets-3.0.1.tar.bz2 diff --git a/wxGTK3-3.0.0-gtk3_build.patch b/wxGTK3-3.0.0-gtk3_build.patch deleted file mode 100644 index 1038981..0000000 --- a/wxGTK3-3.0.0-gtk3_build.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: /wxWidgets/trunk/src/gtk/toplevel.cpp -=================================================================== ---- src/gtk/toplevel.cpp (revision 74977) -+++ src/gtk/toplevel.cpp (revision 75182) -@@ -39,4 +39,7 @@ - #include // XA_CARDINAL - #include "wx/unix/utilsx11.h" -+#endif -+#ifdef GDK_WINDOWING_WAYLAND -+ #include - #endif - -@@ -731,5 +734,5 @@ - #if defined(GDK_WINDOWING_WAYLAND) && GTK_CHECK_VERSION(3,10,0) - else if ( -- GDK_IS_WAYLAND_SCREEN(gtk_window_get_screen(GTK_WINDOW(m_widget))) && -+ GDK_IS_WAYLAND_DISPLAY(gtk_widget_get_display(m_widget)) && - gtk_check_version(3,10,0) == NULL) - { - diff --git a/wxGTK3.spec b/wxGTK3.spec index bc4ca2a..3da6b57 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -10,8 +10,8 @@ %endif Name: %{wxgtkname} -Version: 3.0.0 -Release: 8%{?dist} +Version: 3.0.1 +Release: 1%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -20,9 +20,6 @@ Source0: http://downloads.sf.net/wxwindows/%{srcname}-%{version}.tar.bz2 Source1: http://downloads.sf.net/wxwindows/%{srcname}-%{version}-docs-html.tar.bz2 Source10: wx-config -# http://trac.wxwidgets.org/ticket/15667 -Patch0: %{name}-3.0.0-gtk3_build.patch - BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported %if %{gtkver} == 3 @@ -62,7 +59,6 @@ Requires: %{name}-media = %{version}-%{release} Requires: %{wxbasename} = %{version}-%{release} Requires: gtk%{gtkver}-devel Requires: libGLU-devel -Conflicts: wxGTK-devel Provides: %{srcname}-devel = %{version}-%{release} %description devel @@ -127,7 +123,6 @@ This package provides documentation for the %{srcname} library. # in case of gtk3 %if %{gtkver} == 3 -%patch0 -p0 -b .GTK3 sed -i -e 's|gtk2|gtk3|' %{SOURCE10} %endif @@ -172,7 +167,6 @@ make %{?_smp_mflags} rm %{buildroot}%{_bindir}/wx-config rm %{buildroot}%{_bindir}/wxrc install -p -m 755 %{SOURCE10} %{buildroot}%{_bindir}/wx-config-3.0 -ln -s %{_bindir}/wx-config-3.0 %{buildroot}%{_bindir}/wx-config # move bakefiles to avoid conflicts with 2.8.* mkdir %{buildroot}%{_datadir}/bakefile/presets/wx3 @@ -242,12 +236,8 @@ popd %doc html %changelog -* Sun Jun 08 2014 Fedora Release Engineering - 3.0.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Thu Apr 3 2014 Jeremy Newton - 3.0.0-7 -- Removed wxGTK-devel compatiblity in favour for a wx-config symlink - see bug RH#1077718 +* Sat Jul 5 2014 Jeremy Newton - 3.0.1-1 +- Bump to 3.0.1 RH#1076617 * Tue Mar 18 2014 Jeremy Newton - 3.0.0-6 - Removed disable-catch_segvs, see RH#1076617 From e711fbfaf9a85d649ffe272d4689b54dbc7db03d Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 18 Aug 2014 09:00:47 +0000 Subject: [PATCH 10/94] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- wxGTK3.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index 3da6b57..c953c16 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -236,6 +236,9 @@ popd %doc html %changelog +* Mon Aug 18 2014 Fedora Release Engineering - 3.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sat Jul 5 2014 Jeremy Newton - 3.0.1-1 - Bump to 3.0.1 RH#1076617 From 6a6f41362e436488f1919f479f8ac5f127be9c41 Mon Sep 17 00:00:00 2001 From: "alexjnewt@hotmail.com" Date: Thu, 2 Oct 2014 13:55:08 -0400 Subject: [PATCH 11/94] Misc Fixes. Should fix #1124402 --- wx-config | 4 ++-- wxGTK3-3.0.1-gtkwarnings.patch | 14 ++++++++++++++ wxGTK3.spec | 29 +++++++++++++++++++---------- 3 files changed, 35 insertions(+), 12 deletions(-) create mode 100644 wxGTK3-3.0.1-gtkwarnings.patch diff --git a/wx-config b/wx-config index 014cfaf..6347f4d 100644 --- a/wx-config +++ b/wx-config @@ -31,10 +31,10 @@ case $arch in ;; esac -wxconfig=$libdir/wx/config/gtk2-unicode-$version +wxconfig=$libdir/wx/config/gtk3-unicode-$version # special case when using 32-bit userspace and 64-bit kernel if [ ! -f $wxconfig -a \( $arch = ppc64 -o $arch = sparc64 \) ]; then - wxconfig=/usr/lib/wx/config/gtk2-unicode-$version + wxconfig=/usr/lib/wx/config/gtk3-unicode-$version fi if [ -x $wxconfig ]; then diff --git a/wxGTK3-3.0.1-gtkwarnings.patch b/wxGTK3-3.0.1-gtkwarnings.patch new file mode 100644 index 0000000..b0a9fcf --- /dev/null +++ b/wxGTK3-3.0.1-gtkwarnings.patch @@ -0,0 +1,14 @@ +diff -rupN wxWidgets-3.0.1/src/gtk/notebook.cpp wxWidgets-3.0.1-patched/src/gtk/notebook.cpp +--- wxWidgets-3.0.1/src/gtk/notebook.cpp 2014-06-14 17:48:48.000000000 -0400 ++++ wxWidgets-3.0.1-patched/src/gtk/notebook.cpp 2014-09-30 10:44:26.589330444 -0400 +@@ -429,8 +429,9 @@ bool wxNotebook::InsertPage( size_t posi + pageData->m_imageIndex = imageId; + + pageData->m_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 1); ++#ifndef __WXGTK3__ + gtk_container_set_border_width(GTK_CONTAINER(pageData->m_box), 2); +- ++#endif + pageData->m_image = NULL; + if (imageId != -1) + { diff --git a/wxGTK3.spec b/wxGTK3.spec index c953c16..0476dd1 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -19,6 +19,8 @@ URL: http://www.wxwidgets.org/ Source0: http://downloads.sf.net/wxwindows/%{srcname}-%{version}.tar.bz2 Source1: http://downloads.sf.net/wxwindows/%{srcname}-%{version}-docs-html.tar.bz2 Source10: wx-config +#Fixed Upstream, see RH#1147995 for details +Patch0: %{name}-%{version}-gtkwarnings.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported @@ -120,11 +122,7 @@ This package provides documentation for the %{srcname} library. %prep %setup -q -n %{srcname}-%{version} -a 1 - -# in case of gtk3 -%if %{gtkver} == 3 -sed -i -e 's|gtk2|gtk3|' %{SOURCE10} -%endif +%patch0 -p1 # patch some installed files to avoid conflicts with 2.8.* sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in @@ -164,9 +162,17 @@ make %{?_smp_mflags} %makeinstall # install our multilib-aware wrapper +##Remove installed rm %{buildroot}%{_bindir}/wx-config -rm %{buildroot}%{_bindir}/wxrc -install -p -m 755 %{SOURCE10} %{buildroot}%{_bindir}/wx-config-3.0 +##Install new +install -p -D -m 755 %{SOURCE10} %{buildroot}%{_libexecdir}/%{name}/wx-config +##If gtk2 +%if %{gtkver} == 2 +sed -i -e 's|gtk3|gtk2|' %{buildroot}%{_libexecdir}/%{name}/wx-config +%endif + +#Move wxrc to libexec (avoid conflict with wxGTK) +mv %{buildroot}%{_bindir}/wxrc %{buildroot}%{_libexecdir}/%{name}/wxrc # move bakefiles to avoid conflicts with 2.8.* mkdir %{buildroot}%{_datadir}/bakefile/presets/wx3 @@ -211,8 +217,9 @@ popd %{_libdir}/libwx_gtk%{gtkver}u_xrc-*.so.* %files devel -%{_bindir}/wx-config* %{_bindir}/wxrc-3.0 +%{_libexecdir}/%{name}/wx-config +%{_libexecdir}/%{name}/wxrc %{_includedir}/wx-3.0 %{_libdir}/libwx_*.so %{_libdir}/wx @@ -236,8 +243,10 @@ popd %doc html %changelog -* Mon Aug 18 2014 Fedora Release Engineering - 3.0.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild +* Tue Sep 30 2014 Jeremy Newton - 3.0.1-2 +- Avoid gtk warnings, fixes RH#1147995 +- Moving wxrc and wx-config to libexec instead of renaming +- Misc changes and spec error fixes, fixes RH#1124402 * Sat Jul 5 2014 Jeremy Newton - 3.0.1-1 - Bump to 3.0.1 RH#1076617 From b92aac14967701cd3a384a9ca33bc1ec8158df7e Mon Sep 17 00:00:00 2001 From: "alexjnewt@hotmail.com" Date: Thu, 2 Oct 2014 13:56:45 -0400 Subject: [PATCH 12/94] Bump to rev 3 --- wxGTK3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index 0476dd1..2118b2a 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -243,7 +243,7 @@ popd %doc html %changelog -* Tue Sep 30 2014 Jeremy Newton - 3.0.1-2 +* Tue Sep 30 2014 Jeremy Newton - 3.0.1-3 - Avoid gtk warnings, fixes RH#1147995 - Moving wxrc and wx-config to libexec instead of renaming - Misc changes and spec error fixes, fixes RH#1124402 From 66df003f8186a4a6a214526a610936595981b8cc Mon Sep 17 00:00:00 2001 From: "alexjnewt@hotmail.com" Date: Mon, 27 Oct 2014 15:04:19 -0400 Subject: [PATCH 13/94] Readd conflict for devel --- wxGTK3.spec | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index 2118b2a..7973fd8 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -75,6 +75,7 @@ ranging from networking to HTML display and image manipulation. Summary: OpenGL add-on for the wxWidgets library Group: System Environment/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} +Conflicts: wxGTK-devel %description gl OpenGL (a 3D graphics API) add-on for the wxWidgets library. @@ -125,16 +126,17 @@ This package provides documentation for the %{srcname} library. %patch0 -p1 # patch some installed files to avoid conflicts with 2.8.* -sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in +#The following line is disabled to avoid bugs: +#sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in sed -i -e 's|wxstd.mo|wxstd3.mo|' Makefile.in sed -i -e 's|wxmsw.mo|wxmsw3.mo|' Makefile.in # rename docs directory mv %{srcname}-%{version} html -sed -i -e 's|/usr/lib\b|%{_libdir}|' wx-config.in configure # fix plugin dir for 64-bit +sed -i -e 's|/usr/lib\b|%{_libdir}|' wx-config.in configure sed -i -e 's|/lib|/%{_lib}|' src/unix/stdpaths.cpp @@ -165,18 +167,20 @@ make %{?_smp_mflags} ##Remove installed rm %{buildroot}%{_bindir}/wx-config ##Install new -install -p -D -m 755 %{SOURCE10} %{buildroot}%{_libexecdir}/%{name}/wx-config +#install -p -D -m 755 %{SOURCE10} %{buildroot}%{_libexecdir}/%{name}/wx-config +install -p -D -m 755 %{SOURCE10} %{buildroot}%{_bindir}/wx-config ##If gtk2 %if %{gtkver} == 2 -sed -i -e 's|gtk3|gtk2|' %{buildroot}%{_libexecdir}/%{name}/wx-config +#sed -i -e 's|gtk3|gtk2|' %{buildroot}%{_libexecdir}/%{name}/wx-config +sed -i -e 's|gtk3|gtk2|' %{buildroot}%{_bindir}/wx-config %endif #Move wxrc to libexec (avoid conflict with wxGTK) -mv %{buildroot}%{_bindir}/wxrc %{buildroot}%{_libexecdir}/%{name}/wxrc +#mv %{buildroot}%{_bindir}/wxrc %{buildroot}%{_libexecdir}/%{name}/wxrc # move bakefiles to avoid conflicts with 2.8.* -mkdir %{buildroot}%{_datadir}/bakefile/presets/wx3 -mv %{buildroot}%{_datadir}/bakefile/presets/*.* %{buildroot}%{_datadir}/bakefile/presets/wx3 +#mkdir %{buildroot}%{_datadir}/bakefile/presets/wx3 +#mv %{buildroot}%{_datadir}/bakefile/presets/*.* %{buildroot}%{_datadir}/bakefile/presets/wx3 %find_lang wxstd3 %find_lang wxmsw3 @@ -218,13 +222,13 @@ popd %files devel %{_bindir}/wxrc-3.0 -%{_libexecdir}/%{name}/wx-config -%{_libexecdir}/%{name}/wxrc +%{_bindir}/wx-config +%{_bindir}/wxrc %{_includedir}/wx-3.0 %{_libdir}/libwx_*.so %{_libdir}/wx -%{_datadir}/aclocal/wxwin3.m4 -%{_datadir}/bakefile/presets/wx3/ +%{_datadir}/aclocal/wxwin.m4 +%{_datadir}/bakefile/presets/*.* %files gl %{_libdir}/libwx_gtk%{gtkver}u_gl-*.so.* @@ -243,6 +247,9 @@ popd %doc html %changelog +* Tue Sep 30 2014 Jeremy Newton - 3.0.1-4 +- Add conflict with wxgtk-devel again, temporary fix until it can be resolved + * Tue Sep 30 2014 Jeremy Newton - 3.0.1-3 - Avoid gtk warnings, fixes RH#1147995 - Moving wxrc and wx-config to libexec instead of renaming From 5be127b5b27483dc638d30db51709e1282df3a5b Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Tue, 4 Nov 2014 00:19:25 +0000 Subject: [PATCH 14/94] Add aarch64 and ppc64le to list of 64-bit architectures --- wx-config | 2 +- wxGTK3.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/wx-config b/wx-config index 6347f4d..a738177 100644 --- a/wx-config +++ b/wx-config @@ -22,7 +22,7 @@ case $arch in i?86|ppc|s390|sparc|arm*|ia64) libdir=/usr/lib ;; - x86_64|ppc64|s390x|sparc64) + x86_64|ppc64|s390x|sparc64|aarch64|ppc64le) libdir=/usr/lib64 ;; *) diff --git a/wxGTK3.spec b/wxGTK3.spec index 7973fd8..324a101 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -247,6 +247,9 @@ popd %doc html %changelog +* Mon Nov 03 2014 Marcin Juszkiewicz - 3.0.1-5 +- Add aarch64 and ppc64le to list of 64-bit architectures + * Tue Sep 30 2014 Jeremy Newton - 3.0.1-4 - Add conflict with wxgtk-devel again, temporary fix until it can be resolved From 72aded631ee07a8bf11fa9abb09c931ac6c008ef Mon Sep 17 00:00:00 2001 From: "alexjnewt@hotmail.com" Date: Tue, 4 Nov 2014 01:03:23 -0500 Subject: [PATCH 15/94] Update to 3.0.2 --- .gitignore | 2 ++ sources | 4 ++-- ...0.1-gtkwarnings.patch => wxGTK3-3.0.2-gtkwarnings.patch | 0 wxGTK3.spec | 7 +++++-- 4 files changed, 9 insertions(+), 4 deletions(-) rename wxGTK3-3.0.1-gtkwarnings.patch => wxGTK3-3.0.2-gtkwarnings.patch (100%) diff --git a/.gitignore b/.gitignore index 135635a..0a4525b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ /wxWidgets-3.0.0.tar.bz2 /wxWidgets-3.0.1-docs-html.tar.bz2 /wxWidgets-3.0.1.tar.bz2 +/wxWidgets-3.0.2-docs-html.tar.bz2 +/wxWidgets-3.0.2.tar.bz2 diff --git a/sources b/sources index bae4198..80e6fd1 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -47dbdd5adf5a7a2c9d3dd58b3d78c9c7 wxWidgets-3.0.1-docs-html.tar.bz2 -dad1f1cd9d4c370cbc22700dc492da31 wxWidgets-3.0.1.tar.bz2 +67844da5ed54c1a09d8d4ebe32a5e00a wxWidgets-3.0.2-docs-html.tar.bz2 +ba4cd1f3853d0cd49134c5ae028ad080 wxWidgets-3.0.2.tar.bz2 diff --git a/wxGTK3-3.0.1-gtkwarnings.patch b/wxGTK3-3.0.2-gtkwarnings.patch similarity index 100% rename from wxGTK3-3.0.1-gtkwarnings.patch rename to wxGTK3-3.0.2-gtkwarnings.patch diff --git a/wxGTK3.spec b/wxGTK3.spec index 324a101..eb9af08 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -10,8 +10,8 @@ %endif Name: %{wxgtkname} -Version: 3.0.1 -Release: 5%{?dist} +Version: 3.0.2 +Release: 1%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -247,6 +247,9 @@ popd %doc html %changelog +* Tue Nov 04 2014 Jeremy Newton - 3.0.2-1 +- Update to 3.0.2 + * Mon Nov 03 2014 Marcin Juszkiewicz - 3.0.1-5 - Add aarch64 and ppc64le to list of 64-bit architectures From 20dbdc103d30301d3f58487cb33ed3fc5b976ea8 Mon Sep 17 00:00:00 2001 From: "alexjnewt@hotmail.com" Date: Tue, 4 Nov 2014 07:57:12 -0500 Subject: [PATCH 16/94] Forgot to remove patch --- wxGTK3-3.0.2-gtkwarnings.patch | 14 -------------- wxGTK3.spec | 3 --- 2 files changed, 17 deletions(-) delete mode 100644 wxGTK3-3.0.2-gtkwarnings.patch diff --git a/wxGTK3-3.0.2-gtkwarnings.patch b/wxGTK3-3.0.2-gtkwarnings.patch deleted file mode 100644 index b0a9fcf..0000000 --- a/wxGTK3-3.0.2-gtkwarnings.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -rupN wxWidgets-3.0.1/src/gtk/notebook.cpp wxWidgets-3.0.1-patched/src/gtk/notebook.cpp ---- wxWidgets-3.0.1/src/gtk/notebook.cpp 2014-06-14 17:48:48.000000000 -0400 -+++ wxWidgets-3.0.1-patched/src/gtk/notebook.cpp 2014-09-30 10:44:26.589330444 -0400 -@@ -429,8 +429,9 @@ bool wxNotebook::InsertPage( size_t posi - pageData->m_imageIndex = imageId; - - pageData->m_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 1); -+#ifndef __WXGTK3__ - gtk_container_set_border_width(GTK_CONTAINER(pageData->m_box), 2); -- -+#endif - pageData->m_image = NULL; - if (imageId != -1) - { diff --git a/wxGTK3.spec b/wxGTK3.spec index eb9af08..d65b380 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -19,8 +19,6 @@ URL: http://www.wxwidgets.org/ Source0: http://downloads.sf.net/wxwindows/%{srcname}-%{version}.tar.bz2 Source1: http://downloads.sf.net/wxwindows/%{srcname}-%{version}-docs-html.tar.bz2 Source10: wx-config -#Fixed Upstream, see RH#1147995 for details -Patch0: %{name}-%{version}-gtkwarnings.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported @@ -123,7 +121,6 @@ This package provides documentation for the %{srcname} library. %prep %setup -q -n %{srcname}-%{version} -a 1 -%patch0 -p1 # patch some installed files to avoid conflicts with 2.8.* #The following line is disabled to avoid bugs: From c239e24578a76dd0515ae979012501f23da2ee90 Mon Sep 17 00:00:00 2001 From: "alexjnewt@hotmail.com" Date: Tue, 11 Nov 2014 06:49:28 -0500 Subject: [PATCH 17/94] Trying to fix 1124402 --- wxGTK3.spec | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index d65b380..ad0e888 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -73,7 +73,6 @@ ranging from networking to HTML display and image manipulation. Summary: OpenGL add-on for the wxWidgets library Group: System Environment/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} -Conflicts: wxGTK-devel %description gl OpenGL (a 3D graphics API) add-on for the wxWidgets library. @@ -123,8 +122,7 @@ This package provides documentation for the %{srcname} library. %setup -q -n %{srcname}-%{version} -a 1 # patch some installed files to avoid conflicts with 2.8.* -#The following line is disabled to avoid bugs: -#sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in +sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in sed -i -e 's|wxstd.mo|wxstd3.mo|' Makefile.in sed -i -e 's|wxmsw.mo|wxmsw3.mo|' Makefile.in @@ -163,21 +161,21 @@ make %{?_smp_mflags} # install our multilib-aware wrapper ##Remove installed rm %{buildroot}%{_bindir}/wx-config -##Install new -#install -p -D -m 755 %{SOURCE10} %{buildroot}%{_libexecdir}/%{name}/wx-config -install -p -D -m 755 %{SOURCE10} %{buildroot}%{_bindir}/wx-config +##Install new and symlink +install -p -D -m 755 %{SOURCE10} %{buildroot}%{_libexecdir}/%{name}/wx-config +ln -s ../..%{_libexecdir}/%{name}/wx-config %{buildroot}%{_bindir}/wx-config-3.0 ##If gtk2 %if %{gtkver} == 2 -#sed -i -e 's|gtk3|gtk2|' %{buildroot}%{_libexecdir}/%{name}/wx-config -sed -i -e 's|gtk3|gtk2|' %{buildroot}%{_bindir}/wx-config +sed -i -e 's|gtk3|gtk2|' %{buildroot}%{_libexecdir}/%{name}/wx-config %endif -#Move wxrc to libexec (avoid conflict with wxGTK) -#mv %{buildroot}%{_bindir}/wxrc %{buildroot}%{_libexecdir}/%{name}/wxrc +#Move wxrc to libexec and symlink (avoid conflict with wxGTK) +mv %{buildroot}%{_bindir}/wxrc* %{buildroot}%{_libexecdir}/%{name} +ln -s ../..%{_libexecdir}/%{name}/wxrc-3.0 %{buildroot}%{_bindir}/wxrc-3.0 # move bakefiles to avoid conflicts with 2.8.* -#mkdir %{buildroot}%{_datadir}/bakefile/presets/wx3 -#mv %{buildroot}%{_datadir}/bakefile/presets/*.* %{buildroot}%{_datadir}/bakefile/presets/wx3 +mkdir %{buildroot}%{_datadir}/bakefile/presets/wx3 +mv %{buildroot}%{_datadir}/bakefile/presets/*.* %{buildroot}%{_datadir}/bakefile/presets/wx3 %find_lang wxstd3 %find_lang wxmsw3 @@ -219,13 +217,13 @@ popd %files devel %{_bindir}/wxrc-3.0 -%{_bindir}/wx-config -%{_bindir}/wxrc +%{_bindir}/wx-config-3.0 %{_includedir}/wx-3.0 %{_libdir}/libwx_*.so %{_libdir}/wx -%{_datadir}/aclocal/wxwin.m4 -%{_datadir}/bakefile/presets/*.* +%{_datadir}/aclocal/wxwin3.m4 +%{_datadir}/bakefile/presets/wx3/*.* +%{_libexecdir}/%{name} %files gl %{_libdir}/libwx_gtk%{gtkver}u_gl-*.so.* @@ -244,6 +242,10 @@ popd %doc html %changelog +* Tue Nov 04 2014 Jeremy Newton - 3.0.2-2 +- Moving things around again, hopefully fixing RH#1124402 +- Adding symlinks to avoid breaking things + * Tue Nov 04 2014 Jeremy Newton - 3.0.2-1 - Update to 3.0.2 From 25637af17f97f71d64f383a96d7cb8c532921848 Mon Sep 17 00:00:00 2001 From: Jeremy Newton Date: Thu, 26 Feb 2015 19:41:07 -0500 Subject: [PATCH 18/94] Bump for rebuild --- wxGTK3.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index ad0e888..fe6b7f0 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -242,6 +242,9 @@ popd %doc html %changelog +* Thu Feb 26 2015 Jeremy Newton - 3.0.2-3 +- Bump to rebuild for gcc 5.0 to fix some issues + * Tue Nov 04 2014 Jeremy Newton - 3.0.2-2 - Moving things around again, hopefully fixing RH#1124402 - Adding symlinks to avoid breaking things From 744d50fe2686c7dcce8d7b475d738fced78a228a Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Sat, 2 May 2015 18:38:14 +0200 Subject: [PATCH 19/94] Rebuilt for GCC 5 C++11 ABI change --- wxGTK3.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index fe6b7f0..379b11c 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -242,6 +242,9 @@ popd %doc html %changelog +* Sat May 02 2015 Kalev Lember - 3.0.2-4 +- Rebuilt for GCC 5 C++11 ABI change + * Thu Feb 26 2015 Jeremy Newton - 3.0.2-3 - Bump to rebuild for gcc 5.0 to fix some issues From 26939d076bb497bac4c1a818278de25748523947 Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Mon, 4 May 2015 14:23:00 -0500 Subject: [PATCH 20/94] Indicate that this package bundles scintilla 3.2.1. --- wxGTK3.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index 379b11c..c5f9254 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -41,6 +41,7 @@ BuildRequires: cppunit-devel BuildRequires: libmspack-devel Provides: %{srcname} = %{version}-%{release} +Provides: bundled(scintilla) = 3.2.1 Requires: %{wxbasename}%{?_isa} = %{version}-%{release} %description @@ -242,6 +243,9 @@ popd %doc html %changelog +* Mon May 04 2015 Jason L Tibbitts III - 3.0.2-5 +- Indicate that this package bundles scintilla 3.2.1. + * Sat May 02 2015 Kalev Lember - 3.0.2-4 - Rebuilt for GCC 5 C++11 ABI change From dd379207df0a7da274a762b0f237a8077e184839 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Thu, 28 May 2015 12:40:24 +0900 Subject: [PATCH 21/94] Don't abort on ABI check, backport from wxGTK --- wxGTK3-3.0.2-abicheck.patch | 14 ++++++++++++++ wxGTK3.spec | 11 +++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 wxGTK3-3.0.2-abicheck.patch diff --git a/wxGTK3-3.0.2-abicheck.patch b/wxGTK3-3.0.2-abicheck.patch new file mode 100644 index 0000000..03ddcd5 --- /dev/null +++ b/wxGTK3-3.0.2-abicheck.patch @@ -0,0 +1,14 @@ +--- wxWidgets-3.0.2/src/common/appbase.cpp.abicheck 2015-05-28 12:36:40.697163073 +0900 ++++ wxWidgets-3.0.2/src/common/appbase.cpp 2015-05-28 12:38:30.597154298 +0900 +@@ -762,10 +762,7 @@ + msg.Printf(wxT("Mismatch between the program and library build versions detected.\nThe library used %s,\nand %s used %s."), + lib.c_str(), progName.c_str(), prog.c_str()); + +- wxLogFatalError(msg.c_str()); +- +- // normally wxLogFatalError doesn't return +- return false; ++ wxLogWarning(msg.c_str()); + } + + return true; diff --git a/wxGTK3.spec b/wxGTK3.spec index c5f9254..0766295 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 5%{?dist} +Release: 6%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -19,7 +19,10 @@ URL: http://www.wxwidgets.org/ Source0: http://downloads.sf.net/wxwindows/%{srcname}-%{version}.tar.bz2 Source1: http://downloads.sf.net/wxwindows/%{srcname}-%{version}-docs-html.tar.bz2 Source10: wx-config - +# https://bugzilla.redhat.com/show_bug.cgi?id=1225148 +# remove abort when ABI check fails +# Backport from wxGTK +Patch0: wxGTK3-3.0.2-abicheck.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported %if %{gtkver} == 3 @@ -121,6 +124,7 @@ This package provides documentation for the %{srcname} library. %prep %setup -q -n %{srcname}-%{version} -a 1 +%patch0 -p1 -b .abicheck # patch some installed files to avoid conflicts with 2.8.* sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in @@ -243,6 +247,9 @@ popd %doc html %changelog +* Thu May 28 2015 Mamoru TASAKA - 3.0.2-6 +- Don't abort on ABI check, backport from wxGTK + * Mon May 04 2015 Jason L Tibbitts III - 3.0.2-5 - Indicate that this package bundles scintilla 3.2.1. From d9af07c5c8b957ae66ac9239686fd9a2b9d9a698 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 19 Jun 2015 02:38:56 +0000 Subject: [PATCH 22/94] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- wxGTK3.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index 0766295..9469a39 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 6%{?dist} +Release: 7%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -247,6 +247,9 @@ popd %doc html %changelog +* Fri Jun 19 2015 Fedora Release Engineering - 3.0.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Thu May 28 2015 Mamoru TASAKA - 3.0.2-6 - Don't abort on ABI check, backport from wxGTK From 39885d38896e44b59cab5ec230cad1eab10ea709 Mon Sep 17 00:00:00 2001 From: Jeremy Newton Date: Mon, 22 Jun 2015 12:27:25 -0400 Subject: [PATCH 23/94] Add some upstream patches to fix warnings a crashes --- wxGTK3.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index 9469a39..978fd00 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 7%{?dist} +Release: 8%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -23,6 +23,10 @@ Source10: wx-config # remove abort when ABI check fails # Backport from wxGTK Patch0: wxGTK3-3.0.2-abicheck.patch +# This is a collection of fixes from upstream +# to fix warnings and crashes. See bug for details: +# https://bugzilla.redhat.com/show_bug.cgi?id=1234211 +Patch1: wxGTK3-3.0.2-upstreamfixes.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported %if %{gtkver} == 3 @@ -125,6 +129,7 @@ This package provides documentation for the %{srcname} library. %prep %setup -q -n %{srcname}-%{version} -a 1 %patch0 -p1 -b .abicheck +%patch1 -p1 -b .upstreamfixes # patch some installed files to avoid conflicts with 2.8.* sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in @@ -247,6 +252,9 @@ popd %doc html %changelog +* Mon Jun 22 2015 Jeremy Newton - 3.0.2-8 +- Include some upstream patches to fix crashes and warnings + * Fri Jun 19 2015 Fedora Release Engineering - 3.0.2-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From fa4f542c6f1a7ae41256d42b1a1c58dc6d96343e Mon Sep 17 00:00:00 2001 From: Jeremy Newton Date: Mon, 22 Jun 2015 12:34:24 -0400 Subject: [PATCH 24/94] Forgot to add the patch, also refer to bug 1234211 --- wxGTK3-3.0.2-upstreamfixes.patch | 155 +++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 wxGTK3-3.0.2-upstreamfixes.patch diff --git a/wxGTK3-3.0.2-upstreamfixes.patch b/wxGTK3-3.0.2-upstreamfixes.patch new file mode 100644 index 0000000..44dbd01 --- /dev/null +++ b/wxGTK3-3.0.2-upstreamfixes.patch @@ -0,0 +1,155 @@ +diff -rupN wxWidgets-3.0.2-orig/src/generic/grid.cpp wxWidgets-3.0.2/src/generic/grid.cpp +--- wxWidgets-3.0.2-orig/src/generic/grid.cpp 2014-10-06 17:33:44.000000000 -0400 ++++ wxWidgets-3.0.2/src/generic/grid.cpp 2015-06-22 11:50:16.359029017 -0400 +@@ -2114,7 +2114,8 @@ void wxGridWindow::OnFocus(wxFocusEvent& + m_owner->GetGridCursorCol()); + const wxRect cursor = + m_owner->BlockToDeviceRect(cursorCoords, cursorCoords); +- Refresh(true, &cursor); ++ if (cursor != wxGridNoCellRect) ++ Refresh(true, &cursor); + } + + if ( !m_owner->GetEventHandler()->ProcessEvent( event ) ) +diff -rupN wxWidgets-3.0.2-orig/src/generic/listctrl.cpp wxWidgets-3.0.2/src/generic/listctrl.cpp +--- wxWidgets-3.0.2-orig/src/generic/listctrl.cpp 2014-10-06 17:33:44.000000000 -0400 ++++ wxWidgets-3.0.2/src/generic/listctrl.cpp 2015-06-22 12:12:26.838603542 -0400 +@@ -1935,6 +1935,13 @@ void wxListMainWindow::RefreshLines( siz + size_t visibleFrom, visibleTo; + GetVisibleLinesRange(&visibleFrom, &visibleTo); + ++ if ( lineFrom > visibleTo || lineTo < visibleFrom ) ++ { ++ // None of these lines are currently visible at all, don't bother ++ // doing anything. ++ return; ++ } ++ + if ( lineFrom < visibleFrom ) + lineFrom = visibleFrom; + if ( lineTo > visibleTo ) +diff -rupN wxWidgets-3.0.2-orig/src/gtk/aboutdlg.cpp wxWidgets-3.0.2/src/gtk/aboutdlg.cpp +--- wxWidgets-3.0.2-orig/src/gtk/aboutdlg.cpp 2014-10-06 17:33:44.000000000 -0400 ++++ wxWidgets-3.0.2/src/gtk/aboutdlg.cpp 2015-06-22 12:09:00.951644896 -0400 +@@ -23,7 +23,7 @@ + #include "wx/aboutdlg.h" + + #ifndef WX_PRECOMP +- #include "wx/utils.h" // for wxLaunchDefaultBrowser() ++ #include "wx/window.h" + #endif //WX_PRECOMP + + #include +@@ -131,7 +131,7 @@ static void wxGtkAboutDialogOnLink(GtkAb + } + #endif + +-void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* WXUNUSED(parent)) ++void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* parent) + { + // don't create another dialog if one is already present + if ( !gs_aboutDialog ) +@@ -235,6 +235,11 @@ void wxAboutBox(const wxAboutDialogInfo& + g_signal_connect(dlg, "response", + G_CALLBACK(wxGtkAboutDialogOnClose), NULL); + ++ GtkWindow* gtkParent = NULL; ++ if (parent && parent->m_widget) ++ gtkParent = (GtkWindow*)gtk_widget_get_ancestor(parent->m_widget, GTK_TYPE_WINDOW); ++ gtk_window_set_transient_for(GTK_WINDOW(dlg), gtkParent); ++ + gtk_window_present(GTK_WINDOW(dlg)); + } + +diff -rupN wxWidgets-3.0.2-orig/src/gtk/filedlg.cpp wxWidgets-3.0.2/src/gtk/filedlg.cpp +--- wxWidgets-3.0.2-orig/src/gtk/filedlg.cpp 2014-10-06 17:33:44.000000000 -0400 ++++ wxWidgets-3.0.2/src/gtk/filedlg.cpp 2015-06-22 12:16:47.386285719 -0400 +@@ -187,7 +187,8 @@ bool wxFileDialog::Create(wxWindow *pare + const wxSize& sz, + const wxString& name) + { +- parent = GetParentForModalDialog(parent, style); ++ // wxFD_MULTIPLE has the same value as wxDIALOG_NO_PARENT ++ parent = GetParentForModalDialog(parent, style & ~wxFD_MULTIPLE); + + if (!wxFileDialogBase::Create(parent, message, defaultDir, defaultFileName, + wildCard, style, pos, sz, name)) +diff -rupN wxWidgets-3.0.2-orig/src/gtk/fontdlg.cpp wxWidgets-3.0.2/src/gtk/fontdlg.cpp +--- wxWidgets-3.0.2-orig/src/gtk/fontdlg.cpp 2014-10-06 17:33:44.000000000 -0400 ++++ wxWidgets-3.0.2/src/gtk/fontdlg.cpp 2015-06-22 11:51:23.827727490 -0400 +@@ -78,6 +78,7 @@ bool wxFontDialog::DoCreate(wxWindow *pa + gtk_parent = GTK_WINDOW(parent->m_widget); + + #if GTK_CHECK_VERSION(3,2,0) ++ g_type_ensure(PANGO_TYPE_FONT_FACE); + if (gtk_check_version(3,2,0) == NULL) + m_widget = gtk_font_chooser_dialog_new(wxGTK_CONV(message), gtk_parent); + else +diff -rupN wxWidgets-3.0.2-orig/src/gtk/print.cpp wxWidgets-3.0.2/src/gtk/print.cpp +--- wxWidgets-3.0.2-orig/src/gtk/print.cpp 2014-10-06 17:33:44.000000000 -0400 ++++ wxWidgets-3.0.2/src/gtk/print.cpp 2015-06-22 12:01:37.173889476 -0400 +@@ -32,7 +32,6 @@ + #include "wx/fontutil.h" + #include "wx/dynlib.h" + #include "wx/paper.h" +-#include "wx/scopeguard.h" + #include "wx/modalhook.h" + + #include +@@ -612,6 +611,11 @@ wxGtkPrintDialog::wxGtkPrintDialog( wxWi + + m_parent = parent; + SetShowDialog(true); ++ ++ const wxPrintData& printData = m_printDialogData.GetPrintData(); ++ wxGtkPrintNativeData* native = ++ static_cast(printData.GetNativeData()); ++ native->SetPrintJob(gtk_print_operation_new()); + } + + wxGtkPrintDialog::wxGtkPrintDialog( wxWindow *parent, wxPrintData *data ) +@@ -625,11 +629,22 @@ wxGtkPrintDialog::wxGtkPrintDialog( wxWi + + m_parent = parent; + SetShowDialog(true); ++ ++ const wxPrintData& printData = m_printDialogData.GetPrintData(); ++ wxGtkPrintNativeData* native = ++ static_cast(printData.GetNativeData()); ++ native->SetPrintJob(gtk_print_operation_new()); + } + + + wxGtkPrintDialog::~wxGtkPrintDialog() + { ++ const wxPrintData& printData = m_printDialogData.GetPrintData(); ++ wxGtkPrintNativeData* native = ++ static_cast(printData.GetNativeData()); ++ GtkPrintOperation* printOp = native->GetPrintJob(); ++ g_object_unref(printOp); ++ native->SetPrintJob(NULL); + } + + // This is called even if we actually don't want the dialog to appear. +@@ -921,10 +936,9 @@ bool wxGtkPrinter::Print(wxWindow *paren + wxPrintData printdata = GetPrintDialogData().GetPrintData(); + wxGtkPrintNativeData *native = (wxGtkPrintNativeData*) printdata.GetNativeData(); + +- wxGtkObject printOp(gtk_print_operation_new()); +- native->SetPrintJob(printOp); +- wxON_BLOCK_EXIT_OBJ1(*native, wxGtkPrintNativeData::SetPrintJob, +- static_cast(NULL)); ++ // wxGtkPrintDialog needs to be created first as it creates the PrintOp ++ wxGtkPrintDialog dialog(parent, &m_printDialogData); ++ GtkPrintOperation* printOp = native->GetPrintJob(); + + wxPrinterToGtkData dataToSend; + dataToSend.printer = this; +@@ -937,7 +951,6 @@ bool wxGtkPrinter::Print(wxWindow *paren + + // This is used to setup the DC and + // show the dialog if desired +- wxGtkPrintDialog dialog( parent, &m_printDialogData ); + dialog.SetPrintDC(m_dc); + dialog.SetShowDialog(prompt); + From 94da2800c62cf3d98c5d319015442cb806a59eaa Mon Sep 17 00:00:00 2001 From: Jeremy Newton Date: Mon, 24 Aug 2015 09:28:16 -0400 Subject: [PATCH 25/94] Fix spin button issues, fixes bug#1252182 --- wxGTK3.spec | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index 978fd00..a4e5fe1 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 8%{?dist} +Release: 9%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -27,6 +27,10 @@ Patch0: wxGTK3-3.0.2-abicheck.patch # to fix warnings and crashes. See bug for details: # https://bugzilla.redhat.com/show_bug.cgi?id=1234211 Patch1: wxGTK3-3.0.2-upstreamfixes.patch +# This fixes the spinbutton on gtk 3.12 +# For more details, seem the upstream commit: +# https://github.com/wxWidgets/wxWidgets/commit/312ae4c92cec95954557347c2b7a9e24d4398a59 +Patch1: wxGTK3-3.0.2-spibuttfix.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported %if %{gtkver} == 3 @@ -252,6 +256,9 @@ popd %doc html %changelog +* Sat Aug 22 2015 Jeremy Newton - 3.0.2-9 +- Include spinbutton patch from upstream + * Mon Jun 22 2015 Jeremy Newton - 3.0.2-8 - Include some upstream patches to fix crashes and warnings @@ -264,8 +271,8 @@ popd * Mon May 04 2015 Jason L Tibbitts III - 3.0.2-5 - Indicate that this package bundles scintilla 3.2.1. -* Sat May 02 2015 Kalev Lember - 3.0.2-4 -- Rebuilt for GCC 5 C++11 ABI change +* Thu Feb 26 2015 Jeremy Newton - 3.0.2-4 +- Bump to rebuild, fix bug #1210239 * Thu Feb 26 2015 Jeremy Newton - 3.0.2-3 - Bump to rebuild for gcc 5.0 to fix some issues From 622c128221277ddcb02e08e1e2e7699afbca891d Mon Sep 17 00:00:00 2001 From: Jeremy Newton Date: Mon, 24 Aug 2015 09:29:34 -0400 Subject: [PATCH 26/94] Forgot to add patch --- wxGTK3-3.0.2-spibuttfix.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 wxGTK3-3.0.2-spibuttfix.patch diff --git a/wxGTK3-3.0.2-spibuttfix.patch b/wxGTK3-3.0.2-spibuttfix.patch new file mode 100644 index 0000000..6747065 --- /dev/null +++ b/wxGTK3-3.0.2-spibuttfix.patch @@ -0,0 +1,14 @@ +diff -rupN wxWidgets-3.0.2-orig/src/gtk/spinbutt.cpp wxWidgets-3.0.2/src/gtk/spinbutt.cpp +--- wxWidgets-3.0.2-orig/src/gtk/spinbutt.cpp 2014-10-06 17:33:44.000000000 -0400 ++++ wxWidgets-3.0.2/src/gtk/spinbutt.cpp 2015-08-22 10:44:00.743403904 -0400 +@@ -92,6 +92,10 @@ bool wxSpinButton::Create(wxWindow *pare + g_object_ref(m_widget); + + gtk_entry_set_width_chars(GTK_ENTRY(m_widget), 0); ++#if GTK_CHECK_VERSION(3,12,0) ++ if (gtk_check_version(3,12,0) == NULL) ++ gtk_entry_set_max_width_chars(GTK_ENTRY(m_widget), 0); ++#endif + gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget), + (int)(m_windowStyle & wxSP_WRAP) ); + From 5594348b6453d845b0917f349e670cfe0886f3ad Mon Sep 17 00:00:00 2001 From: Jeremy Newton Date: Mon, 24 Aug 2015 09:30:46 -0400 Subject: [PATCH 27/94] Implement patch --- wxGTK3.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index a4e5fe1..c850100 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -30,7 +30,7 @@ Patch1: wxGTK3-3.0.2-upstreamfixes.patch # This fixes the spinbutton on gtk 3.12 # For more details, seem the upstream commit: # https://github.com/wxWidgets/wxWidgets/commit/312ae4c92cec95954557347c2b7a9e24d4398a59 -Patch1: wxGTK3-3.0.2-spibuttfix.patch +Patch2: wxGTK3-3.0.2-spibuttfix.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported %if %{gtkver} == 3 @@ -134,6 +134,7 @@ This package provides documentation for the %{srcname} library. %setup -q -n %{srcname}-%{version} -a 1 %patch0 -p1 -b .abicheck %patch1 -p1 -b .upstreamfixes +%patch2 -p1 -b .spinbutt # patch some installed files to avoid conflicts with 2.8.* sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in From 077fb78735defb21043b3f17edb61afffb0079fe Mon Sep 17 00:00:00 2001 From: Jeremy Newton Date: Sun, 1 Nov 2015 08:20:27 -0500 Subject: [PATCH 28/94] Fix F23+ issue, BR retired --- wxGTK3.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index c850100..52d8448 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 9%{?dist} +Release: 10%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -42,7 +42,6 @@ BuildRequires: libjpeg-devel BuildRequires: libtiff-devel BuildRequires: expat-devel BuildRequires: SDL-devel -BuildRequires: libgnomeprintui22-devel BuildRequires: libGLU-devel BuildRequires: libSM-devel BuildRequires: gstreamer-plugins-base-devel @@ -257,6 +256,9 @@ popd %doc html %changelog +* Sun Nov 1 2015 Jeremy Newton - 3.0.2-10 +- Removed depreciated/retired libgnomeprintui22 + * Sat Aug 22 2015 Jeremy Newton - 3.0.2-9 - Include spinbutton patch from upstream From 359a25b908a1c8a1e94210aeb11ff9cb484d8363 Mon Sep 17 00:00:00 2001 From: Jeremy Newton Date: Thu, 5 Nov 2015 20:54:49 -0500 Subject: [PATCH 29/94] Add upstream patch, fix RH#1268615 --- wxGTK3-3.0.2-checkradio.patch | 38 +++++++++++++++++++++++++++++++++++ wxGTK3.spec | 19 ++++++++++++------ 2 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 wxGTK3-3.0.2-checkradio.patch diff --git a/wxGTK3-3.0.2-checkradio.patch b/wxGTK3-3.0.2-checkradio.patch new file mode 100644 index 0000000..fd9ba15 --- /dev/null +++ b/wxGTK3-3.0.2-checkradio.patch @@ -0,0 +1,38 @@ +diff -rupN wxWidgets-3.0.2-orig/src/gtk/renderer.cpp wxWidgets-3.0.2/src/gtk/renderer.cpp +--- wxWidgets-3.0.2-orig/src/gtk/renderer.cpp 2015-11-05 19:57:31.075151404 -0500 ++++ wxWidgets-3.0.2/src/gtk/renderer.cpp 2015-11-05 20:37:56.230764763 -0500 +@@ -41,6 +41,10 @@ + #include "wx/gtk/private.h" + #include "wx/gtk/private/gtk2-compat.h" + ++#if defined(__WXGTK3__) && !GTK_CHECK_VERSION(3,14,0) ++ #define GTK_STATE_FLAG_CHECKED (1 << 11) ++#endif ++ + // ---------------------------------------------------------------------------- + // wxRendererGTK: our wxRendererNative implementation + // ---------------------------------------------------------------------------- +@@ -551,7 +555,11 @@ wxRendererGTK::DrawCheckBox(wxWindow* wi + { + int stateFlags = GTK_STATE_FLAG_NORMAL; + if (flags & wxCONTROL_CHECKED) ++ { + stateFlags = GTK_STATE_FLAG_ACTIVE; ++ if (gtk_check_version(3,14,0) == NULL) ++ stateFlags = GTK_STATE_FLAG_CHECKED; ++ } + if (flags & wxCONTROL_DISABLED) + stateFlags |= GTK_STATE_FLAG_INSENSITIVE; + if (flags & wxCONTROL_UNDETERMINED) +@@ -866,7 +874,11 @@ void wxRendererGTK::DrawRadioBitmap(wxWi + #ifdef __WXGTK3__ + int state = GTK_STATE_FLAG_NORMAL; + if (flags & wxCONTROL_CHECKED) ++ { + state = GTK_STATE_FLAG_ACTIVE; ++ if (gtk_check_version(3,14,0) == NULL) ++ state = GTK_STATE_FLAG_CHECKED; ++ } + else if (flags & wxCONTROL_UNDETERMINED) + state = GTK_STATE_FLAG_INCONSISTENT; + if (flags & wxCONTROL_DISABLED) diff --git a/wxGTK3.spec b/wxGTK3.spec index 52d8448..b965ed7 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 10%{?dist} +Release: 11%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -22,15 +22,19 @@ Source10: wx-config # https://bugzilla.redhat.com/show_bug.cgi?id=1225148 # remove abort when ABI check fails # Backport from wxGTK -Patch0: wxGTK3-3.0.2-abicheck.patch +Patch0: %{name}-%{version}-abicheck.patch # This is a collection of fixes from upstream # to fix warnings and crashes. See bug for details: # https://bugzilla.redhat.com/show_bug.cgi?id=1234211 -Patch1: wxGTK3-3.0.2-upstreamfixes.patch -# This fixes the spinbutton on gtk 3.12 -# For more details, seem the upstream commit: +Patch1: %{name}-%{version}-upstreamfixes.patch +# This fixes the spinbutton on gtk 3.12+ +# For more details, see the upstream commit: # https://github.com/wxWidgets/wxWidgets/commit/312ae4c92cec95954557347c2b7a9e24d4398a59 -Patch2: wxGTK3-3.0.2-spibuttfix.patch +Patch2: %{name}-%{version}-spibuttfix.patch +# This fixes checkbox/radiobutton on gtk 3.14+ +# For more details, see the upstream commit: +# https://github.com/wxWidgets/wxWidgets/commit/c1d150ed1228c155054cf1fa90932ced7371e6a4 +Patch2: %{name}-%{version}-checkradio.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported %if %{gtkver} == 3 @@ -256,6 +260,9 @@ popd %doc html %changelog +* Thu Nov 5 2015 Jeremy Newton - 3.0.2-11 +- Added patch to fix checkbox and radio button issues for f21 onwards + * Sun Nov 1 2015 Jeremy Newton - 3.0.2-10 - Removed depreciated/retired libgnomeprintui22 From 28eadee63c39114203ec0bf6810b8985e7f5c078 Mon Sep 17 00:00:00 2001 From: Jeremy Newton Date: Thu, 5 Nov 2015 20:57:40 -0500 Subject: [PATCH 30/94] Missing change in last post --- wxGTK3.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index b965ed7..14fa0c9 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -34,7 +34,7 @@ Patch2: %{name}-%{version}-spibuttfix.patch # This fixes checkbox/radiobutton on gtk 3.14+ # For more details, see the upstream commit: # https://github.com/wxWidgets/wxWidgets/commit/c1d150ed1228c155054cf1fa90932ced7371e6a4 -Patch2: %{name}-%{version}-checkradio.patch +Patch3: %{name}-%{version}-checkradio.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported %if %{gtkver} == 3 @@ -138,6 +138,7 @@ This package provides documentation for the %{srcname} library. %patch0 -p1 -b .abicheck %patch1 -p1 -b .upstreamfixes %patch2 -p1 -b .spinbutt +%patch3 -p1 -b .checkradio # patch some installed files to avoid conflicts with 2.8.* sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in From 63d23b21c516f72c0385c51ad85e6779d339c719 Mon Sep 17 00:00:00 2001 From: Jeremy Newton Date: Fri, 1 Jan 2016 11:37:32 -0500 Subject: [PATCH 31/94] Various bugfixes, see spec changelog --- wx-config | 4 +- wxGTK3-3.0.2-wayland.patch | 108 +++++++++++++++++++++++++++++++++++++ wxGTK3.spec | 54 ++++++++++++------- 3 files changed, 145 insertions(+), 21 deletions(-) create mode 100644 wxGTK3-3.0.2-wayland.patch diff --git a/wx-config b/wx-config index a738177..84e1d2d 100644 --- a/wx-config +++ b/wx-config @@ -19,10 +19,10 @@ if [ -z $arch ]; then fi case $arch in - i?86|ppc|s390|sparc|arm*|ia64) + i?86|ppc|s390|sparc|arm*|ia64|mips|mipsel) libdir=/usr/lib ;; - x86_64|ppc64|s390x|sparc64|aarch64|ppc64le) + x86_64|ppc64|s390x|sparc64|aarch64|ppc64le|mips64*) libdir=/usr/lib64 ;; *) diff --git a/wxGTK3-3.0.2-wayland.patch b/wxGTK3-3.0.2-wayland.patch new file mode 100644 index 0000000..b17bac0 --- /dev/null +++ b/wxGTK3-3.0.2-wayland.patch @@ -0,0 +1,108 @@ +diff -rupN wxWidgets-3.0.2/src/gtk/toplevel.cpp wxWidgets-3.0.2-wayland/src/gtk/toplevel.cpp +--- wxWidgets-3.0.2/src/gtk/toplevel.cpp 2014-10-06 17:33:44.000000000 -0400 ++++ wxWidgets-3.0.2-wayland/src/gtk/toplevel.cpp 2015-12-31 14:48:25.873812357 -0500 +@@ -456,8 +456,12 @@ gtk_frame_window_state_callback( GtkWidg + bool wxGetFrameExtents(GdkWindow* window, int* left, int* right, int* top, int* bottom) + { + #ifdef GDK_WINDOWING_X11 +- static GdkAtom property = gdk_atom_intern("_NET_FRAME_EXTENTS", false); + GdkDisplay* display = gdk_window_get_display(window); ++ ++ if (!GDK_IS_X11_DISPLAY(display)) ++ return false; ++ ++ static GdkAtom property = gdk_atom_intern("_NET_FRAME_EXTENTS", false); + Atom xproperty = gdk_x11_atom_to_xatom_for_display(display, property); + Atom type; + int format; +@@ -852,10 +856,19 @@ bool wxTopLevelWindowGTK::ShowFullScreen + + m_fsIsShowing = show; + ++ wxX11FullScreenMethod method = wxX11_FS_WMSPEC; ++ Display* xdpy = NULL; ++ Window xroot = None; ++ + #ifdef GDK_WINDOWING_X11 +- Display* xdpy = GDK_DISPLAY_XDISPLAY(gtk_widget_get_display(m_widget)); +- Window xroot = GDK_WINDOW_XID(gtk_widget_get_root_window(m_widget)); +- wxX11FullScreenMethod method = wxGetFullScreenMethodX11(xdpy, (WXWindow)xroot); ++ GdkDisplay *display = gtk_widget_get_display(m_widget); ++ ++ if (GDK_IS_X11_DISPLAY(display)) ++ { ++ xdpy = GDK_DISPLAY_XDISPLAY(gtk_widget_get_display(m_widget)); ++ xroot = GDK_WINDOW_XID(gtk_widget_get_root_window(m_widget)); ++ method = wxGetFullScreenMethodX11(xdpy, (WXWindow)xroot); ++ } + + // NB: gtk_window_fullscreen() uses freedesktop.org's WMspec extensions + // to switch to fullscreen, which is not always available. We must +@@ -870,7 +883,7 @@ bool wxTopLevelWindowGTK::ShowFullScreen + gtk_window_unfullscreen( GTK_WINDOW( m_widget ) ); + } + #ifdef GDK_WINDOWING_X11 +- else ++ else if (xdpy != NULL) + { + GdkWindow* window = gtk_widget_get_window(m_widget); + Window xid = GDK_WINDOW_XID(window); +@@ -958,6 +971,7 @@ bool wxTopLevelWindowGTK::Show( bool sho + deferShow = m_deferShowAllowed && + gs_requestFrameExtentsStatus != RFE_STATUS_BROKEN && + !gtk_widget_get_realized(m_widget) && ++ GDK_IS_X11_DISPLAY(gtk_widget_get_display(m_widget)) && + g_signal_handler_find(m_widget, + GSignalMatchType(G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DATA), + g_signal_lookup("property_notify_event", GTK_TYPE_WIDGET), +diff -rupN wxWidgets-3.0.2/src/gtk/window.cpp wxWidgets-3.0.2-wayland/src/gtk/window.cpp +--- wxWidgets-3.0.2/src/gtk/window.cpp 2014-10-06 17:33:44.000000000 -0400 ++++ wxWidgets-3.0.2-wayland/src/gtk/window.cpp 2015-12-31 14:48:31.522812743 -0500 +@@ -780,28 +780,31 @@ wxTranslateGTKKeyEventToWx(wxKeyEvent& e + } + + #ifdef GDK_WINDOWING_X11 +- // we want to always get the same key code when the same key is +- // pressed regardless of the state of the modifiers, i.e. on a +- // standard US keyboard pressing '5' or '%' ('5' key with +- // Shift) should result in the same key code in OnKeyDown(): +- // '5' (although OnChar() will get either '5' or '%'). +- // +- // to do it we first translate keysym to keycode (== scan code) +- // and then back but always using the lower register +- Display *dpy = (Display *)wxGetDisplay(); +- KeyCode keycode = XKeysymToKeycode(dpy, keysym); ++ if (GDK_IS_X11_DISPLAY(gdk_window_get_display(gdk_event->window))) ++ { ++ // we want to always get the same key code when the same key is ++ // pressed regardless of the state of the modifiers, i.e. on a ++ // standard US keyboard pressing '5' or '%' ('5' key with ++ // Shift) should result in the same key code in OnKeyDown(): ++ // '5' (although OnChar() will get either '5' or '%'). ++ // ++ // to do it we first translate keysym to keycode (== scan code) ++ // and then back but always using the lower register ++ Display *dpy = (Display *)wxGetDisplay(); ++ KeyCode keycode = XKeysymToKeycode(dpy, keysym); + +- wxLogTrace(TRACE_KEYS, wxT("\t-> keycode %d"), keycode); ++ wxLogTrace(TRACE_KEYS, wxT("\t-> keycode %d"), keycode); + + #ifdef HAVE_X11_XKBLIB_H +- KeySym keysymNormalized = XkbKeycodeToKeysym(dpy, keycode, 0, 0); ++ KeySym keysymNormalized = XkbKeycodeToKeysym(dpy, keycode, 0, 0); + #else +- KeySym keysymNormalized = XKeycodeToKeysym(dpy, keycode, 0); ++ KeySym keysymNormalized = XKeycodeToKeysym(dpy, keycode, 0); + #endif + +- // use the normalized, i.e. lower register, keysym if we've +- // got one +- key_code = keysymNormalized ? keysymNormalized : keysym; ++ // use the normalized, i.e. lower register, keysym if we've ++ // got one ++ key_code = keysymNormalized ? keysymNormalized : keysym; ++ } + #else + key_code = keysym; + #endif diff --git a/wxGTK3.spec b/wxGTK3.spec index 14fa0c9..dbebb19 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 11%{?dist} +Release: 12%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -35,6 +35,10 @@ Patch2: %{name}-%{version}-spibuttfix.patch # For more details, see the upstream commit: # https://github.com/wxWidgets/wxWidgets/commit/c1d150ed1228c155054cf1fa90932ced7371e6a4 Patch3: %{name}-%{version}-checkradio.patch +# This fixes some wayland issues with GTK3 +# For more details, see the upstream bug: +# http://trac.wxwidgets.org/ticket/16688 +Patch4: %{name}-%{version}-wayland.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported %if %{gtkver} == 3 @@ -72,7 +76,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}-gl = %{version}-%{release} Requires: %{name}-media = %{version}-%{release} Requires: %{wxbasename} = %{version}-%{release} -Requires: gtk%{gtkver}-devel +Requires: gtk%{gtkver}-devel Requires: libGLU-devel Provides: %{srcname}-devel = %{version}-%{release} @@ -139,6 +143,7 @@ This package provides documentation for the %{srcname} library. %patch1 -p1 -b .upstreamfixes %patch2 -p1 -b .spinbutt %patch3 -p1 -b .checkradio +%patch4 -p1 -b .wayland # patch some installed files to avoid conflicts with 2.8.* sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in @@ -192,6 +197,10 @@ sed -i -e 's|gtk3|gtk2|' %{buildroot}%{_libexecdir}/%{name}/wx-config mv %{buildroot}%{_bindir}/wxrc* %{buildroot}%{_libexecdir}/%{name} ln -s ../..%{_libexecdir}/%{name}/wxrc-3.0 %{buildroot}%{_bindir}/wxrc-3.0 +#Remove some python bitecode artifacts +rm -f %{buildroot}%{_datadir}/bakefile/presets/*.pyc +rm -f %{buildroot}%{_datadir}/bakefile/presets/*.pyo + # move bakefiles to avoid conflicts with 2.8.* mkdir %{buildroot}%{_datadir}/bakefile/presets/wx3 mv %{buildroot}%{_datadir}/bakefile/presets/*.* %{buildroot}%{_datadir}/bakefile/presets/wx3 @@ -241,6 +250,7 @@ popd %{_libdir}/libwx_*.so %{_libdir}/wx %{_datadir}/aclocal/wxwin3.m4 +%{_datadir}/bakefile/presets/wx3 %{_datadir}/bakefile/presets/wx3/*.* %{_libexecdir}/%{name} @@ -261,16 +271,22 @@ popd %doc html %changelog -* Thu Nov 5 2015 Jeremy Newton - 3.0.2-11 +* Thu Dec 31 2015 Jeremy Newton - 3.0.2-12 +- Remove python artifacts in bakefile dir, causes multilib devel conflict RH#1294712 +- Fix package devel not owning created wx3 backfile preset dir +- Add support for MIPS to wx-config RH#1294895 +- Wayland Patch + +* Thu Nov 5 2015 Jeremy Newton - 3.0.2-11 - Added patch to fix checkbox and radio button issues for f21 onwards -* Sun Nov 1 2015 Jeremy Newton - 3.0.2-10 +* Sun Nov 1 2015 Jeremy Newton - 3.0.2-10 - Removed depreciated/retired libgnomeprintui22 -* Sat Aug 22 2015 Jeremy Newton - 3.0.2-9 +* Sat Aug 22 2015 Jeremy Newton - 3.0.2-9 - Include spinbutton patch from upstream -* Mon Jun 22 2015 Jeremy Newton - 3.0.2-8 +* Mon Jun 22 2015 Jeremy Newton - 3.0.2-8 - Include some upstream patches to fix crashes and warnings * Fri Jun 19 2015 Fedora Release Engineering - 3.0.2-7 @@ -282,54 +298,54 @@ popd * Mon May 04 2015 Jason L Tibbitts III - 3.0.2-5 - Indicate that this package bundles scintilla 3.2.1. -* Thu Feb 26 2015 Jeremy Newton - 3.0.2-4 +* Thu Feb 26 2015 Jeremy Newton - 3.0.2-4 - Bump to rebuild, fix bug #1210239 -* Thu Feb 26 2015 Jeremy Newton - 3.0.2-3 +* Thu Feb 26 2015 Jeremy Newton - 3.0.2-3 - Bump to rebuild for gcc 5.0 to fix some issues -* Tue Nov 04 2014 Jeremy Newton - 3.0.2-2 +* Tue Nov 04 2014 Jeremy Newton - 3.0.2-2 - Moving things around again, hopefully fixing RH#1124402 - Adding symlinks to avoid breaking things -* Tue Nov 04 2014 Jeremy Newton - 3.0.2-1 +* Tue Nov 04 2014 Jeremy Newton - 3.0.2-1 - Update to 3.0.2 * Mon Nov 03 2014 Marcin Juszkiewicz - 3.0.1-5 - Add aarch64 and ppc64le to list of 64-bit architectures -* Tue Sep 30 2014 Jeremy Newton - 3.0.1-4 +* Tue Sep 30 2014 Jeremy Newton - 3.0.1-4 - Add conflict with wxgtk-devel again, temporary fix until it can be resolved -* Tue Sep 30 2014 Jeremy Newton - 3.0.1-3 +* Tue Sep 30 2014 Jeremy Newton - 3.0.1-3 - Avoid gtk warnings, fixes RH#1147995 - Moving wxrc and wx-config to libexec instead of renaming - Misc changes and spec error fixes, fixes RH#1124402 -* Sat Jul 5 2014 Jeremy Newton - 3.0.1-1 +* Sat Jul 5 2014 Jeremy Newton - 3.0.1-1 - Bump to 3.0.1 RH#1076617 -* Tue Mar 18 2014 Jeremy Newton - 3.0.0-6 +* Tue Mar 18 2014 Jeremy Newton - 3.0.0-6 - Removed disable-catch_segvs, see RH#1076617 -* Mon Mar 17 2014 Jeremy Newton - 3.0.0-5 +* Mon Mar 17 2014 Jeremy Newton - 3.0.0-5 - Renable combat28 - without it causes bugs RH#1076617 and a few others -* Wed Feb 19 2014 Jeremy Newton - 3.0.0-4 +* Wed Feb 19 2014 Jeremy Newton - 3.0.0-4 - Fixed GTK3 bug with wx-config - Fixed a unused-direct-shlib-dependency error -* Mon Feb 17 2014 Jeremy Newton - 3.0.0-3 +* Mon Feb 17 2014 Jeremy Newton - 3.0.0-3 - Added patch to avoid build fail on gtk 3.10+ - Reverted patching to make devel package compatible with wxGTK-devel - Added combatibility for RHEL 6+ - Changed all mention of GTK3 and GTK2 to GTK for consistency -* Mon Feb 10 2014 Jeremy Newton - 3.0.0-2 +* Mon Feb 10 2014 Jeremy Newton - 3.0.0-2 - Changed to build against gtk3 - Add webkit to build requires - Removed patching to make devel package compatible with wxGTK-devel - Disable 2.8.* combatibility (redundant functionality) -* Sat Jan 4 2014 Jeremy Newton - 3.0.0-1 +* Sat Jan 4 2014 Jeremy Newton - 3.0.0-1 - Initial build of wxwidgets version 3, mostly based on wxGTK spec From 01a7868cce7be7002745f27809d7824463965f0f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 5 Feb 2016 03:12:19 +0000 Subject: [PATCH 32/94] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- wxGTK3.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index dbebb19..ae6556a 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 12%{?dist} +Release: 13%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -271,6 +271,9 @@ popd %doc html %changelog +* Fri Feb 05 2016 Fedora Release Engineering - 3.0.2-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Thu Dec 31 2015 Jeremy Newton - 3.0.2-12 - Remove python artifacts in bakefile dir, causes multilib devel conflict RH#1294712 - Fix package devel not owning created wx3 backfile preset dir From ade3f6cc92a439ebc7eabcfd3cf8d270d8475506 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Mon, 22 Feb 2016 16:35:48 -0500 Subject: [PATCH 33/94] Fix RH#1294712 --- wxGTK3.spec | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index ae6556a..c6152f9 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 13%{?dist} +Release: 14%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -197,10 +197,6 @@ sed -i -e 's|gtk3|gtk2|' %{buildroot}%{_libexecdir}/%{name}/wx-config mv %{buildroot}%{_bindir}/wxrc* %{buildroot}%{_libexecdir}/%{name} ln -s ../..%{_libexecdir}/%{name}/wxrc-3.0 %{buildroot}%{_bindir}/wxrc-3.0 -#Remove some python bitecode artifacts -rm -f %{buildroot}%{_datadir}/bakefile/presets/*.pyc -rm -f %{buildroot}%{_datadir}/bakefile/presets/*.pyo - # move bakefiles to avoid conflicts with 2.8.* mkdir %{buildroot}%{_datadir}/bakefile/presets/wx3 mv %{buildroot}%{_datadir}/bakefile/presets/*.* %{buildroot}%{_datadir}/bakefile/presets/wx3 @@ -251,7 +247,9 @@ popd %{_libdir}/wx %{_datadir}/aclocal/wxwin3.m4 %{_datadir}/bakefile/presets/wx3 -%{_datadir}/bakefile/presets/wx3/*.* +#Exclude some python bitecode +%exclude %{_datadir}/bakefile/presets/wx3/*.pyc +%exclude %{_datadir}/bakefile/presets/wx3/*.pyo %{_libexecdir}/%{name} %files gl @@ -271,6 +269,9 @@ popd %doc html %changelog +* Mon Feb 22 2016 Jeremy Newton - 3.0.2-14 +- Should actually fix RH#1294712 + * Fri Feb 05 2016 Fedora Release Engineering - 3.0.2-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 0c7f9b37affc15fdf0fc940c6d612c2f33de7ad6 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Mon, 22 Feb 2016 21:36:54 -0500 Subject: [PATCH 34/94] Fix FTBFS in Rawhide --- wxGTK3-3.0.2-stc-gcc6.patch | 39 ++++++++++++++++++ wxGTK3-3.0.2-string-tests-gcc6.patch | 60 ++++++++++++++++++++++++++++ wxGTK3.spec | 22 +++++++++- 3 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 wxGTK3-3.0.2-stc-gcc6.patch create mode 100644 wxGTK3-3.0.2-string-tests-gcc6.patch diff --git a/wxGTK3-3.0.2-stc-gcc6.patch b/wxGTK3-3.0.2-stc-gcc6.patch new file mode 100644 index 0000000..119175c --- /dev/null +++ b/wxGTK3-3.0.2-stc-gcc6.patch @@ -0,0 +1,39 @@ +From 73e9e18ea09ffffcaac50237def0d9728a213c02 Mon Sep 17 00:00:00 2001 +From: Scott Talbert +Date: Sat, 20 Feb 2016 00:08:14 -0500 +Subject: [PATCH] Fix STC compilation with GCC6 + +Use std::abs() from instead of abs() from to avoid problems +with ambiguous overloads. + +Closes #17147. + +Closes https://github.com/wxWidgets/wxWidgets/pull/222 +--- + src/stc/scintilla/src/Editor.cxx | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/stc/scintilla/src/Editor.cxx b/src/stc/scintilla/src/Editor.cxx +index cd72953..2081df2 100644 +--- a/src/stc/scintilla/src/Editor.cxx ++++ b/src/stc/scintilla/src/Editor.cxx +@@ -11,6 +11,7 @@ + #include + #include + ++#include + #include + #include + #include +@@ -5841,9 +5842,9 @@ void Editor::GoToLine(int lineNo) { + } + + static bool Close(Point pt1, Point pt2) { +- if (abs(pt1.x - pt2.x) > 3) ++ if (std::abs(pt1.x - pt2.x) > 3) + return false; +- if (abs(pt1.y - pt2.y) > 3) ++ if (std::abs(pt1.y - pt2.y) > 3) + return false; + return true; + } diff --git a/wxGTK3-3.0.2-string-tests-gcc6.patch b/wxGTK3-3.0.2-string-tests-gcc6.patch new file mode 100644 index 0000000..6ed7767 --- /dev/null +++ b/wxGTK3-3.0.2-string-tests-gcc6.patch @@ -0,0 +1,60 @@ +From 01f62c02957cc1443ea761ddffe0b4322d987a1d Mon Sep 17 00:00:00 2001 +From: Vadim Zeitlin +Date: Sun, 21 Jun 2015 15:56:06 +0200 +Subject: [PATCH] Avoid warnings about narrowing casts in the long long tests. + +Recent g++ versions give -Wnarrowing warning when a value outside of the type +range is used to initialize a variable of this type in { }. Avoid it in the +long long tests using explicit casts as we already cast between long long and +unsigned long long values here anyhow. +--- + tests/strings/strings.cpp | 19 +++++++++++-------- + 1 file changed, 11 insertions(+), 8 deletions(-) + +diff --git a/tests/strings/strings.cpp b/tests/strings/strings.cpp +index b016294..78a3a9d 100644 +--- a/tests/strings/strings.cpp ++++ b/tests/strings/strings.cpp +@@ -589,14 +589,16 @@ enum + Number_Long = 16 // only for long tests + }; + ++#ifdef wxLongLong_t ++typedef wxLongLong_t TestValue_t; ++#else ++typedef long TestValue_t; ++#endif ++ + static const struct ToLongData + { + const wxChar *str; +-#ifdef wxLongLong_t +- wxLongLong_t value; +-#else +- long value; +-#endif // wxLongLong_t ++ TestValue_t value; + int flags; + int base; + +@@ -618,7 +620,7 @@ static const struct ToLongData + + { wxT("-1"), -1, Number_Signed | Number_Long }, + // this is surprising but consistent with strtoul() behaviour +- { wxT("-1"), ULONG_MAX, Number_Unsigned | Number_Long }, ++ { wxT("-1"), (TestValue_t)ULONG_MAX, Number_Unsigned | Number_Long }, + + // this must overflow, even with 64 bit long + { wxT("922337203685477580711"), 0, Number_Invalid }, +@@ -626,8 +628,9 @@ static const struct ToLongData + #ifdef wxLongLong_t + { wxT("2147483648"), wxLL(2147483648), Number_LongLong }, + { wxT("-2147483648"), wxLL(-2147483648), Number_LongLong | Number_Signed }, +- { wxT("9223372036854775808"), wxULL(9223372036854775808), Number_LongLong | +- Number_Unsigned }, ++ { wxT("9223372036854775808"), ++ TestValue_t(wxULL(9223372036854775808)), ++ Number_LongLong | Number_Unsigned }, + #endif // wxLongLong_t + + // Base tests. diff --git a/wxGTK3.spec b/wxGTK3.spec index c6152f9..35c830b 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 14%{?dist} +Release: 15%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -39,6 +39,14 @@ Patch3: %{name}-%{version}-checkradio.patch # For more details, see the upstream bug: # http://trac.wxwidgets.org/ticket/16688 Patch4: %{name}-%{version}-wayland.patch +# This fixes wxSTC compilation with GCC6 +# For more details, see the upstream commit: +# https://github.com/wxWidgets/wxWidgets/commit/73e9e18ea09ffffcaac50237def0d9728a213c02 +Patch5: %{name}-%{version}-stc-gcc6.patch +# This fixes compilation of the strings tests with GCC6 +# For more details, see the upstream commit: +# https://github.com/wxWidgets/wxWidgets/commit/01f62c02957cc1443ea761ddffe0b4322d987a1d +Patch6: %{name}-%{version}-strings-tests-gcc6.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported %if %{gtkver} == 3 @@ -144,6 +152,8 @@ This package provides documentation for the %{srcname} library. %patch2 -p1 -b .spinbutt %patch3 -p1 -b .checkradio %patch4 -p1 -b .wayland +%patch5 -p1 -b .stc-gcc6 +%patch6 -p1 -b .strings-tests-gcc6 # patch some installed files to avoid conflicts with 2.8.* sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in @@ -158,6 +168,9 @@ mv %{srcname}-%{version} html sed -i -e 's|/usr/lib\b|%{_libdir}|' wx-config.in configure sed -i -e 's|/lib|/%{_lib}|' src/unix/stdpaths.cpp +# Trick configure into using pkg-config for cppunit-config +sed -i -e 's|$CPPUNIT_CONFIG --version|$CPPUNIT_CONFIG --modversion|' configure + %build # likely still dereferences type-punned pointers @@ -165,6 +178,8 @@ CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" # fix unused-direct-shlib-dependency error: export LDFLAGS="-Wl,--as-needed" +# Trick configure into using pkg-config for cppunit-config +export CPPUNIT_CONFIG="/usr/bin/pkg-config cppunit" %configure \ --with-gtk=%{gtkver} \ @@ -269,6 +284,11 @@ popd %doc html %changelog +* Tue Feb 23 2016 Scott Talbert - 3.0.2-15 +- Add GCC6 patches for STC and strings tests +- Adapt cppunit to use pkg-config (cppunit-config has been removed in F24) +- Fixes FTBFS in F24 Rawhide, RH#1308244 + * Mon Feb 22 2016 Jeremy Newton - 3.0.2-14 - Should actually fix RH#1294712 From b10eb1dfb6b02dcfe8baffc67189a852f7c177c9 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Mon, 22 Feb 2016 21:42:38 -0500 Subject: [PATCH 35/94] Correct name of patch --- wxGTK3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index 35c830b..70afa3a 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -46,7 +46,7 @@ Patch5: %{name}-%{version}-stc-gcc6.patch # This fixes compilation of the strings tests with GCC6 # For more details, see the upstream commit: # https://github.com/wxWidgets/wxWidgets/commit/01f62c02957cc1443ea761ddffe0b4322d987a1d -Patch6: %{name}-%{version}-strings-tests-gcc6.patch +Patch6: %{name}-%{version}-string-tests-gcc6.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported %if %{gtkver} == 3 From a9e6f4a9993502b753e8292028d79f0986d020ab Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Mon, 22 Feb 2016 22:34:38 -0500 Subject: [PATCH 36/94] Add -xmldocs subpackage containing XML documentation (needed for Phoenix) --- wxGTK3.spec | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index 70afa3a..9331a79 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 15%{?dist} +Release: 16%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -65,6 +65,7 @@ BuildRequires: GConf2-devel BuildRequires: gettext BuildRequires: cppunit-devel BuildRequires: libmspack-devel +BuildRequires: doxygen Provides: %{srcname} = %{version}-%{release} Provides: bundled(scintilla) = 3.2.1 @@ -145,6 +146,17 @@ BuildArch: noarch This package provides documentation for the %{srcname} library. +%package xmldocs +Group: Development/Libraries +Summary: XML Documentation for the wxGTK3 library +Requires: %{name} = %{version}-%{release} +Provides: %{srcname}-xmldocs = %{version}-%{release} +BuildArch: noarch + +%description xmldocs +This package provides XML documentation for the %{srcname} library. + + %prep %setup -q -n %{srcname}-%{version} -a 1 %patch0 -p1 -b .abicheck @@ -194,6 +206,10 @@ export CPPUNIT_CONFIG="/usr/bin/pkg-config cppunit" make %{?_smp_mflags} +pushd docs/doxygen +WX_SKIP_DOXYGEN_VERSION_CHECK=1 ./regen.sh xml +popd + %install %makeinstall @@ -283,7 +299,13 @@ popd %files docs %doc html +%files xmldocs +%doc docs/doxygen/out/xml/* + %changelog +* Tue Feb 23 2016 Scott Talbert - 3.0.2-16 +- Add -xmldocs subpackage containing XML documentation (needed for Phoenix) + * Tue Feb 23 2016 Scott Talbert - 3.0.2-15 - Add GCC6 patches for STC and strings tests - Adapt cppunit to use pkg-config (cppunit-config has been removed in F24) From 92c277c27cf63ef85d7254de87f3ccbe2a8eb143 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Tue, 23 Feb 2016 23:18:13 -0500 Subject: [PATCH 37/94] Fix wxStaticText growing (BZ#1282142) and Wayland window sizing (BZ#1294229) --- wxGTK3-3.0.2-getbestsize.patch | 29 ++++ wxGTK3-3.0.2-wayland-window-sizing1.patch | 171 ++++++++++++++++++++++ wxGTK3-3.0.2-wayland-window-sizing2.patch | 59 ++++++++ wxGTK3.spec | 19 ++- 4 files changed, 277 insertions(+), 1 deletion(-) create mode 100644 wxGTK3-3.0.2-getbestsize.patch create mode 100644 wxGTK3-3.0.2-wayland-window-sizing1.patch create mode 100644 wxGTK3-3.0.2-wayland-window-sizing2.patch diff --git a/wxGTK3-3.0.2-getbestsize.patch b/wxGTK3-3.0.2-getbestsize.patch new file mode 100644 index 0000000..ba7a4c1 --- /dev/null +++ b/wxGTK3-3.0.2-getbestsize.patch @@ -0,0 +1,29 @@ +From 2bc3721f065fd7d47674ccaf7e8d9d6cc195aab5 Mon Sep 17 00:00:00 2001 +From: Paul Cornett +Date: Sat, 6 Feb 2016 08:58:53 -0800 +Subject: [PATCH] Fix GetBestSize() for GTK3 after size has been set + +Need to reset size request to get actual best size. +See Fedora bug https://bugzilla.redhat.com/show_bug.cgi?id=1282142 + +(cherry picked from commit 6ed7e27bf270f9f7767b59ebaa9a7f37c5bb3bed) +--- + src/gtk/control.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/gtk/control.cpp b/src/gtk/control.cpp +index 3352965..20cd746 100644 +--- a/src/gtk/control.cpp ++++ b/src/gtk/control.cpp +@@ -319,7 +319,11 @@ wxSize wxControl::GTKGetPreferredSize(GtkWidget* widget) const + { + GtkRequisition req; + #ifdef __WXGTK3__ ++ int w, h; ++ gtk_widget_get_size_request(widget, &w, &h); ++ gtk_widget_set_size_request(widget, -1, -1); + gtk_widget_get_preferred_size(widget, NULL, &req); ++ gtk_widget_set_size_request(widget, w, h); + #else + GTK_WIDGET_GET_CLASS(widget)->size_request(widget, &req); + #endif diff --git a/wxGTK3-3.0.2-wayland-window-sizing1.patch b/wxGTK3-3.0.2-wayland-window-sizing1.patch new file mode 100644 index 0000000..34f026c --- /dev/null +++ b/wxGTK3-3.0.2-wayland-window-sizing1.patch @@ -0,0 +1,171 @@ +From 41be4271e18a21acbcc30d1e61653190f8ef7a6d Mon Sep 17 00:00:00 2001 +From: Paul Cornett +Date: Fri, 5 Feb 2016 10:26:06 -0800 +Subject: [PATCH] Adapt window decorations cache for client-side decorations + +Fixes size calculations for TLWs created after the first one, +with Wayland, Mir and Broadway. See #17336 + +(cherry picked from commit 91ea4872813b90ff91702a11abbe644cb1e5044b) +--- + src/gtk/toplevel.cpp | 93 +++++++++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 84 insertions(+), 9 deletions(-) + +diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp +index 7530b0f..c3d42e8 100644 +--- a/src/gtk/toplevel.cpp ++++ b/src/gtk/toplevel.cpp +@@ -40,6 +40,15 @@ + #endif + #ifdef GDK_WINDOWING_WAYLAND + #include ++ #define HAS_CLIENT_DECOR ++#endif ++#ifdef GDK_WINDOWING_MIR ++ #include ++ #define HAS_CLIENT_DECOR ++#endif ++#ifdef GDK_WINDOWING_BROADWAY ++ #include ++ #define HAS_CLIENT_DECOR + #endif + + #include "wx/gtk/private.h" +@@ -82,6 +91,26 @@ static enum { + static bool gs_decorCacheValid; + #endif + ++#ifdef HAS_CLIENT_DECOR ++static bool HasClientDecor(GtkWidget* widget) ++{ ++ GdkDisplay* display = gtk_widget_get_display(widget); ++#ifdef GDK_WINDOWING_WAYLAND ++ if (GDK_IS_WAYLAND_DISPLAY(display)) ++ return true; ++#endif ++#ifdef GDK_WINDOWING_MIR ++ if (GDK_IS_MIR_DISPLAY(display)) ++ return true; ++#endif ++#ifdef GDK_WINDOWING_BROADWAY ++ if (GDK_IS_BROADWAY_DISPLAY(display)) ++ return true; ++#endif ++ return false; ++} ++#endif // HAS_CLIENT_DECOR ++ + //----------------------------------------------------------------------------- + // RequestUserAttention related functions + //----------------------------------------------------------------------------- +@@ -235,8 +264,24 @@ size_allocate(GtkWidget*, GtkAllocation* alloc, wxTopLevelWindowGTK* win) + GtkAllocation a; + gtk_widget_get_allocation(win->m_widget, &a); + wxSize size(a.width, a.height); +- size.x += win->m_decorSize.left + win->m_decorSize.right; +- size.y += win->m_decorSize.top + win->m_decorSize.bottom; ++#ifdef HAS_CLIENT_DECOR ++ if (HasClientDecor(win->m_widget)) ++ { ++ GtkAllocation a2; ++ gtk_widget_get_allocation(win->m_mainWidget, &a2); ++ wxTopLevelWindowGTK::DecorSize decorSize; ++ decorSize.left = a2.x; ++ decorSize.right = a.width - a2.width - a2.x; ++ decorSize.top = a2.y; ++ decorSize.bottom = a.height - a2.height - a2.y; ++ win->GTKUpdateDecorSize(decorSize); ++ } ++ else ++#endif ++ { ++ size.x += win->m_decorSize.left + win->m_decorSize.right; ++ size.y += win->m_decorSize.top + win->m_decorSize.bottom; ++ } + win->m_width = size.x; + win->m_height = size.y; + +@@ -1062,8 +1107,13 @@ void wxTopLevelWindowGTK::DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), int WXU + void wxTopLevelWindowGTK::GTKDoGetSize(int *width, int *height) const + { + wxSize size(m_width, m_height); +- size.x -= m_decorSize.left + m_decorSize.right; +- size.y -= m_decorSize.top + m_decorSize.bottom; ++#ifdef HAS_CLIENT_DECOR ++ if (!HasClientDecor(m_widget)) ++#endif ++ { ++ size.x -= m_decorSize.left + m_decorSize.right; ++ size.y -= m_decorSize.top + m_decorSize.bottom; ++ } + if (size.x < 0) size.x = 0; + if (size.y < 0) size.y = 0; + #if wxUSE_LIBHILDON2 +@@ -1171,7 +1221,12 @@ void wxTopLevelWindowGTK::DoGetClientSize( int *width, int *height ) const + base_type::DoGetClientSize(width, height); + else + { +- GTKDoGetSize(width, height); ++ int w = m_width - (m_decorSize.left + m_decorSize.right); ++ int h = m_height - (m_decorSize.top + m_decorSize.bottom); ++ if (w < 0) w = 0; ++ if (h < 0) h = 0; ++ if (width) *width = w; ++ if (height) *height = h; + } + } + +@@ -1193,8 +1248,20 @@ void wxTopLevelWindowGTK::DoSetSizeHints( int minW, int minH, + hints.min_height = 1; + hints.max_width = INT_MAX; + hints.max_height = INT_MAX; +- const int decorSize_x = m_decorSize.left + m_decorSize.right; +- const int decorSize_y = m_decorSize.top + m_decorSize.bottom; ++ int decorSize_x; ++ int decorSize_y; ++#ifdef HAS_CLIENT_DECOR ++ if (HasClientDecor(m_widget)) ++ { ++ decorSize_x = 0; ++ decorSize_y = 0; ++ } ++ else ++#endif ++ { ++ decorSize_x = m_decorSize.left + m_decorSize.right; ++ decorSize_y = m_decorSize.top + m_decorSize.bottom; ++ } + if (minSize.x > decorSize_x) + hints.min_width = minSize.x - decorSize_x; + if (minSize.y > decorSize_y) +@@ -1221,11 +1288,19 @@ void wxTopLevelWindowGTK::DoSetSizeHints( int minW, int minH, + (GtkWindow*)m_widget, NULL, &hints, (GdkWindowHints)hints_mask); + } + +-#ifdef GDK_WINDOWING_X11 + void wxTopLevelWindowGTK::GTKUpdateDecorSize(const DecorSize& decorSize) + { + if (!IsMaximized() && !IsFullScreen()) + GetCachedDecorSize() = decorSize; ++ ++#ifdef HAS_CLIENT_DECOR ++ if (HasClientDecor(m_widget)) ++ { ++ m_decorSize = decorSize; ++ return; ++ } ++#endif ++#ifdef GDK_WINDOWING_X11 + if (m_updateDecorSize && memcmp(&m_decorSize, &decorSize, sizeof(DecorSize))) + { + m_useCachedClientSize = false; +@@ -1292,8 +1367,8 @@ void wxTopLevelWindowGTK::GTKUpdateDecorSize(const DecorSize& decorSize) + showEvent.SetEventObject(this); + HandleWindowEvent(showEvent); + } +-} + #endif // GDK_WINDOWING_X11 ++} + + wxTopLevelWindowGTK::DecorSize& wxTopLevelWindowGTK::GetCachedDecorSize() + { diff --git a/wxGTK3-3.0.2-wayland-window-sizing2.patch b/wxGTK3-3.0.2-wayland-window-sizing2.patch new file mode 100644 index 0000000..c32b8be --- /dev/null +++ b/wxGTK3-3.0.2-wayland-window-sizing2.patch @@ -0,0 +1,59 @@ +From 0388ce8e25535415d9bdd79ce14eb20e73859279 Mon Sep 17 00:00:00 2001 +From: Paul Cornett +Date: Sat, 6 Feb 2016 16:07:28 -0800 +Subject: [PATCH] Allow SetClientSize() to set correct size even when size of + window decorations is not known + +This should allow correct sizing of first TLW (when using SetClientSize()) +with backends using client-side decorations such as Wayland. + +(cherry picked from commit bc4df78421a5b1e6fd9b218e89d03e59bd846d0a) +--- + src/gtk/toplevel.cpp | 27 +++++++++++++++++++++++++++ + 1 file changed, 27 insertions(+) + +diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp +index c3d42e8..a52dad0 100644 +--- a/src/gtk/toplevel.cpp ++++ b/src/gtk/toplevel.cpp +@@ -1194,6 +1194,14 @@ void wxTopLevelWindowGTK::DoSetSize( int x, int y, int width, int height, int si + } + } + ++extern "C" { ++static gboolean reset_size_request(void* data) ++{ ++ gtk_widget_set_size_request(GTK_WIDGET(data), -1, -1); ++ return false; ++} ++} ++ + void wxTopLevelWindowGTK::DoSetClientSize(int width, int height) + { + base_type::DoSetClientSize(width, height); +@@ -1202,6 +1210,25 @@ void wxTopLevelWindowGTK::DoSetClientSize(int width, int height) + // Has to be done after calling base because it calls SetSize, + // which sets this true + m_deferShowAllowed = false; ++ ++ if (m_wxwindow) ++ { ++ // If window is not resizable or not yet shown, set size request on ++ // client widget, to make it more likely window will get correct size ++ // even if our decorations size cache is incorrect (as it will be before ++ // showing first TLW). ++ if (!gtk_window_get_resizable(GTK_WINDOW(m_widget))) ++ { ++ gtk_widget_set_size_request(m_widget, -1, -1); ++ gtk_widget_set_size_request(m_wxwindow, m_clientWidth, m_clientHeight); ++ } ++ else if (!IsShown()) ++ { ++ gtk_widget_set_size_request(m_wxwindow, m_clientWidth, m_clientHeight); ++ // Cancel size request at next idle to allow resizing ++ g_idle_add_full(G_PRIORITY_LOW, reset_size_request, m_wxwindow, NULL); ++ } ++ } + } + + void wxTopLevelWindowGTK::DoGetClientSize( int *width, int *height ) const diff --git a/wxGTK3.spec b/wxGTK3.spec index 9331a79..64f7f33 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 16%{?dist} +Release: 17%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -47,6 +47,16 @@ Patch5: %{name}-%{version}-stc-gcc6.patch # For more details, see the upstream commit: # https://github.com/wxWidgets/wxWidgets/commit/01f62c02957cc1443ea761ddffe0b4322d987a1d Patch6: %{name}-%{version}-string-tests-gcc6.patch +# This prevents wxStaticText from widening each time SetLabel() is called +# For more details, see the upstream commit: +# https://github.com/wxWidgets/wxWidgets/commit/2bc3721f065fd7d47674ccaf7e8d9d6cc195aab5 +Patch7: %{name}-%{version}-getbestsize.patch +# These patches fix top level window sizing under Wayland +# For more details, see the upstream commits: +# https://github.com/wxWidgets/wxWidgets/commit/41be4271e18a21acbcc30d1e61653190f8ef7a6d +# https://github.com/wxWidgets/wxWidgets/commit/0388ce8e25535415d9bdd79ce14eb20e73859279 +Patch8: %{name}-%{version}-wayland-window-sizing1.patch +Patch9: %{name}-%{version}-wayland-window-sizing2.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported %if %{gtkver} == 3 @@ -166,6 +176,9 @@ This package provides XML documentation for the %{srcname} library. %patch4 -p1 -b .wayland %patch5 -p1 -b .stc-gcc6 %patch6 -p1 -b .strings-tests-gcc6 +%patch7 -p1 -b .getbestsize +%patch8 -p1 -b .wayland-window-sizing1 +%patch9 -p1 -b .wayland-window-sizing2 # patch some installed files to avoid conflicts with 2.8.* sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in @@ -303,6 +316,10 @@ popd %doc docs/doxygen/out/xml/* %changelog +* Wed Feb 24 2016 Scott Talbert - 3.0.2-17 +- Add patch to resolve issue with wxStaticText growing, fixes RH#1282142 +- Add patches to resolve issues under Wayland with window sizing, RH#1294229 + * Tue Feb 23 2016 Scott Talbert - 3.0.2-16 - Add -xmldocs subpackage containing XML documentation (needed for Phoenix) From 5c3df2730bf047e7e453140731ef1cf1379a543f Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Sat, 19 Mar 2016 22:05:52 -0400 Subject: [PATCH 38/94] Add patch for wxEVT_MEDIA_XXX event types (for Phoenix) --- wxGTK3-3.0.2-media-docs.patch | 54 +++++++++++++++++++++++++++++++++++ wxGTK3.spec | 10 ++++++- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 wxGTK3-3.0.2-media-docs.patch diff --git a/wxGTK3-3.0.2-media-docs.patch b/wxGTK3-3.0.2-media-docs.patch new file mode 100644 index 0000000..d6a97fe --- /dev/null +++ b/wxGTK3-3.0.2-media-docs.patch @@ -0,0 +1,54 @@ +From 03903c1e459f108e0c464db24064e4cde84f174a Mon Sep 17 00:00:00 2001 +From: Vadim Zeitlin +Date: Fri, 20 Dec 2013 17:50:27 +0000 +Subject: [PATCH] Document wxEVT_MEDIA_XXX event types. + +See #15768. + +(cherry picked from commit 5c1f95bc71028e4562f847af56b815b2f13370a9 on master) +--- + interface/wx/mediactrl.h | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/interface/wx/mediactrl.h b/interface/wx/mediactrl.h +index e425fa0..8bcfada 100644 +--- a/interface/wx/mediactrl.h ++++ b/interface/wx/mediactrl.h +@@ -48,6 +48,7 @@ enum wxMediaCtrlPlayerControls + @beginEventTable{wxMediaEvent} + @event{EVT_MEDIA_LOADED(id\, func)} + Sent when a media has loaded enough data that it can start playing. ++ Processes a @c wxEVT_MEDIA_LOADED event type. + @event{EVT_MEDIA_STOP(id\, func)} + Sent when a media has switched to the @c wxMEDIASTATE_STOPPED state. + You may be able to Veto this event to prevent it from stopping, +@@ -55,14 +56,19 @@ enum wxMediaCtrlPlayerControls + the media (note that this may not have the desired effect - if you + want to loop the media, for example, catch the @c EVT_MEDIA_FINISHED + and play there instead). ++ Processes a @c wxEVT_MEDIA_STOP event type. + @event{EVT_MEDIA_FINISHED(id\, func)} + Sent when a media has finished playing in a wxMediaCtrl. ++ Processes a @c wxEVT_MEDIA_FINISHED event type. + @event{EVT_MEDIA_STATECHANGED(id\, func)} + Sent when a media has switched its state (from any media state). ++ Processes a @c wxEVT_MEDIA_STATECHANGED event type. + @event{EVT_MEDIA_PLAY(id\, func)} + Sent when a media has switched to the @c wxMEDIASTATE_PLAYING state. ++ Processes a @c wxEVT_MEDIA_PLAY event type. + @event{EVT_MEDIA_PAUSE(id\, func)} + Sent when a media has switched to the @c wxMEDIASTATE_PAUSED state. ++ Processes a @c wxEVT_MEDIA_PAUSE event type. + @endEventTable + + @library{wxmedia} +@@ -442,3 +448,9 @@ class wxMediaCtrl : public wxControl + wxFileOffset Tell(); + }; + ++wxEventType wxEVT_MEDIA_LOADED; ++wxEventType wxEVT_MEDIA_STOP; ++wxEventType wxEVT_MEDIA_FINISHED; ++wxEventType wxEVT_MEDIA_STATECHANGED; ++wxEventType wxEVT_MEDIA_PLAY; ++wxEventType wxEVT_MEDIA_PAUSE; diff --git a/wxGTK3.spec b/wxGTK3.spec index 64f7f33..b087415 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 17%{?dist} +Release: 18%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -57,6 +57,10 @@ Patch7: %{name}-%{version}-getbestsize.patch # https://github.com/wxWidgets/wxWidgets/commit/0388ce8e25535415d9bdd79ce14eb20e73859279 Patch8: %{name}-%{version}-wayland-window-sizing1.patch Patch9: %{name}-%{version}-wayland-window-sizing2.patch +# This patch adds docs for the wxEVT_MEDIA_XXX event types (for Phoenix) +# For more details, see the upstream commits: +# https://github.com/wxWidgets/wxWidgets/commit/03903c1e459f108e0c464db24064e4cde84f174a +Patch10: %{name}-%{version}-media-docs.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported %if %{gtkver} == 3 @@ -179,6 +183,7 @@ This package provides XML documentation for the %{srcname} library. %patch7 -p1 -b .getbestsize %patch8 -p1 -b .wayland-window-sizing1 %patch9 -p1 -b .wayland-window-sizing2 +%patch10 -p1 -b .media-docs # patch some installed files to avoid conflicts with 2.8.* sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in @@ -316,6 +321,9 @@ popd %doc docs/doxygen/out/xml/* %changelog +* Sun Mar 20 2016 Scott Talbert - 3.0.2-18 +- Add patch for wxEVT_MEDIA_XXX event types (for Phoenix) + * Wed Feb 24 2016 Scott Talbert - 3.0.2-17 - Add patch to resolve issue with wxStaticText growing, fixes RH#1282142 - Add patches to resolve issues under Wayland with window sizing, RH#1294229 From 263c5a5b31e3cd779db3862f6770e7169b77f05c Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mon, 4 Apr 2016 15:41:32 -0400 Subject: [PATCH 39/94] apply upstream fix for window size allocation with gtk 3.19+ --- wxGTK3-3.0.2-size-alloc-fix.patch | 36 +++++++++++++++++++++++++++++++ wxGTK3.spec | 11 +++++++++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 wxGTK3-3.0.2-size-alloc-fix.patch 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) From 8b9de376d3783e68fc9b0db1f25403f887ff88fc Mon Sep 17 00:00:00 2001 From: Mystro256 Date: Sun, 28 Aug 2016 13:03:39 -0400 Subject: [PATCH 40/94] Fix alternatives with wxGTK --- wxGTK3.spec | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index d6c584f..94d4729 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 19%{?dist} +Release: 20%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -243,14 +243,16 @@ rm %{buildroot}%{_bindir}/wx-config ##Install new and symlink install -p -D -m 755 %{SOURCE10} %{buildroot}%{_libexecdir}/%{name}/wx-config ln -s ../..%{_libexecdir}/%{name}/wx-config %{buildroot}%{_bindir}/wx-config-3.0 +touch %{buildroot}%{_bindir}/wx-config ##If gtk2 %if %{gtkver} == 2 sed -i -e 's|gtk3|gtk2|' %{buildroot}%{_libexecdir}/%{name}/wx-config %endif -#Move wxrc to libexec and symlink (avoid conflict with wxGTK) +#Alternatives setup with wxrc mv %{buildroot}%{_bindir}/wxrc* %{buildroot}%{_libexecdir}/%{name} ln -s ../..%{_libexecdir}/%{name}/wxrc-3.0 %{buildroot}%{_bindir}/wxrc-3.0 +touch %{buildroot}%{_bindir}/wxrc # move bakefiles to avoid conflicts with 2.8.* mkdir %{buildroot}%{_datadir}/bakefile/presets/wx3 @@ -277,6 +279,18 @@ popd %post -n %{wxbasename} -p /sbin/ldconfig %postun -n %{wxbasename} -p /sbin/ldconfig +%post devel +%{_sbindir}/update-alternatives --install %{_bindir}/wx-config \ + wx-config %{_libexecdir}/%{name}/wx-config 3 +%{_sbindir}/update-alternatives --install %{_bindir}/wxrc \ + wxrc %{_libexecdir}/%{name}/wxrc 3 + +%postun devel +if [ $1 -eq 0 ] ; then + %{_sbindir}/update-alternatives --remove wx-config %{_libexecdir}/%{name}/wx-config + %{_sbindir}/update-alternatives --remove wxrc %{_libexecdir}/%{name}/wxrc +fi + %files -f wxstd3.lang %doc docs/changes.txt docs/gpl.txt docs/lgpl.txt docs/licence.txt %doc docs/licendoc.txt docs/preamble.txt docs/readme.txt @@ -295,6 +309,8 @@ popd %{_libdir}/libwx_gtk%{gtkver}u_xrc-*.so.* %files devel +%ghost %{_bindir}/wx-config +%ghost %{_bindir}/wxrc %{_bindir}/wxrc-3.0 %{_bindir}/wx-config-3.0 %{_includedir}/wx-3.0 @@ -327,6 +343,9 @@ popd %doc docs/doxygen/out/xml/* %changelog +* Sun Aug 28 2016 Jeremy Newton - 3.0.2-20 +- Fix alternatives with wxGTK (#1077718) + * Mon Apr 4 2016 Tom Callaway - 3.0.2-19 - Add patch to resolve window sizing issue with gtk 3.19+ From e712f1cac9b3dba310c6812129d484e8a0e11a93 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Tue, 13 Sep 2016 23:09:57 -0400 Subject: [PATCH 41/94] Add patch to resolve wxGetKeyState() crash on Wayland (#1266743) - Add patch to fix wxFontEnumerator stop function - Add patch to fix wxNativeFontInfo::InitFromFont() --- wxGTK3-3.0.2-font-enumerator-stop.patch | 47 +++++++++ wxGTK3-3.0.2-gtk-show-uri.patch | 48 ++++++++++ wxGTK3-3.0.2-init-from-font.patch | 39 ++++++++ wxGTK3-3.0.2-wxgetkeystate.patch | 121 ++++++++++++++++++++++++ wxGTK3.spec | 25 ++++- 5 files changed, 279 insertions(+), 1 deletion(-) create mode 100644 wxGTK3-3.0.2-font-enumerator-stop.patch create mode 100644 wxGTK3-3.0.2-gtk-show-uri.patch create mode 100644 wxGTK3-3.0.2-init-from-font.patch create mode 100644 wxGTK3-3.0.2-wxgetkeystate.patch diff --git a/wxGTK3-3.0.2-font-enumerator-stop.patch b/wxGTK3-3.0.2-font-enumerator-stop.patch new file mode 100644 index 0000000..f587882 --- /dev/null +++ b/wxGTK3-3.0.2-font-enumerator-stop.patch @@ -0,0 +1,47 @@ +From a19e512e80acdb2a777c3e44923ad0b1178db35a Mon Sep 17 00:00:00 2001 +From: Scott Talbert +Date: Sun, 7 Aug 2016 23:15:41 -0400 +Subject: [PATCH] Fix the stop function of wxFontEnumerator for wxGTK + +In a wxFontEnumerator, if false is returned from OnFacename() or +OnFontEncoding(), the enumeration is supposed to stop. This was not happening +on wxGTK. + +See https://github.com/wxWidgets/wxWidgets/pull/311 + +(cherry picked from commit 3572c2c6548bca2dbd439a3d25ed403fda99ebe9) +--- + src/common/fontenumcmn.cpp | 3 ++- + src/unix/fontenum.cpp | 5 ++++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/common/fontenumcmn.cpp b/src/common/fontenumcmn.cpp +index 1185a86..f0d6f68 100644 +--- a/src/common/fontenumcmn.cpp ++++ b/src/common/fontenumcmn.cpp +@@ -124,7 +124,8 @@ bool wxFontEnumerator::EnumerateEncodingsUTF8(const wxString& facename) + + for ( size_t n = 0; n < count; n++ ) + { +- OnFontEncoding(facenames[n], utf8); ++ if ( !OnFontEncoding(facenames[n], utf8) ) ++ break; + } + + return true; +diff --git a/src/unix/fontenum.cpp b/src/unix/fontenum.cpp +index cc7ee1d..e3739ed 100644 +--- a/src/unix/fontenum.cpp ++++ b/src/unix/fontenum.cpp +@@ -89,7 +89,10 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding, + #endif + { + const gchar *name = pango_font_family_get_name(families[i]); +- OnFacename(wxString(name, wxConvUTF8)); ++ if ( !OnFacename(wxString(name, wxConvUTF8)) ) ++ { ++ break; ++ } + } + } + g_free(families); diff --git a/wxGTK3-3.0.2-gtk-show-uri.patch b/wxGTK3-3.0.2-gtk-show-uri.patch new file mode 100644 index 0000000..e886120 --- /dev/null +++ b/wxGTK3-3.0.2-gtk-show-uri.patch @@ -0,0 +1,48 @@ +From 2dd407609b8987634180c045e9a6d131db6f947e Mon Sep 17 00:00:00 2001 +From: Paul Cornett +Date: Mon, 17 Aug 2015 21:54:41 -0700 +Subject: [PATCH] use gtk_show_uri() in wxLaunchDefaultBrowser() implementation + for GTK+ + +(cherry picked from commit 22eec388068044b9ea3c9fd1539d6686574a32df) +--- + src/unix/utilsx11.cpp | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +diff --git a/src/unix/utilsx11.cpp b/src/unix/utilsx11.cpp +index 12ff73e..7d5811a 100644 +--- a/src/unix/utilsx11.cpp ++++ b/src/unix/utilsx11.cpp +@@ -36,10 +36,11 @@ + #endif + + #ifdef __WXGTK__ +-#include ++#include + #ifdef GDK_WINDOWING_X11 + #include + #endif ++GdkWindow* wxGetTopLevelGDK(); + #endif + + // Only X11 backend is supported for wxGTK here +@@ -887,6 +888,19 @@ bool wxDoLaunchDefaultBrowser(const wxString& url, int flags) + { + wxUnusedVar(flags); + ++#ifdef __WXGTK__ ++#if GTK_CHECK_VERSION(2,14,0) ++#ifndef __WXGTK3__ ++ if (gtk_check_version(2,14,0) == NULL) ++#endif ++ { ++ GdkScreen* screen = gdk_window_get_screen(wxGetTopLevelGDK()); ++ if (gtk_show_uri(screen, url.utf8_str(), GDK_CURRENT_TIME, NULL)) ++ return true; ++ } ++#endif // GTK_CHECK_VERSION(2,14,0) ++#endif // __WXGTK__ ++ + // Our best best is to use xdg-open from freedesktop.org cross-desktop + // compatibility suite xdg-utils + // (see http://portland.freedesktop.org/wiki/) -- this is installed on diff --git a/wxGTK3-3.0.2-init-from-font.patch b/wxGTK3-3.0.2-init-from-font.patch new file mode 100644 index 0000000..d251a8c --- /dev/null +++ b/wxGTK3-3.0.2-init-from-font.patch @@ -0,0 +1,39 @@ +From 238a948ed01f27e05e2c0e08932e8da207590648 Mon Sep 17 00:00:00 2001 +From: Scott Talbert +Date: Tue, 9 Aug 2016 21:12:58 -0400 +Subject: [PATCH] Fix wxNativeFontInfo::InitFromFont() when using Pango + +Use pango_font_description_copy() to make a lossless copy of the original font +instead of doing it using wxWidgets API which is less direct and, in addition, +currently is completely broken as SetXXX() methods don't create the Pango font +description if it doesn't exist as they ought to. + +See https://github.com/wxWidgets/wxWidgets/pull/312 + +(cherry picked from commit dbe2a1c2fdba53ad1d08ce36780267217933a876) +--- + include/wx/fontutil.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/include/wx/fontutil.h b/include/wx/fontutil.h +index 60bb874..9e4d023 100644 +--- a/include/wx/fontutil.h ++++ b/include/wx/fontutil.h +@@ -227,6 +227,9 @@ public : + // init with the parameters of the given font + void InitFromFont(const wxFont& font) + { ++#if wxUSE_PANGO ++ Init(*font.GetNativeFontInfo()); ++#else + // translate all font parameters + SetStyle((wxFontStyle)font.GetStyle()); + SetWeight((wxFontWeight)font.GetWeight()); +@@ -252,6 +255,7 @@ public : + // deal with encoding now (it may override the font family and facename + // so do it after setting them) + SetEncoding(font.GetEncoding()); ++#endif // !wxUSE_PANGO + } + + // accessors and modifiers for the font elements diff --git a/wxGTK3-3.0.2-wxgetkeystate.patch b/wxGTK3-3.0.2-wxgetkeystate.patch new file mode 100644 index 0000000..7ab7093 --- /dev/null +++ b/wxGTK3-3.0.2-wxgetkeystate.patch @@ -0,0 +1,121 @@ +From 98065821bbf0178981b50515094f565b703fcaa8 Mon Sep 17 00:00:00 2001 +From: Scott Talbert +Date: Tue, 13 Sep 2016 13:24:12 +0200 +Subject: [PATCH] Fix wxGetKeyState() on non-X11 wxGTK backends (e.g., Wayland) + +wxGetKeyState() does not currently work on non-X11 GTK backends, and in some +cases it has been reported to crash. It seems that the most likely use case +for wxGetKeyState() is to query the modifier keys, so on non-X11 backends, use +GTK+ calls to retrieve the modifier key state. + +Non-modifier keys are not currently implemented, update the documentation to +mention this. + +Closes https://github.com/wxWidgets/wxWidgets/pull/322 + +(this is a combined backport of 1033fb048dec849906f76ece25f154e6a61fde4e, +9f9c09e24a7f9d86ea51997bd4c55c1ddb7c3159 and +a18fe083cc91bee442863c8ab7f97d6549f2b75c from master) +--- + interface/wx/utils.h | 3 +++ + src/unix/utilsx11.cpp | 62 +++++++++++++++++++++++++++++++++++++++++++++++++-- + 2 files changed, 63 insertions(+), 2 deletions(-) + +diff --git a/interface/wx/utils.h b/interface/wx/utils.h +index 0bac1c0..f127a74 100644 +--- a/interface/wx/utils.h ++++ b/interface/wx/utils.h +@@ -372,6 +372,9 @@ wxString wxGetDisplayName(); + Even though there are virtual key codes defined for mouse buttons, they + cannot be used with this function currently. + ++ In wxGTK, this function can be only used with modifier keys (@c WXK_ALT, @c ++ WXK_CONTROL and @c WXK_SHIFT) when not using X11 backend currently. ++ + @header{wx/utils.h} + */ + bool wxGetKeyState(wxKeyCode key); +diff --git a/src/unix/utilsx11.cpp b/src/unix/utilsx11.cpp +index 6b35551..efc0837 100644 +--- a/src/unix/utilsx11.cpp ++++ b/src/unix/utilsx11.cpp +@@ -809,7 +809,7 @@ WXKeySym wxCharCodeWXToX(int id) + // check current state of a key + // ---------------------------------------------------------------------------- + +-bool wxGetKeyState(wxKeyCode key) ++static bool wxGetKeyStateX11(wxKeyCode key) + { + wxASSERT_MSG(key != WXK_LBUTTON && key != WXK_RBUTTON && key != + WXK_MBUTTON, wxT("can't use wxGetKeyState() for mouse buttons")); +@@ -851,11 +851,69 @@ bool wxGetKeyState(wxKeyCode key) + // with the least-significant bit in the byte representing key 8N. + char key_vector[32]; + XQueryKeymap(pDisplay, key_vector); +- return key_vector[keyCode >> 3] & (1 << (keyCode & 7)); ++ return (key_vector[keyCode >> 3] & (1 << (keyCode & 7))) != 0; + } + + #endif // !defined(__WXGTK__) || defined(GDK_WINDOWING_X11) + ++// We need to use GDK functions when using wxGTK with a non-X11 backend, the ++// X11 code above can't work in this case. ++#ifdef __WXGTK__ ++ ++// gdk_keymap_get_modifier_state() is only available since 3.4 ++#if GTK_CHECK_VERSION(3,4,0) ++ ++#define wxHAS_GETKEYSTATE_GTK ++ ++extern GtkWidget *wxGetRootWindow(); ++ ++static bool wxGetKeyStateGTK(wxKeyCode key) ++{ ++ if (gtk_check_version(3,4,0) != NULL) ++ return false; ++ ++ GdkDisplay* display = gtk_widget_get_display(wxGetRootWindow()); ++ GdkKeymap* keymap = gdk_keymap_get_for_display(display); ++ guint state = gdk_keymap_get_modifier_state(keymap); ++ guint mask = 0; ++ switch (key) ++ { ++ case WXK_ALT: ++ mask = GDK_MOD1_MASK; ++ break; ++ ++ case WXK_CONTROL: ++ mask = GDK_CONTROL_MASK; ++ break; ++ ++ case WXK_SHIFT: ++ mask = GDK_SHIFT_MASK; ++ break; ++ ++ default: ++ wxFAIL_MSG(wxS("Unsupported key, only modifiers can be used")); ++ return false; ++ } ++ return (state & mask) != 0; ++} ++ ++#endif // GTK+ 3.4 ++#endif // __WXGTK__ ++ ++bool wxGetKeyState(wxKeyCode key) ++{ ++#ifdef wxHAS_GETKEYSTATE_GTK ++ GdkDisplay* display = gtk_widget_get_display(wxGetRootWindow()); ++ const char* name = g_type_name(G_TYPE_FROM_INSTANCE(display)); ++ if (strcmp(name, "GdkX11Display") != 0) ++ { ++ return wxGetKeyStateGTK(key); ++ } ++#endif // GTK+ 3.4+ ++ ++ return wxGetKeyStateX11(key); ++} ++ + // ---------------------------------------------------------------------------- + // Launch document with default app + // ---------------------------------------------------------------------------- diff --git a/wxGTK3.spec b/wxGTK3.spec index 94d4729..a7bd134 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 20%{?dist} +Release: 21%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -65,6 +65,20 @@ Patch10: %{name}-%{version}-media-docs.patch # For more details, see the upstream commit: # https://github.com/wxWidgets/wxWidgets/commit/9fea81c069f9d803d79c4ce82f87a00a6e10b490 Patch11: %{name}-%{version}-size-alloc-fix.patch +# Fixes the stop function of wxFontEnumerator +# For more details, see the upstream commit: +# https://github.com/wxWidgets/wxWidgets/commit/a19e512e80acdb2a777c3e44923ad0b1178db35a +Patch12: %{name}-%{version}-font-enumerator-stop.patch +# Fixes wxNativeFontInfo::InitFromFont() +# For more details, see the upstream commit: +# https://github.com/wxWidgets/wxWidgets/commit/238a948ed01f27e05e2c0e08932e8da207590648 +Patch13: %{name}-%{version}-init-from-font.patch +# Fixes wxGetKeyState() from crashing on Wayland +# For more details, see the upstream commits (first is just a dependency patch): +# https://github.com/wxWidgets/wxWidgets/commit/2dd407609b8987634180c045e9a6d131db6f947e +# https://github.com/wxWidgets/wxWidgets/commit/98065821bbf0178981b50515094f565b703fcaa8 +Patch14: %{name}-%{version}-gtk-show-uri.patch +Patch15: %{name}-%{version}-wxgetkeystate.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported @@ -190,6 +204,10 @@ This package provides XML documentation for the %{srcname} library. %patch9 -p1 -b .wayland-window-sizing2 %patch10 -p1 -b .media-docs %patch11 -p1 -b .size-alloc-fix +%patch12 -p1 -b .font-enumerator-stop +%patch13 -p1 -b .init-from-font +%patch14 -p1 -b .gtk-show-uri +%patch15 -p1 -b .wxgetkeystate # patch some installed files to avoid conflicts with 2.8.* sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in @@ -343,6 +361,11 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Tue Sep 13 2016 Scott Talbert - 3.0.2-21 +- Add patch to resolve wxGetKeyState() crash on Wayland (#1266743) +- Add patch to fix wxFontEnumerator stop function +- Add patch to fix wxNativeFontInfo::InitFromFont() + * Sun Aug 28 2016 Jeremy Newton - 3.0.2-20 - Fix alternatives with wxGTK (#1077718) From cb22fbe1a5f79db0910863ca887c5dc38d0fdbbe Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Sun, 18 Sep 2016 21:49:00 -0400 Subject: [PATCH 42/94] Add patch to fix runtime link error due to previous patches --- wxGTK3-3.0.2-gtk-show-uri1.patch | 27 +++++++++++++++++++++++++++ wxGTK3.spec | 12 +++++++++--- 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 wxGTK3-3.0.2-gtk-show-uri1.patch diff --git a/wxGTK3-3.0.2-gtk-show-uri1.patch b/wxGTK3-3.0.2-gtk-show-uri1.patch new file mode 100644 index 0000000..bd5fcc5 --- /dev/null +++ b/wxGTK3-3.0.2-gtk-show-uri1.patch @@ -0,0 +1,27 @@ +From 79676e1e9d307c479c5aefa70c0fd052341d697e Mon Sep 17 00:00:00 2001 +From: Vadim Zeitlin +Date: Mon, 24 Aug 2015 17:18:15 +0200 +Subject: [PATCH] Fix wxGTK build after wxLaunchDefaultBrowser() fix backport. + +2dd407609b8987634180c045e9a6d131db6f947e uses wxGetTopLevelGDK() only +available in master and not in 3.0 branch, avoid it by just using the default +screen (which also avoids having to add another GTK+ version check for +gdk_window_get_screen() which is only available since 2.24). +--- + src/unix/utilsx11.cpp | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/unix/utilsx11.cpp b/src/unix/utilsx11.cpp +index 7d5811a..6b35551 100644 +--- a/src/unix/utilsx11.cpp ++++ b/src/unix/utilsx11.cpp +@@ -894,8 +894,7 @@ bool wxDoLaunchDefaultBrowser(const wxString& url, int flags) + if (gtk_check_version(2,14,0) == NULL) + #endif + { +- GdkScreen* screen = gdk_window_get_screen(wxGetTopLevelGDK()); +- if (gtk_show_uri(screen, url.utf8_str(), GDK_CURRENT_TIME, NULL)) ++ if (gtk_show_uri(NULL, url.utf8_str(), GDK_CURRENT_TIME, NULL)) + return true; + } + #endif // GTK_CHECK_VERSION(2,14,0) diff --git a/wxGTK3.spec b/wxGTK3.spec index a7bd134..fc0ccf9 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 21%{?dist} +Release: 22%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -76,9 +76,11 @@ Patch13: %{name}-%{version}-init-from-font.patch # Fixes wxGetKeyState() from crashing on Wayland # For more details, see the upstream commits (first is just a dependency patch): # https://github.com/wxWidgets/wxWidgets/commit/2dd407609b8987634180c045e9a6d131db6f947e +# https://github.com/wxWidgets/wxWidgets/commit/79676e1e9d307c479c5aefa70c0fd052341d697e # https://github.com/wxWidgets/wxWidgets/commit/98065821bbf0178981b50515094f565b703fcaa8 Patch14: %{name}-%{version}-gtk-show-uri.patch -Patch15: %{name}-%{version}-wxgetkeystate.patch +Patch15: %{name}-%{version}-gtk-show-uri1.patch +Patch16: %{name}-%{version}-wxgetkeystate.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported @@ -207,7 +209,8 @@ This package provides XML documentation for the %{srcname} library. %patch12 -p1 -b .font-enumerator-stop %patch13 -p1 -b .init-from-font %patch14 -p1 -b .gtk-show-uri -%patch15 -p1 -b .wxgetkeystate +%patch15 -p1 -b .gtk-show-uri1 +%patch16 -p1 -b .wxgetkeystate # patch some installed files to avoid conflicts with 2.8.* sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in @@ -361,6 +364,9 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Mon Sep 19 2016 Scott Talbert - 3.0.2-22 +- Add patch to fix runtime link error due to previous patches + * Tue Sep 13 2016 Scott Talbert - 3.0.2-21 - Add patch to resolve wxGetKeyState() crash on Wayland (#1266743) - Add patch to fix wxFontEnumerator stop function From b6b74248280c17b467edfe30b07ed082b7b375c3 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Mon, 19 Sep 2016 20:14:08 -0400 Subject: [PATCH 43/94] Fix alternatives implementation --- wxGTK3.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index fc0ccf9..87606a2 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 22%{?dist} +Release: 23%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -122,6 +122,8 @@ Requires: %{name}-media = %{version}-%{release} Requires: %{wxbasename} = %{version}-%{release} Requires: gtk%{gtkver}-devel Requires: libGLU-devel +Requires(post): %{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives Provides: %{srcname}-devel = %{version}-%{release} %description devel @@ -301,6 +303,9 @@ popd %postun -n %{wxbasename} -p /sbin/ldconfig %post devel +if [ -f %{_bindir}/wx-config ] && [ ! -h %{_bindir}/wx-config ] ; then + rm %{_bindir}/wx-config +fi %{_sbindir}/update-alternatives --install %{_bindir}/wx-config \ wx-config %{_libexecdir}/%{name}/wx-config 3 %{_sbindir}/update-alternatives --install %{_bindir}/wxrc \ @@ -364,6 +369,9 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Mon Sep 19 2016 Scott Talbert - 3.0.2-23 +- Fix alternatives implementation + * Mon Sep 19 2016 Scott Talbert - 3.0.2-22 - Add patch to fix runtime link error due to previous patches From a2cf67754af4b85eb6e28e23e24d209ec1ffa66b Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Sat, 24 Sep 2016 00:14:43 -0400 Subject: [PATCH 44/94] Add patch to fix crash in wxGCDC::DrawEllipticArc() --- wxGTK3-3.0.2-draw-elliptic-arc-crash.patch | 38 ++++++++++++++++++++++ wxGTK3.spec | 10 +++++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 wxGTK3-3.0.2-draw-elliptic-arc-crash.patch diff --git a/wxGTK3-3.0.2-draw-elliptic-arc-crash.patch b/wxGTK3-3.0.2-draw-elliptic-arc-crash.patch new file mode 100644 index 0000000..29a993e --- /dev/null +++ b/wxGTK3-3.0.2-draw-elliptic-arc-crash.patch @@ -0,0 +1,38 @@ +From 148971013ee48926dfe153ca39c94be92acde37c Mon Sep 17 00:00:00 2001 +From: Paul Cornett +Date: Wed, 15 Oct 2014 16:53:54 +0000 +Subject: [PATCH] fix crash in wxGCDC::DrawEllipticArc() after r76954, closes + #16623 + +git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 +--- + src/common/dcgraph.cpp | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp +index d27e9cc..c390eb4 100644 +--- a/src/common/dcgraph.cpp ++++ b/src/common/dcgraph.cpp +@@ -646,13 +646,12 @@ void wxGCDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h, + m_graphicContext->PushState(); + m_graphicContext->Translate(dx, dy); + m_graphicContext->Scale(factor, 1.0); +- wxGraphicsPath path; ++ wxGraphicsPath path = m_graphicContext->CreatePath(); + + // since these angles (ea,sa) are measured counter-clockwise, we invert them to + // get clockwise angles + if ( m_brush.GetStyle() != wxTRANSPARENT ) + { +- path = m_graphicContext->CreatePath(); + path.MoveToPoint( 0, 0 ); + path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea ); + path.AddLineToPoint( 0, 0 ); +@@ -664,7 +663,6 @@ void wxGCDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h, + } + else + { +- wxGraphicsPath path = m_graphicContext->CreatePath(); + path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea ); + m_graphicContext->DrawPath( path ); + } diff --git a/wxGTK3.spec b/wxGTK3.spec index 87606a2..ada9880 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 23%{?dist} +Release: 24%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -81,6 +81,10 @@ Patch13: %{name}-%{version}-init-from-font.patch Patch14: %{name}-%{version}-gtk-show-uri.patch Patch15: %{name}-%{version}-gtk-show-uri1.patch Patch16: %{name}-%{version}-wxgetkeystate.patch +# Fixes crash in wxGCDC::DrawEllipticArc() +# For more details, see the upstream commit: +# https://github.com/wxWidgets/wxWidgets/commit/148971013ee48926dfe153ca39c94be92acde37c +Patch17: %{name}-%{version}-draw-elliptic-arc-crash.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported @@ -213,6 +217,7 @@ This package provides XML documentation for the %{srcname} library. %patch14 -p1 -b .gtk-show-uri %patch15 -p1 -b .gtk-show-uri1 %patch16 -p1 -b .wxgetkeystate +%patch17 -p1 -b .draw-elliptic-arc-crash # patch some installed files to avoid conflicts with 2.8.* sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in @@ -369,6 +374,9 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Sat Sep 24 2016 Scott Talbert - 3.0.2-24 +- Add patch to fix crash in wxGCDC::DrawEllipticArc() + * Mon Sep 19 2016 Scott Talbert - 3.0.2-23 - Fix alternatives implementation From 84f891587440064a2906a5f6fec1d500c83879ca Mon Sep 17 00:00:00 2001 From: Mystro256 Date: Thu, 29 Sep 2016 08:55:00 -0400 Subject: [PATCH 45/94] Fix rpmlint warning (out of place tab) --- wxGTK3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index ada9880..c263878 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -64,7 +64,7 @@ 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 +Patch11: %{name}-%{version}-size-alloc-fix.patch # Fixes the stop function of wxFontEnumerator # For more details, see the upstream commit: # https://github.com/wxWidgets/wxWidgets/commit/a19e512e80acdb2a777c3e44923ad0b1178db35a From e523d939e9b40797d897dd281e6d82428f54c917 Mon Sep 17 00:00:00 2001 From: Mystro256 Date: Tue, 4 Oct 2016 20:53:23 -0400 Subject: [PATCH 46/94] Fix 1381767 --- wxGTK3-3.0.2-fix-percent-dnd.patch | 62 ++++++++++++++++++++++++++++++ wxGTK3.spec | 30 +++++---------- 2 files changed, 72 insertions(+), 20 deletions(-) create mode 100644 wxGTK3-3.0.2-fix-percent-dnd.patch diff --git a/wxGTK3-3.0.2-fix-percent-dnd.patch b/wxGTK3-3.0.2-fix-percent-dnd.patch new file mode 100644 index 0000000..e887055 --- /dev/null +++ b/wxGTK3-3.0.2-fix-percent-dnd.patch @@ -0,0 +1,62 @@ +commit 3b047b58ceb4a0bf11a607b3a5a47697d70de946 +Author: Tim Kosse +Date: Mon Sep 14 11:42:38 2015 +0200 + + Escape filenames in wxFileDataObject::GetDataSize/GetDataHere + + On wxGTK, wxFileDataObject::SetData calls g_filename_from_uri which + percent-decodes URIs. No corresponding percent-encoding was done in + wxFileDataObject::GetDataSize/GetDataHere. Use g_filename_to_uri instead in so + that filenames are properly escaped. + + This commit also fixes the data being truncated if it contains non-ASCII + characters on wide-character builds, see the memcpy arguments in the original + code. + +diff --git a/src/gtk/dataobj.cpp b/src/gtk/dataobj.cpp +index d786257..1754d6c 100644 +--- a/src/gtk/dataobj.cpp ++++ b/src/gtk/dataobj.cpp +@@ -235,16 +235,21 @@ wxTextDataObject::GetAllFormats(wxDataFormat *formats, + + bool wxFileDataObject::GetDataHere(void *buf) const + { +- wxString filenames; ++ char* out = reinterpret_cast(buf); + + for (size_t i = 0; i < m_filenames.GetCount(); i++) + { +- filenames += wxT("file:"); +- filenames += m_filenames[i]; +- filenames += wxT("\r\n"); ++ char* uri = g_filename_to_uri(m_filenames[i].mbc_str(), 0, 0); ++ if (uri) ++ { ++ size_t const len = strlen(uri); ++ strcpy(out, uri); ++ out += len; ++ *(out++) = '\r'; ++ *(out++) = '\n'; ++ } + } +- +- memcpy( buf, filenames.mbc_str(), filenames.length() + 1 ); ++ *out = 0; + + return true; + } +@@ -255,9 +260,11 @@ size_t wxFileDataObject::GetDataSize() const + + for (size_t i = 0; i < m_filenames.GetCount(); i++) + { +- // This is junk in UTF-8 +- res += m_filenames[i].length(); +- res += 5 + 2; // "file:" (5) + "\r\n" (2) ++ char* uri = g_filename_to_uri(m_filenames[i].mbc_str(), 0, 0); ++ if (uri) { ++ res += strlen(uri) + 2; // Including "\r\n" ++ g_free(uri); ++ } + } + + return res + 1; diff --git a/wxGTK3.spec b/wxGTK3.spec index c263878..bbcf039 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 24%{?dist} +Release: 25%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -85,6 +85,10 @@ Patch16: %{name}-%{version}-wxgetkeystate.patch # For more details, see the upstream commit: # https://github.com/wxWidgets/wxWidgets/commit/148971013ee48926dfe153ca39c94be92acde37c Patch17: %{name}-%{version}-draw-elliptic-arc-crash.patch +# Fixes drag and drop issues with filenames containing percent symbols +# For more details, see the upstream commit: +# https://github.com/wxWidgets/wxWidgets/commit/3b047b58ceb4a0bf11a607b3a5a47697d70de946 +Patch18: %{name}-%{version}-fix-percent-dnd.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported @@ -199,25 +203,7 @@ This package provides XML documentation for the %{srcname} library. %prep -%setup -q -n %{srcname}-%{version} -a 1 -%patch0 -p1 -b .abicheck -%patch1 -p1 -b .upstreamfixes -%patch2 -p1 -b .spinbutt -%patch3 -p1 -b .checkradio -%patch4 -p1 -b .wayland -%patch5 -p1 -b .stc-gcc6 -%patch6 -p1 -b .strings-tests-gcc6 -%patch7 -p1 -b .getbestsize -%patch8 -p1 -b .wayland-window-sizing1 -%patch9 -p1 -b .wayland-window-sizing2 -%patch10 -p1 -b .media-docs -%patch11 -p1 -b .size-alloc-fix -%patch12 -p1 -b .font-enumerator-stop -%patch13 -p1 -b .init-from-font -%patch14 -p1 -b .gtk-show-uri -%patch15 -p1 -b .gtk-show-uri1 -%patch16 -p1 -b .wxgetkeystate -%patch17 -p1 -b .draw-elliptic-arc-crash +%autosetup -n %{srcname}-%{version} -a 1 -p1 # patch some installed files to avoid conflicts with 2.8.* sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in @@ -374,6 +360,10 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Tue Oct 04 2016 Jeremy Newton - 3.0.2-25 +- Add patch to fix bug 1381767 +- Clean up spec file with autosetup + * Sat Sep 24 2016 Scott Talbert - 3.0.2-24 - Add patch to fix crash in wxGCDC::DrawEllipticArc() From 7793bd74b23d85b41621250a01f3495bfeef74f5 Mon Sep 17 00:00:00 2001 From: Mystro256 Date: Tue, 4 Oct 2016 22:28:56 -0400 Subject: [PATCH 47/94] Memory leak in last patch, as well, changed commit refence to 3.0 branch --- wxGTK3-3.0.2-fix-percent-dnd.patch | 4 ++-- wxGTK3-3.0.2-fix-percent-dnd2.patch | 35 +++++++++++++++++++++++++++++ wxGTK3.spec | 12 +++++++--- 3 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 wxGTK3-3.0.2-fix-percent-dnd2.patch diff --git a/wxGTK3-3.0.2-fix-percent-dnd.patch b/wxGTK3-3.0.2-fix-percent-dnd.patch index e887055..6f3f931 100644 --- a/wxGTK3-3.0.2-fix-percent-dnd.patch +++ b/wxGTK3-3.0.2-fix-percent-dnd.patch @@ -1,4 +1,4 @@ -commit 3b047b58ceb4a0bf11a607b3a5a47697d70de946 +commit 8f29de5231e348d356b5f3962225362e8fd87ba9 Author: Tim Kosse Date: Mon Sep 14 11:42:38 2015 +0200 @@ -14,7 +14,7 @@ Date: Mon Sep 14 11:42:38 2015 +0200 code. diff --git a/src/gtk/dataobj.cpp b/src/gtk/dataobj.cpp -index d786257..1754d6c 100644 +index 9a39607..2d1f43c 100644 --- a/src/gtk/dataobj.cpp +++ b/src/gtk/dataobj.cpp @@ -235,16 +235,21 @@ wxTextDataObject::GetAllFormats(wxDataFormat *formats, diff --git a/wxGTK3-3.0.2-fix-percent-dnd2.patch b/wxGTK3-3.0.2-fix-percent-dnd2.patch new file mode 100644 index 0000000..772d477 --- /dev/null +++ b/wxGTK3-3.0.2-fix-percent-dnd2.patch @@ -0,0 +1,35 @@ +commit 0f9f942a5bbe0ed9f07ea2e1fef90a7e2db768e5 +Author: Paul Cornett +Date: Fri Oct 2 09:14:06 2015 -0700 + + Fix memory leak introduced in 8f29de52 + + Also, use memcpy() instead of strcpy() since we already have the length, + and use static_cast instead of reinterpret_cast. + +diff --git a/src/gtk/dataobj.cpp b/src/gtk/dataobj.cpp +index 2d1f43c..df460d8 100644 +--- a/src/gtk/dataobj.cpp ++++ b/src/gtk/dataobj.cpp +@@ -235,7 +235,7 @@ wxTextDataObject::GetAllFormats(wxDataFormat *formats, + + bool wxFileDataObject::GetDataHere(void *buf) const + { +- char* out = reinterpret_cast(buf); ++ char* out = static_cast(buf); + + for (size_t i = 0; i < m_filenames.GetCount(); i++) + { +@@ -243,10 +243,11 @@ bool wxFileDataObject::GetDataHere(void *buf) const + if (uri) + { + size_t const len = strlen(uri); +- strcpy(out, uri); ++ memcpy(out, uri, len); + out += len; + *(out++) = '\r'; + *(out++) = '\n'; ++ g_free(uri); + } + } + *out = 0; diff --git a/wxGTK3.spec b/wxGTK3.spec index bbcf039..3875a7f 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 25%{?dist} +Release: 26%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -86,9 +86,11 @@ Patch16: %{name}-%{version}-wxgetkeystate.patch # https://github.com/wxWidgets/wxWidgets/commit/148971013ee48926dfe153ca39c94be92acde37c Patch17: %{name}-%{version}-draw-elliptic-arc-crash.patch # Fixes drag and drop issues with filenames containing percent symbols -# For more details, see the upstream commit: -# https://github.com/wxWidgets/wxWidgets/commit/3b047b58ceb4a0bf11a607b3a5a47697d70de946 +# For more details, see the upstream commits: +# https://github.com/wxWidgets/wxWidgets/commit/8f29de5231e348d356b5f3962225362e8fd87ba9 +# https://github.com/wxWidgets/wxWidgets/commit/0f9f942a5bbe0ed9f07ea2e1fef90a7e2db768e5 Patch18: %{name}-%{version}-fix-percent-dnd.patch +Patch19: %{name}-%{version}-fix-percent-dnd2.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported @@ -360,6 +362,10 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Tue Oct 04 2016 Jeremy Newton - 3.0.2-26 +- Memory leak in last patch, add patch to fix it +- Change last patch to 3.0 branch for consistency + * Tue Oct 04 2016 Jeremy Newton - 3.0.2-25 - Add patch to fix bug 1381767 - Clean up spec file with autosetup From 3cf7211485a9941db2f26edc86abce5155d2864b Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Fri, 7 Oct 2016 21:08:25 -0400 Subject: [PATCH 48/94] Add a -webview subpackage in F26+ --- wxGTK3.spec | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index 3875a7f..6111acb 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 26%{?dist} +Release: 27%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -129,6 +129,9 @@ Summary: Development files for the wxGTK3 library Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}-gl = %{version}-%{release} Requires: %{name}-media = %{version}-%{release} +%if 0%{?fedora} > 25 +Requires: %{name}-webview = %{version}-%{release} +%endif Requires: %{wxbasename} = %{version}-%{release} Requires: gtk%{gtkver}-devel Requires: libGLU-devel @@ -170,6 +173,21 @@ comprehensive set of helper classes for most common application tasks, ranging from networking to HTML display and image manipulation. +%if 0%{?fedora} > 25 +%package webview +Summary: WebView add-on for the wxWidgets library +Group: System Environment/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description webview +WebView add-on for the wxWidgets library. +wxWidgets is the GTK port of the C++ cross-platform wxWidgets +GUI library, offering classes for all common GUI controls as well as a +comprehensive set of helper classes for most common application tasks, +ranging from networking to HTML display and image manipulation. +%endif + + %package -n %{wxbasename} Summary: Non-GUI support classes from the wxWidgets library Group: System Environment/Libraries @@ -292,6 +310,11 @@ popd %post media -p /sbin/ldconfig %postun media -p /sbin/ldconfig +%if 0%{?fedora} > 25 +%post webview -p /sbin/ldconfig +%postun webview -p /sbin/ldconfig +%endif + %post -n %{wxbasename} -p /sbin/ldconfig %postun -n %{wxbasename} -p /sbin/ldconfig @@ -323,8 +346,10 @@ fi %{_libdir}/libwx_gtk%{gtkver}u_richtext-*.so.* %{_libdir}/libwx_gtk%{gtkver}u_stc-*.so.* %if %{gtkver} == 3 +%if 0%{?fedora} < 26 %{_libdir}/libwx_gtk%{gtkver}u_webview-*.so.* %endif +%endif %{_libdir}/libwx_gtk%{gtkver}u_xrc-*.so.* %files devel @@ -348,6 +373,11 @@ fi %files media %{_libdir}/libwx_gtk%{gtkver}u_media-*.so.* +%if 0%{?fedora} > 25 +%files webview +%{_libdir}/libwx_gtk%{gtkver}u_webview-*.so.* +%endif + %files -n %{wxbasename} %doc docs/changes.txt docs/gpl.txt docs/lgpl.txt docs/licence.txt %doc docs/licendoc.txt docs/preamble.txt docs/readme.txt @@ -362,6 +392,9 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Sat Oct 08 2016 Scott Talbert - 3.0.2-27 +- Add a -webview subpackage in F26+ + * Tue Oct 04 2016 Jeremy Newton - 3.0.2-26 - Memory leak in last patch, add patch to fix it - Change last patch to 3.0 branch for consistency From 6ddfa9d786a80e5f1bc52429ec3e03448373a83c Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Mon, 10 Oct 2016 23:00:39 -0400 Subject: [PATCH 49/94] Fix rename issues in Filezilla with overlay scrollbars disabled (#1381765) --- wxGTK3-3.0.2-scrolwin-sizing-loop.patch | 47 +++++++++++++++++++++++++ wxGTK3.spec | 10 +++++- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 wxGTK3-3.0.2-scrolwin-sizing-loop.patch diff --git a/wxGTK3-3.0.2-scrolwin-sizing-loop.patch b/wxGTK3-3.0.2-scrolwin-sizing-loop.patch new file mode 100644 index 0000000..a2f665f --- /dev/null +++ b/wxGTK3-3.0.2-scrolwin-sizing-loop.patch @@ -0,0 +1,47 @@ +From 8d7e0d045250fa78a7e7d5a25cecee43bb75db3a Mon Sep 17 00:00:00 2001 +From: Paul Cornett +Date: Mon, 10 Nov 2014 04:13:18 +0000 +Subject: [PATCH] fix infinite sizing loop with GTK3 when using a non-default + target window, closes #16668 + +git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 +--- + docs/changes.txt | 5 +++++ + src/gtk/scrolwin.cpp | 8 ++++++++ + 2 files changed, 13 insertions(+) + +diff --git a/docs/changes.txt b/docs/changes.txt +index 6f1e996..0a09cd5 100644 +--- a/docs/changes.txt ++++ b/docs/changes.txt +@@ -581,6 +581,11 @@ All (GUI): + + - Fix several floating point rounding bugs in wxPropertyGrid (Artur Wieczorek). + ++wxGTK: ++ ++- Fix infinite sizing loop with GTK3 when using wxScrolled with a non-default ++ target window. ++ + wxMSW: + + - Fix compilation with C++Builder XE compiler (Nichka). +diff --git a/src/gtk/scrolwin.cpp b/src/gtk/scrolwin.cpp +index 9b39077..c500288 100644 +--- a/src/gtk/scrolwin.cpp ++++ b/src/gtk/scrolwin.cpp +@@ -81,6 +81,14 @@ void wxScrollHelper::AdjustScrollbars() + { + int vw, vh; + m_targetWindow->GetVirtualSize(&vw, &vh); ++#ifdef __WXGTK3__ ++ if (m_targetWindow != m_win) ++ { ++ // setting wxPizza preferred size keeps GtkScrolledWindow from causing ++ // an infinite sizing loop ++ gtk_widget_set_size_request(m_win->m_wxwindow, vw, vh); ++ } ++#endif + + int w, h; + const wxSize availSize = GetSizeAvailableForScrollTarget( diff --git a/wxGTK3.spec b/wxGTK3.spec index 6111acb..de2238f 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 27%{?dist} +Release: 28%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -91,6 +91,11 @@ Patch17: %{name}-%{version}-draw-elliptic-arc-crash.patch # https://github.com/wxWidgets/wxWidgets/commit/0f9f942a5bbe0ed9f07ea2e1fef90a7e2db768e5 Patch18: %{name}-%{version}-fix-percent-dnd.patch Patch19: %{name}-%{version}-fix-percent-dnd2.patch +# Fixes rename issues in Filezilla with overlay scrollbars disabled - note: the +# size-alloc-fix patch is also required. +# For more details, see the upstream commit: +# https://github.com/wxWidgets/wxWidgets/commit/8d7e0d045250fa78a7e7d5a25cecee43bb75db3a +Patch20: %{name}-%{version}-scrolwin-sizing-loop.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported @@ -392,6 +397,9 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Mon Oct 10 2016 Scott Talbert - 3.0.2-28 +- Fix rename issues in Filezilla with overlay scrollbars disabled (#1381765) + * Sat Oct 08 2016 Scott Talbert - 3.0.2-27 - Add a -webview subpackage in F26+ From a0614b960f736ec7d652e5407a83f88fac524efc Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Tue, 11 Oct 2016 00:05:20 -0400 Subject: [PATCH 50/94] Remove changes.txt portion from scrolwin patch as it doesn't apply cleanly --- wxGTK3-3.0.2-scrolwin-sizing-loop.patch | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/wxGTK3-3.0.2-scrolwin-sizing-loop.patch b/wxGTK3-3.0.2-scrolwin-sizing-loop.patch index a2f665f..3a29b6e 100644 --- a/wxGTK3-3.0.2-scrolwin-sizing-loop.patch +++ b/wxGTK3-3.0.2-scrolwin-sizing-loop.patch @@ -10,22 +10,6 @@ git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78 src/gtk/scrolwin.cpp | 8 ++++++++ 2 files changed, 13 insertions(+) -diff --git a/docs/changes.txt b/docs/changes.txt -index 6f1e996..0a09cd5 100644 ---- a/docs/changes.txt -+++ b/docs/changes.txt -@@ -581,6 +581,11 @@ All (GUI): - - - Fix several floating point rounding bugs in wxPropertyGrid (Artur Wieczorek). - -+wxGTK: -+ -+- Fix infinite sizing loop with GTK3 when using wxScrolled with a non-default -+ target window. -+ - wxMSW: - - - Fix compilation with C++Builder XE compiler (Nichka). diff --git a/src/gtk/scrolwin.cpp b/src/gtk/scrolwin.cpp index 9b39077..c500288 100644 --- a/src/gtk/scrolwin.cpp From 095c4c4b5355f576be9c15ec6be8f3a90fec85ec Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Sun, 13 Nov 2016 21:20:35 -0500 Subject: [PATCH 51/94] Fix some sizing problems with GTK3 (#1392102) - Fix non-default window background color with GTK+ >= 3.20 (#1393847) --- wxGTK3-3.0.2-background-color.patch | 32 +++++ wxGTK3-3.0.2-gtk-sizing-problems.patch | 166 +++++++++++++++++++++++++ wxGTK3.spec | 14 ++- 3 files changed, 211 insertions(+), 1 deletion(-) create mode 100644 wxGTK3-3.0.2-background-color.patch create mode 100644 wxGTK3-3.0.2-gtk-sizing-problems.patch diff --git a/wxGTK3-3.0.2-background-color.patch b/wxGTK3-3.0.2-background-color.patch new file mode 100644 index 0000000..830d876 --- /dev/null +++ b/wxGTK3-3.0.2-background-color.patch @@ -0,0 +1,32 @@ +From 553ec7537c30636ddf6cbc157373477fb2e9da41 Mon Sep 17 00:00:00 2001 +From: Paul Cornett +Date: Wed, 9 Nov 2016 20:06:26 -0800 +Subject: [PATCH] Fix non-default window background color with GTK+ >= 3.20 + +GTK+ no longer automatically paints non-default window background. See #17586 + +(cherry picked from commit 9bb5d0435a4cce5bcb7b3956cb730f59c37ea5f6) +--- + src/gtk/window.cpp | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp +index 0826e06..bca5443 100644 +--- a/src/gtk/window.cpp ++++ b/src/gtk/window.cpp +@@ -4238,6 +4238,15 @@ void wxWindowGTK::GTKSendPaintEvents(const GdkRegion* region) + 0, 0, w, h); + #endif // !__WXGTK3__ + } ++#ifdef __WXGTK3__ ++ else if (m_backgroundColour.IsOk() && gtk_check_version(3,20,0) == NULL) ++ { ++ cairo_save(cr); ++ gdk_cairo_set_source_rgba(cr, m_backgroundColour); ++ cairo_paint(cr); ++ cairo_restore(cr); ++ } ++#endif + break; + + case wxBG_STYLE_PAINT: diff --git a/wxGTK3-3.0.2-gtk-sizing-problems.patch b/wxGTK3-3.0.2-gtk-sizing-problems.patch new file mode 100644 index 0000000..8096209 --- /dev/null +++ b/wxGTK3-3.0.2-gtk-sizing-problems.patch @@ -0,0 +1,166 @@ +From 6475376931bf316a4fd791114408f7c1fc2fe836 Mon Sep 17 00:00:00 2001 +From: Paul Cornett +Date: Wed, 2 Nov 2016 10:30:44 -0700 +Subject: [PATCH] Fix some sizing problems with GTK3 + +A change in size-allocate handling with GTK+ 3.20 exposed a flaw in our method for +deferring queue-resize requests. Using an idle callback to process the requests +did not work well with the GdkFrameClock-based system used since GTK+ 3.8. Using +the "check-resize" signal works better. Also with GTK+ >= 3.20, it seems necessary +to manually work the queue-resize up to the TLW, as otherwise the resized widgets +don't get updated without an external size-allocate event. +See #17585 + +(backport of 3b4ee5a031b1c2fa29772b90751a82dd7f1d3de0) +--- + src/gtk/window.cpp | 102 +++++++++++++++++++++++++++++++++++++++-------------- + 1 file changed, 76 insertions(+), 26 deletions(-) + +diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp +index d27f889..ab56baa 100644 +--- a/src/gtk/window.cpp ++++ b/src/gtk/window.cpp +@@ -221,6 +221,8 @@ int g_lastButtonNumber = 0; + + #ifdef __WXGTK3__ + static GList* gs_sizeRevalidateList; ++static GSList* gs_queueResizeList; ++static bool gs_inSizeAllocate; + void wxGTKSizeRevalidate(wxWindow*); + #endif + +@@ -2083,6 +2085,54 @@ static void frame_clock_layout(GdkFrameClock*, wxWindow* win) + } + #endif // GTK_CHECK_VERSION(3,8,0) + ++#ifdef __WXGTK3__ ++//----------------------------------------------------------------------------- ++// "check-resize" ++//----------------------------------------------------------------------------- ++ ++static void check_resize(GtkContainer*, wxWindow*) ++{ ++ gs_inSizeAllocate = true; ++} ++ ++static void check_resize_after(GtkContainer*, wxWindow*) ++{ ++ gs_inSizeAllocate = false; ++ if (gs_queueResizeList) ++ { ++ for (GSList* p = gs_queueResizeList; p; p = p->next) ++ { ++ if (p->data == NULL) ++ continue; ++ ++ wxWindowGTK* w = static_cast(p->data); ++ g_object_remove_weak_pointer(G_OBJECT(w->m_widget), &p->data); ++ gtk_widget_set_size_request(w->m_widget, w->m_width, w->m_height); ++ ++ // in case only the position is changing ++ gtk_widget_queue_resize(w->m_widget); ++ ++ // need to force the queue-resize up to the TLW with GTK >= 3.20 ++ if (gtk_check_version(3,20,0) == NULL) ++ { ++ GtkWidget* widget = w->m_widget; ++ for (;;) ++ { ++ widget = gtk_widget_get_parent(widget); ++ if (widget == NULL) ++ break; ++ gtk_widget_queue_resize(widget); ++ if (gtk_widget_is_toplevel(widget)) ++ break; ++ } ++ } ++ } ++ g_slist_free(gs_queueResizeList); ++ gs_queueResizeList = NULL; ++ } ++} ++#endif // __WXGTK3__ ++ + } // extern "C" + + void wxWindowGTK::GTKHandleRealized() +@@ -2670,6 +2720,13 @@ void wxWindowGTK::PostCreation() + g_signal_connect(m_wxwindow ? m_wxwindow : m_widget, "size_allocate", + G_CALLBACK(size_allocate), this); + } ++#ifdef __WXGTK3__ ++ else ++ { ++ g_signal_connect(m_widget, "check-resize", G_CALLBACK(check_resize), this); ++ g_signal_connect_after(m_widget, "check-resize", G_CALLBACK(check_resize_after), this); ++ } ++#endif + + #if GTK_CHECK_VERSION(2, 8, 0) + #ifndef __WXGTK3__ +@@ -2778,46 +2835,39 @@ void wxWindowGTK::ConnectWidget( GtkWidget *widget ) + G_CALLBACK (gtk_window_leave_callback), this); + } + +-static GSList* gs_queueResizeList; +- +-extern "C" { +-static gboolean queue_resize(void*) +-{ +- gdk_threads_enter(); +- for (GSList* p = gs_queueResizeList; p; p = p->next) +- { +- if (p->data) +- { +- gtk_widget_queue_resize(GTK_WIDGET(p->data)); +- g_object_remove_weak_pointer(G_OBJECT(p->data), &p->data); +- } +- } +- g_slist_free(gs_queueResizeList); +- gs_queueResizeList = NULL; +- gdk_threads_leave(); +- return false; +-} +-} +- + void wxWindowGTK::DoMoveWindow(int x, int y, int width, int height) + { +- gtk_widget_set_size_request(m_widget, width, height); + GtkWidget* parent = gtk_widget_get_parent(m_widget); + if (WX_IS_PIZZA(parent)) ++ { + WX_PIZZA(parent)->move(m_widget, x, y, width, height); ++ if ( ++#ifdef __WXGTK3__ ++ !gs_inSizeAllocate && ++#endif ++ gtk_widget_get_visible(m_widget)) ++ { ++ // in case only the position is changing ++ gtk_widget_queue_resize(m_widget); ++ } ++ } + ++#ifdef __WXGTK3__ + // With GTK3, gtk_widget_queue_resize() is ignored while a size-allocate + // is in progress. This situation is common in wxWidgets, since + // size-allocate can generate wxSizeEvent and size event handlers often + // call SetSize(), directly or indirectly. Work around this by deferring + // the queue-resize until after size-allocate processing is finished. +- if (g_slist_find(gs_queueResizeList, m_widget) == NULL) ++ if (!gs_inSizeAllocate || !gtk_widget_get_visible(m_widget)) ++ gtk_widget_set_size_request(m_widget, width, height); ++ else + { +- if (gs_queueResizeList == NULL) +- g_idle_add_full(GTK_PRIORITY_RESIZE, queue_resize, NULL, NULL); +- gs_queueResizeList = g_slist_prepend(gs_queueResizeList, m_widget); ++ gs_queueResizeList = g_slist_prepend(gs_queueResizeList, this); + g_object_add_weak_pointer(G_OBJECT(m_widget), &gs_queueResizeList->data); + } ++#else // !__WXGTK3__ ++ gtk_widget_set_size_request(m_widget, width, height); ++#endif // !__WXGTK3__ + } + + void wxWindowGTK::ConstrainSize() diff --git a/wxGTK3.spec b/wxGTK3.spec index de2238f..c0c9f6f 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 28%{?dist} +Release: 29%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -96,6 +96,14 @@ Patch19: %{name}-%{version}-fix-percent-dnd2.patch # For more details, see the upstream commit: # https://github.com/wxWidgets/wxWidgets/commit/8d7e0d045250fa78a7e7d5a25cecee43bb75db3a Patch20: %{name}-%{version}-scrolwin-sizing-loop.patch +# Fixes sizing issues on GTK 3.20+ +# For more details, see the upstream commit: +# https://github.com/wxWidgets/wxWidgets/commit/6475376931bf316a4fd791114408f7c1fc2fe836 +Patch21: %{name}-%{version}-gtk-sizing-problems.patch +# Fixes non-default window background color with GTK+ >= 3.20 +# For more details, see the upstream commit: +# https://github.com/wxWidgets/wxWidgets/commit/553ec7537c30636ddf6cbc157373477fb2e9da41 +Patch22: %{name}-%{version}-background-color.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported @@ -397,6 +405,10 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Mon Nov 14 2016 Scott Talbert - 3.0.2-29 +- Fix some sizing problems with GTK3 (#1392102) +- Fix non-default window background color with GTK+ >= 3.20 (#1393847) + * Mon Oct 10 2016 Scott Talbert - 3.0.2-28 - Fix rename issues in Filezilla with overlay scrollbars disabled (#1381765) From fe5a6f06cea66252cd780f3bdcdf073fe05d38a1 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Thu, 24 Nov 2016 00:00:18 -0500 Subject: [PATCH 52/94] Fix poedit regression in -29 - add paint clipping region patch (#1396747) - Add patch to change ~wxPGChoicesData from private to protected --- wxGTK3-3.0.2-paint-clipping-region.patch | 40 +++++++++++++++++++ ...wxpgchoicesdata-protected-destructor.patch | 21 ++++++++++ wxGTK3.spec | 15 ++++++- 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 wxGTK3-3.0.2-paint-clipping-region.patch create mode 100644 wxGTK3-3.0.2-wxpgchoicesdata-protected-destructor.patch diff --git a/wxGTK3-3.0.2-paint-clipping-region.patch b/wxGTK3-3.0.2-paint-clipping-region.patch new file mode 100644 index 0000000..13f6827 --- /dev/null +++ b/wxGTK3-3.0.2-paint-clipping-region.patch @@ -0,0 +1,40 @@ +From cd8811bf142172c4920ba13a685472ceb405ef78 Mon Sep 17 00:00:00 2001 +From: Paul Cornett +Date: Thu, 3 Nov 2016 09:14:30 -0700 +Subject: [PATCH] Fix paint clipping region with GTK+ >= 3.20 + +Apparently the clip is no longer set properly. Fixes wxDC::Clear() overwriting +areas outside the window. Problem can be seen in the Audacity toolbars. + +(cherry picked from commit bca7313499c11a6d7fecd2baa355ac09fd3ac83b) +--- + src/gtk/window.cpp | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp +index 41fffb4..96789de 100644 +--- a/src/gtk/window.cpp ++++ b/src/gtk/window.cpp +@@ -4099,9 +4099,21 @@ void wxWindowGTK::GTKSendPaintEvents(const GdkRegion* region) + #endif + { + #ifdef __WXGTK3__ +- m_paintContext = cr; ++ { ++ cairo_region_t* region = gdk_window_get_clip_region(gtk_widget_get_window(m_wxwindow)); ++ cairo_rectangle_int_t rect; ++ cairo_region_get_extents(region, &rect); ++ cairo_region_destroy(region); ++ cairo_rectangle(cr, rect.x, rect.y, rect.width, rect.height); ++ cairo_clip(cr); ++ } + double x1, y1, x2, y2; + cairo_clip_extents(cr, &x1, &y1, &x2, &y2); ++ ++ if (x1 >= x2 || y1 >= y2) ++ return; ++ ++ m_paintContext = cr; + m_updateRegion = wxRegion(int(x1), int(y1), int(x2 - x1), int(y2 - y1)); + #else // !__WXGTK3__ + m_updateRegion = wxRegion(region); diff --git a/wxGTK3-3.0.2-wxpgchoicesdata-protected-destructor.patch b/wxGTK3-3.0.2-wxpgchoicesdata-protected-destructor.patch new file mode 100644 index 0000000..de1d6f9 --- /dev/null +++ b/wxGTK3-3.0.2-wxpgchoicesdata-protected-destructor.patch @@ -0,0 +1,21 @@ +From dcc23ceba8e1dba828e8b3e4633ac77acaad7562 Mon Sep 17 00:00:00 2001 +From: Robin Dunn +Date: Thu, 5 Mar 2015 15:14:23 -0800 +Subject: [PATCH] Change ~wxPGChoicesData from private to protected + +--- + include/wx/propgrid/property.h | 1 + + interface/wx/propgrid/property.h | 3 +++ + 2 files changed, 4 insertions(+) + +diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h +index bc61848..ab1439d 100644 +--- a/include/wx/propgrid/property.h ++++ b/include/wx/propgrid/property.h +@@ -803,6 +803,7 @@ class WXDLLIMPEXP_PROPGRID wxPGChoicesData : public wxObjectRefData + private: + wxVector m_items; + ++protected: + virtual ~wxPGChoicesData(); + }; diff --git a/wxGTK3.spec b/wxGTK3.spec index c0c9f6f..8a1f065 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 29%{?dist} +Release: 30%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -104,6 +104,15 @@ Patch21: %{name}-%{version}-gtk-sizing-problems.patch # For more details, see the upstream commit: # https://github.com/wxWidgets/wxWidgets/commit/553ec7537c30636ddf6cbc157373477fb2e9da41 Patch22: %{name}-%{version}-background-color.patch +# Fixes paint clipping region with GTK+ >= 3.20 +# This resolves a regression in poedit after the -29 update +# For more details, see the upstream commit: +# https://github.com/wxWidgets/wxWidgets/commit/cd8811bf142172c4920ba13a685472ceb405ef78 +Patch23: %{name}-%{version}-paint-clipping-region.patch +# Changes ~wxPGChoicesData from private to protected +# For more details, see the upstream commit: +# https://github.com/wxWidgets/wxWidgets/commit/dcc23ceba8e1dba828e8b3e4633ac77acaad7562 +Patch24: %{name}-%{version}-wxpgchoicesdata-protected-destructor.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported @@ -405,6 +414,10 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Mon Nov 21 2016 Scott Talbert - 3.0.2-30 +- Fix poedit regression in -29 - add paint clipping region patch (#1396747) +- Add patch to change ~wxPGChoicesData from private to protected + * Mon Nov 14 2016 Scott Talbert - 3.0.2-29 - Fix some sizing problems with GTK3 (#1392102) - Fix non-default window background color with GTK+ >= 3.20 (#1393847) From 37d5bdf0160270f959c1bb94a4f7b4c3fc516f91 Mon Sep 17 00:00:00 2001 From: Mystro256 Date: Sun, 11 Dec 2016 01:05:51 -0500 Subject: [PATCH 53/94] Update to git snapshot --- .gitignore | 1 + sources | 3 +- wxGTK3-3.0.2-background-color.patch | 32 ---- wxGTK3-3.0.2-checkradio.patch | 38 ---- wxGTK3-3.0.2-draw-elliptic-arc-crash.patch | 38 ---- wxGTK3-3.0.2-fix-percent-dnd.patch | 62 ------- wxGTK3-3.0.2-fix-percent-dnd2.patch | 35 ---- wxGTK3-3.0.2-font-enumerator-stop.patch | 47 ----- wxGTK3-3.0.2-getbestsize.patch | 29 --- wxGTK3-3.0.2-gtk-show-uri.patch | 48 ----- wxGTK3-3.0.2-gtk-show-uri1.patch | 27 --- wxGTK3-3.0.2-gtk-sizing-problems.patch | 166 ----------------- wxGTK3-3.0.2-init-from-font.patch | 39 ---- wxGTK3-3.0.2-media-docs.patch | 54 ------ wxGTK3-3.0.2-paint-clipping-region.patch | 40 ---- wxGTK3-3.0.2-scrolwin-sizing-loop.patch | 31 ---- wxGTK3-3.0.2-size-alloc-fix.patch | 36 ---- wxGTK3-3.0.2-spibuttfix.patch | 14 -- wxGTK3-3.0.2-stc-gcc6.patch | 39 ---- wxGTK3-3.0.2-string-tests-gcc6.patch | 60 ------ wxGTK3-3.0.2-upstreamfixes.patch | 155 ---------------- wxGTK3-3.0.2-wayland-window-sizing1.patch | 171 ------------------ wxGTK3-3.0.2-wayland-window-sizing2.patch | 59 ------ wxGTK3-3.0.2-wayland.patch | 108 ----------- wxGTK3-3.0.2-wxgetkeystate.patch | 121 ------------- ...wxpgchoicesdata-protected-destructor.patch | 21 --- ...check.patch => wxGTK3-3.0.3-abicheck.patch | 0 wxGTK3.spec | 131 ++++---------- 28 files changed, 37 insertions(+), 1568 deletions(-) delete mode 100644 wxGTK3-3.0.2-background-color.patch delete mode 100644 wxGTK3-3.0.2-checkradio.patch delete mode 100644 wxGTK3-3.0.2-draw-elliptic-arc-crash.patch delete mode 100644 wxGTK3-3.0.2-fix-percent-dnd.patch delete mode 100644 wxGTK3-3.0.2-fix-percent-dnd2.patch delete mode 100644 wxGTK3-3.0.2-font-enumerator-stop.patch delete mode 100644 wxGTK3-3.0.2-getbestsize.patch delete mode 100644 wxGTK3-3.0.2-gtk-show-uri.patch delete mode 100644 wxGTK3-3.0.2-gtk-show-uri1.patch delete mode 100644 wxGTK3-3.0.2-gtk-sizing-problems.patch delete mode 100644 wxGTK3-3.0.2-init-from-font.patch delete mode 100644 wxGTK3-3.0.2-media-docs.patch delete mode 100644 wxGTK3-3.0.2-paint-clipping-region.patch delete mode 100644 wxGTK3-3.0.2-scrolwin-sizing-loop.patch delete mode 100644 wxGTK3-3.0.2-size-alloc-fix.patch delete mode 100644 wxGTK3-3.0.2-spibuttfix.patch delete mode 100644 wxGTK3-3.0.2-stc-gcc6.patch delete mode 100644 wxGTK3-3.0.2-string-tests-gcc6.patch delete mode 100644 wxGTK3-3.0.2-upstreamfixes.patch delete mode 100644 wxGTK3-3.0.2-wayland-window-sizing1.patch delete mode 100644 wxGTK3-3.0.2-wayland-window-sizing2.patch delete mode 100644 wxGTK3-3.0.2-wayland.patch delete mode 100644 wxGTK3-3.0.2-wxgetkeystate.patch delete mode 100644 wxGTK3-3.0.2-wxpgchoicesdata-protected-destructor.patch rename wxGTK3-3.0.2-abicheck.patch => wxGTK3-3.0.3-abicheck.patch (100%) diff --git a/.gitignore b/.gitignore index 0a4525b..d923a2b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /wxWidgets-3.0.1.tar.bz2 /wxWidgets-3.0.2-docs-html.tar.bz2 /wxWidgets-3.0.2.tar.bz2 +/wxWidgets-9518d52.tar.gz diff --git a/sources b/sources index 80e6fd1..c8eeff8 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -67844da5ed54c1a09d8d4ebe32a5e00a wxWidgets-3.0.2-docs-html.tar.bz2 -ba4cd1f3853d0cd49134c5ae028ad080 wxWidgets-3.0.2.tar.bz2 +f1b6f528f6dc5d3a83d1d484b08a35f9 wxWidgets-9518d52.tar.gz diff --git a/wxGTK3-3.0.2-background-color.patch b/wxGTK3-3.0.2-background-color.patch deleted file mode 100644 index 830d876..0000000 --- a/wxGTK3-3.0.2-background-color.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 553ec7537c30636ddf6cbc157373477fb2e9da41 Mon Sep 17 00:00:00 2001 -From: Paul Cornett -Date: Wed, 9 Nov 2016 20:06:26 -0800 -Subject: [PATCH] Fix non-default window background color with GTK+ >= 3.20 - -GTK+ no longer automatically paints non-default window background. See #17586 - -(cherry picked from commit 9bb5d0435a4cce5bcb7b3956cb730f59c37ea5f6) ---- - src/gtk/window.cpp | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp -index 0826e06..bca5443 100644 ---- a/src/gtk/window.cpp -+++ b/src/gtk/window.cpp -@@ -4238,6 +4238,15 @@ void wxWindowGTK::GTKSendPaintEvents(const GdkRegion* region) - 0, 0, w, h); - #endif // !__WXGTK3__ - } -+#ifdef __WXGTK3__ -+ else if (m_backgroundColour.IsOk() && gtk_check_version(3,20,0) == NULL) -+ { -+ cairo_save(cr); -+ gdk_cairo_set_source_rgba(cr, m_backgroundColour); -+ cairo_paint(cr); -+ cairo_restore(cr); -+ } -+#endif - break; - - case wxBG_STYLE_PAINT: diff --git a/wxGTK3-3.0.2-checkradio.patch b/wxGTK3-3.0.2-checkradio.patch deleted file mode 100644 index fd9ba15..0000000 --- a/wxGTK3-3.0.2-checkradio.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -rupN wxWidgets-3.0.2-orig/src/gtk/renderer.cpp wxWidgets-3.0.2/src/gtk/renderer.cpp ---- wxWidgets-3.0.2-orig/src/gtk/renderer.cpp 2015-11-05 19:57:31.075151404 -0500 -+++ wxWidgets-3.0.2/src/gtk/renderer.cpp 2015-11-05 20:37:56.230764763 -0500 -@@ -41,6 +41,10 @@ - #include "wx/gtk/private.h" - #include "wx/gtk/private/gtk2-compat.h" - -+#if defined(__WXGTK3__) && !GTK_CHECK_VERSION(3,14,0) -+ #define GTK_STATE_FLAG_CHECKED (1 << 11) -+#endif -+ - // ---------------------------------------------------------------------------- - // wxRendererGTK: our wxRendererNative implementation - // ---------------------------------------------------------------------------- -@@ -551,7 +555,11 @@ wxRendererGTK::DrawCheckBox(wxWindow* wi - { - int stateFlags = GTK_STATE_FLAG_NORMAL; - if (flags & wxCONTROL_CHECKED) -+ { - stateFlags = GTK_STATE_FLAG_ACTIVE; -+ if (gtk_check_version(3,14,0) == NULL) -+ stateFlags = GTK_STATE_FLAG_CHECKED; -+ } - if (flags & wxCONTROL_DISABLED) - stateFlags |= GTK_STATE_FLAG_INSENSITIVE; - if (flags & wxCONTROL_UNDETERMINED) -@@ -866,7 +874,11 @@ void wxRendererGTK::DrawRadioBitmap(wxWi - #ifdef __WXGTK3__ - int state = GTK_STATE_FLAG_NORMAL; - if (flags & wxCONTROL_CHECKED) -+ { - state = GTK_STATE_FLAG_ACTIVE; -+ if (gtk_check_version(3,14,0) == NULL) -+ state = GTK_STATE_FLAG_CHECKED; -+ } - else if (flags & wxCONTROL_UNDETERMINED) - state = GTK_STATE_FLAG_INCONSISTENT; - if (flags & wxCONTROL_DISABLED) diff --git a/wxGTK3-3.0.2-draw-elliptic-arc-crash.patch b/wxGTK3-3.0.2-draw-elliptic-arc-crash.patch deleted file mode 100644 index 29a993e..0000000 --- a/wxGTK3-3.0.2-draw-elliptic-arc-crash.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 148971013ee48926dfe153ca39c94be92acde37c Mon Sep 17 00:00:00 2001 -From: Paul Cornett -Date: Wed, 15 Oct 2014 16:53:54 +0000 -Subject: [PATCH] fix crash in wxGCDC::DrawEllipticArc() after r76954, closes - #16623 - -git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 ---- - src/common/dcgraph.cpp | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp -index d27e9cc..c390eb4 100644 ---- a/src/common/dcgraph.cpp -+++ b/src/common/dcgraph.cpp -@@ -646,13 +646,12 @@ void wxGCDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h, - m_graphicContext->PushState(); - m_graphicContext->Translate(dx, dy); - m_graphicContext->Scale(factor, 1.0); -- wxGraphicsPath path; -+ wxGraphicsPath path = m_graphicContext->CreatePath(); - - // since these angles (ea,sa) are measured counter-clockwise, we invert them to - // get clockwise angles - if ( m_brush.GetStyle() != wxTRANSPARENT ) - { -- path = m_graphicContext->CreatePath(); - path.MoveToPoint( 0, 0 ); - path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea ); - path.AddLineToPoint( 0, 0 ); -@@ -664,7 +663,6 @@ void wxGCDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h, - } - else - { -- wxGraphicsPath path = m_graphicContext->CreatePath(); - path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea ); - m_graphicContext->DrawPath( path ); - } diff --git a/wxGTK3-3.0.2-fix-percent-dnd.patch b/wxGTK3-3.0.2-fix-percent-dnd.patch deleted file mode 100644 index 6f3f931..0000000 --- a/wxGTK3-3.0.2-fix-percent-dnd.patch +++ /dev/null @@ -1,62 +0,0 @@ -commit 8f29de5231e348d356b5f3962225362e8fd87ba9 -Author: Tim Kosse -Date: Mon Sep 14 11:42:38 2015 +0200 - - Escape filenames in wxFileDataObject::GetDataSize/GetDataHere - - On wxGTK, wxFileDataObject::SetData calls g_filename_from_uri which - percent-decodes URIs. No corresponding percent-encoding was done in - wxFileDataObject::GetDataSize/GetDataHere. Use g_filename_to_uri instead in so - that filenames are properly escaped. - - This commit also fixes the data being truncated if it contains non-ASCII - characters on wide-character builds, see the memcpy arguments in the original - code. - -diff --git a/src/gtk/dataobj.cpp b/src/gtk/dataobj.cpp -index 9a39607..2d1f43c 100644 ---- a/src/gtk/dataobj.cpp -+++ b/src/gtk/dataobj.cpp -@@ -235,16 +235,21 @@ wxTextDataObject::GetAllFormats(wxDataFormat *formats, - - bool wxFileDataObject::GetDataHere(void *buf) const - { -- wxString filenames; -+ char* out = reinterpret_cast(buf); - - for (size_t i = 0; i < m_filenames.GetCount(); i++) - { -- filenames += wxT("file:"); -- filenames += m_filenames[i]; -- filenames += wxT("\r\n"); -+ char* uri = g_filename_to_uri(m_filenames[i].mbc_str(), 0, 0); -+ if (uri) -+ { -+ size_t const len = strlen(uri); -+ strcpy(out, uri); -+ out += len; -+ *(out++) = '\r'; -+ *(out++) = '\n'; -+ } - } -- -- memcpy( buf, filenames.mbc_str(), filenames.length() + 1 ); -+ *out = 0; - - return true; - } -@@ -255,9 +260,11 @@ size_t wxFileDataObject::GetDataSize() const - - for (size_t i = 0; i < m_filenames.GetCount(); i++) - { -- // This is junk in UTF-8 -- res += m_filenames[i].length(); -- res += 5 + 2; // "file:" (5) + "\r\n" (2) -+ char* uri = g_filename_to_uri(m_filenames[i].mbc_str(), 0, 0); -+ if (uri) { -+ res += strlen(uri) + 2; // Including "\r\n" -+ g_free(uri); -+ } - } - - return res + 1; diff --git a/wxGTK3-3.0.2-fix-percent-dnd2.patch b/wxGTK3-3.0.2-fix-percent-dnd2.patch deleted file mode 100644 index 772d477..0000000 --- a/wxGTK3-3.0.2-fix-percent-dnd2.patch +++ /dev/null @@ -1,35 +0,0 @@ -commit 0f9f942a5bbe0ed9f07ea2e1fef90a7e2db768e5 -Author: Paul Cornett -Date: Fri Oct 2 09:14:06 2015 -0700 - - Fix memory leak introduced in 8f29de52 - - Also, use memcpy() instead of strcpy() since we already have the length, - and use static_cast instead of reinterpret_cast. - -diff --git a/src/gtk/dataobj.cpp b/src/gtk/dataobj.cpp -index 2d1f43c..df460d8 100644 ---- a/src/gtk/dataobj.cpp -+++ b/src/gtk/dataobj.cpp -@@ -235,7 +235,7 @@ wxTextDataObject::GetAllFormats(wxDataFormat *formats, - - bool wxFileDataObject::GetDataHere(void *buf) const - { -- char* out = reinterpret_cast(buf); -+ char* out = static_cast(buf); - - for (size_t i = 0; i < m_filenames.GetCount(); i++) - { -@@ -243,10 +243,11 @@ bool wxFileDataObject::GetDataHere(void *buf) const - if (uri) - { - size_t const len = strlen(uri); -- strcpy(out, uri); -+ memcpy(out, uri, len); - out += len; - *(out++) = '\r'; - *(out++) = '\n'; -+ g_free(uri); - } - } - *out = 0; diff --git a/wxGTK3-3.0.2-font-enumerator-stop.patch b/wxGTK3-3.0.2-font-enumerator-stop.patch deleted file mode 100644 index f587882..0000000 --- a/wxGTK3-3.0.2-font-enumerator-stop.patch +++ /dev/null @@ -1,47 +0,0 @@ -From a19e512e80acdb2a777c3e44923ad0b1178db35a Mon Sep 17 00:00:00 2001 -From: Scott Talbert -Date: Sun, 7 Aug 2016 23:15:41 -0400 -Subject: [PATCH] Fix the stop function of wxFontEnumerator for wxGTK - -In a wxFontEnumerator, if false is returned from OnFacename() or -OnFontEncoding(), the enumeration is supposed to stop. This was not happening -on wxGTK. - -See https://github.com/wxWidgets/wxWidgets/pull/311 - -(cherry picked from commit 3572c2c6548bca2dbd439a3d25ed403fda99ebe9) ---- - src/common/fontenumcmn.cpp | 3 ++- - src/unix/fontenum.cpp | 5 ++++- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/src/common/fontenumcmn.cpp b/src/common/fontenumcmn.cpp -index 1185a86..f0d6f68 100644 ---- a/src/common/fontenumcmn.cpp -+++ b/src/common/fontenumcmn.cpp -@@ -124,7 +124,8 @@ bool wxFontEnumerator::EnumerateEncodingsUTF8(const wxString& facename) - - for ( size_t n = 0; n < count; n++ ) - { -- OnFontEncoding(facenames[n], utf8); -+ if ( !OnFontEncoding(facenames[n], utf8) ) -+ break; - } - - return true; -diff --git a/src/unix/fontenum.cpp b/src/unix/fontenum.cpp -index cc7ee1d..e3739ed 100644 ---- a/src/unix/fontenum.cpp -+++ b/src/unix/fontenum.cpp -@@ -89,7 +89,10 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding, - #endif - { - const gchar *name = pango_font_family_get_name(families[i]); -- OnFacename(wxString(name, wxConvUTF8)); -+ if ( !OnFacename(wxString(name, wxConvUTF8)) ) -+ { -+ break; -+ } - } - } - g_free(families); diff --git a/wxGTK3-3.0.2-getbestsize.patch b/wxGTK3-3.0.2-getbestsize.patch deleted file mode 100644 index ba7a4c1..0000000 --- a/wxGTK3-3.0.2-getbestsize.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 2bc3721f065fd7d47674ccaf7e8d9d6cc195aab5 Mon Sep 17 00:00:00 2001 -From: Paul Cornett -Date: Sat, 6 Feb 2016 08:58:53 -0800 -Subject: [PATCH] Fix GetBestSize() for GTK3 after size has been set - -Need to reset size request to get actual best size. -See Fedora bug https://bugzilla.redhat.com/show_bug.cgi?id=1282142 - -(cherry picked from commit 6ed7e27bf270f9f7767b59ebaa9a7f37c5bb3bed) ---- - src/gtk/control.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/gtk/control.cpp b/src/gtk/control.cpp -index 3352965..20cd746 100644 ---- a/src/gtk/control.cpp -+++ b/src/gtk/control.cpp -@@ -319,7 +319,11 @@ wxSize wxControl::GTKGetPreferredSize(GtkWidget* widget) const - { - GtkRequisition req; - #ifdef __WXGTK3__ -+ int w, h; -+ gtk_widget_get_size_request(widget, &w, &h); -+ gtk_widget_set_size_request(widget, -1, -1); - gtk_widget_get_preferred_size(widget, NULL, &req); -+ gtk_widget_set_size_request(widget, w, h); - #else - GTK_WIDGET_GET_CLASS(widget)->size_request(widget, &req); - #endif diff --git a/wxGTK3-3.0.2-gtk-show-uri.patch b/wxGTK3-3.0.2-gtk-show-uri.patch deleted file mode 100644 index e886120..0000000 --- a/wxGTK3-3.0.2-gtk-show-uri.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 2dd407609b8987634180c045e9a6d131db6f947e Mon Sep 17 00:00:00 2001 -From: Paul Cornett -Date: Mon, 17 Aug 2015 21:54:41 -0700 -Subject: [PATCH] use gtk_show_uri() in wxLaunchDefaultBrowser() implementation - for GTK+ - -(cherry picked from commit 22eec388068044b9ea3c9fd1539d6686574a32df) ---- - src/unix/utilsx11.cpp | 16 +++++++++++++++- - 1 file changed, 15 insertions(+), 1 deletion(-) - -diff --git a/src/unix/utilsx11.cpp b/src/unix/utilsx11.cpp -index 12ff73e..7d5811a 100644 ---- a/src/unix/utilsx11.cpp -+++ b/src/unix/utilsx11.cpp -@@ -36,10 +36,11 @@ - #endif - - #ifdef __WXGTK__ --#include -+#include - #ifdef GDK_WINDOWING_X11 - #include - #endif -+GdkWindow* wxGetTopLevelGDK(); - #endif - - // Only X11 backend is supported for wxGTK here -@@ -887,6 +888,19 @@ bool wxDoLaunchDefaultBrowser(const wxString& url, int flags) - { - wxUnusedVar(flags); - -+#ifdef __WXGTK__ -+#if GTK_CHECK_VERSION(2,14,0) -+#ifndef __WXGTK3__ -+ if (gtk_check_version(2,14,0) == NULL) -+#endif -+ { -+ GdkScreen* screen = gdk_window_get_screen(wxGetTopLevelGDK()); -+ if (gtk_show_uri(screen, url.utf8_str(), GDK_CURRENT_TIME, NULL)) -+ return true; -+ } -+#endif // GTK_CHECK_VERSION(2,14,0) -+#endif // __WXGTK__ -+ - // Our best best is to use xdg-open from freedesktop.org cross-desktop - // compatibility suite xdg-utils - // (see http://portland.freedesktop.org/wiki/) -- this is installed on diff --git a/wxGTK3-3.0.2-gtk-show-uri1.patch b/wxGTK3-3.0.2-gtk-show-uri1.patch deleted file mode 100644 index bd5fcc5..0000000 --- a/wxGTK3-3.0.2-gtk-show-uri1.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 79676e1e9d307c479c5aefa70c0fd052341d697e Mon Sep 17 00:00:00 2001 -From: Vadim Zeitlin -Date: Mon, 24 Aug 2015 17:18:15 +0200 -Subject: [PATCH] Fix wxGTK build after wxLaunchDefaultBrowser() fix backport. - -2dd407609b8987634180c045e9a6d131db6f947e uses wxGetTopLevelGDK() only -available in master and not in 3.0 branch, avoid it by just using the default -screen (which also avoids having to add another GTK+ version check for -gdk_window_get_screen() which is only available since 2.24). ---- - src/unix/utilsx11.cpp | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/src/unix/utilsx11.cpp b/src/unix/utilsx11.cpp -index 7d5811a..6b35551 100644 ---- a/src/unix/utilsx11.cpp -+++ b/src/unix/utilsx11.cpp -@@ -894,8 +894,7 @@ bool wxDoLaunchDefaultBrowser(const wxString& url, int flags) - if (gtk_check_version(2,14,0) == NULL) - #endif - { -- GdkScreen* screen = gdk_window_get_screen(wxGetTopLevelGDK()); -- if (gtk_show_uri(screen, url.utf8_str(), GDK_CURRENT_TIME, NULL)) -+ if (gtk_show_uri(NULL, url.utf8_str(), GDK_CURRENT_TIME, NULL)) - return true; - } - #endif // GTK_CHECK_VERSION(2,14,0) diff --git a/wxGTK3-3.0.2-gtk-sizing-problems.patch b/wxGTK3-3.0.2-gtk-sizing-problems.patch deleted file mode 100644 index 8096209..0000000 --- a/wxGTK3-3.0.2-gtk-sizing-problems.patch +++ /dev/null @@ -1,166 +0,0 @@ -From 6475376931bf316a4fd791114408f7c1fc2fe836 Mon Sep 17 00:00:00 2001 -From: Paul Cornett -Date: Wed, 2 Nov 2016 10:30:44 -0700 -Subject: [PATCH] Fix some sizing problems with GTK3 - -A change in size-allocate handling with GTK+ 3.20 exposed a flaw in our method for -deferring queue-resize requests. Using an idle callback to process the requests -did not work well with the GdkFrameClock-based system used since GTK+ 3.8. Using -the "check-resize" signal works better. Also with GTK+ >= 3.20, it seems necessary -to manually work the queue-resize up to the TLW, as otherwise the resized widgets -don't get updated without an external size-allocate event. -See #17585 - -(backport of 3b4ee5a031b1c2fa29772b90751a82dd7f1d3de0) ---- - src/gtk/window.cpp | 102 +++++++++++++++++++++++++++++++++++++++-------------- - 1 file changed, 76 insertions(+), 26 deletions(-) - -diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp -index d27f889..ab56baa 100644 ---- a/src/gtk/window.cpp -+++ b/src/gtk/window.cpp -@@ -221,6 +221,8 @@ int g_lastButtonNumber = 0; - - #ifdef __WXGTK3__ - static GList* gs_sizeRevalidateList; -+static GSList* gs_queueResizeList; -+static bool gs_inSizeAllocate; - void wxGTKSizeRevalidate(wxWindow*); - #endif - -@@ -2083,6 +2085,54 @@ static void frame_clock_layout(GdkFrameClock*, wxWindow* win) - } - #endif // GTK_CHECK_VERSION(3,8,0) - -+#ifdef __WXGTK3__ -+//----------------------------------------------------------------------------- -+// "check-resize" -+//----------------------------------------------------------------------------- -+ -+static void check_resize(GtkContainer*, wxWindow*) -+{ -+ gs_inSizeAllocate = true; -+} -+ -+static void check_resize_after(GtkContainer*, wxWindow*) -+{ -+ gs_inSizeAllocate = false; -+ if (gs_queueResizeList) -+ { -+ for (GSList* p = gs_queueResizeList; p; p = p->next) -+ { -+ if (p->data == NULL) -+ continue; -+ -+ wxWindowGTK* w = static_cast(p->data); -+ g_object_remove_weak_pointer(G_OBJECT(w->m_widget), &p->data); -+ gtk_widget_set_size_request(w->m_widget, w->m_width, w->m_height); -+ -+ // in case only the position is changing -+ gtk_widget_queue_resize(w->m_widget); -+ -+ // need to force the queue-resize up to the TLW with GTK >= 3.20 -+ if (gtk_check_version(3,20,0) == NULL) -+ { -+ GtkWidget* widget = w->m_widget; -+ for (;;) -+ { -+ widget = gtk_widget_get_parent(widget); -+ if (widget == NULL) -+ break; -+ gtk_widget_queue_resize(widget); -+ if (gtk_widget_is_toplevel(widget)) -+ break; -+ } -+ } -+ } -+ g_slist_free(gs_queueResizeList); -+ gs_queueResizeList = NULL; -+ } -+} -+#endif // __WXGTK3__ -+ - } // extern "C" - - void wxWindowGTK::GTKHandleRealized() -@@ -2670,6 +2720,13 @@ void wxWindowGTK::PostCreation() - g_signal_connect(m_wxwindow ? m_wxwindow : m_widget, "size_allocate", - G_CALLBACK(size_allocate), this); - } -+#ifdef __WXGTK3__ -+ else -+ { -+ g_signal_connect(m_widget, "check-resize", G_CALLBACK(check_resize), this); -+ g_signal_connect_after(m_widget, "check-resize", G_CALLBACK(check_resize_after), this); -+ } -+#endif - - #if GTK_CHECK_VERSION(2, 8, 0) - #ifndef __WXGTK3__ -@@ -2778,46 +2835,39 @@ void wxWindowGTK::ConnectWidget( GtkWidget *widget ) - G_CALLBACK (gtk_window_leave_callback), this); - } - --static GSList* gs_queueResizeList; -- --extern "C" { --static gboolean queue_resize(void*) --{ -- gdk_threads_enter(); -- for (GSList* p = gs_queueResizeList; p; p = p->next) -- { -- if (p->data) -- { -- gtk_widget_queue_resize(GTK_WIDGET(p->data)); -- g_object_remove_weak_pointer(G_OBJECT(p->data), &p->data); -- } -- } -- g_slist_free(gs_queueResizeList); -- gs_queueResizeList = NULL; -- gdk_threads_leave(); -- return false; --} --} -- - void wxWindowGTK::DoMoveWindow(int x, int y, int width, int height) - { -- gtk_widget_set_size_request(m_widget, width, height); - GtkWidget* parent = gtk_widget_get_parent(m_widget); - if (WX_IS_PIZZA(parent)) -+ { - WX_PIZZA(parent)->move(m_widget, x, y, width, height); -+ if ( -+#ifdef __WXGTK3__ -+ !gs_inSizeAllocate && -+#endif -+ gtk_widget_get_visible(m_widget)) -+ { -+ // in case only the position is changing -+ gtk_widget_queue_resize(m_widget); -+ } -+ } - -+#ifdef __WXGTK3__ - // With GTK3, gtk_widget_queue_resize() is ignored while a size-allocate - // is in progress. This situation is common in wxWidgets, since - // size-allocate can generate wxSizeEvent and size event handlers often - // call SetSize(), directly or indirectly. Work around this by deferring - // the queue-resize until after size-allocate processing is finished. -- if (g_slist_find(gs_queueResizeList, m_widget) == NULL) -+ if (!gs_inSizeAllocate || !gtk_widget_get_visible(m_widget)) -+ gtk_widget_set_size_request(m_widget, width, height); -+ else - { -- if (gs_queueResizeList == NULL) -- g_idle_add_full(GTK_PRIORITY_RESIZE, queue_resize, NULL, NULL); -- gs_queueResizeList = g_slist_prepend(gs_queueResizeList, m_widget); -+ gs_queueResizeList = g_slist_prepend(gs_queueResizeList, this); - g_object_add_weak_pointer(G_OBJECT(m_widget), &gs_queueResizeList->data); - } -+#else // !__WXGTK3__ -+ gtk_widget_set_size_request(m_widget, width, height); -+#endif // !__WXGTK3__ - } - - void wxWindowGTK::ConstrainSize() diff --git a/wxGTK3-3.0.2-init-from-font.patch b/wxGTK3-3.0.2-init-from-font.patch deleted file mode 100644 index d251a8c..0000000 --- a/wxGTK3-3.0.2-init-from-font.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 238a948ed01f27e05e2c0e08932e8da207590648 Mon Sep 17 00:00:00 2001 -From: Scott Talbert -Date: Tue, 9 Aug 2016 21:12:58 -0400 -Subject: [PATCH] Fix wxNativeFontInfo::InitFromFont() when using Pango - -Use pango_font_description_copy() to make a lossless copy of the original font -instead of doing it using wxWidgets API which is less direct and, in addition, -currently is completely broken as SetXXX() methods don't create the Pango font -description if it doesn't exist as they ought to. - -See https://github.com/wxWidgets/wxWidgets/pull/312 - -(cherry picked from commit dbe2a1c2fdba53ad1d08ce36780267217933a876) ---- - include/wx/fontutil.h | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/include/wx/fontutil.h b/include/wx/fontutil.h -index 60bb874..9e4d023 100644 ---- a/include/wx/fontutil.h -+++ b/include/wx/fontutil.h -@@ -227,6 +227,9 @@ public : - // init with the parameters of the given font - void InitFromFont(const wxFont& font) - { -+#if wxUSE_PANGO -+ Init(*font.GetNativeFontInfo()); -+#else - // translate all font parameters - SetStyle((wxFontStyle)font.GetStyle()); - SetWeight((wxFontWeight)font.GetWeight()); -@@ -252,6 +255,7 @@ public : - // deal with encoding now (it may override the font family and facename - // so do it after setting them) - SetEncoding(font.GetEncoding()); -+#endif // !wxUSE_PANGO - } - - // accessors and modifiers for the font elements diff --git a/wxGTK3-3.0.2-media-docs.patch b/wxGTK3-3.0.2-media-docs.patch deleted file mode 100644 index d6a97fe..0000000 --- a/wxGTK3-3.0.2-media-docs.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 03903c1e459f108e0c464db24064e4cde84f174a Mon Sep 17 00:00:00 2001 -From: Vadim Zeitlin -Date: Fri, 20 Dec 2013 17:50:27 +0000 -Subject: [PATCH] Document wxEVT_MEDIA_XXX event types. - -See #15768. - -(cherry picked from commit 5c1f95bc71028e4562f847af56b815b2f13370a9 on master) ---- - interface/wx/mediactrl.h | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/interface/wx/mediactrl.h b/interface/wx/mediactrl.h -index e425fa0..8bcfada 100644 ---- a/interface/wx/mediactrl.h -+++ b/interface/wx/mediactrl.h -@@ -48,6 +48,7 @@ enum wxMediaCtrlPlayerControls - @beginEventTable{wxMediaEvent} - @event{EVT_MEDIA_LOADED(id\, func)} - Sent when a media has loaded enough data that it can start playing. -+ Processes a @c wxEVT_MEDIA_LOADED event type. - @event{EVT_MEDIA_STOP(id\, func)} - Sent when a media has switched to the @c wxMEDIASTATE_STOPPED state. - You may be able to Veto this event to prevent it from stopping, -@@ -55,14 +56,19 @@ enum wxMediaCtrlPlayerControls - the media (note that this may not have the desired effect - if you - want to loop the media, for example, catch the @c EVT_MEDIA_FINISHED - and play there instead). -+ Processes a @c wxEVT_MEDIA_STOP event type. - @event{EVT_MEDIA_FINISHED(id\, func)} - Sent when a media has finished playing in a wxMediaCtrl. -+ Processes a @c wxEVT_MEDIA_FINISHED event type. - @event{EVT_MEDIA_STATECHANGED(id\, func)} - Sent when a media has switched its state (from any media state). -+ Processes a @c wxEVT_MEDIA_STATECHANGED event type. - @event{EVT_MEDIA_PLAY(id\, func)} - Sent when a media has switched to the @c wxMEDIASTATE_PLAYING state. -+ Processes a @c wxEVT_MEDIA_PLAY event type. - @event{EVT_MEDIA_PAUSE(id\, func)} - Sent when a media has switched to the @c wxMEDIASTATE_PAUSED state. -+ Processes a @c wxEVT_MEDIA_PAUSE event type. - @endEventTable - - @library{wxmedia} -@@ -442,3 +448,9 @@ class wxMediaCtrl : public wxControl - wxFileOffset Tell(); - }; - -+wxEventType wxEVT_MEDIA_LOADED; -+wxEventType wxEVT_MEDIA_STOP; -+wxEventType wxEVT_MEDIA_FINISHED; -+wxEventType wxEVT_MEDIA_STATECHANGED; -+wxEventType wxEVT_MEDIA_PLAY; -+wxEventType wxEVT_MEDIA_PAUSE; diff --git a/wxGTK3-3.0.2-paint-clipping-region.patch b/wxGTK3-3.0.2-paint-clipping-region.patch deleted file mode 100644 index 13f6827..0000000 --- a/wxGTK3-3.0.2-paint-clipping-region.patch +++ /dev/null @@ -1,40 +0,0 @@ -From cd8811bf142172c4920ba13a685472ceb405ef78 Mon Sep 17 00:00:00 2001 -From: Paul Cornett -Date: Thu, 3 Nov 2016 09:14:30 -0700 -Subject: [PATCH] Fix paint clipping region with GTK+ >= 3.20 - -Apparently the clip is no longer set properly. Fixes wxDC::Clear() overwriting -areas outside the window. Problem can be seen in the Audacity toolbars. - -(cherry picked from commit bca7313499c11a6d7fecd2baa355ac09fd3ac83b) ---- - src/gtk/window.cpp | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - -diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp -index 41fffb4..96789de 100644 ---- a/src/gtk/window.cpp -+++ b/src/gtk/window.cpp -@@ -4099,9 +4099,21 @@ void wxWindowGTK::GTKSendPaintEvents(const GdkRegion* region) - #endif - { - #ifdef __WXGTK3__ -- m_paintContext = cr; -+ { -+ cairo_region_t* region = gdk_window_get_clip_region(gtk_widget_get_window(m_wxwindow)); -+ cairo_rectangle_int_t rect; -+ cairo_region_get_extents(region, &rect); -+ cairo_region_destroy(region); -+ cairo_rectangle(cr, rect.x, rect.y, rect.width, rect.height); -+ cairo_clip(cr); -+ } - double x1, y1, x2, y2; - cairo_clip_extents(cr, &x1, &y1, &x2, &y2); -+ -+ if (x1 >= x2 || y1 >= y2) -+ return; -+ -+ m_paintContext = cr; - m_updateRegion = wxRegion(int(x1), int(y1), int(x2 - x1), int(y2 - y1)); - #else // !__WXGTK3__ - m_updateRegion = wxRegion(region); diff --git a/wxGTK3-3.0.2-scrolwin-sizing-loop.patch b/wxGTK3-3.0.2-scrolwin-sizing-loop.patch deleted file mode 100644 index 3a29b6e..0000000 --- a/wxGTK3-3.0.2-scrolwin-sizing-loop.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 8d7e0d045250fa78a7e7d5a25cecee43bb75db3a Mon Sep 17 00:00:00 2001 -From: Paul Cornett -Date: Mon, 10 Nov 2014 04:13:18 +0000 -Subject: [PATCH] fix infinite sizing loop with GTK3 when using a non-default - target window, closes #16668 - -git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 ---- - docs/changes.txt | 5 +++++ - src/gtk/scrolwin.cpp | 8 ++++++++ - 2 files changed, 13 insertions(+) - -diff --git a/src/gtk/scrolwin.cpp b/src/gtk/scrolwin.cpp -index 9b39077..c500288 100644 ---- a/src/gtk/scrolwin.cpp -+++ b/src/gtk/scrolwin.cpp -@@ -81,6 +81,14 @@ void wxScrollHelper::AdjustScrollbars() - { - int vw, vh; - m_targetWindow->GetVirtualSize(&vw, &vh); -+#ifdef __WXGTK3__ -+ if (m_targetWindow != m_win) -+ { -+ // setting wxPizza preferred size keeps GtkScrolledWindow from causing -+ // an infinite sizing loop -+ gtk_widget_set_size_request(m_win->m_wxwindow, vw, vh); -+ } -+#endif - - int w, h; - const wxSize availSize = GetSizeAvailableForScrollTarget( diff --git a/wxGTK3-3.0.2-size-alloc-fix.patch b/wxGTK3-3.0.2-size-alloc-fix.patch deleted file mode 100644 index 0e539d6..0000000 --- a/wxGTK3-3.0.2-size-alloc-fix.patch +++ /dev/null @@ -1,36 +0,0 @@ -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-3.0.2-spibuttfix.patch b/wxGTK3-3.0.2-spibuttfix.patch deleted file mode 100644 index 6747065..0000000 --- a/wxGTK3-3.0.2-spibuttfix.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -rupN wxWidgets-3.0.2-orig/src/gtk/spinbutt.cpp wxWidgets-3.0.2/src/gtk/spinbutt.cpp ---- wxWidgets-3.0.2-orig/src/gtk/spinbutt.cpp 2014-10-06 17:33:44.000000000 -0400 -+++ wxWidgets-3.0.2/src/gtk/spinbutt.cpp 2015-08-22 10:44:00.743403904 -0400 -@@ -92,6 +92,10 @@ bool wxSpinButton::Create(wxWindow *pare - g_object_ref(m_widget); - - gtk_entry_set_width_chars(GTK_ENTRY(m_widget), 0); -+#if GTK_CHECK_VERSION(3,12,0) -+ if (gtk_check_version(3,12,0) == NULL) -+ gtk_entry_set_max_width_chars(GTK_ENTRY(m_widget), 0); -+#endif - gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget), - (int)(m_windowStyle & wxSP_WRAP) ); - diff --git a/wxGTK3-3.0.2-stc-gcc6.patch b/wxGTK3-3.0.2-stc-gcc6.patch deleted file mode 100644 index 119175c..0000000 --- a/wxGTK3-3.0.2-stc-gcc6.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 73e9e18ea09ffffcaac50237def0d9728a213c02 Mon Sep 17 00:00:00 2001 -From: Scott Talbert -Date: Sat, 20 Feb 2016 00:08:14 -0500 -Subject: [PATCH] Fix STC compilation with GCC6 - -Use std::abs() from instead of abs() from to avoid problems -with ambiguous overloads. - -Closes #17147. - -Closes https://github.com/wxWidgets/wxWidgets/pull/222 ---- - src/stc/scintilla/src/Editor.cxx | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/stc/scintilla/src/Editor.cxx b/src/stc/scintilla/src/Editor.cxx -index cd72953..2081df2 100644 ---- a/src/stc/scintilla/src/Editor.cxx -+++ b/src/stc/scintilla/src/Editor.cxx -@@ -11,6 +11,7 @@ - #include - #include - -+#include - #include - #include - #include -@@ -5841,9 +5842,9 @@ void Editor::GoToLine(int lineNo) { - } - - static bool Close(Point pt1, Point pt2) { -- if (abs(pt1.x - pt2.x) > 3) -+ if (std::abs(pt1.x - pt2.x) > 3) - return false; -- if (abs(pt1.y - pt2.y) > 3) -+ if (std::abs(pt1.y - pt2.y) > 3) - return false; - return true; - } diff --git a/wxGTK3-3.0.2-string-tests-gcc6.patch b/wxGTK3-3.0.2-string-tests-gcc6.patch deleted file mode 100644 index 6ed7767..0000000 --- a/wxGTK3-3.0.2-string-tests-gcc6.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 01f62c02957cc1443ea761ddffe0b4322d987a1d Mon Sep 17 00:00:00 2001 -From: Vadim Zeitlin -Date: Sun, 21 Jun 2015 15:56:06 +0200 -Subject: [PATCH] Avoid warnings about narrowing casts in the long long tests. - -Recent g++ versions give -Wnarrowing warning when a value outside of the type -range is used to initialize a variable of this type in { }. Avoid it in the -long long tests using explicit casts as we already cast between long long and -unsigned long long values here anyhow. ---- - tests/strings/strings.cpp | 19 +++++++++++-------- - 1 file changed, 11 insertions(+), 8 deletions(-) - -diff --git a/tests/strings/strings.cpp b/tests/strings/strings.cpp -index b016294..78a3a9d 100644 ---- a/tests/strings/strings.cpp -+++ b/tests/strings/strings.cpp -@@ -589,14 +589,16 @@ enum - Number_Long = 16 // only for long tests - }; - -+#ifdef wxLongLong_t -+typedef wxLongLong_t TestValue_t; -+#else -+typedef long TestValue_t; -+#endif -+ - static const struct ToLongData - { - const wxChar *str; --#ifdef wxLongLong_t -- wxLongLong_t value; --#else -- long value; --#endif // wxLongLong_t -+ TestValue_t value; - int flags; - int base; - -@@ -618,7 +620,7 @@ static const struct ToLongData - - { wxT("-1"), -1, Number_Signed | Number_Long }, - // this is surprising but consistent with strtoul() behaviour -- { wxT("-1"), ULONG_MAX, Number_Unsigned | Number_Long }, -+ { wxT("-1"), (TestValue_t)ULONG_MAX, Number_Unsigned | Number_Long }, - - // this must overflow, even with 64 bit long - { wxT("922337203685477580711"), 0, Number_Invalid }, -@@ -626,8 +628,9 @@ static const struct ToLongData - #ifdef wxLongLong_t - { wxT("2147483648"), wxLL(2147483648), Number_LongLong }, - { wxT("-2147483648"), wxLL(-2147483648), Number_LongLong | Number_Signed }, -- { wxT("9223372036854775808"), wxULL(9223372036854775808), Number_LongLong | -- Number_Unsigned }, -+ { wxT("9223372036854775808"), -+ TestValue_t(wxULL(9223372036854775808)), -+ Number_LongLong | Number_Unsigned }, - #endif // wxLongLong_t - - // Base tests. diff --git a/wxGTK3-3.0.2-upstreamfixes.patch b/wxGTK3-3.0.2-upstreamfixes.patch deleted file mode 100644 index 44dbd01..0000000 --- a/wxGTK3-3.0.2-upstreamfixes.patch +++ /dev/null @@ -1,155 +0,0 @@ -diff -rupN wxWidgets-3.0.2-orig/src/generic/grid.cpp wxWidgets-3.0.2/src/generic/grid.cpp ---- wxWidgets-3.0.2-orig/src/generic/grid.cpp 2014-10-06 17:33:44.000000000 -0400 -+++ wxWidgets-3.0.2/src/generic/grid.cpp 2015-06-22 11:50:16.359029017 -0400 -@@ -2114,7 +2114,8 @@ void wxGridWindow::OnFocus(wxFocusEvent& - m_owner->GetGridCursorCol()); - const wxRect cursor = - m_owner->BlockToDeviceRect(cursorCoords, cursorCoords); -- Refresh(true, &cursor); -+ if (cursor != wxGridNoCellRect) -+ Refresh(true, &cursor); - } - - if ( !m_owner->GetEventHandler()->ProcessEvent( event ) ) -diff -rupN wxWidgets-3.0.2-orig/src/generic/listctrl.cpp wxWidgets-3.0.2/src/generic/listctrl.cpp ---- wxWidgets-3.0.2-orig/src/generic/listctrl.cpp 2014-10-06 17:33:44.000000000 -0400 -+++ wxWidgets-3.0.2/src/generic/listctrl.cpp 2015-06-22 12:12:26.838603542 -0400 -@@ -1935,6 +1935,13 @@ void wxListMainWindow::RefreshLines( siz - size_t visibleFrom, visibleTo; - GetVisibleLinesRange(&visibleFrom, &visibleTo); - -+ if ( lineFrom > visibleTo || lineTo < visibleFrom ) -+ { -+ // None of these lines are currently visible at all, don't bother -+ // doing anything. -+ return; -+ } -+ - if ( lineFrom < visibleFrom ) - lineFrom = visibleFrom; - if ( lineTo > visibleTo ) -diff -rupN wxWidgets-3.0.2-orig/src/gtk/aboutdlg.cpp wxWidgets-3.0.2/src/gtk/aboutdlg.cpp ---- wxWidgets-3.0.2-orig/src/gtk/aboutdlg.cpp 2014-10-06 17:33:44.000000000 -0400 -+++ wxWidgets-3.0.2/src/gtk/aboutdlg.cpp 2015-06-22 12:09:00.951644896 -0400 -@@ -23,7 +23,7 @@ - #include "wx/aboutdlg.h" - - #ifndef WX_PRECOMP -- #include "wx/utils.h" // for wxLaunchDefaultBrowser() -+ #include "wx/window.h" - #endif //WX_PRECOMP - - #include -@@ -131,7 +131,7 @@ static void wxGtkAboutDialogOnLink(GtkAb - } - #endif - --void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* WXUNUSED(parent)) -+void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* parent) - { - // don't create another dialog if one is already present - if ( !gs_aboutDialog ) -@@ -235,6 +235,11 @@ void wxAboutBox(const wxAboutDialogInfo& - g_signal_connect(dlg, "response", - G_CALLBACK(wxGtkAboutDialogOnClose), NULL); - -+ GtkWindow* gtkParent = NULL; -+ if (parent && parent->m_widget) -+ gtkParent = (GtkWindow*)gtk_widget_get_ancestor(parent->m_widget, GTK_TYPE_WINDOW); -+ gtk_window_set_transient_for(GTK_WINDOW(dlg), gtkParent); -+ - gtk_window_present(GTK_WINDOW(dlg)); - } - -diff -rupN wxWidgets-3.0.2-orig/src/gtk/filedlg.cpp wxWidgets-3.0.2/src/gtk/filedlg.cpp ---- wxWidgets-3.0.2-orig/src/gtk/filedlg.cpp 2014-10-06 17:33:44.000000000 -0400 -+++ wxWidgets-3.0.2/src/gtk/filedlg.cpp 2015-06-22 12:16:47.386285719 -0400 -@@ -187,7 +187,8 @@ bool wxFileDialog::Create(wxWindow *pare - const wxSize& sz, - const wxString& name) - { -- parent = GetParentForModalDialog(parent, style); -+ // wxFD_MULTIPLE has the same value as wxDIALOG_NO_PARENT -+ parent = GetParentForModalDialog(parent, style & ~wxFD_MULTIPLE); - - if (!wxFileDialogBase::Create(parent, message, defaultDir, defaultFileName, - wildCard, style, pos, sz, name)) -diff -rupN wxWidgets-3.0.2-orig/src/gtk/fontdlg.cpp wxWidgets-3.0.2/src/gtk/fontdlg.cpp ---- wxWidgets-3.0.2-orig/src/gtk/fontdlg.cpp 2014-10-06 17:33:44.000000000 -0400 -+++ wxWidgets-3.0.2/src/gtk/fontdlg.cpp 2015-06-22 11:51:23.827727490 -0400 -@@ -78,6 +78,7 @@ bool wxFontDialog::DoCreate(wxWindow *pa - gtk_parent = GTK_WINDOW(parent->m_widget); - - #if GTK_CHECK_VERSION(3,2,0) -+ g_type_ensure(PANGO_TYPE_FONT_FACE); - if (gtk_check_version(3,2,0) == NULL) - m_widget = gtk_font_chooser_dialog_new(wxGTK_CONV(message), gtk_parent); - else -diff -rupN wxWidgets-3.0.2-orig/src/gtk/print.cpp wxWidgets-3.0.2/src/gtk/print.cpp ---- wxWidgets-3.0.2-orig/src/gtk/print.cpp 2014-10-06 17:33:44.000000000 -0400 -+++ wxWidgets-3.0.2/src/gtk/print.cpp 2015-06-22 12:01:37.173889476 -0400 -@@ -32,7 +32,6 @@ - #include "wx/fontutil.h" - #include "wx/dynlib.h" - #include "wx/paper.h" --#include "wx/scopeguard.h" - #include "wx/modalhook.h" - - #include -@@ -612,6 +611,11 @@ wxGtkPrintDialog::wxGtkPrintDialog( wxWi - - m_parent = parent; - SetShowDialog(true); -+ -+ const wxPrintData& printData = m_printDialogData.GetPrintData(); -+ wxGtkPrintNativeData* native = -+ static_cast(printData.GetNativeData()); -+ native->SetPrintJob(gtk_print_operation_new()); - } - - wxGtkPrintDialog::wxGtkPrintDialog( wxWindow *parent, wxPrintData *data ) -@@ -625,11 +629,22 @@ wxGtkPrintDialog::wxGtkPrintDialog( wxWi - - m_parent = parent; - SetShowDialog(true); -+ -+ const wxPrintData& printData = m_printDialogData.GetPrintData(); -+ wxGtkPrintNativeData* native = -+ static_cast(printData.GetNativeData()); -+ native->SetPrintJob(gtk_print_operation_new()); - } - - - wxGtkPrintDialog::~wxGtkPrintDialog() - { -+ const wxPrintData& printData = m_printDialogData.GetPrintData(); -+ wxGtkPrintNativeData* native = -+ static_cast(printData.GetNativeData()); -+ GtkPrintOperation* printOp = native->GetPrintJob(); -+ g_object_unref(printOp); -+ native->SetPrintJob(NULL); - } - - // This is called even if we actually don't want the dialog to appear. -@@ -921,10 +936,9 @@ bool wxGtkPrinter::Print(wxWindow *paren - wxPrintData printdata = GetPrintDialogData().GetPrintData(); - wxGtkPrintNativeData *native = (wxGtkPrintNativeData*) printdata.GetNativeData(); - -- wxGtkObject printOp(gtk_print_operation_new()); -- native->SetPrintJob(printOp); -- wxON_BLOCK_EXIT_OBJ1(*native, wxGtkPrintNativeData::SetPrintJob, -- static_cast(NULL)); -+ // wxGtkPrintDialog needs to be created first as it creates the PrintOp -+ wxGtkPrintDialog dialog(parent, &m_printDialogData); -+ GtkPrintOperation* printOp = native->GetPrintJob(); - - wxPrinterToGtkData dataToSend; - dataToSend.printer = this; -@@ -937,7 +951,6 @@ bool wxGtkPrinter::Print(wxWindow *paren - - // This is used to setup the DC and - // show the dialog if desired -- wxGtkPrintDialog dialog( parent, &m_printDialogData ); - dialog.SetPrintDC(m_dc); - dialog.SetShowDialog(prompt); - diff --git a/wxGTK3-3.0.2-wayland-window-sizing1.patch b/wxGTK3-3.0.2-wayland-window-sizing1.patch deleted file mode 100644 index 34f026c..0000000 --- a/wxGTK3-3.0.2-wayland-window-sizing1.patch +++ /dev/null @@ -1,171 +0,0 @@ -From 41be4271e18a21acbcc30d1e61653190f8ef7a6d Mon Sep 17 00:00:00 2001 -From: Paul Cornett -Date: Fri, 5 Feb 2016 10:26:06 -0800 -Subject: [PATCH] Adapt window decorations cache for client-side decorations - -Fixes size calculations for TLWs created after the first one, -with Wayland, Mir and Broadway. See #17336 - -(cherry picked from commit 91ea4872813b90ff91702a11abbe644cb1e5044b) ---- - src/gtk/toplevel.cpp | 93 +++++++++++++++++++++++++++++++++++++++++++++++----- - 1 file changed, 84 insertions(+), 9 deletions(-) - -diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp -index 7530b0f..c3d42e8 100644 ---- a/src/gtk/toplevel.cpp -+++ b/src/gtk/toplevel.cpp -@@ -40,6 +40,15 @@ - #endif - #ifdef GDK_WINDOWING_WAYLAND - #include -+ #define HAS_CLIENT_DECOR -+#endif -+#ifdef GDK_WINDOWING_MIR -+ #include -+ #define HAS_CLIENT_DECOR -+#endif -+#ifdef GDK_WINDOWING_BROADWAY -+ #include -+ #define HAS_CLIENT_DECOR - #endif - - #include "wx/gtk/private.h" -@@ -82,6 +91,26 @@ static enum { - static bool gs_decorCacheValid; - #endif - -+#ifdef HAS_CLIENT_DECOR -+static bool HasClientDecor(GtkWidget* widget) -+{ -+ GdkDisplay* display = gtk_widget_get_display(widget); -+#ifdef GDK_WINDOWING_WAYLAND -+ if (GDK_IS_WAYLAND_DISPLAY(display)) -+ return true; -+#endif -+#ifdef GDK_WINDOWING_MIR -+ if (GDK_IS_MIR_DISPLAY(display)) -+ return true; -+#endif -+#ifdef GDK_WINDOWING_BROADWAY -+ if (GDK_IS_BROADWAY_DISPLAY(display)) -+ return true; -+#endif -+ return false; -+} -+#endif // HAS_CLIENT_DECOR -+ - //----------------------------------------------------------------------------- - // RequestUserAttention related functions - //----------------------------------------------------------------------------- -@@ -235,8 +264,24 @@ size_allocate(GtkWidget*, GtkAllocation* alloc, wxTopLevelWindowGTK* win) - GtkAllocation a; - gtk_widget_get_allocation(win->m_widget, &a); - wxSize size(a.width, a.height); -- size.x += win->m_decorSize.left + win->m_decorSize.right; -- size.y += win->m_decorSize.top + win->m_decorSize.bottom; -+#ifdef HAS_CLIENT_DECOR -+ if (HasClientDecor(win->m_widget)) -+ { -+ GtkAllocation a2; -+ gtk_widget_get_allocation(win->m_mainWidget, &a2); -+ wxTopLevelWindowGTK::DecorSize decorSize; -+ decorSize.left = a2.x; -+ decorSize.right = a.width - a2.width - a2.x; -+ decorSize.top = a2.y; -+ decorSize.bottom = a.height - a2.height - a2.y; -+ win->GTKUpdateDecorSize(decorSize); -+ } -+ else -+#endif -+ { -+ size.x += win->m_decorSize.left + win->m_decorSize.right; -+ size.y += win->m_decorSize.top + win->m_decorSize.bottom; -+ } - win->m_width = size.x; - win->m_height = size.y; - -@@ -1062,8 +1107,13 @@ void wxTopLevelWindowGTK::DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), int WXU - void wxTopLevelWindowGTK::GTKDoGetSize(int *width, int *height) const - { - wxSize size(m_width, m_height); -- size.x -= m_decorSize.left + m_decorSize.right; -- size.y -= m_decorSize.top + m_decorSize.bottom; -+#ifdef HAS_CLIENT_DECOR -+ if (!HasClientDecor(m_widget)) -+#endif -+ { -+ size.x -= m_decorSize.left + m_decorSize.right; -+ size.y -= m_decorSize.top + m_decorSize.bottom; -+ } - if (size.x < 0) size.x = 0; - if (size.y < 0) size.y = 0; - #if wxUSE_LIBHILDON2 -@@ -1171,7 +1221,12 @@ void wxTopLevelWindowGTK::DoGetClientSize( int *width, int *height ) const - base_type::DoGetClientSize(width, height); - else - { -- GTKDoGetSize(width, height); -+ int w = m_width - (m_decorSize.left + m_decorSize.right); -+ int h = m_height - (m_decorSize.top + m_decorSize.bottom); -+ if (w < 0) w = 0; -+ if (h < 0) h = 0; -+ if (width) *width = w; -+ if (height) *height = h; - } - } - -@@ -1193,8 +1248,20 @@ void wxTopLevelWindowGTK::DoSetSizeHints( int minW, int minH, - hints.min_height = 1; - hints.max_width = INT_MAX; - hints.max_height = INT_MAX; -- const int decorSize_x = m_decorSize.left + m_decorSize.right; -- const int decorSize_y = m_decorSize.top + m_decorSize.bottom; -+ int decorSize_x; -+ int decorSize_y; -+#ifdef HAS_CLIENT_DECOR -+ if (HasClientDecor(m_widget)) -+ { -+ decorSize_x = 0; -+ decorSize_y = 0; -+ } -+ else -+#endif -+ { -+ decorSize_x = m_decorSize.left + m_decorSize.right; -+ decorSize_y = m_decorSize.top + m_decorSize.bottom; -+ } - if (minSize.x > decorSize_x) - hints.min_width = minSize.x - decorSize_x; - if (minSize.y > decorSize_y) -@@ -1221,11 +1288,19 @@ void wxTopLevelWindowGTK::DoSetSizeHints( int minW, int minH, - (GtkWindow*)m_widget, NULL, &hints, (GdkWindowHints)hints_mask); - } - --#ifdef GDK_WINDOWING_X11 - void wxTopLevelWindowGTK::GTKUpdateDecorSize(const DecorSize& decorSize) - { - if (!IsMaximized() && !IsFullScreen()) - GetCachedDecorSize() = decorSize; -+ -+#ifdef HAS_CLIENT_DECOR -+ if (HasClientDecor(m_widget)) -+ { -+ m_decorSize = decorSize; -+ return; -+ } -+#endif -+#ifdef GDK_WINDOWING_X11 - if (m_updateDecorSize && memcmp(&m_decorSize, &decorSize, sizeof(DecorSize))) - { - m_useCachedClientSize = false; -@@ -1292,8 +1367,8 @@ void wxTopLevelWindowGTK::GTKUpdateDecorSize(const DecorSize& decorSize) - showEvent.SetEventObject(this); - HandleWindowEvent(showEvent); - } --} - #endif // GDK_WINDOWING_X11 -+} - - wxTopLevelWindowGTK::DecorSize& wxTopLevelWindowGTK::GetCachedDecorSize() - { diff --git a/wxGTK3-3.0.2-wayland-window-sizing2.patch b/wxGTK3-3.0.2-wayland-window-sizing2.patch deleted file mode 100644 index c32b8be..0000000 --- a/wxGTK3-3.0.2-wayland-window-sizing2.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 0388ce8e25535415d9bdd79ce14eb20e73859279 Mon Sep 17 00:00:00 2001 -From: Paul Cornett -Date: Sat, 6 Feb 2016 16:07:28 -0800 -Subject: [PATCH] Allow SetClientSize() to set correct size even when size of - window decorations is not known - -This should allow correct sizing of first TLW (when using SetClientSize()) -with backends using client-side decorations such as Wayland. - -(cherry picked from commit bc4df78421a5b1e6fd9b218e89d03e59bd846d0a) ---- - src/gtk/toplevel.cpp | 27 +++++++++++++++++++++++++++ - 1 file changed, 27 insertions(+) - -diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp -index c3d42e8..a52dad0 100644 ---- a/src/gtk/toplevel.cpp -+++ b/src/gtk/toplevel.cpp -@@ -1194,6 +1194,14 @@ void wxTopLevelWindowGTK::DoSetSize( int x, int y, int width, int height, int si - } - } - -+extern "C" { -+static gboolean reset_size_request(void* data) -+{ -+ gtk_widget_set_size_request(GTK_WIDGET(data), -1, -1); -+ return false; -+} -+} -+ - void wxTopLevelWindowGTK::DoSetClientSize(int width, int height) - { - base_type::DoSetClientSize(width, height); -@@ -1202,6 +1210,25 @@ void wxTopLevelWindowGTK::DoSetClientSize(int width, int height) - // Has to be done after calling base because it calls SetSize, - // which sets this true - m_deferShowAllowed = false; -+ -+ if (m_wxwindow) -+ { -+ // If window is not resizable or not yet shown, set size request on -+ // client widget, to make it more likely window will get correct size -+ // even if our decorations size cache is incorrect (as it will be before -+ // showing first TLW). -+ if (!gtk_window_get_resizable(GTK_WINDOW(m_widget))) -+ { -+ gtk_widget_set_size_request(m_widget, -1, -1); -+ gtk_widget_set_size_request(m_wxwindow, m_clientWidth, m_clientHeight); -+ } -+ else if (!IsShown()) -+ { -+ gtk_widget_set_size_request(m_wxwindow, m_clientWidth, m_clientHeight); -+ // Cancel size request at next idle to allow resizing -+ g_idle_add_full(G_PRIORITY_LOW, reset_size_request, m_wxwindow, NULL); -+ } -+ } - } - - void wxTopLevelWindowGTK::DoGetClientSize( int *width, int *height ) const diff --git a/wxGTK3-3.0.2-wayland.patch b/wxGTK3-3.0.2-wayland.patch deleted file mode 100644 index b17bac0..0000000 --- a/wxGTK3-3.0.2-wayland.patch +++ /dev/null @@ -1,108 +0,0 @@ -diff -rupN wxWidgets-3.0.2/src/gtk/toplevel.cpp wxWidgets-3.0.2-wayland/src/gtk/toplevel.cpp ---- wxWidgets-3.0.2/src/gtk/toplevel.cpp 2014-10-06 17:33:44.000000000 -0400 -+++ wxWidgets-3.0.2-wayland/src/gtk/toplevel.cpp 2015-12-31 14:48:25.873812357 -0500 -@@ -456,8 +456,12 @@ gtk_frame_window_state_callback( GtkWidg - bool wxGetFrameExtents(GdkWindow* window, int* left, int* right, int* top, int* bottom) - { - #ifdef GDK_WINDOWING_X11 -- static GdkAtom property = gdk_atom_intern("_NET_FRAME_EXTENTS", false); - GdkDisplay* display = gdk_window_get_display(window); -+ -+ if (!GDK_IS_X11_DISPLAY(display)) -+ return false; -+ -+ static GdkAtom property = gdk_atom_intern("_NET_FRAME_EXTENTS", false); - Atom xproperty = gdk_x11_atom_to_xatom_for_display(display, property); - Atom type; - int format; -@@ -852,10 +856,19 @@ bool wxTopLevelWindowGTK::ShowFullScreen - - m_fsIsShowing = show; - -+ wxX11FullScreenMethod method = wxX11_FS_WMSPEC; -+ Display* xdpy = NULL; -+ Window xroot = None; -+ - #ifdef GDK_WINDOWING_X11 -- Display* xdpy = GDK_DISPLAY_XDISPLAY(gtk_widget_get_display(m_widget)); -- Window xroot = GDK_WINDOW_XID(gtk_widget_get_root_window(m_widget)); -- wxX11FullScreenMethod method = wxGetFullScreenMethodX11(xdpy, (WXWindow)xroot); -+ GdkDisplay *display = gtk_widget_get_display(m_widget); -+ -+ if (GDK_IS_X11_DISPLAY(display)) -+ { -+ xdpy = GDK_DISPLAY_XDISPLAY(gtk_widget_get_display(m_widget)); -+ xroot = GDK_WINDOW_XID(gtk_widget_get_root_window(m_widget)); -+ method = wxGetFullScreenMethodX11(xdpy, (WXWindow)xroot); -+ } - - // NB: gtk_window_fullscreen() uses freedesktop.org's WMspec extensions - // to switch to fullscreen, which is not always available. We must -@@ -870,7 +883,7 @@ bool wxTopLevelWindowGTK::ShowFullScreen - gtk_window_unfullscreen( GTK_WINDOW( m_widget ) ); - } - #ifdef GDK_WINDOWING_X11 -- else -+ else if (xdpy != NULL) - { - GdkWindow* window = gtk_widget_get_window(m_widget); - Window xid = GDK_WINDOW_XID(window); -@@ -958,6 +971,7 @@ bool wxTopLevelWindowGTK::Show( bool sho - deferShow = m_deferShowAllowed && - gs_requestFrameExtentsStatus != RFE_STATUS_BROKEN && - !gtk_widget_get_realized(m_widget) && -+ GDK_IS_X11_DISPLAY(gtk_widget_get_display(m_widget)) && - g_signal_handler_find(m_widget, - GSignalMatchType(G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DATA), - g_signal_lookup("property_notify_event", GTK_TYPE_WIDGET), -diff -rupN wxWidgets-3.0.2/src/gtk/window.cpp wxWidgets-3.0.2-wayland/src/gtk/window.cpp ---- wxWidgets-3.0.2/src/gtk/window.cpp 2014-10-06 17:33:44.000000000 -0400 -+++ wxWidgets-3.0.2-wayland/src/gtk/window.cpp 2015-12-31 14:48:31.522812743 -0500 -@@ -780,28 +780,31 @@ wxTranslateGTKKeyEventToWx(wxKeyEvent& e - } - - #ifdef GDK_WINDOWING_X11 -- // we want to always get the same key code when the same key is -- // pressed regardless of the state of the modifiers, i.e. on a -- // standard US keyboard pressing '5' or '%' ('5' key with -- // Shift) should result in the same key code in OnKeyDown(): -- // '5' (although OnChar() will get either '5' or '%'). -- // -- // to do it we first translate keysym to keycode (== scan code) -- // and then back but always using the lower register -- Display *dpy = (Display *)wxGetDisplay(); -- KeyCode keycode = XKeysymToKeycode(dpy, keysym); -+ if (GDK_IS_X11_DISPLAY(gdk_window_get_display(gdk_event->window))) -+ { -+ // we want to always get the same key code when the same key is -+ // pressed regardless of the state of the modifiers, i.e. on a -+ // standard US keyboard pressing '5' or '%' ('5' key with -+ // Shift) should result in the same key code in OnKeyDown(): -+ // '5' (although OnChar() will get either '5' or '%'). -+ // -+ // to do it we first translate keysym to keycode (== scan code) -+ // and then back but always using the lower register -+ Display *dpy = (Display *)wxGetDisplay(); -+ KeyCode keycode = XKeysymToKeycode(dpy, keysym); - -- wxLogTrace(TRACE_KEYS, wxT("\t-> keycode %d"), keycode); -+ wxLogTrace(TRACE_KEYS, wxT("\t-> keycode %d"), keycode); - - #ifdef HAVE_X11_XKBLIB_H -- KeySym keysymNormalized = XkbKeycodeToKeysym(dpy, keycode, 0, 0); -+ KeySym keysymNormalized = XkbKeycodeToKeysym(dpy, keycode, 0, 0); - #else -- KeySym keysymNormalized = XKeycodeToKeysym(dpy, keycode, 0); -+ KeySym keysymNormalized = XKeycodeToKeysym(dpy, keycode, 0); - #endif - -- // use the normalized, i.e. lower register, keysym if we've -- // got one -- key_code = keysymNormalized ? keysymNormalized : keysym; -+ // use the normalized, i.e. lower register, keysym if we've -+ // got one -+ key_code = keysymNormalized ? keysymNormalized : keysym; -+ } - #else - key_code = keysym; - #endif diff --git a/wxGTK3-3.0.2-wxgetkeystate.patch b/wxGTK3-3.0.2-wxgetkeystate.patch deleted file mode 100644 index 7ab7093..0000000 --- a/wxGTK3-3.0.2-wxgetkeystate.patch +++ /dev/null @@ -1,121 +0,0 @@ -From 98065821bbf0178981b50515094f565b703fcaa8 Mon Sep 17 00:00:00 2001 -From: Scott Talbert -Date: Tue, 13 Sep 2016 13:24:12 +0200 -Subject: [PATCH] Fix wxGetKeyState() on non-X11 wxGTK backends (e.g., Wayland) - -wxGetKeyState() does not currently work on non-X11 GTK backends, and in some -cases it has been reported to crash. It seems that the most likely use case -for wxGetKeyState() is to query the modifier keys, so on non-X11 backends, use -GTK+ calls to retrieve the modifier key state. - -Non-modifier keys are not currently implemented, update the documentation to -mention this. - -Closes https://github.com/wxWidgets/wxWidgets/pull/322 - -(this is a combined backport of 1033fb048dec849906f76ece25f154e6a61fde4e, -9f9c09e24a7f9d86ea51997bd4c55c1ddb7c3159 and -a18fe083cc91bee442863c8ab7f97d6549f2b75c from master) ---- - interface/wx/utils.h | 3 +++ - src/unix/utilsx11.cpp | 62 +++++++++++++++++++++++++++++++++++++++++++++++++-- - 2 files changed, 63 insertions(+), 2 deletions(-) - -diff --git a/interface/wx/utils.h b/interface/wx/utils.h -index 0bac1c0..f127a74 100644 ---- a/interface/wx/utils.h -+++ b/interface/wx/utils.h -@@ -372,6 +372,9 @@ wxString wxGetDisplayName(); - Even though there are virtual key codes defined for mouse buttons, they - cannot be used with this function currently. - -+ In wxGTK, this function can be only used with modifier keys (@c WXK_ALT, @c -+ WXK_CONTROL and @c WXK_SHIFT) when not using X11 backend currently. -+ - @header{wx/utils.h} - */ - bool wxGetKeyState(wxKeyCode key); -diff --git a/src/unix/utilsx11.cpp b/src/unix/utilsx11.cpp -index 6b35551..efc0837 100644 ---- a/src/unix/utilsx11.cpp -+++ b/src/unix/utilsx11.cpp -@@ -809,7 +809,7 @@ WXKeySym wxCharCodeWXToX(int id) - // check current state of a key - // ---------------------------------------------------------------------------- - --bool wxGetKeyState(wxKeyCode key) -+static bool wxGetKeyStateX11(wxKeyCode key) - { - wxASSERT_MSG(key != WXK_LBUTTON && key != WXK_RBUTTON && key != - WXK_MBUTTON, wxT("can't use wxGetKeyState() for mouse buttons")); -@@ -851,11 +851,69 @@ bool wxGetKeyState(wxKeyCode key) - // with the least-significant bit in the byte representing key 8N. - char key_vector[32]; - XQueryKeymap(pDisplay, key_vector); -- return key_vector[keyCode >> 3] & (1 << (keyCode & 7)); -+ return (key_vector[keyCode >> 3] & (1 << (keyCode & 7))) != 0; - } - - #endif // !defined(__WXGTK__) || defined(GDK_WINDOWING_X11) - -+// We need to use GDK functions when using wxGTK with a non-X11 backend, the -+// X11 code above can't work in this case. -+#ifdef __WXGTK__ -+ -+// gdk_keymap_get_modifier_state() is only available since 3.4 -+#if GTK_CHECK_VERSION(3,4,0) -+ -+#define wxHAS_GETKEYSTATE_GTK -+ -+extern GtkWidget *wxGetRootWindow(); -+ -+static bool wxGetKeyStateGTK(wxKeyCode key) -+{ -+ if (gtk_check_version(3,4,0) != NULL) -+ return false; -+ -+ GdkDisplay* display = gtk_widget_get_display(wxGetRootWindow()); -+ GdkKeymap* keymap = gdk_keymap_get_for_display(display); -+ guint state = gdk_keymap_get_modifier_state(keymap); -+ guint mask = 0; -+ switch (key) -+ { -+ case WXK_ALT: -+ mask = GDK_MOD1_MASK; -+ break; -+ -+ case WXK_CONTROL: -+ mask = GDK_CONTROL_MASK; -+ break; -+ -+ case WXK_SHIFT: -+ mask = GDK_SHIFT_MASK; -+ break; -+ -+ default: -+ wxFAIL_MSG(wxS("Unsupported key, only modifiers can be used")); -+ return false; -+ } -+ return (state & mask) != 0; -+} -+ -+#endif // GTK+ 3.4 -+#endif // __WXGTK__ -+ -+bool wxGetKeyState(wxKeyCode key) -+{ -+#ifdef wxHAS_GETKEYSTATE_GTK -+ GdkDisplay* display = gtk_widget_get_display(wxGetRootWindow()); -+ const char* name = g_type_name(G_TYPE_FROM_INSTANCE(display)); -+ if (strcmp(name, "GdkX11Display") != 0) -+ { -+ return wxGetKeyStateGTK(key); -+ } -+#endif // GTK+ 3.4+ -+ -+ return wxGetKeyStateX11(key); -+} -+ - // ---------------------------------------------------------------------------- - // Launch document with default app - // ---------------------------------------------------------------------------- diff --git a/wxGTK3-3.0.2-wxpgchoicesdata-protected-destructor.patch b/wxGTK3-3.0.2-wxpgchoicesdata-protected-destructor.patch deleted file mode 100644 index de1d6f9..0000000 --- a/wxGTK3-3.0.2-wxpgchoicesdata-protected-destructor.patch +++ /dev/null @@ -1,21 +0,0 @@ -From dcc23ceba8e1dba828e8b3e4633ac77acaad7562 Mon Sep 17 00:00:00 2001 -From: Robin Dunn -Date: Thu, 5 Mar 2015 15:14:23 -0800 -Subject: [PATCH] Change ~wxPGChoicesData from private to protected - ---- - include/wx/propgrid/property.h | 1 + - interface/wx/propgrid/property.h | 3 +++ - 2 files changed, 4 insertions(+) - -diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h -index bc61848..ab1439d 100644 ---- a/include/wx/propgrid/property.h -+++ b/include/wx/propgrid/property.h -@@ -803,6 +803,7 @@ class WXDLLIMPEXP_PROPGRID wxPGChoicesData : public wxObjectRefData - private: - wxVector m_items; - -+protected: - virtual ~wxPGChoicesData(); - }; diff --git a/wxGTK3-3.0.2-abicheck.patch b/wxGTK3-3.0.3-abicheck.patch similarity index 100% rename from wxGTK3-3.0.2-abicheck.patch rename to wxGTK3-3.0.3-abicheck.patch diff --git a/wxGTK3.spec b/wxGTK3.spec index 8a1f065..1eb8740 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -9,110 +9,35 @@ %global gtkver 3 %endif +#For git snapshots, set to 0 to use release instead: +%global usesnapshot 1 +%if 0%{?usesnapshot} +%global commit0 9518d52ba80a22c6e6a6414e9137e66013d2d191 +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) +#What doc version to use with the snapshot (usually last release): +%global docversion 3.0.2 +%endif + Name: %{wxgtkname} -Version: 3.0.2 -Release: 30%{?dist} +Version: 3.0.3 +Release: 0.1%{?usesnapshot:.git%{shortcommit0}}%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries URL: http://www.wxwidgets.org/ -Source0: http://downloads.sf.net/wxwindows/%{srcname}-%{version}.tar.bz2 -Source1: http://downloads.sf.net/wxwindows/%{srcname}-%{version}-docs-html.tar.bz2 + +%if 0%{?usesnapshot} +Source0: https://github.com/%{srcname}/%{srcname}/archive/%{commit0}.tar.gz#/%{srcname}-%{shortcommit0}.tar.gz +%else +Source0: https://github.com/%{srcname}/%{srcname}/releases/download/v%{version}/%{srcname}-%{version}.tar.bz2 +%global docversion %{version} +%endif +Source1: https://github.com/%{srcname}/%{srcname}/releases/download/v%{docversion}/%{srcname}-%{docversion}-docs-html.tar.bz2 Source10: wx-config # https://bugzilla.redhat.com/show_bug.cgi?id=1225148 # remove abort when ABI check fails # Backport from wxGTK Patch0: %{name}-%{version}-abicheck.patch -# This is a collection of fixes from upstream -# to fix warnings and crashes. See bug for details: -# https://bugzilla.redhat.com/show_bug.cgi?id=1234211 -Patch1: %{name}-%{version}-upstreamfixes.patch -# This fixes the spinbutton on gtk 3.12+ -# For more details, see the upstream commit: -# https://github.com/wxWidgets/wxWidgets/commit/312ae4c92cec95954557347c2b7a9e24d4398a59 -Patch2: %{name}-%{version}-spibuttfix.patch -# This fixes checkbox/radiobutton on gtk 3.14+ -# For more details, see the upstream commit: -# https://github.com/wxWidgets/wxWidgets/commit/c1d150ed1228c155054cf1fa90932ced7371e6a4 -Patch3: %{name}-%{version}-checkradio.patch -# This fixes some wayland issues with GTK3 -# For more details, see the upstream bug: -# http://trac.wxwidgets.org/ticket/16688 -Patch4: %{name}-%{version}-wayland.patch -# This fixes wxSTC compilation with GCC6 -# For more details, see the upstream commit: -# https://github.com/wxWidgets/wxWidgets/commit/73e9e18ea09ffffcaac50237def0d9728a213c02 -Patch5: %{name}-%{version}-stc-gcc6.patch -# This fixes compilation of the strings tests with GCC6 -# For more details, see the upstream commit: -# https://github.com/wxWidgets/wxWidgets/commit/01f62c02957cc1443ea761ddffe0b4322d987a1d -Patch6: %{name}-%{version}-string-tests-gcc6.patch -# This prevents wxStaticText from widening each time SetLabel() is called -# For more details, see the upstream commit: -# https://github.com/wxWidgets/wxWidgets/commit/2bc3721f065fd7d47674ccaf7e8d9d6cc195aab5 -Patch7: %{name}-%{version}-getbestsize.patch -# These patches fix top level window sizing under Wayland -# For more details, see the upstream commits: -# https://github.com/wxWidgets/wxWidgets/commit/41be4271e18a21acbcc30d1e61653190f8ef7a6d -# https://github.com/wxWidgets/wxWidgets/commit/0388ce8e25535415d9bdd79ce14eb20e73859279 -Patch8: %{name}-%{version}-wayland-window-sizing1.patch -Patch9: %{name}-%{version}-wayland-window-sizing2.patch -# This patch adds docs for the wxEVT_MEDIA_XXX event types (for Phoenix) -# 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 -# Fixes the stop function of wxFontEnumerator -# For more details, see the upstream commit: -# https://github.com/wxWidgets/wxWidgets/commit/a19e512e80acdb2a777c3e44923ad0b1178db35a -Patch12: %{name}-%{version}-font-enumerator-stop.patch -# Fixes wxNativeFontInfo::InitFromFont() -# For more details, see the upstream commit: -# https://github.com/wxWidgets/wxWidgets/commit/238a948ed01f27e05e2c0e08932e8da207590648 -Patch13: %{name}-%{version}-init-from-font.patch -# Fixes wxGetKeyState() from crashing on Wayland -# For more details, see the upstream commits (first is just a dependency patch): -# https://github.com/wxWidgets/wxWidgets/commit/2dd407609b8987634180c045e9a6d131db6f947e -# https://github.com/wxWidgets/wxWidgets/commit/79676e1e9d307c479c5aefa70c0fd052341d697e -# https://github.com/wxWidgets/wxWidgets/commit/98065821bbf0178981b50515094f565b703fcaa8 -Patch14: %{name}-%{version}-gtk-show-uri.patch -Patch15: %{name}-%{version}-gtk-show-uri1.patch -Patch16: %{name}-%{version}-wxgetkeystate.patch -# Fixes crash in wxGCDC::DrawEllipticArc() -# For more details, see the upstream commit: -# https://github.com/wxWidgets/wxWidgets/commit/148971013ee48926dfe153ca39c94be92acde37c -Patch17: %{name}-%{version}-draw-elliptic-arc-crash.patch -# Fixes drag and drop issues with filenames containing percent symbols -# For more details, see the upstream commits: -# https://github.com/wxWidgets/wxWidgets/commit/8f29de5231e348d356b5f3962225362e8fd87ba9 -# https://github.com/wxWidgets/wxWidgets/commit/0f9f942a5bbe0ed9f07ea2e1fef90a7e2db768e5 -Patch18: %{name}-%{version}-fix-percent-dnd.patch -Patch19: %{name}-%{version}-fix-percent-dnd2.patch -# Fixes rename issues in Filezilla with overlay scrollbars disabled - note: the -# size-alloc-fix patch is also required. -# For more details, see the upstream commit: -# https://github.com/wxWidgets/wxWidgets/commit/8d7e0d045250fa78a7e7d5a25cecee43bb75db3a -Patch20: %{name}-%{version}-scrolwin-sizing-loop.patch -# Fixes sizing issues on GTK 3.20+ -# For more details, see the upstream commit: -# https://github.com/wxWidgets/wxWidgets/commit/6475376931bf316a4fd791114408f7c1fc2fe836 -Patch21: %{name}-%{version}-gtk-sizing-problems.patch -# Fixes non-default window background color with GTK+ >= 3.20 -# For more details, see the upstream commit: -# https://github.com/wxWidgets/wxWidgets/commit/553ec7537c30636ddf6cbc157373477fb2e9da41 -Patch22: %{name}-%{version}-background-color.patch -# Fixes paint clipping region with GTK+ >= 3.20 -# This resolves a regression in poedit after the -29 update -# For more details, see the upstream commit: -# https://github.com/wxWidgets/wxWidgets/commit/cd8811bf142172c4920ba13a685472ceb405ef78 -Patch23: %{name}-%{version}-paint-clipping-region.patch -# Changes ~wxPGChoicesData from private to protected -# For more details, see the upstream commit: -# https://github.com/wxWidgets/wxWidgets/commit/dcc23ceba8e1dba828e8b3e4633ac77acaad7562 -Patch24: %{name}-%{version}-wxpgchoicesdata-protected-destructor.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported @@ -245,7 +170,11 @@ This package provides XML documentation for the %{srcname} library. %prep +%if 0%{?usesnapshot} +%autosetup -n %{srcname}-%{commit0} -a 1 -p1 +%else %autosetup -n %{srcname}-%{version} -a 1 -p1 +%endif # patch some installed files to avoid conflicts with 2.8.* sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in @@ -253,7 +182,7 @@ sed -i -e 's|wxstd.mo|wxstd3.mo|' Makefile.in sed -i -e 's|wxmsw.mo|wxmsw3.mo|' Makefile.in # rename docs directory -mv %{srcname}-%{version} html +mv %{srcname}-%{docversion} html # fix plugin dir for 64-bit @@ -273,6 +202,13 @@ export LDFLAGS="-Wl,--as-needed" # Trick configure into using pkg-config for cppunit-config export CPPUNIT_CONFIG="/usr/bin/pkg-config cppunit" +%if 0%{?usesnapshot} +#For snapshots, mo files need to be generated +pushd locale +make allmo +popd +%endif + %configure \ --with-gtk=%{gtkver} \ --with-opengl \ @@ -284,7 +220,7 @@ export CPPUNIT_CONFIG="/usr/bin/pkg-config cppunit" --disable-rpath \ --enable-ipv6 -make %{?_smp_mflags} +%make_build pushd docs/doxygen WX_SKIP_DOXYGEN_VERSION_CHECK=1 ./regen.sh xml @@ -414,6 +350,9 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Sat Dec 10 2016 Jeremy Newton - 3.0.3-0.1.git9518d52 +- Update to git snapshot + * Mon Nov 21 2016 Scott Talbert - 3.0.2-30 - Fix poedit regression in -29 - add paint clipping region patch (#1396747) - Add patch to change ~wxPGChoicesData from private to protected From fb9013626a2dd6e0f4140dde7d4927b0d8506181 Mon Sep 17 00:00:00 2001 From: Mystro256 Date: Wed, 28 Dec 2016 16:34:12 -0500 Subject: [PATCH 54/94] Add option to build docs (default for snapshot) --- wxGTK3.spec | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index 1eb8740..30ace97 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -15,7 +15,7 @@ %global commit0 9518d52ba80a22c6e6a6414e9137e66013d2d191 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #What doc version to use with the snapshot (usually last release): -%global docversion 3.0.2 +%global builddocs 1 %endif Name: %{wxgtkname} @@ -30,9 +30,10 @@ URL: http://www.wxwidgets.org/ Source0: https://github.com/%{srcname}/%{srcname}/archive/%{commit0}.tar.gz#/%{srcname}-%{shortcommit0}.tar.gz %else Source0: https://github.com/%{srcname}/%{srcname}/releases/download/v%{version}/%{srcname}-%{version}.tar.bz2 -%global docversion %{version} %endif -Source1: https://github.com/%{srcname}/%{srcname}/releases/download/v%{docversion}/%{srcname}-%{docversion}-docs-html.tar.bz2 +%if ! 0%{?builddocs} +Source1: https://github.com/%{srcname}/%{srcname}/releases/download/v%{version}/%{srcname}-%{version}-docs-html.tar.bz2 +%endif Source10: wx-config # https://bugzilla.redhat.com/show_bug.cgi?id=1225148 # remove abort when ABI check fails @@ -171,9 +172,9 @@ This package provides XML documentation for the %{srcname} library. %prep %if 0%{?usesnapshot} -%autosetup -n %{srcname}-%{commit0} -a 1 -p1 +%autosetup -n %{srcname}-%{commit0} %{!?builddocs:-a 1} -p1 %else -%autosetup -n %{srcname}-%{version} -a 1 -p1 +%autosetup -n %{srcname}-%{version} %{!?builddocs:-a 1} -p1 %endif # patch some installed files to avoid conflicts with 2.8.* @@ -181,9 +182,14 @@ sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in sed -i -e 's|wxstd.mo|wxstd3.mo|' Makefile.in sed -i -e 's|wxmsw.mo|wxmsw3.mo|' Makefile.in -# rename docs directory -mv %{srcname}-%{docversion} html - +#Docs +%if 0%{?builddocs} +export WX_SKIP_DOXYGEN_VERSION_CHECK=1 +docs/doxygen/regen.sh html +mv docs/doxygen/out/html . +%else +mv %{srcname}-%{version} html +%endif # fix plugin dir for 64-bit sed -i -e 's|/usr/lib\b|%{_libdir}|' wx-config.in configure From 627621447bd20dfd061ae3d7ae2c66bdd542dbe7 Mon Sep 17 00:00:00 2001 From: Mystro256 Date: Wed, 28 Dec 2016 17:05:16 -0500 Subject: [PATCH 55/94] Update git snapshot --- .gitignore | 1 + sources | 2 +- wxGTK3.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index d923a2b..cc2fdb8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /wxWidgets-3.0.2-docs-html.tar.bz2 /wxWidgets-3.0.2.tar.bz2 /wxWidgets-9518d52.tar.gz +/wxWidgets-f90b768.tar.gz diff --git a/sources b/sources index c8eeff8..21b95b5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f1b6f528f6dc5d3a83d1d484b08a35f9 wxWidgets-9518d52.tar.gz +SHA512 (wxWidgets-f90b768.tar.gz) = d6207bfe85d00130ac46a08c06a245fd2cd5c7a51c2d1098284e9c10f4d075bad8925d67871a15bd66ae79519b95c7d16da5145b0ab00be1ca3b953bf86a43ae diff --git a/wxGTK3.spec b/wxGTK3.spec index 30ace97..32ab75c 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -12,7 +12,7 @@ #For git snapshots, set to 0 to use release instead: %global usesnapshot 1 %if 0%{?usesnapshot} -%global commit0 9518d52ba80a22c6e6a6414e9137e66013d2d191 +%global commit0 f90b768ea040529fe33fda7e20f5fe2765de1dd0 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #What doc version to use with the snapshot (usually last release): %global builddocs 1 @@ -20,7 +20,7 @@ Name: %{wxgtkname} Version: 3.0.3 -Release: 0.1%{?usesnapshot:.git%{shortcommit0}}%{?dist} +Release: 0.2%{?usesnapshot:.git%{shortcommit0}}%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -356,6 +356,9 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Wed Dec 28 2016 Jeremy Newton - 3.0.3-0.2.gitf90b768 +- Update to newer git snapshot + * Sat Dec 10 2016 Jeremy Newton - 3.0.3-0.1.git9518d52 - Update to git snapshot From 484b3a884159a29c93b5535a4194e4a2c0738786 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Sun, 1 Jan 2017 18:05:17 -0500 Subject: [PATCH 56/94] Move docs generation from prep section to build section --- wxGTK3.spec | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index 32ab75c..d468515 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -182,15 +182,6 @@ sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in sed -i -e 's|wxstd.mo|wxstd3.mo|' Makefile.in sed -i -e 's|wxmsw.mo|wxmsw3.mo|' Makefile.in -#Docs -%if 0%{?builddocs} -export WX_SKIP_DOXYGEN_VERSION_CHECK=1 -docs/doxygen/regen.sh html -mv docs/doxygen/out/html . -%else -mv %{srcname}-%{version} html -%endif - # fix plugin dir for 64-bit sed -i -e 's|/usr/lib\b|%{_libdir}|' wx-config.in configure sed -i -e 's|/lib|/%{_lib}|' src/unix/stdpaths.cpp @@ -228,6 +219,14 @@ popd %make_build +#Docs +%if 0%{?builddocs} +WX_SKIP_DOXYGEN_VERSION_CHECK=1 docs/doxygen/regen.sh html +mv docs/doxygen/out/html . +%else +mv %{srcname}-%{version} html +%endif + pushd docs/doxygen WX_SKIP_DOXYGEN_VERSION_CHECK=1 ./regen.sh xml popd From 965da34c1a0c43cb0a7999ca2234caf60b307da4 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Sun, 1 Jan 2017 18:11:44 -0500 Subject: [PATCH 57/94] Switch to use GStreamer 1.0 (#1402628) --- wxGTK3-3.0.3-gst1.0.patch | 886 ++++++++++++++++++++++++++++++++++++++ wxGTK3.spec | 9 +- 2 files changed, 893 insertions(+), 2 deletions(-) create mode 100644 wxGTK3-3.0.3-gst1.0.patch diff --git a/wxGTK3-3.0.3-gst1.0.patch b/wxGTK3-3.0.3-gst1.0.patch new file mode 100644 index 0000000..63f793a --- /dev/null +++ b/wxGTK3-3.0.3-gst1.0.patch @@ -0,0 +1,886 @@ +Index: wxwidgets3.0-3.0.2+dfsg/configure.in +=================================================================== +--- wxwidgets3.0-3.0.2+dfsg.orig/configure.in ++++ wxwidgets3.0-3.0.2+dfsg/configure.in +@@ -7543,43 +7543,22 @@ if test "$wxUSE_MEDIACTRL" = "yes" -o "$ + wxUSE_GSTREAMER="no" + + dnl ------------------------------------------------------------------- +- dnl Test for at least 0.8 gstreamer module from pkg-config +- dnl Even totem doesn't accept 0.9 evidently. +- dnl +- dnl So, we first check to see if 0.10 if available - if not we +- dnl try the older 0.8 version ++ dnl Test for at least gstreamer 1.0 module from pkg-config + dnl ------------------------------------------------------------------- +- GST_VERSION_MAJOR=0 +- GST_VERSION_MINOR=10 ++ GST_VERSION_MAJOR=1 ++ GST_VERSION_MINOR=0 + GST_VERSION=$GST_VERSION_MAJOR.$GST_VERSION_MINOR + +- if test "$wxUSE_GSTREAMER8" = "no"; then +- PKG_CHECK_MODULES(GST, +- [gstreamer-$GST_VERSION gstreamer-plugins-base-$GST_VERSION], +- [ +- wxUSE_GSTREAMER="yes" +- GST_LIBS="$GST_LIBS -lgstinterfaces-$GST_VERSION" +- ], +- [ +- AC_MSG_WARN([GStreamer 0.10 not available, falling back to 0.8]) +- GST_VERSION_MINOR=8 +- ] +- ) +- else +- dnl check only for 0.8 +- GST_VERSION_MINOR=8 +- fi +- +- if test $GST_VERSION_MINOR = "8"; then +- GST_VERSION=$GST_VERSION_MAJOR.$GST_VERSION_MINOR +- PKG_CHECK_MODULES(GST, +- [gstreamer-$GST_VERSION gstreamer-interfaces-$GST_VERSION gstreamer-gconf-$GST_VERSION], +- wxUSE_GSTREAMER="yes", +- [ +- AC_MSG_WARN([GStreamer 0.8/0.10 not available.]) +- ]) +- fi +- ++ PKG_CHECK_MODULES(GST, ++ [gstreamer-$GST_VERSION gstreamer-plugins-base-$GST_VERSION], ++ [ ++ wxUSE_GSTREAMER="yes" ++ GST_LIBS="$GST_LIBS -lgstvideo-$GST_VERSION" ++ ], ++ [ ++ AC_MSG_WARN([GStreamer 1.0 not available]) ++ ] ++ ) + + if test "$wxUSE_GSTREAMER" = "yes"; then + CPPFLAGS="$GST_CFLAGS $CPPFLAGS" +Index: wxwidgets3.0-3.0.2+dfsg/src/unix/mediactrl.cpp +=================================================================== +--- wxwidgets3.0-3.0.2+dfsg.orig/src/unix/mediactrl.cpp ++++ wxwidgets3.0-3.0.2+dfsg/src/unix/mediactrl.cpp +@@ -19,13 +19,7 @@ + + #include // main gstreamer header + +-// xoverlay/video stuff, gst-gconf for 0.8 +-#if GST_VERSION_MAJOR > 0 || GST_VERSION_MINOR >= 10 +-# include +-#else +-# include +-# include // gstreamer glib configuration +-#endif ++#include + + #ifndef WX_PRECOMP + #include "wx/log.h" // wxLogDebug/wxLogSysError/wxLogTrace +@@ -48,11 +42,11 @@ + //----------------------------------------------------------------------------- + + /* +- This is the GStreamer backend for unix. Currently we require 0.8 or +- 0.10. Here we use the "playbin" GstElement for ease of use. ++ This is the GStreamer backend for unix. Currently we require 1.0. ++ Here we use the "playbin" GstElement for ease of use. + +- Note that now we compare state change functions to GST_STATE_FAILURE +- now rather than GST_STATE_SUCCESS as newer gstreamer versions return ++ Note that now we compare state change functions to GST_STATE_CHANGE_FAILURE ++ now rather than GST_STATE_CHANGE_SUCCESS as newer gstreamer versions return + non-success values for returns that are otherwise successful but not + immediate. + +@@ -60,11 +54,8 @@ + moment but with a tad bit of work it could theorectically work in + straight wxX11 et al. + +- One last note is that resuming from pausing/seeking can result +- in erratic video playback (GStreamer-based bug, happens in totem as well) +- - this is better in 0.10, however. One thing that might make it worse +- here is that we don't preserve the aspect ratio of the video and stretch +- it to the whole window. ++ One last note is that we don't preserve the aspect ratio of the video and ++ stretch it to the whole window. + + Note that there are some things used here that could be undocumented - + for reference see the media player Kiss and Totem as well as some +@@ -72,12 +63,10 @@ + that attempted thread-safety... + + Then there is the issue of m_asynclock. This serves several purposes: +- 1) It prevents the C callbacks from sending wx state change events +- so that we don't get duplicate ones in 0.8 +- 2) It makes the sync and async handlers in 0.10 not drop any ++ 1) It makes the sync and async handlers not drop any + messages so that while we are polling it we get the messages in + SyncStateChange instead of the queue. +- 3) Keeps the pausing in Stop() synchronous ++ 2) Keeps the pausing in Stop() synchronous + + RN: Note that I've tried to follow the wxGTK conventions here as close + as possible. In the implementation the C Callbacks come first, then +@@ -90,43 +79,9 @@ + //============================================================================= + + //----------------------------------------------------------------------------- +-// GStreamer (most version compatibility) macros ++// GStreamer macros + //----------------------------------------------------------------------------- + +-// In 0.9 there was a HUGE change to GstQuery and the +-// gst_element_query function changed dramatically and split off +-// into two separate ones +-#if GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR <= 8 +-# define wxGst_element_query_duration(e, f, p) \ +- gst_element_query(e, GST_QUERY_TOTAL, f, p) +-# define wxGst_element_query_position(e, f, p) \ +- gst_element_query(e, GST_QUERY_POSITION, f, p) +-#elif GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR == 9 +-// However, the actual 0.9 version has a slightly different definition +-// and instead of gst_element_query_duration it has two parameters to +-// gst_element_query_position instead +-# define wxGst_element_query_duration(e, f, p) \ +- gst_element_query_position(e, f, 0, p) +-# define wxGst_element_query_position(e, f, p) \ +- gst_element_query_position(e, f, p, 0) +-#else +-# define wxGst_element_query_duration \ +- gst_element_query_duration +-# define wxGst_element_query_position \ +- gst_element_query_position +-#endif +- +-// Other 0.10 macros +-#if GST_VERSION_MAJOR > 0 || GST_VERSION_MINOR >= 10 +-# define GST_STATE_FAILURE GST_STATE_CHANGE_FAILURE +-# define GST_STATE_SUCCESS GST_STATE_CHANGE_SUCCESS +-# define GstElementState GstState +-# define gst_gconf_get_default_video_sink() \ +- gst_element_factory_make ("gconfvideosink", "video-sink"); +-# define gst_gconf_get_default_audio_sink() \ +- gst_element_factory_make ("gconfaudiosink", "audio-sink"); +-#endif +- + // Max wait time for element state waiting - GST_CLOCK_TIME_NONE for inf + #define wxGSTREAMER_TIMEOUT (100 * GST_MSECOND) // Max 100 milliseconds + +@@ -189,11 +144,11 @@ public: + bool CheckForErrors(); + bool DoLoad(const wxString& locstring); + wxMediaCtrl* GetControl() { return m_ctrl; } // for C Callbacks +- void HandleStateChange(GstElementState oldstate, GstElementState newstate); ++ void HandleStateChange(GstState oldstate, GstState newstate); + bool QueryVideoSizeFromElement(GstElement* element); + bool QueryVideoSizeFromPad(GstPad* caps); +- void SetupXOverlay(); +- bool SyncStateChange(GstElement* element, GstElementState state, ++ void SetupVideoOverlay(); ++ bool SyncStateChange(GstElement* element, GstState state, + gint64 llTimeout = wxGSTREAMER_TIMEOUT); + bool TryAudioSink(GstElement* audiosink); + bool TryVideoSink(GstElement* videosink); +@@ -203,7 +158,7 @@ public: + double m_dRate; // Current playback rate - + // see GetPlaybackRate for notes + wxLongLong m_llPausedPos; // Paused position - see Pause() +- GstXOverlay* m_xoverlay; // X Overlay that contains the GST video ++ GstVideoOverlay* m_videooverlay; // Video Overlay that contains the GST video + wxMutex m_asynclock; // See "discussion of internals" + class wxGStreamerMediaEventHandler* m_eventHandler; // see below + +@@ -284,7 +239,7 @@ expose_event(GtkWidget* widget, GdkEvent + { + // I've seen this recommended somewhere... + // TODO: Is this needed? Maybe it is just cruft... +- // gst_x_overlay_set_xwindow_id( GST_X_OVERLAY(be->m_xoverlay), ++ // gst_video_overlay_set_window_handle( GST_VIDEO_OVERLAY(be->m_videooverlay), + // GDK_WINDOW_XWINDOW( window ) ); + + // If we have actual video..... +@@ -294,7 +249,7 @@ expose_event(GtkWidget* widget, GdkEvent + // GST Doesn't redraw automatically while paused + // Plus, the video sometimes doesn't redraw when it looses focus + // or is painted over so we just tell it to redraw... +- gst_x_overlay_expose(be->m_xoverlay); ++ gst_video_overlay_expose(be->m_videooverlay); + } + else + { +@@ -334,7 +289,7 @@ static gint gtk_window_realize_callback( + GdkWindow* window = gtk_widget_get_window(widget); + wxASSERT(window); + +- gst_x_overlay_set_xwindow_id( GST_X_OVERLAY(be->m_xoverlay), ++ gst_video_overlay_set_window_handle( GST_VIDEO_OVERLAY(be->m_videooverlay), + GDK_WINDOW_XID(window) + ); + GtkWidget* w = be->GetControl()->m_wxwindow; +@@ -349,30 +304,6 @@ static gint gtk_window_realize_callback( + #endif // wxGTK + + //----------------------------------------------------------------------------- +-// "state-change" from m_playbin/GST_MESSAGE_STATE_CHANGE +-// +-// Called by gstreamer when the state changes - here we +-// send the appropriate corresponding wx event. +-// +-// 0.8 only as HandleStateChange does this in both versions +-//----------------------------------------------------------------------------- +-#if GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR < 10 +-extern "C" { +-static void gst_state_change_callback(GstElement *play, +- GstElementState oldstate, +- GstElementState newstate, +- wxGStreamerMediaBackend* be) +-{ +- if(be->m_asynclock.TryLock() == wxMUTEX_NO_ERROR) +- { +- be->HandleStateChange(oldstate, newstate); +- be->m_asynclock.Unlock(); +- } +-} +-} +-#endif // <0.10 +- +-//----------------------------------------------------------------------------- + // "eos" from m_playbin/GST_MESSAGE_EOS + // + // Called by gstreamer when the media is done playing ("end of stream") +@@ -425,69 +356,17 @@ static void gst_notify_caps_callback(Gst + } + + //----------------------------------------------------------------------------- +-// "notify::stream-info" from m_playbin +-// +-// Run through the stuff in "stream-info" of m_playbin for a valid +-// video pad, and then attempt to query the video size from it - if not +-// set up an event to do so when ready. +-// +-// Currently unused - now we just query it directly using +-// QueryVideoSizeFromElement. +-// +-// (Undocumented?) +-//----------------------------------------------------------------------------- +-#if GST_VERSION_MAJOR > 0 || GST_VERSION_MINOR >= 10 +-extern "C" { +-static void gst_notify_stream_info_callback(GstElement* WXUNUSED(element), +- GParamSpec* WXUNUSED(pspec), +- wxGStreamerMediaBackend* be) +-{ +- wxLogTrace(wxTRACE_GStreamer, wxT("gst_notify_stream_info_callback")); +- be->QueryVideoSizeFromElement(be->m_playbin); +-} +-} +-#endif +- +-//----------------------------------------------------------------------------- +-// "desired-size-changed" from m_xoverlay +-// +-// 0.8-specific this provides us with the video size when it changes - +-// even though we get the caps as well this seems to come before the +-// caps notification does... +-// +-// Note it will return 16,16 for an early-bird value or for audio +-//----------------------------------------------------------------------------- +-#if GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR < 10 +-extern "C" { +-static void gst_desired_size_changed_callback(GstElement * play, +- guint width, guint height, +- wxGStreamerMediaBackend* be) +-{ +- if(!(width == 16 && height == 16)) +- { +- be->m_videoSize.x = width; +- be->m_videoSize.y = height; +- } +- else +- be->QueryVideoSizeFromElement(be->m_playbin); +-} +-} +-#endif +- +-//----------------------------------------------------------------------------- + // gst_bus_async_callback [static] + // gst_bus_sync_callback [static] + // +-// Called by m_playbin for notifications such as end-of-stream in 0.10 - +-// in previous versions g_signal notifications were used. Because everything ++// Called by m_playbin for notifications such as end-of-stream. Because everything + // in centered in one switch statement though it reminds one of old WinAPI + // stuff. + // + // gst_bus_sync_callback is that sync version that is called on the main GUI + // thread before the async version that we use to set the xwindow id of the +-// XOverlay (NB: This isn't currently used - see CreateControl()). ++// VideoOverlay (NB: This isn't currently used - see CreateControl()). + //----------------------------------------------------------------------------- +-#if GST_VERSION_MAJOR > 0 || GST_VERSION_MINOR >= 10 + extern "C" { + static gboolean gst_bus_async_callback(GstBus* WXUNUSED(bus), + GstMessage* message, +@@ -537,8 +416,7 @@ static GstBusSyncReply gst_bus_sync_call + { + // Pass a non-xwindowid-setting event on to the async handler where it + // belongs +- if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT || +- !gst_structure_has_name (message->structure, "prepare-xwindow-id")) ++ if (!gst_is_video_overlay_prepare_window_handle_message (message)) + { + // + // NB: Unfortunately, the async callback can be quite +@@ -552,12 +430,11 @@ static GstBusSyncReply gst_bus_sync_call + return GST_BUS_DROP; + } + +- wxLogTrace(wxTRACE_GStreamer, wxT("Got prepare-xwindow-id")); +- be->SetupXOverlay(); ++ wxLogTrace(wxTRACE_GStreamer, wxT("Got prepare-window-handle")); ++ be->SetupVideoOverlay(); + return GST_BUS_DROP; // We handled this message - drop from the queue + } + } +-#endif + + //----------------------------------------------------------------------------- + // +@@ -569,11 +446,11 @@ static GstBusSyncReply gst_bus_sync_call + // wxGStreamerMediaBackend::HandleStateChange + // + // Handles a state change event from our C Callback for "state-change" or +-// the async queue in 0.10. (Mostly this is here to avoid locking the ++// the async queue . (Mostly this is here to avoid locking the + // the mutex twice...) + //----------------------------------------------------------------------------- +-void wxGStreamerMediaBackend::HandleStateChange(GstElementState oldstate, +- GstElementState newstate) ++void wxGStreamerMediaBackend::HandleStateChange(GstState oldstate, ++ GstState newstate) + { + switch(newstate) + { +@@ -604,83 +481,13 @@ void wxGStreamerMediaBackend::HandleStat + } + + //----------------------------------------------------------------------------- +-// wxGStreamerMediaBackend::QueryVideoSizeFromElement +-// +-// Run through the stuff in "stream-info" of element for a valid +-// video pad, and then attempt to query the video size from it - if not +-// set up an event to do so when ready. Return true +-// if we got a valid video pad. +-//----------------------------------------------------------------------------- +-bool wxGStreamerMediaBackend::QueryVideoSizeFromElement(GstElement* element) +-{ +- const GList *list = NULL; +- g_object_get (G_OBJECT (element), "stream-info", &list, NULL); +- +- for ( ; list != NULL; list = list->next) +- { +- GObject *info = (GObject *) list->data; +- gint type; +- GParamSpec *pspec; +- GEnumValue *val; +- GstPad *pad = NULL; +- +- g_object_get (info, "type", &type, NULL); +- pspec = g_object_class_find_property ( +- G_OBJECT_GET_CLASS (info), "type"); +- val = g_enum_get_value (G_PARAM_SPEC_ENUM (pspec)->enum_class, type); +- +- if (!strncasecmp(val->value_name, "video", 5) || +- !strncmp(val->value_name, "GST_STREAM_TYPE_VIDEO", 21)) +- { +- // Newer gstreamer 0.8+ plugins are SUPPOSED to have "object"... +- // but a lot of old plugins still use "pad" :) +- pspec = g_object_class_find_property ( +- G_OBJECT_GET_CLASS (info), "object"); +- +- if (!pspec) +- g_object_get (info, "pad", &pad, NULL); +- else +- g_object_get (info, "object", &pad, NULL); +- +-#if GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR <= 8 +- // Killed in 0.9, presumely because events and such +- // should be pushed on pads regardless of whether they +- // are currently linked +- pad = (GstPad *) GST_PAD_REALIZE (pad); +- wxASSERT(pad); +-#endif +- +- if(!QueryVideoSizeFromPad(pad)) +- { +- // wait for those caps to get ready +- g_signal_connect( +- pad, +- "notify::caps", +- G_CALLBACK(gst_notify_caps_callback), +- this); +- } +- break; +- }// end if video +- }// end searching through info list +- +- // no video (or extremely delayed stream-info) +- if(list == NULL) +- { +- m_videoSize = wxSize(0,0); +- return false; +- } +- +- return true; +-} +- +-//----------------------------------------------------------------------------- + // wxGStreamerMediaBackend::QueryVideoSizeFromPad + // + // Gets the size of our video (in wxSize) from a GstPad + //----------------------------------------------------------------------------- + bool wxGStreamerMediaBackend::QueryVideoSizeFromPad(GstPad* pad) + { +- const GstCaps* caps = GST_PAD_CAPS(pad); ++ GstCaps* caps = gst_pad_get_current_caps(pad); + if ( caps ) + { + const GstStructure *s = gst_caps_get_structure (caps, 0); +@@ -706,23 +513,26 @@ bool wxGStreamerMediaBackend::QueryVideo + m_videoSize.y = (int) ((float) den * m_videoSize.y / num); + } + +- wxLogTrace(wxTRACE_GStreamer, wxT("Adjusted video size: [%i,%i]"), +- m_videoSize.x, m_videoSize.y); ++ wxLogTrace(wxTRACE_GStreamer, wxT("Adjusted video size: [%i,%i]"), ++ m_videoSize.x, m_videoSize.y); ++ ++ gst_caps_unref (caps); + return true; + } // end if caps + ++ m_videoSize = wxSize(0,0); + return false; // not ready/massive failure + } + + //----------------------------------------------------------------------------- +-// wxGStreamerMediaBackend::SetupXOverlay ++// wxGStreamerMediaBackend::SetupVideoOverlay + // +-// Attempts to set the XWindow id of our GstXOverlay to tell it which ++// Attempts to set the XWindow id of our GstVideoOverlay to tell it which + // window to play video in. + //----------------------------------------------------------------------------- +-void wxGStreamerMediaBackend::SetupXOverlay() ++void wxGStreamerMediaBackend::SetupVideoOverlay() + { +- // Use the xoverlay extension to tell gstreamer to play in our window ++ // Use the videooverlay extension to tell gstreamer to play in our window + #ifdef __WXGTK__ + if (!gtk_widget_get_realized(m_ctrl->m_wxwindow)) + { +@@ -739,7 +549,7 @@ void wxGStreamerMediaBackend::SetupXOver + GdkWindow* window = gtk_widget_get_window(m_ctrl->m_wxwindow); + wxASSERT(window); + #endif +- gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(m_xoverlay), ++ gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(m_videooverlay), + #ifdef __WXGTK__ + GDK_WINDOW_XID(window) + #else +@@ -769,9 +579,8 @@ void wxGStreamerMediaBackend::SetupXOver + // + // PRECONDITION: Assumes m_asynclock is Lock()ed + //----------------------------------------------------------------------------- +-#if GST_VERSION_MAJOR > 0 || GST_VERSION_MINOR >= 10 + bool wxGStreamerMediaBackend::SyncStateChange(GstElement* element, +- GstElementState desiredstate, ++ GstState desiredstate, + gint64 llTimeout) + { + GstBus* bus = gst_element_get_bus(element); +@@ -844,23 +653,6 @@ bool wxGStreamerMediaBackend::SyncStateC + + return bSuccess; + } +-#else // 0.8 implementation +-bool wxGStreamerMediaBackend::SyncStateChange(GstElement* element, +- GstElementState desiredstate, +- gint64 llTimeout) +-{ +- gint64 llTimeWaited = 0; +- while(GST_STATE(element) != desiredstate) +- { +- if(llTimeWaited >= llTimeout) +- break; +- llTimeWaited += 10*GST_MSECOND; +- wxMilliSleep(10); +- } +- +- return llTimeWaited != llTimeout; +-} +-#endif + + //----------------------------------------------------------------------------- + // wxGStreamerMediaBackend::TryAudioSink +@@ -884,25 +676,25 @@ bool wxGStreamerMediaBackend::TryAudioSi + + bool wxGStreamerMediaBackend::TryVideoSink(GstElement* videosink) + { +- // Check if the video sink either is an xoverlay or might contain one... +- if( !GST_IS_BIN(videosink) && !GST_IS_X_OVERLAY(videosink) ) ++ // Check if the video sink either is an videooverlay or might contain one... ++ if( !GST_IS_BIN(videosink) && !GST_IS_VIDEO_OVERLAY(videosink) ) + { + if(G_IS_OBJECT(videosink)) + g_object_unref(videosink); + return false; + } + +- // Make our video sink and make sure it supports the x overlay interface +- // the x overlay enables us to put the video in our control window ++ // Make our video sink and make sure it supports the video overlay interface ++ // the video overlay enables us to put the video in our control window + // (i.e. we NEED it!) - also connect to the natural video size change event + if( GST_IS_BIN(videosink) ) +- m_xoverlay = (GstXOverlay*) ++ m_videooverlay = (GstVideoOverlay*) + gst_bin_get_by_interface (GST_BIN (videosink), +- GST_TYPE_X_OVERLAY); ++ GST_TYPE_VIDEO_OVERLAY); + else +- m_xoverlay = (GstXOverlay*) videosink; ++ m_videooverlay = (GstVideoOverlay*) videosink; + +- if ( !GST_IS_X_OVERLAY(m_xoverlay) ) ++ if ( !GST_IS_VIDEO_OVERLAY(m_videooverlay) ) + { + g_object_unref(videosink); + return false; +@@ -1046,11 +838,7 @@ bool wxGStreamerMediaBackend::CreateCont + //Really init gstreamer + gboolean bInited; + GError* error = NULL; +-#if GST_VERSION_MAJOR > 0 || GST_VERSION_MINOR >= 10 + bInited = gst_init_check(&argcGST, &argvGST, &error); +-#else +- bInited = gst_init_check(&argcGST, &argvGST); +-#endif + + // Cleanup arguments for unicode case + #if wxUSE_UNICODE +@@ -1117,78 +905,52 @@ bool wxGStreamerMediaBackend::CreateCont + return false; + } + +-#if GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR < 10 +- // Connect the glib events/callbacks we want to our playbin +- g_signal_connect(m_playbin, "eos", +- G_CALLBACK(gst_finish_callback), this); +- g_signal_connect(m_playbin, "error", +- G_CALLBACK(gst_error_callback), this); +- g_signal_connect(m_playbin, "state-change", +- G_CALLBACK(gst_state_change_callback), this); +-#else +- // GStreamer 0.10+ uses GstBus for this now, connect to the sync +- // handler as well so we can set the X window id of our xoverlay ++ // GStreamer uses GstBus for this now, connect to the sync ++ // handler as well so we can set the video window id of our videooverlay + gst_bus_add_watch (gst_element_get_bus(m_playbin), + (GstBusFunc) gst_bus_async_callback, this); + gst_bus_set_sync_handler(gst_element_get_bus(m_playbin), +- (GstBusSyncHandler) gst_bus_sync_callback, this); +- g_signal_connect(m_playbin, "notify::stream-info", +- G_CALLBACK(gst_notify_stream_info_callback), this); +-#endif ++ (GstBusSyncHandler) gst_bus_sync_callback, this, NULL); + + // Get the audio sink +- GstElement* audiosink = gst_gconf_get_default_audio_sink(); ++ // Use autodetection, then alsa, then oss as a stopgap ++ GstElement* audiosink = gst_element_factory_make ("autoaudiosink", "audio-sink"); + if( !TryAudioSink(audiosink) ) + { +- // fallback to autodetection, then alsa, then oss as a stopgap +- audiosink = gst_element_factory_make ("autoaudiosink", "audio-sink"); ++ audiosink = gst_element_factory_make ("alsasink", "alsa-output"); + if( !TryAudioSink(audiosink) ) + { +- audiosink = gst_element_factory_make ("alsasink", "alsa-output"); ++ audiosink = gst_element_factory_make ("osssink", "play_audio"); + if( !TryAudioSink(audiosink) ) + { +- audiosink = gst_element_factory_make ("osssink", "play_audio"); +- if( !TryAudioSink(audiosink) ) +- { +- wxLogSysError(wxT("Could not find a valid audiosink")); +- return false; +- } ++ wxLogSysError(wxT("Could not find a valid audiosink")); ++ return false; + } + } + } + + // Setup video sink - first try gconf, then auto, then xvimage and + // then finally plain ximage +- GstElement* videosink = gst_gconf_get_default_video_sink(); ++ GstElement* videosink = gst_element_factory_make ("autovideosink", "video-sink"); + if( !TryVideoSink(videosink) ) + { +- videosink = gst_element_factory_make ("autovideosink", "video-sink"); ++ videosink = gst_element_factory_make ("xvimagesink", "video-sink"); + if( !TryVideoSink(videosink) ) + { +- videosink = gst_element_factory_make ("xvimagesink", "video-sink"); ++ // finally, do a final fallback to ximagesink ++ videosink = ++ gst_element_factory_make ("ximagesink", "video-sink"); + if( !TryVideoSink(videosink) ) + { +- // finally, do a final fallback to ximagesink +- videosink = +- gst_element_factory_make ("ximagesink", "video-sink"); +- if( !TryVideoSink(videosink) ) +- { +- g_object_unref(audiosink); +- wxLogSysError(wxT("Could not find a suitable video sink")); +- return false; +- } ++ g_object_unref(audiosink); ++ wxLogSysError(wxT("Could not find a suitable video sink")); ++ return false; + } + } + } + +-#if GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR < 10 +- // Not on 0.10... called when video size changes +- g_signal_connect(m_xoverlay, "desired-size-changed", +- G_CALLBACK(gst_desired_size_changed_callback), this); +-#endif +- // Tell GStreamer which window to draw to in 0.8 - 0.10 +- // sometimes needs this too... +- SetupXOverlay(); ++ // Tell GStreamer which window to draw to ++ SetupVideoOverlay(); + + // Now that we know (or, rather think) our video and audio sink + // are valid set our playbin to use them +@@ -1197,6 +959,10 @@ bool wxGStreamerMediaBackend::CreateCont + "audio-sink", audiosink, + NULL); + ++ GstPad *video_sinkpad = gst_element_get_static_pad (videosink, "sink"); ++ g_signal_connect (video_sinkpad, "notify::caps", G_CALLBACK (gst_notify_caps_callback), this); ++ gst_object_unref (video_sinkpad); ++ + m_eventHandler = new wxGStreamerMediaEventHandler(this); + return true; + } +@@ -1213,26 +979,10 @@ bool wxGStreamerMediaBackend::Load(const + + //----------------------------------------------------------------------------- + // wxGStreamerMediaBackend::Load (URI version) +-// +-// In the case of a file URI passes it unencoded - +-// also, as of 0.10.3 and earlier GstURI (the uri parser for gstreamer) +-// is sort of broken and only accepts uris with at least two slashes +-// after the scheme (i.e. file: == not ok, file:// == ok) + //----------------------------------------------------------------------------- + bool wxGStreamerMediaBackend::Load(const wxURI& location) + { +- if(location.GetScheme().CmpNoCase(wxT("file")) == 0) +- { +- wxString uristring = location.BuildUnescapedURI(); +- +- //Workaround GstURI leading "//" problem and make sure it leads +- //with that +- return DoLoad(wxString(wxT("file://")) + +- uristring.Right(uristring.length() - 5) +- ); +- } +- else +- return DoLoad(location.BuildURI()); ++ return DoLoad(location.BuildURI()); + } + + //----------------------------------------------------------------------------- +@@ -1258,7 +1008,7 @@ bool wxGStreamerMediaBackend::DoLoad(con + + // Set playbin to ready to stop the current media... + if( gst_element_set_state (m_playbin, +- GST_STATE_READY) == GST_STATE_FAILURE || ++ GST_STATE_READY) == GST_STATE_CHANGE_FAILURE || + !SyncStateChange(m_playbin, GST_STATE_READY)) + { + CheckForErrors(); +@@ -1281,7 +1031,7 @@ bool wxGStreamerMediaBackend::DoLoad(con + // Try to pause media as gstreamer won't let us query attributes + // such as video size unless it is paused or playing + if( gst_element_set_state (m_playbin, +- GST_STATE_PAUSED) == GST_STATE_FAILURE || ++ GST_STATE_PAUSED) == GST_STATE_CHANGE_FAILURE || + !SyncStateChange(m_playbin, GST_STATE_PAUSED)) + { + CheckForErrors(); +@@ -1307,12 +1057,11 @@ bool wxGStreamerMediaBackend::DoLoad(con + // + // Sets the stream to a playing state + // +-// THREAD-UNSAFE in 0.8, maybe in 0.10 as well + //----------------------------------------------------------------------------- + bool wxGStreamerMediaBackend::Play() + { + if (gst_element_set_state (m_playbin, +- GST_STATE_PLAYING) == GST_STATE_FAILURE) ++ GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) + { + CheckForErrors(); + return false; +@@ -1326,13 +1075,12 @@ bool wxGStreamerMediaBackend::Play() + // + // Marks where we paused and pauses the stream + // +-// THREAD-UNSAFE in 0.8, maybe in 0.10 as well + //----------------------------------------------------------------------------- + bool wxGStreamerMediaBackend::Pause() + { + m_llPausedPos = wxGStreamerMediaBackend::GetPosition(); + if (gst_element_set_state (m_playbin, +- GST_STATE_PAUSED) == GST_STATE_FAILURE) ++ GST_STATE_PAUSED) == GST_STATE_CHANGE_FAILURE) + { + CheckForErrors(); + return false; +@@ -1353,7 +1101,7 @@ bool wxGStreamerMediaBackend::Stop() + { // begin state lock + wxMutexLocker lock(m_asynclock); + if(gst_element_set_state (m_playbin, +- GST_STATE_PAUSED) == GST_STATE_FAILURE || ++ GST_STATE_PAUSED) == GST_STATE_CHANGE_FAILURE || + !SyncStateChange(m_playbin, GST_STATE_PAUSED)) + { + CheckForErrors(); +@@ -1417,10 +1165,8 @@ wxLongLong wxGStreamerMediaBackend::GetP + else + { + gint64 pos; +- GstFormat fmtTime = GST_FORMAT_TIME; + +- if (!wxGst_element_query_position(m_playbin, &fmtTime, &pos) || +- fmtTime != GST_FORMAT_TIME || pos == -1) ++ if (!gst_element_query_position(m_playbin, GST_FORMAT_TIME, &pos) || pos == -1) + return 0; + return pos / GST_MSECOND ; + } +@@ -1438,44 +1184,21 @@ wxLongLong wxGStreamerMediaBackend::GetP + // This is also an exceedingly ugly function due to the three implementations + // (or, rather two plus one implementation without a seek function). + // +-// This is asynchronous and thread-safe on both 0.8 and 0.10. +-// + // NB: This fires both a stop and play event if the media was previously + // playing... which in some ways makes sense. And yes, this makes the video + // go all haywire at times - a gstreamer bug... + //----------------------------------------------------------------------------- + bool wxGStreamerMediaBackend::SetPosition(wxLongLong where) + { +-#if GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR == 8 \ +- && GST_VERSION_MICRO == 0 +- // 0.8.0 has no gst_element_seek according to official docs!!! +- wxLogSysError(wxT("GStreamer 0.8.0 does not have gst_element_seek") +- wxT(" according to official docs")); +- return false; +-#else // != 0.8.0 +- +-# if GST_VERSION_MAJOR > 0 || GST_VERSION_MINOR >= 10 +- gst_element_seek (m_playbin, m_dRate, GST_FORMAT_TIME, ++ if ( gst_element_seek (m_playbin, m_dRate, GST_FORMAT_TIME, + (GstSeekFlags)(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT), + GST_SEEK_TYPE_SET, where.GetValue() * GST_MSECOND, +- GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE ); +-# else +- // NB: Some gstreamer versions return false basically all the time +- // here - even totem doesn't bother to check the return value here +- // so I guess we'll just assume it worked - +- // TODO: maybe check the gst error callback??? +- gst_element_seek (m_playbin, (GstSeekType) (GST_SEEK_METHOD_SET | +- GST_FORMAT_TIME | GST_SEEK_FLAG_FLUSH), +- where.GetValue() * GST_MSECOND ); +- +-# endif // GST_VERSION_MAJOR > 0 || GST_VERSION_MINOR >= 10 +- ++ GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE ) ) + { + m_llPausedPos = where; + return true; + } +- return true; +-#endif //== 0.8.0 ++ return false; + } + + //----------------------------------------------------------------------------- +@@ -1487,10 +1210,8 @@ bool wxGStreamerMediaBackend::SetPositio + wxLongLong wxGStreamerMediaBackend::GetDuration() + { + gint64 length; +- GstFormat fmtTime = GST_FORMAT_TIME; + +- if(!wxGst_element_query_duration(m_playbin, &fmtTime, &length) || +- fmtTime != GST_FORMAT_TIME || length == -1) ++ if(!gst_element_query_duration(m_playbin, GST_FORMAT_TIME, &length) || length == -1) + return 0; + return length / GST_MSECOND ; + } +@@ -1512,7 +1233,7 @@ void wxGStreamerMediaBackend::Move(int W + // wxGStreamerMediaBackend::GetVideoSize + // + // Returns our cached video size from Load/gst_notify_caps_callback +-// gst_x_overlay_get_desired_size also does this in 0.8... ++// gst_video_overlay_get_desired_size also does this in 0.8... + //----------------------------------------------------------------------------- + wxSize wxGStreamerMediaBackend::GetVideoSize() const + { +@@ -1539,9 +1260,8 @@ wxSize wxGStreamerMediaBackend::GetVideo + //TODO: forcing frame/samplerates, see audioscale and videorate. Audioscale is + //TODO: part of playbin. + // +-// In 0.10 GStreamer has new gst_element_seek API that might +-// support this - and I've got an attempt to do so but it is untested +-// but it would appear to work... ++// In has new gst_element_seek API that supports this - and I've got an attempt ++// to do so but it is untested but it would appear to work... + //----------------------------------------------------------------------------- + double wxGStreamerMediaBackend::GetPlaybackRate() + { +@@ -1552,7 +1272,6 @@ double wxGStreamerMediaBackend::GetPlayb + + bool wxGStreamerMediaBackend::SetPlaybackRate(double dRate) + { +-#if GST_VERSION_MAJOR > 0 || GST_VERSION_MINOR >= 10 + #if 0 // not tested enough + if( gst_element_seek (m_playbin, dRate, GST_FORMAT_TIME, + (GstSeekFlags)(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT), +@@ -1565,7 +1284,6 @@ bool wxGStreamerMediaBackend::SetPlaybac + #else + wxUnusedVar(dRate); + #endif +-#endif + + // failure + return false; +@@ -1593,10 +1311,8 @@ wxLongLong wxGStreamerMediaBackend::GetD + wxLongLong wxGStreamerMediaBackend::GetDownloadTotal() + { + gint64 length; +- GstFormat fmtBytes = GST_FORMAT_BYTES; + +- if (!wxGst_element_query_duration(m_playbin, &fmtBytes, &length) || +- fmtBytes != GST_FORMAT_BYTES || length == -1) ++ if (!gst_element_query_duration(m_playbin, GST_FORMAT_BYTES, &length) || length == -1) + return 0; + return length; + } diff --git a/wxGTK3.spec b/wxGTK3.spec index d468515..03eae08 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -20,7 +20,7 @@ Name: %{wxgtkname} Version: 3.0.3 -Release: 0.2%{?usesnapshot:.git%{shortcommit0}}%{?dist} +Release: 0.3%{?usesnapshot:.git%{shortcommit0}}%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -39,6 +39,8 @@ Source10: wx-config # remove abort when ABI check fails # Backport from wxGTK Patch0: %{name}-%{version}-abicheck.patch +# Switch to use GStreamer 1.0 - patch is from Debian +Patch1: %{name}-%{version}-gst1.0.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported @@ -53,7 +55,7 @@ BuildRequires: expat-devel BuildRequires: SDL-devel BuildRequires: libGLU-devel BuildRequires: libSM-devel -BuildRequires: gstreamer-plugins-base-devel +BuildRequires: gstreamer1-plugins-base-devel BuildRequires: GConf2-devel BuildRequires: gettext BuildRequires: cppunit-devel @@ -355,6 +357,9 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Fri Dec 30 2016 Scott Talbert - 3.0.3-0.3.gitf90b768 +- Switch to use GStreamer 1.0 (#1402628) + * Wed Dec 28 2016 Jeremy Newton - 3.0.3-0.2.gitf90b768 - Update to newer git snapshot From 244ea7febfab12c3fcf746effd41b6b5254242f8 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Sun, 1 Jan 2017 19:07:48 -0500 Subject: [PATCH 58/94] Need to run autogen.sh since we patched configure.in --- wxGTK3.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/wxGTK3.spec b/wxGTK3.spec index 03eae08..51de0f4 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -208,6 +208,7 @@ make allmo popd %endif +./autogen.sh %configure \ --with-gtk=%{gtkver} \ --with-opengl \ From fe24b6b2233fc612516c61696c0ff41765170c89 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Sun, 1 Jan 2017 20:01:30 -0500 Subject: [PATCH 59/94] Move autogen.sh call to %prep before we make manual edits to configure script --- wxGTK3.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index 51de0f4..4ebda81 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -179,6 +179,9 @@ This package provides XML documentation for the %{srcname} library. %autosetup -n %{srcname}-%{version} %{!?builddocs:-a 1} -p1 %endif +# Run autogen since we're patching configure.in +./autogen.sh + # patch some installed files to avoid conflicts with 2.8.* sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in sed -i -e 's|wxstd.mo|wxstd3.mo|' Makefile.in @@ -208,7 +211,6 @@ make allmo popd %endif -./autogen.sh %configure \ --with-gtk=%{gtkver} \ --with-opengl \ From 863bf5ef670f14e3f3152b7317248a50345114da Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 17:35:01 +0000 Subject: [PATCH 60/94] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- wxGTK3.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index 4ebda81..be38dd6 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -20,7 +20,7 @@ Name: %{wxgtkname} Version: 3.0.3 -Release: 0.3%{?usesnapshot:.git%{shortcommit0}}%{?dist} +Release: 0.4%{?usesnapshot:.git%{shortcommit0}}%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -360,6 +360,9 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 3.0.3-0.4.gitf90b768 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Fri Dec 30 2016 Scott Talbert - 3.0.3-0.3.gitf90b768 - Switch to use GStreamer 1.0 (#1402628) From 8d3cddc5cba57148016353d4d4ea5476d1b084eb Mon Sep 17 00:00:00 2001 From: Mystro256 Date: Thu, 2 Mar 2017 22:08:01 -0500 Subject: [PATCH 61/94] Disable webview for rawhide for now --- wxGTK3.spec | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index be38dd6..e72ee5e 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -20,7 +20,7 @@ Name: %{wxgtkname} Version: 3.0.3 -Release: 0.4%{?usesnapshot:.git%{shortcommit0}}%{?dist} +Release: 0.5%{?usesnapshot:.git%{shortcommit0}}%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -45,8 +45,10 @@ Patch1: %{name}-%{version}-gst1.0.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported %if %{gtkver} == 3 +%if 0%{?fedora} < 27 BuildRequires: webkitgtk3-devel %endif +%endif BuildRequires: zlib-devel BuildRequires: libpng-devel BuildRequires: libjpeg-devel @@ -79,7 +81,7 @@ Summary: Development files for the wxGTK3 library Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}-gl = %{version}-%{release} Requires: %{name}-media = %{version}-%{release} -%if 0%{?fedora} > 25 +%if 0%{?fedora} == 26 Requires: %{name}-webview = %{version}-%{release} %endif Requires: %{wxbasename} = %{version}-%{release} @@ -123,7 +125,7 @@ comprehensive set of helper classes for most common application tasks, ranging from networking to HTML display and image manipulation. -%if 0%{?fedora} > 25 +%if 0%{?fedora} == 26 %package webview Summary: WebView add-on for the wxWidgets library Group: System Environment/Libraries @@ -278,7 +280,7 @@ popd %post media -p /sbin/ldconfig %postun media -p /sbin/ldconfig -%if 0%{?fedora} > 25 +%if 0%{?fedora} == 26 %post webview -p /sbin/ldconfig %postun webview -p /sbin/ldconfig %endif @@ -341,7 +343,7 @@ fi %files media %{_libdir}/libwx_gtk%{gtkver}u_media-*.so.* -%if 0%{?fedora} > 25 +%if 0%{?fedora} == 26 %files webview %{_libdir}/libwx_gtk%{gtkver}u_webview-*.so.* %endif @@ -360,6 +362,9 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Thu Mar 02 2017 Jeremy Newton - 3.0.3-0.5.gitf90b768 +- Disable webview subpackage in rawhide for now + * Sat Feb 11 2017 Fedora Release Engineering - 3.0.3-0.4.gitf90b768 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 37c4987152eb415a4a6afdc8aceb056a07aa5258 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Sat, 4 Mar 2017 22:08:25 -0500 Subject: [PATCH 62/94] Add temporary patch for webkit2 port in rawhide, re-enable webview subpackage --- wxGTK3-3.0.3-webkit2.patch | 928 +++++++++++++++++++++++++++++++++++++ wxGTK3.spec | 19 +- 2 files changed, 942 insertions(+), 5 deletions(-) create mode 100644 wxGTK3-3.0.3-webkit2.patch diff --git a/wxGTK3-3.0.3-webkit2.patch b/wxGTK3-3.0.3-webkit2.patch new file mode 100644 index 0000000..1f6309c --- /dev/null +++ b/wxGTK3-3.0.3-webkit2.patch @@ -0,0 +1,928 @@ +From 7ca24831df9b0076ff000555da57d2e3db040aa4 Mon Sep 17 00:00:00 2001 +From: Scott Talbert +Date: Sat, 4 Mar 2017 21:09:02 -0500 +Subject: [PATCH] WIP patch to convert webview to webkit2gtk + +This is a temporary patch for Fedora to switch to webkit2gtk for now. This is +not the final implementation. +--- + configure.in | 2 +- + include/wx/gtk/webview_webkit.h | 12 +- + src/gtk/webview_webkit.cpp | 435 +++++++++++++++++++++++----------------- + 3 files changed, 263 insertions(+), 186 deletions(-) + +diff --git a/configure.in b/configure.in +index c88523a..6925887 100644 +--- a/configure.in ++++ b/configure.in +@@ -7244,7 +7244,7 @@ if test "$wxUSE_WEBVIEW" = "yes"; then + if test "$wxUSE_GTK" = 1; then + webkitgtk=webkit-1.0 + if test "$WXGTK3" = 1; then +- webkitgtk=webkitgtk-3.0 ++ webkitgtk=webkit2gtk-4.0 + fi + PKG_CHECK_MODULES([WEBKIT], + [$webkitgtk >= 1.3.1], +diff --git a/include/wx/gtk/webview_webkit.h b/include/wx/gtk/webview_webkit.h +index e1a01bf..e2c9f33 100644 +--- a/include/wx/gtk/webview_webkit.h ++++ b/include/wx/gtk/webview_webkit.h +@@ -134,6 +134,12 @@ public: + //create-web-view signal and so we need to send a new window event + bool m_creating; + ++ //variables used for Find() ++ int m_findFlags; ++ wxString m_findText; ++ int m_findPosition; ++ int m_findCount; ++ + protected: + virtual void DoSetPage(const wxString& html, const wxString& baseUrl); + +@@ -157,12 +163,6 @@ private: + + wxVector > m_handlerList; + +- //variables used for Find() +- int m_findFlags; +- wxString m_findText; +- int m_findPosition; +- int m_findCount; +- + wxDECLARE_DYNAMIC_CLASS(wxWebViewWebKit); + }; + +diff --git a/src/gtk/webview_webkit.cpp b/src/gtk/webview_webkit.cpp +index e592331..315949d 100644 +--- a/src/gtk/webview_webkit.cpp ++++ b/src/gtk/webview_webkit.cpp +@@ -1,5 +1,5 @@ + ///////////////////////////////////////////////////////////////////////////// +-// Name: src/gtk/webview_webkit.cpp ++// Name: src/gtk/webview_webkit2.cpp + // Purpose: GTK WebKit backend for web view component + // Author: Marianne Gagnon, Robert Roebling + // Copyright: (c) 2010 Marianne Gagnon, 1998 Robert Roebling +@@ -18,7 +18,7 @@ + #include "wx/filesys.h" + #include "wx/base64.h" + #include "wx/log.h" +-#include ++#include + + // ---------------------------------------------------------------------------- + // GTK callbacks +@@ -28,36 +28,16 @@ extern "C" + { + + static void +-wxgtk_webview_webkit_load_status(GtkWidget* widget, +- GParamSpec*, +- wxWebViewWebKit *webKitCtrl) ++wxgtk_webview_webkit_load_changed(GtkWidget *, ++ WebKitLoadEvent load_event, ++ wxWebViewWebKit *webKitCtrl) + { + wxString url = webKitCtrl->GetCurrentURL(); + +- WebKitLoadStatus status; +- g_object_get(G_OBJECT(widget), "load-status", &status, NULL); +- + wxString target; // TODO: get target (if possible) + +- if (status == WEBKIT_LOAD_FINISHED) ++ if (load_event == WEBKIT_LOAD_FINISHED) + { +- WebKitWebBackForwardList* hist = webkit_web_view_get_back_forward_list(WEBKIT_WEB_VIEW(widget)); +- WebKitWebHistoryItem* item = webkit_web_back_forward_list_get_current_item(hist); +- //We have to check if we are actually storing history +- //If the item isn't added we add it ourselves, it isn't added otherwise +- //with a custom scheme. +- if(!item || (WEBKIT_IS_WEB_HISTORY_ITEM(item) && +- webkit_web_history_item_get_uri(item) != url)) +- { +- WebKitWebHistoryItem* +- newitem = webkit_web_history_item_new_with_data +- ( +- url.utf8_str(), +- webKitCtrl->GetCurrentTitle().utf8_str() +- ); +- webkit_web_back_forward_list_add_item(hist, newitem); +- } +- + webKitCtrl->m_busy = false; + wxWebViewEvent event(wxEVT_WEBVIEW_LOADED, + webKitCtrl->GetId(), +@@ -66,7 +46,7 @@ wxgtk_webview_webkit_load_status(GtkWidget* widget, + if (webKitCtrl && webKitCtrl->GetEventHandler()) + webKitCtrl->GetEventHandler()->ProcessEvent(event); + } +- else if (status == WEBKIT_LOAD_COMMITTED) ++ else if (load_event == WEBKIT_LOAD_COMMITTED) + { + webKitCtrl->m_busy = true; + wxWebViewEvent event(wxEVT_WEBVIEW_NAVIGATED, +@@ -79,15 +59,15 @@ wxgtk_webview_webkit_load_status(GtkWidget* widget, + } + + static gboolean +-wxgtk_webview_webkit_navigation(WebKitWebView *, +- WebKitWebFrame *frame, +- WebKitNetworkRequest *request, +- WebKitWebNavigationAction *, +- WebKitWebPolicyDecision *policy_decision, ++wxgtk_webview_webkit_navigation(WebKitWebView *web_view, ++ WebKitPolicyDecision *decision, + wxWebViewWebKit *webKitCtrl) + { +- const gchar* uri = webkit_network_request_get_uri(request); +- wxString target = webkit_web_frame_get_name (frame); ++ WebKitNavigationPolicyDecision* navigation_decision = WEBKIT_NAVIGATION_POLICY_DECISION(decision); ++ WebKitNavigationAction* action = webkit_navigation_policy_decision_get_navigation_action(navigation_decision); ++ WebKitURIRequest* request = webkit_navigation_action_get_request(action); ++ const gchar* uri = webkit_uri_request_get_uri(request); ++ wxString target = webkit_navigation_policy_decision_get_frame_name(navigation_decision); + + //If m_creating is true then we are the result of a new window + //and so we need to send the event and veto the load +@@ -102,7 +82,7 @@ wxgtk_webview_webkit_navigation(WebKitWebView *, + if(webKitCtrl && webKitCtrl->GetEventHandler()) + webKitCtrl->GetEventHandler()->ProcessEvent(event); + +- webkit_web_policy_decision_ignore(policy_decision); ++ webkit_policy_decision_ignore(decision); + return TRUE; + } + +@@ -111,8 +91,8 @@ wxgtk_webview_webkit_navigation(WebKitWebView *, + webKitCtrl->m_guard = false; + //We set this to make sure that we don't try to load the page again from + //the resource request callback +- webKitCtrl->m_vfsurl = webkit_network_request_get_uri(request); +- webkit_web_policy_decision_use(policy_decision); ++ webKitCtrl->m_vfsurl = webkit_web_view_get_uri(web_view); ++ webkit_policy_decision_use(decision); + return FALSE; + } + +@@ -129,17 +109,17 @@ wxgtk_webview_webkit_navigation(WebKitWebView *, + if (!event.IsAllowed()) + { + webKitCtrl->m_busy = false; +- webkit_web_policy_decision_ignore(policy_decision); ++ webkit_policy_decision_ignore(decision); + return TRUE; + } + else + { + wxString wxuri = uri; + wxSharedPtr handler; +- wxVector > hanlders = webKitCtrl->GetHandlers(); ++ wxVector > handlers = webKitCtrl->GetHandlers(); + //We are not vetoed so see if we match one of the additional handlers +- for(wxVector >::iterator it = hanlders.begin(); +- it != hanlders.end(); ++it) ++ for(wxVector >::iterator it = handlers.begin(); ++ it != handlers.end(); ++it) + { + if(wxuri.substr(0, (*it)->GetName().length()) == (*it)->GetName()) + { +@@ -157,7 +137,7 @@ wxgtk_webview_webkit_navigation(WebKitWebView *, + webKitCtrl->SetPage(*file->GetStream(), wxuri); + } + //We need to throw some sort of error here if file is NULL +- webkit_web_policy_decision_ignore(policy_decision); ++ webkit_policy_decision_ignore(decision); + return TRUE; + } + return FALSE; +@@ -165,16 +145,15 @@ wxgtk_webview_webkit_navigation(WebKitWebView *, + } + + static gboolean +-wxgtk_webview_webkit_error(WebKitWebView*, +- WebKitWebFrame*, +- gchar *uri, +- gpointer web_error, +- wxWebViewWebKit* webKitWindow) ++wxgtk_webview_webkit_load_failed(WebKitWebView *, ++ WebKitLoadEvent, ++ gchar *uri, ++ GError *error, ++ wxWebViewWebKit* webKitWindow) + { + webKitWindow->m_busy = false; + wxWebViewNavigationError type = wxWEBVIEW_NAV_ERR_OTHER; + +- GError* error = (GError*)web_error; + wxString description(error->message, wxConvUTF8); + + if (strcmp(g_quark_to_string(error->domain), "soup_http_error_quark") == 0) +@@ -306,16 +285,15 @@ wxgtk_webview_webkit_error(WebKitWebView*, + } + + static gboolean +-wxgtk_webview_webkit_new_window(WebKitWebView*, +- WebKitWebFrame *frame, +- WebKitNetworkRequest *request, +- WebKitWebNavigationAction*, +- WebKitWebPolicyDecision *policy_decision, ++wxgtk_webview_webkit_new_window(WebKitPolicyDecision *decision, + wxWebViewWebKit *webKitCtrl) + { +- const gchar* uri = webkit_network_request_get_uri(request); ++ WebKitNavigationPolicyDecision* navigation_decision = WEBKIT_NAVIGATION_POLICY_DECISION(decision); ++ WebKitNavigationAction* action = webkit_navigation_policy_decision_get_navigation_action(navigation_decision); ++ WebKitURIRequest* request = webkit_navigation_action_get_request(action); ++ const gchar* uri = webkit_uri_request_get_uri(request); + +- wxString target = webkit_web_frame_get_name (frame); ++ wxString target = webkit_navigation_policy_decision_get_frame_name(navigation_decision); + wxWebViewEvent event(wxEVT_WEBVIEW_NEWWINDOW, + webKitCtrl->GetId(), + wxString( uri, wxConvUTF8 ), +@@ -325,16 +303,35 @@ wxgtk_webview_webkit_new_window(WebKitWebView*, + webKitCtrl->GetEventHandler()->ProcessEvent(event); + + //We always want the user to handle this themselves +- webkit_web_policy_decision_ignore(policy_decision); ++ webkit_policy_decision_ignore(decision); + return TRUE; + } + ++static gboolean ++wxgtk_webview_webkit_decide_policy(WebKitWebView *web_view, ++ WebKitPolicyDecision *decision, ++ WebKitPolicyDecisionType type, ++ wxWebViewWebKit *webKitCtrl) ++{ ++ switch (type) ++ { ++ case WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION: ++ return wxgtk_webview_webkit_navigation(web_view, decision, webKitCtrl); ++ case WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION: ++ return wxgtk_webview_webkit_new_window(decision, webKitCtrl); ++ default: ++ return FALSE; ++ } ++} ++ + static void +-wxgtk_webview_webkit_title_changed(WebKitWebView*, +- WebKitWebFrame*, +- gchar *title, ++wxgtk_webview_webkit_title_changed(GtkWidget* widget, ++ GParamSpec *, + wxWebViewWebKit *webKitCtrl) + { ++ gchar *title; ++ g_object_get(G_OBJECT(widget), "title", &title, NULL); ++ + wxWebViewEvent event(wxEVT_WEBVIEW_TITLE_CHANGED, + webKitCtrl->GetId(), + webKitCtrl->GetCurrentURL(), +@@ -344,24 +341,23 @@ wxgtk_webview_webkit_title_changed(WebKitWebView*, + if (webKitCtrl && webKitCtrl->GetEventHandler()) + webKitCtrl->GetEventHandler()->ProcessEvent(event); + ++ g_free(title); + } + + static void + wxgtk_webview_webkit_resource_req(WebKitWebView *, +- WebKitWebFrame *, + WebKitWebResource *, +- WebKitNetworkRequest *request, +- WebKitNetworkResponse *, ++ WebKitURIRequest *request, + wxWebViewWebKit *webKitCtrl) + { +- wxString uri = webkit_network_request_get_uri(request); ++ wxString uri = webkit_uri_request_get_uri(request); + + wxSharedPtr handler; +- wxVector > hanlders = webKitCtrl->GetHandlers(); ++ wxVector > handlers = webKitCtrl->GetHandlers(); + + //We are not vetoed so see if we match one of the additional handlers +- for(wxVector >::iterator it = hanlders.begin(); +- it != hanlders.end(); ++it) ++ for(wxVector >::iterator it = handlers.begin(); ++ it != handlers.end(); ++it) + { + if(uri.substr(0, (*it)->GetName().length()) == (*it)->GetName()) + { +@@ -389,19 +385,17 @@ wxgtk_webview_webkit_resource_req(WebKitWebView *, + wxString mime = file->GetMimeType(); + wxString path = "data:" + mime + ";base64," + data; + //Then we can redirect the call +- webkit_network_request_set_uri(request, path.utf8_str()); ++ webkit_uri_request_set_uri(request, path.utf8_str()); + } + + } + } + +-#if WEBKIT_CHECK_VERSION(1, 10, 0) +- + static gboolean + wxgtk_webview_webkit_context_menu(WebKitWebView *, +- GtkWidget *, ++ WebKitContextMenu *, ++ GdkEvent *, + WebKitHitTestResult *, +- gboolean, + wxWebViewWebKit *webKitCtrl) + { + if(webKitCtrl->IsContextMenuEnabled()) +@@ -410,11 +404,9 @@ wxgtk_webview_webkit_context_menu(WebKitWebView *, + return TRUE; + } + +-#endif +- + static WebKitWebView* + wxgtk_webview_webkit_create_webview(WebKitWebView *web_view, +- WebKitWebFrame*, ++ WebKitNavigationAction *, + wxWebViewWebKit *webKitCtrl) + { + //As we do not know the uri being loaded at this point allow the load to +@@ -423,6 +415,30 @@ wxgtk_webview_webkit_create_webview(WebKitWebView *web_view, + return web_view; + } + ++static void ++wxgtk_webview_webkit_counted_matches(WebKitFindController *, ++ guint match_count, ++ wxWebViewWebKit *webKitCtrl) ++{ ++ std::cerr << "BLAH counted_matches: " << match_count << std::endl; ++ webKitCtrl->m_findCount = match_count; ++} ++ ++static void ++wxgtk_webview_webkit_failed_to_find_text(WebKitFindController *, ++ wxWebViewWebKit *) ++{ ++ std::cerr << "BLAH failed_to_find_text" << std::endl; ++} ++ ++static void ++wxgtk_webview_webkit_found_text(WebKitFindController *, ++ guint match_count, ++ wxWebViewWebKit *) ++{ ++ std::cerr << "BLAH found_text: " << match_count << std::endl; ++} ++ + } // extern "C" + + //----------------------------------------------------------------------------- +@@ -464,30 +480,33 @@ bool wxWebViewWebKit::Create(wxWindow *parent, + GTKCreateScrolledWindowWith(GTK_WIDGET(m_web_view)); + g_object_ref(m_widget); + +- g_signal_connect_after(m_web_view, "navigation-policy-decision-requested", +- G_CALLBACK(wxgtk_webview_webkit_navigation), +- this); +- g_signal_connect_after(m_web_view, "load-error", +- G_CALLBACK(wxgtk_webview_webkit_error), ++ g_signal_connect_after(m_web_view, "decide-policy", ++ G_CALLBACK(wxgtk_webview_webkit_decide_policy), + this); + +- g_signal_connect_after(m_web_view, "new-window-policy-decision-requested", +- G_CALLBACK(wxgtk_webview_webkit_new_window), this); ++ g_signal_connect_after(m_web_view, "load-failed", ++ G_CALLBACK(wxgtk_webview_webkit_load_failed), this); + +- g_signal_connect_after(m_web_view, "title-changed", ++ g_signal_connect_after(m_web_view, "notify::title", + G_CALLBACK(wxgtk_webview_webkit_title_changed), this); + +- g_signal_connect_after(m_web_view, "resource-request-starting", ++ g_signal_connect_after(m_web_view, "resource-load-started", + G_CALLBACK(wxgtk_webview_webkit_resource_req), this); +- +-#if WEBKIT_CHECK_VERSION(1, 10, 0) +- g_signal_connect_after(m_web_view, "context-menu", ++ ++ g_signal_connect_after(m_web_view, "context-menu", + G_CALLBACK(wxgtk_webview_webkit_context_menu), this); +-#endif +- +- g_signal_connect_after(m_web_view, "create-web-view", ++ ++ g_signal_connect_after(m_web_view, "create", + G_CALLBACK(wxgtk_webview_webkit_create_webview), this); + ++ WebKitFindController* findctrl = webkit_web_view_get_find_controller(m_web_view); ++ g_signal_connect_after(findctrl, "counted-matches", ++ G_CALLBACK(wxgtk_webview_webkit_counted_matches), this); ++ g_signal_connect_after(findctrl, "failed-to-find-text", ++ G_CALLBACK(wxgtk_webview_webkit_failed_to_find_text), this); ++ g_signal_connect_after(findctrl, "found-text", ++ G_CALLBACK(wxgtk_webview_webkit_found_text), this); ++ + m_parent->DoAddChild( this ); + + PostCreation(size); +@@ -495,14 +514,9 @@ bool wxWebViewWebKit::Create(wxWindow *parent, + /* Open a webpage */ + webkit_web_view_load_uri(m_web_view, url.utf8_str()); + +- //Get the initial history limit so we can enable and disable it later +- WebKitWebBackForwardList* history; +- history = webkit_web_view_get_back_forward_list(m_web_view); +- m_historyLimit = webkit_web_back_forward_list_get_limit(history); +- + // last to avoid getting signal too early +- g_signal_connect_after(m_web_view, "notify::load-status", +- G_CALLBACK(wxgtk_webview_webkit_load_status), ++ g_signal_connect_after(m_web_view, "load-changed", ++ G_CALLBACK(wxgtk_webview_webkit_load_changed), + this); + + return true; +@@ -536,12 +550,12 @@ wxWebViewWebKit::GTKGetWindow(wxArrayGdkWindows& WXUNUSED(windows)) const + + void wxWebViewWebKit::ZoomIn() + { +- webkit_web_view_zoom_in(m_web_view); ++ SetWebkitZoom(GetWebkitZoom() + 0.1); + } + + void wxWebViewWebKit::ZoomOut() + { +- webkit_web_view_zoom_out(m_web_view); ++ SetWebkitZoom(GetWebkitZoom() - 0.1); + } + + void wxWebViewWebKit::SetWebkitZoom(float level) +@@ -601,39 +615,28 @@ bool wxWebViewWebKit::CanGoForward() const + + void wxWebViewWebKit::ClearHistory() + { +- WebKitWebBackForwardList* history; +- history = webkit_web_view_get_back_forward_list(m_web_view); +- webkit_web_back_forward_list_clear(history); ++ // In WebKit2GTK+, the BackForwardList can't be cleared so do nothing. + } + +-void wxWebViewWebKit::EnableHistory(bool enable) ++void wxWebViewWebKit::EnableHistory(bool) + { +- WebKitWebBackForwardList* history; +- history = webkit_web_view_get_back_forward_list(m_web_view); +- if(enable) +- { +- webkit_web_back_forward_list_set_limit(history, m_historyLimit); +- } +- else +- { +- webkit_web_back_forward_list_set_limit(history, 0); +- } ++ // In WebKit2GTK+, history can't be disabled so do nothing here. + } + + wxVector > wxWebViewWebKit::GetBackwardHistory() + { + wxVector > backhist; +- WebKitWebBackForwardList* history; ++ WebKitBackForwardList* history; + history = webkit_web_view_get_back_forward_list(m_web_view); +- GList* list = webkit_web_back_forward_list_get_back_list_with_limit(history, +- m_historyLimit); ++ GList* list = webkit_back_forward_list_get_back_list_with_limit(history, ++ m_historyLimit); + //We need to iterate in reverse to get the order we desire + for(int i = g_list_length(list) - 1; i >= 0 ; i--) + { +- WebKitWebHistoryItem* gtkitem = (WebKitWebHistoryItem*)g_list_nth_data(list, i); ++ WebKitBackForwardListItem* gtkitem = (WebKitBackForwardListItem*)g_list_nth_data(list, i); + wxWebViewHistoryItem* wxitem = new wxWebViewHistoryItem( +- webkit_web_history_item_get_uri(gtkitem), +- webkit_web_history_item_get_title(gtkitem)); ++ webkit_back_forward_list_item_get_uri(gtkitem), ++ webkit_back_forward_list_item_get_title(gtkitem)); + wxitem->m_histItem = gtkitem; + wxSharedPtr item(wxitem); + backhist.push_back(item); +@@ -644,16 +647,16 @@ wxVector > wxWebViewWebKit::GetBackwardHistory + wxVector > wxWebViewWebKit::GetForwardHistory() + { + wxVector > forwardhist; +- WebKitWebBackForwardList* history; ++ WebKitBackForwardList* history; + history = webkit_web_view_get_back_forward_list(m_web_view); +- GList* list = webkit_web_back_forward_list_get_forward_list_with_limit(history, +- m_historyLimit); ++ GList* list = webkit_back_forward_list_get_forward_list_with_limit(history, ++ m_historyLimit); + for(guint i = 0; i < g_list_length(list); i++) + { +- WebKitWebHistoryItem* gtkitem = (WebKitWebHistoryItem*)g_list_nth_data(list, i); ++ WebKitBackForwardListItem* gtkitem = (WebKitBackForwardListItem*)g_list_nth_data(list, i); + wxWebViewHistoryItem* wxitem = new wxWebViewHistoryItem( +- webkit_web_history_item_get_uri(gtkitem), +- webkit_web_history_item_get_title(gtkitem)); ++ webkit_back_forward_list_item_get_uri(gtkitem), ++ webkit_back_forward_list_item_get_title(gtkitem)); + wxitem->m_histItem = gtkitem; + wxSharedPtr item(wxitem); + forwardhist.push_back(item); +@@ -663,62 +666,72 @@ wxVector > wxWebViewWebKit::GetForwardHistory( + + void wxWebViewWebKit::LoadHistoryItem(wxSharedPtr item) + { +- WebKitWebHistoryItem* gtkitem = (WebKitWebHistoryItem*)item->m_histItem; ++ WebKitBackForwardListItem* gtkitem = (WebKitBackForwardListItem*)item->m_histItem; + if(gtkitem) + { +- webkit_web_view_go_to_back_forward_item(m_web_view, +- WEBKIT_WEB_HISTORY_ITEM(gtkitem)); ++ webkit_web_view_go_to_back_forward_list_item(m_web_view, ++ WEBKIT_BACK_FORWARD_LIST_ITEM(gtkitem)); + } + } + + bool wxWebViewWebKit::CanCut() const + { +- return webkit_web_view_can_cut_clipboard(m_web_view); ++ // Cannot be determined without making an async call, so just return true ++ return true; + } + + bool wxWebViewWebKit::CanCopy() const + { +- return webkit_web_view_can_copy_clipboard(m_web_view); ++ // Cannot be determined without making an async call, so just return true ++ return true; + } + + bool wxWebViewWebKit::CanPaste() const + { +- return webkit_web_view_can_paste_clipboard(m_web_view); ++ // Cannot be determined without making an async call, so just return true ++ return true; + } + + void wxWebViewWebKit::Cut() + { +- webkit_web_view_cut_clipboard(m_web_view); ++ webkit_web_view_execute_editing_command(m_web_view, ++ WEBKIT_EDITING_COMMAND_CUT); + } + + void wxWebViewWebKit::Copy() + { +- webkit_web_view_copy_clipboard(m_web_view); ++ webkit_web_view_execute_editing_command(m_web_view, ++ WEBKIT_EDITING_COMMAND_COPY); + } + + void wxWebViewWebKit::Paste() + { +- webkit_web_view_paste_clipboard(m_web_view); ++ webkit_web_view_execute_editing_command(m_web_view, ++ WEBKIT_EDITING_COMMAND_PASTE); + } + + bool wxWebViewWebKit::CanUndo() const + { +- return webkit_web_view_can_undo(m_web_view); ++ // Cannot be determined without making an async call, so just return true ++ return true; + } + + bool wxWebViewWebKit::CanRedo() const + { +- return webkit_web_view_can_redo(m_web_view); ++ // Cannot be determined without making an async call, so just return true ++ return true; + } + + void wxWebViewWebKit::Undo() + { +- webkit_web_view_undo(m_web_view); ++ webkit_web_view_execute_editing_command(m_web_view, ++ WEBKIT_EDITING_COMMAND_UNDO); + } + + void wxWebViewWebKit::Redo() + { +- webkit_web_view_redo(m_web_view); ++ webkit_web_view_execute_editing_command(m_web_view, ++ WEBKIT_EDITING_COMMAND_REDO); + } + + wxString wxWebViewWebKit::GetCurrentURL() const +@@ -737,6 +750,7 @@ wxString wxWebViewWebKit::GetCurrentTitle() const + + wxString wxWebViewWebKit::GetPageSource() const + { ++/* TODO: webkit_web_resource_get_data() async + WebKitWebFrame* frame = webkit_web_view_get_main_frame(m_web_view); + WebKitWebDataSource* src = webkit_web_frame_get_data_source (frame); + +@@ -744,6 +758,8 @@ wxString wxWebViewWebKit::GetPageSource() const + // const gchar* + // webkit_web_data_source_get_encoding(WebKitWebDataSource *data_source); + return wxString(webkit_web_data_source_get_data (src)->str, wxConvUTF8); ++*/ ++ return wxString(""); + } + + +@@ -811,17 +827,19 @@ void wxWebViewWebKit::SetZoom(wxWebViewZoom zoom) + + void wxWebViewWebKit::SetZoomType(wxWebViewZoomType type) + { +- webkit_web_view_set_full_content_zoom(m_web_view, +- (type == wxWEBVIEW_ZOOM_TYPE_LAYOUT ? +- TRUE : FALSE)); ++ WebKitSettings* settings = webkit_web_view_get_settings(m_web_view); ++ webkit_settings_set_zoom_text_only(settings, ++ (type == wxWEBVIEW_ZOOM_TYPE_TEXT ? ++ TRUE : FALSE)); + } + + wxWebViewZoomType wxWebViewWebKit::GetZoomType() const + { +- gboolean fczoom = webkit_web_view_get_full_content_zoom(m_web_view); ++ WebKitSettings* settings = webkit_web_view_get_settings(m_web_view); ++ gboolean tozoom = webkit_settings_get_zoom_text_only(settings); + +- if (fczoom) return wxWEBVIEW_ZOOM_TYPE_LAYOUT; +- else return wxWEBVIEW_ZOOM_TYPE_TEXT; ++ if (tozoom) return wxWEBVIEW_ZOOM_TYPE_TEXT; ++ else return wxWEBVIEW_ZOOM_TYPE_LAYOUT; + } + + bool wxWebViewWebKit::CanSetZoomType(wxWebViewZoomType) const +@@ -832,24 +850,16 @@ bool wxWebViewWebKit::CanSetZoomType(wxWebViewZoomType) const + + void wxWebViewWebKit::DoSetPage(const wxString& html, const wxString& baseUri) + { +- webkit_web_view_load_string (m_web_view, +- html.mb_str(wxConvUTF8), +- "text/html", +- "UTF-8", +- baseUri.mb_str(wxConvUTF8)); ++ webkit_web_view_load_html(m_web_view, ++ html.mb_str(wxConvUTF8), ++ baseUri.mb_str(wxConvUTF8)); + } + + void wxWebViewWebKit::Print() + { +- WebKitWebFrame* frame = webkit_web_view_get_main_frame(m_web_view); +- webkit_web_frame_print (frame); +- +- // GtkPrintOperationResult webkit_web_frame_print_full +- // (WebKitWebFrame *frame, +- // GtkPrintOperation *operation, +- // GtkPrintOperationAction action, +- // GError **error); +- ++ WebKitPrintOperation* printop = webkit_print_operation_new(m_web_view); ++ webkit_print_operation_run_dialog(printop, NULL); ++ g_object_unref(printop); + } + + +@@ -886,26 +896,35 @@ void wxWebViewWebKit::SetEditable(bool enable) + + bool wxWebViewWebKit::IsEditable() const + { +- return webkit_web_view_get_editable(m_web_view); ++ gboolean editable; ++ g_object_get(m_web_view, "editable", &editable, NULL); ++ return editable; + } + + void wxWebViewWebKit::DeleteSelection() + { ++/* TODO + webkit_web_view_delete_selection(m_web_view); ++*/ + } + + bool wxWebViewWebKit::HasSelection() const + { ++/* TODO + return webkit_web_view_has_selection(m_web_view); ++*/ ++ return false; + } + + void wxWebViewWebKit::SelectAll() + { +- webkit_web_view_select_all(m_web_view); ++ webkit_web_view_execute_editing_command(m_web_view, ++ WEBKIT_EDITING_COMMAND_SELECT_ALL); + } + + wxString wxWebViewWebKit::GetSelectedText() const + { ++/* TODO: what to do about this? + WebKitDOMDocument* doc; + WebKitDOMDOMWindow* win; + WebKitDOMDOMSelection* sel; +@@ -918,10 +937,13 @@ wxString wxWebViewWebKit::GetSelectedText() const + 0, NULL); + return wxString(webkit_dom_range_get_text(WEBKIT_DOM_RANGE(range)), + wxConvUTF8); ++*/ ++ return wxString(""); + } + + wxString wxWebViewWebKit::GetSelectedSource() const + { ++/* TODO: what to do? + WebKitDOMDocument* doc; + WebKitDOMDOMWindow* win; + WebKitDOMDOMSelection* sel; +@@ -943,10 +965,13 @@ wxString wxWebViewWebKit::GetSelectedSource() const + + return wxString(webkit_dom_html_element_get_inner_html(WEBKIT_DOM_HTML_ELEMENT(html)), + wxConvUTF8); ++*/ ++ return wxString(""); + } + + void wxWebViewWebKit::ClearSelection() + { ++/* TODO: ??? + WebKitDOMDocument* doc; + WebKitDOMDOMWindow* win; + WebKitDOMDOMSelection* sel; +@@ -956,10 +981,12 @@ void wxWebViewWebKit::ClearSelection() + sel = webkit_dom_dom_window_get_selection(WEBKIT_DOM_DOM_WINDOW(win)); + webkit_dom_dom_selection_remove_all_ranges(WEBKIT_DOM_DOM_SELECTION(sel)); + ++*/ + } + + wxString wxWebViewWebKit::GetPageText() const + { ++/* TODO + WebKitDOMDocument* doc; + WebKitDOMHTMLElement* body; + +@@ -967,12 +994,17 @@ wxString wxWebViewWebKit::GetPageText() const + body = webkit_dom_document_get_body(WEBKIT_DOM_DOCUMENT(doc)); + return wxString(webkit_dom_html_element_get_inner_text(WEBKIT_DOM_HTML_ELEMENT(body)), + wxConvUTF8); ++*/ ++ return wxString(""); + } + + void wxWebViewWebKit::RunScript(const wxString& javascript) + { +- webkit_web_view_execute_script(m_web_view, +- javascript.mb_str(wxConvUTF8)); ++ webkit_web_view_run_javascript(m_web_view, ++ javascript.mb_str(wxConvUTF8), ++ NULL, ++ NULL, ++ NULL); + } + + void wxWebViewWebKit::RegisterHandler(wxSharedPtr handler) +@@ -991,14 +1023,15 @@ void wxWebViewWebKit::EnableContextMenu(bool enable) + + long wxWebViewWebKit::Find(const wxString& text, int flags) + { ++ WebKitFindController* findctrl = webkit_web_view_get_find_controller(m_web_view); + bool newSearch = false; + if(text != m_findText || + (flags & wxWEBVIEW_FIND_MATCH_CASE) != (m_findFlags & wxWEBVIEW_FIND_MATCH_CASE)) + { + newSearch = true; + //If it is a new search we need to clear existing highlights +- webkit_web_view_unmark_text_matches(m_web_view); +- webkit_web_view_set_highlight_text_matches(m_web_view, false); ++ //webkit_web_view_unmark_text_matches(m_web_view); ++ //webkit_web_view_set_highlight_text_matches(m_web_view, false); + } + + m_findFlags = flags; +@@ -1007,27 +1040,53 @@ long wxWebViewWebKit::Find(const wxString& text, int flags) + //If the search string is empty then we clear any selection and highlight + if(text == "") + { +- webkit_web_view_unmark_text_matches(m_web_view); +- webkit_web_view_set_highlight_text_matches(m_web_view, false); +- ClearSelection(); ++ webkit_find_controller_search_finish(findctrl); + return wxNOT_FOUND; + } + + bool wrap = false, matchCase = false, forward = true; ++ guint32 options = WEBKIT_FIND_OPTIONS_NONE; + if(flags & wxWEBVIEW_FIND_WRAP) ++ { + wrap = true; ++ options |= WEBKIT_FIND_OPTIONS_WRAP_AROUND; ++ } + if(flags & wxWEBVIEW_FIND_MATCH_CASE) ++ { + matchCase = true; ++ } ++ else ++ { ++ options |= WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE; ++ } + if(flags & wxWEBVIEW_FIND_BACKWARDS) ++ { + forward = false; ++ options |= WEBKIT_FIND_OPTIONS_BACKWARDS; ++ } + + if(newSearch) + { +- //Initially we mark the matches to know how many we have +- m_findCount = webkit_web_view_mark_text_matches(m_web_view, wxGTK_CONV(text), matchCase, 0); ++ ////Initially we mark the matches to know how many we have ++ //m_findCount = webkit_web_view_mark_text_matches(m_web_view, wxGTK_CONV(text), matchCase, 0); + //In this case we return early to match IE behaviour + m_findPosition = -1; +- return m_findCount; ++ //return m_findCount; ++ if(flags & wxWEBVIEW_FIND_HIGHLIGHT_RESULT) ++ { ++ webkit_find_controller_search(findctrl, ++ wxGTK_CONV(text), ++ options, ++ G_MAXUINT); ++ } ++ else ++ { ++ webkit_find_controller_count_matches(findctrl, ++ wxGTK_CONV(text), ++ options, ++ G_MAXUINT); ++ } ++ return G_MAXUINT; + } + else + { +@@ -1041,17 +1100,36 @@ long wxWebViewWebKit::Find(const wxString& text, int flags) + m_findPosition -= m_findCount; + } + +- //Highlight them if needed +- bool highlight = flags & wxWEBVIEW_FIND_HIGHLIGHT_RESULT ? true : false; +- webkit_web_view_set_highlight_text_matches(m_web_view, highlight); +- +- if(!webkit_web_view_search_text(m_web_view, wxGTK_CONV(text), matchCase, forward, wrap)) ++ if(forward) + { +- m_findPosition = -1; +- ClearSelection(); +- return wxNOT_FOUND; ++ webkit_find_controller_search_next(findctrl); ++ if(m_findPosition == m_findCount && !wrap) ++ { ++ return wxNOT_FOUND; ++ } + } +- wxLogMessage(wxString::Format("Returning %d", m_findPosition)); ++ else ++ { ++ webkit_find_controller_search_previous(findctrl); ++ if(m_findPosition == -1 && !wrap) ++ { ++ return wxNOT_FOUND; ++ } ++ } ++ ++ //Highlight them if needed ++ //bool highlight = flags & wxWEBVIEW_FIND_HIGHLIGHT_RESULT ? true : false; ++ //webkit_web_view_set_highlight_text_matches(m_web_view, highlight); ++ ++ //if(!webkit_web_view_search_text(m_web_view, wxGTK_CONV(text), matchCase, forward, wrap)) ++ //{ ++ // m_findPosition = -1; ++ // ClearSelection(); ++ // return wxNOT_FOUND; ++ //} ++ ++ ++ + return newSearch ? m_findCount : m_findPosition; + } + +@@ -1070,5 +1148,4 @@ wxWebViewWebKit::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) + return GetDefaultAttributesFromGTKWidget(webkit_web_view_new()); + } + +- + #endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT +-- +2.9.3 + diff --git a/wxGTK3.spec b/wxGTK3.spec index e72ee5e..fef3bfe 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -20,7 +20,7 @@ Name: %{wxgtkname} Version: 3.0.3 -Release: 0.5%{?usesnapshot:.git%{shortcommit0}}%{?dist} +Release: 0.6%{?usesnapshot:.git%{shortcommit0}}%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -41,12 +41,18 @@ Source10: wx-config Patch0: %{name}-%{version}-abicheck.patch # Switch to use GStreamer 1.0 - patch is from Debian Patch1: %{name}-%{version}-gst1.0.patch +# Temporary patch to port to webkit2gtk +%if 0%{?fedora} > 26 +Patch2: %{name}-%{version}-webkit2.patch +%endif BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported %if %{gtkver} == 3 %if 0%{?fedora} < 27 BuildRequires: webkitgtk3-devel +%else +BuildRequires: webkitgtk4-devel %endif %endif BuildRequires: zlib-devel @@ -81,7 +87,7 @@ Summary: Development files for the wxGTK3 library Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}-gl = %{version}-%{release} Requires: %{name}-media = %{version}-%{release} -%if 0%{?fedora} == 26 +%if 0%{?fedora} > 25 Requires: %{name}-webview = %{version}-%{release} %endif Requires: %{wxbasename} = %{version}-%{release} @@ -125,7 +131,7 @@ comprehensive set of helper classes for most common application tasks, ranging from networking to HTML display and image manipulation. -%if 0%{?fedora} == 26 +%if 0%{?fedora} > 25 %package webview Summary: WebView add-on for the wxWidgets library Group: System Environment/Libraries @@ -280,7 +286,7 @@ popd %post media -p /sbin/ldconfig %postun media -p /sbin/ldconfig -%if 0%{?fedora} == 26 +%if 0%{?fedora} > 25 %post webview -p /sbin/ldconfig %postun webview -p /sbin/ldconfig %endif @@ -343,7 +349,7 @@ fi %files media %{_libdir}/libwx_gtk%{gtkver}u_media-*.so.* -%if 0%{?fedora} == 26 +%if 0%{?fedora} > 25 %files webview %{_libdir}/libwx_gtk%{gtkver}u_webview-*.so.* %endif @@ -362,6 +368,9 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Sun Mar 05 2017 Scott Talbert - 3.0.3-0.6.gitf90b768 +- Add temporary patch for webkit2 port in rawhide, re-enable webview subpackage + * Thu Mar 02 2017 Jeremy Newton - 3.0.3-0.5.gitf90b768 - Disable webview subpackage in rawhide for now From a692ac1de988a75d4a8d5d07bb3b8fb3b808fece Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Tue, 7 Mar 2017 20:56:01 -0500 Subject: [PATCH 63/94] Update to newer git snapshot Remove GStreamer patch as it has been incorporated upstream --- .gitignore | 1 + sources | 2 +- wxGTK3-3.0.3-gst1.0.patch | 886 -------------------------------------- wxGTK3.spec | 12 +- 4 files changed, 9 insertions(+), 892 deletions(-) delete mode 100644 wxGTK3-3.0.3-gst1.0.patch diff --git a/.gitignore b/.gitignore index cc2fdb8..c41c337 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /wxWidgets-3.0.2.tar.bz2 /wxWidgets-9518d52.tar.gz /wxWidgets-f90b768.tar.gz +/wxWidgets-e4293e9.tar.gz diff --git a/sources b/sources index 21b95b5..3ad3f74 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wxWidgets-f90b768.tar.gz) = d6207bfe85d00130ac46a08c06a245fd2cd5c7a51c2d1098284e9c10f4d075bad8925d67871a15bd66ae79519b95c7d16da5145b0ab00be1ca3b953bf86a43ae +SHA512 (wxWidgets-e4293e9.tar.gz) = 30206398dfa6687ca9092fbf372a794cd739a063065a8574ce65494d6bb059b93454d9e79a8e1e552872b16fd025d192b9455b618c9a40e64a816e0c9821499e diff --git a/wxGTK3-3.0.3-gst1.0.patch b/wxGTK3-3.0.3-gst1.0.patch deleted file mode 100644 index 63f793a..0000000 --- a/wxGTK3-3.0.3-gst1.0.patch +++ /dev/null @@ -1,886 +0,0 @@ -Index: wxwidgets3.0-3.0.2+dfsg/configure.in -=================================================================== ---- wxwidgets3.0-3.0.2+dfsg.orig/configure.in -+++ wxwidgets3.0-3.0.2+dfsg/configure.in -@@ -7543,43 +7543,22 @@ if test "$wxUSE_MEDIACTRL" = "yes" -o "$ - wxUSE_GSTREAMER="no" - - dnl ------------------------------------------------------------------- -- dnl Test for at least 0.8 gstreamer module from pkg-config -- dnl Even totem doesn't accept 0.9 evidently. -- dnl -- dnl So, we first check to see if 0.10 if available - if not we -- dnl try the older 0.8 version -+ dnl Test for at least gstreamer 1.0 module from pkg-config - dnl ------------------------------------------------------------------- -- GST_VERSION_MAJOR=0 -- GST_VERSION_MINOR=10 -+ GST_VERSION_MAJOR=1 -+ GST_VERSION_MINOR=0 - GST_VERSION=$GST_VERSION_MAJOR.$GST_VERSION_MINOR - -- if test "$wxUSE_GSTREAMER8" = "no"; then -- PKG_CHECK_MODULES(GST, -- [gstreamer-$GST_VERSION gstreamer-plugins-base-$GST_VERSION], -- [ -- wxUSE_GSTREAMER="yes" -- GST_LIBS="$GST_LIBS -lgstinterfaces-$GST_VERSION" -- ], -- [ -- AC_MSG_WARN([GStreamer 0.10 not available, falling back to 0.8]) -- GST_VERSION_MINOR=8 -- ] -- ) -- else -- dnl check only for 0.8 -- GST_VERSION_MINOR=8 -- fi -- -- if test $GST_VERSION_MINOR = "8"; then -- GST_VERSION=$GST_VERSION_MAJOR.$GST_VERSION_MINOR -- PKG_CHECK_MODULES(GST, -- [gstreamer-$GST_VERSION gstreamer-interfaces-$GST_VERSION gstreamer-gconf-$GST_VERSION], -- wxUSE_GSTREAMER="yes", -- [ -- AC_MSG_WARN([GStreamer 0.8/0.10 not available.]) -- ]) -- fi -- -+ PKG_CHECK_MODULES(GST, -+ [gstreamer-$GST_VERSION gstreamer-plugins-base-$GST_VERSION], -+ [ -+ wxUSE_GSTREAMER="yes" -+ GST_LIBS="$GST_LIBS -lgstvideo-$GST_VERSION" -+ ], -+ [ -+ AC_MSG_WARN([GStreamer 1.0 not available]) -+ ] -+ ) - - if test "$wxUSE_GSTREAMER" = "yes"; then - CPPFLAGS="$GST_CFLAGS $CPPFLAGS" -Index: wxwidgets3.0-3.0.2+dfsg/src/unix/mediactrl.cpp -=================================================================== ---- wxwidgets3.0-3.0.2+dfsg.orig/src/unix/mediactrl.cpp -+++ wxwidgets3.0-3.0.2+dfsg/src/unix/mediactrl.cpp -@@ -19,13 +19,7 @@ - - #include // main gstreamer header - --// xoverlay/video stuff, gst-gconf for 0.8 --#if GST_VERSION_MAJOR > 0 || GST_VERSION_MINOR >= 10 --# include --#else --# include --# include // gstreamer glib configuration --#endif -+#include - - #ifndef WX_PRECOMP - #include "wx/log.h" // wxLogDebug/wxLogSysError/wxLogTrace -@@ -48,11 +42,11 @@ - //----------------------------------------------------------------------------- - - /* -- This is the GStreamer backend for unix. Currently we require 0.8 or -- 0.10. Here we use the "playbin" GstElement for ease of use. -+ This is the GStreamer backend for unix. Currently we require 1.0. -+ Here we use the "playbin" GstElement for ease of use. - -- Note that now we compare state change functions to GST_STATE_FAILURE -- now rather than GST_STATE_SUCCESS as newer gstreamer versions return -+ Note that now we compare state change functions to GST_STATE_CHANGE_FAILURE -+ now rather than GST_STATE_CHANGE_SUCCESS as newer gstreamer versions return - non-success values for returns that are otherwise successful but not - immediate. - -@@ -60,11 +54,8 @@ - moment but with a tad bit of work it could theorectically work in - straight wxX11 et al. - -- One last note is that resuming from pausing/seeking can result -- in erratic video playback (GStreamer-based bug, happens in totem as well) -- - this is better in 0.10, however. One thing that might make it worse -- here is that we don't preserve the aspect ratio of the video and stretch -- it to the whole window. -+ One last note is that we don't preserve the aspect ratio of the video and -+ stretch it to the whole window. - - Note that there are some things used here that could be undocumented - - for reference see the media player Kiss and Totem as well as some -@@ -72,12 +63,10 @@ - that attempted thread-safety... - - Then there is the issue of m_asynclock. This serves several purposes: -- 1) It prevents the C callbacks from sending wx state change events -- so that we don't get duplicate ones in 0.8 -- 2) It makes the sync and async handlers in 0.10 not drop any -+ 1) It makes the sync and async handlers not drop any - messages so that while we are polling it we get the messages in - SyncStateChange instead of the queue. -- 3) Keeps the pausing in Stop() synchronous -+ 2) Keeps the pausing in Stop() synchronous - - RN: Note that I've tried to follow the wxGTK conventions here as close - as possible. In the implementation the C Callbacks come first, then -@@ -90,43 +79,9 @@ - //============================================================================= - - //----------------------------------------------------------------------------- --// GStreamer (most version compatibility) macros -+// GStreamer macros - //----------------------------------------------------------------------------- - --// In 0.9 there was a HUGE change to GstQuery and the --// gst_element_query function changed dramatically and split off --// into two separate ones --#if GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR <= 8 --# define wxGst_element_query_duration(e, f, p) \ -- gst_element_query(e, GST_QUERY_TOTAL, f, p) --# define wxGst_element_query_position(e, f, p) \ -- gst_element_query(e, GST_QUERY_POSITION, f, p) --#elif GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR == 9 --// However, the actual 0.9 version has a slightly different definition --// and instead of gst_element_query_duration it has two parameters to --// gst_element_query_position instead --# define wxGst_element_query_duration(e, f, p) \ -- gst_element_query_position(e, f, 0, p) --# define wxGst_element_query_position(e, f, p) \ -- gst_element_query_position(e, f, p, 0) --#else --# define wxGst_element_query_duration \ -- gst_element_query_duration --# define wxGst_element_query_position \ -- gst_element_query_position --#endif -- --// Other 0.10 macros --#if GST_VERSION_MAJOR > 0 || GST_VERSION_MINOR >= 10 --# define GST_STATE_FAILURE GST_STATE_CHANGE_FAILURE --# define GST_STATE_SUCCESS GST_STATE_CHANGE_SUCCESS --# define GstElementState GstState --# define gst_gconf_get_default_video_sink() \ -- gst_element_factory_make ("gconfvideosink", "video-sink"); --# define gst_gconf_get_default_audio_sink() \ -- gst_element_factory_make ("gconfaudiosink", "audio-sink"); --#endif -- - // Max wait time for element state waiting - GST_CLOCK_TIME_NONE for inf - #define wxGSTREAMER_TIMEOUT (100 * GST_MSECOND) // Max 100 milliseconds - -@@ -189,11 +144,11 @@ public: - bool CheckForErrors(); - bool DoLoad(const wxString& locstring); - wxMediaCtrl* GetControl() { return m_ctrl; } // for C Callbacks -- void HandleStateChange(GstElementState oldstate, GstElementState newstate); -+ void HandleStateChange(GstState oldstate, GstState newstate); - bool QueryVideoSizeFromElement(GstElement* element); - bool QueryVideoSizeFromPad(GstPad* caps); -- void SetupXOverlay(); -- bool SyncStateChange(GstElement* element, GstElementState state, -+ void SetupVideoOverlay(); -+ bool SyncStateChange(GstElement* element, GstState state, - gint64 llTimeout = wxGSTREAMER_TIMEOUT); - bool TryAudioSink(GstElement* audiosink); - bool TryVideoSink(GstElement* videosink); -@@ -203,7 +158,7 @@ public: - double m_dRate; // Current playback rate - - // see GetPlaybackRate for notes - wxLongLong m_llPausedPos; // Paused position - see Pause() -- GstXOverlay* m_xoverlay; // X Overlay that contains the GST video -+ GstVideoOverlay* m_videooverlay; // Video Overlay that contains the GST video - wxMutex m_asynclock; // See "discussion of internals" - class wxGStreamerMediaEventHandler* m_eventHandler; // see below - -@@ -284,7 +239,7 @@ expose_event(GtkWidget* widget, GdkEvent - { - // I've seen this recommended somewhere... - // TODO: Is this needed? Maybe it is just cruft... -- // gst_x_overlay_set_xwindow_id( GST_X_OVERLAY(be->m_xoverlay), -+ // gst_video_overlay_set_window_handle( GST_VIDEO_OVERLAY(be->m_videooverlay), - // GDK_WINDOW_XWINDOW( window ) ); - - // If we have actual video..... -@@ -294,7 +249,7 @@ expose_event(GtkWidget* widget, GdkEvent - // GST Doesn't redraw automatically while paused - // Plus, the video sometimes doesn't redraw when it looses focus - // or is painted over so we just tell it to redraw... -- gst_x_overlay_expose(be->m_xoverlay); -+ gst_video_overlay_expose(be->m_videooverlay); - } - else - { -@@ -334,7 +289,7 @@ static gint gtk_window_realize_callback( - GdkWindow* window = gtk_widget_get_window(widget); - wxASSERT(window); - -- gst_x_overlay_set_xwindow_id( GST_X_OVERLAY(be->m_xoverlay), -+ gst_video_overlay_set_window_handle( GST_VIDEO_OVERLAY(be->m_videooverlay), - GDK_WINDOW_XID(window) - ); - GtkWidget* w = be->GetControl()->m_wxwindow; -@@ -349,30 +304,6 @@ static gint gtk_window_realize_callback( - #endif // wxGTK - - //----------------------------------------------------------------------------- --// "state-change" from m_playbin/GST_MESSAGE_STATE_CHANGE --// --// Called by gstreamer when the state changes - here we --// send the appropriate corresponding wx event. --// --// 0.8 only as HandleStateChange does this in both versions --//----------------------------------------------------------------------------- --#if GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR < 10 --extern "C" { --static void gst_state_change_callback(GstElement *play, -- GstElementState oldstate, -- GstElementState newstate, -- wxGStreamerMediaBackend* be) --{ -- if(be->m_asynclock.TryLock() == wxMUTEX_NO_ERROR) -- { -- be->HandleStateChange(oldstate, newstate); -- be->m_asynclock.Unlock(); -- } --} --} --#endif // <0.10 -- --//----------------------------------------------------------------------------- - // "eos" from m_playbin/GST_MESSAGE_EOS - // - // Called by gstreamer when the media is done playing ("end of stream") -@@ -425,69 +356,17 @@ static void gst_notify_caps_callback(Gst - } - - //----------------------------------------------------------------------------- --// "notify::stream-info" from m_playbin --// --// Run through the stuff in "stream-info" of m_playbin for a valid --// video pad, and then attempt to query the video size from it - if not --// set up an event to do so when ready. --// --// Currently unused - now we just query it directly using --// QueryVideoSizeFromElement. --// --// (Undocumented?) --//----------------------------------------------------------------------------- --#if GST_VERSION_MAJOR > 0 || GST_VERSION_MINOR >= 10 --extern "C" { --static void gst_notify_stream_info_callback(GstElement* WXUNUSED(element), -- GParamSpec* WXUNUSED(pspec), -- wxGStreamerMediaBackend* be) --{ -- wxLogTrace(wxTRACE_GStreamer, wxT("gst_notify_stream_info_callback")); -- be->QueryVideoSizeFromElement(be->m_playbin); --} --} --#endif -- --//----------------------------------------------------------------------------- --// "desired-size-changed" from m_xoverlay --// --// 0.8-specific this provides us with the video size when it changes - --// even though we get the caps as well this seems to come before the --// caps notification does... --// --// Note it will return 16,16 for an early-bird value or for audio --//----------------------------------------------------------------------------- --#if GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR < 10 --extern "C" { --static void gst_desired_size_changed_callback(GstElement * play, -- guint width, guint height, -- wxGStreamerMediaBackend* be) --{ -- if(!(width == 16 && height == 16)) -- { -- be->m_videoSize.x = width; -- be->m_videoSize.y = height; -- } -- else -- be->QueryVideoSizeFromElement(be->m_playbin); --} --} --#endif -- --//----------------------------------------------------------------------------- - // gst_bus_async_callback [static] - // gst_bus_sync_callback [static] - // --// Called by m_playbin for notifications such as end-of-stream in 0.10 - --// in previous versions g_signal notifications were used. Because everything -+// Called by m_playbin for notifications such as end-of-stream. Because everything - // in centered in one switch statement though it reminds one of old WinAPI - // stuff. - // - // gst_bus_sync_callback is that sync version that is called on the main GUI - // thread before the async version that we use to set the xwindow id of the --// XOverlay (NB: This isn't currently used - see CreateControl()). -+// VideoOverlay (NB: This isn't currently used - see CreateControl()). - //----------------------------------------------------------------------------- --#if GST_VERSION_MAJOR > 0 || GST_VERSION_MINOR >= 10 - extern "C" { - static gboolean gst_bus_async_callback(GstBus* WXUNUSED(bus), - GstMessage* message, -@@ -537,8 +416,7 @@ static GstBusSyncReply gst_bus_sync_call - { - // Pass a non-xwindowid-setting event on to the async handler where it - // belongs -- if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT || -- !gst_structure_has_name (message->structure, "prepare-xwindow-id")) -+ if (!gst_is_video_overlay_prepare_window_handle_message (message)) - { - // - // NB: Unfortunately, the async callback can be quite -@@ -552,12 +430,11 @@ static GstBusSyncReply gst_bus_sync_call - return GST_BUS_DROP; - } - -- wxLogTrace(wxTRACE_GStreamer, wxT("Got prepare-xwindow-id")); -- be->SetupXOverlay(); -+ wxLogTrace(wxTRACE_GStreamer, wxT("Got prepare-window-handle")); -+ be->SetupVideoOverlay(); - return GST_BUS_DROP; // We handled this message - drop from the queue - } - } --#endif - - //----------------------------------------------------------------------------- - // -@@ -569,11 +446,11 @@ static GstBusSyncReply gst_bus_sync_call - // wxGStreamerMediaBackend::HandleStateChange - // - // Handles a state change event from our C Callback for "state-change" or --// the async queue in 0.10. (Mostly this is here to avoid locking the -+// the async queue . (Mostly this is here to avoid locking the - // the mutex twice...) - //----------------------------------------------------------------------------- --void wxGStreamerMediaBackend::HandleStateChange(GstElementState oldstate, -- GstElementState newstate) -+void wxGStreamerMediaBackend::HandleStateChange(GstState oldstate, -+ GstState newstate) - { - switch(newstate) - { -@@ -604,83 +481,13 @@ void wxGStreamerMediaBackend::HandleStat - } - - //----------------------------------------------------------------------------- --// wxGStreamerMediaBackend::QueryVideoSizeFromElement --// --// Run through the stuff in "stream-info" of element for a valid --// video pad, and then attempt to query the video size from it - if not --// set up an event to do so when ready. Return true --// if we got a valid video pad. --//----------------------------------------------------------------------------- --bool wxGStreamerMediaBackend::QueryVideoSizeFromElement(GstElement* element) --{ -- const GList *list = NULL; -- g_object_get (G_OBJECT (element), "stream-info", &list, NULL); -- -- for ( ; list != NULL; list = list->next) -- { -- GObject *info = (GObject *) list->data; -- gint type; -- GParamSpec *pspec; -- GEnumValue *val; -- GstPad *pad = NULL; -- -- g_object_get (info, "type", &type, NULL); -- pspec = g_object_class_find_property ( -- G_OBJECT_GET_CLASS (info), "type"); -- val = g_enum_get_value (G_PARAM_SPEC_ENUM (pspec)->enum_class, type); -- -- if (!strncasecmp(val->value_name, "video", 5) || -- !strncmp(val->value_name, "GST_STREAM_TYPE_VIDEO", 21)) -- { -- // Newer gstreamer 0.8+ plugins are SUPPOSED to have "object"... -- // but a lot of old plugins still use "pad" :) -- pspec = g_object_class_find_property ( -- G_OBJECT_GET_CLASS (info), "object"); -- -- if (!pspec) -- g_object_get (info, "pad", &pad, NULL); -- else -- g_object_get (info, "object", &pad, NULL); -- --#if GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR <= 8 -- // Killed in 0.9, presumely because events and such -- // should be pushed on pads regardless of whether they -- // are currently linked -- pad = (GstPad *) GST_PAD_REALIZE (pad); -- wxASSERT(pad); --#endif -- -- if(!QueryVideoSizeFromPad(pad)) -- { -- // wait for those caps to get ready -- g_signal_connect( -- pad, -- "notify::caps", -- G_CALLBACK(gst_notify_caps_callback), -- this); -- } -- break; -- }// end if video -- }// end searching through info list -- -- // no video (or extremely delayed stream-info) -- if(list == NULL) -- { -- m_videoSize = wxSize(0,0); -- return false; -- } -- -- return true; --} -- --//----------------------------------------------------------------------------- - // wxGStreamerMediaBackend::QueryVideoSizeFromPad - // - // Gets the size of our video (in wxSize) from a GstPad - //----------------------------------------------------------------------------- - bool wxGStreamerMediaBackend::QueryVideoSizeFromPad(GstPad* pad) - { -- const GstCaps* caps = GST_PAD_CAPS(pad); -+ GstCaps* caps = gst_pad_get_current_caps(pad); - if ( caps ) - { - const GstStructure *s = gst_caps_get_structure (caps, 0); -@@ -706,23 +513,26 @@ bool wxGStreamerMediaBackend::QueryVideo - m_videoSize.y = (int) ((float) den * m_videoSize.y / num); - } - -- wxLogTrace(wxTRACE_GStreamer, wxT("Adjusted video size: [%i,%i]"), -- m_videoSize.x, m_videoSize.y); -+ wxLogTrace(wxTRACE_GStreamer, wxT("Adjusted video size: [%i,%i]"), -+ m_videoSize.x, m_videoSize.y); -+ -+ gst_caps_unref (caps); - return true; - } // end if caps - -+ m_videoSize = wxSize(0,0); - return false; // not ready/massive failure - } - - //----------------------------------------------------------------------------- --// wxGStreamerMediaBackend::SetupXOverlay -+// wxGStreamerMediaBackend::SetupVideoOverlay - // --// Attempts to set the XWindow id of our GstXOverlay to tell it which -+// Attempts to set the XWindow id of our GstVideoOverlay to tell it which - // window to play video in. - //----------------------------------------------------------------------------- --void wxGStreamerMediaBackend::SetupXOverlay() -+void wxGStreamerMediaBackend::SetupVideoOverlay() - { -- // Use the xoverlay extension to tell gstreamer to play in our window -+ // Use the videooverlay extension to tell gstreamer to play in our window - #ifdef __WXGTK__ - if (!gtk_widget_get_realized(m_ctrl->m_wxwindow)) - { -@@ -739,7 +549,7 @@ void wxGStreamerMediaBackend::SetupXOver - GdkWindow* window = gtk_widget_get_window(m_ctrl->m_wxwindow); - wxASSERT(window); - #endif -- gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(m_xoverlay), -+ gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(m_videooverlay), - #ifdef __WXGTK__ - GDK_WINDOW_XID(window) - #else -@@ -769,9 +579,8 @@ void wxGStreamerMediaBackend::SetupXOver - // - // PRECONDITION: Assumes m_asynclock is Lock()ed - //----------------------------------------------------------------------------- --#if GST_VERSION_MAJOR > 0 || GST_VERSION_MINOR >= 10 - bool wxGStreamerMediaBackend::SyncStateChange(GstElement* element, -- GstElementState desiredstate, -+ GstState desiredstate, - gint64 llTimeout) - { - GstBus* bus = gst_element_get_bus(element); -@@ -844,23 +653,6 @@ bool wxGStreamerMediaBackend::SyncStateC - - return bSuccess; - } --#else // 0.8 implementation --bool wxGStreamerMediaBackend::SyncStateChange(GstElement* element, -- GstElementState desiredstate, -- gint64 llTimeout) --{ -- gint64 llTimeWaited = 0; -- while(GST_STATE(element) != desiredstate) -- { -- if(llTimeWaited >= llTimeout) -- break; -- llTimeWaited += 10*GST_MSECOND; -- wxMilliSleep(10); -- } -- -- return llTimeWaited != llTimeout; --} --#endif - - //----------------------------------------------------------------------------- - // wxGStreamerMediaBackend::TryAudioSink -@@ -884,25 +676,25 @@ bool wxGStreamerMediaBackend::TryAudioSi - - bool wxGStreamerMediaBackend::TryVideoSink(GstElement* videosink) - { -- // Check if the video sink either is an xoverlay or might contain one... -- if( !GST_IS_BIN(videosink) && !GST_IS_X_OVERLAY(videosink) ) -+ // Check if the video sink either is an videooverlay or might contain one... -+ if( !GST_IS_BIN(videosink) && !GST_IS_VIDEO_OVERLAY(videosink) ) - { - if(G_IS_OBJECT(videosink)) - g_object_unref(videosink); - return false; - } - -- // Make our video sink and make sure it supports the x overlay interface -- // the x overlay enables us to put the video in our control window -+ // Make our video sink and make sure it supports the video overlay interface -+ // the video overlay enables us to put the video in our control window - // (i.e. we NEED it!) - also connect to the natural video size change event - if( GST_IS_BIN(videosink) ) -- m_xoverlay = (GstXOverlay*) -+ m_videooverlay = (GstVideoOverlay*) - gst_bin_get_by_interface (GST_BIN (videosink), -- GST_TYPE_X_OVERLAY); -+ GST_TYPE_VIDEO_OVERLAY); - else -- m_xoverlay = (GstXOverlay*) videosink; -+ m_videooverlay = (GstVideoOverlay*) videosink; - -- if ( !GST_IS_X_OVERLAY(m_xoverlay) ) -+ if ( !GST_IS_VIDEO_OVERLAY(m_videooverlay) ) - { - g_object_unref(videosink); - return false; -@@ -1046,11 +838,7 @@ bool wxGStreamerMediaBackend::CreateCont - //Really init gstreamer - gboolean bInited; - GError* error = NULL; --#if GST_VERSION_MAJOR > 0 || GST_VERSION_MINOR >= 10 - bInited = gst_init_check(&argcGST, &argvGST, &error); --#else -- bInited = gst_init_check(&argcGST, &argvGST); --#endif - - // Cleanup arguments for unicode case - #if wxUSE_UNICODE -@@ -1117,78 +905,52 @@ bool wxGStreamerMediaBackend::CreateCont - return false; - } - --#if GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR < 10 -- // Connect the glib events/callbacks we want to our playbin -- g_signal_connect(m_playbin, "eos", -- G_CALLBACK(gst_finish_callback), this); -- g_signal_connect(m_playbin, "error", -- G_CALLBACK(gst_error_callback), this); -- g_signal_connect(m_playbin, "state-change", -- G_CALLBACK(gst_state_change_callback), this); --#else -- // GStreamer 0.10+ uses GstBus for this now, connect to the sync -- // handler as well so we can set the X window id of our xoverlay -+ // GStreamer uses GstBus for this now, connect to the sync -+ // handler as well so we can set the video window id of our videooverlay - gst_bus_add_watch (gst_element_get_bus(m_playbin), - (GstBusFunc) gst_bus_async_callback, this); - gst_bus_set_sync_handler(gst_element_get_bus(m_playbin), -- (GstBusSyncHandler) gst_bus_sync_callback, this); -- g_signal_connect(m_playbin, "notify::stream-info", -- G_CALLBACK(gst_notify_stream_info_callback), this); --#endif -+ (GstBusSyncHandler) gst_bus_sync_callback, this, NULL); - - // Get the audio sink -- GstElement* audiosink = gst_gconf_get_default_audio_sink(); -+ // Use autodetection, then alsa, then oss as a stopgap -+ GstElement* audiosink = gst_element_factory_make ("autoaudiosink", "audio-sink"); - if( !TryAudioSink(audiosink) ) - { -- // fallback to autodetection, then alsa, then oss as a stopgap -- audiosink = gst_element_factory_make ("autoaudiosink", "audio-sink"); -+ audiosink = gst_element_factory_make ("alsasink", "alsa-output"); - if( !TryAudioSink(audiosink) ) - { -- audiosink = gst_element_factory_make ("alsasink", "alsa-output"); -+ audiosink = gst_element_factory_make ("osssink", "play_audio"); - if( !TryAudioSink(audiosink) ) - { -- audiosink = gst_element_factory_make ("osssink", "play_audio"); -- if( !TryAudioSink(audiosink) ) -- { -- wxLogSysError(wxT("Could not find a valid audiosink")); -- return false; -- } -+ wxLogSysError(wxT("Could not find a valid audiosink")); -+ return false; - } - } - } - - // Setup video sink - first try gconf, then auto, then xvimage and - // then finally plain ximage -- GstElement* videosink = gst_gconf_get_default_video_sink(); -+ GstElement* videosink = gst_element_factory_make ("autovideosink", "video-sink"); - if( !TryVideoSink(videosink) ) - { -- videosink = gst_element_factory_make ("autovideosink", "video-sink"); -+ videosink = gst_element_factory_make ("xvimagesink", "video-sink"); - if( !TryVideoSink(videosink) ) - { -- videosink = gst_element_factory_make ("xvimagesink", "video-sink"); -+ // finally, do a final fallback to ximagesink -+ videosink = -+ gst_element_factory_make ("ximagesink", "video-sink"); - if( !TryVideoSink(videosink) ) - { -- // finally, do a final fallback to ximagesink -- videosink = -- gst_element_factory_make ("ximagesink", "video-sink"); -- if( !TryVideoSink(videosink) ) -- { -- g_object_unref(audiosink); -- wxLogSysError(wxT("Could not find a suitable video sink")); -- return false; -- } -+ g_object_unref(audiosink); -+ wxLogSysError(wxT("Could not find a suitable video sink")); -+ return false; - } - } - } - --#if GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR < 10 -- // Not on 0.10... called when video size changes -- g_signal_connect(m_xoverlay, "desired-size-changed", -- G_CALLBACK(gst_desired_size_changed_callback), this); --#endif -- // Tell GStreamer which window to draw to in 0.8 - 0.10 -- // sometimes needs this too... -- SetupXOverlay(); -+ // Tell GStreamer which window to draw to -+ SetupVideoOverlay(); - - // Now that we know (or, rather think) our video and audio sink - // are valid set our playbin to use them -@@ -1197,6 +959,10 @@ bool wxGStreamerMediaBackend::CreateCont - "audio-sink", audiosink, - NULL); - -+ GstPad *video_sinkpad = gst_element_get_static_pad (videosink, "sink"); -+ g_signal_connect (video_sinkpad, "notify::caps", G_CALLBACK (gst_notify_caps_callback), this); -+ gst_object_unref (video_sinkpad); -+ - m_eventHandler = new wxGStreamerMediaEventHandler(this); - return true; - } -@@ -1213,26 +979,10 @@ bool wxGStreamerMediaBackend::Load(const - - //----------------------------------------------------------------------------- - // wxGStreamerMediaBackend::Load (URI version) --// --// In the case of a file URI passes it unencoded - --// also, as of 0.10.3 and earlier GstURI (the uri parser for gstreamer) --// is sort of broken and only accepts uris with at least two slashes --// after the scheme (i.e. file: == not ok, file:// == ok) - //----------------------------------------------------------------------------- - bool wxGStreamerMediaBackend::Load(const wxURI& location) - { -- if(location.GetScheme().CmpNoCase(wxT("file")) == 0) -- { -- wxString uristring = location.BuildUnescapedURI(); -- -- //Workaround GstURI leading "//" problem and make sure it leads -- //with that -- return DoLoad(wxString(wxT("file://")) + -- uristring.Right(uristring.length() - 5) -- ); -- } -- else -- return DoLoad(location.BuildURI()); -+ return DoLoad(location.BuildURI()); - } - - //----------------------------------------------------------------------------- -@@ -1258,7 +1008,7 @@ bool wxGStreamerMediaBackend::DoLoad(con - - // Set playbin to ready to stop the current media... - if( gst_element_set_state (m_playbin, -- GST_STATE_READY) == GST_STATE_FAILURE || -+ GST_STATE_READY) == GST_STATE_CHANGE_FAILURE || - !SyncStateChange(m_playbin, GST_STATE_READY)) - { - CheckForErrors(); -@@ -1281,7 +1031,7 @@ bool wxGStreamerMediaBackend::DoLoad(con - // Try to pause media as gstreamer won't let us query attributes - // such as video size unless it is paused or playing - if( gst_element_set_state (m_playbin, -- GST_STATE_PAUSED) == GST_STATE_FAILURE || -+ GST_STATE_PAUSED) == GST_STATE_CHANGE_FAILURE || - !SyncStateChange(m_playbin, GST_STATE_PAUSED)) - { - CheckForErrors(); -@@ -1307,12 +1057,11 @@ bool wxGStreamerMediaBackend::DoLoad(con - // - // Sets the stream to a playing state - // --// THREAD-UNSAFE in 0.8, maybe in 0.10 as well - //----------------------------------------------------------------------------- - bool wxGStreamerMediaBackend::Play() - { - if (gst_element_set_state (m_playbin, -- GST_STATE_PLAYING) == GST_STATE_FAILURE) -+ GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) - { - CheckForErrors(); - return false; -@@ -1326,13 +1075,12 @@ bool wxGStreamerMediaBackend::Play() - // - // Marks where we paused and pauses the stream - // --// THREAD-UNSAFE in 0.8, maybe in 0.10 as well - //----------------------------------------------------------------------------- - bool wxGStreamerMediaBackend::Pause() - { - m_llPausedPos = wxGStreamerMediaBackend::GetPosition(); - if (gst_element_set_state (m_playbin, -- GST_STATE_PAUSED) == GST_STATE_FAILURE) -+ GST_STATE_PAUSED) == GST_STATE_CHANGE_FAILURE) - { - CheckForErrors(); - return false; -@@ -1353,7 +1101,7 @@ bool wxGStreamerMediaBackend::Stop() - { // begin state lock - wxMutexLocker lock(m_asynclock); - if(gst_element_set_state (m_playbin, -- GST_STATE_PAUSED) == GST_STATE_FAILURE || -+ GST_STATE_PAUSED) == GST_STATE_CHANGE_FAILURE || - !SyncStateChange(m_playbin, GST_STATE_PAUSED)) - { - CheckForErrors(); -@@ -1417,10 +1165,8 @@ wxLongLong wxGStreamerMediaBackend::GetP - else - { - gint64 pos; -- GstFormat fmtTime = GST_FORMAT_TIME; - -- if (!wxGst_element_query_position(m_playbin, &fmtTime, &pos) || -- fmtTime != GST_FORMAT_TIME || pos == -1) -+ if (!gst_element_query_position(m_playbin, GST_FORMAT_TIME, &pos) || pos == -1) - return 0; - return pos / GST_MSECOND ; - } -@@ -1438,44 +1184,21 @@ wxLongLong wxGStreamerMediaBackend::GetP - // This is also an exceedingly ugly function due to the three implementations - // (or, rather two plus one implementation without a seek function). - // --// This is asynchronous and thread-safe on both 0.8 and 0.10. --// - // NB: This fires both a stop and play event if the media was previously - // playing... which in some ways makes sense. And yes, this makes the video - // go all haywire at times - a gstreamer bug... - //----------------------------------------------------------------------------- - bool wxGStreamerMediaBackend::SetPosition(wxLongLong where) - { --#if GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR == 8 \ -- && GST_VERSION_MICRO == 0 -- // 0.8.0 has no gst_element_seek according to official docs!!! -- wxLogSysError(wxT("GStreamer 0.8.0 does not have gst_element_seek") -- wxT(" according to official docs")); -- return false; --#else // != 0.8.0 -- --# if GST_VERSION_MAJOR > 0 || GST_VERSION_MINOR >= 10 -- gst_element_seek (m_playbin, m_dRate, GST_FORMAT_TIME, -+ if ( gst_element_seek (m_playbin, m_dRate, GST_FORMAT_TIME, - (GstSeekFlags)(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT), - GST_SEEK_TYPE_SET, where.GetValue() * GST_MSECOND, -- GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE ); --# else -- // NB: Some gstreamer versions return false basically all the time -- // here - even totem doesn't bother to check the return value here -- // so I guess we'll just assume it worked - -- // TODO: maybe check the gst error callback??? -- gst_element_seek (m_playbin, (GstSeekType) (GST_SEEK_METHOD_SET | -- GST_FORMAT_TIME | GST_SEEK_FLAG_FLUSH), -- where.GetValue() * GST_MSECOND ); -- --# endif // GST_VERSION_MAJOR > 0 || GST_VERSION_MINOR >= 10 -- -+ GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE ) ) - { - m_llPausedPos = where; - return true; - } -- return true; --#endif //== 0.8.0 -+ return false; - } - - //----------------------------------------------------------------------------- -@@ -1487,10 +1210,8 @@ bool wxGStreamerMediaBackend::SetPositio - wxLongLong wxGStreamerMediaBackend::GetDuration() - { - gint64 length; -- GstFormat fmtTime = GST_FORMAT_TIME; - -- if(!wxGst_element_query_duration(m_playbin, &fmtTime, &length) || -- fmtTime != GST_FORMAT_TIME || length == -1) -+ if(!gst_element_query_duration(m_playbin, GST_FORMAT_TIME, &length) || length == -1) - return 0; - return length / GST_MSECOND ; - } -@@ -1512,7 +1233,7 @@ void wxGStreamerMediaBackend::Move(int W - // wxGStreamerMediaBackend::GetVideoSize - // - // Returns our cached video size from Load/gst_notify_caps_callback --// gst_x_overlay_get_desired_size also does this in 0.8... -+// gst_video_overlay_get_desired_size also does this in 0.8... - //----------------------------------------------------------------------------- - wxSize wxGStreamerMediaBackend::GetVideoSize() const - { -@@ -1539,9 +1260,8 @@ wxSize wxGStreamerMediaBackend::GetVideo - //TODO: forcing frame/samplerates, see audioscale and videorate. Audioscale is - //TODO: part of playbin. - // --// In 0.10 GStreamer has new gst_element_seek API that might --// support this - and I've got an attempt to do so but it is untested --// but it would appear to work... -+// In has new gst_element_seek API that supports this - and I've got an attempt -+// to do so but it is untested but it would appear to work... - //----------------------------------------------------------------------------- - double wxGStreamerMediaBackend::GetPlaybackRate() - { -@@ -1552,7 +1272,6 @@ double wxGStreamerMediaBackend::GetPlayb - - bool wxGStreamerMediaBackend::SetPlaybackRate(double dRate) - { --#if GST_VERSION_MAJOR > 0 || GST_VERSION_MINOR >= 10 - #if 0 // not tested enough - if( gst_element_seek (m_playbin, dRate, GST_FORMAT_TIME, - (GstSeekFlags)(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT), -@@ -1565,7 +1284,6 @@ bool wxGStreamerMediaBackend::SetPlaybac - #else - wxUnusedVar(dRate); - #endif --#endif - - // failure - return false; -@@ -1593,10 +1311,8 @@ wxLongLong wxGStreamerMediaBackend::GetD - wxLongLong wxGStreamerMediaBackend::GetDownloadTotal() - { - gint64 length; -- GstFormat fmtBytes = GST_FORMAT_BYTES; - -- if (!wxGst_element_query_duration(m_playbin, &fmtBytes, &length) || -- fmtBytes != GST_FORMAT_BYTES || length == -1) -+ if (!gst_element_query_duration(m_playbin, GST_FORMAT_BYTES, &length) || length == -1) - return 0; - return length; - } diff --git a/wxGTK3.spec b/wxGTK3.spec index fef3bfe..ccdf129 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -12,7 +12,7 @@ #For git snapshots, set to 0 to use release instead: %global usesnapshot 1 %if 0%{?usesnapshot} -%global commit0 f90b768ea040529fe33fda7e20f5fe2765de1dd0 +%global commit0 e4293e9e39d2d6e7757ed5907ce66d2847d8e16a %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #What doc version to use with the snapshot (usually last release): %global builddocs 1 @@ -20,7 +20,7 @@ Name: %{wxgtkname} Version: 3.0.3 -Release: 0.6%{?usesnapshot:.git%{shortcommit0}}%{?dist} +Release: 0.7%{?usesnapshot:.git%{shortcommit0}}%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -39,11 +39,9 @@ Source10: wx-config # remove abort when ABI check fails # Backport from wxGTK Patch0: %{name}-%{version}-abicheck.patch -# Switch to use GStreamer 1.0 - patch is from Debian -Patch1: %{name}-%{version}-gst1.0.patch # Temporary patch to port to webkit2gtk %if 0%{?fedora} > 26 -Patch2: %{name}-%{version}-webkit2.patch +Patch1: %{name}-%{version}-webkit2.patch %endif BuildRequires: gtk%{gtkver}-devel @@ -368,6 +366,10 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Wed Mar 08 2017 Scott Talbert - 3.0.3-0.7.gite4293e9 +- Update to newer git snapshot +- Remove GStreamer patch as it has been incorporated upstream + * Sun Mar 05 2017 Scott Talbert - 3.0.3-0.6.gitf90b768 - Add temporary patch for webkit2 port in rawhide, re-enable webview subpackage From e31717383b8086768df19a87f179a82d38a135d8 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Sun, 16 Apr 2017 21:31:25 -0400 Subject: [PATCH 64/94] Rebuild against SDL2 --- wxGTK3.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wxGTK3.spec b/wxGTK3.spec index ccdf129..38e1a35 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -20,7 +20,7 @@ Name: %{wxgtkname} Version: 3.0.3 -Release: 0.7%{?usesnapshot:.git%{shortcommit0}}%{?dist} +Release: 0.8%{?usesnapshot:.git%{shortcommit0}}%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -58,7 +58,7 @@ BuildRequires: libpng-devel BuildRequires: libjpeg-devel BuildRequires: libtiff-devel BuildRequires: expat-devel -BuildRequires: SDL-devel +BuildRequires: SDL2-devel BuildRequires: libGLU-devel BuildRequires: libSM-devel BuildRequires: gstreamer1-plugins-base-devel @@ -209,6 +209,8 @@ CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" export LDFLAGS="-Wl,--as-needed" # Trick configure into using pkg-config for cppunit-config export CPPUNIT_CONFIG="/usr/bin/pkg-config cppunit" +# Trick configure into building with SDL2 +export SDL_CONFIG=/usr/bin/sdl2-config %if 0%{?usesnapshot} #For snapshots, mo files need to be generated @@ -366,6 +368,9 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Mon Apr 17 2017 Scott Talbert - 3.0.3-0.8.gite4293e9 +- Rebuild against SDL2 + * Wed Mar 08 2017 Scott Talbert - 3.0.3-0.7.gite4293e9 - Update to newer git snapshot - Remove GStreamer patch as it has been incorporated upstream From 1d26276d398d1d3cb67b7a960bf12539dc902255 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Fri, 5 May 2017 00:19:05 -0400 Subject: [PATCH 65/94] New upstream release 3.0.3 Update to latest WebKit2 patch (#1428997) --- .gitignore | 1 + sources | 2 +- wxGTK3-3.0.3-webkit2.patch | 3015 +++++++++++++++++++++++++++--------- wxGTK3.spec | 34 +- 4 files changed, 2316 insertions(+), 736 deletions(-) diff --git a/.gitignore b/.gitignore index c41c337..5f25f93 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /wxWidgets-9518d52.tar.gz /wxWidgets-f90b768.tar.gz /wxWidgets-e4293e9.tar.gz +/wxWidgets-3.0.3.tar.bz2 diff --git a/sources b/sources index 3ad3f74..795cf28 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wxWidgets-e4293e9.tar.gz) = 30206398dfa6687ca9092fbf372a794cd739a063065a8574ce65494d6bb059b93454d9e79a8e1e552872b16fd025d192b9455b618c9a40e64a816e0c9821499e +SHA512 (wxWidgets-3.0.3.tar.bz2) = dfe53682d7cda1d460f336a890603c4e823078be4b05e7cf43ab36cb49247f702808aa939d9311705bdf5f96eaa076e7a8f77f4415bc07c5bfdc19e5deff1dd1 diff --git a/wxGTK3-3.0.3-webkit2.patch b/wxGTK3-3.0.3-webkit2.patch index 1f6309c..53883f1 100644 --- a/wxGTK3-3.0.3-webkit2.patch +++ b/wxGTK3-3.0.3-webkit2.patch @@ -1,257 +1,1099 @@ -From 7ca24831df9b0076ff000555da57d2e3db040aa4 Mon Sep 17 00:00:00 2001 +From ec6e54bc893fb7516731ca9c71e0d0bbc5ae9ff7 Mon Sep 17 00:00:00 2001 From: Scott Talbert -Date: Sat, 4 Mar 2017 21:09:02 -0500 -Subject: [PATCH] WIP patch to convert webview to webkit2gtk +Date: Thu, 30 Mar 2017 21:34:24 -0400 +Subject: [PATCH] Add support for WebKit2GTK+ in wxWebView -This is a temporary patch for Fedora to switch to webkit2gtk for now. This is -not the final implementation. +Closes https://github.com/wxWidgets/wxWidgets/pull/469 --- - configure.in | 2 +- - include/wx/gtk/webview_webkit.h | 12 +- - src/gtk/webview_webkit.cpp | 435 +++++++++++++++++++++++----------------- - 3 files changed, 263 insertions(+), 186 deletions(-) + Makefile.in | 58 +- + autoconf_inc.m4 | 6 + + build/bakefiles/config.bkl | 1 + + build/bakefiles/files.bkl | 5 + + build/bakefiles/multilib.bkl | 1 + + build/bakefiles/plugins.bkl | 5 + + configure | 108 ++- + configure.in | 42 +- + docs/changes.txt | 8 + + include/wx/android/setup.h | 13 +- + include/wx/chkconf.h | 2 +- + include/wx/gtk/setup0.h | 13 +- + include/wx/gtk/webview_webkit.h | 18 +- + include/wx/gtk/webview_webkit2_extension.h | 15 + + include/wx/gtk/webviewhistoryitem_webkit.h | 2 +- + include/wx/motif/setup0.h | 13 +- + include/wx/msw/setup0.h | 13 +- + include/wx/msw/wince/setup.h | 13 +- + include/wx/os2/setup0.h | 13 +- + include/wx/osx/setup0.h | 13 +- + include/wx/setup_inc.h | 13 +- + include/wx/univ/setup0.h | 13 +- + interface/wx/webview.h | 4 + + samples/webview/webview.cpp | 2 +- + setup.h.in | 8 +- + src/gtk/webview_webkit2.cpp | 1261 ++++++++++++++++++++++++++++ + src/gtk/webview_webkit2_extension.cpp | 421 ++++++++++ + 27 files changed, 2046 insertions(+), 38 deletions(-) + create mode 100644 include/wx/gtk/webview_webkit2_extension.h + create mode 100644 src/gtk/webview_webkit2.cpp + create mode 100644 src/gtk/webview_webkit2_extension.cpp +diff --git a/Makefile.in b/Makefile.in +index 7a10765..f032587 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -1655,12 +1655,14 @@ WEBVIEWDLL_CXXFLAGS = $(__webviewdll_PCH_INC) -D__WX$(TOOLKIT)__ \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) -DWXBUILDING $(__INC_TIFF_BUILD_p) \ + $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) $(__INC_ZLIB_p) \ + $(__INC_REGEX_p) $(__INC_EXPAT_p) -DWXUSINGDLL -DWXMAKINGDLL_WEBVIEW \ ++ -DWX_WEB_EXTENSIONS_DIRECTORY=\"$(PLUGINS_INST_DIR)/web-extensions\" \ + $(PIC_FLAG) $(CXXWARNINGS) $(CPPFLAGS) $(CXXFLAGS) + WEBVIEWDLL_OBJCXXFLAGS = $(__webviewdll_PCH_INC) -D__WX$(TOOLKIT)__ \ + $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) -DWXBUILDING $(__INC_TIFF_BUILD_p) \ + $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) $(__INC_ZLIB_p) \ + $(__INC_REGEX_p) $(__INC_EXPAT_p) -DWXUSINGDLL -DWXMAKINGDLL_WEBVIEW \ ++ -DWX_WEB_EXTENSIONS_DIRECTORY=\"$(PLUGINS_INST_DIR)/web-extensions\" \ + $(PIC_FLAG) $(CPPFLAGS) $(OBJCXXFLAGS) + WEBVIEWDLL_OBJECTS = \ + $(__webviewdll___win32rc) \ +@@ -2078,6 +2080,10 @@ SOUND_SDL_CXXFLAGS = -DWXUSINGDLL -DwxUSE_GUI=0 $(PIC_FLAG) $(CPPFLAGS) \ + $(CXXFLAGS) + SOUND_SDL_OBJECTS = \ + sound_sdl_sound_sdl.o ++WEBKIT2_EXT_CXXFLAGS = -DWXUSINGDLL -DwxUSE_GUI=0 $(PIC_FLAG) $(CPPFLAGS) \ ++ $(CXXFLAGS) ++WEBKIT2_EXT_OBJECTS = \ ++ webkit2_ext_webview_webkit2_extension.o + LOCALE_LINGUAS = ca cs da de el es fi fr hu id it ja nl pl ru sl sv tr uk zh zh_CN zh_TW + LOCALE_MSW_LINGUAS = it + +@@ -6754,6 +6760,8 @@ COND_TOOLKIT_X11___ADVANCED_PLATFORM_SRC_OBJECTS_1 = \ + @COND_PLATFORM_MACOSX_1@ = monodll_osx_webview_webkit.o + @COND_TOOLKIT_GTK@__WEBVIEW_SRC_PLATFORM_OBJECTS = \ + @COND_TOOLKIT_GTK@ monodll_gtk_webview_webkit.o ++@COND_TOOLKIT_GTK@__WEBVIEW_SRC_PLATFORM_OBJECTS = \ ++@COND_TOOLKIT_GTK@ monodll_webview_webkit2.o + @COND_TOOLKIT_MSW@__WEBVIEW_SRC_PLATFORM_OBJECTS = monodll_webview_ie.o + @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@__AUI_GTK_SRC_OBJECTS \ + @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@ = monodll_tabartgtk.o +@@ -9009,6 +9017,8 @@ COND_TOOLKIT_X11___ADVANCED_PLATFORM_SRC_OBJECTS_3 = \ + @COND_PLATFORM_MACOSX_1@ = monolib_osx_webview_webkit.o + @COND_TOOLKIT_GTK@__WEBVIEW_SRC_PLATFORM_OBJECTS_1 = \ + @COND_TOOLKIT_GTK@ monolib_gtk_webview_webkit.o ++@COND_TOOLKIT_GTK@__WEBVIEW_SRC_PLATFORM_OBJECTS_1 = \ ++@COND_TOOLKIT_GTK@ monolib_webview_webkit2.o + @COND_TOOLKIT_MSW@__WEBVIEW_SRC_PLATFORM_OBJECTS_1 = monolib_webview_ie.o + @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@__AUI_GTK_SRC_OBJECTS_1 \ + @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@ = monolib_tabartgtk.o +@@ -13765,6 +13775,8 @@ COND_USE_SOVERSOLARIS_1___webviewdll___so_symlinks_uninst_cmd = rm -f \ + @COND_PLATFORM_MACOSX_1@ = webviewdll_osx_webview_webkit.o + @COND_TOOLKIT_GTK@__WEBVIEW_SRC_PLATFORM_OBJECTS_2 = \ + @COND_TOOLKIT_GTK@ webviewdll_gtk_webview_webkit.o ++@COND_TOOLKIT_GTK@__WEBVIEW_SRC_PLATFORM_OBJECTS_2 = \ ++@COND_TOOLKIT_GTK@ webviewdll_webview_webkit2.o + @COND_TOOLKIT_MSW@__WEBVIEW_SRC_PLATFORM_OBJECTS_2 = \ + @COND_TOOLKIT_MSW@ webviewdll_webview_ie.o + COND_MONOLITHIC_0_SHARED_0_USE_GUI_1_USE_WEBVIEW_1___webviewlib___depname = \ +@@ -13784,6 +13796,8 @@ COND_MONOLITHIC_0_SHARED_0_USE_GUI_1_USE_WEBVIEW_1___webviewlib___depname = \ + @COND_PLATFORM_MACOSX_1@ = webviewlib_osx_webview_webkit.o + @COND_TOOLKIT_GTK@__WEBVIEW_SRC_PLATFORM_OBJECTS_3 = \ + @COND_TOOLKIT_GTK@ webviewlib_gtk_webview_webkit.o ++@COND_TOOLKIT_GTK@__WEBVIEW_SRC_PLATFORM_OBJECTS_3 = \ ++@COND_TOOLKIT_GTK@ webviewlib_webview_webkit2.o + @COND_TOOLKIT_MSW@__WEBVIEW_SRC_PLATFORM_OBJECTS_3 = \ + @COND_TOOLKIT_MSW@ webviewlib_webview_ie.o + @COND_SHARED_1@____wxwebview_namedll_DEP = $(__webviewdll___depname) +@@ -14586,6 +14600,13 @@ COND_WITH_PLUGIN_SDL_1___sound_sdl___depname = \ + @COND_WITH_PLUGIN_SDL_1@__install_sound_sdl___depname = install_sound_sdl + @COND_WITH_PLUGIN_SDL_1@__uninstall_sound_sdl___depname \ + @COND_WITH_PLUGIN_SDL_1@ = uninstall_sound_sdl ++COND_USE_WEBVIEW_WEBKIT2_1___webkit2_ext___depname = \ ++ $(DLLPREFIX_MODULE)webkit2_ext$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(PLUGVERDELIM)$(PLUGIN_VERSION0)$(WXCOMPILER).$(SO_SUFFIX_MODULE) ++@COND_USE_WEBVIEW_WEBKIT2_1@__webkit2_ext___depname = $(COND_USE_WEBVIEW_WEBKIT2_1___webkit2_ext___depname) ++@COND_USE_WEBVIEW_WEBKIT2_1@__install_webkit2_ext___depname \ ++@COND_USE_WEBVIEW_WEBKIT2_1@ = install_webkit2_ext ++@COND_USE_WEBVIEW_WEBKIT2_1@__uninstall_webkit2_ext___depname \ ++@COND_USE_WEBVIEW_WEBKIT2_1@ = uninstall_webkit2_ext + @COND_USE_XRC_1@__wxrc___depname = wxrc + @COND_USE_XRC_1@__clean_wxrc___depname = clean-wxrc + @COND_USE_XRC_1@__install_wxrc___depname = install-wxrc +@@ -15255,9 +15276,9 @@ COND_wxUSE_REGEX_builtin___LIB_REGEX_p = \ + + ### Targets: ### + +-all: $(__wxregex___depname) $(__wxzlib___depname) $(__wxpng___depname) $(__wxjpeg___depname) $(__wxtiff___depname) $(__wxexpat___depname) $(__wxscintilla___depname) $(__monodll___depname) $(__monolib___depname) $(__basedll___depname) $(__baselib___depname) $(__netdll___depname) $(__netlib___depname) $(__coredll___depname) $(__corelib___depname) $(__advdll___depname) $(__advlib___depname) $(__mediadll___depname) $(__medialib___depname) $(__htmldll___depname) $(__htmllib___depname) $(__webviewdll___depname) $(__webviewlib___depname) $(__qadll___depname) $(__qalib___depname) $(__xmldll___depname) $(__xmllib___depname) $(__xrcdll___depname) $(__xrclib___depname) $(__auidll___depname) $(__auilib___depname) $(__ribbondll___depname) $(__ribbonlib___depname) $(__propgriddll___depname) $(__propgridlib___depname) $(__richtextdll___depname) $(__richtextlib___depname) $(__stcdll___depname) $(__stclib___depname) $(__gldll___depname) $(__gllib___depname) $(__sound_sdl___depname) $(__wxrc___depname) $(__cocoa_res___depname) ++all: $(__wxregex___depname) $(__wxzlib___depname) $(__wxpng___depname) $(__wxjpeg___depname) $(__wxtiff___depname) $(__wxexpat___depname) $(__wxscintilla___depname) $(__monodll___depname) $(__monolib___depname) $(__basedll___depname) $(__baselib___depname) $(__netdll___depname) $(__netlib___depname) $(__coredll___depname) $(__corelib___depname) $(__advdll___depname) $(__advlib___depname) $(__mediadll___depname) $(__medialib___depname) $(__htmldll___depname) $(__htmllib___depname) $(__webviewdll___depname) $(__webviewlib___depname) $(__qadll___depname) $(__qalib___depname) $(__xmldll___depname) $(__xmllib___depname) $(__xrcdll___depname) $(__xrclib___depname) $(__auidll___depname) $(__auilib___depname) $(__ribbondll___depname) $(__ribbonlib___depname) $(__propgriddll___depname) $(__propgridlib___depname) $(__richtextdll___depname) $(__richtextlib___depname) $(__stcdll___depname) $(__stclib___depname) $(__gldll___depname) $(__gllib___depname) $(__sound_sdl___depname) $(__webkit2_ext___depname) $(__wxrc___depname) $(__cocoa_res___depname) + +-install: $(__install_wxregex___depname) $(__install_wxzlib___depname) $(__install_wxpng___depname) $(__install_wxjpeg___depname) $(__install_wxtiff___depname) $(__install_wxexpat___depname) $(__install_wxscintilla___depname) $(__install_monodll___depname) $(__install_monolib___depname) $(__install_basedll___depname) $(__install_baselib___depname) $(__install_netdll___depname) $(__install_netlib___depname) $(__install_coredll___depname) $(__install_corelib___depname) $(__install_advdll___depname) $(__install_advlib___depname) $(__install_mediadll___depname) $(__install_medialib___depname) $(__install_htmldll___depname) $(__install_htmllib___depname) $(__install_webviewdll___depname) $(__install_webviewlib___depname) $(__install_qadll___depname) $(__install_qalib___depname) $(__install_xmldll___depname) $(__install_xmllib___depname) $(__install_xrcdll___depname) $(__install_xrclib___depname) $(__install_auidll___depname) $(__install_auilib___depname) $(__install_ribbondll___depname) $(__install_ribbonlib___depname) $(__install_propgriddll___depname) $(__install_propgridlib___depname) $(__install_richtextdll___depname) $(__install_richtextlib___depname) $(__install_stcdll___depname) $(__install_stclib___depname) $(__install_gldll___depname) $(__install_gllib___depname) $(__install_sound_sdl___depname) $(__install_wxrc___depname) install-wxconfig locale_install locale_msw_install $(__cocoa_res_install___depname) ++install: $(__install_wxregex___depname) $(__install_wxzlib___depname) $(__install_wxpng___depname) $(__install_wxjpeg___depname) $(__install_wxtiff___depname) $(__install_wxexpat___depname) $(__install_wxscintilla___depname) $(__install_monodll___depname) $(__install_monolib___depname) $(__install_basedll___depname) $(__install_baselib___depname) $(__install_netdll___depname) $(__install_netlib___depname) $(__install_coredll___depname) $(__install_corelib___depname) $(__install_advdll___depname) $(__install_advlib___depname) $(__install_mediadll___depname) $(__install_medialib___depname) $(__install_htmldll___depname) $(__install_htmllib___depname) $(__install_webviewdll___depname) $(__install_webviewlib___depname) $(__install_qadll___depname) $(__install_qalib___depname) $(__install_xmldll___depname) $(__install_xmllib___depname) $(__install_xrcdll___depname) $(__install_xrclib___depname) $(__install_auidll___depname) $(__install_auilib___depname) $(__install_ribbondll___depname) $(__install_ribbonlib___depname) $(__install_propgriddll___depname) $(__install_propgridlib___depname) $(__install_richtextdll___depname) $(__install_richtextlib___depname) $(__install_stcdll___depname) $(__install_stclib___depname) $(__install_gldll___depname) $(__install_gllib___depname) $(__install_sound_sdl___depname) $(__install_webkit2_ext___depname) $(__install_wxrc___depname) install-wxconfig locale_install locale_msw_install $(__cocoa_res_install___depname) + $(INSTALL_DIR) $(DESTDIR)$(datadir)/aclocal + (cd $(srcdir) ; $(INSTALL_DATA) wxwin.m4 $(DESTDIR)$(datadir)/aclocal) + $(INSTALL_DIR) $(DESTDIR)$(datadir)/bakefile/presets +@@ -15293,7 +15314,7 @@ install: $(__install_wxregex___depname) $(__install_wxzlib___depname) $(__instal + @echo " ------------------------------------------------------" + @echo " " + +-uninstall: $(__uninstall_wxregex___depname) $(__uninstall_wxzlib___depname) $(__uninstall_wxpng___depname) $(__uninstall_wxjpeg___depname) $(__uninstall_wxtiff___depname) $(__uninstall_wxexpat___depname) $(__uninstall_wxscintilla___depname) $(__uninstall_monodll___depname) $(__uninstall_monolib___depname) $(__uninstall_basedll___depname) $(__uninstall_baselib___depname) $(__uninstall_netdll___depname) $(__uninstall_netlib___depname) $(__uninstall_coredll___depname) $(__uninstall_corelib___depname) $(__uninstall_advdll___depname) $(__uninstall_advlib___depname) $(__uninstall_mediadll___depname) $(__uninstall_medialib___depname) $(__uninstall_htmldll___depname) $(__uninstall_htmllib___depname) $(__uninstall_webviewdll___depname) $(__uninstall_webviewlib___depname) $(__uninstall_qadll___depname) $(__uninstall_qalib___depname) $(__uninstall_xmldll___depname) $(__uninstall_xmllib___depname) $(__uninstall_xrcdll___depname) $(__uninstall_xrclib___depname) $(__uninstall_auidll___depname) $(__uninstall_auilib___depname) $(__uninstall_ribbondll___depname) $(__uninstall_ribbonlib___depname) $(__uninstall_propgriddll___depname) $(__uninstall_propgridlib___depname) $(__uninstall_richtextdll___depname) $(__uninstall_richtextlib___depname) $(__uninstall_stcdll___depname) $(__uninstall_stclib___depname) $(__uninstall_gldll___depname) $(__uninstall_gllib___depname) $(__uninstall_sound_sdl___depname) locale_uninstall locale_msw_uninstall ++uninstall: $(__uninstall_wxregex___depname) $(__uninstall_wxzlib___depname) $(__uninstall_wxpng___depname) $(__uninstall_wxjpeg___depname) $(__uninstall_wxtiff___depname) $(__uninstall_wxexpat___depname) $(__uninstall_wxscintilla___depname) $(__uninstall_monodll___depname) $(__uninstall_monolib___depname) $(__uninstall_basedll___depname) $(__uninstall_baselib___depname) $(__uninstall_netdll___depname) $(__uninstall_netlib___depname) $(__uninstall_coredll___depname) $(__uninstall_corelib___depname) $(__uninstall_advdll___depname) $(__uninstall_advlib___depname) $(__uninstall_mediadll___depname) $(__uninstall_medialib___depname) $(__uninstall_htmldll___depname) $(__uninstall_htmllib___depname) $(__uninstall_webviewdll___depname) $(__uninstall_webviewlib___depname) $(__uninstall_qadll___depname) $(__uninstall_qalib___depname) $(__uninstall_xmldll___depname) $(__uninstall_xmllib___depname) $(__uninstall_xrcdll___depname) $(__uninstall_xrclib___depname) $(__uninstall_auidll___depname) $(__uninstall_auilib___depname) $(__uninstall_ribbondll___depname) $(__uninstall_ribbonlib___depname) $(__uninstall_propgriddll___depname) $(__uninstall_propgridlib___depname) $(__uninstall_richtextdll___depname) $(__uninstall_richtextlib___depname) $(__uninstall_stcdll___depname) $(__uninstall_stclib___depname) $(__uninstall_gldll___depname) $(__uninstall_gllib___depname) $(__uninstall_sound_sdl___depname) $(__uninstall_webkit2_ext___depname) locale_uninstall locale_msw_uninstall + (cd $(DESTDIR)$(datadir)/aclocal ; rm -f wxwin.m4) + (cd $(DESTDIR)$(datadir)/bakefile/presets ; rm -f wx.bkl wx_unix.bkl wx_win32.bkl wx_xrc.bkl wx_presets.py) + for f in setup.h $(RCDEFS_H); do \ +@@ -15322,6 +15343,7 @@ install-strip: install + $(STRIP) $(DESTDIR)$(libdir)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) + $(STRIP) $(DESTDIR)$(libdir)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) + $(STRIP) $(DESTDIR)$(PLUGINS_INST_DIR)/$(DLLPREFIX_MODULE)sound_sdl$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(PLUGVERDELIM)$(PLUGIN_VERSION0)$(WXCOMPILER).$(SO_SUFFIX_MODULE) ++ $(STRIP) $(DESTDIR)$(PLUGINS_INST_DIR)/web-extensions/$(DLLPREFIX_MODULE)webkit2_ext$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(PLUGVERDELIM)$(PLUGIN_VERSION0)$(WXCOMPILER).$(SO_SUFFIX_MODULE) + + clean: $(__clean_wxrc___depname) + rm -rf ./.deps ./.pch +@@ -15402,6 +15424,7 @@ clean: $(__clean_wxrc___depname) + rm -f $(LIBDIRNAME)/$(LIBPREFIX)wx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl-$(WX_RELEASE)$(HOST_SUFFIX).$(DLLIMP_SUFFIX) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf2) + rm -f $(LIBDIRNAME)/$(LIBPREFIX)wx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl-$(WX_RELEASE)$(HOST_SUFFIX)$(LIBEXT) + rm -f $(DLLPREFIX_MODULE)sound_sdl$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(PLUGVERDELIM)$(PLUGIN_VERSION0)$(WXCOMPILER).$(SO_SUFFIX_MODULE) ++ rm -f $(DLLPREFIX_MODULE)webkit2_ext$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(PLUGVERDELIM)$(PLUGIN_VERSION0)$(WXCOMPILER).$(SO_SUFFIX_MODULE) + -(cd samples && $(MAKE) clean) + rm -f lib/libwx_$(TOOLCHAIN_NAME).0.rsrc lib/libwx_$(TOOLCHAIN_NAME).0.r + +@@ -16130,6 +16153,16 @@ distclean: clean + @COND_WITH_PLUGIN_SDL_1@uninstall_sound_sdl: + @COND_WITH_PLUGIN_SDL_1@ rm -f $(DESTDIR)$(PLUGINS_INST_DIR)/$(DLLPREFIX_MODULE)sound_sdl$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(PLUGVERDELIM)$(PLUGIN_VERSION0)$(WXCOMPILER).$(SO_SUFFIX_MODULE) + ++@COND_USE_WEBVIEW_WEBKIT2_1@$(DLLPREFIX_MODULE)webkit2_ext$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(PLUGVERDELIM)$(PLUGIN_VERSION0)$(WXCOMPILER).$(SO_SUFFIX_MODULE): $(WEBKIT2_EXT_OBJECTS) ++@COND_USE_WEBVIEW_WEBKIT2_1@ $(SHARED_LD_MODULE_CXX) $@ $(WEBKIT2_EXT_OBJECTS) $(LDFLAGS) $(EXTRALIBS_WEBVIEW) $(LIBS) ++ ++@COND_USE_WEBVIEW_WEBKIT2_1@install_webkit2_ext: $(__webkit2_ext___depname) ++@COND_USE_WEBVIEW_WEBKIT2_1@ $(INSTALL_DIR) $(DESTDIR)$(PLUGINS_INST_DIR)/web-extensions ++@COND_USE_WEBVIEW_WEBKIT2_1@ $(INSTALL_PROGRAM) $(DLLPREFIX_MODULE)webkit2_ext$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(PLUGVERDELIM)$(PLUGIN_VERSION0)$(WXCOMPILER).$(SO_SUFFIX_MODULE) $(DESTDIR)$(PLUGINS_INST_DIR)/web-extensions ++ ++@COND_USE_WEBVIEW_WEBKIT2_1@uninstall_webkit2_ext: ++@COND_USE_WEBVIEW_WEBKIT2_1@ rm -f $(DESTDIR)$(PLUGINS_INST_DIR)/web-extensions/$(DLLPREFIX_MODULE)webkit2_ext$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(PLUGVERDELIM)$(PLUGIN_VERSION0)$(WXCOMPILER).$(SO_SUFFIX_MODULE) ++ + samples: + (cd samples && $(MAKE) all) + +@@ -18563,6 +18596,9 @@ monodll_webview_ie.o: $(srcdir)/src/msw/webview_ie.cpp $(MONODLL_ODEP) + monodll_gtk_webview_webkit.o: $(srcdir)/src/gtk/webview_webkit.cpp $(MONODLL_ODEP) + $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/gtk/webview_webkit.cpp + ++monodll_webview_webkit2.o: $(srcdir)/src/gtk/webview_webkit2.cpp $(MONODLL_ODEP) ++ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/gtk/webview_webkit2.cpp ++ + monodll_osx_webview_webkit.o: $(srcdir)/src/osx/webview_webkit.mm $(MONODLL_ODEP) + $(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/osx/webview_webkit.mm + +@@ -24440,6 +24476,9 @@ monolib_webview_ie.o: $(srcdir)/src/msw/webview_ie.cpp $(MONOLIB_ODEP) + monolib_gtk_webview_webkit.o: $(srcdir)/src/gtk/webview_webkit.cpp $(MONOLIB_ODEP) + $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/gtk/webview_webkit.cpp + ++monolib_webview_webkit2.o: $(srcdir)/src/gtk/webview_webkit2.cpp $(MONOLIB_ODEP) ++ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/gtk/webview_webkit2.cpp ++ + monolib_osx_webview_webkit.o: $(srcdir)/src/osx/webview_webkit.mm $(MONOLIB_ODEP) + $(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/osx/webview_webkit.mm + +@@ -39792,7 +39831,7 @@ htmllib_htmllbox.o: $(srcdir)/src/generic/htmllbox.cpp $(HTMLLIB_ODEP) + @COND_PLATFORM_MACOSX_1@ $(CXXC) -c -o $@ $(HTMLLIB_CXXFLAGS) $(srcdir)/src/html/chm.cpp + + webviewdll_version_rc.o: $(srcdir)/src/msw/version.rc $(WEBVIEWDLL_ODEP) +- $(WINDRES) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) --define WXBUILDING --define WXDLLNAME=$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG) $(__RCDEFDIR_p) --include-dir $(top_srcdir)/include $(__INC_TIFF_BUILD_p_66) $(__INC_TIFF_p_66) $(__INC_JPEG_p_66) $(__INC_PNG_p_65) $(__INC_ZLIB_p_67) $(__INC_REGEX_p_65) $(__INC_EXPAT_p_65) --define WXUSINGDLL --define WXMAKINGDLL_WEBVIEW ++ $(WINDRES) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) --define WXBUILDING --define WXDLLNAME=$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG) $(__RCDEFDIR_p) --include-dir $(top_srcdir)/include $(__INC_TIFF_BUILD_p_66) $(__INC_TIFF_p_66) $(__INC_JPEG_p_66) $(__INC_PNG_p_65) $(__INC_ZLIB_p_67) $(__INC_REGEX_p_65) $(__INC_EXPAT_p_65) --define WXUSINGDLL --define WXMAKINGDLL_WEBVIEW --define WX_WEB_EXTENSIONS_DIRECTORY="$(PLUGINS_INST_DIR)/web-extensions" + + webviewdll_webview_ie.o: $(srcdir)/src/msw/webview_ie.cpp $(WEBVIEWDLL_ODEP) + $(CXXC) -c -o $@ $(WEBVIEWDLL_CXXFLAGS) $(srcdir)/src/msw/webview_ie.cpp +@@ -39800,6 +39839,9 @@ webviewdll_webview_ie.o: $(srcdir)/src/msw/webview_ie.cpp $(WEBVIEWDLL_ODEP) + webviewdll_gtk_webview_webkit.o: $(srcdir)/src/gtk/webview_webkit.cpp $(WEBVIEWDLL_ODEP) + $(CXXC) -c -o $@ $(WEBVIEWDLL_CXXFLAGS) $(srcdir)/src/gtk/webview_webkit.cpp + ++webviewdll_webview_webkit2.o: $(srcdir)/src/gtk/webview_webkit2.cpp $(WEBVIEWDLL_ODEP) ++ $(CXXC) -c -o $@ $(WEBVIEWDLL_CXXFLAGS) $(srcdir)/src/gtk/webview_webkit2.cpp ++ + webviewdll_osx_webview_webkit.o: $(srcdir)/src/osx/webview_webkit.mm $(WEBVIEWDLL_ODEP) + $(CXXC) -c -o $@ $(WEBVIEWDLL_OBJCXXFLAGS) $(srcdir)/src/osx/webview_webkit.mm + +@@ -39818,6 +39860,9 @@ webviewlib_webview_ie.o: $(srcdir)/src/msw/webview_ie.cpp $(WEBVIEWLIB_ODEP) + webviewlib_gtk_webview_webkit.o: $(srcdir)/src/gtk/webview_webkit.cpp $(WEBVIEWLIB_ODEP) + $(CXXC) -c -o $@ $(WEBVIEWLIB_CXXFLAGS) $(srcdir)/src/gtk/webview_webkit.cpp + ++webviewlib_webview_webkit2.o: $(srcdir)/src/gtk/webview_webkit2.cpp $(WEBVIEWLIB_ODEP) ++ $(CXXC) -c -o $@ $(WEBVIEWLIB_CXXFLAGS) $(srcdir)/src/gtk/webview_webkit2.cpp ++ + webviewlib_osx_webview_webkit.o: $(srcdir)/src/osx/webview_webkit.mm $(WEBVIEWLIB_ODEP) + $(CXXC) -c -o $@ $(WEBVIEWLIB_OBJCXXFLAGS) $(srcdir)/src/osx/webview_webkit.mm + +@@ -40658,6 +40703,9 @@ gllib_os2_glcanvas.o: $(srcdir)/src/os2/glcanvas.cpp $(GLLIB_ODEP) + sound_sdl_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp + $(CXXC) -c -o $@ $(SOUND_SDL_CXXFLAGS) $(srcdir)/src/unix/sound_sdl.cpp + ++webkit2_ext_webview_webkit2_extension.o: $(srcdir)/src/gtk/webview_webkit2_extension.cpp ++ $(CXXC) -c -o $@ $(WEBKIT2_EXT_CXXFLAGS) $(srcdir)/src/gtk/webview_webkit2_extension.cpp ++ + + @COND_PYTHON@@COND_USE_STC_1@$(srcdir)/include/wx/stc/stc.h: \ + @COND_PYTHON@@COND_USE_STC_1@$(srcdir)/src/stc/scintilla/include/Scintilla.iface \ +@@ -41569,4 +41617,4 @@ win-dist: MSW_ZIP_TEXT_DIST SAMPLES_DIST DEMOS_DIST UTILS_DIST MISC_DIST INTL_DI + uninstall_richtextlib wxrichtext install_stcdll uninstall_stcdll \ + install_stclib uninstall_stclib wxstc install_gldll uninstall_gldll \ + install_gllib uninstall_gllib wxgl install_sound_sdl uninstall_sound_sdl \ +- samples ++ install_webkit2_ext uninstall_webkit2_ext samples +diff --git a/autoconf_inc.m4 b/autoconf_inc.m4 +index 76cea6a..6bc6a0c 100644 +--- a/autoconf_inc.m4 ++++ b/autoconf_inc.m4 +@@ -1088,6 +1088,12 @@ dnl ### begin block 20_COND_USE_THREADS_1[../../demos/bombs/bombs.bkl,../../demo + COND_USE_THREADS_1="" + fi + AC_SUBST(COND_USE_THREADS_1) ++dnl ### begin block 20_COND_USE_WEBVIEW_WEBKIT2_1[wx.bkl] ### ++ COND_USE_WEBVIEW_WEBKIT2_1="#" ++ if test "x$USE_WEBVIEW_WEBKIT2" = "x1" ; then ++ COND_USE_WEBVIEW_WEBKIT2_1="" ++ fi ++ AC_SUBST(COND_USE_WEBVIEW_WEBKIT2_1) + dnl ### begin block 20_COND_USE_XRC_1[../../utils/execmon/execmon.bkl,../../utils/wxrc/wxrc.bkl,wx.bkl] ### + COND_USE_XRC_1="#" + if test "x$USE_XRC" = "x1" ; then +diff --git a/build/bakefiles/config.bkl b/build/bakefiles/config.bkl +index a43afb49..a95b405 100644 +--- a/build/bakefiles/config.bkl ++++ b/build/bakefiles/config.bkl +@@ -429,6 +429,7 @@ to run the tests, include CppUnit library here. +