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=/W7pABmeVgE5KEJCxYhBdiFDoY5sAl8ygXpZss9irpc=; b=LGSK+nxB4zmphWrchlZ3f1aBY2gLfff/tYUi+FBYsZ1KvRWOwlpaTIV+TdkLaPYXXV+FKU0wUuZl4rS/ICiWU/+jEQzgsm2VwTEm+LmYqqtwKbrf5T5PhOGc3OJ1HEBaN+TcmQdhqVZrGvgnHj7vN0/nSGfNiafY9NQDusg72Cw= 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=dNo/NtBerlOtH69LWHEQXCT9z8feQstuRnwK5Ian3NHc1CLBnHzlhBPQYWbfZs0rZ1UjmYXPgyvGspX4T/GSME8SOdYt9Cn9KgmYtnloBZhlgE748C09bLrQ6Hxbm209lbdbgLZDlaBnDyR5gEsQrZhNxSOUzmh2t0WcAPncAyA= Date: Thu, 1 May 2008 19:03:05 -0500 From: Peter Groves To: "MONATE Benjamin 205998" Subject: Re: [Lablgtk] Strange firing of Configure and Expose events withEventBox Message-Id: <20080501190305.e7de7684.pdgroves at gmail.com> In-Reply-To: <5EFD4D7AC6265F4D9D3A849CEA92191901415C at LAXA.intra.cea.fr> References: <20080501012417.59a99d33.pdgroves at gmail.com> <5EFD4D7AC6265F4D9D3A849CEA92191901415C@LAXA.intra.cea.fr> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Cc: lablgtk at yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Length: 4937 Thanks for the response. The example did not run (no window was displayed). I have attached the error messages output to standard err. I am using the version of lablgtk in ubuntu 7.10 Gutsy Gibbons. The debian package calls it version 2.6.0-7.=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. 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). 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. Peter=20 On Fri, 2 May 2008 00:15:50 +0200 "MONATE Benjamin 205998" wrote: > 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