* bug in set-frame-position?
@ 2005-01-17 21:58 Mickey Ferguson
2005-01-18 12:24 ` Francis Litterio
[not found] ` <mailman.13899.1106054097.27204.bug-gnu-emacs@gnu.org>
0 siblings, 2 replies; 4+ messages in thread
From: Mickey Ferguson @ 2005-01-17 21:58 UTC (permalink / raw)
>From the documentation:
(set-frame-position FRAME XOFFSET YOFFSET)
Sets position of FRAME in pixels to XOFFSET by YOFFSET.
This is actually the position of the upper left corner of the frame.
Negative values for XOFFSET or YOFFSET are interpreted relative to
the rightmost or bottommost possible position (that stays within the
screen).
Now what I want is to be able to specify my window (frame) to be up against
the right-hand side of my screen. So I thought I would use (set-frame
position (selected-frame) -0 0). Nope, it interprets -0 the same as 0. The
best I could do was -1 0, which left a little space between my window and
the edge of the screen. Is there any way to specify it flush-right? Or is
this a bug where it should interpret -0 as meaning flush-right, but it's
not? Or maybe there's another way to do this?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bug in set-frame-position?
2005-01-17 21:58 bug in set-frame-position? Mickey Ferguson
@ 2005-01-18 12:24 ` Francis Litterio
[not found] ` <mailman.13899.1106054097.27204.bug-gnu-emacs@gnu.org>
1 sibling, 0 replies; 4+ messages in thread
From: Francis Litterio @ 2005-01-18 12:24 UTC (permalink / raw)
Mickey Ferguson wrote:
> Now what I want is to be able to specify my window (frame) to be up against
> the right-hand side of my screen. So I thought I would use (set-frame
> position (selected-frame) -0 0). Nope, it interprets -0 the same as 0. The
> best I could do was -1 0, which left a little space between my window and
> the edge of the screen. Is there any way to specify it flush-right? Or is
> this a bug where it should interpret -0 as meaning flush-right, but it's
> not? Or maybe there's another way to do this?
If you know the size of the small gap between the frame's right border
and the right edge of your display (say, 3 pixels), then you could do
this:
(set-frame-position frame -1 ypos)
(set-frame-position frame (+ 3 (frame-parameter frame 'left)) ypos)
This may be caused by the way that function x_calc_absolute_position()
converts negative left and top frame offsets into equivalent positive
offsets for your windowing system.
--
Francis Litterio
franl <at> world . std . com
^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <mailman.13899.1106054097.27204.bug-gnu-emacs@gnu.org>]
* Re: bug in set-frame-position?
[not found] ` <mailman.13899.1106054097.27204.bug-gnu-emacs@gnu.org>
@ 2005-01-18 17:22 ` Mickey Ferguson
2005-01-19 11:49 ` Francis Litterio
0 siblings, 1 reply; 4+ messages in thread
From: Mickey Ferguson @ 2005-01-18 17:22 UTC (permalink / raw)
Then maybe we should consider this a feature enhancement - that "-0" should
be interpreted as a negative number with zero offset, just like "-1" is a
negative number with 1 offset. Whether or not this is feasible here, I
cannot say. But I know that other systems handle "-0" this way.
"Francis Litterio" <franl@world.std.com> wrote in message
news:mailman.13899.1106054097.27204.bug-gnu-emacs@gnu.org...
> Mickey Ferguson wrote:
>
> > Now what I want is to be able to specify my window (frame) to be up
against
> > the right-hand side of my screen. So I thought I would use (set-frame
> > position (selected-frame) -0 0). Nope, it interprets -0 the same as 0.
The
> > best I could do was -1 0, which left a little space between my window
and
> > the edge of the screen. Is there any way to specify it flush-right? Or
is
> > this a bug where it should interpret -0 as meaning flush-right, but it's
> > not? Or maybe there's another way to do this?
>
> If you know the size of the small gap between the frame's right border
> and the right edge of your display (say, 3 pixels), then you could do
> this:
>
> (set-frame-position frame -1 ypos)
> (set-frame-position frame (+ 3 (frame-parameter frame 'left)) ypos)
>
> This may be caused by the way that function x_calc_absolute_position()
> converts negative left and top frame offsets into equivalent positive
> offsets for your windowing system.
> --
> Francis Litterio
> franl <at> world . std . com
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bug in set-frame-position?
2005-01-18 17:22 ` Mickey Ferguson
@ 2005-01-19 11:49 ` Francis Litterio
0 siblings, 0 replies; 4+ messages in thread
From: Francis Litterio @ 2005-01-19 11:49 UTC (permalink / raw)
Mickey Ferguson wrote:
> Then maybe we should consider this a feature enhancement - that "-0" should
> be interpreted as a negative number with zero offset, just like "-1" is a
> negative number with 1 offset. Whether or not this is feasible here, I
> cannot say. But I know that other systems handle "-0" this way.
In Emacs-Lisp (and in C, I think), -0 equals 0, so the frame-management
code cannot distinguish -0 from 0.
I suspect the closest you could come to the desired functionality is to
have Emacs interpret an offset of -1 to mean "flush against the right
(or bottom) edge of the display".
--
Francis Litterio
franl <at> world . std . com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-01-19 11:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-17 21:58 bug in set-frame-position? Mickey Ferguson
2005-01-18 12:24 ` Francis Litterio
[not found] ` <mailman.13899.1106054097.27204.bug-gnu-emacs@gnu.org>
2005-01-18 17:22 ` Mickey Ferguson
2005-01-19 11:49 ` Francis Litterio
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.