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 83357 - Implement system modal windows
Implement system modal windows
Status: RESOLVED WONTFIX
Product: metacity
Classification: Other
Component: general
unspecified
Other All
: Normal enhancement
: future
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks: 92102
 
 
Reported: 2002-05-29 11:05 UTC by Balamurali Viswanathan
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
grab system modal dialog (4.74 KB, patch)
2002-07-22 06:41 UTC, JeyaSudha
none Details | Review
Recreated the patch (4.37 KB, patch)
2002-09-02 04:28 UTC, JeyaSudha
none Details | Review

Description Balamurali Viswanathan 2002-05-29 11:05:27 UTC
When I invoke a modal dialog with metacity I am able to Navigate to other
windows i.e. the other open windows are getting focused when clicked.
I guess when we have modal dialog then we should not be able to 
Navigate to other windows unless the modal dialog is closed.
Presently even if I get a terminal above the modal window I am not able to
type anything in the terminal. When I press space bar or the return key
the modal dialog which has only a OK button gets killed even if it is
behind the terminal.

So can other windows have focus when we have a modal dialog? 

I used the sample program from the O'Reilly Volume 6 on Motif
to demonstrate this. The code is available on the O'Reilly
web site, ch05 - program "modal". http://examples.oreilly.com/v6a/

Start the program. Select the system modal button which 
brings up a system modal dialog with a single button.

Thanks.
Comment 1 Luis Villa 2002-05-30 18:55:01 UTC
I'm pretty sure I've never seen a WM that behaves like this (under
Linux) so I can't really class this as a bug. That said... it seems
like it would be a really sane/good behavior. [Might be misrembering
other WM's behaviors, of course, but I've checked with sawfish and
this does not appear to be the case.]
Comment 2 Havoc Pennington 2002-05-30 20:01:12 UTC
I wonder how this interacts with keyboard navigation; for example 
if I'm using the mouse I might be able to click the close button on
the parent window of the modal dialog, but if I'm doing keynav I would
only be able to close the window if I can focus it.
Comment 3 JeyaSudha 2002-07-22 06:41:59 UTC
Created attachment 10001 [details] [review]
grab system modal dialog
Comment 4 JeyaSudha 2002-08-09 16:04:28 UTC
Havoc, did you have any chance to look at this patch!
Comment 5 Havoc Pennington 2002-08-09 16:39:31 UTC
This one definitely needs a lot of detail from UI guys on 
how it's supposed to work, before putting in the feature.
Comment 6 JeyaSudha 2002-08-12 10:17:10 UTC
Havoc, can you please tell who are those UI guys ... and shall we add
cc to them to start it.
Comment 7 Havoc Pennington 2002-08-12 14:52:21 UTC
they are already cc'd, usability-maint
Comment 8 Calum Benson 2002-08-20 10:40:29 UTC
I think bala's concerns are correct... the whole point of making a
window modal is that you can't interact with any other windows until
you've dealt with it.  If you can close its parent window while its
open, who knows what sort of unstable state you might leave the system
in (especially with system modal dialogs, although nobody should be
using those).
Comment 9 Calum Benson 2002-08-20 11:00:10 UTC
Ah, hang on though, I see why the current behaviour is more or less
correct, now, for app-modal dialogs at least... you wouldn't be able
to minimize an app until you'd dismissed its app-modal dialog, which
would be rather annoying.  For system modal dialogs, though, that
would probably be a good thing.

So, I think the only 'problem' here is that you can focus the parent
window while it has an app-modal window is open, even though it's
totally non-interactive.  Is there any way to keep the focus on the
app-modal child even if you click in the parent window?  (Whilst
keeping the parent window's maximize and minimize buttons active?)
Comment 10 Havoc Pennington 2002-08-20 15:10:58 UTC
Calum two questions here - 
 - for app modal dialog I agree 100% of course you shouldn't 
   be able to focus other windows in the app
 - for system modal dialog, we have no such concept at the moment
   so I'm asking a higher-level question about whether to add
   one and when to use it and how it behaves
Comment 11 Calum Benson 2002-08-22 13:24:07 UTC
We don't have a concept of a system modal dialog?  What are all the
references to SYSTEM_MODAL hints in JeyaSudha's patch then?  I'm
confused... :/
Comment 12 Havoc Pennington 2002-08-22 21:58:26 UTC
SYSTEM_MODAL in the patch is an old Motif hint that nothing much
really uses, AFAIK. No window managers other than mwm/dtwm have every
supported it to my knowledge. I don't personally have a clue what this
hint is supposed to do when set, or whether it makes sense for GNOME
to support it.
Comment 13 Calum Benson 2002-08-23 15:34:49 UTC
I assume all it's supposed to do is disallow interaction with any
other window on the destkop until you've dismissed it-- kind of like
the Logout dialog, which is about the only time I've ever seen a
system modal dialog legitimately used.

I guess support would only be useful if somebody was running a Motif
app under GNOME that happened to need it.  However, using system modal
dialogs is pretty bad form (according to both the Motif Style Guide
and the HIG), so I don't think this is an urgent requirement.
Comment 14 Havoc Pennington 2002-08-31 03:19:54 UTC
#92102 says this is in sun-patches; I think it would be kind of a
dubious idea to put this in Sun metacity without putting it in
mainline, because there are too many possible interactions with other
apps, the wm spec, and with the internals of metacity. i.e. this patch
will break often.

I'm not saying I'll be upset if you put it in the Sun patches, it's up
to you to make the call, I'm just saying it's the sort of thing I
wouldn't put in Red Hat specific patches because I'd expect it to
cause me pain.
Comment 15 JeyaSudha 2002-09-02 04:28:23 UTC
Created attachment 10844 [details] [review]
Recreated the patch
Comment 16 mike 2002-09-23 10:22:27 UTC
Agree with Havoc - I can see this causing a world of agro. It seems
similar to how windows behaves (and I dont like it)

For example if you have an app that respawns (eg: nautilus) then you
would probably need to logout to carry on working if a problem came up
Comment 17 Havoc Pennington 2002-09-24 19:01:48 UTC
Doing this via XGrabPointer() seems pretty unrobust to me. 
I might just refuse to focus any other windows, and not pass through
clicks to other windows, or something like that...

But I don't know, it'd take some experimentation, and we don't even
know if we want the feature - it's not covered in the HIG.
Comment 18 Calum Benson 2002-10-01 18:29:42 UTC
The reason system modal dialogs aren't covered in the HIG is because
no app should ever use them except in the direst of circumstances...
actually I think the HIG does say *that*, but nothing else :)  

Even for the usual "this app has died" case, an app-modal dialog is
usually the order of the day, unless there's a consequent risk of
damaging/losing data in some other application if you were to continue
using that other application.  On a memory-managed, multitasking
system, this is, hopefully, very unlikely to ever happen :)
Comment 19 Havoc Pennington 2002-10-01 18:36:22 UTC
So:

 - this really hard to figure out how to implement, current 
   patch has issues
 - we have no definition of what behavior we would 
   ideally have if it were implemented (what happens 
   if you click various places, what guarantees we make 
   to the app)
 - there is no standard window manager hint for it
 - the HIG says to never (or basically never) use the feature
 - if the app just wants a pointer grab, it can do that itself, 
   with no window manager assistance; and that's all the 
   current implementation does
Comment 20 Havoc Pennington 2003-02-22 22:45:48 UTC
Closing bug since the implementation code is broken and I don't 
see how to make it not broken, and the usability team thinks 
the feature is a bad idea. Which leaves us with "why the heck 
is it in sun-patches?" but not my problem. ;-)