unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* A focus problem when mouse curse moved on a child-frame in linux
@ 2018-01-12  1:40 tumashu
  2018-01-12  8:48 ` martin rudalics
  2018-01-12 19:12 ` A focus problem when mouse curse moved on a child-frame in GNU/Linux Richard Stallman
  0 siblings, 2 replies; 11+ messages in thread
From: tumashu @ 2018-01-12  1:40 UTC (permalink / raw)
  To: emacs-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1664 bytes --]

-------------------------------------------------------
(let ((buffer (get-buffer-create "*test*"))
      (test (let ((after-make-frame-functions nil))
              (make-frame
               `((parent-frame . ,(window-frame))
                 (no-accept-focus . t)
                 (border-width . 0)
                 (internal-border-width . 0)
                 (vertical-scroll-bars . nil)
                 (horizontal-scroll-bars . nil)
                 (left-fringe . 0)
                 (right-fringe . 0)
                 (menu-bar-lines . 0)
                 (tool-bar-lines . 0)
                 (line-spacing . 0)
                 (unsplittable . t)
                 (no-other-frame . t)
                 (undecorated . t)
                 (cursor-type . nil)
                 (minibuffer . nil)
                 (no-special-glyphs . t)
                 (inhibit-double-buffering . t)
                 (width . 10)
                 (height . 10)))))
      (pos (posn-x-y (posn-at-point (point) (selected-window)))))
  (set-window-buffer (frame-root-window test) buffer)
  (set-frame-position test (car pos) (cdr pos))
  (with-current-buffer buffer
    (setq mode-line-format nil)
    (erase-buffer)
    (insert "
--------------------
--------------------
--------------------"))
  (fit-frame-to-buffer test))<I>

-----------------------------------------------------------

1. eval above code at <I> , a child-frame will be at <I>
2. move mouse curse on the top of this child-frame
3. type "a", the "a" should be inserted into the position <I>,
on Windows, it is, but on linux, the "a" is inserted into the
child-frame's buffer instead of position <I>


[-- Attachment #2: Type: text/html, Size: 3678 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: A focus problem when mouse curse moved on a child-frame in linux
  2018-01-12  1:40 A focus problem when mouse curse moved on a child-frame in linux tumashu
@ 2018-01-12  8:48 ` martin rudalics
  2018-01-12 12:20   ` Feng Shu
  2018-01-12 19:12 ` A focus problem when mouse curse moved on a child-frame in GNU/Linux Richard Stallman
  1 sibling, 1 reply; 11+ messages in thread
From: martin rudalics @ 2018-01-12  8:48 UTC (permalink / raw)
  To: tumashu, emacs-devel@gnu.org

 > -------------------------------------------------------
 > (let ((buffer (get-buffer-create "*test*"))
 >        (test (let ((after-make-frame-functions nil))
 >                (make-frame
 >                 `((parent-frame . ,(window-frame))
 >                   (no-accept-focus . t)
[...]
 >    (fit-frame-to-buffer test))<I>
 >
 > -----------------------------------------------------------
 >
 > 1. eval above code at <I> , a child-frame will be at <I>
 > 2. move mouse curse on the top of this child-frame

Since the child frame is specified to not accept focus I can't do
that.

 > 3. type "a", the "a" should be inserted into the position <I>,
 > on Windows, it is, but on linux, the "a" is inserted into the
 > child-frame's buffer instead of position <I>

The "a" is inserted at position <I> here (GTK+ Version 3.4.2, xfwm4
under Xfce 4.8 on Debian).  I'm afraid your window manager doesn't
process the 'accept-focus' parameter correctly.

martin



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: A focus problem when mouse curse moved on a child-frame in linux
  2018-01-12  8:48 ` martin rudalics
@ 2018-01-12 12:20   ` Feng Shu
  2018-01-12 18:48     ` martin rudalics
  0 siblings, 1 reply; 11+ messages in thread
From: Feng Shu @ 2018-01-12 12:20 UTC (permalink / raw)
  To: martin rudalics; +Cc: Feng Shu, emacs-devel

martin rudalics <rudalics@gmx.at> writes:


> The "a" is inserted at position <I> here (GTK+ Version 3.4.2, xfwm4
> under Xfce 4.8 on Debian).  I'm afraid your window manager doesn't
> process the 'accept-focus' parameter correctly.
>

Indeed, I use EXWM, It seem to be EXWM's bug, I have tested with xfce
too, It works well, thanks for your help :-)


> martin
>

-- 




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: A focus problem when mouse curse moved on a child-frame in linux
  2018-01-12 12:20   ` Feng Shu
@ 2018-01-12 18:48     ` martin rudalics
  2018-01-12 23:46       ` Feng Shu
  0 siblings, 1 reply; 11+ messages in thread
From: martin rudalics @ 2018-01-12 18:48 UTC (permalink / raw)
  To: Feng Shu; +Cc: emacs-devel

 > Indeed, I use EXWM, It seem to be EXWM's bug, I have tested with xfce
 > too, It works well, thanks for your help :-)

Could you try to ask someone or investigate why this does not work in
EXWM?

martin



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: A focus problem when mouse curse moved on a child-frame in GNU/Linux
  2018-01-12  1:40 A focus problem when mouse curse moved on a child-frame in linux tumashu
  2018-01-12  8:48 ` martin rudalics
@ 2018-01-12 19:12 ` Richard Stallman
  1 sibling, 0 replies; 11+ messages in thread
From: Richard Stallman @ 2018-01-12 19:12 UTC (permalink / raw)
  To: tumashu; +Cc: emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

Would you please be so kind as to call the system you're using "GNU/Linux"?

That's what it is.  Calling it "Linux" is simply an error.
We started developing the GNU system in 1984.  Linux is one component
that has been used with GNU since 1992.

The error of calling it "Linux" is important because it has the effect
of attributing our work (of which GNU Emacs is part) to Mr Torvalds
and giving us none of the credit for it.  Please treat us fairly
by calling the system "GNU/Linux".

See https://gnu.org/gnu/linux-and-gnu.html and
https://gnu.org/gnu/gnu-linux-faq.html, plus the history in
https://gnu.org/gnu/the-gnu-project.html.

-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
Skype: No way! See https://stallman.org/skype.html.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: A focus problem when mouse curse moved on a child-frame in linux
  2018-01-12 18:48     ` martin rudalics
@ 2018-01-12 23:46       ` Feng Shu
  2018-01-13  8:50         ` martin rudalics
  0 siblings, 1 reply; 11+ messages in thread
From: Feng Shu @ 2018-01-12 23:46 UTC (permalink / raw)
  To: martin rudalics; +Cc: Feng Shu, emacs-devel

martin rudalics <rudalics@gmx.at> writes:

>> Indeed, I use EXWM, It seem to be EXWM's bug, I have tested with xfce
>> too, It works well, thanks for your help :-)
>
> Could you try to ask someone or investigate why this does not work in
> EXWM?
>
I have asked Chris Feng: https://github.com/ch11ng/exwm/issues/350

> martin
>

-- 




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: A focus problem when mouse curse moved on a child-frame in linux
  2018-01-12 23:46       ` Feng Shu
@ 2018-01-13  8:50         ` martin rudalics
  2018-01-14 21:50           ` Feng Shu
  0 siblings, 1 reply; 11+ messages in thread
From: martin rudalics @ 2018-01-13  8:50 UTC (permalink / raw)
  To: Feng Shu; +Cc: emacs-devel

 > I have asked Chris Feng: https://github.com/ch11ng/exwm/issues/350

Thank you.  Please keep me informed if there are any problems.  We
might have to convince him of the usefulness of such an option.

martin



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: A focus problem when mouse curse moved on a child-frame in linux
  2018-01-13  8:50         ` martin rudalics
@ 2018-01-14 21:50           ` Feng Shu
  2018-01-15  9:39             ` martin rudalics
  0 siblings, 1 reply; 11+ messages in thread
From: Feng Shu @ 2018-01-14 21:50 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel

martin rudalics <rudalics@gmx.at> writes:

>> I have asked Chris Feng: https://github.com/ch11ng/exwm/issues/350
>
> Thank you.  Please keep me informed if there are any problems.  We
> might have to convince him of the usefulness of such an option.
>
> martin

xmonad seem to have the problem too, more details:

https://github.com/tumashu/company-childframe/issues/4#issuecomment-357514918

>

-- 




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: A focus problem when mouse curse moved on a child-frame in linux
  2018-01-14 21:50           ` Feng Shu
@ 2018-01-15  9:39             ` martin rudalics
  2018-01-15 10:53               ` Yuri Khan
  0 siblings, 1 reply; 11+ messages in thread
From: martin rudalics @ 2018-01-15  9:39 UTC (permalink / raw)
  To: Feng Shu; +Cc: emacs-devel

 > xmonad seem to have the problem too, more details:
 >
 > https://github.com/tumashu/company-childframe/issues/4#issuecomment-357514918

How do EXWM and Monad react to turning the `no-accept-focus' parameter
on for an arbitrary frame?  That is, if you have two normal frames,
what does

(set-frame-parameter (next-frame) 'no-accept-focus t)

accomplish?  Nothing?

martin



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: A focus problem when mouse curse moved on a child-frame in linux
  2018-01-15  9:39             ` martin rudalics
@ 2018-01-15 10:53               ` Yuri Khan
  2018-01-16  9:08                 ` martin rudalics
  0 siblings, 1 reply; 11+ messages in thread
From: Yuri Khan @ 2018-01-15 10:53 UTC (permalink / raw)
  To: martin rudalics; +Cc: Feng Shu, Emacs developers

On Mon, Jan 15, 2018 at 4:39 PM, martin rudalics <rudalics@gmx.at> wrote:

> How do EXWM and Monad react to turning the `no-accept-focus' parameter
> on for an arbitrary frame?  That is, if you have two normal frames,
> what does
>
> (set-frame-parameter (next-frame) 'no-accept-focus t)
>
> accomplish?  Nothing?

What is the expected behavior for such frames?

On Emacs 26.0.50 under i3wm, if I click in the frame thus modified, it
appears to get focus (i.e. the window manager’s title bar lights up
and the modeline is displayed in the active modeline face), but all
keyboard input goes to the other frame. Am I okay?



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: A focus problem when mouse curse moved on a child-frame in linux
  2018-01-15 10:53               ` Yuri Khan
@ 2018-01-16  9:08                 ` martin rudalics
  0 siblings, 0 replies; 11+ messages in thread
From: martin rudalics @ 2018-01-16  9:08 UTC (permalink / raw)
  To: Yuri Khan; +Cc: Feng Shu, Emacs developers

 > What is the expected behavior for such frames?

It's difficult to answer that because "focus" is not a well-specified
concept.  Conceptually, such frames should not get selected and not
receive keyboard input.  But they should respond to mouse interaction,
for example, to scroll their windows.

 > On Emacs 26.0.50 under i3wm, if I click in the frame thus modified, it
 > appears to get focus (i.e. the window manager’s title bar lights up
 > and the modeline is displayed in the active modeline face), but all
 > keyboard input goes to the other frame. Am I okay?

Ideally, neither the title bar should light up nor the mode line get
displayed in active modeline face to avoid confusing the user.  But
from what I noticed now in this thread, tiling window manager (EXWM,
xmonad and yours) seem to behave specially.

martin




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-01-16  9:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-12  1:40 A focus problem when mouse curse moved on a child-frame in linux tumashu
2018-01-12  8:48 ` martin rudalics
2018-01-12 12:20   ` Feng Shu
2018-01-12 18:48     ` martin rudalics
2018-01-12 23:46       ` Feng Shu
2018-01-13  8:50         ` martin rudalics
2018-01-14 21:50           ` Feng Shu
2018-01-15  9:39             ` martin rudalics
2018-01-15 10:53               ` Yuri Khan
2018-01-16  9:08                 ` martin rudalics
2018-01-12 19:12 ` A focus problem when mouse curse moved on a child-frame in GNU/Linux Richard Stallman

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).