-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Version should not be part of window class (possibly Linux-only problem) #215
Comments
I researched this issue. glfw uses the window title as the class name by default. There is a possibility to change it manually. Unfortunately the glfw stuff is encapsulated inside Silk.net (a library I used for windowing etc). But I will add the possibility to this lib soon, if I am allowed to. The update will then come with one of the next Silk.net releases hopefully and I can integrate it into the next Ambermoon.net release. |
I contributed to the window backend I am using and integrated a possibility to explicitly set the window class. They released the update yesterday so I can now implement a fixed window class for X11. :) Will be part of the 1.4 release. |
This should work in 1.4. I need some testers on X window systems to verify it. |
Yep, it does work now - thanks :) |
Regression!! Regression!! |
Whoot? What version do you use? |
happened with at least with 1.6.3, 1.6.5 and 1.6.6. Didn't test for quite a while before that |
Can you try some versions in-between to pin it down to some version range? |
well... now I'm totally confused... I tried 1.4.0, 1.4.1 and 1.5.0 and all of them display the version as part of the class again! To make sure, it's not because of some weird misconfiguration, I tested as my tmp user (whose home directory is in a ram-disk) as well - same thing there. The only explanation I can think of is that it's also dependend on some system library that has been upgraded, but have no idea which :/ |
Maybe it is caused by glfw. I only give the class name as a hint to glfw and hope for the best. Maybe some glfw update changed the behavior? |
I also think that the hint only works with X11. But I guess you are still using it. Maybe it is a bug in glfw with some recent update. |
The only match for glfw, I can find on my system is part of Ambermoon.net - so that's probably not it (unless you retrofitted the old versions with a new glfw)
Window class should work in Wayland as far as I know, but yeah - I'm still using X11. There's no doubt about Wayland getting better, but I still find something that's not working right every time I try it. |
Another possibility would be that glfw uses some environment variable. There are two things: the class name and the instance name. Both can be set via a hint but I think I only set the hint for the class name. Could it be that the instance name is the important one here? Can you try to set the environment variable RESOURCE_NAME to something while running the exe. It seems that glfw uses that variable if it is filled and the hint is not set. I only want to rule out any possible side effects. I found this info here: https://nimgl.dev/docs/glfw.html. Maybe there is more. |
Finally got time for hobby projects again :) I tried setting the RESOURCE_NAME variable, but that only sets the less interesting part of the WM_CLASS -- the one that's used for a specific instance of a window:
vs.
Any relevant matching that I'm aware of, needs the other part. |
I took a look at your code (GameWindow.cs -> Run()) to see which functions you use and if I maybe spot something... as far as I can see, it looks fine. |
Well in the end it all comes down to the glfw hints I guess. And yeah the docu is pretty bad. :D |
In that case, I'll pause this for now. As KDE Neon is finally done rebasing on the current Ubuntu LTS, I'll probably do either a major system upgrade or, after many years, a full reinstall within the next two weeks.. I wonder if that will change anything. |
By any chance did you have time to test again? Would be nice if we could resolve this at some point. |
I tried with 1.9.0 - unfortunately the problem still exists :/ |
Ambermoon.net currently reports it's WM_CLASS as
"Ambermoon.net v1.1.0", "Ambermoon.net v1.1.0"
but should be
"Ambermoon.net", "Ambermoon.net"
From the X Documentation (see https://tronche.com/gui/x/icccm/sec-4.html#WM_CLASS):
The last part (identifying information) is the important one here.
Ambermoon.net uses the same WM_CLASS value as it's title, which contains the version. The information is used by applications like window managers to apply specific settings like "no border", always open on desktop 1, keep above other windows / the task bar, etc. to certain windows.
If the version information is present, these settings have to be manually updated on each update.
The WM_CLASS is independent of the window title, which may still contain the version or even change during runtime.
The text was updated successfully, but these errors were encountered: