How To Enable X Root Window PropertyNotify Event ("property-notify-event" signal?) In GTK+?



Hi,

I want to receive X's PropertyNotify event for _NET_WORKAREA and
_NET_CURRENT_DESKTOP root window properties.

How can I enable them? Can they be received as "property-notify-event"
signal? Or do I need to use lower level event interface?

It wasn't working when I tried out the following approach:

GdkWindow *root_gdk_window = gtk_widget_get_root_window(
GTK_WIDGET(window); // in "map" callback.
GtkWidget *root_window_widget = gtk_window_new(GTK_WINDOW_TOPLEVEL);
root_window_widget->window = root_gdk_window;
gdk_window_set_user_data(root_window_widget->window, root_gdk_window);
GTK_OBJECT_FLAGS( GTK_OBJECT(root_window_widget) ) |= GTK_REALIZED |
GTK_MAPPED | GTK_VISIBLE;
g_signal_connect( root_window_widget,
                  "property-notify-event",
G_CALLBACK(property_notify_event_cb),
                  NULL);

That was just an attempt at solving my problem.
Does anybody know if the right way to enable root window PropertyNotify
event in GTK+?

Thanks!

-- 
Daniel Yek.




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