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

mouse events in black border around desktop area #1658

Closed
totaam opened this issue Oct 12, 2017 · 17 comments
Closed

mouse events in black border around desktop area #1658

totaam opened this issue Oct 12, 2017 · 17 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Oct 12, 2017

Issue migrated from trac ticket # 1658

component: client | priority: minor | resolution: fixed

2017-10-12 20:38:34: mviereck created the issue


xpra v2.2-17160 on debian 9

If running xpra --start-desktop and maximizing the client window, there can be a black area around the shown desktop if the vfb X server does not provide a matching resolution.

Mouse events (moving and clicks) in the black area should not do anything, but they happen to the outer border of the desktop.

Example: mouse click in black area above clock in xfce4-panel shows calendar, but this should only happen if I click directly on the clock.
[[Image(black-border.jpg)]]

Mouse movements in black area above the panel causes highlighting of nearest panel objects.

Not really a problem so far, just different from what I would expect.

@totaam
Copy link
Collaborator Author

totaam commented Oct 13, 2017

2017-10-13 03:17:48: antoine changed status from new to assigned

@totaam
Copy link
Collaborator Author

totaam commented Oct 13, 2017

2017-10-13 03:17:48: antoine commented


Originally reported in #1656, see #1656#comment:24.

If we swallow pointer motion events, there are some potential problems with seamless mode when the window size does not match its contents exactly: the virtual pointer could linger on the edge of the server side window - which could trigger unwanted behaviour.

@totaam
Copy link
Collaborator Author

totaam commented Feb 3, 2018

2018-02-03 05:56:31: antoine uploaded file black-border.jpg (29.9 KiB)

example of black border around the window contents
black-border.jpg

@totaam
Copy link
Collaborator Author

totaam commented Feb 3, 2018

2018-02-03 06:00:10: antoine edited the issue description

@totaam
Copy link
Collaborator Author

totaam commented Feb 3, 2018

2018-02-03 06:00:10: antoine commented


there can be a black area around the shown desktop if the vfb X server does not provide a matching resolution.
This is less of a problem nowadays since you can:

  • use Xvfb and have perfect match for any resolutions
  • Xdummy now has a large set of pre-defined resolutions which should match all possible configurations with a maximum gap of 128 pixels

(converted link to an attachment so it doesn't bitrot)

@totaam
Copy link
Collaborator Author

totaam commented Feb 27, 2018

2018-02-27 12:36:58: mviereck commented


This happens rather with Xwayland than with Xvfb or Xdummy as it unfortunately does not support resolution changes with xrandr.

In seamless mode for single applications I do not expect an issue as they are always scaled up to the client screen resolution. In that case I am not able to move the mouse outside of the virtual desktop.

@totaam
Copy link
Collaborator Author

totaam commented Feb 27, 2018

2018-02-27 16:02:34: antoine commented


This happens rather with Xwayland than with Xvfb or Xdummy as it unfortunately does not support resolution changes with xrandr.
Then this is an unsupported configuration, we rely on randr to make things match. Use Xvfb instead.

@totaam
Copy link
Collaborator Author

totaam commented Feb 27, 2018

2018-02-27 16:24:08: mviereck commented


Use Xvfb instead.

For most things I use Xvfb or Xdummy. Xwayland has the advantage of supporting hardware acceleration, but the disadvantage of bad xrandr support.

Aside from this minor issue of mouse events at the edge in desktop mode, xpra works quite well with Xwayland. Also, xpra clients sets the window size right, the issue only appears if I maximize the window.

So far, it is fine for me, xpra handles Xwayland quite well.

@totaam
Copy link
Collaborator Author

totaam commented Jun 11, 2018

2018-06-11 18:57:26: antoine commented


Testing as per #1656#comment:12

  • I can only reproduce this bug by maximizing the window, so r19613 detects wayland / that randr doesn't work and the window is now made non-resizable, non-maximizable
  • the non-opengl backends have problems rendering correctly with the offsets, new ticket: non-opengl backend rendering issues #1874
  • r19615 fixes the pointer events issue: shadow and desktop servers discard events that land outside the vfb rather than clipping them (seamless servers are unchanged: the events may be outside the window but they will still land on the vfb so we still want them) - easier to test by patching check_randr_sizes to return True (just like non-opengl backend rendering issues #1874)

Still TODO:

  • check win32 and macos shadow servers with multi-window mode (multi window shadow for win32 and macos #1805) and check for regressions
  • maybe handle the transition from discarded to not-discarded and back by sending cursor updates so that the client doesn't show the cursor that would apply if the pointer was still in the active region of the window? (ie: the edge of the window may have a resize handle, which is no longer relevant when hovering over the padding area since both motion and button events will be ignored there)

@totaam
Copy link
Collaborator Author

totaam commented Jun 12, 2018

2018-06-12 14:17:33: antoine commented


The cursor handling is "fixed" in r19621, though it does break the neat dependency separation from #1838.

Only one item left: re-test all the desktop and shadow servers with multi-window mode by hand. (#1805) Maybe use fullscreen to trigger more easily?

@totaam
Copy link
Collaborator Author

totaam commented Aug 21, 2018

2018-08-21 19:46:46: antoine changed status from assigned to new

@totaam
Copy link
Collaborator Author

totaam commented Aug 21, 2018

2018-08-21 19:46:46: antoine changed owner from antoine to mviereck

@totaam
Copy link
Collaborator Author

totaam commented Aug 21, 2018

2018-08-21 19:46:46: antoine commented


Was worth re-testing (I temporarily disabled size-hints to get black borders without using fullscreen or maximize): r19615 was buggy for the multi-monitor multi-window case (#1805), fixed in r20162.

I have not re-tested on macos shadow servers since that involves lugging too many things around. Those are similar to mswindows shadow servers anyway.

@mviereck: please close if this works for you. beta builds with these changes can be found here: [https://xpra.org/beta]

@totaam
Copy link
Collaborator Author

totaam commented Sep 11, 2018

2018-09-11 17:04:31: antoine changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Sep 11, 2018

2018-09-11 17:04:31: antoine set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Sep 11, 2018

2018-09-11 17:04:31: antoine commented


Not heard back, closing.

@totaam totaam closed this as completed Sep 11, 2018
@totaam
Copy link
Collaborator Author

totaam commented Apr 3, 2019

2019-04-03 16:18:00: antoine commented


Related bug: #2249

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

No branches or pull requests

1 participant