[virt-tools-list] [PATCH virt-viewer] display: Do not override size-allocate handler

Christophe Fergeau cfergeau at redhat.com
Wed Aug 17 10:12:50 UTC 2016


On Wed, Aug 10, 2016 at 02:48:33PM +0200, Pavel Grunt wrote:
> On Wed, 2016-08-10 at 09:35 -0300, Eduardo Lima (Etrunko) wrote:
> > On 08/10/2016 07:41 AM, Pavel Grunt wrote:
> > > 
> > > On Tue, 2016-08-09 at 17:44 +0200, Christophe Fergeau wrote:
> > > > 
> > > > On Tue, Aug 09, 2016 at 05:17:31PM +0200, Pavel Grunt wrote:
> > > > > 
> > > > > 
> > > > > Just connect to the signal
> > > > 
> > > > I'm tempted to ask "why?". I think it's recommended (more efficient) to
> > > > just override the vfunc directly when you can (ie when you derive a new
> > > > widget) rather than connecting to a signal.
> > > 
> > > no strong reason, just a personal preference coming from the fact that
> > > virt-viewer-display is not "adjusting" its allocation, rather it is only
> > > using
> > > it for setting the allocation for its child.
> > > 
> > 
> > Well, in this case I think it would make sense. Did you get any
> > collateral effects with this patch?
> > 
> I tested it (fedora & win client) and didn't notice anything wrong. I did not
> see a reason for calling 'gtk_widget_set_allocation' if gtk can do it.

If you and Eduardo prefer this, just go ahead.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20160817/a1a299ca/attachment.sig>


More information about the virt-tools-list mailing list