Update to new upstream release 3.0.5.1

epel9
Scott Talbert 5 years ago
parent 5deb323f7e
commit e6508ded9b

1
.gitignore vendored

@ -9,3 +9,4 @@
/wxWidgets-e4293e9.tar.gz
/wxWidgets-3.0.3.tar.bz2
/wxWidgets-3.0.4.tar.bz2
/wxWidgets-3.0.5.1.tar.bz2

@ -1,52 +0,0 @@
From 76c393b8bd1968dcf18e2c93f1c37d1c58215d4f Mon Sep 17 00:00:00 2001
From: Scott Talbert <swt@techie.net>
Date: Wed, 1 Aug 2018 20:52:11 -0700
Subject: [PATCH] Give an error when trying to use wxGLCanvas on non-X11
display
Currently, wxGLCanvas on wxGTK is only supported on X11 displays. If a
user attempts to use wxGLCanvas on Wayland, for example, the application
will core dump. This change adds an error message and a suggested
workaround until wxGLCanvas is supported on Wayland.
See #17702
See https://github.com/wxWidgets/wxWidgets/pull/871
(backport of 95857a1f71bd0c19e3059ebf0eea28e9bb8b7602)
---
src/gtk/glcanvas.cpp | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/gtk/glcanvas.cpp b/src/gtk/glcanvas.cpp
index d4acb9c8c2a..0953be61807 100644
--- a/src/gtk/glcanvas.cpp
+++ b/src/gtk/glcanvas.cpp
@@ -208,6 +208,19 @@ wxGLCanvas::wxGLCanvas(wxWindow *parent,
#endif // WXWIN_COMPATIBILITY_2_8
+static bool IsAvailable()
+{
+#ifdef GDK_WINDOWING_X11
+ if ( !GDK_IS_X11_DISPLAY(gdk_display_get_default()) )
+#endif
+ {
+ wxSafeShowMessage(_("Fatal Error"), _("wxGLCanvas is only supported on X11 currently. You may be able to\nwork around this by setting environment variable GDK_BACKEND=x11 before starting\nyour program."));
+ return false;
+ }
+
+ return true;
+}
+
bool wxGLCanvas::Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos,
@@ -217,6 +230,9 @@ bool wxGLCanvas::Create(wxWindow *parent,
const int *attribList,
const wxPalette& palette)
{
+ if ( !IsAvailable() )
+ return false;
+
#if wxUSE_PALETTE
wxASSERT_MSG( !palette.IsOk(), wxT("palettes not supported") );
#endif // wxUSE_PALETTE

@ -1 +1 @@
SHA512 (wxWidgets-3.0.4.tar.bz2) = c9e6b35d541a99921c54cfdac260843f574f146b27f924a7a0fca5007344fa99865a96ded95e6802329ad9221b4880d62b92277a1b4c1ce71420acb672ad9158
SHA512 (wxWidgets-3.0.5.1.tar.bz2) = 0a789fc5e71d414e43f75b5c16076fe8b1bcd7671be0770e4269dcef66d830c1bc74e183f49db270b928862f13472666c283fe2aa98b9006681722e06100725d

@ -17,8 +17,8 @@
%global builddocs 1
Name: %{wxgtkname}
Version: 3.0.4
Release: 15%{?snapshottag}%{?dist}
Version: 3.0.5.1
Release: 1%{?snapshottag}%{?dist}
Summary: GTK port of the wxWidgets GUI library
License: wxWidgets
URL: https://www.wxwidgets.org/
@ -38,8 +38,7 @@ Source10: wx-config
Patch0: %{name}-3.0.3-abicheck.patch
Patch1: fix-filename-test.patch
Patch2: fix-vararg-test.patch
Patch3: fix-glcanvas-crash-wayland.patch
Patch4: force-x11-for-wxgl.patch
Patch3: force-x11-for-wxgl.patch
BuildRequires: gcc-c++
BuildRequires: gtk2-devel
@ -457,6 +456,9 @@ fi
%doc html
%changelog
* Sun May 10 2020 Scott Talbert <swt@techie.net> - 3.0.5.1-1
- Update to new upstream release 3.0.5.1
* Fri Mar 13 2020 Scott Talbert <swt@techie.net> - 3.0.4-15
- Bring back alternatives system for wx-config and wxrc

Loading…
Cancel
Save