[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC,Draft] ui: add an embedded Barrier client
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [RFC,Draft] ui: add an embedded Barrier client |
Date: |
Wed, 28 Aug 2019 08:11:03 +0200 |
User-agent: |
NeoMutt/20180716 |
Hi,
> For instance:
>
> section: screens
> localhost:
> ...
> VM-1:
> ...
> end
>
> section: links
> localhost:
> right = VM-1
> VM-1:
> left = localhost
> end
>
> Then on the QEMU command line:
>
> ... -object input-barrier,id=barrie0,name=VM-1 ...
>
> When the mouse will move out of the screen of the local host on
> the right, the mouse and the keyboard will be grabbed and all
> related events will be send to the guest OS.
Put that into docs/ ?
> +#define BARRIER_VERSION_MAJOR 1
> +#define BARRIER_VERSION_MINOR 6
> +
> +enum cmdids {
> + MSG_CNoop,
> + MSG_CClose,
> + MSG_CEnter,
> + MSG_CLeave,
> + MSG_CClipboard,
> + MSG_CScreenSaver,
> + MSG_CResetOptions,
> + MSG_CInfoAck,
> + MSG_CKeepAlive,
> + MSG_DKeyDown,
> + MSG_DKeyRepeat,
> + MSG_DKeyUp,
> + MSG_DMouseDown,
> + MSG_DMouseUp,
> + MSG_DMouseMove,
> + MSG_DMouseRelMove,
> + MSG_DMouseWheel,
> + MSG_DClipboard,
> + MSG_DInfo,
> + MSG_DSetOptions,
> + MSG_DFileTransfer,
> + MSG_DDragInfo,
> + MSG_QInfo,
> + MSG_EIncompatible,
> + MSG_EBusy,
> + MSG_EUnknown,
> + MSG_EBad,
> + /* connection sequence */
> + MSG_Hello,
> + MSG_HelloBack,
> +};
Put that into a barrier-protocol header file?
> + case MSG_QInfo:
> + p = write_cmd(ib, p, MSG_DInfo);
> + p = write_short(ib, p, 0); /* x origin */
> + p = write_short(ib, p, 0); /* y origin */
> + p = write_short(ib, p, 1920); /* width */
> + p = write_short(ib, p, 1080); /* height */
Hmm.
This is the screen size I guess? Which you don't know ...
What this is used for?
Should we maybe use INPUT_EVENT_ABS_MAX here?
> + case MSG_DMouseMove:
> + qemu_input_queue_abs(NULL, INPUT_AXIS_X, msg.mousepos.x, 0, 1920);
> + qemu_input_queue_abs(NULL, INPUT_AXIS_Y, msg.mousepos.y, 0, 1080);
... and here too of course.
> + addr.type = SOCKET_ADDRESS_TYPE_INET;
> + addr.u.inet.host = g_strdup("localhost");
> + addr.u.inet.port = g_strdup("24800");
Does it make sens to allow connecting to other machines?
Or will the barrier daemon run on every machine anyway?
Looks reasonable overall.
cheers,
Gerd