671 Commits

Author SHA1 Message Date
Florian Müllner
1e44941db6 drive-menu: Remove unused style class
The .single-indicator class was added to add extra spacing to
lone top bar items when removing the arrows, but dropped again
after solving the extra spacing differently.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/161>
2021-02-24 00:45:58 +00:00
Florian Müllner
f71da9e843 window-list: Replace WorkspaceBackground as well
The shell now scales down the backgrounds and adds a rounded corner
clip. Undo both those changes with another override.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/160>
2021-02-24 01:24:11 +01:00
Florian Müllner
1b4a20a8af window-list: Replace Workspace prototype
This is arguably more elegant than injecting into individual methods, and
will be consistent with an upcoming override that cannot be implemented
as method injection.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/160>
2021-02-24 01:24:11 +01:00
Florian Müllner
d8e179ed09 window-list: Adjust to OSK changes
Visibility changes are now handled internally, without an easy way
for us to hook into. We can resort to a hack though, as the gesture
action to bring up the keyboard is only enabled while the keyboard
is hidden.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/160>
2021-02-24 01:24:11 +01:00
Florian Müllner
9fa522c29a window-list: Adjust to overview changes
The overview code changed significantly, including the bits we re-use
to implement the window picker in the classic session. Adjust to those
changes to unbreak the extension.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/159>
2021-02-12 02:20:20 +01:00
Florian Müllner
d7c8a5d193 extensions: Remove horizontal-workspaces extension
Workspaces are now horizontal by default, so we don't need to change
the layout for classic mode anymore.

That was the only reason why the extension was added, so it has now
outlived its usefulness.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/158>
2021-01-29 16:09:59 +00:00
Michael Lawton
0d8d6dceb0 places-menu: Mark mounts that can be unmounted as removable
While the eject() code falls back to unmount() for mounts that
don't support ejecting, it's not possible to actually do so
because we hide the eject button.

Fix this by treating all mounts as removable that can either be
ejected or unmounted.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/152>
2021-01-28 12:25:26 +01:00
Daniel van Vugt
8a5e793b3d auto-move-windows: Don't move windows already on all workspaces
This fixes a particular case of mutter#992.

Although gnome-shell will also be softened to not crash in future, it's
also a good idea for the extension to explicitly decide how it wants to
handle windows that are already on all workspaces.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/157>
2021-01-28 16:33:50 +08:00
Florian Müllner
ac2ed286e1 extensions: Remove arrows from top bar menus
... following the corresponding gnome-shell change.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3567

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/156>
2021-01-26 16:59:43 +01:00
Florian Müllner
3c3c1f702d window-list: Add tooltips to workspace thumbnails
When showing previews instead of the menu, the workspace names
don't appear anywhere. Some users care strongly about those, so
expose them as tooltip on hover.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/155>
2021-01-20 23:58:13 +01:00
Florian Müllner
c33be29f56 workspace-indicator: Add tooltips to workspace thumbnails
When showing previews instead of the menu, the workspace names from
our preferences don't appear anywhere. Some users care strongly about
those, so expose them as tooltip on hover.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/155>
2021-01-20 23:58:13 +01:00
Florian Müllner
d8ae2dcba2 window-list: Drop height override
gnome-shell's top bar got taller, and is now just 1px smaller than
our size override. We don't need that additional pixel to fit our
UI, so remove the override to make the sizes of both bars consistent.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/154>
2021-01-18 22:43:52 +01:00
Florian Müllner
d381a0b89b auto-move-windows: Use Gtk.Button.icon_name property
Image buttons are a very common pattern, so GTK4 added some
convenience API we can use to construct them.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/148>
2021-01-14 14:40:55 +01:00
Florian Müllner
5df0fa145b workspace-indicator: Use Gtk.Button.icon_name property
Image buttons are a very common pattern, so GTK4 added some
convenience API we can use to construct them.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/148>
2021-01-14 14:40:55 +01:00
Florian Müllner
f0ff0e1400 workspace-indicator: Stop using header func for separators
GTK4 added built-in support for this common pattern, so use that
instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/148>
2021-01-14 14:40:55 +01:00
Florian Müllner
53f5a92dc8 user-theme: Stop using header func for separators
GTK4 provides built-in support for this common pattern, so use
that instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/148>
2021-01-14 14:40:55 +01:00
Florian Müllner
d5c31273ee auto-move-windows: Stop using header func for separators
GTK4 added built-in support for this common pattern, so use that
instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/148>
2021-01-14 14:40:55 +01:00
Florian Müllner
22ea58a849 workspace-indicator: Port to GTK4
With this port, all extensions now use GTK4 for their preferences.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/148>
2021-01-14 14:40:55 +01:00
Florian Müllner
67d96993ce auto-move-windows: Port to GTK4
Just like the previous ports, this consists mostly of
replacing the old Gtk.Container methods.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/148>
2021-01-14 14:40:55 +01:00
Florian Müllner
96dd4f9835 window-list: Port to GTK4
Another easy port:
 - replace Gtk.Container methods
 - stop using show_all()
 - Gtk.CheckButton now provides the
   Gtk.RadioButton functionality as well

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/148>
2021-01-14 14:40:55 +01:00
Florian Müllner
3bef6be7c1 user-theme: Port to GTK4
With the previous preparations in place, the actual GTK4 port is
now trivial:
 - replace Gtk.Container methods with widget-specific methods
 - stop using show_all()

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/148>
2021-01-14 14:40:55 +01:00
Florian Müllner
b83d38a72e user-theme: Track GSettings to sync checkmark
GTK4 removes the generic GtkWidget API for accessing an inserted
action group, so we need an alternative for tracking the currently
selected theme.

Using the underlying GSettings object looks like the easiest option,
so do that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/148>
2021-01-14 14:40:54 +01:00
Florian Müllner
5b73960f34 extensions: Stop using :margin shortcut
The property has been removed in GTK4, so prepare for a port by
setting the four individual margin properties instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/148>
2021-01-14 14:40:54 +01:00
Florian Müllner
50d3ee5703 workspace-indicator: Use overlap to determine preview visibility
In order to better reflect the actual workspace, show any preview
that is at least partially located on the monitor, not only those
that have the major part on that monitor.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/142>
2020-12-02 19:27:44 +01:00
Florian Müllner
08dfb78815 window-list: Use overlap to determine preview visibility
In order to better reflect the actual workspace, show any preview
that is at least partially located on the monitor, not only those
that have the major part on that monitor.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/142>
2020-12-02 19:22:51 +01:00
Florian Müllner
6949a5d075 workspace-indicator: Account for monitor offset in window previews
Windows' frame rects are in screen coordinates, while the workspace
thumbnails are based on the monitor work area. Unless we account
for the difference, previews end up mispositioned in multi-monitor
setups.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/142>
2020-12-02 19:22:12 +01:00
Florian Müllner
893d3b0473 window-list: Account for monitor offset in window previews
Windows' frame rects are in screen coordinates, while the workspace
thumbnails are based on the monitor work area. Unless we account
for the difference, previews end up mispositioned in multi-monitor
setups.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/142>
2020-12-02 19:20:08 +01:00
Florian Müllner
f5128e13f2 workspace-indicator: Round calculated preview sizes
While not strictly necessary, there's no reason to differ from the
copy in the window-list extension ...

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/142>
2020-12-02 19:17:36 +01:00
Ray Strode
8318ea919f window-list: Stop monitoring drag operation if window list is destroyed
If a user is in the middle of a drag in the window list and the
window list associated with the drag gets destroyed, the drag
monitor gets leaked.

Later when the drag motion is processed, spew goes to the log:

clutter_actor_contains: assertion 'CLUTTER_IS_ACTOR (self)' failed

Examples of triggers for this bug:

- The monitor topology changes
- The screen gets locked during the drag

This commit fixes the spew and the leak by ensuring any pending
drag monitoring is disabled when the window lists are destroyed.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/145>
2020-11-25 17:48:21 +00:00
Thun Pin
737c897624 window-navigator: Adjust to 3.38 overview changes
gnome-shell's overview code changed significantly in 3.38,
adjust the extension to work without the separate overlay.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/259
2020-11-18 23:54:18 +00:00
Florian Müllner
ba7e3fc0b5 cleanup: Remove empty leading/trailing lines in blocks
gjs added a new rule to its eslint ruleset that forbids "block padding",
so make sure we conform to that rule before syncing up the configuration.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/137
2020-11-14 00:58:52 +01:00
Florian Müllner
61cf679b8c auto-move-windows: Exclude sticky windows from empty-check
We modify gnome-shell's workspace tracker to only remove empty
workspaces from the end. However we currently don't take into
account that sticky windows appear on all workspaces, so those
are preventing any workspace from getting removed at the moment.

Exclude them when determining whether a workspace is empty to
get the expected behavior.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/135
2020-11-13 23:53:49 +00:00
Florian Müllner
6ed1f45ffd window-list: Use custom layout manager for thumbnails
The current code positions window previews explicitly using a fixed
layout manager. For that it relies on a valid parent allocation,
which is error-prone and frequently results in warnings.

Address this by moving the positioning code into a custom layout
manager, and only update the visibility from the window preview.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/260
2020-10-21 03:09:45 +02:00
Florian Müllner
81be1d2e2f workspace-indicator: Use custom layout manager for thumbnails
The current code positions window previews explicitly using a fixed
layout manager. For that it relies on a valid parent allocation,
which is error-prone and frequently results in warnings.

Address this by moving the positioning code into a custom layout
manager, and only update the visibility from the window preview.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/260
2020-10-21 03:09:40 +02:00
Florian Müllner
52abf74088 window-list: Adjust to overview changes
Window DND in the overview is now based on the metaWindow,
not the window actor (misnamed as "real window").

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/133
2020-10-21 01:05:07 +00:00
Florian Müllner
623bc6dbf3 workspace-indicator: Adjust to overview changes
Window DND in the overview is now based on the metaWindow,
not the window actor (misnamed as "real window").

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/133
2020-10-21 01:05:07 +00:00
Sergio Costas
b65f362f0d window-list: Honor changes in skip-taskbar property
Although window-list checks the 'skip-taskbar' property when a
window is added to the desktop to decide wether it should be
shown in the bar or not, it doesn't honor that when the property
is changed after a window has already been added. Since the new
WaylandClient API allows to change this property for already
mapped windows, supporting this is a good idea.

This patch fixes this.

Fix https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/130
2020-10-08 23:42:21 +02:00
Florian Müllner
eff625fcb8 native-window-placement: Adjust to gnome-shell changes
The extension was affected pretty badly by the window picker overhaul;
adjust to all(?) the major and minor changes to get it to work again.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/124
2020-07-07 17:39:36 +02:00
Florian Müllner
3742f79d4b window-list: Adjust to gnome-shell changes
The window picker saw a significant overhaul. Amazingly the adjustments
necessary are relatively small ...

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/124
2020-07-07 17:31:52 +02:00
Florian Müllner
b6a3503f5e window-list: Remove some dead code
Since PanelMenu.Button started to inherit from St.Widget, the custom
_allocate() function isn't called anymore.

Simply changing the function to vfunc_allocate() doesn't work as other
changes happened in the meantime, so for now just remove it altogether.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/124
2020-07-07 17:31:52 +02:00
Florian Müllner
aeaba3f379 window-list: Replace removed Clutter.BoxLayout method
The method was deprecated for years and has finally been removed.
Just set appropriate expand/align properties on the children and
add them with the usual add_child() method.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/122
2020-05-28 02:46:06 +02:00
Florian Müllner
f96943a4dc window-list: Replace allocation-changed signal
It has been removed in favor of notify::allocation.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/122
2020-05-28 02:46:06 +02:00
Florian Müllner
60ad2e37ff window-list: Stop using obsolete StBin properties
Those properties were deprecated (and made no-ops) last cycle, and
have now been removed altogether.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/122
2020-05-28 02:46:06 +02:00
Florian Müllner
8c53fd9590 workspace-indicator: Stop using obsolete StBin properties
Those properties were deprecated (and made no-ops) last cycle, and
have now been removed altogether.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/122
2020-05-28 02:46:06 +02:00
Florian Müllner
9db7b96f24 window-list: Modernize preference dialog a bit
The current widget uses UI patterns that are reminiscent of GNOME 2.
It doesn't take a lot to make it look more modern: Simply giving the
radio group a distinct background and border allows us to move the
whole UI to the center, making the dialog more balanced and visually
pleasing.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/121
2020-05-03 19:51:24 +02:00
Florian Müllner
c87cfc822a auto-move: Overhaul preference dialog
auto-move uses the same outdated UI pattern as workspace-indicator did
until commit 90d3c5c51d, imposing the same problems for a future GTK4
port.

So replace treeview and toolbar with an editable list like we did for
the other extension.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/121
2020-05-03 19:51:24 +02:00
Florian Müllner
ac937b9549 user-theme: Make rows non-selectable
A row has to be activated to select a theme, not merely selected.
The selection therefore doesn't do anything, so disable it.
2020-04-29 21:44:13 +02:00
Florian Müllner
5b2bdd138a user-themes: Support session mode styles
Session mode stylesheets are installed in gnome-shell's theme
directory instead of a subdirectory of the global themes direc-
tory.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/118
2020-04-17 16:33:03 +00:00
Florian Müllner
90d3c5c51d workspace-indicator: Overhaul prefs widget
Inline toolbars are an outdated UI pattern, and both the toolbar widget
and the inline styling have been removed from GTK4. Making sure the
extension doesn't get in the way of a future GTK4 port is a good excuse
for modernizing the UI, so do just that :-)

Replace treeview and toolbar with an editable list as outline in the HIG:
https://developer.gnome.org/hig/stable/lists.html.en

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/120
2020-04-17 17:54:15 +02:00
Milan Crha
b00e531626 window-list: Invalid current mode selected in Preferences
It seems that gtk+ resets the active radio whenever a new radio button
is added into the group, thus rather restore the current mode after
the group is fully populated.

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/119
2020-04-17 09:37:13 +02:00