Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use a wrapper to access to Screen, Workspacess and Monitor #770

Closed
wants to merge 1 commit into from

Conversation

3v1n0
Copy link
Collaborator

@3v1n0 3v1n0 commented Jul 8, 2018

As per mutter xwayland-on-demand preparation branch refactory,
MetaScreen has been removed, thus replacing the dead objects.

Basically global.screen moved to global.display, while all the
workspace related features have been moved to the WorkspaceManager
and displays are managed by DisplayManager.

@3v1n0
Copy link
Collaborator Author

3v1n0 commented Jul 10, 2018

As a note, probably this should come with a version check on 2.30 (2.29).

Or better, we could just make the code abstract to work with both versions, I'm open to that, let me know what you prefer.

@micheleg
Copy link
Owner

Hi Marco, sorry for the late reply and thatk you for the contribution.

My understanding is that this is compatible only with the upcoming gnome-shell 3.30. I'll need to consider dropping support for older versions at a certain point, but I'd like to keep tha main branch compatible al least with the current Ubuntu LTS and possibly Debian stable (which I'm running daily).

As it seems that the API haven't actualy changed but just being moved around, I would rahter make the code abstract to work with versions for now, with an explicit comment reminding to drop the upstraction in the future. At the moment we are supporting with the same codebase way back to 3.18. I would consider targetig 3.22+ if that's of any help.

@3v1n0
Copy link
Collaborator Author

3v1n0 commented Jul 29, 2018

Yeah, I quite agree with that... As it wouldn't be too much complexity as instead maintaining different branches.

I'll rework on that soon.
Cheers

@3v1n0 3v1n0 changed the title use Display and WorkspaceManager instead of global.screen use a wrapper to access to Screen, Workspacess and Monitor Jul 31, 2018
@3v1n0
Copy link
Collaborator Author

3v1n0 commented Jul 31, 2018

So, @micheleg, i've refactored the change a bit to use the DisplayWrapper namespace (not really needed to have a class here) to redirect the calls to the proper object.

It works fine here in both gnome-shell 3.28 and 3.29.4 (and git).

As per mutter xwayland-on-demand preparation branch refactory
MetaScreen has been removed, thus replacing the dead objects.

Basically global.screen moved to global.display, while all the workspace related
features have been moved to the WorkspaceManager and displays are managed by
DisplayManager.

In order to keep the extension working in both 3.28 and 3.30 gnome-shell
we need to support this change by creating wrapper functions that use the
gnome.screen if that is available or the proper new object otherwise.
@micheleg
Copy link
Owner

micheleg commented Aug 1, 2018

Merged as [8398d41] with just a couple of modifications to maintain compatibility also with pre ES6 gjs versions (e.g gnome-shell 3.22).

Thank you!

@micheleg micheleg closed this Aug 1, 2018
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.

2 participants