all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pascal Bourguignon <spam@mouse-potato.com>
Subject: Re: set-frame-position - is it a bug?
Date: Fri, 05 Aug 2005 16:33:32 +0200	[thread overview]
Message-ID: <87slxowj0j.fsf@thalassa.informatimago.com> (raw)
In-Reply-To: mailman.2668.1123250630.20277.help-gnu-emacs@gnu.org

Friedrich Laher <mathefritz@schmieder-laher.de> writes:
> the intetion of the following code
>
>  (setq fpx (cdr (assoc 'left (frame-parameters))))
>   (setq fpy (cdr (assoc 'top  (frame-parameters))))
>
>   (setq fpx (+ 1 fpx))
>
>   (set-frame-position (next-frame) fpx fpy)
>
> is to move the frame honizontally 1 pixel right;
> but as a side-effect I get a vertical move as well.
>
> Is there something wrong with my code?

No.  IMO it's a bug in the interaction between emacs and the window manager.

With my version of emacs "22.0.50.1", and with my window manager
(WindowMaker), it works as you want.

You could use:

(defvar fpx-compensation 0)
(defvar fpy-compensation -1)

  (setq fpx (cdr (assoc 'left (frame-parameters))))
  (setq fpy (cdr (assoc 'top  (frame-parameters))))
  (setq fpx (+ 1 fpx fpx-compensation))
  (setq fpy (+ 1 fpy fpy-compensation))
  (set-frame-position (next-frame) fpx fpy)

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
I need a new toy.
Tail of black dog keeps good time.
Pounce! Good dog! Good dog!

       reply	other threads:[~2005-08-05 14:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.2668.1123250630.20277.help-gnu-emacs@gnu.org>
2005-08-05 14:33 ` Pascal Bourguignon [this message]
2005-08-05 14:49   ` set-frame-position - is it a bug? Drew Adams
2005-08-05 13:31 Friedrich Laher
2005-08-05 14:39 ` Drew Adams

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87slxowj0j.fsf@thalassa.informatimago.com \
    --to=spam@mouse-potato.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.
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.