Re: window get_size not correct



Jonathon Jongsma schreef:
On 7/16/07, RvdKorput <gtkverden gmail com> wrote:
Hiya there,

Im currently encountering a problem with retrieving the size of a
window. I have a window with no set_size_request set and a drawingarea
on it (and some other widgets). I do a set_size_request on the
drawingarea and the whole window resizes this is correct. But now i want
to retrieve the size of the window I get a wrong value. I do a
set_size_request on the drawing area (800x800) and then the get_size on
the window(returns 265,20).

Why doesnt the window returns its actual size?

Are you calling the window's get_size() immediately after setting the
size request on the drawing area?  Because I'm not sure that the size
allocation gets updated synchronously.  You may be checking the size
of the window before it actually gets re-allocated.  Do you get the
correct values if you check the size of the window in a handler for a
signal such as signal_size_allocate() or signal_configure_event()?

I probably found the error. The maximize is a request and not executed immidiately. After the maximize the size is probably correct (didn't check it yet)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]