On Thu, Nov 24, 2016 at 8:45 AM, Marek Marczykowski-Górecki <[email protected]> wrote: > Alternative, less risky, but also less elegant solutions I see: > > 1. Intercept all the keys, filter them in one place and release (if > desired) for original application after processing special action. This > way order of events will be preserved. But this will also introduce > single point of failure, or at least bottleneck for input events.
It is unclear to me how errors should be handled here. Are we to wait for the copy/paste operation to succeed before injecting the next keystroke? It appears to me that we would have to in order to solve race you described. This would have tremendous potential for DoS. > Technically, I believe it can be done at X11 API level (maybe using > XGrabKeyboard?), but will not be easy. IIUC XGrabKeyboard is exclusive, and screen-lockers also try to use it. This means such a solution would prevent screen-locking from working properly. Avoid, avoid! > 2. Asynchronously handle Ctrl+Shift+C from dom0, _without_ intercepting > it. So gui-daemon (or any other application) will receive it as before. > But then handling application will need to check if any gui-daemon have > handled it (check current focus and check xevent counter stored besides > clipboard file). This is also not ideal, because still is racy > (Ctrl+Shift+C in dom0 and Ctrl+Shift+V in VM can be reordered), but I > think the risk of such race is somehow smaller - user needs to change > focus in between, so there is more time in between. The other downside > of this approach is that non-gui-daemon application will also receive > Ctrl+Shift+C, so in practice it will trigger two actions at the same > time: one from original application, and clipboard-copy-from-dom0. In > undefined order. Yes, I was thinking of something like this too. It seems like a better solution lies somewhere this direction, however I can not think of a race-free (and non-ugly!) way to implement it. > I don't like neither of those... Yeah... I'm satisfied triggering this via a menu item of the qubes tray icon :) -- You received this message because you are subscribed to the Google Groups "qubes-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-devel/CABQWM_DWSTL-x%3D8XPGazCh7Bzx6ooF4U2zxG2ZTKZNZ2fGfDnA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
