1
0
python-wxPython/0001-Handle-wxGLCanvas-CreateSurface-which-is-only-availa.patch
Jan Engelhardt 56faf98414 Accepting request 1132958 from home:jengelh:branches:X11:wxWidgets
untested, but at least it builds

- Add 0001-Update-wxTextCtrl-OSX-overrides-since-they-re-now-do.patch
  0001-Handle-wxGLCanvas-CreateSurface-which-is-only-availa.patch
  to fix build failures with wx 3.2.4.

OBS-URL: https://build.opensuse.org/request/show/1132958
OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=43
2023-12-26 13:17:53 +00:00

34 lines
920 B
Diff

From 371101db7a010d679d214fde617dae9de02008d9 Mon Sep 17 00:00:00 2001
From: Scott Talbert <swt@techie.net>
Date: Fri, 14 Jul 2023 13:23:03 -0400
Subject: [PATCH] Handle wxGLCanvas::CreateSurface which is only available on
EGL
---
etg/_glcanvas.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/etg/_glcanvas.py b/etg/_glcanvas.py
index 52992ed8..2e578645 100644
--- a/etg/_glcanvas.py
+++ b/etg/_glcanvas.py
@@ -125,6 +125,15 @@ def run():
sipRes = wxGLCanvas::IsDisplaySupported(attribPtr);
""")
+ c.find('CreateSurface').setCppCode("""\
+ #if wxUSE_GLCANVAS_EGL
+ return self->CreateSurface();
+ #else
+ wxPyRaiseNotImplemented();
+ return false;
+ #endif
+ """)
+
#-----------------------------------------------------------------
tools.doCommonTweaks(module)
tools.runGenerators(module)
--
2.43.0