-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drag and drop can drop data on wrong in-VM window #8429
Comments
I though it is a Xen limitation, because I do not know what should be done from |
The root cause of this bug is that drag and drop is handled by the X server within the guest instead of involving the host. The Qubes team does not have the resources to patch the X server to fix this bug. Switching to Wayland will allow this to be solved by having the in-guest Wayland compositor forward all drag and drop requests to the host. This allows the “where should this data be dropped?” decision to be offloaded to the host’s Wayland compositor. The host’s compositor knows where all of the windows are and which windows are visible at any given time, so it can make the correct decision. Security will not be harmed because the host-side drag and drop will be of an object with a magic MIME type only the GUI daemon understands and with contents that are not guest-controlled. A GUI daemon will ignore data dropped by a different GUI daemon or by something that is not a GUI daemon. |
@DemiMarie your answer is widely inaccurate. |
What feature are you referring to, exactly, @marmarek? I think there might be a misunderstanding, because as I understand this issue, @DemiMarie is not saying (at least not in the original description) that she wants something to happen when dragging-and-dropping from one qube to another. Rather, she is saying (at least in the original description) that (currently) nothing should happen when dragging-and-dropping from one qube to another (since no such cross-qube drag-and-drop feature has been implemented). The bug is that something does happen, namely that the dragged thing lands in a same-VM window that happens to be underneath the cross-VM window onto which the user dragged.
You're referring to #6842 here, right? I don't think this issue (at least in the original description) really has anything to do with that (besides mentioning the concept). This issue is more like: "Since #6842 has not been implemented, cross-VM drag-and-drop shouldn't do anything, but instead it does this unexpected same-VM thing." It's neutral about whether #6842 should be implemented or not. But I admit that @DemiMarie's subsequent comment does seem to advocate more strongly for a specific solution that involves implementing #6842. In this respect, the original issue description and subsequent comment seem to differ. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This already has its own issue (#6842) and, as you acknowledged, is off-topic here. Please help us keep the issue tracker organized by avoiding off-topic remarks in issues. |
Exactly!
Yup!
That is not how I indended #8429 (comment). The GUI qube’s Wayland compositor needs to be involved in all drag and drop operations (even same-VM ones!) because it is the only part of the system that knows what window the user actually dropped the data onto. This does not mean that drag and drop between VMs, or from a VM to the host, will succeed. It will fail because the non-standard MIME type offered by the GUI daemon is not recognized by the destination program. Even if it was accepted, zero bytes would be transferred. |
I think this is an
R: upstream issue
Once Qubes OS switches to Wayland, native Wayland clients will not be impacted, but Xwayland clients will continue to be impacted. @adw feel free to close this. |
This comment was marked as outdated.
This comment was marked as outdated.
Well, how can we call it a Xorg issue, if in all existing GNU/Linux distributions with Xorg there is no such bug. So, it is almost exclusively a Qubes OS problem, maybe inherited from Xen. |
It is not a Qubes OS problem. It also apples to Xwayland, which is the only X server still under active development. The fundamental problems are:
There are several ways to solve this problem:
Options 1 and 2 both require X server changes. However, Xorg is in maintenance mode right now, so the Qubes OS team would need to do this work. Such work would compete with other tasks that need to be done, such as Wayland support (option 3). Additionally, option 1 also creates an information leak, because “is this window visible?” is not information that a VM needs to have. Option 3, however, needs to be done anyway, for at least two reasons:
Overall, the reason for closing this issue is not that it cannot be fixed, but rather that fixing it would require a substantial investment into a program (Xorg) and a protocol (X11) that is ultimately a technological dead end. The time I spend on fixing this problem could also be spent on providing Wayland support to all users, which will in turn allow for GPU-accelerated rendering in guests. In turn, GPU acceleration is a massive performance improvement. For more than a few people, it is the feature that will make using Qubes OS possible. |
I understand you, just that I propose to look at this issue from the user's point of view. The situation is this:
You talk about technical details, that it currently cannot be fixed in easy or proper way. But from user perspective it is a QubesOS-specific bug, details does not matter for them.
That I also understand and agree on. I personally think that it is not so important to fix this bug quickly, because it exists in Qubes OS for a looong time, at least starting from like R2beta when I used Qubes OS for the first time. All users face this issue, but after several wrong doings, they get a habit to avoid it. I just do not agree that it is possible to close such tickets as @andrewdavidwong @DemiMarie |
The same problem can be reproduced with Xwayland and Weston, so I filed https://gitlab.freedesktop.org/xorg/xserver/-/issues/1650 and then https://gitlab.freedesktop.org/wayland/weston/-/issues/889. |
I also don't agree with "upstream issue" classification. The real issue is that window order (and visibility) in VM may be different than what user sees. It's basically a limitation of how qubes-gui agent works, not a fundamental X11 issue like @DemiMarie tries to describe it. After all, it works just fine on non-qubes X11 systems. Anyway, I wouldn't expect it to be fixed anytime soon... |
It’s not just a Qubes bug — Weston + Xwayland is also affected. That said, I think this is fixable (at least in theory), so removing
R: upstream issue
I have an idea for how to fix the problem:
For this to work, the GUI agent needs to know which (if any) window the mouse is over at any given time. This information is available via The trade-off of this approach is that windows that the mouse is not over will appear to be obscured. I’m not sure if that is a problem or not. |
I am not sure that such hack should be implemented. It can cause problems with software that relies on mouse moving over events and etc. The current situation is not that bad, just not obvious to new users. |
@marmarek: do you think this should be
R: declined
The current situation is:
|
How to file a helpful issue
Qubes OS release
Any, probably since before 1.0.
Brief summary
It is possible for drag and drop to drop data on a window that is currently covered by a different window.
Steps to reproduce
gnome-text-editor
windows.Expected behavior
Nothing happens, since cross-qube drag and drop is not supported.
Actual behavior
The text gets dropped into a hidden window.
The text was updated successfully, but these errors were encountered: