GNOME Bugzilla – Bug 595708
WM_WINDOW_ROLE should be unique
Last modified: 2012-10-07 16:18:53 UTC
Currently GIMP sets the same role for similar windows, all docks are "gimp-dock", all images are "gimp-image". The spec requires unique IDs, so docks could be "gimp-dock-NUM" or "gimp-dock-RANDSTRING".
Let's try to fix this for 2.8 along with the single-window mode.
Doesn't seem to make any sense to require a unique role. Please add a link to the relevant parts of the spec.
http://tronche.com/gui/x/icccm/sec-5.html last paragraph of 5.1
Then GIMP is obviously using the role totally wrong. I was under the assumption that it should describe the role of a window, not provide a means to uniquely identify it. If we wanted to "fix" this, then we would best set no role at all. That will however break quite a few window manager hints that people are using out there, as most of these successfully use the role to identify classes of GIMP windows that they want to have treated specially. I am not sure if it's worth to break all this just to be fully spec con-formant. Bug reporter, can you please outline why you filed this bug. Is there a problem with the way that GIMP uses the role currently?
The problem is all docks are the same thing for window managers or other tools that conform to the spec. Nothing in the spec forbids those apps to do partial matches in the property (many can do it fine). Using gimp-dock-1, gimp-dock-2, etc would be right and perfectly compatible for common usages.
I think it's pretty clear we can do better. Confirming.
Since we want to get out 2.8 as soon as possible and since this seems to be a problem only for hackers that scripts their window manager (correct me if I'm wrong), I'm postponing this to Future.
Fixed in master: commit d4c72cd5abaece9a69b46e035422d5cde70e56d4 Author: Michael Natterer <mitch@gimp.org> Date: Sun Oct 7 18:16:35 2012 +0200 Bug 595708 - WM_WINDOW_ROLE should be unique Make the roles of toolbox, dock and image window unique by adding a serial number, resulting in e.g. gimp-dock-1. app/dialogs/dialogs-constructors.c | 20 ++++++++++++++++++-- app/display/gimpimagewindow.c | 8 +++++++- 2 files changed, 25 insertions(+), 3 deletions(-)