emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A focus problem when mouse curse moved on a child-frame in linux


From: tumashu
Subject: A focus problem when mouse curse moved on a child-frame in linux
Date: Fri, 12 Jan 2018 09:40:09 +0800 (CST)

-------------------------------------------------------
(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>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]