-
Notifications
You must be signed in to change notification settings - Fork 237
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
window grouping using WM_CLASS under x11/XDG desktops #1837
Comments
if I start 2 instances of pd using
whereas the PatchWindows have WM_CLASSes like
the 1st field, the edit: I wonder if edit2: it also works if I use "PdWindow" for StartupWMClass, which makes me think that it would work to use a single class for all pd windows.. |
when I hover over the icons that represent the windows in xfce4-panel, the popup box that allows the window to be closed also uses the correct icon (as well as the title bar for the window). Somehow correct icons are attached to the windows, but not their grouping/panel icon. |
so setting |
so what exactly is the problem you are trying to solve?
|
@umlaeute there are a couple problems: |
not sure i can reproduce this.
that would be my item No.1, yes?
that would be my No.2, yes? |
@umlaeute yes. |
However, other apps like firefox group windows from multiple processes together so maybe having them separate isn't normal |
@umlaeute I tried installing |
you sure you are using the packaged Pd, rather than the self-compiled? the desktop-file shipped with |
@umlaeute when we say 'icon for a window' I'm talking about the icons for the window in the xfce-panel, not the icons in the windows themselves which are correct |
This is what I'm talking about as well. |
huh my xfce-panel is completely different. maybe it's a different version? if so I guess it could be an issue on their end. |
@umlaeute I was using 'docklike taskbar' panel item, which doesn't group the windows correctly or have the correct icon. |
thanks for investigating on this. |
desktop shells implement application window grouping using
WM_CLASS
(and theXClassHint
structure) 'hints'https://linux.die.net/man/3/xclasshint
however it seems like most apps/shells expect that for instance to group windows under the same icon in xfce4-panel (and to use the pd icon) the
res_name
field ofXClassHint
should be the same.it also seems like many shells may also support having the
res_class
field reflect the name of the .desktop file (without the .desktop extension).I'm unclear on if it's possible to use the same
res_name
for multiple tk windows; to me it looks like Tk actively prevents this:https://www.tcl.tk/man/tcl8.6/TkCmd/tk.htm#M5 (though perhaps there's some way to set it without
tk appname
?)..I have been able to get the pd icon to show up for just the pd window (for xfce4-panel) by setting
StartupWMClass=pdwindow
in the desktop file.I think if it would be possible to set
-class
for toplevels to something else that would conform to what many shells do with these 'hints', like setting it to the name of the desktop file or something (but I haven't tested this yet), or by setting it to whateverStartupWMClass
is set to in the.desktop
file.If so perhaps it could be part of adopting a more class-like structure for the pd gui processes, where a 'window type' is stored in some kind of instance field for a window/toplevel patch sent to the gui-side in a standardized way instead of as a tk class, which would reflect the classes 'coming from' pd rather than being specific to the gui used. (of course it would be implementation-specific anyways, but imo it makes sense to standardize sending/storing some class-based object state on the gui side for a given object)
The text was updated successfully, but these errors were encountered: