Re: GDK: Window resizing



"Stefan Andersen" <spamfilter zingo org> writes:

> Im currently working on a port of glib/gdk/gtk (atk/pango) to the
> AmigaDE/Elate platform and I have some question..  My current
> problem is that Im little unsure on how window-resize is handled,
> and what I am expected to do to get the resize work....  This is
> what I try to do now based on looking on code from gdk/x11 and
> gdk/win32.

> I have a function (elate_gdkwineventfunc()) that will detect the OS
> event and try to convert it to an gdk-event this works well for a
> GDK_DELETE but I have big trouble with resizing. basicly my Idea of
> the whole thing was that it would be enugh to make a GDK_CONFIGURE
> event and just _gdk_event_queue_append(event) it and i expected a
> redraw and a resize call back from the gdk machinerary but does not
> happend... and locking into the code from x11 and win32 the internal
> gdkwindow object seems to be updated befor the event is inserted
> into gdk with _gdk_event_queue_append()
 
> The behavior I get is that the main window seems untouched, it is
> not redrawn or resized.... the childwindows are resized but only in
> hight not in the width (but this might be my fault I have not
> investigated in this before) the example I use to thest this in is
> the gtk arrow example, that consist of a window with 4 arrow buttons
> in diferent direction.

I think the basic thing you are missing is that on X, when you
get a Configure event on the top level, the toplevel has already
been resized. GTK simply reacts to this new size. If your windowing
system doesn't work like this, then you should resize the toplevel
in GDK before informing GTK of the new size.
 
Regards,
                                        Owen



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