Anthony Liguori wrote:
Richard W.M. Jones wrote:Anthony Liguori wrote:Richard W.M. Jones wrote:I don't know if you necessarily want to classify this as a bug, but currently if you create a Gtk-VNC widget but don't pack it, then it will segfault when it tries to draw anything.I'm not sure what "packed" is. Do we need to wait for realize or something? My concern with this patch is that the buffer disappears until the next resize so when things to get "packed" we don't start displaying like we should.Sorry, I wasn't clear. This is when you create a Gtk-VNC widget but don't add it to any container, but then you do make it connect to a VNC server. The widget segfaults, because the return value fromgdk_drawable_get_visual (GTK_WIDGET(obj)->window)is NULL, and you get a segfault a couple of lines later when visual is dereferenced.This shouldn't affect any code which does pack the widget in a container (visual != NULL).Yes, but that's not my concern. My concern is if you connect a widget before packing it, and then wait a while before actually packing it. When you pack it, you need to make sure it's displaying stuff.This is why I suggested listening for the realized signal. I think this is the thing that indicates that a visual is now valid.
If I understand you correctly, do you mean waiting for the realized signal before starting up the coroutine?
Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature