* set-frame-position - is it a bug?
@ 2005-08-05 13:31 Friedrich Laher
2005-08-05 14:39 ` Drew Adams
0 siblings, 1 reply; 4+ messages in thread
From: Friedrich Laher @ 2005-08-05 13:31 UTC (permalink / raw)
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?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: set-frame-position - is it a bug?
[not found] <mailman.2668.1123250630.20277.help-gnu-emacs@gnu.org>
@ 2005-08-05 14:33 ` Pascal Bourguignon
2005-08-05 14:49 ` Drew Adams
0 siblings, 1 reply; 4+ messages in thread
From: Pascal Bourguignon @ 2005-08-05 14:33 UTC (permalink / raw)
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!
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: set-frame-position - is it a bug?
2005-08-05 13:31 set-frame-position - is it a bug? Friedrich Laher
@ 2005-08-05 14:39 ` Drew Adams
0 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2005-08-05 14:39 UTC (permalink / raw)
Cc: Emacs-Devel
the intention 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?
The code looks OK to me.
Is your menu-bar (or tool-bar) wider than your frame, so that it wraps
around? That will cause the behavior you describe.
Actually, now that I think of it, we should probably consider this an Emacs
bug, so I'm cc'ing the emacs-devel list. Thanks for bringing this up - I've
been aware of it for a long time, but it never occurred to me to file a bug.
Bug: If menu-bar is wider than frame, so it wraps, then set-frame-position
gets it wrong, in the manner described above.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: set-frame-position - is it a bug?
2005-08-05 14:33 ` Pascal Bourguignon
@ 2005-08-05 14:49 ` Drew Adams
0 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2005-08-05 14:49 UTC (permalink / raw)
Cc: Emacs-Devel
>From Pascal Bourguignon:
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
In my version of 22.0.50.1 and window manager (Windows XP), it's broken:
In GNU Emacs 22.0.50.1 (i386-mingw-nt5.1.2600)
of 2005-06-26 on NONIQPC
X server distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc
(3.3) --cflags -I../../jpeg-6b-3/include -I../../libpng-1.2.8/include -I../.
./tiff-3.6.1-2/include -I../../xpm-nox-4.2.0/include -I../../zlib-1.2.2/incl
ude'
BTW, this is not something new. The problem is also present in Emacs 20.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-08-05 14:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-05 13:31 set-frame-position - is it a bug? Friedrich Laher
2005-08-05 14:39 ` Drew Adams
[not found] <mailman.2668.1123250630.20277.help-gnu-emacs@gnu.org>
2005-08-05 14:33 ` Pascal Bourguignon
2005-08-05 14:49 ` Drew Adams
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.