Florian Müllner
363f396365
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 >
(cherry picked from commit 77a11fd9cd )
2025-01-10 14:06:34 +01:00
Florian Müllner
62ccff1558
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 >
(cherry picked from commit 981e8e42e2 )
2025-01-10 14:06:25 +01:00
Florian Müllner
959dc522e7
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 >
(cherry picked from commit 4a841dfd49 )
2025-01-10 14:06:14 +01:00
Florian Müllner
a75f8a7d52
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 >
(cherry picked from commit 8957f488dc )
2025-01-10 14:05:58 +01:00
Florian Müllner
f3144d472a
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 >
(cherry picked from commit e0b68a319e )
2025-01-10 14:05:46 +01:00
Florian Müllner
566e7806b0
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
(cherry picked from commit 568826e489 )
2025-01-10 14:05:25 +01:00
Florian Müllner
084a2ed7c7
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 >
(cherry picked from commit 265935e14b )
2025-01-10 14:04:51 +01:00
Florian Müllner
7f23ccbff7
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 >
(cherry picked from commit 83c41bad30 )
2025-01-10 13:57:20 +01:00
Florian Müllner
c06c33b488
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 >
(cherry picked from commit 253ddb8642 )
2025-01-10 13:39:42 +01:00
Florian Müllner
c290d7ddb3
window-list: Use getter methods for events
...
The underlying structs were made opaque a while ago, so direct
access to the struct fields is no longer possible.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/320 >
(cherry picked from commit da90d365ec )
2024-05-23 13:18:04 +02:00
Florian Müllner
de033a04fa
apps-menu: Set label_actor of Category items
...
Category items are based on BaseMenuItem rather than MenuItem,
so the accessible relationship isn't set up automatically for us.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/319 >
(cherry picked from commit 02ff72b2f0 )
2024-05-23 13:17:57 +02:00
Florian Müllner
38e267ae64
screenshot-window-sizer: Add additional size
...
1000x700 is the maximum recommended screenshot size on flathub[0]. As
that's a primary use case of the extension, it makes sense to include
the size.
[0] https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines/quality-guidelines/#reasonable-window-size
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/317 >
2024-04-20 14:33:40 +00:00
Florian Müllner
6d36da1ce6
system-monitor: Fix net speed
...
We use different formats for values above and below 10, to only
include a fraction for the latter.
However we use the same factor to determine the format and to
compute the number to format, with the result that values above
10 are off by a factor of 10.
Address this by adding a separate "unitFactor" value for computing
the value.
Spotted by Yannick Daveluy.
Closes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/494
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/313 >
2024-03-16 00:50:59 +00:00
Florian Müllner
f6c74e93b7
window-list: Replace Meta.Rectangle
...
It's deprecated in favor of Mtk.Rectangle, which is a drop-in
replacement.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/306 >
2024-02-22 00:02:40 +00:00
Florian Müllner
f53984670c
window-list: Fix menu ornament in workspace indicator
...
The default ornament is now HIDDEN, so in order to align items,
we always have set an initial ornament.
In gnome-shell 46, the expected "counter ornament" to DOT is NO_DOT
rather than NONE, so use that.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/305 >
2024-02-21 00:07:15 +01:00
Florian Müllner
537530707e
workspace-indicator: Fix menu ornament
...
The default ornament is now HIDDEN, so in order to align items,
we always have set an initial ornament.
In gnome-shell 46, the expected "counter ornament" to DOT is NO_DOT
rather than NONE, so use that.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/305 >
2024-02-21 00:01:11 +01:00
Florian Müllner
b00f5c4604
window-list: Fix window previews
...
St.Bin no longer expands its child automatically. Unless do we do
explicitly, the preview actor will be allocated with a size of 0x0.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/304 >
2024-02-19 19:59:54 +01:00
Florian Müllner
a326fa737e
workspace-indicator: Fix window previews
...
St.Bin no longer expands its child automatically. Unless do we do
explicitly, the preview actor will be allocated with a size of 0x0.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/304 >
2024-02-19 19:59:54 +01:00
Florian Müllner
fb52f89cc5
system-monitor: Adjust to renamed .desktop file
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/302 >
2024-02-06 20:47:44 +01:00
Allan Day
86761952c3
apps-menu: Rename Applications to Apps
...
Nowadays people call applications apps, and GNOME uses the latter
term rather than the former.
Closes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/481
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/299 >
2024-02-06 19:40:30 +01:00
Florian Müllner
3e9d648078
apps-menu: Stop using deprecated vscroll-bar property
...
The adjustments are now exposed by the view itself.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/301 >
2024-02-02 19:37:39 +01:00
Florian Müllner
3e398b9a2f
apps-menu: Stop setting scroll policy
...
The defaults are now "automatic" for vertical scrolling and "never"
for horizontal scrolling, so no need to set that explicitly.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/301 >
2024-02-02 19:37:39 +01:00
Florian Müllner
3fb756687b
apps-menu: Remove obsolete code
...
There hasn't been a `passEvents` property on menus since 2011.
Not that it hurts setting it, but it simply doesn't do anything.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/301 >
2024-02-02 19:37:39 +01:00
Florian Müllner
1d7f37f420
system-monitor: Add new extension
...
A long time ago, we used to include a system monitor extension,
that added CPU/memory graphs to the (long gone) message tray.
However demand for this type of extensions hasn't died down, to the
point where RHEL includes a revived version of the old extension.
Account for that demand by adding a newly written system-monitor
extension that has been properly designed, and hopefully does not
bring back the CPU/memory issues of the previous one (unlikely
without the graphs) …
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/277 >
2023-12-04 13:20:13 +01:00
Florian Müllner
30a15387b5
workspace-indicator: Update visibility on window-type changes
...
The visibility depends on the type, so we should listen for
changes (even if the property is unlikely to change).
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/292 >
2023-12-01 19:14:26 +01:00
Florian Müllner
b5b841dd38
workspace-indicator: Don't hide previews on other monitors
...
Workspace thumbnails are clipped, so there's no major benefit
of hiding the actors explicitly.
On the other hand, the check is useful on size/position changes
to avoid unnecessary relayouts.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/292 >
2023-12-01 19:13:42 +01:00
Florian Müllner
5f2b199627
Revert "workspace-indicator: Only initialize preview visibility on map"
...
It is not possible to unmap an actor from within the map vfunc,
so the fix broke the initial visibility again.
This reverts commit 25a75e1b0e .
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/292 >
2023-12-01 19:11:42 +01:00
Florian Müllner
071584621e
window-list: Update visibility on window-type changes
...
The visibility depends on the type, so we should listen for
changes (even if the property is unlikely to change).
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/292 >
2023-12-01 19:10:08 +01:00
Florian Müllner
5c57f44838
window-list: Don't hide previews on other monitors
...
Workspace thumbnails are clipped, so there's no major benefit
of hiding the actors explicitly.
On the other hand, the check is useful on size/position changes
to avoid unnecessary relayouts.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/292 >
2023-12-01 19:09:30 +01:00
Florian Müllner
93741e9e1c
Revert "window-list: Only initialize preview visibility on map"
...
It is not possible to unmap an actor from within the map vfunc,
so the fix broke the initial visibility again.
This reverts commit 8b7cfff558 .
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/292 >
2023-12-01 19:09:30 +01:00
Florian Müllner
836f81f2e2
window-list: Move additional padding into buttons
...
Commit ca1c4b0f9e added additional padding, which means that the
interactive area of buttons no longer extends to the bottom of
the screen.
Address this by moving the new padding into the buttons themselves.
That restores the Fittsability of the bottom bar, without affecting
the cleaner visual appearance.
Close https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/453
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/291 >
2023-12-01 12:34:20 +00:00
Florian Müllner
574638328e
window-list: Clean up stylesheet indent
...
Replaces tabs with spaces.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/291 >
2023-12-01 12:34:20 +00:00
Florian Müllner
5652182fb3
apps-menu: Use customized layout manager to limit height
...
To avoid continuous height changes while browsing through categories,
we let the list of categories determine the overall height, and rely
on scrolling for the list of apps within a category.
We currently achieve this by assigning a fixed height via the
`style` property. This has been found to trigger a crash when
running headless, as we end up querying an actor's height request
before a valid resource scale is available.
Instead, use a custom layout manager, which seems more elegant anyway.
Close: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/472
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/290 >
2023-11-23 21:20:56 +01:00
Florian Müllner
c3cbef19ac
apps-menu: Remove vertical separator
...
Ever since gnome-shell stopped using a stippled separator in the
calendar menu, the styling required by the separator has been
missing.
There haven't been any complaints about the invisible separator,
so we can just as well drop it altogether.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/290 >
2023-11-23 21:15:51 +01:00
Florian Müllner
8c8f990a28
apps-menu: Use stylesheet to set width
...
The `style` property is useful for computed CSS declarations,
but for regular styling the stylesheet is preferable.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/290 >
2023-11-23 21:13:30 +01:00
Florian Müllner
f6a6bdda99
apps-menu: Adjust to events API changes
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/290 >
2023-11-23 14:25:57 +01:00
Florian Müllner
0d5d06fdd7
apps-menu: Adjust to ClutterContainer removal
...
The `actor-added` signal got renamed to `child-added` when
moving it to ClutterActor.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/288 >
2023-11-14 16:26:06 +00:00
Florian Müllner
d10b98c4fc
extensions: Stop using ClutterContainer API
...
The methods have long been deprecated in favor of the equivalent
ClutterActor methods, so use the latter instead.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/288 >
2023-11-14 16:26:06 +00:00
Florian Müllner
8b7cfff558
window-list: Only initialize preview visibility on map
...
The check whether the window overlaps with the monitor the actor
is on requires the actor to be added to the stage first, so delay
the initial visibility update that was added in commit f576f1b1b6 .
Fixes: f576f1b1 ("window-list: Initialize preview visibility")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/286 >
2023-11-08 16:36:59 +00:00
Florian Müllner
25a75e1b0e
workspace-indicator: Only initialize preview visibility on map
...
The check whether the window overlaps with the monitor the actor
is on requires the actor to be added to the stage first, so delay
the initial visibility update that was added in commit b9d2a445b2 .
Fixes: b9d2a445 ("workspace-indicator: Initialize preview visibility")
Closes:
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/469
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/286 >
2023-11-08 16:36:59 +00:00
Florian Müllner
91a1b8245b
window-list: Remove window picker
...
Now that the overview is available again in the classic session,
the window picker that used to replace it is unused.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/287 >
2023-11-07 17:43:18 +01:00
Florian Müllner
dd8ee2931a
screenshot-window-sizer: Handle wrapping around backwards
...
The mod takes care of wrapping at the top, but not when
decrementing 0. Fix this by using Array.prototype.at(),
which handles negative indexes.
Close https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/467
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/284 >
2023-10-24 21:15:06 +02:00
Florian Müllner
f530acbf9e
screenshot-window-sizer: Use built-in support for reversed bindings
...
Mutter has had explicit support for reversed bindings for a while now.
Use that, as it's more reliably than examining the modifiers manually.
Close https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/467
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/284 >
2023-10-24 21:15:06 +02:00
Florian Müllner
fb858ed0e4
window-list: Complete move to connectObject()
...
Commit 3bfaf6f88a removed the explicit disconnect, but forgot
to use connectObject() to connect the handler.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/459
Fixes: 3bfaf6f8 ("js: Use connectObject()")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/281 >
2023-10-09 15:36:39 +02:00
Florian Müllner
f576f1b1b6
window-list: Initialize preview visibility
...
Otherwise we can end up showing window previews in the workspace
thumbnail that shouldn't be visible, if none of the properties we
track for updates changes.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/280 >
2023-09-29 21:35:33 +02:00
Florian Müllner
b9d2a445b2
workspace-indicator: Initialize preview visibility
...
Otherwise we can end up showing windows that shouldn't be visible
if none of the properties we track for updates changes.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/280 >
2023-09-29 21:33:04 +02:00
Florian Müllner
092b268823
drive-menu: Remove left-over signal connection
...
The handler itself was removed in commit 3bfaf6f88a , so the
code now fails.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/455
Fixes: 3bfaf6f8 ("js: Use connectObject()")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/278 >
2023-09-29 12:33:13 +00:00
Florian Müllner
2510bb3625
extensions: Stop using run_dispose()
...
It is considered bad practice, and mainly a lazy way of disconnecting
signal handlers without tracking individual handler IDs.
We can do better by using connectObject(), which provides the same
level of convenience without the dodginess of getting behind the
garbage collector's back.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/275 >
2023-09-26 15:21:41 +00:00
Florian Müllner
f54b96c327
auto-move: Fix signal name
...
The functionality is still broken for wayland windows that use
xdg-activation, because the workspace information from the startup
sequence is handled later.
But at least it's a baby step towards a fix.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/272 >
2023-09-06 00:00:36 +02:00
Florian Müllner
b7f285d733
Make project compatible with Reuse Software spec
...
Provide all licenses used in the project in a LICENSES folder and
add SPDX license and copyright information for all files in
accordance with the Reuse Software[0] specification.
The copyright information is based on the file's git history,
using a fairly generous definition of "non-trivial".
As of the spec recommendation, the information is generally added
as comments in the files themselves, except for
- NEWS, README and similar top-level standard files, so that
a SPDX code isn't the first thing people encounter
- files that don't support comments (json) or where they'd
be a bit awkward (.desktop, .service)
- anything under po/, to not interfere with translation teams
Those are covered by a .reuse/dep5 files, except for image assets,
where separate .license files are used (It would be possible to
add comments to SVG files, but I don't trust image editors to
preserve them).
[0] https://reuse.software/
Part-of:
<https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/224 >
2023-08-17 11:51:48 +00:00