Xref: utzoo comp.unix.questions:12263 comp.windows.misc:1083 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ucsd!nosc!humu!uhccux!lupton From: lupton@uhccux.uhcc.hawaii.edu (Robert Lupton) Newsgroups: comp.unix.questions,comp.windows.misc Subject: Cursors under SunView Message-ID: <3499@uhccux.uhcc.hawaii.edu> Date: 17 Mar 89 04:12:58 GMT Organization: University of Hawaii Lines: 35 I have a piece of code that puts up a cursor in a SunView Canvas, and then loops looking for either a mouse button or a key being hit. If I call it repeatedly, I see every mouse button (I've removed the code to do that), but I only see every other keyboard key. Does anyone have any ideas? Notice that I am not using the notifier for this, I am asking for events explicitly. sunv_cursor(x,y) int *x,*y; { Cursor cursor; Event event; cursor = window_get(canvas,WIN_CURSOR); cursor_set(cursor,CURSOR_CROSSHAIR_LENGTH,CURSOR_TO_EDGE,0); window_set(canvas,WIN_CURSOR,cursor,0); window_set(canvas,WIN_CONSUME_KBD_EVENTS,WIN_NO_EVENTS,WIN_ASCII_EVENTS,0,0); for(;;) { if(window_read_event(canvas,&event) < 0) { perror("read event"); } (void)canvas_event(canvas,&event); if(isascii(event_action(&event))) { cursor_set(cursor,CURSOR_CROSSHAIR_LENGTH,INACTIVE_CURSOR_LEN,0); window_set(canvas,WIN_CURSOR,cursor,0); window_set(canvas,WIN_IGNORE_KBD_EVENT,WIN_ASCII_EVENTS,0); return; } } } Robert Lupton (lupton@uhccux.uhcc.hawaii.edu)