As part of Zorin OS's move to a Gnome Shell-based desktop environment, we have created a Windows-like icon taskbar extension for the Gnome Shell panel with window previews ([login to view URL]). However, there are 2 issues with it that need to be fixed in this job:
1)
Sometimes when switching between apps (either by pressing on the Taskbar icons and otherwise), the mouse and keyboard focus isn't on the activated window. Users must minimize the window and unminimize it again in order to be able to interact with it (clicking on the window doesn't work).
We've noticed that this only happens when the Window Previews in the Taskbar extension are enabled. We believe that the issue might be related to switching the keyboard/mouse focus to the Window Preview. However this issue seems to only happen before the timeout completes to display the Window Preview.
2)
We've noticed on some occasions that the following line appears in the debug logs ($ gnome-shell --replace) when running the Window Previews in Taskbar (the work ID number varies):
(gnome-shell:7750): Gjs-WARNING **: JS ERROR: Invalid work id 41: Error: Invalid work id 41
queueDeferredWork at resource:///org/gnome/shell/ui/[login to view URL]
thumbnailPreviewList<._queueRedisplay at /usr/share/gnome-shell/extensions/zorin-taskbar at [login to view URL]:456
wrapper AT resource:///org/gnome/gjs/modules/[login to view URL]
Although we are aware that some of the queues (eg. [login to view URL]) in the [login to view URL] file are the sources of the errors, we are unsure about how to stop these errors from occurring. Removing the queues and running the functions directly on the calls result in some of the required functionality not working.
The source code is available at [login to view URL]
The Zorin OS 12 Beta is the first system to use the Zorin Taskbar extension natively. In order to get a fully set-up environment, you can download the Zorin OS 12 Beta from here: [login to view URL]