Subject: bug#745: pop-to-buffer, frames, and input focus

From: martin rudalics <[email-masked]>
Date: Fri, 29 Aug 2008 11:26:50 +0200

> Emacs could first test whether the window manager is EWMH compliant

How?  Emacs can't even test whether the window manager is click to focus
or focus follows mouse.

 > and
 > depending on the outcome only call one of those functions.
 > x_ewmh_activate_frame seems to test whether the WM supports
 > "_NET_ACTIVE_WINDOW".  I guess, we could just move that over to
 > x-focus-frame.
 >
 >>> We agreed that we wont fix 3.
 >> Yes.
 >
 > Over night I had a little idea that could be useful.  I'm just writing
 > it down here so that it's not lost: We could avoid the focus-when-mapped
 > problem, if we clear the input flag in WM_HINTS (the GTK equivalent
 > seems to be gtk_window_set_accept_focus) when we create the frame.

Again this would work iff we knew that the window manager is EWMH
compliant.

 > But
 > when we receive the MapNotify event, we enable the flag.  This should
 > prevent the window manager from focusing the frame initially but
 > afterwards it should be treated as usual.
 >
 > I also found the gtk_window_set_focus_on_map function.  This seems to
 > rely on the _NET_WM_USER_TIME EWMH.  Sawfish ignores _NET_WM_USER_TIME,
 > but it could be useful for other window managers.

And this would have to be supplied by the user separately.  Or is there
some way to get such basic information from window-managers?

martin