The AnimatedIcon does not have an API for controlling the animation but
relies on the :visible property changes to start and stop a timeout used
to update the frame.
This has the inconvenient of having a side effect when visible is set to
true multiple times, and is not really the API expected from such
component. Also, there is a race if it is displayed before the images
are loaded: there is no child yet and thus we get this._frame = NaN
which leads to a crash.
Switch to a play/stop API instead, and add a load event callback to the
TextureCache.load_slice_image to exactly know when we can start using
the images.
https://bugzilla.gnome.org/show_bug.cgi?id=687583
We are currently using a hack to allow a select set of keybindings
in the overview. Implement the new MetaPlugin keybinding_filter
hook, which provides a cleaner way to achieve the same.
https://bugzilla.gnome.org/show_bug.cgi?id=688202
It appears to be somewhat common for st_widget_style_changed() to be
called when no style-relevant attributes have, in fact, changed. Now that
we cache theme nodes, we're likely to get the same theme node back from
the cache. If we do, we don't need to waste time asking whether its
geometry and painting are equal to itself: we can just note that nothing
really changed and get on with our lives.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687465
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
If you copy a theme node's paint state into itself, it should be an
inexpensive no-op. What actually happened was that we destroyed the
old paint state, re-initialized to blank, then copied the blank state
back into itself. In the process, we lost (for instance) the textures
for rounded corners.
Until I introduced the texture cache, this never actually happened,
because when st_widget_recompute_style() calls st_widget_get_theme_node(),
we'd always get a fresh theme node. Now, we get a theme node T back
from the cache, notice that paint_equal(T, T) is true, short-circuit
slightly by copying its drawing state into itself, and destroy drawing
state that we still needed.
I'm going to fix this in recompute_style() too, but as a general
principle, self-assignment ought to be harmless.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687465
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Because we calculate and cache CSS properties once per StThemeNode,
and only a certain set of attributes can affect the CSS properties,
it's advantageous for as many widgets as possible to share a single
StThemeNode. Similarly, if a widget changes state and then changes back
(e.g. gaining and losing the :hover pseudo-class), it should ideally
get its original StThemeNode back again when it returns to the old
state.
Here, I'm using the StThemeContext as the location for a cache.
StThemeNodes are currently never freed: this seems OK for Shell's usage
(a finite number of IDs, classes, pseudo-classes and types).
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687465
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
In my testing this cuts the longest time to dispatch(), when showing the
calendar menu for the first time, from 604 to 442 milliseconds,
while reducing additional_selector_matches_style() from 32% to 13% of
CPU time used.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687465
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
The descriptions for keybindings shared with Metacity are now
duplicated in Mutter, so only use the latter to avoid duplicate
entries in System Settings.
https://bugzilla.gnome.org/show_bug.cgi?id=687672
The screen grabber was a workaround for an extremely slow path in Mesa
when reading back pixel data from the frame buffer. It was using pixel
buffer objects by directly calling into GL to hit a fast blit path in
Intel's driver. This should no longer be necessary with the latest
Mesa because the normal read pixels path now has a fast path to just
memcpy the data. Using PBOs in that case just adds an extra
indirection because the data is read into an intermediate buffer and
then copied back out again.
We want to be able to remove the dependency on linking against libGL
directly from Gnome Shell because that will not work if Cogl is
actually using GLES. Also libGL includes GLX which means gnome-shell
ends up with a hard dependency on Xlib which hinders the goal of
getting Gnome Shell to be a Wayland compositor.
https://bugs.freedesktop.org/show_bug.cgi?id=46631https://bugzilla.gnome.org/show_bug.cgi?id=685915
shell_mobile_providers_parse() was returning the country information split
into a hash table with providers and a hash table with country names. This
patch merges both outputs into a single per-country object, so the parse()
method now returns a GHashTable with the following element-type:
(element-type utf8 ShellCountryMobileProvider>)
This also avoids more complex setups like returning lists inside of hash tables,
which was actually breaking either g-i or gtk-doc.
shell_mobile_providers_parse() was also modified to allow inputting the paths
of the country codes and provider list files to use. If paths are not given, the
default ones will be used. This helps us to provide test files during unit
tests.
Both the findProviderForMCCMNC() and findProviderForSid() methods are exported
out of the GSM and CDMA specific classes, and new unit tests for them are
implemented. Tests can be run manually with:
$> ./tests/run-test.sh tests/unit/mobileProviders.js
https://bugzilla.gnome.org/show_bug.cgi?id=687356.
Rather than using a complicated set of function calls across
library boundaries and our own scanning logic, use strtok(),
which glibc already provides, and is probably much more optimized.
https://bugzilla.gnome.org/show_bug.cgi?id=687465
* Fix wrong parameter name to on_name_appeared callbacks
* optparse doesn't just leave extra command line arguments, it
errors out, so don't try to pass through extra arguments -
instead add explicit passthrough for '--replace'
* Fix usage of Gio.DBusProxy
* Add a default value for --perf so that if it's not supplied
things don't die with a mysterious error message. (This wasn't
needed when --perf enabled perf-mode)
https://bugzilla.gnome.org/show_bug.cgi?id=687287
The libedataserverui dependency is a relic of the old E-D-S API.
As of 3.6.0, E-D-S now centralizes authentication prompts so clients
don't have to display their own. This also allows trading the GTK+
main loop for a plain GMainLoop in gnome-shell-calendar-server.c.
https://bugzilla.gnome.org/show_bug.cgi?id=687189
Often the first thing a user wants to do after making a recording
is post it somewhere.
This commit adds the video to recently used items, so that it shows
up prominently in open file choosers.
https://bugzilla.gnome.org/show_bug.cgi?id=680647
Recording continues for some time after the recorder object
is closed, since closing isn't a synchronous operation.
This commit defers quiting the test-recorder application until
the recording is finished.
https://bugzilla.gnome.org/show_bug.cgi?id=680647
We want to make sure the recorder isn't finalized until the
saved recording hits disk. This means the pipeline object needs
a hard reference on the recorder.
https://bugzilla.gnome.org/show_bug.cgi?id=680647
The stage is a floating object. We don't own a reference
to it, so we shouldn't unref it.
This commit removes the erroneous unref call and makes sure
we call clutter_actor_destroy on the stage when we're done
with it.
https://bugzilla.gnome.org/show_bug.cgi?id=680647
While looking at how the plymouth implementation was built, I was so
short-sighted and focused on the string "_XROOTPMAP_ID" that I didn't
realize it was the name of the standard background on the root window.
Remove our own implementation, and switch to using a standard mutter
MetaBackgroundActor.
https://bugzilla.gnome.org/show_bug.cgi?id=682428
Currently we miss changes to a file referenced in background-image
or border-image.
Connect to the StTextureCache::texture-file-changed signal to keep
up with file changes and update the drawing state if necessary.
https://bugzilla.gnome.org/show_bug.cgi?id=679268
For textures loaded from files, the cache might hide image changes
by keeping the data of a previous version around indefinitely. For
instance AccountsService will notify of avatar changes, but as new
image is copied over the old one, we will continue to use the old
image data.
Install a file monitor for each file resource we load and clear
the corresponding data from the cache on changes, emitting the
new StTextureCache::texture-file-changed signal.
https://bugzilla.gnome.org/show_bug.cgi?id=679268
ClutterText will only queue a relayout after font changes if it has
any contents other than the empty string. As a result, its height
request may change after the first character has been entered. To
avoid this visual glitch, force a relayout on actual font changes.
https://bugzilla.gnome.org/show_bug.cgi?id=685534
The actor's GtkIMContext is freed in dispose and reset in unrealize - as
ClutterActor's dispose will unrealize the actor if necessary, chaining
up to the parent after clearing the im context will result in warnings
if the actor is still realized, so chain up first.
https://bugzilla.gnome.org/show_bug.cgi?id=686016
The application menu is currently unusable with non-maximized
windows when using focus-follows-mouse mode. Override mutter's
focus-change-on-pointer-rest preference, so that the actual
focus change is delayed until the pointer stops moving.
https://bugzilla.gnome.org/show_bug.cgi?id=678169
The signals for the action group were being disconnected when the action
group was explicitly removed from the GActionMuxer but the same was not
being done when it was finalized.
This means that a change in the state of an action group that used to be
associated with a finalized GActionMuxer would result in a crash. This
would happen for stateful application actions after closing a window.
https://bugzilla.gnome.org/show_bug.cgi?id=681399
For performance reasons, resources required to paint a widget are
aggressively cached; we know of at least one case where our caching
prevents updating the used background-image correctly, so add explicit
API to clear all associated cache data.
https://bugzilla.gnome.org/show_bug.cgi?id=679268
StThemeNode caches its resources aggressively to keep the required
work on paint to a minimum - right now, resources are only recreated
on allocation changes.
In order to update the background-image property correctly when the
underlying file changes, resources need to be recreated without a
size change, so add an explicit method for that.
https://bugzilla.gnome.org/show_bug.cgi?id=679268
The current API assumes that image data loaded from files remains
valid during the life time of the shell. This assumption is mostly
valid for image files we provide ourselves (with the exception being
designers working on those files), but not necessarily for "external"
files - provide API to explicitly remove cached data associated with
a URI for those cases.
https://bugzilla.gnome.org/show_bug.cgi?id=679268
The screenshield requires gdm 3.5, which can be problematic in
jhbuild configurations, or distributions that don't use GDM as the display
manager. Allow transparent fallback to gnome-screensaver in that case.
https://bugzilla.gnome.org/show_bug.cgi?id=683060
The speed and quality properties have been removed in favor of properties
closer to the upstream library.
Removing the properies from the pipeline would result into a huge
slowdown so we have to map the old values to the new ones.
According to the source code of the old vp8enc element quality maps to
(int)(63 - quality * 6.2) for min_quantizer and max_quantizer, while
speed maps to cpu-used = speed == 0 ? 0 : (speed - 1).
So set min_quantizer and min_quantizer to 13, and cpu-used to 5 based on
the above formulas.
https://bugzilla.gnome.org/show_bug.cgi?id=684206
Remove the PlacesManager, its search provider and all associated code.
Places search is now provided by nautilus using the external search
provider API.
https://bugzilla.gnome.org/show_bug.cgi?id=683506
Rather than unconditionally removing a focus root in remove_group(),
decrement a counter that add_group() increments, and only actually
remove a focus root when the counter drops to 0.
https://bugzilla.gnome.org/show_bug.cgi?id=682243
When using an input method like IBus, the IM is expected to process
key events before anything else. Currently this doesn't always work
as expected, as the event filtering is done in the default handlers
of the key-press and key-release events, e.g. only after other
handlers have been run.
To allow the IM to filter events earlier, move the code to a
captured-event handler instead.
https://bugzilla.gnome.org/show_bug.cgi?id=658325
If an actors is not mapped (visible and all parents visible), then don't
allow navigating focus to it.
This fixes a regression in the keyboard navigation of the panel with
invisibile items.
https://bugzilla.gnome.org/show_bug.cgi?id=683529
st_texture_cache_load_from_raw() enforces a square ClutterTexture,
resulting in the texture being stretched if the passed in image
data has a different width:height ratio.
Add padding in those cases as we already do when loading from pixbufs.
https://bugzilla.gnome.org/show_bug.cgi?id=683483
Clutter will try to unmap during a dispose if we have a parent, so if we
set our own actor to NULL before the chain up, we're going to attempt to
unmap our own NULL actor. Fix that by swapping the order in which we
chain up.
https://bugzilla.gnome.org/show_bug.cgi?id=672790
The default filename isn't localized and isn't the same one that
the shell sets. Just remove the fallback mechanism, and abort
recording if somebody didn't set the filename
https://bugzilla.gnome.org/show_bug.cgi?id=677434
Components are pieces of the shell code that can be added/removed
at runtime, like extension, but are tied more directly to a session
mode. The session polkit agent, the network agent, autorun/automount,
are all components, keyring, recorder and telepathy client are all
now copmonents.
https://bugzilla.gnome.org/show_bug.cgi?id=683156
The supposed reason for launching the calendar server in a peculiar
way was so that the process would be killed when the Shell was killed,
but that didn't actually work. Launch the calendar server through auto-start,
and persist all throughout the session.
https://bugzilla.gnome.org/show_bug.cgi?id=683156
Introduce a StShadowHelper to manage drop shadows from JS (which
cannot use Cogl directly), and use it in a new StWidget-derived
JS class to draw the arrow.
https://bugzilla.gnome.org/show_bug.cgi?id=682285
Reroute setting those properties to a GIcon. API users are expected
to create GIcon directly now.
The advantage is that from a StIcon you can now create a similar one
by accessing :gicon.
https://bugzilla.gnome.org/show_bug.cgi?id=682540
The original design for the overview had buttons for searching for
Wikipedia and Google, but in practice this is a bad idea. The buttons
are the default activations, meaning that using the overview as a
fluent motion of launching something - "firefxo<Enter>", will launch
Google/Wikipedia.
https://bugzilla.gnome.org/show_bug.cgi?id=670168
If the user is already active when the notification pops up, we
won't get an idle watcher because there's no transition from
active to idle or vice versa. Correct this by initializing the
state correctly from XSync.
StScrollBar was intercepting motion events by using captured-event on
the stage, which required additional dirty tricks, which required
additional hacks. Simplify it by just using clutter_grab_pointer()
instead.
https://bugzilla.gnome.org/show_bug.cgi?id=671001
It doesn't make sense to have multiple ShellIdleMonitors, since
each has its own GDK filter function, but they all get the same
events. In preparation for having it accessed from other places
than the message tray, make it a singleton.
https://bugzilla.gnome.org/show_bug.cgi?id=682041
Add support for the CSS "background-repeat" property. Currently, this
only supports on/off, rather than allowing tiling in each individual
dimension. It is supported for both the cogl and cairo rendering paths.
https://bugzilla.gnome.org/show_bug.cgi?id=680801
gnome-session and gnome-settings-daemon rely on the screensaver
interface to know the locked state. Since gnome-screensaver is no
longer running, it's up to gnome-shell to provide it.
https://bugzilla.gnome.org/show_bug.cgi?id=619955
To allow more than one summary icon actor for a source we split
the model of the source icon (which is iconName, if the default
implementation is used, or a GIcon otherwise) and replace
createNotificationIcon() with a generic createIcon(size). Also,
the actual source actor is split into a separate class, that handles
the notification counter automatically.
https://bugzilla.gnome.org/show_bug.cgi?id=619955
The :reactive property is used on StButton to like the :sensitive
property on GtkWidgets, that is, to indicate that the user is not
(yet) expected to click the button, and therefore should affect
styling too.
This allows to remove some code at the JS layer.
https://bugzilla.gnome.org/show_bug.cgi?id=619955
While modal dialogs were attached to the parent's titlebar, it
made sense to leave the top of the parent window at full color.
With the new position of modal dialogs, it makes more sense to dim
the entire parent window, so we can use a combination of Clutter's
BrightnessContrast- and DesaturateEffect instead of our own custom
shader.
https://bugzilla.gnome.org/show_bug.cgi?id=674499
We used to use realize/unrealize instead of map/unmap in ShellEmbeddedWindow
because there originally was no map/unmap. The days of this are long gone...
https://bugzilla.gnome.org/show_bug.cgi?id=672790
This currently causes the shell to freeze very often in a thread
deadlock, and the gjs garbage collector behavior is currently getting
fixed at the right level in gjs itself.
https://bugzilla.gnome.org/show_bug.cgi?id=679832
When selecting "Open Calendar" in the date menu, the configured
application is launched via command line, so we don't get any
startup notification. In order to fix the issue at least for our
default calendar, add a hidden .desktop file for evolution's
calendar component.
https://bugzilla.gnome.org/show_bug.cgi?id=677907
get_app_for_window() is (transfer full), but shell_app_system_lookup_wmclass()
is (transfer none), so we must reference the result, or crash
occur.
https://bugzilla.gnome.org/show_bug.cgi?id=678992
When running with Valgrind, this helps us ensure that we're managing
memory correctly. We need to GC twice as finalizing an object in the
sweep can unroot objects which were already marked. Technically, it
could be that we'll need to GC more than twice, but GCing twice should
hopefully last us for now.
https://bugzilla.gnome.org/show_bug.cgi?id=678737
clutter_actor_get_children returns a newly allocated GList and it was
not freed.
However, as there's no reason to copy the children list, switch to
iterator api.
https://bugzilla.gnome.org/show_bug.cgi?id=678406
The dependency chain spirals out from folks->zeitgeist->xapian...and
I'm really not interested in pulling in all of that into the core
shell.
There is work on splitting out contact search into gnome-contacts; I'd
add a bug link but Bugzilla is down.
Currently we assume that GTK_UNIQUE_BUS_NAME is shared between all
windows of an application. This assumption does not hold true for
applications that specify G_APPLICATION_NON_UNIQUE, so make sure
to update the menu as necessary.
https://bugzilla.gnome.org/show_bug.cgi?id=676238
There is a race if a channel is invalidated during its preparation: the
'invalidated' signal is already emitted so the Shell will never notice.
We fix this by simply checking if the channel is already invalidated when
receiving it from telepathy-glib.
In the approving case, we reject the full ChannelDispatchOperation as we only
support approving one channel at the time.
https://bugzilla.gnome.org/show_bug.cgi?id=677457
Commit de8a66d4ce removed our own DPI handling for the one found
it Clutter, but broke resolution updates at runtime (for instance
when setting the "Large Text" option in Universal Access).
https://bugzilla.gnome.org/show_bug.cgi?id=677975
We explicitly include NoDisplay applications in the ShellAppSystem because
we want app tracking for them, but we explicitly filter NoDisplay applications
out when showing them to the user because we don't want to show them to the
user. We also based our "All" apps view on a flattened list of apps. While
we did check for NoDisplay on the app item itself, we didn't check against
its parents. Refactor the app display view to not use a separate flat list
of applications, but instead a concatenation of all the applications in all
the loaded categories.
https://bugzilla.gnome.org/show_bug.cgi?id=658176
Instead of falling back to a set of default values or crashing the
window manager when an invalid mode is specified, check the value
of the ShellGlobal:session-mode property before taking over as WM
and make a clean exit if it cannot be resolved to an existent mode.
https://bugzilla.gnome.org/show_bug.cgi?id=676156
Add a session-mode property on ShellGlobal which corresponds to the
new --mode switch. Make the existing ShellGlobal:session-type property
readonly and base it on ShellGlobal:session-mode to avoid conflicts.
https://bugzilla.gnome.org/show_bug.cgi?id=676156
ShellApp keeps track of windows sorted by most recently used first
which means that when raising windows we need to start from the end of
the list to finish with the correct stacking order.
This patch just makes the code agree with the comment which was
already there.
https://bugzilla.gnome.org/show_bug.cgi?id=676371