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 307095 - Some more docs for gtk+ and WindowGroup
Some more docs for gtk+ and WindowGroup
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Documentation
unspecified
Other Linux
: Normal normal
: Small fix
Assigned To: Federico Mena Quintero
gtk-bugs
Depends on:
Blocks: 340166
 
 
Reported: 2005-06-10 04:32 UTC by Todd Berman
Modified: 2014-03-27 10:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
docs.patch (1.13 KB, patch)
2005-06-10 04:33 UTC, Todd Berman
rejected Details | Review

Description Todd Berman 2005-06-10 04:32:08 UTC
The docs don't mention how to limit modality with WindowGroup, attached patch
helps to solve this.
Comment 1 Todd Berman 2005-06-10 04:33:08 UTC
Created attachment 47518 [details] [review]
docs.patch
Comment 2 Owen Taylor 2005-06-10 10:34:17 UTC
I don't think these docs are a good thing. A dialog created in this
way isn't "non-modal" (it wouldn't be accessible if it was) ... it
*independent* of the modality of all other dialogs and windows
of the application. I can't imagine when that makes sense.

Usually, GtkWindowGroup is used when an application wants to have
multiple toplevels that seem like entirely separate applications.
Comment 3 Todd Berman 2005-06-10 17:32:41 UTC
Yeah, I can absolutely see that. However, the current GtkWindowGroup docs are
horrible. Both myself, federico and vektor attempted to solve what most likely
is a common use case (Where you have three windows, A, B and C, with A as the
main toplevel, B as a child of it, and C as a child of that. Make B modal, and
not allow access to A, and allow C to be accessed), and we were all unable to do so.

Anything to clear this up in the docs would be great.
Comment 4 Owen Taylor 2005-06-10 17:47:59 UTC
I don't think window groups are the right solution for your use case...
they don't give the right behavior in the end. I would consider what
you are asking for to be more or less impossible with GTK+ as it is
currently set up.

This may be related to the idea of "attached windows" that I've 
discused with Vektor in the past, where you can specify that
a popup window is logically part of a toplevel window. (Think
drawers.)

The case where C is a real dialog strikes me as pathological ...
a modal dialog with a tool palette or similar is an abuse of 
modality and just bad user interface. (The idea of modality as
an interface of last resort has been a tenet of GUI design 
ever since the beginning of WIMP)
Comment 5 Todd Berman 2005-06-10 17:50:55 UTC
I dont quite see how it isn't the right solution, as it works. We just create a
new WindowGroup for C and then everything works like we want it to. So until
there is a 'real' solution, I don't see why including useful documentation in
the docs is bad (Note, I only added/filed this because federico wanted something)
Comment 6 Owen Taylor 2005-06-10 18:01:02 UTC
The problem is that if another modal dialog is created that overrides
dialog B, then dialog C is not blocked.

It's good you found a workaround that basically fixed your problem, but
I don't think it belongs in the documentation as an approved normal
way to use a GtkWindowGroup.
Comment 7 Todd Berman 2005-06-10 18:05:24 UTC
Makes sense. In our case, there is no modal dialog popped up from B ever, so
it's not an issue.

In our case, the case that B needs to be modal, but needs to have children is
absolutely correct, I agree that in general, it is abusive, but in the domain
where we are working, this is exactly what people expect.

Whenever the API is created for "attached windows" is there a way to make sure
it includes the ability to attach multiple windows? I ask only because our
current use case uses that right now.
Comment 8 Matthias Clasen 2005-06-16 05:11:13 UTC
Wontfix, according to Owens first comment.
Comment 9 Federico Mena Quintero 2005-06-16 15:50:07 UTC
I'll reopen this to remind myself to fix the docs.  I want to have an
explanation of how window groups work in terms of grabs, modality, etc., and
their intended purpose.
Comment 10 Matthias Clasen 2014-03-27 10:09:18 UTC
closing out old bugs