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

disp: implement dynamic resolution for X11 #4313

Merged
merged 1 commit into from Dec 19, 2017

Conversation

Projects
None yet
4 participants
@hardening
Contributor

hardening commented Dec 14, 2017

If the display channel is available we use it to allow the user to resize the xfreerdp window. When the window is resized we announce a new monitor layout and the server reacts by doing a reactivation sequence to the new size.
The minimum window size is limited to 300x300 as 2012 servers crash horribly if we send them a smaller layout.

disp: implement dynamic resolution for X11
If the display channel is available we use it to allow the user to resize the
xfreerdp window. When the window is resized we announce a new monitor layout and
the server reacts by doing a reactivation sequence to the new size.
The minimum window size is limited to 300x300 as 2012 servers crash horribly
if we send them a smaller layout.
@freerdp-bot

This comment has been minimized.

freerdp-bot commented Dec 14, 2017

Build finished.

@freerdp-bot

This comment has been minimized.

freerdp-bot commented Dec 14, 2017

Refer to this link for build results (access rights to CI server needed):
https://ci.freerdp.com//job/PullRequestTester/2479/

@akallabeth

LGTM

@akallabeth

This comment has been minimized.

Member

akallabeth commented Dec 14, 2017

@hardening Did some tests, works (mostly) as expected.
Only thing that I've noticed is that the requests are sent too fast, so when resizing the window the resolution set may be different from the window size set locally.
Could probably be solved by ignoring all resize events until some grace timeout is expired.

@hardening

This comment has been minimized.

Contributor

hardening commented Dec 14, 2017

@akallabeth yes right I'm having the same. My problem is that I'm tracking window resizes done with the mouse by looking at configure events, but you also get configure event when the window is resized by a XWindowResize. And that's exactly what happens when the reactivation sequence takes place:

  • you start dragging the window corner with the mouse, we get a configure event with the new window size;
  • we send a new layout via the display channel;
  • during that time you're probably continuing to move the mouse;
  • the server does a reactivation sequence to the new size, so we XWindowResize the main window, and we get a configure event to a size that does not correspond to the mouse position;

I'll look at delaying the sending of the layout, but that makes the channel much more complicated.

@akallabeth

This comment has been minimized.

Member

akallabeth commented Dec 14, 2017

@hardening I think a simple timer should suffice. Start a timer with the current resolution, if a new one arrives restart the timer with the new resolution. So, if you're still moving/resizing the window, all events are ignored, but if you stop for e.g. half a second, a new resolution is requested from the server

@akallabeth akallabeth added this to the 2.0-rc2 milestone Dec 16, 2017

@mfleisz

LGTM

@akallabeth

This comment has been minimized.

Member

akallabeth commented Dec 19, 2017

Merging as the resize issue is an annoyance but the feature itself is working stable.
The issues can be worked out in follow up pulls.

@akallabeth akallabeth merged commit 71fd6f3 into FreeRDP:master Dec 19, 2017

1 check passed

jenkins: PullRequestTester Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment