Skip to content
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

xpra multi-screen shadow has pointer issues #2249

Closed
totaam opened this issue Apr 3, 2019 · 9 comments
Closed

xpra multi-screen shadow has pointer issues #2249

totaam opened this issue Apr 3, 2019 · 9 comments
Labels

Comments

@totaam
Copy link
Collaborator

totaam commented Apr 3, 2019

Issue migrated from trac ticket # 2249

component: client | priority: major | resolution: fixed

2019-04-03 10:58:39: stdedos created the issue


Shadow-server:
2019-04-03 11:40:49,790 xpra GTK2 shadow version 2.5-[r22096](../commit/7ef6c348c85fc4b162b480215df86cbfa2dba02e) 64-bit
2019-04-03 11:40:49,794  running with pid 18889 on Linux Ubuntu 16.04 xenial
==========
Client:
set "XPRA_EXECUTABLE=C:\Users\stavros.ntentos\Documents\xpra-clients\Xpra-Client-Python3-x86_64_2.5-[r22135](../commit/9632bbcf26034732fde214891f741018f63048a5)"
2019-04-03 11:40:51,056 Python/GTK3 Microsoft Windows 10 aero client version 2.5-[r22135](../commit/9632bbcf26034732fde214891f741018f63048a5) 64-bit
Xpra-Client-Python3-x86_64_2.5-[r22135](../commit/9632bbcf26034732fde214891f741018f63048a5)\xpra_cmd" shadow ssh://user@ip/0  --clipboard=no --opengl=no --desktop-scaling=0.75 --webcam=no --speaker=off --microphone=off

(splitting from #2131, since it feels that it's worth a bug of it's own)

There is a weird issue that happens only in multi-screen shadow.

tl;dr: all shadow client windows "translate mouse coordinates to 0,0 of the X11 screen, not the 0,0 of the X11 monitor". Please check attachments for the visual representation.

I believe to be a client issue, since the pre-#1801 way seems to work nicely.

-Also, I can only start XPRA_SHADOW_MULTI_WINDOW=0 xpra shadow directly on the server. If I do it inside an xpra start ssh://user@ip/200 --start=gnome-terminal it's not working. Is this a bug / do you want a new bug for that?*

@totaam
Copy link
Collaborator Author

totaam commented Apr 3, 2019

2019-04-03 10:59:39: stdedos uploaded file Xpra_cmd_2019-01-22_13-44-17_pointer-offset.png (25.1 KiB)

Xpra_cmd_2019-01-22_13-44-17_pointer-offset.png

@totaam
Copy link
Collaborator Author

totaam commented Apr 3, 2019

2019-04-03 10:59:48: stdedos uploaded file xpra-ticket-#2131-downgrade_pointer-issue.zip (279.5 KiB)

@totaam
Copy link
Collaborator Author

totaam commented Apr 3, 2019

2019-04-03 11:00:24: stdedos uploaded file xpra-multi_shadow-clickthrough-2019-04-03_11-44-18.gif (48.7 KiB)

xpra-multi_shadow-clickthrough-2019-04-03_11-44-18.gif

@totaam
Copy link
Collaborator Author

totaam commented Apr 3, 2019

2019-04-03 11:03:02: stdedos commented


#2131#comment:2

Downgrading to Xpra-x86_64_Setup_2.5-[r21443](../commit/addffce4905111be6103ff4403796af9ffc8396f), I see a couple of pointer issues.

  • Pointer has an offset on :0.0 (see image)*, and
  • I cannot "point" to :0.[1-9]. Everything gets "projected" in :0.0 (see video)

Attached server and client outputs.

@totaam
Copy link
Collaborator Author

totaam commented Apr 3, 2019

2019-04-03 12:22:20: stdedos uploaded file Xpra_cmd-shadow-fullscreen_2019-04-03_14-20-34.png (119.8 KiB)

Xpra_cmd-shadow-fullscreen_2019-04-03_14-20-34.png

@totaam
Copy link
Collaborator Author

totaam commented Apr 3, 2019

2019-04-03 12:32:35: stdedos commented


Some interesting discovery as well:

If I press Shift+F11 at :0.0 or :0.1, I get "the next screen" glued to the "fullscreened" one. (:0.2 has nothing to follow up, obviously).

It didn't look like it was "responsive" though. Probably there was no cursor transformation been applied.

Monitor-windows seem to otherwise appear normal:

1680x1050 * 0.75 leaves empty space to 1600x900 both horizontally and vertically.
It used to be black to some older version, but now it "appears" to be transparent.
I kept seeing the windows in the taskbar (in the horizontal empty space), and I could've had "Alt+Tab"ed to them.
The "glued screen" was on the vertical empty space.

@totaam
Copy link
Collaborator Author

totaam commented Apr 3, 2019

I can reproduce.

@totaam
Copy link
Collaborator Author

totaam commented Apr 3, 2019

This was caused by r20252 (#1941) + r21268.
Also related to r19615 (#1658).

We already adjusted pointer events in GTKShadowServerBase._adjust_pointer, leaving the relative coordinates untouched and then X11ServerCore._get_pointer_abs_coordinates will use the relative coordinates to re-calculate the absolute ones. This uses the window model's get_geometry which is currently fixed at location (0, 0) for all shadow windows.
So the re-adjusted coordinates almost always land on the first monitor (bar different resolutions per monitor).

So there were 2 ways of fixing this:

  • don't pass through the relative position when adjusting the pointer, so the absolute one we adjusted gets used
  • return the full geometry value with the offset for all shadow root window models, so that the absolute coordinate re-calculated will also be adjusted correctly

I've gone for the second option in r22291. (tiny code change - mostly docstrings explaining things)
I think it makes more sense to expose the full geometry value we have, rather than patching it on the fly.

@stdedos: there are beta 3.0 packages with this fix.

@totaam totaam closed this as completed Apr 3, 2019
@totaam
Copy link
Collaborator Author

totaam commented Apr 4, 2019

2019-04-04 11:30:54: stdedos commented


Verified as fixed:

"Xpra-Python3-x86_64_3.0-[r22261](../commit/4478f21bd29b4ab23421a746116956fede1c6e45)\xpra_cmd" shadow ssh://user@ip/0  --clipboard=no --opengl=no --desktop-scaling=0.75 --webcam=no --speaker=off --microphone=off

2019-04-04 13:27:03,065 Xpra GTK3 client version 3.0-[r22261](../commit/4478f21bd29b4ab23421a746116956fede1c6e45) 64-bit
2019-04-04 13:27:03,067  running on Microsoft Windows 10
2019-04-04 13:27:03,713 GStreamer version 1.14.4 for Python 3.7.2 64-bit
2019-04-04 13:27:03,960  keyboard settings: layout=us
2019-04-04 13:27:03,964  desktop size is 1600x900 with 1 screen:
2019-04-04 13:27:03,965   Default (423x238 mm - DPI: 96x96) workarea: 1600x860
2019-04-04 13:27:03,965     (Standard monitor types) Generic PnP Monitor (309x174 mm - DPI: 131x131)
2019-04-04 13:27:03,965  downscaled to 75%, virtual screen size: 2133x1200
2019-04-04 13:27:03,966   Default (423x238 mm - DPI: 128x128) workarea: 2133x1147
2019-04-04 13:27:03,966     (Standard monitor types) Generic PnP Monitor (309x174 mm - DPI: 175x175)
2019-04-04 13:27:12,303 enabled remote logging
2019-04-04 13:27:12,306 Xpra GTK2 shadow server version 3.0-[r22291](../commit/150491e6195621811272add24173e53e1fa9ee17) 64-bit
2019-04-04 13:27:12,306  running on Linux Ubuntu 16.04 xenial

(Xpra_cmd.exe:17612): Pango-WARNING **: 13:27:12.875: couldn't load font "Bitstream Vera Sans Not-Rotated 11.7294921875", falling back to "Sans Not-Rotated 11.7294921875", expect ugly output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant