Conversation
The GNOME 49 API changed unmaximize() to accept no parameters. This fixes JS warnings and restores Pop Shell functionality on GNOME 49 (Fedora 43). Fixes: unmaximize() calls in window.ts, extension.ts, tiling.ts
jacobgkau
left a comment
There was a problem hiding this comment.
Thanks for the updates. As mentioned in the README, GNOME 46+ support is on the master_noble branch. master_jammy is only for GNOME 42-44. Can you change the target branch to master_noble?
This will need to continue working on GNOME 46-48. If it doesn't, then a new branch might be needed. I'll try to test once the target is changed.
|
@jacobgkau : sorry for not reading properly ! i changed the pr to master_noble branch. fix is more or less a nobrainer, works perfect for fedora 43 gnome. happy new year as well :-) |
jacobgkau
left a comment
There was a problem hiding this comment.
Hello @sasilanz, I'm trying to take a look at this again (thanks for your patience, as COSMIC is taking priority right now).
First of all, on EndeavourOS with GNOME 49.3, I'm not actually seeing any functional problems without this change. I see the Too many arguments to method Meta.Window.unmaximize: expected 0, got 1 message logged once per session, when I first open a second window after enabling tiling, but tiling does still seem to work. I'm also seeing it work fine without this fix on Fedora 43. Can you clarify what you mean when you say it "fails to work correctly"?
Secondly, this branch is failing to build on Pop!_OS (including our build servers), EndeavourOS, and Fedora 43. This is the sort of output I'm getting when attempting to build:
Build error:
+ tsc
src/extension.ts:912:35 - error TS2554: Expected 1 arguments, but got 0.
912 prev.meta.unmaximize();
~~~~~~~~~~~~
src/mod.d.ts:314:20
314 unmaximize(flags: any): void;
~~~~~~~~~~
An argument for 'flags' was not provided.
src/extension.ts:915:31 - error TS2554: Expected 1 arguments, but got 0.
915 prev.meta.unmaximize();
~~~~~~~~~~~~
src/mod.d.ts:314:20
314 unmaximize(flags: any): void;
~~~~~~~~~~
An argument for 'flags' was not provided.
src/extension.ts:1037:34 - error TS2554: Expected 1 arguments, but got 0.
1037 compare.meta.unmaximize();
~~~~~~~~~~~~
src/mod.d.ts:314:20
314 unmaximize(flags: any): void;
~~~~~~~~~~
An argument for 'flags' was not provided.
src/extension.ts:1261:30 - error TS2554: Expected 1 arguments, but got 0.
1261 win.meta.unmaximize();
~~~~~~~~~~~~
src/mod.d.ts:314:20
314 unmaximize(flags: any): void;
~~~~~~~~~~
An argument for 'flags' was not provided.
src/tiling.ts:752:26 - error TS2554: Expected 1 arguments, but got 0.
752 win.meta.unmaximize();
~~~~~~~~~~~~
src/mod.d.ts:314:20
314 unmaximize(flags: any): void;
~~~~~~~~~~
An argument for 'flags' was not provided.
src/window.ts:376:22 - error TS2554: Expected 1 arguments, but got 0.
376 meta.unmaximize();
~~~~~~~~~~~~
src/mod.d.ts:314:20
314 unmaximize(flags: any): void;
~~~~~~~~~~
An argument for 'flags' was not provided.
Found 6 errors in 3 files.
Errors Files
4 src/extension.ts:912
1 src/tiling.ts:752
1 src/window.ts:376
make[1]: *** [Makefile:38: compile] Error 2
make[1]: Leaving directory '/home/jacob/Work/shell'
dh_auto_build: error: make -j24 returned exit code 2
make: *** [debian/rules:10: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
Are you not seeing this build error when building the project?
…NOME 49 - Make unmaximize() flags parameter optional in type definition to fix TypeScript compilation errors while maintaining backward compatibility - Use local Gio.Settings instance in WindowSwitcherPopup._getWindowList() instead of this._settings which is null in GNOME 49+
|
Hi @jacobgkau, Thanks for the detailed review! I've pushed a new commit that addresses the build failures and adds an additional fix. Build fix: Additional fix: Regarding "fails to work correctly": Let me know if you have any further questions! |
Pop Shell incompatible with GNOME Shell 49
Environment
Problem
Pop Shell fails to work correctly on GNOME Shell 49 with the following error repeated in the journal:
Root Cause
The GNOME 49 API changed the
Meta.Window.unmaximize()method signature. It no longer accepts any parameters (previously acceptedMeta.MaximizeFlags).Solution
Replace all instances of:
unmaximize(Meta.MaximizeFlags.BOTH)unmaximize(Meta.MaximizeFlags.HORIZONTAL)unmaximize(Meta.MaximizeFlags.VERTICAL)with just:
unmaximize()Affected Files and Lines
window.js
meta.unmaximize(Meta.MaximizeFlags.BOTH)→meta.unmaximize()extension.js
prev.meta.unmaximize(Meta.MaximizeFlags.BOTH)→prev.meta.unmaximize()prev.meta.unmaximize(Meta.MaximizeFlags.BOTH)→prev.meta.unmaximize()compare.meta.unmaximize(Meta.MaximizeFlags.BOTH)→compare.meta.unmaximize()win.meta.unmaximize()tiling.js
win.meta.unmaximize(Meta.MaximizeFlags.BOTH)→win.meta.unmaximize()Testing
After applying these changes, Pop Shell works correctly on GNOME 49 with all tiling functionality restored.
Additional Notes
The metadata.json already lists shell version 49 as supported, but the code wasn't updated for the API changes.