The vertical scrollbar is located on the left in RTL locales, so
pass an additional parameter to the shader which indicates the
locale's text direction.
https://bugzilla.gnome.org/show_bug.cgi?id=643156
In RTL locales, the vertical scrollbar should be located on the
left, so take the widget's text direction into account when
allocating the view's elements.
https://bugzilla.gnome.org/show_bug.cgi?id=643156
This allows PolicyKit applications to disambiguate between when the
authentication dialog is dismissed versus when authentication fails
(e.g. the wrong password has been entered).
See https://bugs.freedesktop.org/show_bug.cgi?id=30653 for more
information.
Signed-off-by: David Zeuthen <davidz@redhat.com>
A PolicyKit Authentication Agent is a construct used to authenticate
one or more identities. See the PolicyKit documentation for more
details on authentication agents and how PolicyKit works:
http://hal.freedesktop.org/docs/polkit/
Since gjs does not support subclassing a GObject class from Javascript
code, we bring in a native class to bridge the VFuncs to GObject
signals. Additionally, this native class also queues up authentication
requests so the user of the native class only has to deal with a
single outstanding request at any one time.
The file js/ui/polkitAuthenticationAgent.js introduces a singleton
that listens for authentication requests via the native class. This
singleton uses the PolkitAgent machinery to do the actual heavy-weight
lifting required for authentication (essentially a PAM conversation).
We currently don't allow the user to pick the identity to be
authenticated.
https://bugzilla.gnome.org/show_bug.cgi?id=642886
Signed-off-by: David Zeuthen <davidz@redhat.com>
When retrieving a ShellApp from the GHashTable of child processes,
we need to take an extra reference, that the GHashTable of windows
to apps will own.
Also add some documentation to avoid repeating this bug in the future.
https://bugzilla.gnome.org/show_bug.cgi?id=642699
Using clutter_get_current_event_time can result into too old timestamps
when there is no current Clutter or Mutter event, since
clutter_get_current_event_time() returns the timestamp of the last event
delivered to Clutter. This can result in, for example, grabs failing. Use
the event time of the current event (if any) and CurrentTime otherwise.
https://bugzilla.gnome.org/show_bug.cgi?id=642188
Currently an entry's primary/secondary icon can only be set by
filename. In order to allow using themed icons, add API to set
a generic ClutterActor as icon.
https://bugzilla.gnome.org/show_bug.cgi?id=642333
For historical reasons, StEntry always did hover tracking when you had
visible hint_text, even if track_hover was FALSE. Remove that special
case, and make entries track hover just like all other widgets do.
If we actually needed to distinguish hovered-with-hint-text from
hovered-without-hint-text (which, at the moment, we don't), we could
do that by setting separate CSS for :hover and :hover:indeterminate.
https://bugzilla.gnome.org/show_bug.cgi?id=642483
Add the machinery to cancel the notification when a new playing a
new one (wrapping ca_context_cancel), then use it when scrolling
the status icon.
Not doing it for the slider because it causes noise, either with the
keyboard, with mouse drag or with mouse wheel.
https://bugzilla.gnome.org/show_bug.cgi?id=633667
If we aren't going to fill the content area of the node with a solid
background color, then we need to clear it of any artifacts left over
from drawing the border.
https://bugzilla.gnome.org/show_bug.cgi?id=640465
This reverts commit b4ec342d06.
The alpha > 0 checks should actually be alpha < 255 for the commit to
make sense as designed. The design isn't right either, though,
since we need to preserve the translucency in translucent gradients,
not block it with a solid color fill.
https://bugzilla.gnome.org/show_bug.cgi?id=640465
If a background gradient isn't fully opaque, then we need to first
fill in the background color so the border color doesn't leak into
the interior.
https://bugzilla.gnome.org/show_bug.cgi?id=640465
We need to be careful to ignore any preexisting color information
in the interior of the node when filling it with the background color,
since the border color may have leaked into the interior and the
background color may be translucent.
https://bugzilla.gnome.org/show_bug.cgi?id=640465
Some recent painting-efficiency fix broke the inspector, which
accidentally depended on things getting repainted too often, and so
was failing to highlight things properly now. A simple queue_redraw()
fixes this, but while I was there, I decided to port the drawing hook
to JS as well, since all the necessary parts of cogl work fine from
JS.
https://bugzilla.gnome.org/show_bug.cgi?id=642058
Built-in Xephyr support was an important debugging/development feature
for a while, but it is no longer especially useful (and has been
mostly broken since Clutter 1.4 anyway).
https://bugzilla.gnome.org/show_bug.cgi?id=610818
Point the arrow to the center of the sourceActor's content box, rather
than its allocation, in case it has asymmetric padding (as the
rightmost message tray summary item does).
https://bugzilla.gnome.org/show_bug.cgi?id=641728
With workspace thumbnails, we don't switch workspaces when dragging windows
between workspaces or adding new workspaces, so we also shouldn't switch
on launch.
* Add workspace parameters to shell_doc_system_open(),
shell_app_activate, shell_app_open_new_window()
* Pass a 'params' object when activating items in the overview with
two currently defined parameters: workspace and timestamp. (timestamp
is only implemented where it is easy and doesn't require interface
changes - using the global current timestamp for the shell is almost
always right or at least good enough.)
https://bugzilla.gnome.org/show_bug.cgi?id=640996
Launch child processes more directly; we retrieve the PID, and
use it to keep track of the .desktop file we launched.
Now, when we get a window, since the X window has a PID, we
have a pretty strong association.
.desktop file <-> PID <-> window
And can thus map window back to .desktop file.
https://bugzilla.gnome.org/show_bug.cgi?id=637745
For historical reasons, we had both StClickable and StButton, which
were nearly identical. StButton was more widely-used, so keep that and
port all StClickable users to that.
https://bugzilla.gnome.org/show_bug.cgi?id=640583
The material of prerendered backgrounds is now painted in the
rectangle determined by st_theme_node_get_paint_box(). As the
ClutterActorBox returned from that function includes the space
needed to draw the box shadow, the background ends up occluding
the shadow.
As the box shadow is not part of the background, factor out a new
helper function which excludes the box shadow, and use it to
prerender and place the background material.
https://bugzilla.gnome.org/show_bug.cgi?id=641522
1. Both functions leaked the nodes in priv->children
2. st_container_remove_all wasn't properly updating first_child and last_child
3. remove_all() is almost never right since it won't cause signal handlers
on the children to be removed. In the rare cases where it might be needed
the caller can simply use clutter_container_remove().
https://bugzilla.gnome.org/show_bug.cgi?id=640781
Due to recent GTK+ changes X11 specific code was moved into different
headers. As Socket/Plug is X11 only this broke our calls to GtkSocket
in the tray code. Fix this by including the new gtkx.h header.
Previously, trying to use a background image and border on
the same node resulted in the background drawing over the border.
This commit adds support for background images to
st_theme_node_render_background_with_border
and changes the code to call that function when appropriate.
https://bugzilla.gnome.org/show_bug.cgi?id=636976
Loading a pixbuf in a way that cairo can use it is a
pretty involved process that involves a lot of code, and pixel
fiddling.
This commit adds the mechanism to StTextureCache so we can reuse
the existing pixbuf handling code there, and also get caching.
https://bugzilla.gnome.org/show_bug.cgi?id=636976
A lot of the border drawing logic in st_theme_node_render_gradient is
applicable to other non-solid background types than gradients.
This commit refactors that code so that support for other non-solid
background types can be more easily integrated later.
https://bugzilla.gnome.org/show_bug.cgi?id=636976
When drawing the background image shadow, we need to clip it
to the node's background color, gradient, or borders if present.
If the background color is transparent, and there aren't any
borders, then we don't clip the shadow since there is nothing
to confine it.
https://bugzilla.gnome.org/show_bug.cgi?id=636976
The border_texture (and border_material) variable is being
overloaded for two purposes: it's used as a source
to 9-slice the border from, and it's used as place to prerender
the background and border together for gradients.
While we only do one or the other for any given node, the two cases
are distinct, and should use distinct variables for readability.
https://bugzilla.gnome.org/show_bug.cgi?id=636976
Currently, "-st-shadow" can mean one of three very
different things:
1) shadow based on alpha of the background image
2) shadow the "border box" of the node
3) shadow applied to the content of a StIcon
It isn't well defined which of the above 3 cases
-st-shadow will mean for any given node, however.
This commit splits the property into three
different properties, "box-shadow",
"-st-background-image-shadow", and "icon-shadow"
to make it all very explicit.
https://bugzilla.gnome.org/show_bug.cgi?id=636976
The vp8 codec provides better performance in pretty much all cases compared
to theora while still being free (as in not patent encumbered).
Also add a %T placeholder to the pipeline string which will be replaced
with the a thread count based on the target system.
https://bugzilla.gnome.org/show_bug.cgi?id=632595
StWidget reports a paint volume large enough to paint the current
theme node. As CSS transitions also paint the previous theme node,
the reported paint volume may be incorrect, resulting in screen
artifacts when painting outside the reported volume.
Add st_theme_node_transition_get_paint_box() to calculate an allocation
large enough to paint both theme nodes, and use it to report the correct
paint volume during transitions.
https://bugzilla.gnome.org/show_bug.cgi?id=640085
Right now is just redefine atk_object_get_name.
If someone wonders why not implement AtkText interface, or expose the
internal ClutterText, here a extract from AtkText doc:
"AtkText should be implemented by AtkObjects on behalf of widgets that
have text content which is either attributed or otherwise
non-trivial. AtkObjects whose text content is simple, unattributed,
and very brief may expose that content via atk_object_get_name
instead;"
StLabel is attributed, but is still simple and brief. In the same way
the atk_object_get_name redefinition is required, so this patch is the
first step. We can implement AtkText in the future.
https://bugzilla.gnome.org/show_bug.cgi?id=626658
It includes:
* Expose a proper focusable state, instead of the default one from
cally, using StWidget::can_focus, and also notifying the state change
* Management of the selected stated, using the current pseudo_class.
* Defines a new virtual method on StWidget: get_accessible_type. In
this way it is not required to reimplement get_accessible just for
a accessible type change. get_accessible is reimplemented using this.
You can see that as a substitute of the atk object factory
https://bugzilla.gnome.org/show_bug.cgi?id=636716
This basically:
* Checks a11y configuration properties
* Checks if clutter has a11y enabled
* Loads atk-bridge
It also ensure proper NO_GAIL and NO_AT_BRIDGE values on gnome-shell
startup script
https://bugzilla.gnome.org/show_bug.cgi?id=612599
Instead of converting a CSS-specified length to an integer by truncation,
round. This means that sizes specified by converting a pixel value into
non-px terms will work reliably instead of potentially being off-by-one.
When changing a child's visibility with skip_paint(), the change
will not be visible until a redraw is triggered. Queue a redraw,
so that the function has an immediate effect.
https://bugzilla.gnome.org/show_bug.cgi?id=639461
If a starting-up app has not requested a particular workspace, then
shell_app_is_on_workspace() should return TRUE for any workspace.
Otherwise we will never get startup notification for them, since the
app menu only shows apps that are starting on the current workspace.
https://bugzilla.gnome.org/show_bug.cgi?id=635089
With IBus, key events sometimes get sent to the server than
redelivered via gdk_event_put(). Since we expect all key events to
be delivered via the GDK event filter Mutter installs, this results
in key input not working.
To fix this, install an event handler with gdk_event_handler_set()
to intercept events being set from GDK to GTK+, pull out the
key events and send them back to Clutter.
Partially based on a patch by Daiki Ueno
https://bugzilla.gnome.org/show_bug.cgi?id=621659
Require that all extensions have a "shell-version" property in their
metadata, which is an array of supported Shell versions.
Extensions can target a specific version triple or an entire stable
version.
Optionally, they can also require a specific GJS version, to ensure
compatibility.
https://bugzilla.gnome.org/show_bug.cgi?id=639255
Synchronizing the actor and window position on paint resulted in lots
of syncing, and also resulted in the window mistakenly being left at
0,0 if the actor wasn't visible when the window first mapped.
Revert back to the old way of doing it, by tying into
clutter_actor_allocate, which was only failing before because of a bug
elsewhere.
https://bugzilla.gnome.org/show_bug.cgi?id=635695
The gnome-panel allows the user to hover over a tasklist entry
while draging to activate a minimized or obscured window and drop onto it.
Implement a similar behaviour by allowing draging to the activities button or
the hotcorner (and thus opening the overview), which allows the user to
activate any window (even on different workspaces) as a drop target.
https://bugzilla.gnome.org/show_bug.cgi?id=601731
A key for 12hr/24hr clock format has been added to gsettings-desktop-schemas,
so use that instead of the one from the shell clock schema.
As the setting can be controlled from the Date and Time panel of
gnome-control-center now, drop the temporary preference dialog
as well.
https://bugzilla.gnome.org/show_bug.cgi?id=633200
Use the same approach as other generated headers (a temporary file,
compare to the existing, then copy), to avoid touching st.h, so
that other dependent objects are not rebuilt, if not needed.
It should speed up building when switching git branches, as often
config.status or automake are run, causing Makefiles to be recreated.
https://bugzilla.gnome.org/show_bug.cgi?id=638453
Thanks Owen and Colin for debugging this:
<davidz> does anyone have a clue about this cryptic error message: http://fpaste.org/aWgh/ ?
<owen> davidz: well, I'd guess some sort of syntax error...
<walters> hmm
possibly but unlikely fallout from my js versioning
<owen> oh, it's happening here too
walters: exactly
Adding --js-version=1.8 to the wrapper script fixes
walters: I thought you were defaulting to allowing extensions?
<walters> actually, let's do that now anyways
Signed-off-by: David Zeuthen <davidz@redhat.com>
We weren't freeing the whole pixbuf, nor were we the GList of
subpixbufs. Plug both of these leaks in the error handling path
and in the default case.
All of the unreffing/cleanup should happen in the GDestroyNotify
for the result, not some in the handler.
https://bugzilla.gnome.org/show_bug.cgi?id=636489
While non-uniform border widths were parsed correctly, an arbitrary
side's width was picked when painting, so that each border ended up
with the same width and the widths specified in CSS were ignored.
At least for sides between non-rounded corners, using a different
border width can be reasonable, for instance at screen edges.
Different border widths around rounded corners are kind of crack,
but then it would be lame not to support it ...
https://bugzilla.gnome.org/show_bug.cgi?id=607500
For gradient backgrounds, borders were implemented by filling the
background shape with the border color first, and then scaling down
the path to draw the background.
The result is not correct[0], which is especially visible if the border
width is greater than the border radius - so instead of scaling down
the original path, use a separate path for the background.
The result is consistent with the borders we draw for non-gradient
backgrounds, and much closer to the correct standard behavior.
[0] http://www.w3.org/TR/css3-background/#the-border-radiushttps://bugzilla.gnome.org/show_bug.cgi?id=607500
non-absolute paths specified as url()'s in
stylesheets are resolved to be relative to the location
of the stylesheets they are in.
Inline styles don't have physical styleshseets sitting on disk,
which leads to a crash in the url resolving code.
This commit ensures that we don't try to use the stylesheet associated
with a url, if there isn't one to use.
This commit doesn't try to handle relative paths in inline styles.
It only prevents crashes when absolute paths are used.
https://bugzilla.gnome.org/show_bug.cgi?id=636975