unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 23.0.50; set-frame-size problem(?)
@ 2008-01-12 13:46 Vinicius Jose Latorre
  2008-01-12 14:52 ` Vinicius Jose Latorre
  0 siblings, 1 reply; 2+ messages in thread
From: Vinicius Jose Latorre @ 2008-01-12 13:46 UTC (permalink / raw)
  To: GNU Emacs (pretest)


Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing 
list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:



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?



If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/home/download/emacs/share/emacs/23.0.50/etc/DEBUG for instructions.


In GNU Emacs 23.0.50.2 (i686-pc-linux-gnu, GTK+ Version 2.12.1)
 of 2008-01-12 on debian-hillux
Windowing system distributor `The X.Org Foundation', version 11.0.10300000
configured using `configure  '--prefix=/home/download/emacs''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US
  locale-coding-system: iso-8859-1
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  display-time-mode: t
  msb-mode: t
  show-paren-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x r e p o r t - e m <tab> <return>

Recent messages:
Timid completion mode is enabled.
Loading ispell...done
For information about GNU Emacs and the GNU system, type C-h C-a.

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

* Re: 23.0.50; set-frame-size problem(?)
  2008-01-12 13:46 23.0.50; set-frame-size problem(?) Vinicius Jose Latorre
@ 2008-01-12 14:52 ` Vinicius Jose Latorre
  0 siblings, 0 replies; 2+ messages in thread
From: Vinicius Jose Latorre @ 2008-01-12 14:52 UTC (permalink / raw)
  To: GNU Emacs (pretest)


> Please write in English if possible, because the Emacs maintainers
> usually do not have translators to read other languages for them.
>
> Your bug report will be posted to the emacs-pretest-bug@gnu.org 
> mailing list.
>
> Please describe exactly what actions triggered the bug
> and the precise symptoms of the bug:
>
>
>
> 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?
>
>
>
> If Emacs crashed, and you have the Emacs process in the gdb debugger,
> please include the output from the following gdb commands:
>    `bt full' and `xbacktrace'.
> If you would like to further debug the crash, please read the file
> /home/download/emacs/share/emacs/23.0.50/etc/DEBUG for instructions.
>
>
> In GNU Emacs 23.0.50.2 (i686-pc-linux-gnu, GTK+ Version 2.12.1)
> of 2008-01-12 on debian-hillux
> Windowing system distributor `The X.Org Foundation', version 
> 11.0.10300000
> configured using `configure  '--prefix=/home/download/emacs''
>
> Important settings:
>  value of $LC_ALL: nil
>  value of $LC_COLLATE: nil
>  value of $LC_CTYPE: nil
>  value of $LC_MESSAGES: nil
>  value of $LC_MONETARY: nil
>  value of $LC_NUMERIC: nil
>  value of $LC_TIME: nil
>  value of $LANG: en_US
>  locale-coding-system: iso-8859-1
>  default-enable-multibyte-characters: t
>
> Major mode: Lisp Interaction
>
> Minor modes in effect:
>  display-time-mode: t
>  msb-mode: t
>  show-paren-mode: t
>  tooltip-mode: t
>  tool-bar-mode: t
>  mouse-wheel-mode: t
>  menu-bar-mode: t
>  file-name-shadow-mode: t
>  global-font-lock-mode: t
>  font-lock-mode: t
>  blink-cursor-mode: t
>  unify-8859-on-encoding-mode: t
>  utf-translate-cjk-mode: t
>  auto-compression-mode: t
>  column-number-mode: t
>  line-number-mode: t
>  transient-mark-mode: t
>
> Recent input:
> M-x r e p o r t - e m <tab> <return>
>
> Recent messages:
> Timid completion mode is enabled.
> Loading ispell...done
> For information about GNU Emacs and the GNU system, type C-h C-a.


I've made more tests and discovered that the problem occurs when:

* the current frame have tool-bar-mode and/or menu-bar-mode turned on
   and the new frame have tool-bar-mode and/or menu-bar-mode turned off.
   (in this case, the new frame is positioned higher than the mouse 
position.)

* or vice-versa, that is, the current frame is off and the new one is on.
   (in this case, the new frame is positioned lower than the mouse 
position.)

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

end of thread, other threads:[~2008-01-12 14:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-12 13:46 23.0.50; set-frame-size problem(?) Vinicius Jose Latorre
2008-01-12 14:52 ` Vinicius Jose Latorre

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).