Commit Graph

909 Commits

Author SHA1 Message Date
Colin Walters
c975740f92 st-private: Correct fix for memory leak
The previous fix in 72f9f482d was wrong; we need to keep around
the buffer until cairo is done with the pattern.

https://bugzilla.gnome.org/show_bug.cgi?id=649497
2011-05-11 11:23:53 -04:00
Colin Walters
72f9f482d6 st-private: Fix memory leak
==13810== 11,360 bytes in 1 blocks are definitely lost in loss record 18,574 of 18,765
==13810==    at 0x4005447: calloc (vg_replace_malloc.c:467)
==13810==    by 0x5191882: standard_calloc (gmem.c:107)
==13810==    by 0x51920A7: g_malloc0 (gmem.c:196)
==13810==    by 0x4056201: blur_pixels (st-private.c:466)
==13810==    by 0x40573B4: _st_create_shadow_cairo_pattern (st-private.c:710)
==13810==    by 0x4070746: st_theme_node_paint (st-theme-node-drawing.c:856)
==13810==    by 0x3FEFFFFF: ???

https://bugzilla.gnome.org/show_bug.cgi?id=649497
2011-05-05 16:02:00 -04:00
Maxim Ermilov
88de26138a shell-xfixes-cursor: missing XFree
memory returned by XFixesGetCursorImage should be freed after usage.
https://bugzilla.gnome.org/show_bug.cgi?id=642652
2011-05-05 23:49:57 +04:00
Jasper St. Pierre
74a39ae57c shell-app: Fix a case where last_user_time isn't updated.
When activating an uninteresting window, the last_user_time isn't updated,
because we aren't tracking the window that the user_time gets updated on.
Hack around this by setting the last_user_time in shell_app_activate when
activating an uninteresting window.

https://bugzilla.gnome.org/show_bug.cgi?id=643302
2011-05-04 12:10:52 -04:00
Ray Strode
0d440bb0a2 StTooltip: add missing break statement
This commit is a small fix to prevent the
tip area property setter code from erroneously
falling through to the unhandled property case.

https://bugzilla.gnome.org/show_bug.cgi?id=648894
2011-04-29 09:45:19 -04:00
Dan Winship
79927faaec shell-global: remove some no-longer-used methods
https://bugzilla.gnome.org/show_bug.cgi?id=648755
2011-04-27 15:32:26 -04:00
Dan Winship
e4c7f1f3c4 St: require libcroco >= 0.6.2
and remove the workaround for the parsing bug in earlier versions

https://bugzilla.gnome.org/show_bug.cgi?id=648760
2011-04-27 15:29:24 -04:00
Jasper St. Pierre
68710c4647 Revert "shell-app: Fix a case where last_user_time isn't updated."
This reverts commit 7d7cbde1f3.

This was acidentally pushed.
2011-04-27 12:53:33 -04:00
Jasper St. Pierre
7d7cbde1f3 shell-app: Fix a case where last_user_time isn't updated.
When activating an uninteresting window, the last_user_time isn't updated,
because we aren't tracking the window that the user_time gets updated on.
Hack around this by setting the last_user_time in shell_app_activate when
activating an uninteresting window.

https://bugzilla.gnome.org/show_bug.cgi?id=643302
2011-04-27 11:12:27 -04:00
Guillaume Desmottes
227da25776 Move Telepathy utility functions from shell-global to shell-tp-client
https://bugzilla.gnome.org/show_bug.cgi?id=645585
2011-04-27 10:43:17 +02:00
Guillaume Desmottes
145bf19636 add shell-tp-client
https://bugzilla.gnome.org/show_bug.cgi?id=645585
2011-04-27 10:43:17 +02:00
Alejandro Piñeiro
cae3414854 [a11y] Use StWidget::label-actor on StWidgetAccessible
It uses this label-actor to set the proper atk relationships
between the widget and his label
2011-04-27 02:09:11 +02:00
Alejandro Piñeiro
90d061edaf Add a new property StWidget:label-actor
This property represents that the widget is being labelled by an
actor. The name is label-actor to avoid problems with the current
StButton:label and StTooltip:label
2011-04-27 02:09:10 +02:00
Adam Dingle
a87f51487e Display dialogs on the primary monitor when no window has focus.
Before this change, we displayed dialogs on the monitor containing the
focused window if there was any, otherwise on monitor 0.  We now use
the primary monitor rather than monitor 0 when no window has focus.

https://bugzilla.gnome.org/show_bug.cgi?id=648305
2011-04-26 21:09:41 +02:00
Colin Walters
f4852d7264 ShellWindowTracker: Ensure WM_CLASS remains canonical if it matches
I unintentionally made .desktop->pid association "win" over
WM_CLASS.  Fixing this makes the case of ancillary .desktop file
entry points (e.g. gnome-control-center's various shortcut .desktop
files) correctly show System Settings, and not whatever the shortcut
is.

In the future I'd like to have a way to say "this .desktop file
is a shortcut, ignore me" or something.

https://bugzilla.gnome.org/show_bug.cgi?id=646689
2011-04-20 15:04:57 -04:00
Colin Walters
42e26a8682 dbus: Avoid losing org.freedesktop.Notifications on replacement
We weren't specifying _ALLOW_REPLACEMENT for anything except
org.gnome.Shell, which created a race - if the exiting process
didn't exit fast enough, the replacing process would fail
to get the name.

https://bugzilla.gnome.org/show_bug.cgi?id=646257
2011-04-13 09:41:33 -04:00
Colin Walters
db6caac9cc ShellWindowTracker: Follow transients for focus app
As a side effect of (see bug 642221), we no longer put docks or
transient windows into the hash table mapping windows to apps.  The
"focused application" code relied on at least transients being in
there.

Fix this by calling the public API to map a window to an app, which
will at least follow transients.  Whether we also want further
matching here (e.g. with window grouping) is another issue, but that
can happen as a different bug.

https://bugzilla.gnome.org/show_bug.cgi?id=647082
2011-04-12 17:57:20 -04:00
Dan Winship
a56bc9d933 st_label_set_text: no-op if the text is unchanged
If a caller sets an StLabel's text to what it already is (as, eg, the
clock menu does), do nothing. Unless the label is editable, in which
case, setting the text has a visible side effect (dropping the
selection), so we don't optimize that out.

https://bugzilla.gnome.org/show_bug.cgi?id=645648
2011-04-11 14:00:16 -04:00
Dan Winship
6abb86dff6 src/Makefile.am: two fixes to the gnome-shell wrapper handling
Add an uninstall-hook to undo the effect of install-exec-hook, and add
an $(AM_V_GEN) to the rule that copies either gnome-shell-real or
gnome-shell-jhbuild to gnome-shell.

https://bugzilla.gnome.org/show_bug.cgi?id=646730
2011-04-11 10:58:50 -04:00
Owen W. Taylor
b9828bf5de StScrollbar: clean up properly when unmapped during scroll
If we're unmapped (or destroyed) during a scroll, we want to clean
up the changes we've made to Clutter's event handling, remove our
signal handler, and emit ::scroll-stop.

https://bugzilla.gnome.org/show_bug.cgi?id=646825
2011-04-05 12:10:13 -04:00
Owen W. Taylor
7e9594456b Require and build against Mutter 3.0 2011-04-04 17:21:16 -04:00
Colin Walters
92f09a60f6 Add shell_get_file_contents_utf8_sync(), use it instead of gio temporarily
Adding correct annotations to Gio.File.load_contents revealed that gjs
doesn't actually support array+length combinations.  For 3.0 this would
be invasive to fix, so add a method to ShellGlobal which does what
we need.

https://bugzilla.gnome.org/show_bug.cgi?id=646333
2011-04-04 09:08:33 -04:00
Owen W. Taylor
905c4bb4a5 Add shell_util_get_transformed_allocation()
Add a function that gets the current allocation of an actor
transformed into stage coordinates. This avoids a misfeature of
clutter_actor_get_transformed_size() where when a size request is
queued (even if it won't eventually change the size), the returned
value is the transformed size request rather than the last allocation.

https://bugzilla.gnome.org/show_bug.cgi?id=645744
2011-03-28 15:27:10 -04:00
Giovanni Campagna
c1ba920c86 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

Was accidentally removed, as part of the switch to building
a gnome-shell binary, reapplying the original patch. - Owen

https://bugzilla.gnome.org/show_bug.cgi?id=645596
2011-03-25 21:39:22 -04:00
Owen W. Taylor
fc49fb2f4f Improve checks for XFixes pointer barriers
Instead of checking on version (which doesn't work when protocol
and libraries are out of sync), just check for the functions we
need.

https://bugzilla.gnome.org/show_bug.cgi?id=645630
2011-03-25 21:13:57 -04:00
Colin Walters
c97a8602a1 ShellAppSystem: Only search gnomecc.menu for preferences
settings.menu was removed in gnome-menus commit
b68bcd27f44ce2c494f6e3cd9695890b9c02af04; gnomecc.menu is the intended
replacement.

(On Red Hat Linux derived systems, settings.menu continues to exist)

https://bugzilla.gnome.org/show_bug.cgi?id=645063
2011-03-25 10:35:38 -04:00
Colin Walters
090d54516e main: Allow replacement of org.gnome.Shell name
This was an oversight in the previous commit; if we don't
do this, then we just can't --replace.

https://bugzilla.gnome.org/show_bug.cgi?id=645593
2011-03-23 17:23:47 -04:00
Colin Walters
c91b716a63 main: Use --replace semantics for org.gnome.Shell DBus name
Previously (because I suck) we were ignoring the return value of
RequestName, and so we'd totally ignore the fact that we failed
to acquire the DBus name.

Make this consistent by using meta_get_replace_current_wm() and
if we're in --replace, actually replace immediately.

https://bugzilla.gnome.org/show_bug.cgi?id=645593
2011-03-23 16:13:51 -04:00
Owen W. Taylor
281b2e9b0e St: Fix blur radius computation to correspond to current CSS draft
The next draft of the CSS Backgrounds and Borders module will actually
define when the blur radius means. Fix our code to use that definition
(2 * standard deviation) rather than using the 1.9 * that we extracted
from what Mozilla was doing.

https://bugzilla.gnome.org/show_bug.cgi?id=632506
2011-03-22 15:53:49 -04:00
Florian Müllner
4208078750 st-texture-cache: Fix stretched images
Some functions in StTextureCache enforce square ClutterTextures,
even in cases where the underlying CoglTexture has a different
width:height ratio.
Add padding in those cases to keep the resulting image from being
stretched.

https://bugzilla.gnome.org/show_bug.cgi?id=643866
2011-03-22 19:35:21 +01:00
Owen W. Taylor
80eb37ef60 Constrain tooltips to monitors
Use st_tooltip_set_constrain_func() to set a function that constrains
tooltips to be on the same monitor as the original tip area.

https://bugzilla.gnome.org/show_bug.cgi?id=645547
2011-03-22 12:38:26 -04:00
Owen W. Taylor
d19cdc206b StTooltip: Add the ability to set a hook to constrain the tooltip
If, for example, the stage is divided into multiple monitors, we
might want to constrain tooltips so they don't cross monitor boundaries.
Add a function to set a per-stage callback to constrain tooltips.

https://bugzilla.gnome.org/show_bug.cgi?id=645547
2011-03-22 12:38:26 -04:00
Owen W. Taylor
a5d3259cfe StTooltip: use a timeout like GtkTooltip
Instead of showing tooltips immediately on hover, wait until a timeout
after the last motion (timeout is given by the gtk-tooltip-timeout
GtkSetting.)

https://bugzilla.gnome.org/show_bug.cgi?id=642871
2011-03-22 12:38:25 -04:00
Giovanni Campagna
087e86fb32 StTooltip: fix various warnings and use Clutter API correctly
Use ClutterContainer functions for adding the tooltip instead of
calling clutter_actor_set_parent behind the stage's back, and do
it inside st_widget_show_tooltip (which is a normal method) instead
of overriding st_tooltip_show, which is a vfunc and it is called
internally by Clutter, therefore it is limited in what it can safely
do.
Also, instead of positioning the tooltip with clutter_actor_set_position,
modify the anchor point when the associated widget moves, so that
only a redraw is queued.

https://bugzilla.gnome.org/show_bug.cgi?id=635100
2011-03-22 16:13:38 +01:00
Giovanni Campagna
afffa76c17 Make St aware of the UI group.
Inside the Shell, all the UI (including chrome, the overview, and
the actual windows) is not a child of the stage but of a special
ClutterGroup, which is cloned inside the magnifier.
Add function for setting this special actor so that actors added by
St are visible in the magnifier. Nothing yet uses this, but the
tooltip will soon.

https://bugzilla.gnome.org/show_bug.cgi?id=635100
2011-03-22 16:09:23 +01:00
Florian Müllner
e2cb6cc4da st-texture-cache: Request large thumbnails
As of commit 34ce17c4b3, search results use large icons, or thumbnails
when available. To keep the amount of upscaling for the latter as small
as possible, request a large thumbnail size.

https://bugzilla.gnome.org/show_bug.cgi?id=645493
2011-03-22 11:42:07 +01:00
Giovanni Campagna
54e3a54489 Transition the ShellApp state when ready.
shell_app_state_transition emits a signal, so invoke it only when
ready, or signal handlers will see an object which is in an invalid
state.

https://bugzilla.gnome.org/show_bug.cgi?id=632501
2011-03-21 22:42:25 -04:00
Jasper St. Pierre
c58b8498b3 st: Add more error checking to shadow-related code
The additional error checks should catch quite some warnings (e.g.
when trying to create a shadow for a 0-width actor).
2011-03-21 23:25:42 +01:00
Alexander Larsson
1518dc9b60 Add pointer barriers to panel and message tray
If you have XFixes 5 (and corresponding xserver support) then we
add barriers on the panel and in the message tray corner so that
its easy to reach the corners even when there are monitors to the
sides of the primary monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=622655
2011-03-21 21:03:19 +01:00
Dan Winship
2782011ce8 shell-global: try to resync the pointer state after grabs
If the pointer moves on or off the stage while another process has a
grab, we will lose track of it. One example of this is that if you use
a popup menu from a message tray trayicon, the tray will stay up after
the menu goes away, because the shell never saw the pointer leave it.

Add a new method shell_global_sync_pointer() that causes clutter to
recheck what actor is under the pointer and generate leave/enter
events if appropriate.

Of course, we can't actually tell for sure when another process has a
grab, so we need a heuristic of when to call this. Currently we call
it from Chrome._windowsRestacked(), which is not really the right
thing at all, but does fix the menu-from-trayicon case...

https://bugzilla.gnome.org/show_bug.cgi?id=630842
2011-03-21 14:56:53 -04:00
Dan Winship
7f17fcfafc messageTray: forward clicks on trayicon SummaryItems to the icon
If the user clicks on the title of a trayicon's SummaryItem, forward
that click to the trayicon. Also adjust
gnome_shell_plugin_xevent_filter() so that if the trayicon takes a
grab as a result of this, we don't hide the message tray.

https://bugzilla.gnome.org/show_bug.cgi?id=630842
2011-03-21 14:56:53 -04:00
Dan Winship
e886a3d891 StButton: fix handling of Space/Enter -> click
StButton was mistakenly considering any Space/Enter KEY_RELEASE to be
a click, when in fact it should only count as a click if it also got
the corresponding KEY_PRESS as well. This meant that when typing in a
chat notification, any Space/Enter keypress would dismiss the
notification, since the StEntry would take the PRESS event but ignore
the RELEASE, allowing it to propagate to the notification itself,
which would treat it as a click.

https://bugzilla.gnome.org/show_bug.cgi?id=645243
2011-03-21 10:18:46 -04:00
Dan Winship
206f4604a4 gnome-shell: fix restart after rebuild
Alt+F2 restart was failing after a rebuild when running from the
source tree because it would try to restart
".libs/lt-gnome-shell-real", which didn't exist yet. Fix this by using
"libtool --mode=execute" at build time to regenerate that file.

https://bugzilla.gnome.org/show_bug.cgi?id=645390
2011-03-21 09:20:23 -04:00
Owen W. Taylor
adbc1d97a0 StThemeNode: support border-image: none
Treat border-image: none as a valid specification that overwrites any
previously specified border image.

https://bugzilla.gnome.org/show_bug.cgi?id=644788
2011-03-21 09:16:32 -04:00
Maxim Ermilov
77cdb17cee ShellAppSystem: dynamically generate known_vendor_prefixes
It create prefix based on desktop file's id and desktop file's path and vendor_prefix.
https://bugzilla.gnome.org/show_bug.cgi?id=620464
2011-03-20 23:39:38 +03:00
William Jon McCann
dd99ed73a9 Fallback to using a generic when requested image isn't found
Use a type specific generic image when the requested icon
can't be loaded instead of using an empty texture.

https://bugzilla.gnome.org/show_bug.cgi?id=644668
2011-03-17 14:02:04 -04:00
Alexander Larsson
2c5657e8a9 Enable the workspaces_only_on_primary feature of mutter
https://bugzilla.gnome.org/show_bug.cgi?id=609258
2011-03-17 14:13:55 +01:00
Alexander Larsson
d8bd9f5a66 Add and export shell_global_get_primary_monitor_index
https://bugzilla.gnome.org/show_bug.cgi?id=609258
2011-03-16 20:33:25 +01:00
Alexander Larsson
079953c3ee Switch to using the mutter primary monitor APIs
https://bugzilla.gnome.org/show_bug.cgi?id=609258
2011-03-16 20:30:58 +01:00
Colin Walters
fea8b6da2f Remove broken ShellAppSystem API and all consumers
In commit 9bd22dc0, I introduced an API to load an arbitrary
.desktop file, not necessarily from the menu path.  It turns
out this function was broken because it created ShellApp instances
that were *different* from ones that were cached normally.

As far as I can tell, we didn't initially use it.  Then later
Util.spawnDesktop was created which used this function.

Remove this broken function and all callers; if we're loading
.desktop files from *outside* the menu path, we can look at
readding.

This patch also kills off Util.spawnDesktop in favor of callers
talking to ShellAppSystem directly, now that the latter reports
errors.

https://bugzilla.gnome.org/show_bug.cgi?id=644402
2011-03-16 15:07:22 -04:00