Friedrich Laher <[EMAIL PROTECTED]> 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!
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to