889 Commits

Author SHA1 Message Date
Daniel Buch Hansen
bf84e5d58f windowsNavigator: Adjust to get_key_focus() changes in Clutter
Clutter.Stage.get_key_focus() now always returns the value of
the Clutter.Stage.keyFocus property, whereas previously it
would return the stage itself when no explicit focus was set.

Adjust the code accordingly.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/561
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/395>
(cherry picked from commit e06b1e8236)
2025-05-23 19:09:21 +02:00
Stuart Hayhurst
27d463f572 meta: Correct case and styling for "Launch new instance" and "windowNavigator"
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/392>
2025-03-15 15:31:02 +00:00
Victor Kareh
f4e044b4fe apps-menu: Scroll application into view when active
When an ApplicationMenuItem becomes active, scroll the application
scroll box so that it becomes visible. This stopped working when the
gnome-shell API changed from getActive()/setActive() to the active
GObject property.

Closes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/562

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/391>
2025-03-13 18:56:07 -04:00
Florian Müllner
3b4e241b26 apps-menu: Stop tracking icon-theme changes
St.Icon already tracks theme change, so this is no longer necessary.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/390>
2025-03-13 22:46:51 +01:00
Florian Müllner
29d11e5879 screenshot-window-sizer: Adjust to mutter change
Mutter no longer hides the `event` parameter in Meta.KeyHandlerFuncs,
so update the function to account for the additional parameter.

Closes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/559

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/388>
2025-03-03 16:18:52 +01:00
Florian Müllner
aa5df48c45 apps-menu: Set BoxLayout orientation
Use the new `orientation` property instead of `vertical`, as the
latter is deprecated.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/380>
2025-01-27 20:02:36 +01:00
Florian Müllner
3929dd86bc workspace-indicator: Set BoxLayout orientation
Use the new `orientation` property instead of `vertical`, as the
latter is deprecated.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/380>
2025-01-27 20:02:36 +01:00
Florian Müllner
01f7df1e8a window-list: Use correct params when re-tracking chrome
Since commit 981e8e42, we temporarily untrack the window-list actor
while in the overview.

However as we don't pass pass the chrome parameters when re-tracking
chrome, the window-list no longer contributes to struts or tracks
fullscreen changes, whoops.

Make sure to pass the original parameters when re-tracking chrome
to restore the expected behavior.

Fixes: 981e8e42 ("window-list: Untrack chrome while in overview")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/550
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/379>
2025-01-15 12:39:22 +01:00
Florian Müllner
83c41bad30 places-menu: Remove left-over modeline
This one slipped through commit 253ddb864 ...

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/370>
2025-01-10 13:40:03 +01:00
Florian Müllner
2a45d8c145 window-list: Add attention indicator
Some X11 clients still rely on the traditional urgent/demand-attention
hints instead of notifications to request the user's attention.

Support these by adding a visual indication to the corresponding
buttons, based on the visual indicator in libadwaita's tabs.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/543
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/366>
2025-01-08 12:46:37 +00:00
Florian Müllner
77a11fd9cd workspace-indicator: Do not only exclude DESKTOP windows
There are other window types that should be excluded from workspace
previews, including more common ones like menus. Instead of checking
for a variety of window types, delegate the decision to mutter by
checking for the `skip-taskbar` property.

(The internal `skip-pager` property would be more apt in this case,
but as it only differs from `skip-taskbar` for X11 clients that
explicitly set one and not the other, it shouldn't matter in practice)

Closes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/537
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/363>
2024-12-04 22:20:45 +00:00
Florian Müllner
981e8e42e2 window-list: Untrack chrome while in overview
The window list is set up to track the monitor's fullscreen state.
Monitors are never considered in fullscreen while showing the overview,
so if shell's layout manager updates the fullscreen visibility after
we hid the bottom bar, it ends up being visible in the overview.

To avoid this, untrack the actor while the overview is visible.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/509
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/364>
2024-12-03 12:28:06 +01:00
Florian Müllner
4a841dfd49 window-list: Fix disconnecting window signals in context menu
Menus are not actors themselves, so they are not "destroyables" in
terms of automatic signal disconnection, with the result that we
currently leak window signals.

Fix this by using the menu's actor as tracked object, so the signals
are disconnected automatically when the actor is destroyed.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/474
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/362>
2024-12-02 13:10:50 +01:00
Florian Müllner
8957f488dc places-menu: Update fake mount operation source
gnome-shell now checks for an associated drive to automatically
cancel the operation on disconnect, so fake the corresponding
method. While at it, drop the `get_icon()` method that hasn't
been used for quite a while now.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/508
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/361>
2024-11-30 14:56:27 +01:00
Florian Müllner
e0b68a319e places-menu: Catch errors during async operation
Uncaught errors in async functions don't provide a good stack, because
the unhandled promise rejection masks the error that triggered it.

While we already handle *expected* errors inside the function, make
sure we catch all errors to get useful stack information for unexpected
errors as well.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/361>
2024-11-30 14:48:10 +01:00
Florian Müllner
3f1aa9f221 screenshot-window-sizer: Mention shortcut in description
Loosely based on the README entry, so users know how to actually use the
extension.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/541
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/358>
2024-11-25 14:37:37 +00:00
Florian Müllner
568826e489 places-menu: Inherit from PopupImageMenuItem
PopupImageMenuItems used to position the icon after the label,
so we ended up with our own icon+label items.

However the icon position was changed years ago in the shell, so
inherit from PopupImageMenuItem instead.

This does not only simplify the code a bit, but also pulls in
features we are currently missing, like a11y labelling.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/542
2024-11-19 16:00:31 +01:00
Florian Müllner
265935e14b cleanup: Use consistent line break style in meson.build
Either have all arguments on the same line, or have a separate
line for every argument (that is, don't special-case the first
arg).

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/353>
2024-10-20 22:23:28 +00:00
Florian Müllner
253ddb8642 extensions: Remove modelines
We already include an .editorconfig that is supported by many
editors, including emacs, so no need to repeat an emacs-specific
modeline in every source file.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/353>
2024-10-20 22:23:28 +00:00
Florian Müllner
46a4fa0976 cleanup: Use null for nick/blurb in ParamSpecs
As they are only used by gstreamer for gst-inspect & other tools.
Projects like mutter and gtk have already completely dropped them,
so follow their lead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/347>
2024-10-17 22:52:17 +02:00
Florian Müllner
a81f4f4885 places-menu: Add nautilus-specific items
Both the "Starred" and "Network" locations are internal to nautilus
and not exposed to gvfs.

We can still support them by opening them explicitly in nautilus,
so add corresponding places if nautilus is installed and set up
as default file manager.

After this change, the list of places should be consistent with
the sidebar in the file manager again.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/522
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/340>
2024-10-16 14:38:09 +00:00
Florian Müllner
8a62e491a8 places-menu: Add "Trash" item
While much less prominent then "Recent", let's include it for
consistency with nautilus.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/340>
2024-10-16 14:38:09 +00:00
Florian Müllner
8da874355c places-menu: Add "Recent" item
Recent files are much more prominent in Nautilus nowadays, so it makes
sense to include it in the list of places.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/340>
2024-10-16 14:38:09 +00:00
Florian Müllner
f0e7358de4 places-menu: Stop sorting special locations
Nautilus uses a fixed order rather than sorting items alphabetically,
so do the same.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/340>
2024-10-16 14:38:09 +00:00
Florian Müllner
c4e344f1d7 places-menu: Drop user-special dirs
Nautilus no longer special-cases user directories, and instead
added them to the default bookmarks, so the user can customize
which they want to have displayed.

We already show bookmarked places, so just dropping the hard-coded
list gives us the same locations as nautilus.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/340>
2024-10-16 14:38:09 +00:00
Florian Müllner
411da924a7 places-menu: Drop root location
Nautilus no longer exposes it, so stop including it here as well.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/340>
2024-10-16 14:38:09 +00:00
Florian Müllner
60f30c5bbe places-menu: Drop network item
Nautilus replaced its support for the `network:///` scheme with
an internal network view. The former now shows as empty folder,
so drop it from the list of places.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/340>
2024-10-16 14:38:09 +00:00
Florian Müllner
1506a730c5 places-menu: Use Gio.File to check for equality
Strings may be different, but still refer to the same file
('/home/user' vs. '/home/user/', or even '/home/user/./').

Account for that by comparing files for equality rather than
paths.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/340>
2024-10-16 14:38:09 +00:00
Florian Müllner
527ce99851 places-menu: Remove superfluous error handling
None of the constructors checks whether the file exists, so
there is no reason to check for `NOT_FOUND` errors.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/340>
2024-10-16 14:38:09 +00:00
Florian Müllner
51ce4981c8 window-list: Add workspaces page to prefs
This brings back the workspace-previews setting, and adds the
ability to change the workspace names.

Given that those names are used as tooltips or preview titles,
it makes sense to allow editing them from the extension prefs
rather than relying on external tools (like dconf-editor).

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/344>
2024-10-16 14:36:32 +02:00
Florian Müllner
63ea38a16d window-list: Remove workspace-previews setting from prefs
We are about to include the workspace prefs page from the
workspace-indicator extension, which already includes
the setting.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/344>
2024-10-16 14:36:32 +02:00
Florian Müllner
3bc06bb78f window-list: Set title and icon on prefs page
Like the workspace prefs page, the existing window list prefs
should set title and icon for the view switcher.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/344>
2024-10-16 14:36:32 +02:00
Florian Müllner
832cf0fc84 workspace-indicator: Set title and icon on prefs page
The window-list extension will add the workspace prefs as
additional page, so it needs a title and icon for the
view switcher.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/344>
2024-10-16 14:36:32 +02:00
Florian Müllner
fc265fbe59 workspace-indicator: Don't mention "top bar" in prefs
The preferences will be shared with the window-list extension,
so avoid mentioning a specific placement.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/344>
2024-10-16 14:36:32 +02:00
Florian Müllner
1459e3d6f9 workspace-indicator: Use Adw.EntryRow for workspace rows
Entries in lists are tricky, so best stick with default
patterns provided by libadwaita than rolling our own.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/344>
2024-10-16 14:36:32 +02:00
Florian Müllner
e6bc9fc2fc workspace-indicator: Use Adw.ButtonRow for new-item row
libadwaita added a dedicated widget for button rows, so let's
use that instead of rolling our own. While at it, promote the
accessible label to the (visible) title to be more in line with
current design patterns.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/344>
2024-10-16 14:36:32 +02:00
Florian Müllner
2b4db8095e workspace-indicator: Split out workspaces prefs page
The window-list extension already uses the extension code for
its embedded workspace indicator, this will allow it to do the
same for the preference page.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/344>
2024-10-16 14:36:32 +02:00
Florian Müllner
fa3f9bcaee window-list: Save and restore positions as runtime state
While it doesn't make sense for window list positions to be truly
persistent like dash items, some persistence is desirable.

Otherwise any manually set position is lost when the extension
is disabled, for example when locking the screen.

To address this, serialize the positions as runtime state on drop,
and restore them when populating the list.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/338>
2024-10-16 12:19:52 +00:00
Florian Müllner
3f660ee973 window-list: Add id property to buttons
A string ID that uniquely identifies a button will allow to
serialize/deserialize the positions in the next commit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/338>
2024-10-16 12:19:52 +00:00
Florian Müllner
f87a25e913 window-list: Handle DND events near the drop target
Even with the previous change, the dragged actor has the tendency
of obscuring the possible drop target. To alleviate this, handle
DND events near drop targets as if they occurred on the target.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/338>
2024-10-16 12:19:52 +00:00
Florian Müllner
228811b873 window-list: Shrink drag-actor size during drags
Like the previous commit, this helps with putting the focus on
the target location instead of the dragged item.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/338>
2024-10-16 12:19:52 +00:00
Florian Müllner
9b34ac1eea window-list: Fade out drag source during drag
During a drag operation, the focus is on the where to drop the dragged
item, not to identify it or its origin.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/338>
2024-10-16 12:19:52 +00:00
Jakub Steiner
a725361fc9 window-list: Indicate drop target more prominently
The drop target is the main focus of the drag operation, so make
its styling more prominent.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/338>
2024-10-16 12:19:52 +00:00
Florian Müllner
3461a0523c window-list: Allow rearranging window buttons
We currently sort buttons by the stable sequence to get a persistent
and predictable order. However some users want to customize that
order, and rearrange the buttons as they see fit.

Support that use case by implementing drag-and-drop behavior based
on the overview's dash.

Closes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/4

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/338>
2024-10-16 12:19:52 +00:00
Florian Müllner
911387bc49 window-list: Rename XDND related methods and props
The window list buttons themselves will become draggable, so
include "xdnd" in the existing drag handling to disambiguate
it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/338>
2024-10-16 12:19:52 +00:00
Florian Müllner
93a75dccd7 window-list: Split out _createTitleActor() hook
This will allow creating a suitable drag actor that matches the
current title. In particular this allows for a drag actor that
isn't based on `ClutterClone`, and therefore doesn't inherit
focus/active/minimize/etc. styles that don't make sense outside
the actual window list.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/338>
2024-10-16 12:19:52 +00:00
Florian Müllner
763d66b827 window-list: Add TitleWidget:abstract-label property
When true, the real label is replaced by a more abstract
representation. When used as drag actor, the focus is not
on identifying the window/app, but about picking a drop
location, and the reduced style helps with that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/338>
2024-10-16 12:19:52 +00:00
Florian Müllner
3c325c1562 window-list: Split out common TitleWidget class
Both app- and window title use the same structure, so add a shared
base class.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/338>
2024-10-16 12:19:52 +00:00
Florian Müllner
dba3de2a8e window-list: Split out some common code
Adding an app button and adding a window button involves some
shared steps, move those to a shared `_addButton()` method.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/338>
2024-10-16 12:19:52 +00:00
Florian Müllner
f1671bc206 window-list: Remove outdated style
A long time ago, the window list used to embed the bottom message
tray, which caused notifications to inherit the window-list's
font style.

Since that's no longer the case, we have no business in messing
with notification styling, so stop doing that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/338>
2024-10-16 12:19:52 +00:00