Re: How to get notified when a GdkWindow becomes hidden/invisible/unrealized?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jul 2, 2006, at 9:25 AM, Clemens Eisserer wrote:
> Whats the best way to get notified when an GdkWindow is
> invisible/hidden/destroyed (=minimized by the WM, hidden by the
> program, ...), is the unrealized-signal what I search for?
> And whats the best way to listen to these events if I would like to
> listen directly "from inside" GdkWindow, i guess adding a singal
> handler in GdkWindow would be a bit stupid ;)

I'm probably not really qualified to answer this, but I'll take a stab 
anyway to see if I can get you pointed in the right direction.

I just did some testing with the unrealized signal in a 
Gtk::DrawingArea-derived widget I have, and it is only fired when the 
window is destroyed.

GtkWidget provides a couple other signals that might be of interest 
though: "unmap", "unmap-event", and "visibility-notify-event".  My bets 
would be on visibility-notify-event as being the most likely candidate 
for being useful.  Perhaps a combination if visibility-notify-event and 
unrealized (if visibility-notify-event doesn't get fired on window 
destruction).  I haven't done any testing to determine when these 
events are fired, but it shouldn't be difficult to do.

Now, you may be able to tap in to these events within GdkWindow, just 
without using signal handlers; I really don't know (and I haven't gone 
poking around in the GdkWindow code yet to find out).

HTH, and I hope you have some good success in improving GTK's redraw 
performance.
- Michael

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux