all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Helmut Eller <eller.helmut@gmail.com>
Cc: 745@emacsbugs.donarmstrong.com
Subject: bug#745: pop-to-buffer, frames, and input focus
Date: Thu, 28 Aug 2008 13:46:15 +0200	[thread overview]
Message-ID: <48B69007.20604@gmx.at> (raw)
In-Reply-To: <m23akqlitm.fsf@gmail.com>

 > A way to call one of XSetInputFocus or x_ewmh_activate_frame without
 > calling the other would be useful for experimentation.  But I think that
 > few people will use/need that.  So, no, it shouldn't be customizable.

I'm afraid that we fix this just for the platforms we use.  If someone
reports a breakage of this on another platform before the release we
might be able to fix it there as well.  Otherwise this will go the way
of most "fixes" in this department.

 > It think it would be nice (but not worth to implement) if Emacs could be
 > customized with two "focus models":
 >
 >  1. Let the window manager do all the focus handling.  This is similar
 >     to what Emacs does currently.  In this model Emacs should use
 >     x_ewmh_activate_frame without XSetInputFocus [I think that this would
 >     avoid some race conditions].  pop-to-buffer could
 >     still "activate" the frame, but it would be merely a hint and no
 >     guarantee.  Creating frames which aren't focused initially is
 >     probably hard(er) in this model.

We agreed that the latter isn't realistic anyway.

 >  2. Emacs does its own focus management.  In this model, Emacs should
 >     clear the input flag in WM_HINTS, handle WM_TAKE_FOCUS events, and
 >     explicitly call XSetInputFocus.  A reasonable window manager will
 >     handle FocusIn events to decorate the focused frame appropriately.
 >     Since the input flag is cleared, the WM shouldn't focus new frames.
 >     [This model may be incompatible with toolkits, like GTK.]

And why do you think this not worth implementing?

 > Yes, without waiting.  If we call
 >
 >   (select-frame-set-input-focus (window-frame (display-buffer ...)))
 >
 > we don't wait for FocusIn.

Is there a place where Emacs _should_ wait for a FocusIn?

 > Since we don't have a window manager which causes trouble, we can't even
 > test whether the change makes any difference.  Let's wait until somebody
 > reports actual problems :-)

You've read some of the earlier threads - and there's a lot more of
these (some of them related to frame resizing).  We do have to
anticipate such problems now: People usually don't go through the
troubles testing this with any window-manager but their own.

 > I think that, if "System Dependent" stays the default, then few people
 > will profit from the other choices, simply because few people take the
 > time to customize it.

But if they complain we can give them an option to test.

 > Despite that, I think that very few people prefer
 > the current behavior.

It's not a question of preference.  It might simply work for them.  So
let's not cause unwanted breakage.

 >> This has the drawback that we unconditionally do
 >> `select-frame-set-input-focus' for new frames.  If we decide that this
 >> won't harm ...
 >
 > Most of the time it will work flawlessly on new frames.  What's the
 > worst that could happen?  Some flickering.  I think that we can live
 > with that imperfection.

Maybe there's more than just some imperfection.

martin







  reply	other threads:[~2008-08-28 11:46 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <48C8C046.50203@gmx.at>
2008-08-20  7:35 ` bug#745: pop-to-buffer, frames, and input focus Helmut Eller
2008-08-20 14:50   ` martin rudalics
2008-08-20 18:42     ` Helmut Eller
2008-08-20 20:42       ` David Reitter
2008-08-20 20:56       ` martin rudalics
2008-08-21  8:07         ` Helmut Eller
2008-08-21  9:04           ` martin rudalics
2008-08-21 13:20             ` Helmut Eller
2008-08-21 20:31               ` martin rudalics
2008-08-22 14:27                 ` Helmut Eller
2008-08-22 16:39                   ` martin rudalics
2008-08-23  8:55                     ` Helmut Eller
2008-08-23 12:05                       ` martin rudalics
2008-08-24 13:14                         ` Helmut Eller
2008-08-25 13:45                           ` martin rudalics
2008-08-26 21:45                             ` Helmut Eller
2008-08-27  8:12                               ` martin rudalics
2008-08-27 12:54                                 ` Helmut Eller
2008-08-28 11:46                                   ` martin rudalics [this message]
2008-08-28 16:47                                     ` Helmut Eller
2008-08-28 21:26                                       ` martin rudalics
2008-08-29  7:39                                         ` Helmut Eller
2008-08-29  9:26                                           ` martin rudalics
2008-08-29 15:02                                             ` Helmut Eller
2008-08-30  8:15                                               ` martin rudalics
2008-08-30 11:06                                                 ` Helmut Eller
2008-08-30 13:42                                                   ` martin rudalics
2008-08-31  8:55                                                     ` Helmut Eller
2008-09-06 11:56                                                       ` martin rudalics
2008-09-09  6:24                                                         ` Helmut Eller
2008-09-11  7:05   ` bug#745: marked as done (pop-to-buffer, frames, and input focus) Emacs bug Tracking System

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48B69007.20604@gmx.at \
    --to=rudalics@gmx.at \
    --cc=745@emacsbugs.donarmstrong.com \
    --cc=eller.helmut@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.