qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Laurent Vivier <laurent@vivier.eu>
Cc: Alex Williamson <alex.williamson@redhat.com>,
	"Daniel P . Berrange" <berrange@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC,Draft] ui: add an embedded Barrier client
Date: Wed, 28 Aug 2019 08:11:03 +0200	[thread overview]
Message-ID: <20190828061103.u4l4inomwfvbodtn@sirius.home.kraxel.org> (raw)
In-Reply-To: <20190827192526.21780-1-laurent@vivier.eu>

  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



  reply	other threads:[~2019-08-28  6:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-27 19:25 [Qemu-devel] [RFC,Draft] ui: add an embedded Barrier client Laurent Vivier
2019-08-28  6:11 ` Gerd Hoffmann [this message]
2019-08-28  8:13   ` Laurent Vivier
2019-08-28  9:07     ` Gerd Hoffmann
2019-08-28 20:58       ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190828061103.u4l4inomwfvbodtn@sirius.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=berrange@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).