daa84 / neovim-gtk

gtk ui for neovim
GNU General Public License v3.0
718 stars 56 forks source link

Set WM_CLASS to NeovimGtk #56

Closed technetos closed 6 years ago

technetos commented 6 years ago

Currently the WM_CLASS property is set to ".", "." please set the WM_CLASS property to match WM_NAME.

$ xprop
...
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                program specified minimum size: 70 by 48
                program specified base size: 0 by 0
                window gravity: NorthWest
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = ".", "."
WM_ICON_NAME(STRING) = "NeovimGtk"
_NET_WM_ICON_NAME(UTF8_STRING) = "NeovimGtk"
WM_NAME(STRING) = "NeovimGtk"
_NET_WM_NAME(UTF8_STRING) = "NeovimGtk"
daa84 commented 6 years ago

As i understand, if application runs from right desktop file, the WM_CLASS must be set automatically. Can't test it right now, but in gnome this must work i think

technetos commented 6 years ago

It does not make sense to rely on the environment to set the field because the environment the application is launched in is arbitrary.

As an example, I launch nvim-gtk from a keybinding in my i3 config. My environment has no responsibility manage the execution, exec simply runs the executable.