coadmunkee / gnome-shell-extension-espresso

Enable controlling conditions to prevent the usual auto suspend and screensaver functions from taking effect.
https://extensions.gnome.org/extension/4135/espresso/
GNU General Public License v2.0
69 stars 13 forks source link

Meta.MonitorManager.get is evil on gnome44 (mutter deprecated the function) #53

Closed xevilstar closed 1 year ago

xevilstar commented 1 year ago

Dear Maintainers,

I am trying to patch this extension to make it work on gnome 44. To begin with I edited the metadata.js adding the gnome 44 version and installed espresso just to debug it. Got "Meta.MonitorManager.get is not a function" Got around searching and ... it seems that mutter has retired that function as explained here: https://gitlab.gnome.org/GNOME/mutter/-/commit/aa2a663380c6c7b3b0af2269f9713b99d6cace58

I have searched inside the espresso latest git tree for a place to apply something similar to this:

https://gitlab.gnome.org/GNOME/mutter/-/commit/65d8164833e998b35434a70f47808296e131b4a0

still searching .....

Can you please help me patch espresso@coadmunkee.github.com/extension.js to make it work with gnome 44 ?

Thanks in advance.

vixalien commented 1 year ago

are you on gnome 4.4? or gnome 44?

xevilstar commented 1 year ago

gnome 44 sorry

On Tue, Mar 7, 2023 at 6:07 PM Angelo Verlain @.***> wrote:

are you on gnome 4.4? or gnome 44?

— Reply to this email directly, view it on GitHub https://github.com/coadmunkee/gnome-shell-extension-espresso/issues/53#issuecomment-1458527220, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKTHVNAIRQUPV2JILYFITDW25TLZANCNFSM6AAAAAAVRISFGY . You are receiving this because you authored the thread.Message ID: @.*** com>

vixalien commented 1 year ago

I'm sorry but I think I'm confused. the latest gnome shell version is 43. Are you perhaps talking about gtk 4.4 or are you on a really old version?

On Wed, 8 Mar 2023, 10:09 xevilstar, @.***> wrote:

gnome 4.4 sorry

On Tue, Mar 7, 2023 at 6:07 PM Angelo Verlain @.***> wrote:

are you on gnome 4.4? or gnome 44?

— Reply to this email directly, view it on GitHub < https://github.com/coadmunkee/gnome-shell-extension-espresso/issues/53#issuecomment-1458527220 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAKTHVNAIRQUPV2JILYFITDW25TLZANCNFSM6AAAAAAVRISFGY

. You are receiving this because you authored the thread.Message ID: @.*** com>

— Reply to this email directly, view it on GitHub https://github.com/coadmunkee/gnome-shell-extension-espresso/issues/53#issuecomment-1459698308, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJB5FCLPYEP6V4BFTTXQPBDW3A5EPANCNFSM6AAAAAAVRISFGY . You are receiving this because you commented.Message ID: @.*** com>

xevilstar commented 1 year ago

the latest gnome-shell is 44 some other extensions are already adapting

[image: Screenshot from 2023-03-08 11-55-32.png]

On Wed, Mar 8, 2023 at 9:30 AM Angelo Verlain @.***> wrote:

I'm sorry but I think I'm confused. the latest gnome shell version is 43. Are you perhaps talking about gtk 4.4 or are you on a really old version?

On Wed, 8 Mar 2023, 10:09 xevilstar, @.***> wrote:

gnome 4.4 sorry

On Tue, Mar 7, 2023 at 6:07 PM Angelo Verlain @.***> wrote:

are you on gnome 4.4? or gnome 44?

— Reply to this email directly, view it on GitHub <

https://github.com/coadmunkee/gnome-shell-extension-espresso/issues/53#issuecomment-1458527220

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AAKTHVNAIRQUPV2JILYFITDW25TLZANCNFSM6AAAAAAVRISFGY

. You are receiving this because you authored the thread.Message ID: @.*** com>

— Reply to this email directly, view it on GitHub < https://github.com/coadmunkee/gnome-shell-extension-espresso/issues/53#issuecomment-1459698308 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AJB5FCLPYEP6V4BFTTXQPBDW3A5EPANCNFSM6AAAAAAVRISFGY

. You are receiving this because you commented.Message ID: @.*** com>

— Reply to this email directly, view it on GitHub https://github.com/coadmunkee/gnome-shell-extension-espresso/issues/53#issuecomment-1459726467, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKTHVJ64FSP5OJYPQPUC4LW3A7TVANCNFSM6AAAAAAVRISFGY . You are receiving this because you authored the thread.Message ID: @.*** com>

vixalien commented 1 year ago

the latest is Gnome 43 https://release.gnome.org/43/

xevilstar commented 1 year ago

the latest is Gnome 43 https://release.gnome.org/43/

Screenshot from 2023-03-08 11-55-23

xevilstar commented 1 year ago

I repeat lots of extensions are already supporting 44

xevilstar commented 1 year ago

https://download.gnome.org/sources/gnome-shell/44/

xevilstar commented 1 year ago

https://download.gnome.org/sources/gnome-shell-extensions/44/

vixalien commented 1 year ago

as you can see in the image above, you are on GNOME 44 (not 4.4) which is a beta (pre-release) version....

xevilstar commented 1 year ago

Dear maintainers

please take a look at the shell version of the following extensions ...

https://extensions.gnome.org/extension/3628/arcmenu/ https://extensions.gnome.org/extension/4269/alphabetical-app-grid/ https://extensions.gnome.org/extension/5425/battery-time/ https://extensions.gnome.org/extension/4679/burn-my-windows/ https://extensions.gnome.org/extension/3396/color-picker/ https://extensions.gnome.org/extension/4648/desktop-cube/ https://extensions.gnome.org/extension/3433/fly-pie/ https://extensions.gnome.org/extension/4955/gradient-top-bar/ https://extensions.gnome.org/extension/5263/gtk4-desktop-icons-ng-ding/ https://https://extensions.gnome.org/extension/2896/messaging-menu/extensions.gnome.org/extension/988/harddisk-led/ https://extensions.gnome.org/extension/2236/night-theme-switcher/ https://extensions.gnome.org/extension/5278/pano/ https://extensions.gnome.org/extension/5292/quick-touchpad-toggle/ https://extensions.gnome.org/extension/2899/settingscenter/ https://extensions.gnome.org/extension/5470/weather-oclock/

then read some basic open source philosophy

here

about the concept of release early release often

thanks

xevilstar commented 1 year ago

nice caffeine just updated to 44 https://extensions.gnome.org/extension/517/caffeine/ ... and they told it was unmantained ...

xevilstar commented 1 year ago

news ?

vixalien commented 1 year ago

here's where the Meta.MonitorManager.get is used; https://github.com/coadmunkee/gnome-shell-extension-espresso/blob/192b1c9310c69bd4f1be461b160014b22e05f128/espresso%40coadmunkee.github.com/extension.js#L143

xevilstar commented 1 year ago

I have tried to change that line but I think I haven't found the right way to do it tried


MetaIdleManager * meta_backend_get_idle_manager (MetaBackend *backend);

META_EXPORT_TEST
MetaMonitorManager * meta_backend_get_monitor_manager (MetaBackend *backend);
META_EXPORT_TEST
MetaOrientationManager * meta_backend_get_orientation_manager (MetaBackend *backend);
MetaCursorTracker * meta_backend_get_cursor_tracker (MetaBackend *backend);

On Tue, Mar 14, 2023 at 11:57 AM Angelo Verlain @.***> wrote:

here's where the Meta.MonitorManager.get is used; https://github.com/coadmunkee/gnome-shell-extension-espresso/blob/192b1c9310c69bd4f1be461b160014b22e05f128/espresso%40coadmunkee.github.com/extension.js#L143

— Reply to this email directly, view it on GitHub https://github.com/coadmunkee/gnome-shell-extension-espresso/issues/53#issuecomment-1467870743, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKTHVPPLDBMNG2DG2MMGSLW4BFIVANCNFSM6AAAAAAVRISFGY . You are receiving this because you authored the thread.Message ID: @.*** com>

xevilstar commented 1 year ago

got news ?

vixalien commented 1 year ago

I'll look into this when I get some free time

hendersj commented 1 year ago

I've just upgraded openSUSE Tumbleweed to 20230326 today, and that also now includes GNOME 44.0 - and I can confirm this extension no longer works.

thimslugga commented 1 year ago

I just rebased to Fedora Silverblue 38 and discovered that this extension still doesn't support gnome shell 44.

https://release.gnome.org/44/

coadmunkee commented 1 year ago

libanp provided a pull request that addresses the Meta.MonitorManager.get issue. I've merged the pull, so you should be able to build a Gnome 44 compatible version using the master branch. I typically run an arch-based distribution, so haven't installed Gnome 44 yet. I'll spin up a VM and test in the next week or two before packing a new version for the EGO website. If any of you run into problems with the new code, please open additional issues so we can work on resolving them. I'd also be interested in have folks comment here with your distro details if you are having success using the newest version of Espresso on G44.

accelbread commented 1 year ago

Using Espresso master branch on G44 successfully. Im on NixOS unstable.

coadmunkee commented 1 year ago

Included in Espresso v8 Release