1
0
Fork 0

Add Linux desktop icons according to XDG spec

Change X11 Window WM_CLASS to 'dosbox-staging' to avoid conflicts with
upstream DOSBox, which might be provided by package manager.

Update .desktop file to specify WMClass to be correlated with
dosbox-staging process (even if executable file conflicts with dosbox
upstream).

Update contrib/icons/Makefile to generate 'hicolor' directory structure.
This commit is contained in:
Patryk Obara 2020-04-15 21:35:37 +02:00 committed by Patryk Obara
parent e5486f67cc
commit a6da84d23e
4 changed files with 39 additions and 0 deletions

View file

@ -3072,11 +3072,20 @@ void Disable_OS_Scaling() {
#endif
}
void OverrideWMClass()
{
#if !defined(WIN32)
constexpr int overwrite = 0; // don't overwrite
setenv("SDL_VIDEO_X11_WMCLASS", "dosbox-staging", overwrite);
#endif
}
//extern void UI_Init(void);
int main(int argc, char* argv[]) {
int rcode = 0; // assume good until proven otherwise
try {
Disable_OS_Scaling(); //Do this early on, maybe override it through some parameter.
OverrideWMClass(); // Before SDL2 video subsystem is initialized
CommandLine com_line(argc,argv);
Config myconf(&com_line);