GNU bug report logs - #43672
28.0.50; select-frame-set-input-focus does not set focus first time called

Previous Next

Package: emacs;

Reported by: Arthur Miller <arthur.miller <at> live.com>

Date: Mon, 28 Sep 2020 13:50:01 UTC

Severity: normal

Found in version 28.0.50

Full log


View this message in rfc822 format

From: Arthur Miller <arthur.miller <at> live.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, "43672 <at> debbugs.gnu.org" <43672 <at> debbugs.gnu.org>
Subject: bug#43672: 28.0.50; select-frame-set-input-focus does not set focus first time called
Date: Sat, 17 Oct 2020 23:51:16 +0200
[Message part 1 (text/plain, inline)]
martin rudalics <rudalics <at> gmx.at> writes:

>> I am sorry för the confusion, I was just to fast typing. Yes, you
>> understand me correctly. It works correctly in emacsclient; not
>> correctly when I run Emacs as a standalone process, either with -Q
>> flag or without.
>
> Then please with emacs -Q try the simpler
>
> (defvar child-frame nil)
>
> (defun make-child-frame ()
>   (interactive)
>   (setq child-frame
>     (make-frame `((parent-frame . ,(selected-frame))
>               (left . 10)
>               (top . 10)
>               (width . 20)
>               (height . 10))))
>   (select-frame-set-input-focus child-frame))
>
> (defun delete-child-frame ()
>   (interactive)
>   (delete-frame child-frame))
>
> and tell us whether the child frame gets focus.
>
> martin
Hello Martin,

sorry for being a bit late with this. I have tested and it was very
strange, so I realized I need more time to play with it.

Here is how I got it:

If I pass parent in the frame-params list to make-frame, then all is
grandy-dandy; but if I don't then the behaviour is as following:

If parent is set after creation; the frame will be reparented correctly
and appear at correct place on the screen, but it won't switch focus.

If parent is not set after the creation; the frame will switch focus,
buf it will of course appear somewhere at the screen (absolute
coordinates I guess).

I have tested only emacsclient. I hope it helps.

I have attached a simplified test file:

[poorman-menu.el (text/plain, attachment)]

This bug report was last modified 3 years and 56 days ago.

Previous Next


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