dash-to-dock icon indicating copy to clipboard operation
dash-to-dock copied to clipboard

Update for Gnome Shell 46

Open sergio-costas opened this issue 1 year ago • 16 comments

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 avatar Feb 12 '24 16:02 sergio-costas

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.

sergio-costas avatar Feb 14 '24 09:02 sergio-costas

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

ryzendew avatar Feb 15 '24 14:02 ryzendew

@RyzenDew Are you using Gnome 45 or Gnome 46?

sergio-costas avatar Feb 15 '24 15:02 sergio-costas

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/[email protected]/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/[email protected]/utils.js:172:30


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

Stack trace:
  _create@file:///home/raster/.local/share/gnome-shell/extensions/[email protected]/utils.js:172:30

I'll try to fix them...

sergio-costas avatar Feb 15 '24 15:02 sergio-costas

More things to fix:

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

sergio-costas avatar Feb 15 '24 17:02 sergio-costas

Fixed the cairo_set_source_color bug.

sergio-costas avatar Feb 15 '24 17:02 sergio-costas

And fixed the signal problem.

sergio-costas avatar Feb 15 '24 17:02 sergio-costas

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

sergio-costas avatar Feb 15 '24 17:02 sergio-costas

@RyzenDew Are you using Gnome 45 or Gnome 46?

46 beta

ryzendew avatar Feb 15 '24 23:02 ryzendew

also no change with the newest change

ryzendew avatar Feb 15 '24 23:02 ryzendew

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

rastersoft avatar Feb 15 '24 23:02 rastersoft

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

ryzendew avatar Feb 16 '24 12:02 ryzendew

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 avatar Feb 19 '24 16:02 sergio-costas

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 avatar Feb 26 '24 12:02 sergio-costas

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 avatar Feb 27 '24 12:02 sergio-costas

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

sergio-costas avatar Feb 27 '24 12:02 sergio-costas

Ok, it is ready for reviewing.

sergio-costas avatar Feb 29 '24 15:02 sergio-costas

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

ryzendew avatar Mar 01 '24 03:03 ryzendew

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

Ops!!! Fixed.

sergio-costas avatar Mar 01 '24 11:03 sergio-costas

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

3v1n0 avatar Mar 01 '24 13:03 3v1n0

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.

jbicha avatar Mar 02 '24 15:03 jbicha

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

rastersoft avatar Mar 02 '24 21:03 rastersoft

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

ans-ibrahim avatar Mar 02 '24 21:03 ans-ibrahim

Here's a a screenshot from Ubuntu 23.10 showing expected behavior. There is a circle showing that I have a single window of my file browser running and a circle showing that the Welcome to Ubuntu app is running. The file browser is highlighted to show that it is the active focused window. Neither the dots nor the highlight are showing in my Ubuntu 24.04 LTS.

image

jbicha avatar Mar 02 '24 21:03 jbicha

@muhammad-ans From your screenshot, it looks like you are using Fedora.

  • What version of Fedora?
  • What version of gnome-shell?
  • Are you using the default Adwaita themes or something else?

jbicha avatar Mar 02 '24 21:03 jbicha

@muhammad-ans From your screenshot, it looks like you are using Fedora.

* What version of Fedora?

* What version of gnome-shell?

* Are you using the default Adwaita themes or something else?

I am using fedora silverblue 40 (pre release). Gnome shell version is gnome-shell-46~beta-6 Theme is default adwaita.

ans-ibrahim avatar Mar 02 '24 22:03 ans-ibrahim

@jbicha Oh... I see... I did my tests in Fedora Rawhide, not in Ubuntu 24.04, and there it works fine. This monday I'll check it in an Ubuntu 24.04.

rastersoft avatar Mar 02 '24 23:03 rastersoft

@jbicha I installed it in a fresh 24.04 system, and it works nearly flawlessly... the only problem is the number of dots when there are several applications.

imagen

sergio-costas avatar Mar 04 '24 10:03 sergio-costas

@jbicha Ok, using the builtin theme, it works...

imagen

sergio-costas avatar Mar 04 '24 10:03 sergio-costas

@jbicha Are you using make clean && make && make install to install the extension?

sergio-costas avatar Mar 04 '24 10:03 sergio-costas