T.R | Title | User | Personal Name | Date | Lines |
---|
2880.1 | window manager involved ?? | GSRC::WEST | Help stamp out and abolish redundancy ! | Wed Jun 06 1990 16:02 | 17 |
| RE: <<< Note 2880.0 by MOVIES::HOWELL_MA "another fine product of the Sirius Cybernetics Corp." >>>
-< How to determine smallest window size? >-
>> created with X$CREATE_WINDOW. If I create a window that is 10x10 for
>> example the actual window that is displayed is much larger, and
>> rectangular! This reason I'd like to find this out is to scale my image
I'll bet that there is the window manager frame window 'wrapped' around
your window. If that is the case then you will get what you described. The
window is 'larger' because of the title bar and borders.
Now, you can either account for this when you create your window or create
your window with overrideRedirect set to TRUE, this will give you a window of
the size you requested.
-=> Jim <=-
|
2880.2 | | MOVIES::HOWELL_MA | another fine product of the Sirius Cybernetics Corp. | Thu Jun 07 1990 04:56 | 8 |
| Thanks for your reply Jim. Yes, you are quite correct, I'm creating a
regular window with the window manager 'frame', which is what I want.
What I'd like to do is to get the window manager to tell what the
smallest size of window it will create. Does anybody know how to get
the minimum width and height from the window manager, or how to
calculate it?
Mark...
|
2880.3 | Hmmm... | GSRC::WEST | Help stamp out and abolish redundancy ! | Thu Jun 07 1990 10:42 | 6 |
|
When you used XGetSizeHints what property did you use? If you used
WM_SIZE_HINTS then I thought this would have the desired information.
-=> Jim <=-
|
2880.4 | Just wait and find out | DECWIN::KLEIN | | Thu Jun 07 1990 11:53 | 11 |
| I don't think you can find out ahead of time how big (small) the window will
be. In general, a window manager may do last-minute calculations to figure
it out, based on (possibly) application-specific XDefaults resource values.
I would just wait for the MapNotify event and then do an XGetGeometry.
Or wait for the first Expose event and use the width,height that are
passed in the event. Prior to receiving these events, you should not
be writing to the window anyway, so there is no harm in deferring your
knowledge of the window size until this time.
-steve-
|