Re: GDK "root" GtkObject?



-> ->  Please report whether this worked.
-> 
-> 	Nope, not working.  Here is the code I tried:

	Got it!  Whoohoo!

	Looking through gtk_main_do_event() in gtkmain.c I found the
following comment:

  /* Find the widget which got the event. We store the widget
   *  in the user_data field of GdkWindow's. [...] */


	So *that* is how GTK+ corresponds a particular X event to a
particular GtkWidget.  The GdkWindow has a pointer to the GtkWidget, and
the GtkWidget has a pointer to the GdkWindow.  Groovy.

	Adding this line:

    window->user_data = widget;

	...to the earlier code makes it work.  Yeehaw!  Now I should be
able to do re-draws on exposes correctly.

	Thanks for your help!


--Derek Simkowiak






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