Re: [gtk-vnc-devel] Scaling down
- From: "Daniel P. Berrange" <berrange redhat com>
- To: Anthony Liguori <anthony codemonkey ws>
- Cc: gtk-vnc-devel List <gtk-vnc-devel lists sourceforge net>
- Subject: Re: [gtk-vnc-devel] Scaling down
- Date: Thu, 5 Jun 2008 16:27:42 +0100
On Thu, Jun 05, 2008 at 10:08:32AM -0500, Anthony Liguori wrote:
> Daniel P. Berrange wrote:
> >
> >Yes, but even when scaling is enabled, when first connecting to the
> >server it will be in 1:1 mode, which GTK-VNC optimizes to use GDK and
> >thus calls set_size_request(). Once that's called, even though you can
> >now scale the display you can't scale it smaller due to this initial
> >call.
> >
> >We probably need to conditionalize set_size_request() based on whether
> >the scaling flag is enabled or not, instead of whether we're drawing
> >when GL vs GDK.
> >
>
> The scaling flag can be enabled very early if that's desired. Note that
> enabling scaling doesn't automatically mean you scale. If the ratio is
> 1:1, it still uses GDK, it just doesn't do set_size_request().
>
> So we already have this behavior.
I don't believe we do.
in the do_resize() method
if (priv->gl_enabled)
setup_gl_image(obj, width, height);
else
setup_gdk_image(obj, width, height);
And the last line in setup_gdk_image() is
gtk_widget_set_size_request(GTK_WIDGET(obj), width, height);
So, if scaling is enabled and it is 1:1, then AFAICT, we will always
set the size request explicitly.
> If a user conditionally enables scaling, they should set_size_request(1,
> 1) IFF they haven't set window_set_resizable(False). I've always
> wondered if there was an unset_size_request() type operation that puts
> you back in the mode before any size request has been made. That would
> really be ideal. I've never been able to figure that out though.
I guess that's just a case of checking to see what the default size
values are in GTK before being set. I imagine they're either 1,1 or
-1, -1.
Regards,
Daniel.
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]