List Info

Thread: Emacs geometry




Emacs geometry
user name
2006-07-28 10:08:52
> From: Ralf Angeli <angelicaeruleus.net>
> Date: Thu, 27 Jul 2006 23:58:47 +0200
> 
> >> The trick is to [...] call w32_get_arg to look
up left and top in
> >> initial-frame-alist
> >
> > Sorry, this part was bad advice: you cannot look
up left and top in
> > initial-frame-alist,
> 
> Hm, couldn't one get the value from the Lisp level?

Of course, you could: use `intern'.  But I suspect that, by
the time
w32_createwindow runs, the left and top frame parameters
were already
removed from initial-frame-alist and put into the `top_pos'
and
`left_pos' members of struct frame that is passed to
w32_createwindow.
But please verify that, I could be wrong.

> > you should instead honor f->left_pos and
> > f->top_pos, if they were set from
initial-frame-alist.  The problem is
> > to decide correctly when to honor them.
> 
> One could probably use the
>   if (!hprevinst)
> test in w32_createwindow in order to decide if it's
the first frame to
> be created, but how can one decide if there are values
for `top' and
> `left' which are only relevant for the first frame?

I didn't figure out that bit yet.  One thing to try is
trace the
execution from the point where w32-win.el puts the values
into
initial-frame-alist and till the call to w32_createwindow,
and see if
that gives you any ideas.

> That's where `initial-frame-alist' would really come
in handy.

I think when w32_createwindow is called, the contents of
initial-frame-alist are in f->params_alist.  So accessing
that is
easy.  The problem is, the left and top parameters are not
there.

Maybe if you compare f->top_pos and f->left_pos with
the corresponding
frame parameters in f->params_alist, for different calls
to
w32_createwindow, you will see how to identify that the
initial frame
is being created.

> I guess I'll need a little bit more time for this.

There's no hurry.  Thanks.


_______________________________________________
Emacs-devel mailing list
Emacs-develgnu.org
htt
p://lists.gnu.org/mailman/listinfo/emacs-devel
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )