After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 595708 - WM_WINDOW_ROLE should be unique
WM_WINDOW_ROLE should be unique
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
git master
Other Linux
: Normal normal
: 2.10
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2009-09-19 22:24 UTC by gsr.bugs
Modified: 2012-10-07 16:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description gsr.bugs 2009-09-19 22:24:30 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".
Comment 1 Martin Nordholts 2009-09-20 06:34:14 UTC
Let's try to fix this for 2.8 along with the single-window mode.
Comment 2 Sven Neumann 2009-09-20 18:15:40 UTC
Doesn't seem to make any sense to require a unique role. Please add a link to the relevant parts of the spec.
Comment 3 gsr.bugs 2009-09-20 18:30:59 UTC
http://tronche.com/gui/x/icccm/sec-5.html last paragraph of 5.1
Comment 4 Sven Neumann 2009-09-20 18:46:50 UTC
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?
Comment 5 gsr.bugs 2009-09-20 19:12:01 UTC
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.
Comment 6 Martin Nordholts 2009-09-20 19:22:57 UTC
I think it's pretty clear we can do better. Confirming.
Comment 7 Martin Nordholts 2010-01-30 06:54:51 UTC
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.
Comment 8 Michael Natterer 2012-10-07 16:18:53 UTC
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(-)