Well, I have a halfway working version of the GPM code using
connect_to_file_descriptor() - it gets and reads events. And you can turn
gpm-mode on and off and have it do the right thing.
The only problem is that I am using Fdispatch_event() after creating an
event and filling in the structures. Like this:
-----
fake_event = Fmake_event (Qnil, Qnil);
event = XEVENT(fake_event);
event->timestamp = 0;
event->channel = Fselected_frame (Qnil); /* CONSOLE_SELECTED_FRAME (con); */
if (ev.modifiers & 1) modifiers |= MOD_SHIFT;
if (ev.modifiers & 2) modifiers |= MOD_META;
if (ev.modifiers & 4) modifiers |= MOD_CONTROL;
if (ev.modifiers & 8) modifiers |= MOD_META;
[...]
/* Handle the event */
Fdispatch_event (fake_event);
Fdeallocate_event (fake_event);
GPM_DRAWPOINTER(&ev);
return (Qzero);
-----
For one thing, you never really get to see the GPM pointer except for a lot
of flickering, I think because redisplay happens immediately after the
'process output' is handled. Also, I get all sorts of weird errors like:
(3) (error/warning) Error in process filter: (error Selection aborted)
(4) (error/warning) Error in process filter: (wrong-type-argument integerp #<INTERNAL
OBJECT (XEmacs bug?) (symbol-value-forward type 13) 0x822037c>)
I think the selection aborted is because of the process events getting
there when it thinks a mouse button is depressed, but I don't know for
sure.
Any ideas?
-Bill P.
Show replies by date