Re: [gtk-list] Re: Q: Resizing Fixeds



On 5 Feb 1999, Owen Taylor wrote:

> "configure_event" is, like all event signals, RUN_LAST. That
> means that you get the event before GtkWindow does, so at
> that point, window->allocation has not yet been set.
> 
> Either use event->height/width instead, or 
> connect to size_allocate instead. 

Logical. Unfortunately, there's still a lag. I've tried both of these:

  $w->signal_connect("configure_event" => sub {
       my($widget,$e) = @_;
       if ($e->{width} > 0 and $e->{height} > 0) {
           $g->set_usize($e->{width}, $e->{height});
       }
   });
 
    $w->signal_connect("size_allocate" => sub {
        $g->set_usize($_[1]->[2], $_[1]->[3]); # width, height
    });

In both cases, the resizing of the glarea ($g) lags on step behind the
resizing/configuring of the window ($w). It looks like the set_usize is
being put on a queue, and not removed until the next time around, somehow. 

-- 
Kenneth Albanowski (kjahds@kjahds.com, CIS: 70705,126)




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