Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!hplabs!sdcrdcf!trwrb!trwspp!spp2!scheele From: scheele@spp2.UUCP (Mark Scheele ) Newsgroups: comp.windows.x Subject: Catching root window events in the toolkit Message-ID: <1333@spp2.UUCP> Date: 18 Feb 88 18:33:14 GMT Organization: TRW Inc., Redondo Beach, CA Lines: 23 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