gicmo / gamemode-extension

GNOME Shell extension for Feral Interactive's GameMode
GNU Lesser General Public License v2.1
148 stars 17 forks source link

Add support for gnome-shell 41 / GTK 4 #47

Closed fjsevilla-dev closed 2 years ago

fjsevilla-dev commented 2 years ago

The only problem that seems to prevent the extension from working in Gnome 40 / 41 with GTK 4 is the use of the Gtk.Box.margin property (inherited from Gtk.Witdgetand removed in GTK 4). The simplest solution is to fall back to the new margin-x properties.

On the other hand, when replacing pack_start by append we lose the padding argument, so the colour picker button appears stuck to the switch. Using margin-startand margin-end in the child widget is simple to emulate the above behaviour.

In principle this should fix the bug reported in Gnome 40 (GTK 4) and allow the extension to work seamlessly with gnome-shell 41.

I tested this changes on Gnome-Shell 41.1 (GTK 4.4.1, GJS 1.70.0).

Fixes #45, fixes #44

gicmo commented 2 years ago

No idea why the PPC64LE CI is failing with npm ERR! request to https://registry.npmjs.org/eslint failed, reason: connect ENETUNREACH 2606:4700::6810:1023:443. Don't think this has anything to do with the current PR.

fjsevilla-dev commented 2 years ago

No idea why the PPC64LE CI is failing with npm ERR! request to https://registry.npmjs.org/eslint failed, reason: connect ENETUNREACH 2606:4700::6810:1023:443. Don't think this has anything to do with the current PR.

Yes, I think so too.It seems to have more to do with Travis itself and npm install, but I don't know... Maybe simply triggering a rebuild will solve the problem?

gicmo commented 2 years ago

No idea why the PPC64LE CI is failing with npm ERR! request to https://registry.npmjs.org/eslint failed, reason: connect ENETUNREACH 2606:4700::6810:1023:443. Don't think this has anything to do with the current PR.

Yes, I think so too.It seems to have more to do with Travis itself and npm install, but I don't know... Maybe simply triggering a rebuild will solve the problem?

I tried, .. let me remove that ppc64le target in a PR.

gicmo commented 2 years ago

@fjsevilla-dev ok, I have ppc64 with arm64. Could you rebase this PR on top of master?

fjsevilla-dev commented 2 years ago

Looks like Travis is still unhappy... Now nvm install node for ARM64 fails :(

https://app.travis-ci.com/github/gicmo/gamemode-extension/jobs/547938827

gicmo commented 2 years ago

Restarted CI, fixed it! Thanks so much!