On Mon, 2005-07-25 at 14:45 -0600, Kevin DeKorte wrote:
> On Monday 25 July 2005 02:11 pm, David Necas (Yeti) wrote:
> > On Mon, Jul 25, 2005 at 01:57:02PM -0600, Kevin DeKorte wrote:
> > > Nice tip, but unfortunately the expose event does not signal when the
> > > object is covered up. Only when revealed. I even hooked "event" and
> > > "event-after" and nothing was emitted when I covered up the window. Only
> > > events were triggered when I moved the mouse into the window and out of
> > > it and clicks.
> >
> > I'm not following this thread closely, so I'm sorry if
> > I missed something, but have you tried "visibility-notify-event"
> > signal?  See attached example.
> >
> 
> Ah! sample code is good... had been trying the visibility-notify-event, but 
> it 
> didn't work then I saw the "add_events" call and I went ... "doh!" Added that 
> and it works almost how I want it, is there another event I should be looking 
> for as well? Switching desktops and minimizing does not seem to pop the 
> event, but this is pretty close. Covering up the window does work..

You probably need to catch ::unmap-event, ::map-event as well. (For
toplevels, for subwindows it gets harder -- you'd need to track those
events on the toplevel.)

There are some other quirks of ::visibility-notify-event you have to be
aware of - most importantly, you aren't guaranteed to get an expose
when you become visible again, so if you suppress drawing when you
aren't visible, you have to redraw everything when you become visible.

Regards,
                                                        Owen


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to