GNU bug report logs - #21864
25.0.50; `raise-frame' steals focus some time after being called if the frame was iconified

Previous Next

Package: emacs;

Reported by: Artur Malabarba <bruce.connor.am <at> gmail.com>

Date: Sun, 8 Nov 2015 18:01:02 UTC

Severity: normal

Tags: notabug

Found in version 25.0.50

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21864 in the body.
You can then email your comments to 21864 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#21864; Package emacs. (Sun, 08 Nov 2015 18:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Artur Malabarba <bruce.connor.am <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 08 Nov 2015 18:01:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Artur Malabarba <bruce.connor.am <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50;
 `raise-frame' steals focus some time after being called if the frame
 was iconified
Date: Sun, 08 Nov 2015 18:33:34 +0000
1. On a graphical session, do the following:

    (setq other-frame (make-frame))

2. Iconify (minimize) the newly created frame. 

3. Run the following:

    (let ((cur (selected-frame)))
      (raise-frame other-frame)
      (select-frame cur))

Result: Even though that snippet ends with `(select-frame cur)', focus
is left on `other-frame'.


For comparison, try something else:

1. (setq other-frame (make-frame))

2. Switch back to the original frame, and make sure it is covering the newly created frame.

3. Run the following:

    (let ((cur (selected-frame)))
      (raise-frame other-frame)
      (select-frame cur))

Result: other-frame is correctly raised while focus is correctly left on the original frame.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21864; Package emacs. (Sun, 08 Nov 2015 18:26:02 GMT) Full text and rfc822 format available.

Message #8 received at 21864 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Artur Malabarba <bruce.connor.am <at> gmail.com>, 21864 <at> debbugs.gnu.org
Subject: Re: bug#21864: 25.0.50; `raise-frame' steals focus some time after
 being called if the frame was iconified
Date: Sun, 08 Nov 2015 19:24:33 +0100
>      (let ((cur (selected-frame)))
>        (raise-frame other-frame)
>        (select-frame cur))
>
> Result: Even though that snippet ends with `(select-frame cur)', focus
> is left on `other-frame'.

‘raise-frame’ requires an interaction with the window manager.  If the
latter decides that raising a minimized frame will give focus to that
frame that's it.

You might want to look into bug#745 where you can find many references
to window manager behaviors and older discussions on emacs-devel.

martin





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21864; Package emacs. (Sun, 08 Nov 2015 23:50:03 GMT) Full text and rfc822 format available.

Message #11 received at 21864 <at> debbugs.gnu.org (full text, mbox):

From: Artur Malabarba <bruce.connor.am <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 21864 <at> debbugs.gnu.org
Subject: Re: bug#21864: 25.0.50; `raise-frame' steals focus some time after
 being called if the frame was iconified
Date: Sun, 8 Nov 2015 23:49:25 +0000
[Message part 1 (text/plain, inline)]
On 8 Nov 2015 6:24 pm, "martin rudalics" <rudalics <at> gmx.at> wrote:
>
> >      (let ((cur (selected-frame)))
> >        (raise-frame other-frame)
> >        (select-frame cur))
> >
> > Result: Even though that snippet ends with `(select-frame cur)', focus
> > is left on `other-frame'.
>
> ‘raise-frame’ requires an interaction with the window manager.  If the
> latter decides that raising a minimized frame will give focus to that
> frame that's it.
>
> You might want to look into bug#745 where you can find many references
> to window manager behaviors and older discussions on emacs-devel.

Yeah, that makes sense. Thanks for the reference.
I guess we can close this then.
[Message part 2 (text/html, inline)]

Added tag(s) notabug. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 09 Nov 2015 18:13:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 21864 <at> debbugs.gnu.org and Artur Malabarba <bruce.connor.am <at> gmail.com> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 09 Nov 2015 18:13:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 08 Dec 2015 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 255 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.