emacs-devel
[Top][All Lists]
Advanced

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

Re: set-frame-position problem(?)


From: Jan Djärv
Subject: Re: set-frame-position problem(?)
Date: Sat, 12 Jan 2008 13:19:53 +0100
User-agent: Thunderbird 2.0.0.9 (Macintosh/20071031)

Can you please use report-emacs-bug so we can see how your Emacs has been built (Gtk+, OSX, W32, Lucid, or something else)?

Thanks,

        Jan D.


Vinicius Jose Latorre skrev:

I'm not sure if there is a bug/problem with set-frame-position
or if I'm missing something.

Anyway, please, follow the steps below:

1. start Emacs:  emacs -Q

2. define and evaluate the following function:

(defun my-frame-test ()
  (let ((mpos  (cdr (mouse-pixel-position)))
        (left  (frame-parameter nil 'left))
        (top   (frame-parameter nil 'top))
        (frame (select-frame
                (make-frame
                 '((title          . ": TEST :")
                   (name           . ": TEST :")
                   (width          . 40)
                   (height         . 10)
                   (user-size      . t)
                   (user-position  . t)
                   (menu-bar-lines . nil)
                   (tool-bar-lines . nil))))))
    ;; if tool-bar-mode and/or menu-bar-mode is on,
    ;; the frame is positioned higher than it should.
    (set-frame-position
     frame
     (+ (or (car mpos) 0) left)
     (+ (or (cdr mpos) 0) top))))

3. turn on tool-bar-mode and menu-bar-mode:

M-: (tool-bar-mode 1) RET
M-: (menu-bar-mode 1) RET

4. position the mouse around the middle of the current frame.

5. now execute the function:  M-: (my-frame-test) RET
  Notice that the new frame is positioned higher than the mouse position.

6. kill the created frame and turn off tool-bar-mode and menu-bar-mode:

M-: (tool-bar-mode 0) RET
M-: (menu-bar-mode 0) RET

7. again position the mouse around the middle of the current frame
  and execute the function:  M-: (my-frame-test) RET
  Notice that now the new frame is positioned at mouse position.


Does anyone have this problem?




_______________________________________________
Emacs-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-devel




reply via email to

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