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

Update for Gnome Shell 46 #2146

Merged
merged 12 commits into from
Mar 20, 2024

Conversation

sergio-costas
Copy link
Collaborator

add_actor() has been removed after being deprecated, and it must be replaced with add_child(). Also, there are two add methods that also have to be changed.

Tested in Gnome 46 alpha, in a Fedora RawHide system. I also tested it in Gnome 45, but doesn't work, so it must be only 46.

@sergio-costas
Copy link
Collaborator Author

In fact, using this patch in Gnome Shell 45 results in a tiny, empty dock, and a lot of messages in journal like this one:

Can't update stage views actor <unnamed>[<XXXXXXX>:0xYYYYYYYY] is on because it needs an allocation.

@ryzendew
Copy link

issues to report

image
With shrink the dash icons pop up over the dock line

and without
image
icons are too far up

image
when transparent icons have weird circles

@sergio-costas
Copy link
Collaborator Author

@ryzendew Are you using Gnome 45 or Gnome 46?

@sergio-costas
Copy link
Collaborator Author

Ok, there are some extra problems:

JS ERROR: TypeError: (intermediate value).cairo_set_source_color is not a function
_drawIndicator@file:///home/raster/.local/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/appIconIndicators.js:411:17

For some reason, it can't find that function. Also

Error: No signal 'actor-added' on object 'MetaWindowGroup'

Stack trace:
  _create@file:///home/raster/.local/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/utils.js:172:30


Error: No signal 'actor-removed' on object 'MetaWindowGroup'

Stack trace:
  _create@file:///home/raster/.local/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/utils.js:172:30

I'll try to fix them...

metadata.json Outdated Show resolved Hide resolved
@sergio-costas
Copy link
Collaborator Author

More things to fix:

The GObject property St.ScrollView.hscroll is deprecated.
0 ensureActorVisibleInScrollView() ["file:///home/raster/.local/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/dash.js":1113:38]

@sergio-costas
Copy link
Collaborator Author

Fixed the cairo_set_source_color bug.

@sergio-costas
Copy link
Collaborator Author

And fixed the signal problem.

@sergio-costas
Copy link
Collaborator Author

@ryzendew I'm unable to reproduce those errors. Can you try again with the new changes that I added, just in case?

@ryzendew
Copy link

@ryzendew Are you using Gnome 45 or Gnome 46?

46 beta

@ryzendew
Copy link

also no change with the newest change

@rastersoft
Copy link

@ryzendew Can you tell me your dock configuration? (icon size...)

@ryzendew
Copy link

this needs to be rebased on the beta cause the alpha is 1 month old and the beta has a few changes

@sergio-costas
Copy link
Collaborator Author

sergio-costas commented Feb 19, 2024

There are still several bugs in Gnome 46 beta:

  • The icons have incorrect size, as @RyzenDev commented
  • The "push to show" option doesn't work: if it is selected, pushing in the dock zone doesn't make it to pop up
  • The overview mode is broken: this message is shown in the log: clutter_actor_allocate: assertion '!isnan (real_allocation.x1) && !isnan (real_allocation.x2) && !isnan (real_allocation.y1) && !isnan (real_allocation.y2)' failed

@sergio-costas
Copy link
Collaborator Author

The "push to show" option fails because the data sent from Gnome Shell is... odd... I don't know if it's a problem from Gnome Shell itself and its PressureBarriers, or is a problem due to being using VirtualBox. The problem is that, once the mouse cursor is at the screen border, it doesn't matter how hard you move it against the border, the distance indicated by the barrier is always 0.765625, so unless you achieve the required pressure in the first "push", the dock won't appear.

@sergio-costas
Copy link
Collaborator Author

I've been able to fix the Overview problem in Gnome 46. It was because maybeAdjustBoxSize() and maybeAdjustBoxToDock() were being called with this.spacing as the last parameter, but that property isn't defined anywhere, so the received value was undefined, and this broke the allocation values (it put NaN in several places).

I just added a check to set it to zero if the value is undefined, but maybe it is possible to just fully remove the parameter itself, because it seems to be used only when calling those two methods, and I can't find neither other places where those methods are called, nor other places where the property is set. @3v1n0 What do you think?

@sergio-costas sergio-costas marked this pull request as draft February 27, 2024 12:19
@sergio-costas
Copy link
Collaborator Author

I decided to convert this into a draft to avoid merges until it is fully finished.

@sergio-costas sergio-costas marked this pull request as ready for review February 29, 2024 15:21
@sergio-costas
Copy link
Collaborator Author

Ok, it is ready for reviewing.

Copy link
Collaborator

@3v1n0 3v1n0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments, mostly on style (but it does matter because CI will block it otherwise), but it works really well... So thanks a lot for working on this!

appIconIndicators.js Outdated Show resolved Hide resolved
theming.js Outdated Show resolved Hide resolved
theming.js Outdated Show resolved Hide resolved
utils.js Outdated Show resolved Hide resolved
windowPreview.js Outdated Show resolved Hide resolved
docking.js Outdated Show resolved Hide resolved
docking.js Outdated Show resolved Hide resolved
docking.js Outdated Show resolved Hide resolved
docking.js Outdated Show resolved Hide resolved
_stylesheet.scss Show resolved Hide resolved
@ryzendew
Copy link

ryzendew commented Mar 1, 2024

Great work but you missed the show apps icon it's still has black around it

@sergio-costas
Copy link
Collaborator Author

Great work but you missed the show apps icon it's still has black around it

Ops!!! Fixed.

@3v1n0
Copy link
Collaborator

3v1n0 commented Mar 1, 2024

Ah, for your info, I've landed this to ubuntu yesterday, so also consider the fixups I did at https://github.com/micheleg/dash-to-dock/tree/ubuntu-dock

@jbicha
Copy link
Collaborator

jbicha commented Mar 2, 2024

In case you weren't already aware, I'm missing the indicator next to running apps in the Ubuntu Dock. This is with 89ubuntu1 that is now in Ubuntu 24.04 LTS. And I'm using GNOME Shell 46~beta-0ubuntu2 and I'm still using the same Yaru theme as Ubuntu 23.10.

@rastersoft
Copy link

@jbicha I don't understand... Can you put me a screen capture?

@muhammad-ans
Copy link

There is also this weird square around app icons in overview when it is installed.
image

sergio-costas and others added 6 commits March 18, 2024 16:00
This patch fixes the placement error in the app icons
While it's safe to use either in GNOME 46, it is not always safe to use
(clutter_actor_)add_child directly in GNOME 45. Because the notification
StBin requires to update its internal state wasn't added until
gnome-shell@ed3b8d093e introduced in 46.alpha.

At least (st_bin_)set_child remains the same in all GNOME versions, and
is what the old (clutter_container_)add_actor used to call in GNOME 45.

There may be other places where we need to change add_child to set_child
for backward compatibility with StBin, but if they exist then they're not
causing problems yet.

Closes: https://bugs.launchpad.net/bugs/2056506
Fixes: 4945dbf
@sergio-costas
Copy link
Collaborator Author

@karuboniru @garrett It should be fixed now. Thanks for testing it!

@vanvugt
Copy link
Collaborator

vanvugt commented Mar 19, 2024

If you're using >100% scale then there's also an upstream fix coming for the dots: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3245

@vanvugt
Copy link
Collaborator

vanvugt commented Mar 19, 2024

The dots are still misplaced (in GNOME 46 only?):

Screenshot from 2024-03-19 15-42-55

Copy link
Collaborator

@vanvugt vanvugt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditionally approved pending the dot-over-the-icon bug mentioned above. It still seems to be happening in GNOME 46.0 at least.

@sergio-costas
Copy link
Collaborator Author

@vanvugt But, if I get it right, the patch for the dot problem is for Gnome Shell itself...

@DScalpel
Copy link

Hi,
Thanks for the extension update. I have one bug to report.

The Customize the dash color seems to leave weird artifacts around each icon with brown color.

I am using Arch linux gnome unstable repo.

Screenshot from 2024-03-19 20-58-24

@sergio-costas
Copy link
Collaborator Author

@DScalpel I can't reproduce your bug... Did you update to the last version of THIS branch?

@bam80
Copy link

bam80 commented Mar 19, 2024

Thanks for the extension update.

It wasn't updated yet, right? I see no new releases.

@DScalpel
Copy link

DScalpel commented Mar 19, 2024

@DScalpel I can't reproduce your bug... Did you update to the last version of THIS branch?
@sergio-costas
Hi, Sorry for bad bug report.

Can confirm it is working fine.

Screenshot from 2024-03-20 06-30-20

@Calosis
Copy link

Calosis commented Mar 19, 2024

The dots are still misplaced (in GNOME 46 only?):

Screenshot from 2024-03-19 15-42-55

Can confirm, I'm hitting this bug currently.

@vanvugt vanvugt mentioned this pull request Mar 20, 2024
@vanvugt
Copy link
Collaborator

vanvugt commented Mar 20, 2024

@vanvugt But, if I get it right, the patch for the dot problem is for Gnome Shell itself...

That's a slightly different bug where the gap exists but is only half the correct size. Here however, the gap does not exist (or has negative spacing?). Try it on GNOME 46 again...

@vanvugt vanvugt merged commit 506dd02 into micheleg:master Mar 20, 2024
1 check passed
@vanvugt
Copy link
Collaborator

vanvugt commented Mar 20, 2024

Merged, but the dot bug on GNOME 46 is unresolved still. So it's not ready for release but at least we can all work more efficiently by focussing on the master branch.

@a1ex-ak
Copy link

a1ex-ak commented Mar 20, 2024

Gnome 46
Снимок экрана от 2024-03-20 12-18-35

@vanvugt
Copy link
Collaborator

vanvugt commented Mar 20, 2024

This pull request is closed. Please subscribe to #2160 instead.

@stuarthayhurst
Copy link
Contributor

More things to fix:

The GObject property St.ScrollView.hscroll is deprecated.
0 ensureActorVisibleInScrollView() ["file:///home/raster/.local/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/dash.js":1113:38]

Did this get addressed? I'm still seeing it on my system, I'm happy to file a bug if that's not expected or tracked somewhere already :)

@vanvugt
Copy link
Collaborator

vanvugt commented Mar 21, 2024

That's being tracked in #2159

@a1ex-ak
Copy link

a1ex-ak commented Mar 21, 2024

Tell me when the update for Gnome 46 will be released

@nechodom
Copy link

Tell me when the update for Gnome 46 will be released

I already have Gnome 46. So I think you can download it.

@vanvugt
Copy link
Collaborator

vanvugt commented Mar 25, 2024

dash-to-dock for GNOME 46 has not been released yet. Most likely because there are other issues we'd still like to fix, and we're working on other projects too.

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.

None yet