scheele@spp2.UUCP (Mark Scheele ) (02/19/88)
I have a need to read events that occur in the root window. I have been able to read them in a very obscure manner. Does any one know a better way to do it at the toolkit level. Current Method: struct _WidgetRec dummy; display = XtDisplay(toplevel); root_window = RootWindow(display, DefaultScreen(display)); dummy = *toplevel; dummy.core.window = root_window; dummy.core.sensitive = TRUE; dummy.core.event_table = NULL; XtAddEventHandler(&dummy, ButtonReleaseMask, FALSE, handle_event, NULL); /* Undocumented function in Event.c */ RegisterWindow(root_window, &dummy); All events to the root window are now caught by this "dummy" widget. Thanks in advance, MS