* set-frame-position problem(?)
@ 2008-01-12 0:22 Vinicius Jose Latorre
2008-01-12 9:16 ` martin rudalics
2008-01-12 12:19 ` Jan Djärv
0 siblings, 2 replies; 4+ messages in thread
From: Vinicius Jose Latorre @ 2008-01-12 0:22 UTC (permalink / raw)
To: GNU Emacs (devel)
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?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: set-frame-position problem(?)
2008-01-12 0:22 set-frame-position problem(?) Vinicius Jose Latorre
@ 2008-01-12 9:16 ` martin rudalics
2008-01-12 13:12 ` Vinicius Jose Latorre
2008-01-12 12:19 ` Jan Djärv
1 sibling, 1 reply; 4+ messages in thread
From: martin rudalics @ 2008-01-12 9:16 UTC (permalink / raw)
To: Vinicius Jose Latorre; +Cc: GNU Emacs (devel)
> I'm not sure if there is a bug/problem with set-frame-position
> or if I'm missing something.
Does anything change when you apply the following patch?
*** frame.c.~1.360.~ Wed Oct 31 20:25:32 2007
--- frame.c Sat Jan 5 20:06:34 2008
***************
*** 4072,4077 ****
--- 4072,4078 ----
change the frame size. This is done so that users can create
tall Emacs frames without having to guess how tall the tool-bar
will get. */
+ #if 0
if (toolbar_p && FRAME_TOOL_BAR_LINES (f))
{
int margin, relief, bar_height;
***************
*** 4093,4098 ****
--- 4094,4100 ----
bar_height = DEFAULT_TOOL_BAR_IMAGE_HEIGHT + 2 * margin + 2 * relief;
FRAME_LINES (f) += (bar_height + FRAME_LINE_HEIGHT (f) - 1) / FRAME_LINE_HEIGHT (f);
}
+ #endif
compute_fringe_widths (f, 0);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: set-frame-position problem(?)
2008-01-12 0:22 set-frame-position problem(?) Vinicius Jose Latorre
2008-01-12 9:16 ` martin rudalics
@ 2008-01-12 12:19 ` Jan Djärv
1 sibling, 0 replies; 4+ messages in thread
From: Jan Djärv @ 2008-01-12 12:19 UTC (permalink / raw)
To: Vinicius Jose Latorre; +Cc: GNU Emacs (devel)
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
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: set-frame-position problem(?)
2008-01-12 9:16 ` martin rudalics
@ 2008-01-12 13:12 ` Vinicius Jose Latorre
0 siblings, 0 replies; 4+ messages in thread
From: Vinicius Jose Latorre @ 2008-01-12 13:12 UTC (permalink / raw)
To: martin rudalics; +Cc: GNU Emacs (devel)
> > I'm not sure if there is a bug/problem with set-frame-position
> > or if I'm missing something.
>
> Does anything change when you apply the following patch?
>
> *** frame.c.~1.360.~ Wed Oct 31 20:25:32 2007
> --- frame.c Sat Jan 5 20:06:34 2008
> ***************
> *** 4072,4077 ****
> --- 4072,4078 ----
> change the frame size. This is done so that users can create
> tall Emacs frames without having to guess how tall the tool-bar
> will get. */
> + #if 0
> if (toolbar_p && FRAME_TOOL_BAR_LINES (f))
> {
> int margin, relief, bar_height;
> ***************
> *** 4093,4098 ****
> --- 4094,4100 ----
> bar_height = DEFAULT_TOOL_BAR_IMAGE_HEIGHT + 2 * margin + 2 *
> relief;
> FRAME_LINES (f) += (bar_height + FRAME_LINE_HEIGHT (f) - 1) /
> FRAME_LINE_HEIGHT (f);
> }
> + #endif
>
> compute_fringe_widths (f, 0);
No, this patch doesn't fix the situation.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-01-12 13:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-12 0:22 set-frame-position problem(?) Vinicius Jose Latorre
2008-01-12 9:16 ` martin rudalics
2008-01-12 13:12 ` Vinicius Jose Latorre
2008-01-12 12:19 ` Jan Djärv
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.