Delivered-To: lablgtk at yquem.inria.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type:content-transfer-encoding; bh=r50VLg+rya57QS9h3jKAJFw35e2NgHuMpzZU+BA3GcM=; b=ITmcRolgkP0bUf/yu1CCBz1rJUNROctP243Wk3822/anps6jF5SUPt40/GZmHpZZCnv080TegztLXuYTJ9b18rgMpfK4LBGA904SEBSGGlEabo9zs4nmphrt/UUFQnw/TQtG5jPVHAaOEC1spqToybPhxEU9BzF25j7Vd9vTOMw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type:content-transfer-encoding; b=UMChD96OLZVp6Zgda3vr6kVsj87Urb2wmp7S3R/1++iMCC+l3a/RzMvRWIppb7j76kQVidb7vCfRr5pOV0IYRrj9ZW/jyCTHXQuJgTzZtYVaDKmKzTe9/PAs30yOIlbtwQKmxTfG51FTFbBvHelFn+B28XeU0Wojz+OVHDW3RK8= Date: Fri, 2 May 2008 01:48:14 -0500 From: Peter Groves To: Peter Groves Subject: Re: [Lablgtk] Strange firing of Configure and Expose events withEventBox Message-Id: <20080502014814.16c1c761.pdgroves at gmail.com> In-Reply-To: <20080501190305.e7de7684.pdgroves at gmail.com> References: <20080501012417.59a99d33.pdgroves at gmail.com> <5EFD4D7AC6265F4D9D3A849CEA92191901415C@LAXA.intra.cea.fr> <20080501190305.e7de7684.pdgroves@gmail.com> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Cc: MONATE Benjamin 205998 , lablgtk at yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Length: 5587 Just as an update: I got rid of the drawing_area inside of the event_box configuration and most of the problems have gone away. I am getting expose and size_allocation events when I expect them. There are still some issues with the display, but for now I should be ok. Thanks, Peter On Thu, 1 May 2008 19:03:05 -0500 Peter Groves wrote: > Thanks for the response. >=20 > The example did not run (no window was displayed). I have attached the > error messages output to standard err. >=20 > I am using the version of lablgtk in ubuntu 7.10 Gutsy Gibbons. > The debian package calls it version 2.6.0-7.=20 >=20 > If upgrading is the simplest solution, what version is currently > considered most stable? Preferably one that works with ocaml 3.09, as > I try to stay in sync with the Debian/Ubuntu packages as much as > possible. >=20 > As for specifics, I currently have only a drawing_area in the > eventbox. I was originally going to use the events of the > drawing_area but I now need to start capturing events of other > widgets (as soon as I get this problem sorted out). At one point I > tried putting the drawing area in a Frame and then the Frame in the > eventbox, but it didn't seem to make any difference (I saw the frame, > but still no events). >=20 > If the drawing area might be interfering by capturing the events > before they get to the eventbox, I could switch to drawing on a > pixmap and displaying that, I think. I'm not sure if that will be > difficult, so I'm hoping someone can give me some optimism that it > might solve my problem before I undertake the change. >=20 > Peter=20 >=20 >=20 >=20 > On Fri, 2 May 2008 00:15:50 +0200 > "MONATE Benjamin 205998" wrote: >=20 > > Hi, > >=20 > > According to the attached example, expose does fire on an eventbox > > at startup and maximization. Can you confirm this with your Gtk > > version ? If you do confirm, what is your exact situation ? The > > event has probably been caught by other widgets in your GUI. > >=20 > > Hope this helps, > > Benjamin Monate > >=20 > >=20 > >=20 > > -------- Message d'origine-------- > > De: lablgtk-bounces@yquem.inria.fr de la part de Peter Groves > > Date: jeu. 01/05/2008 08:24 > > =C0: lablgtk@yquem.inria.fr > > Objet : [Lablgtk] Strange firing of Configure and Expose events > > withEventBox=20 > > Hi, > >=20 > > I'm having trouble getting a custom widget to respond properly to > > gtk events. I'm using an EventBox to handle all of the signals, but > > it doesn't fire when I expect it to.=20 > >=20 > > As an attempt at brevity, here is the somewhat complex situation as > > a list: > >=20 > > 1) At this point, I have turned on all events just to make sure that > > isn't the issue with: > >=20 > > eventBox#event#add [`ALL_EVENTS]; > >=20 > > 2) Mouse events (MOTION_NOTIFY, LEAVE_NOTIFY, ENTER_NOTIFY) work as > > expected. My application draws to the screen in response to mouse > > events, and the correct image appears when I move the mouse around. > > I'm accessing these like this: > >=20 > > eventBox#event#connect#enter_notify enterCallback > > eventBox#event#connect#leave_notify exitCallback > > eventBox#event#connect#motion_notify motionCallback > >=20 > > 3) My callback to expose: > >=20 > > eventBox#event#connect#expose exposeCallback > >=20 > > does not fire when the window is displayed at program startup, nor > > when the window is minimized and maximized. > >=20 > > 4) The expose callback does fire when the window is resized. > >=20 > > 5) The actual drawing I do in response to exposure events seems to > > complete when the window is resized, but the widget remains blank > > (or perhaps it is immediately cleared). This is the same drawing > > function I call in response to mouse events, so I know the drawing > > code is more or less correct. (I start up the app, it's blank. I > > move the mouse over it, it draws the image and my cursor tracking > > animation. I resize the window, it is again blank.) > >=20 > > 6) I never was able to receive configure events when the window is > > resized (or initialized) using: > >=20 > > eventBox#event#connect#after#configure resizeCallback > >=20 > > 7) Because of (6) i switched to size_allocation events: > >=20 > > eventBox#misc#connect#size_allocate resizeCallback > >=20 > > which fire when expected at startup and when the window is resized, > > but are not sufficient because I cannot draw in response to them at > > program startup (it seems to be called before the screen resources > > are allocated - i can therefore initialize my image buffers and > > such but cannot display them without an Expose event, which never > > comes).=20 > >=20 > > /end list > >=20 > > I would be ok if I could get expose events (or some other event) to > > fire at the normal times of, well, the window being "exposed". Also > > the issue in (5) above is a show stopper. I would also be > > interested, though, in any insights as to why I would be unable to > > receive Configure events when the window is resized. > >=20 > > I should say that I am porting this application from ruby-gtk, and > > what I'm attempting to do worked there. > >=20 > > Peter > >=20 > > http://petergroves.com > >=20 > >=20 > > =20 > >=20 > > _______________________________________________ > > Lablgtk mailing list > > Lablgtk@yquem.inria.fr > > http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk > >=20 > >=20 > >=20 _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk