Re: A question about box packing and widget/window sizing..
- From: "Daniel J. Kressin" <kressd11 sol acs uwosh edu>
- To: gtk-list redhat com
- cc: Owen Taylor <otaylor redhat com>
- Subject: Re: A question about box packing and widget/window sizing..
- Date: Sun, 2 May 1999 23:55:53 -0500 (CDT)
On 2 May 1999, Owen Taylor wrote:
[snip]
>
>Note that your constraints actually constrain the possible sizes
>of the toplevel window - so if you don't want to play some
>game with the user of "no, you can't have that size", you
>need to tell the window manager about the constraints.
>
[snip]
>
>I think the following should achive exactly the effect you
>want:
>
> GdkGeometry geometry;
>
> geometry min_aspect = 1.0;
> geometry max_aspect = 1.0;
>
> gtk_window_set_geometry_hint (toplevel, drawing_area,
> &geometry, GDK_HINT_ASPECT);
>
>The key here is the geometry_widget argument; if this
>is non-null then the constraints refer not to the toplevel
>as a whole, but to subwidget of the toplevel.
This doesn't work. In fact it causes the following odd results:
1) Neither NULL nor a non-null value as the geometry_widget arg constrain
the drawing area ("d_a") or the toplevel window at all.
2) Scenario: Executable W (with the above code), Executable WO (without
the above code), both running on (Linux) machine A.
Case 1 - Display on X server running on A: WO gives the expected window
contents, with no constraints on size. W gives a window containing *only*
the title bar (no packing table, no d_a), and what *would* be the
background (gray rectangles) of the window, offset about -10, -10 relative
to the "title bar window". Any attempt to resize W results in a core dump
with a BadAlloc. (It appears to be trying to alloc a backing pixmap
roughly 65000 x -10 for some reason.)
Case 2 - Display on X server on a Win95 machine (Astec-X 2.12 trial): W
and WO both display fine, with the expected window contents, again with no
constraints on size.
Truly bizarre. Any insights?
> Regards,
> Owen
Dan
____ Kressin ____ .-----------------------------------.
/___ \____________/ __ \ | dkressin@acm.org |
\ \ / / \ | | Lead Programmer/Analyst |
___/ __\/\/rench_ \__/ | | University of Wisconsin - Oshkosh |
\____/ \____/ | www.mio.uwosh.edu/~kressd11/ |
`-----------------------------------'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]