From 5fad466e7d9147ec1c411019e2f047a97f329327 Mon Sep 17 00:00:00 2001 From: Sylvain POULAIN Date: Fri, 8 May 2026 09:01:51 +0400 Subject: [PATCH 01/12] Fix #1483 Fix #1483 --- gui/wxpython/wxgui.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gui/wxpython/wxgui.py b/gui/wxpython/wxgui.py index 05212146fd2..d466fc3f2fa 100644 --- a/gui/wxpython/wxgui.py +++ b/gui/wxpython/wxgui.py @@ -37,6 +37,15 @@ # during start up, remove when not needed import wx.adv +# Patch: fix GTK-CRITICAL assertion width/height >= -1 +def _patch_gtk_size(): + _orig = wx.Window.DoMoveWindow + def _safe(self, x, y, w, h): + return _orig(self, x, y, max(w, 0), max(h, 0)) + wx.Window.DoMoveWindow = _safe + +_patch_gtk_size() + try: import wx.lib.agw.advancedsplash as SC except ImportError: From 0093591e27dfde062d4d68cd1802716f89bfa2e4 Mon Sep 17 00:00:00 2001 From: Sylvain POULAIN Date: Fri, 8 May 2026 09:05:05 +0400 Subject: [PATCH 02/12] Update gui/wxpython/wxgui.py Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- gui/wxpython/wxgui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/wxpython/wxgui.py b/gui/wxpython/wxgui.py index d466fc3f2fa..305fdc1c6d1 100644 --- a/gui/wxpython/wxgui.py +++ b/gui/wxpython/wxgui.py @@ -37,7 +37,8 @@ # during start up, remove when not needed import wx.adv -# Patch: fix GTK-CRITICAL assertion width/height >= -1 + +# Patch: fix GTK-CRITICAL assertion width/height >= -1 def _patch_gtk_size(): _orig = wx.Window.DoMoveWindow def _safe(self, x, y, w, h): From bc9c4c48d551149866a14e1d1328068c89e02d01 Mon Sep 17 00:00:00 2001 From: Sylvain POULAIN Date: Fri, 8 May 2026 09:08:06 +0400 Subject: [PATCH 03/12] Update gui/wxpython/wxgui.py Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- gui/wxpython/wxgui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/wxpython/wxgui.py b/gui/wxpython/wxgui.py index 305fdc1c6d1..7c43b53f616 100644 --- a/gui/wxpython/wxgui.py +++ b/gui/wxpython/wxgui.py @@ -42,7 +42,8 @@ def _patch_gtk_size(): _orig = wx.Window.DoMoveWindow def _safe(self, x, y, w, h): - return _orig(self, x, y, max(w, 0), max(h, 0)) + return orig(self, x, y, max(w, 0), max(h, 0)) + wx.Window.DoMoveWindow = _safe _patch_gtk_size() From 958321af6eb7357293cf3ae49068407c6c6d068e Mon Sep 17 00:00:00 2001 From: Sylvain POULAIN Date: Fri, 8 May 2026 09:09:22 +0400 Subject: [PATCH 04/12] Update gui/wxpython/wxgui.py Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- gui/wxpython/wxgui.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/wxpython/wxgui.py b/gui/wxpython/wxgui.py index 7c43b53f616..f2b4d45962c 100644 --- a/gui/wxpython/wxgui.py +++ b/gui/wxpython/wxgui.py @@ -41,6 +41,7 @@ # Patch: fix GTK-CRITICAL assertion width/height >= -1 def _patch_gtk_size(): _orig = wx.Window.DoMoveWindow + def _safe(self, x, y, w, h): return orig(self, x, y, max(w, 0), max(h, 0)) From c59ae49eb24fda6c302e7817ad37d594fd61fda8 Mon Sep 17 00:00:00 2001 From: Sylvain POULAIN Date: Fri, 8 May 2026 09:09:35 +0400 Subject: [PATCH 05/12] Update gui/wxpython/wxgui.py Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- gui/wxpython/wxgui.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/wxpython/wxgui.py b/gui/wxpython/wxgui.py index f2b4d45962c..aebd1073c8b 100644 --- a/gui/wxpython/wxgui.py +++ b/gui/wxpython/wxgui.py @@ -47,6 +47,7 @@ def _safe(self, x, y, w, h): wx.Window.DoMoveWindow = _safe + _patch_gtk_size() try: From bc84d03c1211d7afc529ea29886e420eed30f14f Mon Sep 17 00:00:00 2001 From: Sylvain POULAIN Date: Fri, 8 May 2026 09:12:54 +0400 Subject: [PATCH 06/12] Update wxgui.py --- gui/wxpython/wxgui.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/gui/wxpython/wxgui.py b/gui/wxpython/wxgui.py index aebd1073c8b..be92ba785a3 100644 --- a/gui/wxpython/wxgui.py +++ b/gui/wxpython/wxgui.py @@ -38,17 +38,15 @@ import wx.adv -# Patch: fix GTK-CRITICAL assertion width/height >= -1 -def _patch_gtk_size(): - _orig = wx.Window.DoMoveWindow - +# Fix GTK-CRITICAL assertion width/height >= -1 +def patch_gtk_size(): + orig = wx.Window.DoMoveWindow def _safe(self, x, y, w, h): return orig(self, x, y, max(w, 0), max(h, 0)) - + wx.Window.DoMoveWindow = _safe - -_patch_gtk_size() +patch_gtk_size() try: import wx.lib.agw.advancedsplash as SC From f9d76ac1f222fc47c65f2229b7846a50f4f868de Mon Sep 17 00:00:00 2001 From: Sylvain POULAIN Date: Fri, 8 May 2026 10:29:20 +0400 Subject: [PATCH 07/12] Apply suggestion from @github-actions[bot] Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- gui/wxpython/wxgui.py | 1 - 1 file changed, 1 deletion(-) diff --git a/gui/wxpython/wxgui.py b/gui/wxpython/wxgui.py index be92ba785a3..e8cefa7d02a 100644 --- a/gui/wxpython/wxgui.py +++ b/gui/wxpython/wxgui.py @@ -43,7 +43,6 @@ def patch_gtk_size(): orig = wx.Window.DoMoveWindow def _safe(self, x, y, w, h): return orig(self, x, y, max(w, 0), max(h, 0)) - wx.Window.DoMoveWindow = _safe patch_gtk_size() From 8192b953a3c499eee1821b56542e4a485894bd96 Mon Sep 17 00:00:00 2001 From: Sylvain POULAIN Date: Fri, 8 May 2026 10:30:02 +0400 Subject: [PATCH 08/12] Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- gui/wxpython/wxgui.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/wxpython/wxgui.py b/gui/wxpython/wxgui.py index e8cefa7d02a..0738524eda8 100644 --- a/gui/wxpython/wxgui.py +++ b/gui/wxpython/wxgui.py @@ -45,6 +45,7 @@ def _safe(self, x, y, w, h): return orig(self, x, y, max(w, 0), max(h, 0)) wx.Window.DoMoveWindow = _safe + patch_gtk_size() try: From cfee435934d7d17ea73e17b5e0c38dc3ceb8c3e2 Mon Sep 17 00:00:00 2001 From: Sylvain POULAIN Date: Fri, 8 May 2026 10:32:07 +0400 Subject: [PATCH 09/12] Apply suggestion from @github-actions[bot] Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- gui/wxpython/wxgui.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/wxpython/wxgui.py b/gui/wxpython/wxgui.py index 0738524eda8..6b1cb2ba1d0 100644 --- a/gui/wxpython/wxgui.py +++ b/gui/wxpython/wxgui.py @@ -43,6 +43,7 @@ def patch_gtk_size(): orig = wx.Window.DoMoveWindow def _safe(self, x, y, w, h): return orig(self, x, y, max(w, 0), max(h, 0)) + wx.Window.DoMoveWindow = _safe From 49a46d2c71b450884cb85de344e7c8576e1cc4d3 Mon Sep 17 00:00:00 2001 From: Sylvain POULAIN Date: Fri, 8 May 2026 10:34:15 +0400 Subject: [PATCH 10/12] Update wxgui.py --- gui/wxpython/wxgui.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gui/wxpython/wxgui.py b/gui/wxpython/wxgui.py index 6b1cb2ba1d0..59f552b1c97 100644 --- a/gui/wxpython/wxgui.py +++ b/gui/wxpython/wxgui.py @@ -41,6 +41,7 @@ # Fix GTK-CRITICAL assertion width/height >= -1 def patch_gtk_size(): orig = wx.Window.DoMoveWindow + def _safe(self, x, y, w, h): return orig(self, x, y, max(w, 0), max(h, 0)) @@ -49,6 +50,7 @@ def _safe(self, x, y, w, h): patch_gtk_size() + try: import wx.lib.agw.advancedsplash as SC except ImportError: From 80601fb28f6cbd79faea0152d9187798927a4dd2 Mon Sep 17 00:00:00 2001 From: Sylvain POULAIN Date: Fri, 8 May 2026 10:35:50 +0400 Subject: [PATCH 11/12] Update gui/wxpython/wxgui.py Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- gui/wxpython/wxgui.py | 1 - 1 file changed, 1 deletion(-) diff --git a/gui/wxpython/wxgui.py b/gui/wxpython/wxgui.py index 59f552b1c97..af8f9bf030a 100644 --- a/gui/wxpython/wxgui.py +++ b/gui/wxpython/wxgui.py @@ -41,7 +41,6 @@ # Fix GTK-CRITICAL assertion width/height >= -1 def patch_gtk_size(): orig = wx.Window.DoMoveWindow - def _safe(self, x, y, w, h): return orig(self, x, y, max(w, 0), max(h, 0)) From 062d6b33b8f01cc0a45867712281c34a22677695 Mon Sep 17 00:00:00 2001 From: Sylvain POULAIN Date: Fri, 8 May 2026 10:38:25 +0400 Subject: [PATCH 12/12] Update gui/wxpython/wxgui.py Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- gui/wxpython/wxgui.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/wxpython/wxgui.py b/gui/wxpython/wxgui.py index af8f9bf030a..9b91ee031fb 100644 --- a/gui/wxpython/wxgui.py +++ b/gui/wxpython/wxgui.py @@ -41,6 +41,7 @@ # Fix GTK-CRITICAL assertion width/height >= -1 def patch_gtk_size(): orig = wx.Window.DoMoveWindow + def _safe(self, x, y, w, h): return orig(self, x, y, max(w, 0), max(h, 0))