Commit Graph

835 Commits

Author SHA1 Message Date
Adel Gadllah
216be33fb9 StWidget: Be more verbose when aborting in get_theme_node
Give some context to make it easier to track down the offender.
2011-02-13 22:59:27 +01:00
Owen W. Taylor
69d25c975c StThemeNode: Add (out caller-annotates) annotations
Mark the ClutterActorBox return for a number of functions so we can use
them from Javascript.

https://bugzilla.gnome.org/show_bug.cgi?id=642192
2011-02-12 17:29:10 -05:00
Ray Strode
b4ec342d06 StThemeNodeDrawing: fill background behind translucent gradients
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
2011-02-10 18:24:30 -05:00
Ray Strode
0e23ec394e StThemeNodeDrawing: Ignore border fill in interior
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
2011-02-10 18:24:30 -05:00
Jasper St. Pierre
ce91d85bc0 Require gtk+3 3.0.0 and drop checks for minor versions. 2011-02-10 17:37:36 -05:00
Dan Winship
475c36048b lookingGlass: fix red border drawing in the inspector, port to JS
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
2011-02-10 16:04:16 -05:00
Dan Winship
e752aae669 gnome-shell: remove Xephyr support
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
2011-02-10 10:38:27 -05:00
Sardem FF7
c705b64d67 boxpointer: Use the right source center for the arrow pointing
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
2011-02-09 12:49:07 -05:00
Takao Fujiwara
1f154f6638 Fix press/release confusion when synthesizing clutter key events
We were generating presses for releases and vice-versa.

https://bugzilla.gnome.org/show_bug.cgi?id=641896
2011-02-09 12:01:53 -05:00
Owen W. Taylor
0d32017ffc Don't switch to a workspace when dragging it to launch on that workspace
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
2011-02-08 19:43:21 -05:00
Colin Walters
95e6eae23b Fixes for previous ShellAppSystem patch a138f59c
Wasn't amended by mistake.
2011-02-08 14:38:24 -05:00
Colin Walters
a138f59cb0 Use new GLib application API for launching
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
2011-02-08 10:43:39 -05:00
Dan Winship
c86a977564 St: drop StClickable, add some functionality to StButton
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
2011-02-07 12:45:48 -05:00
Florian Müllner
ab80c5080a theme-node: Fix box-shadows for prerendered textures
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
2011-02-07 18:22:33 +01:00
Dan Winship
bd04107593 tray: fix so that trayicons using symbolic icons get the right colors
The tray protocol only allows setting a single set of colors for all
symbolic trayicons; we use the message-tray's theme node to set that.

https://bugzilla.gnome.org/show_bug.cgi?id=641060
2011-02-07 10:01:12 -05:00
Dan Winship
e208c7e3dd tray: re-sync from panel, including _NET_SYSTEM_TRAY_COLORS support
https://bugzilla.gnome.org/show_bug.cgi?id=641060
2011-02-07 10:00:54 -05:00
Giovanni Campagna
b6749f4b60 BluetoothStatus: depend more on libgnome-bluetooth-applet
Ensure that a dependency is generated even when using --as-needed,
by adding a fake function that calls into the library.

https://bugzilla.gnome.org/show_bug.cgi?id=639324
2011-02-06 12:11:04 +01:00
Adel Gadllah
32d59861a0 shell_global_maybe_gc: Call gjs_context_maybe_gc instead of JS_MaybeGC
This handles native glibc memory allocations better see:
https://bugzilla.gnome.org/show_bug.cgi?id=640790

Also bump the minimum gjs version to 0.7.11

https://bugzilla.gnome.org/show_bug.cgi?id=640781
2011-02-06 00:25:45 +01:00
Maxim Ermilov
e3acaa05be Remove st_container_remove_all & rewrite st_container_destroy_children
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
2011-02-01 23:41:21 +03:00
Vincent Untz
8abbd5dacb tray: Fix handling of SYSTEM_TRAY_CANCEL_MESSAGE
We were not looking at the right field for the message ID: the ID is in
the 4th field for BEGIN_MESSAGE, but 2nd field for CANCEL_MESSAGE.
2011-02-01 12:13:47 +01:00
Vincent Untz
ed0fa7e1b7 tray: Stop using gdk_display_add_client_message_filter()
It just got removed in GTK+ 3, and we actually don't need it since we
look for ClientMessage in na_tray_manager_window_filter() anyway.
2011-02-01 12:13:12 +01:00
Florian Müllner
d9e778f501 Calendar: Fix UTC/local mixup
See https://bugzilla.gnome.org/show_bug.cgi?id=632109#c56

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-01-31 11:52:27 -05:00
David Zeuthen
885b6ffaef Calendar: Implement new mockup
https://bugzilla.gnome.org/show_bug.cgi?id=632109

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-01-31 11:52:27 -05:00
Jonathan Strander
2bcdae4d5d Include new GTK+ header for X11 extensions
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.
2011-01-30 13:53:03 -05:00
Adel Gadllah
361a115729 recorder: Call cairo_surface_mark_dirty on the cursor surface
Cairo surfaces have to be marked dirty after directly accessing
them.

This fixes the problem of the cursor not being in the recordings.
2011-01-24 23:03:59 +01:00
Dan Winship
4cb967f3ac shell-app-usage: fix tracking code
We were checking if the app was running, but then marking it as
recently-seen either way. Fix it to only update it when the app is
running.

https://bugzilla.gnome.org/show_bug.cgi?id=640447
2011-01-24 13:35:03 -05:00
Dan Winship
6f070319a0 shell-doc-system: fix %-escaping code in shell_doc_system_open()
It was escaping app_exec into app_exec_quoted, but then forgot about
it and went back to using app_exec.

https://bugzilla.gnome.org/show_bug.cgi?id=640447
2011-01-24 13:35:03 -05:00
Dan Winship
13edecde6c Remove set-but-unused variables, to appease gcc 4.6
https://bugzilla.gnome.org/show_bug.cgi?id=640447
2011-01-24 13:35:03 -05:00
Ray Strode
779d5462f2 StThemeDrawing: clip background to border
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
2011-01-24 12:23:11 -05:00
Ray Strode
03757c1fcb st-private: add cairo code for drawing shadow
This does the same thing as the cogl equivalent
code, but for handling fallbacks.

https://bugzilla.gnome.org/show_bug.cgi?id=636976
2011-01-24 12:23:11 -05:00
Ray Strode
1faee65a68 st-private: split pixel blurring code out
The guts are somewhat complicated, and
are potentially reusable for future cairo
fallback code.

https://bugzilla.gnome.org/show_bug.cgi?id=636976
2011-01-24 12:23:11 -05:00
Ray Strode
f7ab90b93b StTextureCache: add api to load image to cairo surface
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
2011-01-24 12:23:11 -05:00
Ray Strode
a7fa7d748d StThemeNodeDrawing: generalize render_gradient to render_background_with_border
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
2011-01-24 12:23:11 -05:00
Ray Strode
2b6d4ff279 StThemeNodeDrawing: clip background image shadow to outline
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
2011-01-24 12:23:11 -05:00
Ray Strode
06cea89dae StThemeNodeDrawing: clip background image to node allocation
When drawing the background image, we need to make sure
we don't draw outside the bounding rectangle of the node.

https://bugzilla.gnome.org/show_bug.cgi?id=636976
2011-01-24 12:23:11 -05:00
Ray Strode
260ca64e94 StThemeNode: Don't make border images and gradients mutually exclusive
Since we no longer use the same material for both purposes,
we can now remove the restriction that they are mutually exclusive.

https://bugzilla.gnome.org/show_bug.cgi?id=636976
2011-01-24 12:23:11 -05:00
Ray Strode
6dc4adfc13 StThemeNode: split border_texture into two vars
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
2011-01-24 12:23:11 -05:00
Ray Strode
e727c184ef StThemeNode: Split -st-shadow into three attributes
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
2011-01-24 12:23:11 -05:00
Adel Gadllah
8dcd70edbe St: Use clutter_actor_get_request_mode
Use clutter_actor_get_request_mode rather than g_object_get
since we have it in the required clutter version.

https://bugzilla.gnome.org/show_bug.cgi?id=640415
2011-01-24 14:41:52 +01:00
Adel Gadllah
c6baee2622 recorder: Switch to webm
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
2011-01-21 19:46:38 +01:00
Adel Gadllah
d6a6e6220a recorder: Force full stage redraws during recording
Partial redraws can result into artifacts in the recording,
so disable them while recording.

https://bugzilla.gnome.org/show_bug.cgi?id=640206
2011-01-21 19:10:31 +01:00
Florian Müllner
289d577bc1 st: Report correct paint volumes during transitions
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
2011-01-20 23:24:41 +01:00
Adel Gadllah
00ba937171 StScrollView: Implement real fade effect
Implement an edge fade effect (top/bottom) using a
ClutterOffscreenEffect subclass, replacing the former
shadow hack.

https://bugzilla.gnome.org/show_bug.cgi?id=639460
2011-01-20 20:53:20 +01:00
Alejandro Piñeiro
450291b856 Adding StLabel a11y support
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
2011-01-20 13:02:14 +01:00
Alejandro Piñeiro
125adb4d32 StWidgetAccessible: accessibility support for StWidget
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
2011-01-20 12:56:46 +01:00
Alejandro Piñeiro
13cc58937e Added a11y initialization code
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
2011-01-20 12:56:36 +01:00
Owen W. Taylor
28adc03cce StIcon: round icon size to an integer
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.
2011-01-19 11:54:03 -05:00
Cosimo Cecchi
a739f89dd1 texture-cache: add a missing array annotation 2011-01-19 16:43:50 +01:00
Maxim Ermilov
4bc078b5fd StTextureCache: Fix compilation warning 2011-01-18 01:32:02 +03:00
Maxim Ermilov
b0c6cf3fc5 add ability to search in web from search view
It use OpenSearch to define the search engines.
https://bugzilla.gnome.org/show_bug.cgi?id=623708
2011-01-18 00:41:59 +03:00
Florian Müllner
bed063eea1 generic-container: Queue a redraw in skip_paint()
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
2011-01-14 01:07:42 +01:00
Dan Winship
99a865fb0f ShellApp: is_on_workspace() should be TRUE for workspaceless apps
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
2011-01-13 12:16:38 -05:00
Dan Winship
b919dd7271 shell-app-system.h: clean up (indentation, order, etc)
https://bugzilla.gnome.org/show_bug.cgi?id=635089
2011-01-13 12:16:37 -05:00
Dan Winship
9ddf19a1a4 shell: remove ShellProcess
ShellProcess only existed to work around gjs bugs that have long since
been fixed, and has now been obsoleted by Util.spawn*. Kill it.

https://bugzilla.gnome.org/show_bug.cgi?id=635089
2011-01-13 12:14:40 -05:00
Owen W. Taylor
870be026d8 Install a GDK event handler to catch events queued by IBus
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
2011-01-13 12:00:55 -05:00
Giovanni Campagna
5412ce276c ExtensionSystem: introduce versioning
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
2011-01-12 20:34:25 +01:00
Dan Winship
4e45e28ea0 shell: disable libgnome-bluetooth debug spew
Centralize all the debug-spew-disabling here, and add
libgnome-bluetooth to the list.

https://bugzilla.gnome.org/show_bug.cgi?id=639236
2011-01-11 19:06:55 -05:00
Owen W. Taylor
d77409876c Clean generated stamp-st.h 2011-01-11 18:05:08 -05:00
Dan Winship
84bac4414c ShellGtkEmbed: revert to old actor/window position-syncing code
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
2011-01-10 15:22:50 -05:00
Giovanni Campagna
046308c582 StBoxLayout: add insert_before
Add st_container_move_before internal API, and
st_box_layout_insert_before, that inserts an actor before another
in the container.

https://bugzilla.gnome.org/show_bug.cgi?id=637681
2011-01-06 19:50:53 +01:00
Adel Gadllah
ceedc7e32c Implement cross overview drag & drop
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
2011-01-05 23:19:56 +01:00
Vincent Untz
7beb7e0f65 gnome-shell.in: Really never add empty elements to LD_LIBRARY_PATH
This complements the fix from c6eb2761, to make sure that we don't use
the pre-existing $LD_LIBRARY_PATH if it's set but empty.

Both commits fix CVE-2010-4000.

https://bugzilla.gnome.org/show_bug.cgi?id=638728
2011-01-05 10:54:38 +01:00
Florian Müllner
24f1e87813 clock: Use settings from gsettings-desktop-schemas
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
2011-01-04 17:14:00 +01:00
Giovanni Campagna
68a0d7897f Build: stop updating timestamp of st.h when not needed
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
2011-01-04 00:17:26 +01:00
Giovanni Campagna
0ba7188625 Remove Gtk 2 compatibility code
It is useless now that we require Gtk 3.

https://bugzilla.gnome.org/show_bug.cgi?id=638315
2010-12-30 21:36:37 +01:00
Owen W. Taylor
c546ad9720 Fix for gdk/x11 changes
Handle the move of gdk_window_lookup() and gdk_window_foreign_new()
into the gdk_x11_ namespace.
2010-12-22 16:26:08 -05:00
Giovanni Campagna
23f3af832c StIcon: fix typo
After having freed pending_texture, we should nullify it, not an
unrelated actor.
2010-12-21 22:54:27 +01:00
David Zeuthen
be96cb9291 Make gnome-shell-clock-preferences work again
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>
2010-12-20 15:07:10 -05:00
Colin Walters
bdfc516715 StTextureCache: Plug leaks in tiled image loading
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
2010-12-18 13:44:37 -05:00
Giovanni Campagna
9e99a8c25a Bluetooth status indicator
Introduce the new Bluetooth indicator in the System Status area. It
is written in JS with St and uses the new GnomeBluetoothApplet library.

https://bugzilla.gnome.org/show_bug.cgi?id=618312
2010-12-18 19:10:15 +01:00
Colin Walters
9f39ce5d27 Explicitly specify JS version
See bug 636652 for rationale.

https://bugzilla.gnome.org/show_bug.cgi?id=636983
2010-12-16 17:40:17 -05:00
Florian Müllner
cb5c18c783 st-theme-node: Support non-uniform border widths
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
2010-12-13 18:15:00 +01:00
Florian Müllner
cb2babb1a0 st-theme-node: Improve borders with gradient backgrounds
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-radius

https://bugzilla.gnome.org/show_bug.cgi?id=607500
2010-12-13 18:15:00 +01:00
Ray Strode
c648a5f117 StThemeNode: handle url() in inline styles better
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
2010-12-13 11:48:36 -05:00
Owen W. Taylor
8be2800486 ShellGlobal: Remove root_pixmap left-over
Still had a few references to the root_pixmap actor that was removed
when we switched to using the root actor support in Mutter.
2010-12-09 19:14:26 -05:00
Giovanni Campagna
a2528a7a98 StIcon: fill the structure corretly in _init
GSlice already fills with zeros when allocating, but we need to
set the shadow_material field appropriately.

https://bugzilla.gnome.org/show_bug.cgi?id=634814
2010-12-09 22:27:32 +01:00
Giovanni Campagna
2332e2b0c5 StIcon: remove implementation of ::map and ::unmap
They're not needed since Clutter 1.5.8, which internally
keeps a list of children, used by the default implementations of
::map and ::unmap.

https://bugzilla.gnome.org/show_bug.cgi?id=634814
2010-12-09 22:27:11 +01:00
Giovanni Campagna
a70f1f449b StIcon: don't show the icon until fully loaded
When updating the texture, keep the old one until the new one is
loaded.

https://bugzilla.gnome.org/show_bug.cgi?id=634814
2010-12-09 17:59:28 +01:00
Ray Strode
e425a183f7 gdm: pull async fix from upstream
This prevents a race at start up that could prevent the user
from getting loaded properly.

In the near future we need to drop the gdm user code entirely
and switch to using the accountsservice library.
2010-12-07 14:31:35 -05:00
Owen W. Taylor
ff77994204 Add missing deps for st-enum-types.h
st-enum-types.h needs to be regenerated when the St header files
change.
2010-12-06 17:33:33 -05:00
Jason D. Clinton
7ce65e421b Fix compilation against latest GTK+-3 changes
GDK_WINDOW_XWINDOW has been removed. All calls should use
gdk_x11_window_get_xid() instead.
2010-12-02 17:12:07 -06:00
Ray Strode
0c8941715d Rename side-by-side tiling key
It's now called edge_tiling since it can do more than
just side-by-side tiling.

https://bugzilla.gnome.org/show_bug.cgi?id=630548
2010-12-02 17:19:25 -05:00
Owen W. Taylor
d870fef122 StBoxLayout: report correct paint volume when scrolled
When scrolled, st_box_layout_apply_transform() includes the scroll
offset and affects paint volumes. This is right for our children, but
our paint volume is determined by our allocation and borders and
doesn't scroll, so we need to reverse-compensate, the same as we do
when painting.

https://bugzilla.gnome.org/show_bug.cgi?id=630932
2010-11-29 11:23:47 -05:00
Owen W. Taylor
6b723ed72a StImText: add get_paint_volume()
Since StImText isn't a StWidget, it needs it's own implementation
of get_paint_volume() to enable clipped redraws.

https://bugzilla.gnome.org/show_bug.cgi?id=630932
2010-11-29 11:23:47 -05:00
Adel Gadllah
56fb7e2c58 St: Take advantage of clipped redraws
In order to take advantage of clipped redraws (only redraw the
parts that actually changed), we have to inform clutter about
our paint_volume by implementing the get_paint_volume virtual
method.

As this feature had been added in in clutter 1.5.x we now require
that.

https://bugzilla.gnome.org/show_bug.cgi?id=630932
2010-11-29 11:23:47 -05:00
Florian Müllner
4f7a28863c st-icon: Add support for -st-shadow property
Add a drop shadow to the icon texture if the -st-shadow property is
specified.

https://bugzilla.gnome.org/show_bug.cgi?id=635608
2010-11-25 05:38:20 +01:00
Maxim Ermilov
65f0b483f8 messageTray: make links in message banners clickable
https://bugzilla.gnome.org/show_bug.cgi?id=610219
2010-11-24 02:38:08 +03:00
Owen W. Taylor
4800f63c3a Correct and simplify setting the GJS module path
We were going to great effort to include the normal directories in the
GJS search path and the code to to do this broke recently when
jsdir and jsnativedir were moved to gjs-internals-1.0.pc. However, it
was actually unnecessary since the standard directories are appended
to the default path.

(We continue to use a GNOME_SHELL_JS envvar separate from GJS_PATH
for the Shell to enable the somewhat unlikely case where someone wants
to invoke the shell specifying a GJS_PATH.)

https://bugzilla.gnome.org/show_bug.cgi?id=635367
2010-11-22 10:21:45 -05:00
Owen W. Taylor
1fce237538 StThemeNode: suppress compiler warnings and fix minor bugs
Aggressive compiler flags can cause the compiler to be smart enough
to inline functions and detect variables not being set on certain
code paths but not smart enough to understand the overall logic;
add some extra initializations to suppress the warnings.

Fix several minor bugs in the logic found when double checking the
logic before adding the initializations.

Based on a patch by Marc-Antoine Perennou <Marc-Antoine@Perennou.com>.

https://bugzilla.gnome.org/show_bug.cgi?id=634225
2010-11-20 14:14:57 -05:00
Florian Müllner
1c8955b34a shell-util: Add helper to hide actors from pick
At times it is desireable to hide actors from being picked even
with a mode of CLUTTER_PICK_ALL.

Currently we use a pattern of
    clutter_actor_hide();
    clutter_stage_get_actor_at_pos();
    clutter_actor_show();
in these cases, which gets hideous if the actor we want to exclude
from the pick is located in another module.

A more elegant solution is to connect a handler to the ::pick signal,
which stops further emission.

Credit for the idea goes to Owen Taylor.

https://bugzilla.gnome.org/show_bug.cgi?id=634560
2010-11-18 20:27:55 +01:00
Owen W. Taylor
e5a802bf99 Use the new "background actor" functionality in Mutter
The code to draw the root background has now been moved into Mutter,
with added smarts to not draw obscured portions. Remove the old
version of the code and clone the Mutter background actor to draw
the background in the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=634836
2010-11-18 14:03:37 -05:00
Owen W. Taylor
909f2e670a ShellTrayManager: fix icon actor memory management
We weren't actually referencing the ShellTrayIcon actors at all
on creation, but would unreference them when they were removed,
causing crashes.

When we reference the actors, use g_object_ref_sink() so that
memory management is consistent whether or not the actors are
subsequently added to a parent actor.

Thanks for Jon McCann for help in tracking this down.

https://bugzilla.gnome.org/show_bug.cgi?id=635141
2010-11-18 13:52:35 -05:00
Giovanni Campagna
21ac225981 StIcon: add support for GIcon
Add a "gicon" property so that a GIcon can be used instead of an
icon name, while still getting icon recoloring from the theme.
Also include a compatibility wrapper in libshell until GJS has
support for interface static methods.

https://bugzilla.gnome.org/show_bug.cgi?id=622451
2010-11-16 22:11:27 +01:00
Giovanni Campagna
aa91491730 StTooltip: Rework to use StLabel
Replaces the internal ClutterText with StLabel, so full CSS
styling is supported.

https://bugzilla.gnome.org/show_bug.cgi?id=622450
2010-11-16 19:22:01 +01:00
Owen W. Taylor
8734a59cd7 Handle icon theme changes
Connect to the "changed" signal on the default icon theme, and
when it triggers:

 - Evict all cached looked up icons from the StTextureCache
 - Fake a style change on all StThemeContext; this will result
   in StIcon looking up icons again.

https://bugzilla.gnome.org/show_bug.cgi?id=633866
2010-11-15 18:45:36 -05:00
Colin Walters
e90504953f gnome-shell: When creating an extension, print where we created it
This makes it easier to find.
2010-11-15 18:43:15 -05:00
Giovanni Campagna
141b4ffe87 StFocusManager: don't unref removed groups
It is not referencing them when adding, and also it is connecting
to the "destroy" signal, emitted on dispose, so there is no risk
of storing finalized objects.

https://bugzilla.gnome.org/show_bug.cgi?id=634781
2010-11-14 20:51:27 +01:00
Owen W. Taylor
3138b20b11 Skip drawing transparent borders and backgrounds
We were always drawing the border and background of each
StThemeNode, even if they were transparent. The simple
optimization of checking the alpha provides a significant
performance boost (in a quick test, it increased the
overviewFpsSubsequent metric in the core performance test
from 28fps to 35fps).

https://bugzilla.gnome.org/show_bug.cgi?id=634752
2010-11-13 10:12:40 -05:00
Rico Tzschichholz
e8917e2d6f Fix build of run-js-test
https://bugzilla.gnome.org/show_bug.cgi?id=634736

Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
2010-11-13 10:26:48 +01:00
Owen W. Taylor
dc1e23501c Remove _for_theme() variant of st_texture_cache_load_icon_name()
Now that we're using St.Icon in the Javascript, there is no reason
to have separate st_texture_cache_load_icon_name() and
st_texture_cache_load_icon_name_for_theme(), instead just add
the StThemeNode argument to st_texture_cache_load_icon_name().

https://bugzilla.gnome.org/show_bug.cgi?id=633866
2010-11-12 17:36:26 -05:00