Re: [gtk-list] Patch for modal windows, and more.




Elliot Lee <sopwith@redhat.com> writes:

> This is a rather crude hack to try get the ball rolling with modal
> dialogs. 

Great!

> It will drive you crazy if you have your WM in FocusFollowsMouse
> mode,

Yep. And I think that may still (always!) be the majority setting.

>  but the point of it is to make sure the modal window always has
> focus.

Not sure why we want this. It's just as important to catch mouse
events outside the window. Unfortunately, as in all things X,
there is no uniformity in the implementation of modal dialogs, but
a quick survey of a few applications revealed some salient features:

1. Only events in the topmost modal dialog are processed normally,
others are either ignored, or in some programs responded to with a
beep. (But only mouse clicks or key presses should get a beep, not
enter/leave etc.)

2. The window is (usually, not always) kept on top of all windows
(including those of other programs). I'm not sure if this is done
by setting some type of WM hint, or by responding to Circulate
Events. 

We probably should try to stick somewhat close to this model -
though gtk fortunately doesn't slavishly imitate Motif, it shouldn't
become too nonstandard for no good reason.

#2 could be handled pretty much like you've done for focus events -
create a window type with special handling; #1 should probably be
handled by generalizing gtk's grabs.

Just some thoughts,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]