From 0ad6ce04d5cccc4975a5062af4c204f9b6130cd0 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:18:40 +0100 Subject: [PATCH] FIX: Don't set_wmclass on GTK3 The method is deprecated, and according to docs should just not be used: https://docs.gtk.org/gtk3/method.Window.set_wmclass.html The docs suggest gtk_window_set_role(), but AFAICS this is only helpful if one want to place the window in a certain position when restarting a session. I assume we don't want/need that. --- lib/matplotlib/backends/_backend_gtk.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/matplotlib/backends/_backend_gtk.py b/lib/matplotlib/backends/_backend_gtk.py index 565d92932023..ac443730e28a 100644 --- a/lib/matplotlib/backends/_backend_gtk.py +++ b/lib/matplotlib/backends/_backend_gtk.py @@ -143,7 +143,6 @@ def __init__(self, canvas, num): super().__init__(canvas, num) if gtk_ver == 3: - self.window.set_wmclass("matplotlib", "Matplotlib") icon_ext = "png" if sys.platform == "win32" else "svg" self.window.set_icon_from_file( str(cbook._get_data_path(f"images/matplotlib.{icon_ext}")))