Re: proposal for a smarter behavior for raising windows on mouse click



sawfish implements something similar, it has a _SAWFISH_WM_RAISE_WINDOW wm protocol. When windows advertise they support it, user-initiated window raises are redirected to the client window, similar to how WM_TAKE_FOCUS works

The motivation for adding this was to do drag and drop correctly in nautilus (the version based on gtk 1.x). However, getting things to work correctly was fraught with race conditions, so something more under wm-control may be better..

	John


On Jan 27, 2004, at 11:34 AM, Rob Adams wrote:

This is very similar to my _IS_DRAG_START protocol proposal a while
back, although this proposal has race conditions.

I think that the ideal behavior here is actually how Windows does it:
windows are raised on mouse down if there is no possibility that the
mouse click will be the start of a drag.
if it could be a drag start, such as clicking on an icon in the windows
file manager, the raise is delayed until mouse-up.

My drag-start protocol was an attempt to allow the toolkit to tell the
window manager whether it was safe to raise on mouse down, or if it
should wait until mouse up in response to a given mouse click.

I think that the whatever protocol we come up with will have to look
something like that, though the details are of course important.

-Rob

On Tue, 2004-01-27 at 10:02, Martin Grimme wrote:
Hi,

I have seen there has been an endless discussion going on about whether
mouse clicks into the window area should raise a window in metacity or
not. Havoc's point of view was that we should not ask for yes or no, but
think of a smarter window manager behavior.

From what I have heard, users don't want windows to be raised during:
- drag and drop
- selecting text
- using the scrollbars

This led me to the idea that certain widgets could e.g. set a
_NET_WM_DONT_RAISE flag on their toplevel window which the window
manager checks before actually raising the window.

Imagine the following scenario:
- user clicks on scrollbar arrow
- scrollbar knows that it should not raise the window
- scrollbar sets _NET_WM_DONT_RAISE on its toplevel window
- window manager detects the mouse click and checks for the
  flag
- window manager takes action depending on whether the flag is set
  or not and unsets the flag

(In case that mouse clicks reach the window manager before they reach
the widget, the window manager may check for raising in an
idle handler.)

That way, widgets can determine from the context whether the window is
to be raised or not. All this would of course involve code changes in
the toolkit, maybe applications, and the window manager.

Any comments on this idea?


Bye, Martin


_______________________________________________
wm-spec-list mailing list
wm-spec-list gnome org
http://mail.gnome.org/mailman/listinfo/wm-spec-list

_______________________________________________
wm-spec-list mailing list
wm-spec-list gnome org
http://mail.gnome.org/mailman/listinfo/wm-spec-list




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