fix: use gtk 3 switch as workaround #3366

Merged
franz-dc merged 3 commits from fix/gtk-3-workaround into master 2025-06-02 17:52:30 +00:00
franz-dc commented 2025-05-13 08:49:22 +00:00 (Migrated from github.com)

The latest version of Electron will throw out an error with GNOME:

Running (process:10985): Gtk-ERROR **: 16:23:58.349: GTK 2/3 symbols detected. Using GTK 2/3 and GTK 4 in the same process is not supported

This commit applies the workaround mentioned here and here.

The latest version of Electron will throw out an error with GNOME: ```bash Running (process:10985): Gtk-ERROR **: 16:23:58.349: GTK 2/3 symbols detected. Using GTK 2/3 and GTK 4 in the same process is not supported ``` This commit applies the workaround mentioned [here](https://github.com/electron/electron/issues/46538#issuecomment-2808806722) and [here](https://github.com/electron/electron/blob/main/docs/breaking-changes.md#changed-gtk-4-is-default-when-running-gnome).
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2025-05-19 15:33:07 +00:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull Request Overview

This PR adds a workaround to force Electron to use GTK 3 on GNOME, preventing mixed GTK 2/3 and GTK 4 errors.

  • Appends the gtk-version switch to force GTK3
  • References the upstream Electron issue for context
## Pull Request Overview This PR adds a workaround to force Electron to use GTK 3 on GNOME, preventing mixed GTK 2/3 and GTK 4 errors. - Appends the `gtk-version` switch to force GTK3 - References the upstream Electron issue for context
@ -114,6 +114,11 @@ protocol.registerSchemesAsPrivileged([
{ scheme: 'mailto', privileges: { standard: true } },
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-05-19 15:33:06 +00:00

[nitpick] Guard this workaround behind a platform check (e.g., if (process.platform === 'linux')) so it only applies on GNOME/Linux and avoids unintended effects on other operating systems.

if (is.linux()) {
  app.commandLine.appendSwitch('gtk-version', '3');
}
[nitpick] Guard this workaround behind a platform check (e.g., `if (process.platform === 'linux')`) so it only applies on GNOME/Linux and avoids unintended effects on other operating systems. ```suggestion if (is.linux()) { app.commandLine.appendSwitch('gtk-version', '3'); } ```
JellyBrick (Migrated from github.com) requested changes 2025-06-02 17:52:03 +00:00
@ -114,6 +114,11 @@ protocol.registerSchemesAsPrivileged([
{ scheme: 'mailto', privileges: { standard: true } },
JellyBrick (Migrated from github.com) commented 2025-06-02 17:51:57 +00:00
if (is.linux()) {
```suggestion if (is.linux()) { ```
JellyBrick (Migrated from github.com) approved these changes 2025-06-02 17:52:20 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: YTMD/youtube-music#3366
No description provided.