Commit Graph

1583 Commits

Author SHA1 Message Date
Jasper St. Pierre
1cc5bb5ec4 shell-app: Fade the app icon on the left in RTL layouts
The point of fading the icon is to make the text displayed over the
icon more legible. In RTL layouts, the text is displayed on the left
of the icon, so fading the right-hand-side of the icon doesn't work
well.

https://bugzilla.gnome.org/show_bug.cgi?id=704583
2013-07-22 07:09:42 -04:00
Lionel Landwerlin
fd83990d8a st-theme-node: reset paint state when theme node changes
https://bugzilla.gnome.org/show_bug.cgi?id=704430
2013-07-18 01:12:44 +01:00
Lionel Landwerlin
ad0c4caf1c st-theme-node-transition: fix paint state corruption
https://bugzilla.gnome.org/show_bug.cgi?id=704411
2013-07-17 19:38:44 +01:00
Emilio Pozuelo Monfort
cfecd063c9 st-scroll-view: properly check if the scrollbars are visible
We don't set :visible on the scrollbars, but use booleans to track
if they are visible. Thus check the booleans instead of the actor's
properties when allocating the scrollbars.

https://bugzilla.gnome.org/show_bug.cgi?id=704265
2013-07-17 17:33:26 +02:00
Jasper St. Pierre
2fa40555e6 popupMenu: Simplify allocation code
Use ClutterActor.allocate_align_fill() so we don't have to do
this math ourselves. At the same time, clean up the RTL handling
so that it's easier to follow.

https://bugzilla.gnome.org/show_bug.cgi?id=702539
2013-07-15 12:34:22 -04:00
Lionel Landwerlin
fde01f0b71 st-theme-node: invalidate cached size when initializing paint state
https://bugzilla.gnome.org/show_bug.cgi?id=703997
2013-07-13 08:31:18 +01:00
Lionel Landwerlin
1c04ae3216 st-theme-node: fix obvious size comparison error
https://bugzilla.gnome.org/show_bug.cgi?id=703997
2013-07-13 08:31:14 +01:00
Emilio Pozuelo Monfort
c9b079cbb5 StWidget: use a handler id to disconnect the callback
g_signal_handlers_disconnect_by_func() is much more expensive
than g_signal_handler_disconnect(), so use the latter.

https://bugzilla.gnome.org/show_bug.cgi?id=704077
2013-07-12 13:38:47 +02:00
Lionel Landwerlin
a18fb27d0f st-theme-node: let paint states take weak ref on theme nodes
When the St theme is changed, the StThemeContext unrefs all the theme
nodes cached in it's internal hash table, then emits a signal to
notify all theme nodes that the current theme has changed.

The problem is that the first StWidget to catch a theme changed signal
will trigger a "style-changed" signal catched by its children first.
So the theme changed signal can't be processed properly to cleanup
StThemeNodePaintState before recomputing the theme.

This patch adds a weak ref to the StThemeNode in the
StThemeNodePaintState to ensure paint states are properly cleaned up
when the associated StThemeNode is freed.

https://bugzilla.gnome.org/show_bug.cgi?id=703859
2013-07-10 20:27:38 +01:00
Florian Müllner
e031a5d28b st-theme-node: Update corner textures on allocation size changes
Commit 318283fc70 optimized box-shadow rendering by not recreating
shadow materials on every allocation change. Other handles cannot
be reused and are updated regularly, however the patch missed the
cached corner materials - while those can be reused, we still need
to ensure that the currently used paint state references them.

https://bugzilla.gnome.org/show_bug.cgi?id=703909
2013-07-10 17:35:11 +02:00
Florian Müllner
f9b32474b0 st-theme-node: Don't update resources on each paint
Up to commit 318283fc70, resources were only updated when
the allocated size had changed. There is no good reason to change
this for theme nodes without box shadows.

https://bugzilla.gnome.org/show_bug.cgi?id=703909
2013-07-10 17:35:11 +02:00
Florian Müllner
53d268a7ef st: Remove support for fixed positioning in BoxLayout
It is the job of layout containers to arrange their children; having
a hidden feature that *also* allows children to be positioned freely
outside the parent's allocation is just odd.
With the last user of the feature gone, kill it.

https://bugzilla.gnome.org/show_bug.cgi?id=703808
2013-07-09 23:19:20 +02:00
Lionel Landwerlin
f79a11d993 st-theme-node: init cached state properly 2013-07-09 11:25:28 +01:00
Lionel Landwerlin
9391d9d11b st-theme-node: reuse box-shadow materials between paint states when possible 2013-07-09 11:25:24 +01:00
Lionel Landwerlin
aee90a3116 st-theme-node: refactor calls to render css box 2013-07-09 11:24:26 +01:00
Lionel Landwerlin
318283fc70 st: optimize box-shadow rendering
Currently the box-shadow is rendering is done like this :

The first time we want to render a node that requires a box-shadow, St
creates an cogl offscreen surface of the size of the allocation and
renders the box into this offscreen buffer using modulation on the
alpha channel, this buffer is then blurred according to the CSS
parameters.

The problem with this method is that every time an StWidget is
resized, its box-shadow offscreen buffer has to be resized and
therefore rendered and blurred.

This patches propose an optimization for this use case by rendering
the box-shadow only once but at a size that is independent of the
StWidget's size. Then every time we need to paint this box-shadow, we
just render this offscreen buffer using a 9-slices.

This method only works when the allocation of the widget is bigger
than the minimum shadow size on which we can apply a 9-slices, that is
given my the radius of the corners. If the allocation is smaller than
this minimum size, we then fallback to the fully render/blur the
shadow (like before this patch).

https://bugzilla.gnome.org/show_bug.cgi?id=689858
2013-07-09 11:24:26 +01:00
Jasper St. Pierre
3582ba0c77 layout: Don't use the input mode to block events to windows
Instead, use the standard Clutter scene graph and our Chrome system.

This also removes our last use of the input mode, so remove that as
well.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-07-08 17:05:17 -04:00
Jasper St. Pierre
985d0c786c global: Automatically unshape the stage X window when we take a modal
This prevents the "client" from having to do it, and removes one part
of the FULLSCREEN input mode.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-07-08 17:05:17 -04:00
Jasper St. Pierre
9c8c282e08 global: Clean up the code that actually sets the shape on the stage
Instead of having "dummy" setters that do work, split out the parts
that do work into their own function.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-07-08 17:05:16 -04:00
Jasper St. Pierre
93dc7a51c0 Rework window / actor focus handling
The duality of the Clutter's key focus and mutter's window focus has long been
a problem for us in lots of case, and caused us to create large and complicated
hacks to get around the issue, including GrabHelper's focus grab model.

Instead of doing this, tie basic focus management into the core of gnome-shell,
instead of requiring complex "application-level" management to get it done
right.

Do this by making sure that only one of an actor or window can be focused at
the same time, and apply the appropriate logic to drop one or the other,
reactively.

Modals are considered a special case, as we grab all keyboard events, but at
the X level, the client window still has focus. Make sure to not do any input
synchronization when we have a modal.

At the same time, remove the FOCUSED input mode, as it's no longer necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-07-08 17:05:16 -04:00
Jasper St. Pierre
67f10ea7eb network-agent: Remove prototype of unused function
This causes a debug SpiderMonkey build to fail when it throws an
exception for the missing symbol, but doesn't properly return FALSE
when executing the script.

https://bugzilla.gnome.org/show_bug.cgi?id=703442
2013-07-02 14:17:38 -04:00
Jasper St. Pierre
1d9b25f771 Update gvc 2013-07-01 13:20:02 -04:00
Fran Diéguez
f8ec14d625 Updated Galician translations 2013-06-28 01:35:26 +02:00
Lionel Landwerlin
1d95b317ba st-widget: Fix paint state leak
https://bugzilla.gnome.org/show_bug.cgi?id=703160
2013-06-27 09:26:05 +01:00
Cosimo Cecchi
0b219bf8cb theme-node: fix support for box-shadow: none
We currently don't parse "box-shadow: none", despite being valid CSS.
Fix it so that it uses the default shadow values.

https://bugzilla.gnome.org/show_bug.cgi?id=702782
2013-06-25 10:11:31 -07:00
Florian Müllner
e70c0d3e2d st: Be more forgiving when calling get_theme_node() on unstaged widgets
While it is obviously still an error to call get_theme_node() on a
widget that hasn't been added to the stage hierarchy yet, asserting
on it hasn't proven too successful in avoiding those errors - it's
likely the most frequent reason for crash reports. Just accept that
there'll always be code paths where we can hit this case and make
it non-fatal.

https://bugzilla.gnome.org/show_bug.cgi?id=610279
2013-06-24 21:53:42 +02:00
Florian Müllner
6c2f3d1d17 main: Move pref overrides to JS
We will allow to use mode-specific overrides; in preparation for that,
move the code so that we only override preferences after initializing
the session mode.

https://bugzilla.gnome.org/show_bug.cgi?id=701717
2013-06-07 19:52:10 +02:00
Florian Müllner
673d7038d8 Restore gvc revision
Commit 9d54e46ce7 accidentally reverted to a previous revision.
2013-05-31 20:57:43 +02:00
Fran Diéguez
9d54e46ce7 Updated Galician translations 2013-05-31 01:04:06 +02:00
Adel Gadllah
0509bb9bb4 shell-gtk-embed: Lower tray icon windows to the bottom of the stack
Otherwise they break the "top level window" detection used by the
unredirect code in mutter, causes game windows not to be unredirected
when tray icons are present.

https://bugzilla.gnome.org/show_bug.cgi?id=701224
2013-05-30 00:57:37 +02:00
Rui Matos
944c28f3b3 status/keyboard: Synchronize input source switching with key events
Currently we simply set the gsettings key when activating an input
source. This obviously introduces a time window, between the event that
activates the switch and when the switch is complete, under which key
events are being delivered to applications and interpreted according
to the previous input source.

The patches in bug 696996 introduce a DBus API in g-s-d that allows us
to know when an input source if effectively active. Using that and
freezing keyboard events in the X server until we hear back from g-s-d
we can ensure that events won't be misinterpreted after an input
source switch.

https://bugzilla.gnome.org/show_bug.cgi?id=697007
2013-05-27 14:05:50 +02:00
Jasper St. Pierre
634ce34e00 global: Use the new mutter API for focusing the stage window
This way, we aren't "going behind mutter's back" about what the current
focused window is.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-05-24 17:44:17 -04:00
Colin Walters
ccfa3d3be1 Re-lock the screen if we're restarted from a previously crashed shell
This way we "fail closed", which is better for security.

See https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/1064584

https://bugzilla.gnome.org/show_bug.cgi?id=691987
2013-05-23 16:10:03 -04:00
Giovanni Campagna
976166a04a Finish removing the overlay_group concept
In preparation for removing from mutter too.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-05-22 18:34:05 +02:00
Florian Müllner
b20129c37e screenshot: Hide cursor while magnifier is active
As with the screen recorder, the magnifier already adds its own
copy of the system cursor, so we should not add it again. Just
as in the screen recorder case, we don't address the case where
the cursor should not be included in the screenshot, but the
magnifier adds it anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=700488
2013-05-22 18:33:16 +02:00
Florian Müllner
4fe1360b2c recorder: Hide cursor while magnifier is active
The magnifier adds its own copy of the system cursor to apply the
expected transformations, so we don't need to add it again in the
recorder; this avoids two different cursors showing up in recordings,
but doesn't address the case where the cursor should not be recorded
at all, but the magnifier adds it anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=700488
2013-05-22 18:33:16 +02:00
Jasper St. Pierre
9a79c71e88 global: Remove support for the NONREACTIVE input mode
As it's unused, this is a quick cleanup before we can go onto
more important things.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-05-22 12:11:19 -04:00
Florian Müllner
c68ccbf263 screenshot: Check for NULL window in screenshot_window()
screenshot_window() currently assumes a focus window, which will
result in a crash if that's not the case.

https://bugzilla.gnome.org/show_bug.cgi?id=700625
2013-05-19 15:32:06 +02:00
Florian Müllner
731e8bfe2b Replace 'enable-app-monitoring' setting
The org.gnome.desktop.privacy schema gained a 'remember-app-usage'
key, use that instead of our own preference.

https://bugzilla.gnome.org/show_bug.cgi?id=699714
2013-05-18 20:12:49 +02:00
Florian Müllner
248a0c1b6c recorder: Use workarea to position the recording icon
It looks a bit unpolished to overlap our own chrome with the recording
icon, which may happen when an existing adds UI at the bottom edge.
Fix this by using the primary monitor's workarea for the position rather
than the entire monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=700409
2013-05-18 14:29:26 +02:00
Giovanni Campagna
12ba2b222f Add a way to get backtraces from criticals and warnings
Attaching gdb and running with G_DEBUG=fatal-warnings is not a very
fast to debug a specific issue (especially if you have warnings at
startup, since then you need to run the shell from a terminal).
Instead, introduce a new SHELL_DEBUG environment variable that can
be set to backtrace-warning, causing a gjs_dumpstack() after every
warning or critical.

https://bugzilla.gnome.org/show_bug.cgi?id=700262
2013-05-14 23:25:11 +02:00
Jasper St. Pierre
4d663680d8 Fix build one more time
Third time's the charm.
2013-05-13 18:38:35 -04:00
Jasper St. Pierre
6505f8e94a Fix build on certain systems
The SCANNERFLAGS were wrong here.
2013-05-13 18:36:36 -04:00
Jasper St. Pierre
8891a41793 remoteMenu: Add support for submenu items
Wrap new GtkMenuTracker API that adds an easy way to bind to
tracker items, and use it to add back support for submenus.
This also adds support for a submenu feature that we didn't
have support for before, action namespaces.

https://bugzilla.gnome.org/show_bug.cgi?id=700257
2013-05-13 18:34:26 -04:00
Jasper St. Pierre
419f2dca15 remoteMenu: Port to GtkMenuTrackerItem
This pulls in new upstream API that Ryan will maintain, removing
code on our side.

Currently, our implementation of submenus will be gone, but this
will be fixed in a few commits.

https://bugzilla.gnome.org/show_bug.cgi?id=700257
2013-05-13 18:34:26 -04:00
Jasper St. Pierre
bfd1cc99a0 Add a separate ShellMenu GIR file for introspecting the copy/paste code
We'll need some of these pieces to be introspectable when we port to
GtkMenuTrackerItem. Due to technical limitations in introspection, we
can't put Gtk-prefixed items in the shell namespace, so add them to
a new introspection library instead.

https://bugzilla.gnome.org/show_bug.cgi?id=700257
2013-05-13 18:34:26 -04:00
Jasper St. Pierre
a6a2cea414 gtkactionmuxer: Reintroduce the passing of event timestamps
This is a hack we have in our local fork as compared to upstream;
work on a generic "hook" system in here is ongoing, but until then,
this is the easiest way to do it.

https://bugzilla.gnome.org/show_bug.cgi?id=700257
2013-05-13 18:34:26 -04:00
Jasper St. Pierre
10e857cebe Update copy/paste code from upstream
This includes a rename from the G* namespace to the Gtk* one, which
will help us with introspecting this code. Note that this removes
some of the custom code we added to GActionMuxer to relay event times
to the remote action group. We'll add this back soon.

https://bugzilla.gnome.org/show_bug.cgi?id=700257
2013-05-13 18:34:26 -04:00
Jasper St. Pierre
c72ae375c8 app-system: Remove last real use of shell_app_get_tree_entry
We want to replace our GMenuTreeEntries with GDesktopAppInfos

https://bugzilla.gnome.org/show_bug.cgi?id=698486
2013-05-12 14:45:36 -04:00
Jasper St. Pierre
0fd6ae5330 app-system: Use g_hash_table_iter_remove
glib now provides an iteration-safe way to remove items from
the hash table, so use it instead of building a separate list.

https://bugzilla.gnome.org/show_bug.cgi?id=698486
2013-05-12 14:44:42 -04:00