Re: Detecting a resize
- From: Daniel Kasak <dan entropy homelinux org>
- To: Hans Oesterholt-Dijkema <hdnews gawab com>, "gtk-list gnome org" <gtk-list gnome org>
- Subject: Re: Detecting a resize
- Date: Fri, 20 Oct 2006 20:49:20 +1000
Hans Oesterholt-Dijkema wrote:
> Thank you,
>
> But this is a 'run-first' signal.
> I assume that this signal runs before the
> actual resize has occured.
>
> Or is this a wrong assumption?
>
> --Hans
Um ... kinda. You can use signal_connect_after but in this case, it
won't help yout. When someone resizes a window, you could get a LOT of
size_allocate signals being fired. If they just hit the maximize button
you'd be OK, but if they drag and resize the window then you'll get
lots. What I'd do is set a Glib timeout to do your scaling a little
after the size_allocate fires, and the maybe set a flag telling yourself
not to rescale again until after the flag is reset ... and then reset it
when you do the scale ( after the timeout ).
Or you could get really tricky and figure out when the user has finished
resizing the window by using a timeout and some code that sets a flag
when a size_allocate signal is set ... you'd do your scaling operation
if your timeout code runs and a *further* size_allocate signal *hasn't*
been fired.
Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]