<div dir="ltr">Thanks for the feedback!<br><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 8, 2017 at 3:44 PM Marc-André Lureau <<a href="mailto:marcandre.lureau@redhat.com">marcandre.lureau@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
<br>
----- Original Message -----<br>
> Hey all,<br>
><br>
> this series introduces very basic seamless (aka unity aka coherence, ...)<br>
> mode<br>
> support for spice-gtk and both Windows and Linux vdagent.<br>
> Many other rival companies have already added this feature to their products,<br>
> therefore it might be the right time to cover it too...<br>
<br>
Do you know if virtualbox is actively maintaining that feature? I mean does it work well with gnome 3 & windows 10 for example? It could be worth to ask if there are ideas or code we could share for this feature perhaps.<br>
<br></blockquote><div>I've tried VirtualBox with Windows 10 and it doesn't work very well, the new apps from Windows Store are not visible at all.</div><div>Here's part of their implementation for Win, most important is the VBoxEnumFunc() that decides which window should be shown.</div><div><a href="https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxSeamless.cpp">https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxSeamless.cpp</a><br></div><div>Maybe it could be useful when targeting older versions of windows, otherwise I'm not sure, haven't look at the linux version yet.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> Agent sends list of visible areas/change in visible area whenever a window<br>
> is created, moved or closed/hidden. The client then masks out the areas<br>
> that shoud not be visible accordingly.<br>
<br>
How do you deal with non-rectangular apps/windows?</blockquote><div><br></div><div>Currently all windows are considered to be rectangular.</div><div>Is there any well-known program that has non-rectangular windows? Perhaps some clock widgets?</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
><br>
> The spice-gtk and linux agent implementation is heavily based on older work<br>
> from Ondřej Holý and Lukáš Venhoda, so big shout-out for them.<br>
> I merged the initial commits in spice-gtk and fixed some minor issues.<br>
> You can have a look at the original version here, if you wish to,<br>
> on branch "seamless-mode":<br>
><br>
> spice-protocol: git://<a href="http://people.freedesktop.org/~lvenhoda/spice-protocol" rel="noreferrer" target="_blank">people.freedesktop.org/~lvenhoda/spice-protocol</a><br>
> spice-gtk: git://<a href="http://people.freedesktop.org/~lvenhoda/spice-gtk" rel="noreferrer" target="_blank">people.freedesktop.org/~lvenhoda/spice-gtk</a><br>
> linux vdagent: git://<a href="http://people.freedesktop.org/~lvenhoda/vd_agent" rel="noreferrer" target="_blank">people.freedesktop.org/~lvenhoda/vd_agent</a><br>
><br>
> Further progress can be tracked on my Github,<br>
> again branch "seamless-mode" (might not be always stable):<br>
><br>
> spice-protocol: <a href="https://github.com/jjanku/spice-protocol.git" rel="noreferrer" target="_blank">https://github.com/jjanku/spice-protocol.git</a><br>
> spice-gtk: <a href="https://github.com/jjanku/spice-gtk.git" rel="noreferrer" target="_blank">https://github.com/jjanku/spice-gtk.git</a><br>
> linux vdagent: <a href="https://github.com/jjanku/linux-vd_agent.git" rel="noreferrer" target="_blank">https://github.com/jjanku/linux-vd_agent.git</a><br>
> win32 vdagent: <a href="https://github.com/jjanku/win32-vd_agent.git" rel="noreferrer" target="_blank">https://github.com/jjanku/win32-vd_agent.git</a><br>
><br>
> DEMO:<br>
> If everything goes well, you should hopefully see output similar to this:<br>
> <a href="https://www.youtube.com/watch?v=IX49z8VbD-c" rel="noreferrer" target="_blank">https://www.youtube.com/watch?v=IX49z8VbD-c</a><br>
> (windows leaving traces have been fixed since then)<br>
<br>
Nice, easy to see a few glitches though. I suppose it's even worse with a more recent windows/os. Also I suppose you have bigger glitch when windows overlap each others. Ideally, each windows would have a different drawing context/buffer, so composition/decomposition on the client side wouldn't suffer glitches. This is something we could more easily have with virgl-enabled guest, since each application has different rendering contexts already.<br>
<br></blockquote><div> </div><div>What do you mean by glitches? The traces after moving/resizing the minesweeper window?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> TESTING:<br>
> Has been tested on:<br>
> Fedora 25 with Gnome, Win7, Win8.1, Win10; all with basic preinstalled<br>
> programs<br>
> (there seem to be some extra windows that pass the filter on Win8.1,<br>
> other versions should work just fine)<br>
><br>
> NOTICE:<br>
> spice-gtk: commit ba87ba2: removes drawing function that was in the original<br>
> implementation and I found it redundant, it works fine without it for me.<br>
> If you have any problems with transparency, delete this commit and<br>
> give it another try, otherwise it shall be merged with the initial commit.<br>
><br>
> LIMITATIONS & FUTURE PLANS:<br>
> - window integration could be better (currently one window that stays on<br>
> top),<br>
> maybe create some dummy windows that would control the actual windows on<br>
> remote system? not sure really, any ideas?<br>
<br>
Indeed, the app focus should be managed by the client. </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> - multi monitor/workspace support<br>
> - launching programs: currently no way for linux, Start menu on Windows<br>
<br>
I'd consider this a secondary goal<br>
<br>
> - drag & drop (started some research for Win, see below if you're interested)<br>
<br>
same here.<br>
<br>
Better drag and drop would also benefit "non-rootless" remote desktop. I have done some work in the past around this, you can see some old wip here:<br>
<br>
<a href="https://github.com/elmarco/spice-gtk/commit/c3eba974975d4f4d8fefc5b5f2db59db33c49fec" rel="noreferrer" target="_blank">https://github.com/elmarco/spice-gtk/commit/c3eba974975d4f4d8fefc5b5f2db59db33c49fec</a><br>
<a href="https://github.com/elmarco/vdagent-gtk/commit/4b58c752e6844d3a8d763964f36c9e9d29929d36" rel="noreferrer" target="_blank">https://github.com/elmarco/vdagent-gtk/commit/4b58c752e6844d3a8d763964f36c9e9d29929d36</a><br>
<br>
(based on an incomplete vdagent rewrite: <a href="https://github.com/elmarco/vdagent-gtk" rel="noreferrer" target="_blank">https://github.com/elmarco/vdagent-gtk</a>)<br>
<br>
Note I was only using Gtk, so code should remain portable.<br></blockquote><div><br></div><div>Thanks, I'll have a look. Since it isn't just seamless-mode dependent, I'd like to address it rather sooner than later. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> - clicking through: gdk_window_input_shape_combine_region() is not supported<br>
> on Win, gdk_window_shape_combine_region() might do the trick<br>
> (as it does on some linux systems), not tested though<br>
> - Wayland support?<br>
<br>
That should be a priority at this point. Using and fixing gtk+ where necessary should give the portability needed.<br>
<br>
> - windows in Gnome have no border/shadow, they blend into the background,<br>
> maybe we should draw shadows/borders for them in spice-gtk? (low priority)<br>
<br>
To be discussed with gtk/desktop team, I suppose there is a way to activate shadow.<br>
<br>
You probably don't want the window decoration & border being drawn by the client though.<br>
<br>
> - Windows: switch to in-context event hooks? (low priority)<br>
<br>
What's that? <br></blockquote><div><br></div><div><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/dd318524(v=vs.85).aspx">https://msdn.microsoft.com/en-us/library/windows/desktop/dd318524(v=vs.85).aspx</a></div><div>It should be faster, but would probably require some sort of inter-process communication to get the data back to vdagent. VirtualBox implementation uses these. Delayed events don't seem to be the current issue though.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> - any suggestions are welcomed :) The points above should be discussed.<br>
><br>
> Related: <a href="https://www.spice-space.org/page/Features/RootlessWindows" rel="noreferrer" target="_blank">https://www.spice-space.org/page/Features/RootlessWindows</a><br>
<br>
To be honest, I would focus on getting the feature to work with a modern linux guest first (modifying it as necessary), rather than targeting an old windows.<br>
<br></blockquote><div>The demo is older and a bit misleading, here's a new one: <a href="https://youtu.be/JENQCkKq4sA">https://youtu.be/JENQCkKq4sA</a></div><div>On Win10 there seems to be the problem that messages with window positions are ahead of display data, but the identification of windows themselves works. I agree that it should support modern linux guest, however the ability to run windows apps seamlessly in linux environment is quite desired, isn't it? </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
><br>
> ----<br>
> DRAG & DROP for Win:<br>
> Quick search has revealed three potential solutions so far<br>
> (I haven't tested any of them):<br>
><br>
> [1] Send WM_DROPFILES<br>
> - seems simple and straightforward, but outdated and not very well supported,<br>
> probably not the way to go<br>
><br>
> [2] Register IDropSource and simulate mouse movement<br>
> + no hassle with finding the correct window user wanted to drop files into<br>
> - might result in poor user experience because of the mouse simulation<br>
> - DoDragDrop() blocks calling thread until the drop is finished<br>
><br>
> [3] Find the window for drag&drop ourselves,<br>
> inject a DLL into the process that owns the given window,<br>
> get IDropTarget and call Drop()<br>
> + completely in background<br>
> - need to find the correct window<br>
<br>
I think there is no need for any of that if you use gtk. I haven't tried to work on this recently, but hopefully you can get some ideas from my wip branches above.<br>
<br>
Good work so far though!<br>
<br>
cheers<br>
</blockquote></div></div>