Commit Graph

2319 Commits

Author SHA1 Message Date
Florian Müllner
0de5209cf1 extensions-tool: Add bash completion
Completions are clearly helpful, in particular for extension UUIDs
that are often lengthy strings containing random usernames.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1234
2019-08-21 18:28:02 +02:00
Florian Müllner
07fad38a50 extensions-tool: Add list options
In addition to a plain list of all extensions, add options to display
additional details of each extensions and to filter the list by
enabled state or install location.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1234
2019-08-21 18:28:02 +02:00
Florian Müllner
ac4b88f25d extensions-tool: Implement list command
Seeing at a glance which extensions are installed is surely useful,
so add a corresponding command.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1234
2019-08-21 18:28:02 +02:00
Florian Müllner
23a7aa5740 extensions-tool: Add create options
As we are using git-style command syntax, we can allow for data to be
provided on the command line rather than asking for it interactively.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1234
2019-08-21 18:28:02 +02:00
Florian Müllner
0b1e29e5e3 extensions-tool: Implement create command
This implements more functionality of the existing tool and, as
'reload' is an unreliable feature that doesn't work more often
than not, the last bit that we will replicate.

The command follows the original for the most part, with the most
important difference being the installed template, which doesn't
provide any sample functionality and uses modern JS syntax.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1234
2019-08-21 18:28:02 +02:00
Florian Müllner
c8c93b2a70 extensions-tool: Implement enable/disable commands
This replicates the most basic functionality of the existing
gnome-shell-extension-tool, albeit using a git/gio/gsettings
style command interface rather than plain options; this will
allow us to implement more complex commands that have options
on their own in the future.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1234
2019-08-21 18:28:02 +02:00
Florian Müllner
d8c7cac536 extensions-tool: Start import
The gnome-extensions tool[0] was started as an external project, and
provides a replacement for the existing gnome-shell-extension-tool.
It was decided to ship the tool as part of the gnome-shell repository,
so start importing it with its history into a subdir.

[0] https://gitlab.gnome.org/fmuellner/gnome-extensions-tool

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1234
2019-08-21 18:28:02 +02:00
Jonas Ådahl
16cb918e0d shell-global: Set stage input region via MetaX11Display
The API in mutter changed to set it via MetaX11Display; lets jump on the
train.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/682
2019-08-19 09:20:44 +00:00
Jonas Ådahl
638b315e40 shell-global: Only sync input region if X11 session
We'd do an early out in the called functions eventually anyway.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/682
2019-08-19 09:20:44 +00:00
Florian Müllner
9b7f228f8e src: Stop using g_get_current_time()
It isn't 2k38 safe and has therefore been deprecated. Replace it
with GDateTime or g_get_real_time() as appropriate.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/657
2019-08-09 19:22:18 +00:00
Florian Müllner
5d8ea4f9a3 main: Remove left-over variable
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/657
2019-08-09 19:22:18 +00:00
Georges Basile Stavracas Neto
c0047cd11d shell/app-system: Monitor for icon theme changes
Whenever an app is installed, the usual routine is
to run 'gtk-update-icon-cache' after installing all
of the app's files.

The side effect of that is that the .desktop file of
the application is installed before the icon theme
is updated. By the time GAppInfoMonitor emits the
'changed' signal, the icon theme is not yet updated,
leading to StIcon use the fallback icon.

Under some circumstances (e.g. on very slow spinning
disks) the app icon is never actually loaded, and we
see the fallback icon forever.

Monitor the icon theme for changes when an app is
installed. Try as many as 6 times before giving up
on detecting an icon theme update.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/661
2019-08-08 15:22:44 +00:00
Georges Basile Stavracas Neto
dd9a452594 st/texture-cache: Monitor GtkIconTheme changes
The texture cache, right now, only monitors for
complete theme changes. If the contents of the
icon theme change, however, the texture cache
isn't properly invalidated.

This manifests itself as a randomly reproducible
bug when installing an app; the app icon may be
the fallback forever, or as long as something else
updates the icon theme.

Watch for the GtkIconTheme:changed signal, and
evict the texture cache when the theme changes.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/661
2019-08-08 15:22:44 +00:00
Florian Müllner
72defaa97e st: Use StAdjustment's new transition API
Now that the adjustment itself can be used to track its transitions,
do that for animating the scroll bar handle.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/669
2019-08-07 18:40:47 +02:00
Florian Müllner
9097c5e9c0 st: Add transition API to StAdjustment
StAdjustment implements the ClutterAnimatable interface, so we can
already animate its properties with ClutterPropertyTransitions.

But as it is currently not possible to associate a transition with
an adjustment, it must be owned (and kept alive in case of GC) by
the calling code.

Change that by implementing the same (add|remove|get)_transition() API
as ClutterActor, so we can use a familiar API and even duck typing in
case of javascript.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/669
2019-08-07 18:40:44 +02:00
Florian Müllner
0846238f69 js: Use implicit animations for animatable properties
We now have everything in place to replace Tweener for all animatable
properties with implicit animations, which has the following benefits:

 - they run entirely in C, while Tweener requires context switches
   to JS each frame

 - they are more reliable, as Tweener only detects when an animation
   is overwritten with another Tween, while Clutter considers any
   property change

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22
2019-08-06 23:54:29 +02:00
Florian Müllner
1e6cb43815 shell-app: Consider desktop actions in can_open_new_window()
We currently only consider a remote "app.new-window" action when running,
but not a fixed "new-window" action in the .desktop file. The latter is
clearly useful as well, in particular as open_new_window() already does,
so add it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/665
2019-08-06 15:04:24 +02:00
Benjamin Berg
31968ea53c meson: Avoid using relative paths to po directory
Replace the relative path to the po directory with a toplevel definition
of po_dir and use that instead.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/507
2019-08-05 21:38:51 +00:00
Florian Müllner
12b8fb15b1 st: Move slow-down-factor into settings
Now that we have a Settings singleton, we have a better place for the
slow-down-factor than an awkward extern variable.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/656
2019-08-01 21:13:28 +00:00
Florian Müllner
5295866eff st: Fix property type
Commit 8f3554ff accidentally changed the type of the StWidget:track-hover
property from boolean to object.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1482
2019-08-01 12:44:33 +02:00
Niels De Graef
8f3554ff3e st: Use g_object_notify_by_pspec()
`g_object_notify()` actually takes a global lock to look up the property
by its name, which means there is a performance hit (albeit tiny) every
time this function is called. For this reason, always try to use
`g_object_notify_by_pspec()` instead.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/652
2019-07-31 17:35:03 +00:00
Niels De Graef
28ab1f4af4 Ensure G_PARAM_STATIC_STRINGS for all properties
In `st`, we can do this by using `ST_PARAM_*`. In the other code files,
just use `G_PARAM_STATIC_STRINGS` directly.

This is just a minor convenience to prevent a few unnecessary string
copies.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/646
2019-07-30 13:58:44 +00:00
Niels De Graef
d360114226 st: Cleanup ST_PARAM_* and add WRITABLE version
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/646
2019-07-30 13:58:44 +00:00
Florian Müllner
007d305736 shell: Actually make GLSLEffect an effect
A generic, introspectable Shader effect is not only more flexible
than a shader actor, it will also make it much easier to turn
Lightbox into an actor subclass and replace Tweener with Clutter's
own animation support.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/651
2019-07-29 17:51:14 +02:00
Florian Müllner
ae7ec648b2 shell: Properly rename type
This is just a find-and-replace name change to make the actual code
changes in the follow-up commit more apparent.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/651
2019-07-29 17:51:14 +02:00
Florian Müllner
99a2fad311 shell: Rename GLSLQuad to GLSLEffect
You can guess where this is going ...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/651
2019-07-29 17:51:14 +02:00
Ting-Wei Lan
d9d9778a98 main: Avoid missing braces warnings when compiling with clang
Since -Werror=missing-braces is used, having missing braces warnings
aren't allowed. However, the first member of struct sigaction is a union
whose first member is a pointer, causing clang to produce warnings when
it is initialized to { 0 }.

Instead of initializing to a zero value, we can specify values of
members directly in the initializer to avoid warnings.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/633
2019-07-20 16:45:49 +08:00
Florian Müllner
208c5e9562 shell: Don't use g_memmove()
Glib stopped providing any fallback implementations on systems without
memmove() all the way back in 2013. Since then, the symbol is a simple
macro around memmove(); use that function directly now that glib added
a deprecation warning.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/632
2019-07-19 17:43:56 +00:00
Illya Klymov
55b036170b shell-recorder: Restore cursor recording
Due to changes introduced in 5357e0a1 cursor recording interaction with
magnifier was reversed. This fix restores original correct behavior
Related issue: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1208
2019-07-08 21:08:51 +00:00
Florian Müllner
be40de5a9b st: Consider non-background properties for ::style-changed
st_theme_node_paint_equal() was originally added to preserve paint state
when a style change didn't affect any of StWidget's cached background
resources.
That's why using it for filtering out unneeded style changes as in commit
f662864a misses any non-background related properties that are relevant
for subclasses. Add additional tests to make sure we keep emitting the
signal in those cases.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1212
2019-07-07 21:01:33 +00:00
Florian Müllner
7359e431d3 st: Add st_icon_colors_equal()
This is a small convenience wrapper around clutter_color_equal()
for the different color components, which also handles the case
where one (or both) of the icon colors are %NULL.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1212
2019-07-07 21:01:33 +00:00
Jonas Dreßler
0bdd1b6fc4 st/button: Ungrab device before calling st_button_release
Since priv->device gets set to NULL inside st_button_release, ungrab the
input device before calling st_button_release and avoid
clutter_input_device_ungrab failing with a critical error.

This fixes a regression introduced with
d5a1a888d9

While at it, also remove the superfluous line resetting priv->device to
NULL and move the check for priv->grabbed into an elseif block since
there should be no case where StButton has both grabs at the same time.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/614
2019-07-04 18:25:15 +02:00
Carlos Garnacho
8a22092632 shell: Drop XDND initialization code
Let mutter take over this, and drop this piece of backend-specific
code.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/611
2019-07-03 16:37:15 +02:00
Jonas Dreßler
d5a1a888d9 st: Replace global grabs with input device grabs
Global grabs are being removed from Clutter in favour of input device
grabs, so only grab the input device instead and replace priv->grabbed
with checks for priv->grab_device.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/495
2019-07-02 01:18:15 +00:00
Christian Hergert
751cd2f1c1 main: setup GJS profiler when GJS_TRACE_FD is set
This is the same environment variable that will be used in GJS to auto-
connect Sysprof to the GJS profiler when the gjs binary is used.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/573
2019-06-24 15:05:46 +00:00
Niels De Graef
ccf646f54a Drop CoglError for GError
From https://gitlab.gnome.org/GNOME/mutter/merge_requests/631

```
CoglError was added at a certain point to remove the hard dependency on
GLib, but since this can't be avoided inside mutter, let's remove this
whole abstraction.
```

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/586
2019-06-20 16:30:40 +02:00
Florian Müllner
523ba5a719 shell: Remove shell_global_structured_log()
It is now unused.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/579
2019-06-15 15:26:17 +02:00
Laurent Bigonville
58c4212cfa shell-app: Fix spelling error
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1205
2019-06-15 12:08:40 +02:00
Florian Müllner
d8825e0d12 shell: Stop using anchor point
Since the removal of the old (pre-3.16) message tray, legacy tray icons
are very unlikely to be placed in a container that is animated using the
deprecated anchor point.

Just assume that the regular stage position is good enough.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/572
2019-06-05 17:59:51 +00:00
Florian Müllner
3c5fea59df st: Stop using (deprecated) ClutterAnimation
Instead, make StAdjustment a ClutterAnimatable and use a property
transition.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/572
2019-06-05 17:59:51 +00:00
Olivier Fourdan
443c8347ea locatePointer: Add implementation in gnome-shell
The "locate pointer" functionality was implemented in gnome settings
daemon using X11 protocols and would fail when run under Wayland.

With Wayland, there is no global coordinate space exposed to the clients
so this functionality cannot be implemented as a separate program.

Instead, add the "locate pointer" functionality in gnome-shell so that
it works in both X11 and Wayland.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/981
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/413
https://gitlab.gnome.org/GNOME/mutter/merge_requests/453
https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/merge_requests/19
https://gitlab.gnome.org/GNOME/gnome-settings-daemon/merge_requests/86
2019-06-05 08:15:10 +00:00
Cosimo Cecchi
12bace2721 shell-global: don't warn when unsetting non-existent state
If the state we're trying to delete does not exist, do not log an
error.
Prevents this journal warning at startup:

gnome-shell[1082]: Could not delete runtime/persistent state file: Error removing file /run/user/1000/gnome-shell/runtime-state-LE.:0/screenShield.locked: No such file or directory

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/555
2019-05-27 08:36:17 -07:00
Cosimo Cecchi
2c45b5416e keyring-prompt: relax NULL check in remove_mnemonics()
Instead of considering a GValue containing a NULL string to be a
programmer error, simply return NULL.
remove_mnemonics() is in fact called on the value of the
"choice-label" property as well, which has NULL as its default
value.

This prevents triggering the following gnome-shell warning:

gnome-shell[1082]: remove_mnemonics: assertion 'label != NULL' failed

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/555
2019-05-27 08:36:11 -07:00
Carlos Garnacho
dd5d7d3b70 shell: Only initialize global->xdisplay on X11 compositors
This is just used to set up things that are relevant to X11 compositors
(XDND, XFixes input region). We can live with it unset on the wayland
compositor cases.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/378
2019-05-24 12:24:06 +02:00
Carlos Garnacho
771b1a0788 shell: Do not set XFixes input region on wayland compositors
This is just needed on the X11 compositor, wayland compositors are known
for handling their own input.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/378
2019-05-24 12:24:06 +02:00
Carlos Garnacho
5a9d094f3e shell: Use MetaDisplay input focus API
Replaces use of (now removed) MetaX11Display focus API (which happened to
work for wayland too).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/378
2019-05-24 12:24:06 +02:00
Milan Crha
bd4aac8f49 calendar-server: Port to libecal-2.0
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/501
2019-05-17 20:24:08 +00:00
Florian Müllner
785dd5c5f7 Revert "calendar-server: Port to libecal-2.0"
This reverts commit 71e469a59c.
2019-05-17 22:23:43 +02:00
Milan Crha
71e469a59c calendar-server: Port to libecal-2.0
Port the calendar-server code to work with the latest evolution-data-server
API changes.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/501
2019-05-17 22:17:07 +02:00
Marco Trevisan (Treviño)
54039c3552 st: Introspect ScrollViewFade to read fade properties
Util.ensureActorVisibleInScrollView takes care of the potential scroll view fade
effect in order to compute the scroll offset, reading the ScrollViewFade's
`vfade-offset` property. This was correctly working until gnome 3.30 cycle.
However such property isn't defined now because since gjs 1.54, it can only
fetch introspected properties and St.ScrollViewFade was considered a private API
not exposed by gir.

Fix this by also introspecting st-scroll-view-fade sources.
Not being considered private anymore, install the header.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1061
2019-05-15 15:15:31 -05:00