Skip to content

Unify WM_CLASS across backends #8394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/matplotlib/backends/backend_gtk.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ def __init__(self, canvas, num):
FigureManagerBase.__init__(self, canvas, num)

self.window = gtk.Window()
self.window.set_wmclass("matplotlib", "Matplotlib")
self.set_window_title("Figure %d" % num)
if window_icon:
try:
Expand Down
1 change: 1 addition & 0 deletions lib/matplotlib/backends/backend_gtk3.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ def __init__(self, canvas, num):
FigureManagerBase.__init__(self, canvas, num)

self.window = Gtk.Window()
self.window.set_wmclass("matplotlib", "Matplotlib")
self.set_window_title("Figure %d" % num)
try:
self.window.set_icon_from_file(window_icon)
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/backend_qt5.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def _create_qApp():
if display is None or not re.search(r':\d', display):
raise RuntimeError('Invalid DISPLAY variable')

qApp = QtWidgets.QApplication([str(" ")])
qApp = QtWidgets.QApplication(["matplotlib"])
qApp.lastWindowClosed.connect(qApp.quit)
else:
qApp = app
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/backend_tkagg.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def new_figure_manager_given_figure(num, figure):
Create a new figure manager instance for the given figure.
"""
_focus = windowing.FocusManager()
window = Tk.Tk()
window = Tk.Tk(className="matplotlib")
window.withdraw()

if Tk.TkVersion >= 8.5:
Expand Down