Re: GDK bug



Carlos Pereira <carlos pehoe civil ist utl pt> writes:
put a printf statement in your configure_event callback,
it will be printed only when you change the size of
the window. Moving the window around, even minimizing the 
window or touching the resize tool in the WM decorations 
will not trigger the configure_event. Of course it will be 
triggered if you maximize the window. I just tried all of 
these operations myself with 3 different WMs.

For minimization:

This is not the case on the win32 implementation.
As far as I remember, a minimization will emit a "configure" and
set the size of the window to (1, 1).
Which is odd... but maybe it has been fixed ?

My comments apply only to GNU/Linux and Unix in general...

The behaviour described above occurs when the configure_event
is connected directly to a inner widget, typically a 
drawing_area/gl_area. If you connect configure_event 
directly to the top_window then you will trigger configure_event
in some other cases, you can use xev, to see all the signals
emited by X.

You need a configure_event callback for example to
free a bitmap and allocate a new one, with the new
dimensions, to modify a viewport in OpenGL, etc...
When you minimize a window, there is really no reason
to trigger this callback, the old bitmap or viewport
should be preserved, what could possibly be the dimensions
of the new bitmap? that's why you are receiving a (1, 1) size,
you don't need a bitmap at all while the window is minimized,
but (0, 0) could be unnaceptable for some routines handling
bitmaps, while (1, 1) should be a perfectly acceptable bitmap
size, this is just wild speculation of course...

Unless you really need this signal connected to the
top window you probably should consider connecting
directly to the widget that you actually need to reconfigure,
usually a drawing area.

Carlos




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