GNU bug report logs -
#25511
26.0.50; modify-frame-parameters modifies undesignated parameter?
Previous Next
Reported by: Katsumi Yamaoka <yamaoka <at> jpl.org>
Date: Mon, 23 Jan 2017 07:31:02 UTC
Severity: normal
Tags: fixed
Found in version 26.0.50
Done: Noam Postavsky <npostavs <at> users.sourceforge.net>
Bug is archived. No further changes may be made.
Full log
Message #32 received at 25511 <at> debbugs.gnu.org (full text, mbox):
> (make-frame '((left . 0) (top . 0)))
> launches a new frame on the top-left corner of the *lower* screen,
> the position and the size are:
> ((top . 0) (left . 0) (width . 80) (height . 36))
> It varies to
> ((top + -1076) (left + -258) (width . 80) (height . 36))
> after moving it to the top-left corner of the upper screen.
> I feel it a very good behavior.
Does this imply that GTK cannot handle Windows' multiple monitors? Can
you invoke ‘display-monitor-attributes-list’ for both displays and on
the native and the cygwin builds?
> As for the eclipse of the bottom of an Emacs frame by the task-
> bar, it doesn't happen by default. However, it seems to be due
> to the size of the default font. The default font is somewhat
> small to me, so I tried:
>
> (add-to-list
> 'default-frame-alist
> '(font
> . "-outline-Arial Unicode MS-normal-normal-normal-mono-16-*-*-*-p-*-iso8859-1"))
>
> After that, a new frame got too tall,
This is a consequence of Emacs' attitude to keep the number of lines of
a frame unchanged when changing a frame's default font size (see the
corresponding calls to adjust_frame_size in x_new_font). You should be
able to avoid this by setting ‘frame-inhibit-implied-resize’ to t.
> so I think I still need
> a workaround like this:
>
> (defadvice make-frame (after shrink-frame-height activate)
> "Shrink the height of a new frame."
> (sit-for 0)
> (if (> (frame-parameter ad-return-value 'height) 30)
> (modify-frame-parameters ad-return-value '((height . 30)))))
Then why don't you use 30 lines in the first place? In any case, you
should be able to get the size of the workarea of any of your displays
via the above mentioned ‘display-monitor-attributes-list’ and, using
‘set-frame-position’ and ‘set-frame-size’, be able to fine-tune the
positioning of your frame in a way that it doesn't overlap the taskbar.
martin
This bug report was last modified 7 years and 215 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.