[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
frame parameters user-size and user-position
From: |
Drew Adams |
Subject: |
frame parameters user-size and user-position |
Date: |
Sat, 28 May 2005 11:01:31 -0700 |
1. Frame parameter `user-position' can be used to tell the window manager
that the user has positioned a frame. Is there an equivalent `user-size'
parameter to tell the window manager whether the user has sized the frame?
I don't see `user-size' documented anywhere (e.g. Info (elisp)), but I see
it used in these files: faces.el, frame.el, mac-win.el, w32-win.el,
x-win.el, and frame.c. If it is similar to `user-position', shouldn't it be
documented?
2. The doc for `user-position' says that you can use it to tell the window
manager that the user positioned the frame, in hopes that the w-m will leave
the position alone. I assume something similar is behind `user-size'.
I have never seen either of these parameters in any of my frames, so I
assume they are only there if I add them myself. (I'm using Emacs in
Windows, if that makes a difference.) That would seem to agree with the doc,
which just says you can specify them when you create a frame.
Would it be possible (after the release) to have Emacs update these frame
parameters whenever a user repositioned or resized a frame (e.g. using the
mouse)? That is, could we perhaps use these parameters to _indicate_ whether
the user has repositioned or resized a frame (even if the indication is not
100% reliable)? Would this be possible (for at least some window managers),
or is this information not available from a window manager?
For this to work, Emacs would need to record a non-nil value for the
frame-parameter whenever the user manually moved or sized a frame and (by
default) set it to nil when a frame is created or moved/sized by program.
My question is one of feasibility, for now. I don't want to start a
discussion about a possible new feature; I'm just wondering if this is
feasible.
Such an indication of user frame-sizing could be useful, for example, for
code that tries to automatically resize a frame to fit its buffer. If the
user has previously sized the frame, an automatic resize would presumably
not be done, in order to not override the user's intention.
- frame parameters user-size and user-position,
Drew Adams <=