|
From: Daniel J S. <dan...@ie...> - 2004-09-07 02:35:46
|
Daniel J Sebald wrote:
> Getting close here, Dave. I commented out the ProcessEvents()=20
> function in pr_window(), which contains
>
> static void
> ProcessEvents(Window win)
> {
> XSelectInput(dpy, win, KeyPressMask | KeyReleaseMask
> | StructureNotifyMask | PointerMotionMask | PointerMotionHintMa=
sk
> | ButtonPressMask | ButtonReleaseMask | ExposureMask |=20
> EnterWindowMask);
> XSync(dpy, 0);
> }
>
> After that, plotting to X windows is fine; but of course without this=20
> the mouse and resizing don't work. So right now I'm reading the man=20
> XSelectInput to find out what the conflict is.
It's ButtonPressMask.
=B7 Only one client at a time can select a ButtonPress
event, which is associated with the event mask
ButtonPressMask.
[Don't ask me why.] I'm assuming then, those few examples I found a few=20
days ago didn't have ButtonPress event selected.
In the new patch, which I'll send to Dave, Ethan, and Donald separately,=20
the default is for gnuplot_x11 to not grab ahold of the mouse button.=20
But if you add an 'm' after the XID within the string, it will grab=20
ahold of the mouse. E.g.,
set term x11 window '220001e m'
Dan
PS: Added documentation for the new feature (change syntax if desired):
The `x11` terminal can connect to external X windows created by an outsi=
de
application via the option `window` followed by a string containing the
X ID for the window in hexadecimal format. By default, gnuplot assumes
the exterior window is not mouseable because two clients for the same X
window cannot both map a button press event. For situations where the
exterior application has not mapped the button press event, there is the
option to make gnuplot map the button press event by following the X ID
with the letter `m` within the string, e.g.,
set term x11 window "220001e m"
|