! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Panel works suboptimal with windowmanager ion3/notion
Status:
RESOLVED: FIXED
Product:
Xfce4-panel

Comments

Description Magnus Bergman 2011-01-14 13:56:02 CET
The windowmanager ion3/notion can be configured to place certain windows into a dock, based on class name and role (WM_CLASS, WM_NAME and WM_WINDOW_ROLE). Then using it with XFCE it's natural to put the panal in the dock. This works just fine except that all top level windows displayed by the panel (such as preference dialogs) gets placed in the dock since they cannot be distinguished from the main window. This is actually a common problem with common solution. Just setting a unique role for (at least) the main panel window. The ICCCM says:

"It is necessary that other clients be able to uniquely identify a window (across sessions) among all windows related to the same client-ID. For example, a window manager can require this unique ID to restore geometry information from a previous session, or a workspace manager could use it to restore information about which windows are in which workspace. A client may optionally provide a WM_WINDOW_ROLE property to uniquely identify a window within the scope specified above. The combination of SM_CLIENT_ID and WM_WINDOW_ROLE can be used by other clients to uniquely identify a window across sessions.

If the WM_WINDOW_ROLE property is not specified on a top level window, a client that needs to uniquely identify that window will try to use instead the values of WM_CLASS and WM_NAME. If a client has multiple windows with identical WM_CLASS and WM_NAME properties, then it should provide a WM_WINDOW_ROLE property."
Comment 1 Nick Schermer editbugs 2011-01-18 12:10:53 CET
Created attachment 3373 
set wm role

Could you try this patch? The window get a role name "xfce4-panel-$stamp", the autohide window appends "-autohide", not sure that is correct or if it should use the same role name.
Comment 2 Nick Schermer editbugs 2011-01-23 12:57:58 CET
Patch pushed in 4a3230b. The role name of the autohide and window is copied, not different.
Comment 3 Magnus Bergman 2011-01-31 16:22:38 CET
No, the patch didn't work (sorry for the slow replay). The role must not be random but known in advance. Further more the panel seem to loose the role property then in configure mode.

I'll try to clearify a bit:

The role property is not supposed to be unique for each window (instance) but for each *type* of window. The panel itself is one type (which could have the role set to "Panel" for example), the preferences dialog is another type and some applets might also have their own types of top level windows. (The role doesn't need to be prefixed with "xfce4-panel" since WM_CLASS can be seen as a private namespace.)

Having a unique ID for each window instance might perhaps also be useful (not in my case thou). But some other property than WM_WINDOW_ROLE should be used for that. Perhaps the easiest would be to set WM_NAME to the panels name?

What I want to do is to put the following line in cfg_dock.lua:

defwinprop{class="Xfce4-panel",role="Panel",is_transient=false,target="*dock*"}

That would place the panel itself in the dock while treating all preferences dialogs and such in the usual way. Without the role property all dialogs will also be placed inside the dock, which isn't very useful.
Comment 4 Nick Schermer editbugs 2011-02-13 14:17:30 CET
Ok, I reverted the unique role, all panels now have the role "Panel". Is that enough, or should I also give the item and preferences dialogs a role name?
Comment 5 Magnus Bergman 2011-02-28 14:26:51 CET
I haven't tried the latest GIT (couldn't get it to build out of the box) but I assume the problem is solved now. For my particular case the preferences dialog doesn't need a role name. But it's probably a generally good idea to set it anyway since the ICCCM standard says it "should" be provided.

Bug #7094

Reported by:
Magnus Bergman
Reported on: 2011-01-14
Last modified on: 2011-03-25

People

Assignee:
Nick Schermer
CC List:
0 users

Version

Attachments

set wm role (3.15 KB, patch)
2011-01-18 12:10 CET , Nick Schermer
no flags

Additional information