Skip to content

Specify window position in constructor for better wayland compatibility - #8238

Merged
FreeTubeBot merged 1 commit into
FreeTubeApp:developmentfrom
absidue:window-position-contructor
Nov 11, 2025
Merged

Specify window position in constructor for better wayland compatibility#8238
FreeTubeBot merged 1 commit into
FreeTubeApp:developmentfrom
absidue:window-position-contructor

Conversation

@absidue

@absidue absidue commented Nov 6, 2025

Copy link
Copy Markdown
Member

Pull Request Type

  • Bugfix

Description

According to the Electron documentation wayland doesn't allow apps to resize or move their own windows after they have been created, as we currently do just that, this pull request switches to passing the size and position in the BrowserWindow constructor instead. The recommendation of running on X11 isn't relevant for us, as we only need to set the initial size and position of the window, we don't need to move or resize it programatically after that.

https://www.electronjs.org/docs/latest/api/browser-window#platform-notices

Testing

I haven't tested this on Linux but I did check that it still works as expected on Windows 11.

Desktop

  • OS: Windows
  • OS Version: 11

@FreeTubeBot
FreeTubeBot enabled auto-merge (squash) November 6, 2025 22:05
@github-actions github-actions Bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Nov 6, 2025

@PikachuEXE PikachuEXE left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on macOS

@efb4f5ff-1298-471a-8973-3d47447115dc

efb4f5ff-1298-471a-8973-3d47447115dc commented Nov 10, 2025

Copy link
Copy Markdown
Member

@ChunkyProgrammer @kommunarr 👋

@ghost

ghost commented Nov 11, 2025

Copy link
Copy Markdown

I believe @MarmadileManteater is using a tiling window manager so, I think it'd be a good idea for them to approve/test this PR to make sure it works correctly.

@absidue

absidue commented Nov 11, 2025

Copy link
Copy Markdown
Member Author

It is possible that any kind of positioning even through the constructor won't work on wayland, if that's the case there is nothing we can do about it on our side (you would need to get the wayland spec changed and the change implemented in enough places that Chromium/Electron would adopt it).

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiling window manager should be smart enough to ignore this

@FreeTubeBot
FreeTubeBot merged commit 10829ad into FreeTubeApp:development Nov 11, 2025
5 checks passed
@github-actions github-actions Bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Nov 11, 2025
@absidue
absidue deleted the window-position-contructor branch November 11, 2025 17:22
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Nov 18, 2025
* development:
  Fix playlist video view counts on the local API (FreeTubeApp#8290)
  change hardcoded color app text logoColor (FreeTubeApp#8288)
  Translated using Weblate (Russian)
  Translated using Weblate (German)
  wrap long playlist strings (FreeTubeApp#8275)
  Translated using Weblate (Bulgarian)
  Bump js-yaml from 4.1.0 to 4.1.1 (FreeTubeApp#8284)
  bump workflows node-version to 24 (FreeTubeApp#8279)
  Translated using Weblate (Basque)
  Translated using Weblate (Vietnamese)
  Translated using Weblate (Hungarian)
  Translated using Weblate (Hungarian)
  Remove upperCase on various places (FreeTubeApp#8267)
  Translated using Weblate (French)
  Fix subscription count display on watch page with IV API (FreeTubeApp#8255)
  Specify window position in constructor for better wayland compatibility (FreeTubeApp#8238)
  Change profile icon to include lowercase letters (FreeTubeApp#8253)
  Translated using Weblate (German)
  Translated using Weblate (Chinese (Traditional Han script))
  Translated using Weblate (Portuguese (Brazil))
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

Successfully merging this pull request may close these issues.

4 participants