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

Sometimes cannot resize client on Mac [deprecated client] #9882

Open
rcarmo opened this issue Feb 20, 2024 · 12 comments
Open

Sometimes cannot resize client on Mac [deprecated client] #9882

rcarmo opened this issue Feb 20, 2024 · 12 comments

Comments

@rcarmo
Copy link
Contributor

rcarmo commented Feb 20, 2024

Describe the bug

Building from git tip, the SDL client does not let me resize the window, and switching to full screen does not seem to update the display size either.

To Reproduce

Running with these options:

./install/MacFreeRDP.app/Contents/MacOS/MacFreeRDP /gfx:rfx,progressive +rfx /rfx-mode:video /sound /w:1920 /h:1080 +dynamic-resolution /v:fedora.local /u:me

Removing w or h does not help, +workarea doesn't seem to work either. There is no cursor feedback regarding the local window being resizable, either, which to me feels like a window creation bug (why isn't the CoreGraphics code handling window resizes)?

Expected behavior

The cursor should change when hovering over a window edge and I should be able to resize the SDL client and have the remote display area increase accordingly.

  • OS version connecting to (server side): Fedora using stock xrdp. Other clients work OK.
@akallabeth
Copy link
Member

akallabeth commented Feb 20, 2024

can not reproduce.
a build from current f3c0d22 runs just fine with mouse cursor switching to resize mode on window border like other mac apps.

[edit] did just run ./scripts/bundle-mac-os.sh with ninja, meson and autotools from ports installed

@rcarmo
Copy link
Contributor Author

rcarmo commented Feb 20, 2024

I did a git pull 6 hours ago and did not see that (same build process, but my tools come from brew). Did you use the same command line?

@akallabeth
Copy link
Member

akallabeth commented Feb 20, 2024

yes, same command line.
the border is a bit thin though, maybe just missed it?

[edit] fullscreen switch seems to sometimes screw up session resizing though

@rcarmo
Copy link
Contributor Author

rcarmo commented Feb 20, 2024

I am trying to rebuild from a clean tree on a new machine. Mind sharing your cmake settings?

Mine are:

git clean -xdf
cmake -S . -B build -DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET=14 -DWITH_CLIENT_MAC=on -DWITH_X11=off -DBUILD_SHARED_LIBS=on -DCMAKE_BUILD_TYPE=Release -DWITH_WEBVIEW=on -DWITH_MANPAGES=off -DBUILD_SHARED_LIBS=on
# if this isn't run under bash it will fail
bash ./scripts/bundle-mac-os.sh

@rcarmo
Copy link
Contributor Author

rcarmo commented Feb 20, 2024

I just rebuilt the whole thing from scratch on my laptop (as in: from a completely new git clone) and the window is not resizable, as you can see in this screen recording:

Untitled.mp4

The command line I used is:

./install/MacFreeRDP.app/Contents/MacOS/MacFreeRDP /gfx:rfx,progressive +rfx  /sound  +dynamic-resolution /v:xfce.local /u:me

Can we reopen the issue, please?

@akallabeth
Copy link
Member

@rcarmo well, you intentionally break the build ;)
you run the script on a clean checkout OR you run cmake yourself ;)

@rcarmo
Copy link
Contributor Author

rcarmo commented Feb 21, 2024 via email

@akallabeth
Copy link
Member

  1. brew or ports does not really matter, it is just used to compile the stuff
  2. yes, an M1 with Sonoma 14.3.1

so, just to be sure I did run it again and today there seems to be something different? same binary, same command line but the window resize arrows no longer appeared. (not even an update/restart of the machine, just arrow up in the still open bash to run the same connection again)

so I think this might be some race on startup (by default the window is not resizable, but if /dynamic-resolution is added this property is updated)

@akallabeth akallabeth reopened this Feb 21, 2024
@akallabeth akallabeth changed the title Cannot resize SDL client on Mac Cannot resize client on Mac [deprecated client] Feb 21, 2024
@akallabeth
Copy link
Member

@rcarmo FYI: you did run the deprecated mac client, not the SDL client. (the warning messages in the CLI are quire obvious ;))

@akallabeth akallabeth changed the title Cannot resize client on Mac [deprecated client] Sometimes cannot resize client on Mac [deprecated client] Feb 21, 2024
@rcarmo
Copy link
Contributor Author

rcarmo commented Feb 21, 2024

Well, the docs aren't clear on how to run the SDL one, and the "deprecated" one is still building and generating a working .app, so... I thought that was the SDL one.

How do I get only the SDL binary to build with the standard Mac script, so that we can all agree on how to reproduce this?

@akallabeth
Copy link
Member

you seem to misunderstand the purpose of the script.
It is building a MacOS bundle so that all dependencies and library RPATH are set so you can run it on any mac.
but it contains all binaries that can be used:

ls -l install/MacFreeRDP.app/Contents/MacOS
total 5256
-rwxr-xr-x  1 dev  staff   172264 Feb 21 09:12 MacFreeRDP
-rwxr-xr-x  1 dev  staff   185896 Feb 21 09:12 faac
-rwxr-xr-x  1 dev  staff   168392 Feb 21 09:12 faad
-rwxr-xr-x  1 dev  staff   100320 Feb 21 09:12 freerdp-proxy
-rwxr-xr-x  1 dev  staff   133312 Feb 21 09:12 freerdp-shadow-cli
-rwxr-xr-x  1 dev  staff  1459800 Feb 21 09:12 sdl-freerdp
-rwxr-xr-x  1 dev  staff   102808 Feb 21 09:12 sfreerdp
-rwxr-xr-x  1 dev  staff   142368 Feb 21 09:12 sfreerdp-server
-rwxr-xr-x  1 dev  staff   100024 Feb 21 09:12 winpr-hash
-rwxr-xr-x  1 dev  staff    99152 Feb 21 09:12 winpr-makecert

@rcarmo
Copy link
Contributor Author

rcarmo commented Feb 21, 2024

Well, that certainly isn't documented well enough (I saw the Libraries folder, and the bundle defaults to the client, so...). Thanks, I will give it a whirl.

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

2 participants