LINUX.ORG.RU

История изменений

Исправление Zubok, (текущая версия) :

Вот объяснение. Но вот не ясно, в какое все же значение GTK ставит WM_CLASS. Проверь xprop WM_CLASS и тыкни в свое окно. Что там показывает?

https://developer.gnome.org/gtk3/stable/GtkWindow.html#gtk-window-set-wmclass:

Don’t use this function. It sets the X Window System “class” and “name” hints for a window. According to the ICCCM, you should always set these to the same value for all windows in an application, and GTK+ sets them to that value by default, so calling this function is sort of pointless. However, you may want to call gtk_window_set_role() on each window in your application, for the benefit of the session manager. Setting the role allows the window manager to restore window positions when loading a saved session.

Исходная версия Zubok, :

Вот объяснение. Но вот не ясно, в какое все же значение GTK ставит WM_CLASS. Проверь xprop WM_CLASS и тыкни в свое окно. Что там показывает?

Don’t use this function. It sets the X Window System “class” and “name” hints for a window. According to the ICCCM, you should always set these to the same value for all windows in an application, and GTK+ sets them to that value by default, so calling this function is sort of pointless. However, you may want to call gtk_window_set_role() on each window in your application, for the benefit of the session manager. Setting the role allows the window manager to restore window positions when loading a saved session.