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
Add a dummy call to shell_js_add_extension_importer() to ensure that the
link to libgnome-shell-js.so is not removed when using -Wl,--as-needed,
which is the default on many distros.
https://bugzilla.gnome.org/show_bug.cgi?id=670477
Depending on the exact linker options and versions, rpath's written
into the binary may, or may not, be honored by dlopen(). Work around
this by simply linking the gnome-shell binary to gnome-shell-js, since
then dlopen() doesn't need to search paths.
https://bugzilla.gnome.org/show_bug.cgi?id=670477
It doesn't make sense to have multiple requests for the same
connection/setting combination at the same time, since we would be
asking the user twice for the same password. Instead, report cancellation
to NetworkManager if this happens.
Note that does make sense to have multiple requests in sequence though
(they could have different flags), but this is not affected.
https://bugzilla.gnome.org/show_bug.cgi?id=674961
Lots of things here were unused. First, we don't need to calculate
the js_dir when not running from the source tree, which makes the
branch mostly empty, meaning we can merge the two branches.
This allows us running uninstalled. While we're at it, though, remove
JHBUILD_TYPELIBDIR. jhbuild shell should add its own stuff to GI_TYPELIB_PATH,
and we don't want to half reimplement jhbuild. The wrapper script should be
solely for the case of running from the source directory, and not care about
jhbuild at all.
If start_shell throws an exception for whatever reason, the finally
handler will run before shell has been set, leading to a "referencing
an undefined local variable" error.
If a request isn't found in shell_network_agent_set_password() or
shell_network_agent_respond(), then g_return_if_fail() rather than
crashing. OTOH, if a request is not found in
shell_network_agent_cancel_get_secrets(), then just ignore it
silently, since that could legitimately happen.
https://bugzilla.gnome.org/show_bug.cgi?id=674961
Right now, we are hard-depending on the presence of Evolution by
using its settings schemas. This is likely to be unpopular, and
also causes instability if someone happens not to have Evolution
installed, so install a schema that has the same data path as
the Evolution schema, but a different name and install that
for the keys we need.
To avoid a string-freeze break, we rely on the translations in
Evolution - if Evolution isn't installed, the key descriptions
will be untranslated in dconf-editor.
https://bugzilla.gnome.org/show_bug.cgi?id=674424
This swaps a use of GLfloat for a regular float. Cogl might stop
including a GL header in its public headers soon so this would fix a
compilation error.
https://bugzilla.gnome.org/show_bug.cgi?id=672711
If run under jhbuild, gnome-shell is in PATH, so trying to restore
is just running it again, likely failing in the same way (with the
additional problem of detaching the shell from the terminal). Also,
this is using deprecated GConf keys, and deprecated pygobject
bindings.
The jhbuild wrapper is expected to be run through jhbuild run, or
in the uninstalled case inside a jhbuild shell, so there should
be no need to set XDG_DATA_DIRS and friends.
dconf-daemon is available since 2.32, so there is no need to
start it manually (and in fact, it should not be running normally).
Similarly, notify-osd and notification-daemon should not be
dbus activated, but rather autostarted by gnome-session, and
therefore not running in a gnome-shell session.
Introduce a new gnome-shell-perf-tool, which can be used instead
of the old gnome-shell-jhbuild wrapper to gather data about gnome-shell
performance and submit to shell-perf.gnome.org. This runs the
shell with no extra setup beyond the WM_CLASS filter, so it can
be used for a jhbuild setup or for an installed shell.
Currently the scroll event code only handles scroll events if the
adjustment's value is within the "lower" and "upper" limits. The
likely intent was to pass events to a parent scroll view when
reaching the bounds (uh, nested scroll views!), but apparently
we never made use of this, as the upper bound is actually wrong
(an adjustment's maximum value is upper - page_size, not upper).
Just handle all scroll events unconditionally and rely on the
bound checks in StAdjustment.
https://bugzilla.gnome.org/show_bug.cgi?id=672413
Evolution now stores its selected calendars and tasks in GSettings, not
in GConf. If we don't look at the new location, then we'll not pick up
newly added and enabled calendars, making the calendar effectively not
work for new installs.
https://bugzilla.gnome.org/show_bug.cgi?id=673610
If evolution-data-server needs to prompt for a password, it will try
to pop up a GTK+ dialog. When GTK+ is not initialized, the result is
a crash. So, initialize GTK+ and run a main loop.
See https://bugzilla.redhat.com/show_bug.cgi?id=809681
The result is ugly since we have a Gnome-shell-calendar-server fallback
application, but I don't think it's worth installing a desktop file
and having a string break, since this is pretty uncommon (only for
manually added calendars without the password stored in gnome-keyring),
and apparently this is being rewritten for 3.5 to have the dialogs come
the e-d-s daemon rather than from the individual application.
https://bugzilla.gnome.org/show_bug.cgi?id=673608
gnome-shell-extension-prefs uses format(), but can't pull in Shell
(which is a dependency for the module), since that in turn would pull in
Meta. Fix this by moving the introspected int format function to ShellJS
instead.
https://bugzilla.gnome.org/show_bug.cgi?id=673106
Icon theme change signals aren't noticed immediately, they're usually
noticed when trying to load an icon. Since icon theme changes cause a
style change, and most icon widgets try to re-load their texture during
a style change, this means that we get a stack like this:
st_texture_cache_load_icon
gtk_icon_theme_lookup_icon
gtk_icon_theme_changed
st_widget_style_changed
st_texture_cache_load_icon
Rather than making every place that uses StTextureCache re-entrant,
punt the notifying of icon theme changes to an idle handler instead.
https://bugzilla.gnome.org/show_bug.cgi?id=673512
We've been dangling on the edge of unsafety, unnoticed, for a little while
about the reference count safety of ShellScreenshot. GJS owns the entire
reference count, so as soon as it goes out of scope it could die, causing
GJS to try and fetch the corresponding wrapper object for a stale pointer.
We haven't seen any crashes because of luck -- SpiderMonkey tries to group
together deallocations to limit GC pauses, and there isn't really a lot
of GC pressure in the duration that a screenshot happens, so we tend to
be mostly stable. But in the case that you create a lot of objects while
a screenshot is going on, by hammering the "Print Screen" button, for
example, you can destroy the GObject before the callback finishes.
https://bugzilla.gnome.org/show_bug.cgi?id=672775
Currently compilation fails with -Werror, as we don't handle the
(newly introduced) smooth scroll events in switch statements; add
some basic support, which should make the compiler happy.
https://bugzilla.gnome.org/show_bug.cgi?id=672413
More than one outstanding request to the same URI should now be
deduplicated, and the framework is there if we want to cache async loaded
URIs as well
https://bugzilla.gnome.org/show_bug.cgi?id=672273
In the case that we don't have an icon corresponding to the gicon, it's
more than likely that the code calling load_gicon will know more about
what it wants as a fallback than the texture-cache itself. In fact -
we had a whole lot of dead code that would try to fall back, but never
did because we always returned a valid actor.
This was causing certain applications with invalid icons to not get the
fallback icon because an icon couldn't be found. Fix up the one place
where we don't have an explicit fallback icon codepath, and then stop
doing what we were doing.
https://bugzilla.gnome.org/show_bug.cgi?id=671656
This assignment was shadowed by the giant switch above. Since the
switch has a comment or two explaining the logic inside of it,
keep that instead of the assignment.
Since the invoker for navigate_focus has an extra parameter, annotations
from the invoker aren't applied on the vfunc itself. Fix that by annotating
the vfunc separately.
In the workspace-collecting code we add a check to avoid collecting a
workspace if any startup sequence is running there. Since the sequence
can take some time to load, an helper function is also added which keeps
the (empty) workspace around for a very short time, while waiting for the
sequence to start.
https://bugzilla.gnome.org/show_bug.cgi?id=664202
If the user was inactive while a notification was shown, we show the summary
when the user becomes active again. This ensures that we inform the user of
the existance of new notifications that the user might have missed.
When the user comes back from away, the summary is now only shown if it has
new notifications.
https://bugzilla.gnome.org/show_bug.cgi?id=643014
ECal is deprecated and replaced by ECalClient. This has the
advantage of using e_utils to handle authentication, and should
fix NotOpened errors (that affect in particular webcal calendars
prior to evolution running)
https://bugzilla.gnome.org/show_bug.cgi?id=671177
This allows us to do directional keyboard navigation when there's no
actor inside the horizontal or vertical strip extending from the
origin actor but there are other actors to the sides of that strip
that could still be used as targets even if that means the focus would
move diagonally.
https://bugzilla.gnome.org/show_bug.cgi?id=663901
For arrow keys navigation, when moving from a widget which isn't a
descendant of the widget we are going to, it's unexpected that focus
moves to the target's first descendant instead of the closest to the
source widget.
This requires us to use absolute coordinates to compare widgets since
we no longer have the guarantee that the widgets we are comparing are
siblings.
https://bugzilla.gnome.org/show_bug.cgi?id=663901
Our DBus API (and mostly every other API in existence) define an
area as the top-left corner and width/height; glReadPixels on the
other hand uses the bottom-left corner, so we have to transform the
coordinates before passing them to GL.
https://bugzilla.gnome.org/show_bug.cgi?id=670979
When porting from st_container_get_children_list to this code, I accidentally
broke StTable by a copy/paste error. This broke notifications that updated,
leaving them with what they think were 0 columns and 0 rows.
https://bugzilla.gnome.org/show_bug.cgi?id=670640
* Add a keyring prompter based on GcrSystemPrompter
* Adds dependency on gcr version 3.3.5 or higher
* Not yet using unmerged support for non-pageable memory
https://bugzilla.gnome.org/show_bug.cgi?id=652459
The very similar clutter_actor_allocate_align_fill is close enough
that this is just needless duplication. Additionally, allocate_fill
already inverts the align if the text direction is RTL, so we don't
need to do that here.
https://bugzilla.gnome.org/show_bug.cgi?id=670034
Now that StWidget is a group of sorts, it needs to account for its children
in its paint volume. Unfortunately, this causes havoc for StBoxLayout, so it
needs fixing - it's unknown why it worked when chaining up to near-identical
code in StContainer.
https://bugzilla.gnome.org/show_bug.cgi?id=670034
The get_focus_chain() implementation in StWidget just returns all
children, it should filter for visible children instead. This
breaks keyboard navigation in various places since commit 72dad591
removed the correct implementation in StContainer.
https://bugzilla.gnome.org/show_bug.cgi?id=670904
Now that ClutterActor has a ClutterContainer implementation, we
can start removing StContainer. To help make this a bit more
understandable, instead of converting everything at once, make
StContainer a compatible API wrapper around the ClutterActor
implementation, and then we'll remove those wrappers in later
commits.
https://bugzilla.gnome.org/show_bug.cgi?id=670034
Since an StWidget now has children, it needs to allocate those children
properly. Defer to the currently installed layout manager, like Clutter
does.
Now that we have something that allocates children in St, to prevent
double allocations, we use clutter_actor_set_allocation rather than
chaining up to StWidget::allocate.
https://bugzilla.gnome.org/show_bug.cgi?id=670034
Now that StWidget is concrete and instantiable, we need to do something
other than return an adjusted 0 for width and height. Just chain up
to ClutterActor's default implementation, which uses the layout manager.
https://bugzilla.gnome.org/show_bug.cgi?id=670034
Since we want to paint children by default in StWidget, we need to
provide a way for custom subclasses to paint their CSS backgrounds
without painting children... introducing st_widget_paint_background.
Additionally, remove any custom paint/pick handlers added by subclasses
of StWidget that just painted their children. This will cause double
painting if left alone.
This also removes the hacky things that some subclasses of StBin did
to prevent their one child to be painted by StBin.
https://bugzilla.gnome.org/show_bug.cgi?id=670034
Clutter now provides two new properties on ClutterActor - first-child
and last-child, so we have notifiers on when they change. Unfortunately,
it still doesn't help us too much - we need to keep track of the previous
values of the properties so we can remove their pseudoclasses.
https://bugzilla.gnome.org/show_bug.cgi?id=670034
We can't get rid of the implementations in StContainer just yet,
as StContainer still keeps its own child list. But this should
lower the amount of code that has to be moved around when we
remove StContainer.
https://bugzilla.gnome.org/show_bug.cgi?id=670034
clutter_container_foreach is deprecated, so let's replace that
with some ClutterActorIter usage. Additionally, remove the checks
for ClutterContainer, as all ClutterActors are now ClutterContainers.
https://bugzilla.gnome.org/show_bug.cgi?id=670034
Although not all "Finding and reminding" applications are ready
yet, the integration with gnome-documents' search results overlaps
enough with the "Recent Items" provider to justify its removal.
https://bugzilla.gnome.org/show_bug.cgi?id=670150
Empathy uses to support 2 D-Bus API for calls:
- StreamedMedia: legacy API
- Call.DRAFT: experimental version of the new API
Since 3.3.90, Empathy only supports Call1, the first stable version of the new
API, so the Shell should do the same.
https://bugzilla.gnome.org/show_bug.cgi?id=667694
The function may return FALSE without setting the GError, so don't
assume it is set to prevent a crash in that case. While at it, free
the GError we were leaking before.
https://bugzilla.gnome.org/show_bug.cgi?id=670418
When using systemd, polkit doesn't set the error even when returning false in g_initable_init
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
https://bugzilla.gnome.org/show_bug.cgi?id=670319
The handle was a child of the trough, but it was allocated and painted
like it was a child of the bar. This will wreak havoc when we port over
to the new Clutter API, so let's just make it a child of the bar.
https://bugzilla.gnome.org/show_bug.cgi?id=670034
When the operation is cancelled by NetworkManager, the request is
cancelled immediately. Later when gnome-keyring invokes the callback
notifying the error we must therefore not access its memory.
Previously the callback would mistakenly treat "cancelled" (which
indicates a programmatic cancel) as "denied" (which means the user
clicked "Cancel" on the keyring prompt)
https://bugzilla.gnome.org/show_bug.cgi?id=658484
VPN secrets are stored by the plugins, that provide separate
helpers for authentication. This commit adds the support for invoking
the binaries and pass them connection details.
For plugins that support it (as exposed by their keyfile), we invoke
them in "external-ui-mode" and expect a set of metadata about the
secrets which is used to build a shell styled dialog.
https://bugzilla.gnome.org/show_bug.cgi?id=658484
ConsoleKit is being obsoleted by systemd. Accordingly port the CK logic
in the gnome-shell automount manager to systemd-logind APIs.
This makes use of systemd-logind's native C APIs which are much easier
to use than the D-Bus APIs in this case, and much faster too (since they
are synchronous and directly query the kernel for the information we
need). The dependency is compile time optional, and in order to be nice
to the Debian folks g-s compiled with this enabled fill automatically
fall back to CK support on systems lacking systemd.
A new tool, 'gnome-shell-extension-prefs' can load a new entry point from
extensions, 'prefs.js', which has an entry point to return a GTK+ widget.
This allows extensions to have their own preferences dialog, without each
extension needing to ship its own Python script and .desktop file.
https://bugzilla.gnome.org/show_bug.cgi?id=668429
Clutter, since version 1.8, does The Right Thing™ inside the default
implementation of ClutterActor::map and ClutterActor::unmap, even for
non-container actors: it will iterate over the list of children and
map, or unmap, each one of them, respectively.
This means that the requirement to override map and unmap for composite
actors to map and unmap the internal children has been dropped.
https://bugzilla.gnome.org/show_bug.cgi?id=669239
Since our implementation of background-size is now CSS-compliant, we
do not need this subtexture hack that clips a "leak". The comment here
is also incorrect.
https://bugzilla.gnome.org/show_bug.cgi?id=633462
It seems that accidentally, two variables were swapped in one code path
of the background-size implementation, causing interesting but wrong
images for some elements.
https://bugzilla.gnome.org/show_bug.cgi?id=633462
Recent mutter changes made MetaShapedTexture not a ClutterTexture,
but instead a special ClutterActor subclass that implemented the texture-y
bits itself. Use recently introduced API in MetaShapedTexture so that we can
get the raw texture data and spit it out as a PNG.
Use the new meta_shaped_texture_get_image() to get a window's texture data.
meta_shaped_texture_get_image() flattens the image against any mask it may
have, so a screenshot of it should look exactly as it does on the display.
https://bugzilla.gnome.org/show_bug.cgi?id=662486
Instead of adding every rendered frame into the recording, drop frames
and only buffer and record enough frames to match the target framerate.
Increase the default frame rate from 15 to 30, since now that we're
actually enforcing framerate, it's noticeable that 15fps is not smooth.
https://bugzilla.gnome.org/show_bug.cgi?id=669066
The default pipeline was fairly aggressive about quality, and could
be too expensive for some computers. Decrease the quality setting for
the vp8 codec from 10 to 8, and increase the speed setting from 2 to 6.
(Basically, quality affects the visual fidelity of the end result, while
speed affects how much CPU the encoder uses to get a high compression
ratio at that quality level.)
Remove videorate from the pipeline, since the GStreamer VP8 encoder can
handle variable-framerate streams. This means that we won't spend CPU
encoding duplicate frames added by videorate.
https://bugzilla.gnome.org/show_bug.cgi?id=669066
We need to indicate that our GStreamer source produces timestamped
frames, instead of the default, which is to produce a stream of bytes.
This is needed for correctness, and to avoid warnings for some
pipelines.
https://bugzilla.gnome.org/show_bug.cgi?id=669066
For the Intel drivers, using glReadPixels() to read into client-memory
directly from the frame buffer is much slower than creating a pixel
buffer, copying into that, and then mapping that for reading. On other
drivers, the two approaches are likely to be similar in speed. Create
a ShellScreenGrabber abstraction that uses pixel buffers if available.
Use that for screenshots and screen recording.
https://bugzilla.gnome.org/show_bug.cgi?id=669065
Use the correct clip offsets when taking the screenshot of a window, to
exclude possible invisible borders and to include the case where the
window doesn't have any frame itself.