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

In seamless mode, moving a window shrinks it 14x7 #4934

Closed
chrislong opened this issue Oct 16, 2018 · 14 comments
Closed

In seamless mode, moving a window shrinks it 14x7 #4934

chrislong opened this issue Oct 16, 2018 · 14 comments

Comments

@chrislong
Copy link

When running in seamless mode, moving any window causes that window to shrink by 14 pixels horizontally and 7 pixels vertically. Each move causes this, until the window starts moving across the screen by itself (to the right) when it has focus.

To Reproduce

  1. Start xfreerdp in seamless mode
  2. Drag an application by its title bar, watching its size (preferably your window manager reports this to you)
  3. You should notice the window has gotten smaller. If you measure (e.g., by grabbin the application again if your WM shows you sizes when you do) you will find it's smaller now by 14x7 pixels.
  4. If you drag it again, it will shrink the same amount again. Repeat as desired.

Expected behavior
Moving the window does not automatically shrink it.

Screenshots
I can provide these if needed.

** Application details

  • Version of FreeRDP
    This is FreeRDP version 2.0.0-rc3 (2.0.0-rc3)

  • Command line used
    xfreerdp /v:foo.bar.com /u:auser /p:mypassword /cert-ignore /app:'%windir%\explorer.exe'

  • output of /buildconfig
    This is FreeRDP version 2.0.0-rc3 (2.0.0-rc3)
    Build configuration: BUILD_TESTING=OFF BUILTIN_CHANNELS=ON HAVE_AIO_H=1 HAVE_EXECINFO_H=1 HAVE_FCNTL_H=1 HAVE_INTTYPES_H=1 HAVE_JOURNALD_H=TRUE HAVE_MATH_C99_LONG_DOUBLE=1 HAVE_POLL_H=1 HAVE_PTHREAD_MUTEX_TIMEDLOCK=ON HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIB=1 HAVE_PTHREAD_MUTEX_TIMEDLOCK_SYMBOL= HAVE_SYSLOG_H=1 HAVE_SYS_EVENTFD_H=1 HAVE_SYS_FILIO_H= HAVE_SYS_MODEM_H= HAVE_SYS_SELECT_H=1 HAVE_SYS_SOCKIO_H= HAVE_SYS_STRTIO_H= HAVE_SYS_TIMERFD_H=1 HAVE_TM_GMTOFF=1 HAVE_UNISTD_H=1 HAVE_XI_TOUCH_CLASS=1 WITH_ALSA=ON WITH_CCACHE=ON WITH_CHANNELS=ON WITH_CLIENT=ON WITH_CLIENT_AVAILABLE=1 WITH_CLIENT_CHANNELS=ON WITH_CLIENT_CHANNELS_AVAILABLE=1 WITH_CLIENT_COMMON=ON WITH_CLIENT_INTERFACE=OFF WITH_CUPS=OFF WITH_DEBUG_ALL=OFF WITH_DEBUG_CAPABILITIES=OFF WITH_DEBUG_CERTIFICATE=OFF WITH_DEBUG_CHANNELS=OFF WITH_DEBUG_CLIPRDR=OFF WITH_DEBUG_DVC=OFF WITH_DEBUG_KBD=OFF WITH_DEBUG_LICENSE=OFF WITH_DEBUG_MUTEX=OFF WITH_DEBUG_NEGO=OFF WITH_DEBUG_NLA=OFF WITH_DEBUG_NTLM=OFF WITH_DEBUG_RAIL=OFF WITH_DEBUG_RDP=OFF WITH_DEBUG_RDPDR=OFF WITH_DEBUG_RDPEI=OFF WITH_DEBUG_REDIR=OFF WITH_DEBUG_RFX=OFF WITH_DEBUG_RINGBUFFER=OFF WITH_DEBUG_SCARD=OFF WITH_DEBUG_SND=OFF WITH_DEBUG_SVC=OFF WITH_DEBUG_SYMBOLS=OFF WITH_DEBUG_THREADS=OFF WITH_DEBUG_TIMEZONE=OFF WITH_DEBUG_TRANSPORT=OFF WITH_DEBUG_TSG=OFF WITH_DEBUG_TSMF=OFF WITH_DEBUG_WND=OFF WITH_DEBUG_X11=OFF WITH_DEBUG_X11_CLIPRDR=OFF WITH_DEBUG_X11_LOCAL_MOVESIZE=OFF WITH_DEBUG_XV=OFF WITH_DIRECTFB=OFF WITH_DSP_EXPERIMENTAL=OFF WITH_EVENTFD_READ_WRITE=1 WITH_FAAC=OFF WITH_FAAD2=OFF WITH_FFMPEG=OFF WITH_GFX_H264=OFF WITH_GPROF=OFF WITH_GSM=OFF WITH_GSSAPI=OFF WITH_GSTREAMER_0_10=OFF WITH_GSTREAMER_1_0=ON WITH_ICU=OFF WITH_IPP=OFF WITH_JPEG=OFF WITH_LAME=OFF WITH_LIBRARY_VERSIONING=ON WITH_LIBSYSTEMD=ON WITH_MACAUDIO=OFF WITH_MACAUDIO=OFF WITH_MACAUDIO_AVAILABLE=0 WITH_MANPAGES=ON WITH_MBEDTLS=OFF WITH_OPENH264=OFF WITH_OPENSLES=OFF WITH_OPENSSL=ON WITH_OSS=ON WITH_PCSC=OFF WITH_PROFILER=OFF WITH_PULSE=OFF WITH_SAMPLE=OFF WITH_SANITIZE_ADDRESS=OFF WITH_SANITIZE_ADDRESS_AVAILABLE=1 WITH_SANITIZE_MEMORY=OFF WITH_SANITIZE_MEMORY_AVAILABLE=1 WITH_SANITIZE_THREAD=OFF WITH_SANITIZE_THREAD_AVAILABLE=1 WITH_SERVER=OFF WITH_SERVER_INTERFACE=ON WITH_SMARTCARD_INSPECT=OFF WITH_SSE2=ON WITH_THIRD_PARTY=OFF WITH_VALGRIND_MEMCHECK=OFF WITH_VALGRIND_MEMCHECK_AVAILABLE=1 WITH_WAYLAND=OFF WITH_X11=ON WITH_X264=OFF WITH_XCURSOR=ON WITH_XEXT=ON WITH_XFIXES=ON WITH_XI=ON WITH_XINERAMA=ON WITH_XKBFILE=ON WITH_XRANDR=ON WITH_XRENDER=ON WITH_XSHM=ON WITH_XV=ON WITH_ZLIB=ON
    Build type: RelWithDebInfo
    CFLAGS: -fPIC -Wall -Wno-unused-result -Wno-unused-but-set-variable -Wno-deprecated-declarations -fvisibility=hidden -Wimplicit-function-declaration -Wredundant-decls -g
    Compiler: GNU, 7.3.0
    Target architecture: x64

  • OS version connecting to
    Windows 10 Enterprise

  • If available the log output from a run with /log-level:trace
    It's 27000 lines, so I didn't post it.

Desktop (please complete the following information):

  • OS: Linux
  • Browser: N/A
  • Version: Ubuntu 18.04 LTS
@akallabeth
Copy link
Member

@chrislong is this still the case with our nightly builds? There have been a few fixes targeted at rail support.

akallabeth added a commit to akallabeth/FreeRDP that referenced this issue Oct 18, 2018
When sending every size change below a certain threshold, the remote
app will enter an infinte loop reducing the window size to 1x1.
Ignore changes below 10px
@akallabeth akallabeth modified the milestones: 2.0.0, 2.0.0-rc4 Oct 18, 2018
@chrislong
Copy link
Author

Still exists in 2.0.0-rc4 and in the latest nightly (2.0.0-dev5 (531b1b6), aka 2.0.0+020181211024825.6061.gbp531b1b).

@akallabeth
Copy link
Member

@benjaminwingert sorry, what do I miss here, this is no freerdp log?

@benjaminwingert
Copy link

@benjaminwingert sorry, what do I miss here, this is no freerdp log?

you are right. Wrong topic.
Still I can confirm that the windows are shrinking.
FreeRDP version version 2.0.0-dev5 (f678a91) on Debian 9 (stretch) with Gnome and X11.
Feels like the window decoration gets subtracted from the window size on each move.

@chrislong
Copy link
Author

I did some experimentation with wmctrl and discovered that if the window does not have focus when it moves, the shrinking doesn't happen immediately when it's moved, but does when the window gains focus. (This test was with version 2.0.0-dev5 (5b24dc1).)

@chrislong
Copy link
Author

After adding a bunch more debugging logging to the X11 and RAIL code, and more experimentation, I cannot find anything that the xfreerdp code is doing wrong. If a window is moved using wmctrl, xfreerdp sends the correct new window dimensions to the server (although it waits until the window gets focus, which seems a bit odd, but should still work). The server then sends back new placement and size for the window, which are wrong (i.e., different from what the client just sent it). I don't know why.

The amount the server moves and resizes the window is affected by HKCU\Control Panel\Desktop\WindowMetrics, though, specifically BorderWidth and PaddedBorderWidth (in the registry on the server). If I change those, the amount the server moves and resizes windows changes. If there were a way to get those values from the server, maybe the offsets could be computed. But as far as I can tell, that information isn't part of RDP.

At this point, the only fix I see is after the client sends a window move and/or resize, to ignore window moves & resizes from the server for a short time (maybe 2 seconds). Or possibly to ignore window moves & resizes from the server if they're small, but that may mess up window dragging. I'd like to have a more principled fix, but without knowing why these offsets are happening or how to compute them, I'm not sure what that would be.

@akallabeth
Copy link
Member

@chrislong not sure, but I think there is some capability/setting which the client can send so the server does not do that. It is buried deep in the spec though.

@chrislong
Copy link
Author

@akallabeth Thanks, I'll look into it. That would be great. After my last comment, it occurred to me that allowing the server and client to be out of sync may cause other problems. However, I found that sending the same move command again seems to make it "stick" on the server. So I was investigating that. But I'll check the spec for how to disable this behavior.

@chrislong
Copy link
Author

@akallabeth I read the [MS-RDPERP] spec and didn't see any relevant capability or setting, but maybe I missed it. Any idea what it is?

chrislong added a commit to chrislong/FreeRDP that referenced this issue Jan 25, 2019
chrislong added a commit to chrislong/FreeRDP that referenced this issue Jan 25, 2019
chrislong added a commit to chrislong/FreeRDP that referenced this issue Jan 25, 2019
This is an attempt to fix issue FreeRDP#4934. The server wants to move and
shrink windows for no reason. This may break apps that actually do
want to automatically resize their windows. Maybe heuristics can be
added to allow that.
@akallabeth akallabeth modified the milestones: 2.0.0, next May 9, 2019
chrislong pushed a commit to chrislong/FreeRDP that referenced this issue May 21, 2019
# This is the 1st commit message:

Fix for issue FreeRDP#4934

Accounting for window resize margins seems to do the trick.

# This is the commit message #1:

attempt at fixing bug 4934, didn't work

FreeRDP#4934
chrislong added a commit to chrislong/FreeRDP that referenced this issue May 21, 2019
Accounting for window resize margins seems to do the trick.

attempt at fixing bug 4934, didn't work

FreeRDP#4934

do not move or resize local window when the server says to

This is an attempt to fix issue FreeRDP#4934. The server wants to move and
shrink windows for no reason. This may break apps that actually do
want to automatically resize their windows. Maybe heuristics can be
added to allow that.

fixed some lingering references to no-longer-existing field

removed obsolete time function

track window resize margins

window size now stable

Can move window with window manager, title bar, or external app (e.g.,
wmctrl) and the window size does not change.

adjusted window updates for window margins

cleaned up unused variables

syncing up with FreeRDP/master for a PR

reformatted with format_code.sh

fix for Android build problem

renamed margin fields to match FreeRDP master

Also cleaned up unnecessarily-exported debugging arrays.

FYI, the margin fields have been moved within the struct relative to
FreeRDP master to reflect their ordering in the RDP spec (MS-RDPERP,
2.2.1.3.1.2.1,
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdperp/2d36758d-3fb5-4823-8c4b-9b81a9c8ff3e)

changed to use %d-type macros for debug output
chrislong pushed a commit to chrislong/FreeRDP that referenced this issue May 21, 2019
Accounting for window resize margins seems to do the trick.
chrislong added a commit to chrislong/FreeRDP that referenced this issue May 21, 2019
Accounting for window resize margins seems to do the trick.

Squashed commit of the following:

commit 9f9c4db
Merge: cfec4aa 152b23d
Author: Chris Long <chris.long@nextcentury.com>
Date:   Tue May 21 10:30:52 2019 -0400

    Merge branch 'master' of github.com:chrislong/FreeRDP

commit cfec4aa
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri Jan 25 16:29:46 2019 -0500

    fixed misspelling in CMakeLists.txt

commit cc5881f
Merge: fd271bc b907324
Author: Chris Long <chris.long@nextcentury.com>
Date:   Tue May 21 10:07:20 2019 -0400

    Fix for issue FreeRDP#4934

    Accounting for window resize margins seems to do the trick.

    attempt at fixing bug 4934, didn't work

    FreeRDP#4934

    do not move or resize local window when the server says to

    This is an attempt to fix issue FreeRDP#4934. The server wants to move and
    shrink windows for no reason. This may break apps that actually do
    want to automatically resize their windows. Maybe heuristics can be
    added to allow that.

    fixed some lingering references to no-longer-existing field

    removed obsolete time function

    track window resize margins

    window size now stable

    Can move window with window manager, title bar, or external app (e.g.,
    wmctrl) and the window size does not change.

    adjusted window updates for window margins

    cleaned up unused variables

    syncing up with FreeRDP/master for a PR

    reformatted with format_code.sh

    fix for Android build problem

    renamed margin fields to match FreeRDP master

    Also cleaned up unnecessarily-exported debugging arrays.

    FYI, the margin fields have been moved within the struct relative to
    FreeRDP master to reflect their ordering in the RDP spec (MS-RDPERP,
    2.2.1.3.1.2.1,
    https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdperp/2d36758d-3fb5-4823-8c4b-9b81a9c8ff3e)

    changed to use %d-type macros for debug output

commit fd271bc
Author: Mati Shabtay <35010736+m4ntis@users.noreply.github.com>
Date:   Fri May 17 15:32:54 2019 +0300

    # This is a combination of 2 commits.
    # This is the 1st commit message:

    Fix for issue FreeRDP#4934

    Accounting for window resize margins seems to do the trick.

    # This is the commit message #1:

    attempt at fixing bug 4934, didn't work

    FreeRDP#4934

commit 152b23d
Author: Chris Long <chris.long@nextcentury.com>
Date:   Thu May 9 15:59:43 2019 -0400

    fix for Android build problem

commit d2e20f1
Author: Chris Long <chris.long@nextcentury.com>
Date:   Thu May 9 14:14:54 2019 -0400

    reformatted with format_code.sh

commit 670a7c5
Author: Chris Long <chris.long@nextcentury.com>
Date:   Thu May 9 14:00:27 2019 -0400

    syncing up with FreeRDP/master for a PR

commit e76e29b
Merge: e73aa46 8dcac1a
Author: Chris Long <chris.long@nextcentury.com>
Date:   Thu May 9 13:48:53 2019 -0400

    Merge branch 'master' of github.com:FreeRDP/FreeRDP

commit e73aa46
Author: Chris Long <chris.long@nextcentury.com>
Date:   Sat May 4 12:35:27 2019 -0400

    cleaned up unused variables

commit 70d22ac
Author: Chris Long <chris.long@nextcentury.com>
Date:   Sat May 4 12:18:37 2019 -0400

    adjusted window updates for window margins

commit c95aacb
Merge: 0388839 92cdaad
Author: Chris Long <chris.long@nextcentury.com>
Date:   Sat May 4 10:17:43 2019 -0400

    Merge pull request #1 from chrislong/resize-margin

    Resize margin

commit 92cdaad
Author: Chris Long <chris.long@nextcentury.com>
Date:   Sat May 4 10:07:41 2019 -0400

    window size now stable

    Can move window with window manager, title bar, or external app (e.g.,
    wmctrl) and the window size does not change.

commit fceb743
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri May 3 16:46:01 2019 -0400

    track window resize margins

commit 0388839
Merge: 39a79e8 f867c90
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri May 3 13:21:34 2019 -0400

    Merge remote-tracking branch 'freerdp/master'

commit 39a79e8
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri May 3 13:09:18 2019 -0400

    updated version 2.0.0-cl -> 2.0.1-cl

commit ff336f4
Merge: 4c1166e 52bce47
Author: Chris Long <chris.long@nextcentury.com>
Date:   Wed Apr 3 15:57:22 2019 -0400

    Merge branch 'master' of github.com:FreeRDP/FreeRDP

commit 4c1166e
Author: Chris Long <chris.long@nextcentury.com>
Date:   Sat Jan 26 13:57:44 2019 -0500

    updated version 2.0.0-dev5 -> 2.0.0-cl

commit 0909afb
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri Jan 25 16:29:46 2019 -0500

    fixed misspelling

commit 71ec42f
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri Jan 25 16:14:57 2019 -0500

    removed obsolete time function

commit 5c997d0
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri Jan 25 16:14:28 2019 -0500

    fixed some lingering references to no-longer-existing field

commit fabf617
Merge: 1375068 05d9d89
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri Jan 25 16:06:39 2019 -0500

    Merge remote-tracking branch 'freerdp/master'

commit 1375068
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri Jan 25 16:00:33 2019 -0500

    do not move or resize local window when the server says to

    This is an attempt to fix issue FreeRDP#4934. The server wants to move and
    shrink windows for no reason. This may break apps that actually do
    want to automatically resize their windows. Maybe heuristics can be
    added to allow that.

commit 2891c66
Author: Chris Long <chris.long@nextcentury.com>
Date:   Wed Jan 23 14:06:10 2019 -0500

    attempt at fixing bug 4934, didn't work

    FreeRDP#4934

commit 3f020e3
Author: Chris Long <chris.long@nextcentury.com>
Date:   Wed Jan 23 14:04:50 2019 -0500

    added X11 debugging to try to troubleshoot move problem

    Try to troubleshoot this problem: FreeRDP#4934
@chrislong chrislong mentioned this issue May 21, 2019
chrislong added a commit to chrislong/FreeRDP that referenced this issue May 28, 2019
Accounting for window resize margins seems to do the trick.

Squashed commit of the following:

commit 9f9c4db
Merge: cfec4aa 152b23d
Author: Chris Long <chris.long@nextcentury.com>
Date:   Tue May 21 10:30:52 2019 -0400

    Merge branch 'master' of github.com:chrislong/FreeRDP

commit cfec4aa
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri Jan 25 16:29:46 2019 -0500

    fixed misspelling in CMakeLists.txt

commit cc5881f
Merge: fd271bc b907324
Author: Chris Long <chris.long@nextcentury.com>
Date:   Tue May 21 10:07:20 2019 -0400

    Fix for issue FreeRDP#4934

    Accounting for window resize margins seems to do the trick.

    attempt at fixing bug 4934, didn't work

    FreeRDP#4934

    do not move or resize local window when the server says to

    This is an attempt to fix issue FreeRDP#4934. The server wants to move and
    shrink windows for no reason. This may break apps that actually do
    want to automatically resize their windows. Maybe heuristics can be
    added to allow that.

    fixed some lingering references to no-longer-existing field

    removed obsolete time function

    track window resize margins

    window size now stable

    Can move window with window manager, title bar, or external app (e.g.,
    wmctrl) and the window size does not change.

    adjusted window updates for window margins

    cleaned up unused variables

    syncing up with FreeRDP/master for a PR

    reformatted with format_code.sh

    fix for Android build problem

    renamed margin fields to match FreeRDP master

    Also cleaned up unnecessarily-exported debugging arrays.

    FYI, the margin fields have been moved within the struct relative to
    FreeRDP master to reflect their ordering in the RDP spec (MS-RDPERP,
    2.2.1.3.1.2.1,
    https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdperp/2d36758d-3fb5-4823-8c4b-9b81a9c8ff3e)

    changed to use %d-type macros for debug output

commit fd271bc
Author: Mati Shabtay <35010736+m4ntis@users.noreply.github.com>
Date:   Fri May 17 15:32:54 2019 +0300

    # This is a combination of 2 commits.
    # This is the 1st commit message:

    Fix for issue FreeRDP#4934

    Accounting for window resize margins seems to do the trick.

    # This is the commit message #1:

    attempt at fixing bug 4934, didn't work

    FreeRDP#4934

commit 152b23d
Author: Chris Long <chris.long@nextcentury.com>
Date:   Thu May 9 15:59:43 2019 -0400

    fix for Android build problem

commit d2e20f1
Author: Chris Long <chris.long@nextcentury.com>
Date:   Thu May 9 14:14:54 2019 -0400

    reformatted with format_code.sh

commit 670a7c5
Author: Chris Long <chris.long@nextcentury.com>
Date:   Thu May 9 14:00:27 2019 -0400

    syncing up with FreeRDP/master for a PR

commit e76e29b
Merge: e73aa46 8dcac1a
Author: Chris Long <chris.long@nextcentury.com>
Date:   Thu May 9 13:48:53 2019 -0400

    Merge branch 'master' of github.com:FreeRDP/FreeRDP

commit e73aa46
Author: Chris Long <chris.long@nextcentury.com>
Date:   Sat May 4 12:35:27 2019 -0400

    cleaned up unused variables

commit 70d22ac
Author: Chris Long <chris.long@nextcentury.com>
Date:   Sat May 4 12:18:37 2019 -0400

    adjusted window updates for window margins

commit c95aacb
Merge: 0388839 92cdaad
Author: Chris Long <chris.long@nextcentury.com>
Date:   Sat May 4 10:17:43 2019 -0400

    Merge pull request #1 from chrislong/resize-margin

    Resize margin

commit 92cdaad
Author: Chris Long <chris.long@nextcentury.com>
Date:   Sat May 4 10:07:41 2019 -0400

    window size now stable

    Can move window with window manager, title bar, or external app (e.g.,
    wmctrl) and the window size does not change.

commit fceb743
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri May 3 16:46:01 2019 -0400

    track window resize margins

commit 0388839
Merge: 39a79e8 f867c90
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri May 3 13:21:34 2019 -0400

    Merge remote-tracking branch 'freerdp/master'

commit 39a79e8
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri May 3 13:09:18 2019 -0400

    updated version 2.0.0-cl -> 2.0.1-cl

commit ff336f4
Merge: 4c1166e 52bce47
Author: Chris Long <chris.long@nextcentury.com>
Date:   Wed Apr 3 15:57:22 2019 -0400

    Merge branch 'master' of github.com:FreeRDP/FreeRDP

commit 4c1166e
Author: Chris Long <chris.long@nextcentury.com>
Date:   Sat Jan 26 13:57:44 2019 -0500

    updated version 2.0.0-dev5 -> 2.0.0-cl

commit 0909afb
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri Jan 25 16:29:46 2019 -0500

    fixed misspelling

commit 71ec42f
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri Jan 25 16:14:57 2019 -0500

    removed obsolete time function

commit 5c997d0
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri Jan 25 16:14:28 2019 -0500

    fixed some lingering references to no-longer-existing field

commit fabf617
Merge: 1375068 05d9d89
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri Jan 25 16:06:39 2019 -0500

    Merge remote-tracking branch 'freerdp/master'

commit 1375068
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri Jan 25 16:00:33 2019 -0500

    do not move or resize local window when the server says to

    This is an attempt to fix issue FreeRDP#4934. The server wants to move and
    shrink windows for no reason. This may break apps that actually do
    want to automatically resize their windows. Maybe heuristics can be
    added to allow that.

commit 2891c66
Author: Chris Long <chris.long@nextcentury.com>
Date:   Wed Jan 23 14:06:10 2019 -0500

    attempt at fixing bug 4934, didn't work

    FreeRDP#4934

commit 3f020e3
Author: Chris Long <chris.long@nextcentury.com>
Date:   Wed Jan 23 14:04:50 2019 -0500

    added X11 debugging to try to troubleshoot move problem

    Try to troubleshoot this problem: FreeRDP#4934

reverted variable order

fixed for C99 compliance
chrislong added a commit to chrislong/FreeRDP that referenced this issue May 31, 2019
Accounting for window resize margins seems to do the trick.

Squashed commit of the following:

commit 9f9c4db
Merge: cfec4aa 152b23d
Author: Chris Long <chris.long@nextcentury.com>
Date:   Tue May 21 10:30:52 2019 -0400

    Merge branch 'master' of github.com:chrislong/FreeRDP

commit cfec4aa
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri Jan 25 16:29:46 2019 -0500

    fixed misspelling in CMakeLists.txt

commit cc5881f
Merge: fd271bc b907324
Author: Chris Long <chris.long@nextcentury.com>
Date:   Tue May 21 10:07:20 2019 -0400

    Fix for issue FreeRDP#4934

    Accounting for window resize margins seems to do the trick.

    attempt at fixing bug 4934, didn't work

    FreeRDP#4934

    do not move or resize local window when the server says to

    This is an attempt to fix issue FreeRDP#4934. The server wants to move and
    shrink windows for no reason. This may break apps that actually do
    want to automatically resize their windows. Maybe heuristics can be
    added to allow that.

    fixed some lingering references to no-longer-existing field

    removed obsolete time function

    track window resize margins

    window size now stable

    Can move window with window manager, title bar, or external app (e.g.,
    wmctrl) and the window size does not change.

    adjusted window updates for window margins

    cleaned up unused variables

    syncing up with FreeRDP/master for a PR

    reformatted with format_code.sh

    fix for Android build problem

    renamed margin fields to match FreeRDP master

    Also cleaned up unnecessarily-exported debugging arrays.

    FYI, the margin fields have been moved within the struct relative to
    FreeRDP master to reflect their ordering in the RDP spec (MS-RDPERP,
    2.2.1.3.1.2.1,
    https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdperp/2d36758d-3fb5-4823-8c4b-9b81a9c8ff3e)

    changed to use %d-type macros for debug output

commit fd271bc
Author: Mati Shabtay <35010736+m4ntis@users.noreply.github.com>
Date:   Fri May 17 15:32:54 2019 +0300

    # This is a combination of 2 commits.
    # This is the 1st commit message:

    Fix for issue FreeRDP#4934

    Accounting for window resize margins seems to do the trick.

    # This is the commit message #1:

    attempt at fixing bug 4934, didn't work

    FreeRDP#4934

commit 152b23d
Author: Chris Long <chris.long@nextcentury.com>
Date:   Thu May 9 15:59:43 2019 -0400

    fix for Android build problem

commit d2e20f1
Author: Chris Long <chris.long@nextcentury.com>
Date:   Thu May 9 14:14:54 2019 -0400

    reformatted with format_code.sh

commit 670a7c5
Author: Chris Long <chris.long@nextcentury.com>
Date:   Thu May 9 14:00:27 2019 -0400

    syncing up with FreeRDP/master for a PR

commit e76e29b
Merge: e73aa46 8dcac1a
Author: Chris Long <chris.long@nextcentury.com>
Date:   Thu May 9 13:48:53 2019 -0400

    Merge branch 'master' of github.com:FreeRDP/FreeRDP

commit e73aa46
Author: Chris Long <chris.long@nextcentury.com>
Date:   Sat May 4 12:35:27 2019 -0400

    cleaned up unused variables

commit 70d22ac
Author: Chris Long <chris.long@nextcentury.com>
Date:   Sat May 4 12:18:37 2019 -0400

    adjusted window updates for window margins

commit c95aacb
Merge: 0388839 92cdaad
Author: Chris Long <chris.long@nextcentury.com>
Date:   Sat May 4 10:17:43 2019 -0400

    Merge pull request #1 from chrislong/resize-margin

    Resize margin

commit 92cdaad
Author: Chris Long <chris.long@nextcentury.com>
Date:   Sat May 4 10:07:41 2019 -0400

    window size now stable

    Can move window with window manager, title bar, or external app (e.g.,
    wmctrl) and the window size does not change.

commit fceb743
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri May 3 16:46:01 2019 -0400

    track window resize margins

commit 0388839
Merge: 39a79e8 f867c90
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri May 3 13:21:34 2019 -0400

    Merge remote-tracking branch 'freerdp/master'

commit 39a79e8
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri May 3 13:09:18 2019 -0400

    updated version 2.0.0-cl -> 2.0.1-cl

commit ff336f4
Merge: 4c1166e 52bce47
Author: Chris Long <chris.long@nextcentury.com>
Date:   Wed Apr 3 15:57:22 2019 -0400

    Merge branch 'master' of github.com:FreeRDP/FreeRDP

commit 4c1166e
Author: Chris Long <chris.long@nextcentury.com>
Date:   Sat Jan 26 13:57:44 2019 -0500

    updated version 2.0.0-dev5 -> 2.0.0-cl

commit 0909afb
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri Jan 25 16:29:46 2019 -0500

    fixed misspelling

commit 71ec42f
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri Jan 25 16:14:57 2019 -0500

    removed obsolete time function

commit 5c997d0
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri Jan 25 16:14:28 2019 -0500

    fixed some lingering references to no-longer-existing field

commit fabf617
Merge: 1375068 05d9d89
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri Jan 25 16:06:39 2019 -0500

    Merge remote-tracking branch 'freerdp/master'

commit 1375068
Author: Chris Long <chris.long@nextcentury.com>
Date:   Fri Jan 25 16:00:33 2019 -0500

    do not move or resize local window when the server says to

    This is an attempt to fix issue FreeRDP#4934. The server wants to move and
    shrink windows for no reason. This may break apps that actually do
    want to automatically resize their windows. Maybe heuristics can be
    added to allow that.

commit 2891c66
Author: Chris Long <chris.long@nextcentury.com>
Date:   Wed Jan 23 14:06:10 2019 -0500

    attempt at fixing bug 4934, didn't work

    FreeRDP#4934

commit 3f020e3
Author: Chris Long <chris.long@nextcentury.com>
Date:   Wed Jan 23 14:04:50 2019 -0500

    added X11 debugging to try to troubleshoot move problem

    Try to troubleshoot this problem: FreeRDP#4934

reverted variable order

fixed for C99 compliance

fixed bug in resize margin debug output

mouse tracking now working

dialog boxes still move & shrink

saving & reusing the margin fixes dialog boxes

cleanup
@r-barnett
Copy link
Contributor

@chrislong , what is the state of this? I suspect that the commit(s) above have at least some of the changes needed to fix issues I'm seeing with RAIL.

@vega-d
Copy link

vega-d commented Jan 22, 2022

Fedora Silverblue, FreeRDP version 2.4.1.
I'm using wayland and the issue is still there.

@akallabeth
Copy link
Member

this should be fixed (at least against more modern windows servers which support enhanced remote app)
rationale:
the whole issue occurred because the local rail window must be synchronized with the virtual desktop position on the server. Since the X11 API is different enough from the windows API some calls expected to be atomic are not.

with modern enhanced remote app the mode was remodeled so that now each rail window is also only a window on the server and the position no longer needs to be in sync with the server as the server does not care where the window is but only about its size, state and contents.

@alixdeveloper
Copy link

I have investigated this issue in the latest version of Windows Server 2022.
This problem still persists and the window continues to shrink when moving on the host machine.

@akallabeth
Copy link
Member

@alixdeveloper are you sure you´re running with enhanced rail mode? (highDef rail or however the term is in the config)
just as already explained above, with old rails mode this is more ore less impossible to fix.

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

No branches or pull requests

6 participants