chris@bilby.cs.uwa.oz.au (chris mcdonald) (04/09/91)
When I compile the following stripped down XView program with:
cc -O -s -o try try.c -lxview -lolgx -lX11
on my SPARC-1, 4.0.3, X11-R4 under twm I get unexpected results. It compiles
OK and if I run it as ./try, move the mouse into the window and hit
F1 .. F10 then F1 .. F10 (correctly?) come out stderr (my xterm).
However, if I run it as ./try xload where "xload" is the name of a program
that I have requested twm *not* to display a titlebar on, with
twmrc: NoTitle
{
"xload"
}
then striking the function keys produces no response.
Bad interaction solved with olwm? Any ideas?
--------------------------------------------------------------------------------
Chris McDonald. _--_|\
/ \
X_.--._/
v
Department of Computer Science, ACSnet: chris@budgie.cs.uwa.oz.au
University of Western Australia, ARPA: chris%budgie.cs.uwa.oz.au@uunet.uu.net
Mounts Bay Road, FTP: bison.cs.uwa.oz.au, 130.95.1.23
Crawley, Western Australia, 6009. SCUD: (31.97 +/-10% S, 115.81 +/-10% E)
PHONE: ((+61) 09) 380 2533 FAX: ((+61) 09) 382 1688
--------------------------------------------------------------------------------
#include <stdio.h>
#include <xview/xview.h>
main(argc,argv) int argc; char **argv;
{
Frame baseframe;
void got_function_key();
static char *av[] = { "-Wp", "200", "200", "-Ws", "100", "100", NULL };
(void)xv_init(XV_INIT_ARGS, 6, av, NULL);
baseframe = (Frame)xv_create(NULL, FRAME,
FRAME_LABEL, (argv[1] ? argv[1] : argv[0]),
WIN_CONSUME_EVENTS, WIN_NO_EVENTS, WIN_TOP_KEYS, NULL,
WIN_EVENT_PROC, got_function_key,
NULL);
window_fit(baseframe);
xv_main_loop(baseframe);
exit(0);
}
void got_function_key(window, event, arg)
Xv_Window window; Event *event; Notify_arg arg;
{
if(! event_is_key_top(event) || event_is_up(event))
return;
(void)fprintf(stderr,"F%d\n",event_id(event) - KEY_TOPFIRST + 1);
}