From: Jesper Harder <harder@myrealbox.com>
Subject: Re: New frame position (FSF Emacs on Windows)
Date: Sun, 09 Feb 2003 05:31:42 +0100 [thread overview]
Message-ID: <m31y2ihy6p.fsf@defun.localdomain> (raw)
In-Reply-To: u1fer4ty.fsf@morpheus.demon.co.uk
Paul Moore <gustav@morpheus.demon.co.uk> writes:
> Jesper Harder <harder@myrealbox.com> writes:
>
>> This doesn't help you, but on X this usually something you adjust in you
>> window manager.
>
> Yes, I have seen this in X. As usual in Windows, there aren't any
> options - you get what Bill things is best for you. Unfortunately, in
> this instance, I actually like the Windows behaviour :-)
I think Emacs ought to follow the standard behaviour on ms-windows.
Submit a bug report :-)
> Phew. That's not something I'd have worked out for myself! It's a good
> start, but there's a bit more to the "Windows behaviour" - if the
> calculated position is "too far" (off the screen, or overlapping the
> taskbar) the window is put back up at the top left. Also, rather than
> a fixed 15 pixels (or whatever) the Windows behaviour is to go down by
> the width of the title bar (user configurable) and right by the size
> of the "system menu" icon.
OK, here's an improved version:
(require 'assoc)
(defvar my-frame-position-x-offset 20)
(defvar my-frame-position-y-offset 20)
(defvar my-frame-position-taskbar-height 30)
(defun my-frame-position ()
(let ((left (+ my-frame-position-x-offset
(or (frame-parameter nil 'left) 0)))
(top (+ my-frame-position-y-offset
(or (frame-parameter nil 'top) 0))))
(when (or (> (+ (frame-pixel-width) left)
(display-pixel-width))
(> (+ (frame-pixel-height) top
my-frame-position-taskbar-height)
(display-pixel-height)))
(setq left 0 top 0))
(aput 'default-frame-alist 'left left)
(aput 'default-frame-alist 'top top)))
(aput 'default-frame-alist 'user-position t)
(add-hook 'before-make-frame-hook 'my-frame-position)
next prev parent reply other threads:[~2003-02-09 4:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-07 20:37 New frame position (FSF Emacs on Windows) Paul Moore
2003-02-07 21:25 ` Kai Großjohann
2003-02-08 17:42 ` Paul Moore
2003-02-07 22:04 ` Jesper Harder
2003-02-08 18:43 ` Paul Moore
2003-02-09 4:31 ` Jesper Harder [this message]
2003-02-09 11:52 ` Paul Moore
2003-02-08 2:30 ` Galen Boyer
2003-02-08 18:46 ` Paul Moore
2003-02-09 3:32 ` Galen Boyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m31y2ihy6p.fsf@defun.localdomain \
--to=harder@myrealbox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).