From fe5a6f06cea66252cd780f3bdcdf073fe05d38a1 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Thu, 24 Nov 2016 00:00:18 -0500 Subject: [PATCH] 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)