help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set-frame-position - is it a bug?


From: Pascal Bourguignon
Subject: Re: set-frame-position - is it a bug?
Date: Fri, 05 Aug 2005 16:33:32 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]