Re: (Un)Maximize Event



On Thu, 2007-10-04 at 12:32 +0200, Iker Perez de Albeniz wrote:

> my porbles is tha for example when i maximize the window this function:
> 
> gdk_window_get_size(gdk_window_get_toplevel(event->window),&width,&height);
> 
> take the unmaximized size of the window.. is like if it where a delay
> betwen the maximize() function and the maximization.. 
> 
> any way to solve this problem??

either do the get_size()/move calls in an idle handler, or after
maximise/unmaximise, call while (gtk_events_pending())
{ gtk_main_iteration(); }.

you are working with an event driven GUI toolkit. stuff doesn't actually
happen to windows until you return control to the main loop. this
includes actual pixels being drawn on the screen, windows being resized,
etc.





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