-
Notifications
You must be signed in to change notification settings - Fork 176
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
Linux Qt5 version changes its WM_CLASS after startup, causing it to be unpinnable to taskbar #4246
Comments
I will ask at Lazarus forum. for the last month, I have little different FPC+Lazarus setup on a different PC. |
Let's test on simplest demo. After you check one or both CheckBoxes, app writes 'app.ini'. On next start, it uses this ini-file and changes app title. Do you see bug with any of checkboxes On? |
Here are my results for the test. First run, then with OnCreate checked, then with OnShow checked, and then with both checked.
So there's incorrect behavior in all cases. The second value of WM_CLASS is being changed to the window title, but that's not what it's for. It's supposed to be a consistent identifier for the app regardless of what its title is, as explained by the link I shared in the OP. The ICCCM docs explain it even more in depth, in addition to why there are two values. Firefox's WM_CLASS is With this minimal test case, you've shown that Lazarus's current behavior is wrong. Thank you for making that! :) |
Have the Lazarus folks responded about this? I have to stay back on 1.166.5 because of this issue. It's still present in 1.170. |
Interesting... I'll add what I see on this. I'm running 1.170 via flatpak. I'm seeing the same thing.
I installed the 1.170 via AUR on arch, and first time I ran it, I saw this:
Second time, this:
What is before MYHOSTNAME should be the WMCLASS
|
|
no reply to me on Laz forum - yet |
The current version of CudaText Qt5 is still exhibiting the incorrect behavior, but Plasma as of 5.25 (what's available in Kubuntu 22.04's backports-extra) seems to be working around it somehow. I haven't been able to find any information on APIs in Qt for manipulating this. Regular Qt apps like Dolphin the file manager, Dolphin the emulator, and ProtonUp-Qt are doing the right thing. As far as I can tell, the various application classes within Qt will set the WM_CLASS of any windows created according to the application name you give them. Which tells me that not only is Lazarus doing things very wrong, it's going out of its way to do so. |
I still wait the reaction of Lazarus developer Zeljko. |
i am closing this, due to lacking of Laz dev reaction. |
Uhhh... lack of reaction from the Lazarus developer doesn't mean the issue doesn't exist, it just means that the Lazarus developer sucks. I'm not sure I can trust any application built on Lazarus if the developer goes out of his way to break correct application behavior on Linux and doesn't respond to bringing it up. |
Hi there. CudaText currently has some incorrect behavior after startup with regards to its own WM_CLASS property, which causes it to not be able to be pinned to the taskbar on KDE Plasma. During startup, as seen by Devilspie2 when its window is created, it has a correct value for the class field of WM_CLASS of "CudaText", but after startup, it changes it to "Untitled1 - CudaText", even if it's immediately opening a file.
Documentation for this property says that these values should not be changed. It seems like "Untitled1 - CudaText" is supposed to go into WM_NAME at some point, but instead it ends up in the class field of WM_CLASS.
This is a regression; it works in version 1.166.5, and does not work in 1.167.5. I tested by reverting the Flathub package. There was no build for 1.167.0 in Flathub to test against. It would not surprise me if this is a Lazarus bug.
The text was updated successfully, but these errors were encountered: