Set WM_CLASS class name as app display name

Gnome seems to use it as a fallback display name with X11. By default, it will
be the capitalized program name, which is what GTK would set it to anyway.
This commit is contained in:
Paul Cornett
2020-05-23 11:14:00 -07:00
parent 0b54f944bc
commit 2c62ac41c1

View File

@@ -25,6 +25,7 @@
#ifndef WX_PRECOMP
#include "wx/frame.h"
#include "wx/app.h" // GetAppDisplayName()
#include "wx/icon.h"
#include "wx/log.h"
#endif
@@ -629,6 +630,11 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
m_title = title;
#ifndef __WXGTK4__
// Gnome uses class as display name
gdk_set_program_class(wxTheApp->GetAppDisplayName().utf8_str());
#endif
// NB: m_widget may be !=NULL if it was created by derived class' Create,
// e.g. in wxTaskBarIconAreaGTK
if (m_widget == NULL)