Property notify on root window in Gtk2.0
- From: Peter Zelezny <pzel dodo com au>
- To: gtk-app-devel-list gnome org
- Subject: Property notify on root window in Gtk2.0
- Date: Sat, 5 Oct 2002 15:03:02 +1000
Hi All,
Could somone suggest a way to get property notifies on the root window
using GTK2's signal system?
In 1.2, I'd do it something like this:
static gboolean
handle_property_notify (GtkWidget *widget, GdkEventProperty *event,
gpointer user_data)
{
...
}
{
proxy_invisible = gtk_invisible_new ();
/* Make the root window send events to the invisible proxy widget */
gdk_window_set_user_data (GDK_ROOT_PARENT (), proxy_invisible);
/* Select for PropertyNotify events from the root window */
XSelectInput (GDK_DISPLAY (), GDK_ROOT_WINDOW (), PropertyChangeMask);
g_signal_connect (G_OBJECT (proxy_invisible), "property_notify_event",
G_CALLBACK (handle_property_notify), NULL);
gtk_widget_show (proxy_invisible);
}
--
Peter Zelezny.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]