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

--window-borderless not working on macOS, scrcpy version 1.17 #2252

Open
2 tasks done
frankleonrose opened this issue Apr 13, 2021 · 8 comments
Open
2 tasks done

--window-borderless not working on macOS, scrcpy version 1.17 #2252

frankleonrose opened this issue Apr 13, 2021 · 8 comments

Comments

@frankleonrose
Copy link
Contributor

  • I have read the FAQ.
  • I have searched in existing issues.

Environment

  • OS: macOS 10.15.7 (Catalina) and 10.14.6 (Mojave)
  • scrcpy version: 1.17_1
  • installation method: brew
  • device model: Galaxy Note 9, others
  • Android version: 10

Describe the bug
Passing --window-borderless to version 1.16 correctly showed a window with no title bar.
Since update to 1.17 the title bar appears despite --window-borderless.

As an experiment, I tried building with an additional line in screen_init_rendering:

    SDL_SetWindowBordered(screen->window, !window_borderless);

This change resulted in a restored control over the window border.

@rom1v
Copy link
Collaborator

rom1v commented Apr 13, 2021

Please post screenshots of both v1.16 and v1.17. I guess it's due to some SDL change.

@frankleonrose
Copy link
Contributor Author

This is v1.17_1 showing the command to launch adjacent to the problematic window on macOS Catalina.

image

I don't have 1.17 or 1.16_4 installed anymore and cannot easily roll back the version (looks like I'd have to create a tap to extract into...dunno). Basically, the screenshot would have no title bar showing.

@lilithkrakatoa
Copy link

Is reproducible

OS: macOS Big Sur 11.2.3
scrcpy version: 1.17
Installation method: brew
Device: Essential Products PH-1 (Android 10)

Xnip2021-04-20_03-34-10

@rom1v
Copy link
Collaborator

rom1v commented Apr 20, 2021

Thank you for your screenshots.

As an experiment, I tried building with an additional line in […]

Could you please try building v1.16 or even earlier versions and test?

You mentioned that it worked in v1.16 but not in v1.17, but I suspect that it may be related to some independent SDL upgrade. This would help to determine the cause.

Thank you.

@frankleonrose
Copy link
Contributor Author

frankleonrose commented Apr 22, 2021

I tried building v1.16 (d7779d0).

I had to add some missing declarations for

strdup(const char*);
extern char *strtok(char *str, const char *delim);
extern char *strtok_r(char *str, const char *delim, char **saveptr);
extern void memset_pattern4(void *b, const void *pattern4, size_t len);

It builds

% x/app/scrcpy --version
scrcpy 1.16

dependencies:
 - SDL 2.0.14
 - libavcodec 58.91.100
 - libavformat 58.45.100
 - libavutil 56.51.100

But running produces a malloc failure, with or without --window-borderless.

% x/app/scrcpy --window-borderless
2021-04-22 12:50:31.596 scrcpy[82192:39073792] INFO: scrcpy 1.16 <https://github.com/Genymobile/scrcpy>
2021-04-22 12:50:31.596 scrcpy[82192:39073792] ERROR: Could not get executable path, using scrcpy-server from current directory
scrcpy(82192,0x11122fdc0) malloc: *** error for object 0x10a439c2c: pointer being freed was not allocated
scrcpy(82192,0x11122fdc0) malloc: *** set a breakpoint in malloc_error_break to debug
scrcpy-server: 1 file pushed. 4.5 MB/s (33622 bytes in 0.007s)
zsh: abort      x/app/scrcpy --window-borderless

NOTE: Fixed in #2276

@frankleonrose
Copy link
Contributor Author

Ok, got the screenshot. And the error remains in 1.16.
image

As suspected, the issue is in SDL. Which makes sense, because nothing about how scrcpy requests a borderless window has changed between 1.16 and 1.17.

@rom1v
Copy link
Collaborator

rom1v commented Apr 22, 2021

👍 Could you report to SDL, please?

@frankleonrose
Copy link
Contributor Author

Reported: libsdl-org/SDL#4324

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

3 participants