Commit Graph

1103 Commits

Author SHA1 Message Date
Dan Winship
43020b20b7 ShellWindowTracker: don't create ShellApps for non-interesting windows
If a process does not have any "interesting" windows, then it can't be
considered a running app. (Previously we were calling
get_app_for_window() before ruling out non-interesting windows, which
ended up calling _shell_app_new_for_window(), which would add the
window to the ShellApp directly, bypassing the is_interesting check.)

https://bugzilla.gnome.org/show_bug.cgi?id=642221
2011-03-15 15:37:08 -04:00
Adel Gadllah
982d8a0dc0 build: Fix TelepathyLogger version requirement
We are supposed to require the 0.2 gir file not 1.0.
2011-03-15 00:15:26 +01:00
Jasper St. Pierre
525da01a62 shell-global: Add wrappers for TelepathyLogger
gjs can't support more than one callback in the same function,
so work around this with yet another shell-global wrapper.

https://bugzilla.gnome.org/show_bug.cgi?id=643377
2011-03-14 18:49:31 -04:00
Jasper St. Pierre
ebcb87c163 shell-global: Add shell_get_self_contact_features
This is another workaround for the lack of gjs supporting array
arguments, this time wrapping tp_connection_upgrade_contacts to
add new features to the connection's self contact.

https://bugzilla.gnome.org/show_bug.cgi?id=642793
2011-03-14 18:48:18 -04:00
Owen W. Taylor
7ad89dc46b Work around Spidermonkey problem with Unicode date formats
Monkey-patch Date.prototype.toLocaleFormat() with a version that uses
g_date_time_format() since the Spidermonkey built-in can't handle
format strings with Unicode characters.

https://bugzilla.gnome.org/show_bug.cgi?id=643350
2011-03-14 15:33:44 -04:00
Giovanni Campagna
44d61e6857 Remove use of G_CONST_RETURN macro.
This is going to be deprecated.

https://bugzilla.gnome.org/show_bug.cgi?id=644632
2011-03-13 22:03:47 +01:00
Owen W. Taylor
d3703516d9 Fix handling of clutter_init() failures
clutter_init() fails under normal circumstances like
being unable to open a display connection, so it shouldn't
be handled with g_error() producing a core dump.

Clutter consistently produces an error message when
clutter_init() fails, so we don't need to print out any
error message.

https://bugzilla.gnome.org/show_bug.cgi?id=643910
2011-03-13 14:29:47 -04:00
Colin Walters
bdebaa986b Silence -Werror for other clutter_init callers 2011-03-13 14:16:54 -04:00
Colin Walters
c2d400846b test-theme: Pacify -Werror for clutter_init 2011-03-13 14:11:33 -04:00
Adel Gadllah
43cf60f563 StScrollViewFade: Fix GLSL shader to work on r300 hardware
The number instructions in a shader is limited to 64 on r300 hardware,
the fade shader in StScrollViewFade was ending up using 97 instructions
which is way over the limit.

So refactor the shader to use less instructions by precomputing as many
values as possible outside of the conditionals. The resulting shader
ends up using 34 instructions which is well within the hardware limits.

https://bugzilla.gnome.org/show_bug.cgi?id=644589
2011-03-13 16:29:18 +01:00
Giovanni Campagna
057348763b StTextureCache: generate icon names in the right order
GThemedIcon expects the first name to be the most specific, and
will thus prefer it to later ones. We thus need to order the names
from the longer to the shorter.

https://bugzilla.gnome.org/show_bug.cgi?id=621707
2011-03-13 14:46:42 +01:00
Owen W. Taylor
821583acae Use gnome-shell-perf-helper to control windows during perf tests
* Run gnome-shell-perf-helper during performance tests
* Use MUTTER_WM_CLASS_FILTER to omit all other windows
* Add new Scripting methods: createTestWindow,
  waitTestWindows, destroyTestWindows
* Create a single 640x480 test window for testing overview
  animation performance.

https://bugzilla.gnome.org/show_bug.cgi?id=644265
2011-03-11 19:21:07 -05:00
Owen W. Taylor
c6a2814881 gnome-shell-perf-helper: add server for creating test windows
Add a small D-Bus server program that the performance tests can
use to create well-specificed sets of windows.

https://bugzilla.gnome.org/show_bug.cgi?id=644265
2011-03-11 19:21:07 -05:00
Owen W. Taylor
1954a02352 gnome-shell-jhbuild: Fix race condition when launching DConf manually
We need to connect to the NameOwnerChanged signal before we execute the
DConf binary. Refactor things so that we connect to the signal when
we first get the bus object. Split the code for waiting for a D-Bus
name into a wait_for_dbus_name() function for latter reuse.

https://bugzilla.gnome.org/show_bug.cgi?id=644265
2011-03-11 19:21:06 -05:00
Florian Müllner
7c937c8704 gvc: Fix missing introspection
It's all Bastien's fault
2011-03-11 17:50:49 +00:00
Florian Müllner
cbb8876815 gvc: Fix introspection building 2011-03-11 16:29:40 +00:00
Bastien Nocera
f8cdaaae30 gvc: Update from gnome-control-center
https://bugzilla.gnome.org/show_bug.cgi?id=644511
2011-03-11 16:29:40 +00:00
Colin Walters
74314bacd7 Remove DYNAMIC_MOZJS_HACK bits
Not used anymore now that gnome-shell is a real ELF binary with an
rpath.
2011-03-11 10:30:33 -05:00
Colin Walters
04473f607b gnome-shell-jhbuild: exit 1 if gnome-shell-real failed
We need to be propagating the failure exit code so that
gnome-session knows something went wrong.
2011-03-11 10:30:33 -05:00
Dan Winship
49f6280645 src: add more stuff to gnome_shell_real_LDADD
to work with libtools that are more strict about not allowing
transitive dependencies
2011-03-08 11:47:14 -05:00
Dan Winship
84eb66d5aa StContainer: simplify focus navigation
When navigating from a non-immediate descendant of a container, we
were attempting to use clutter_actor_get_transformed_position() to get
the exact position of that actor relative to the container, but this
did not really make sense, since we would be using the position of
the intermediate container when navigating back.

https://bugzilla.gnome.org/show_bug.cgi?id=644134
2011-03-08 09:36:55 -05:00
Dan Winship
026fc531ba StTextureCache: never return fullcolor icons for ST_ICON_SYMBOLIC
g_themed_icon_new_with_default_fallbacks() does not do what we want
with symbolic icons; if the user's icon theme is not "gnome", then it
will end up preferring a non-symbolic icon from the higher-level theme
over a symbolic icon from gnome-icon-theme-symbolic.

If the shell requests a symbolic icon, and there is only a
non-symbolic icon available, that should be considered a programmer
error, just like requesting a non-existent icon name. So change the
code to only look up "-symbolic" names when drawing an
ST_ICON_SYMBOLIC icon.

https://bugzilla.gnome.org/show_bug.cgi?id=644142
2011-03-08 09:36:55 -05:00
Owen W. Taylor
46ffff8438 Add missing files to CLEANFILES 2011-03-08 00:41:38 -05:00
Owen W. Taylor
8dcd08f47e Fix srcdir != builddir issues
* calendar-server subdirectory of build directory needs to
  be created.
* Generate shell-enum-types.c/.h in build directory rather than
  in the possibly-read-only source directory.
2011-03-08 00:41:38 -05:00
Emmanuele Bassi
d4b7a3478e build: Fix LDADD for gnome-shell-real
Use the libtooled shared object, and the dependency on it.
2011-03-08 00:51:27 +00:00
Dan Winship
e187961d72 src: update for mutter include reorganization
https://bugzilla.gnome.org/show_bug.cgi?id=641724
2011-03-07 18:33:33 -05:00
Dan Winship
ae96b0c971 Use libmutter-wm, and build a real gnome-shell binary
Build gnome-shell as a binary linked against libmutter-wm, instead of
a module to be loaded by libmutter-wm. Move the majority of
initialization-type stuff from gnome_shell_plugin_start() into main().

We still build libgnome-shell as a shared library, so that the linker
doesn't discard all the methods that are never called from C.

https://bugzilla.gnome.org/show_bug.cgi?id=641724
2011-03-07 18:33:33 -05:00
Dan Winship
0cccf1d4cc viewSelector: add Applications pane and search entry to Ctrl-Alt-Tab
Add Ctrl-Alt-Tab support to ViewTab, and fix the Applications pane to
scroll to track the keyboard focus.

The Windows pane can be switched to, but navigation within the pane is
not yet implemented.

https://bugzilla.gnome.org/show_bug.cgi?id=618887
2011-03-07 11:15:05 -05:00
Dan Winship
fe16f2b058 St: add a popup-menu signal to StWidget
Add a popup-menu signal to StWidget, and emit it if the user types the
Menu key or Shift+F10 while the widget is focused.

https://bugzilla.gnome.org/show_bug.cgi?id=618887
2011-03-07 11:15:05 -05:00
Dan Winship
ef6cce8988 popupMenu, panelMenu: split up panel and non-panel keynav
PopupMenuManager was pretending that it knew nothing about the menu's
sourceActors, while also trying to handle keynav between them. This
was a big mess, and resulted in bugs in navigation between panel menus
and the Activities button, and it totally gets in the way when trying
to add keynav to the dash (whose menu sources are arranged vertically
rather than horizontally).

Fix this up by moving the panel-specific parts to PanelMenuButton
instead.

https://bugzilla.gnome.org/show_bug.cgi?id=641253
2011-03-07 10:57:45 -05:00
Florian Müllner
fefe2df6b5 st-widget: Add automagic rtl/ltr pseudo classes
At times, RTL locales require different CSS, so always create theme
nodes with :ltr/:rtl pseudo classes depending on the widget's text
direction, to provide an easy way to handle those cases without
requiring a separate stylesheet.

https://bugzilla.gnome.org/show_bug.cgi?id=643835
2011-03-05 19:40:52 +01:00
Giovanni Campagna
6e3c15e2ab Use standard GObject Introspection make rules
Instead of defining rules manually, use the included make support,
which means Makefiles are less prone to API changes, support
verbosity correctly (instead of inconsistently hardcoding --quiet),
are cleaner to read, and emit GISCAN/GICOMP instead of GEN (which
is nicer).

https://bugzilla.gnome.org/show_bug.cgi?id=643371
2011-03-01 23:03:49 +01:00
Colin Walters
998ea53b46 gnome-shell-jhbuild.in: Kill notification-daemon and notify-osd here
We need to terminate these processes in a replacing-GNOME-2 scenario.

Reviewed by danw on IRC.
2011-03-01 12:54:22 -05:00
Dan Winship
2337373a17 gnome-shell: fix running-from-source-dir detection 2011-03-01 11:56:10 -05:00
Colin Walters
7fc6a3670c Add a configure option --enable-jhbuild-wrapper-script
The current gnome-shell.in script has a huge amount of
unnecessary complexity for the installed, normal case.  Fix
this by adding a configure option (defaulting to false) that
installs a simple, obvious wrapper script around mutter.

We do change the gnome-shell build setup to pass this option
by default for jhbuild.

https://bugzilla.gnome.org/show_bug.cgi?id=642084
2011-03-01 09:51:06 -05:00
Colin Walters
70fbfea5f5 gnome-shell.in: Drop --eval-file option
Not really used, and makes the script smaller.  We could probably
put a sample script on the wiki instead.

https://bugzilla.gnome.org/show_bug.cgi?id=642084
2011-03-01 09:49:47 -05:00
Colin Walters
9616b45518 gnome-shell.in: Drop TFP checks
These were only necessary for DRI1, and we just aren't going to
work well there anyways.

https://bugzilla.gnome.org/show_bug.cgi?id=642084
2011-03-01 09:49:46 -05:00
Colin Walters
3916b5973d gnome-shell.in: Move extension creation to gnome-shell-extension-tool
https://bugzilla.gnome.org/show_bug.cgi?id=642084
2011-03-01 09:49:44 -05:00
Owen W. Taylor
29eb3215b3 gnome-shell-calendar-server.c: Fix uninitialized variable usage
In case of of bad command line options being passed, an uninitialized
variable would be accessed.
2011-02-28 16:53:09 -05:00
David Zeuthen
e9e30138bd Move calendar handling out-of-process
Unfortunately the evolution-data-server client-side libraries seem to
block the calling thread. This is a major problem as we must never
ever block the main thread (doing so causes animations to flicker
etc.). In the worst case, this problem causes login to hang (without
falling back to fall-back mode) and in the best case it slows down
login until a network connection is acquired.

Additionally, in order to sanely use these evolution-data-server
libraries, GConf has to be involved and GConf is not thread-safe. So
it's not really feasible just moving the code to a separate
thread. Therefore, move all calendar IO out of process and use a
simple (and private) D-Bus interface for the shell to communicate with
the out-of-process helper.

For simplification, remove existing in-process code since internal
interfaces have been slightly revised. This means that the shell is no
longer using any native code for drawing the calendar dropdown.

https://bugzilla.gnome.org/show_bug.cgi?id=641396

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-02-28 16:08:18 -05:00
Alexander Larsson
ddc135839b Extend, don't replace GI_TYPELIB_PATH in gnome-shell launcher
Without this we can't support some gi typelibs being in system
directories.
2011-02-28 21:38:46 +01:00
Colin Walters
474ff2e997 Claim DBus names (Shell, Notifictions) *very* early
See commit f2158218bef0c51 in mutter.  Basically, we need
to grab org.freedesktop.Notifications before anything else
in the session gets started.

Note: I intentionally removed the Util.killall bits.  I believe that
for notification-daemon at least, if we specify
DBUS_NAME_FLAG_REPLACE_EXISTING, we'll take over the name.  Not sure
about notify-osd; if that's still a problem, then what we need to do
is add killing (and possibly respawning) of notify-osd to
"gnome-shell --replace", and not have it embedded randomly in a JS file.

https://bugzilla.gnome.org/show_bug.cgi?id=642666
2011-02-28 13:53:44 -05:00
Vincent Untz
9915038e9b Drop gs-applications.menu so the standard one is used
gs-applications was introduced because we initially wanted a limited set
of categories, but this has now changed and we're back to categories
similar to the ones in the applications.menu from gnome-menus.

We can fix gnome-menus to have better categories, if needed.

https://bugzilla.gnome.org/show_bug.cgi?id=641148
2011-02-25 16:08:51 +01:00
Florian Müllner
cc72819579 authentication-agent: Fix typo in user visible string
https://bugzilla.gnome.org/show_bug.cgi?id=643275
2011-02-25 13:50:22 +01:00
Florian Müllner
63be52e191 scroll-view-fade: Adjust the effect to work in RTL locales
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
2011-02-24 12:30:05 +01:00
Florian Müllner
d15122c4b2 scroll-view: Make scrollbar position locale aware
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
2011-02-24 12:30:05 +01:00
David Zeuthen
697139043f polkit: return error when authentication dialog is dismissed
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>
2011-02-23 11:02:46 -05:00
David Zeuthen
86b925a294 Add a PolicyKit authentication agent
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>
2011-02-22 15:13:56 -05:00
Giovanni Campagna
5683bb9b8e ShellWindowTracker: fix a reference counting bug
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
2011-02-22 16:34:08 +01:00
Adel Gadllah
8a22ea948f shell_global: Use clutter_event_get_time rather then get_current_event_time
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
2011-02-21 22:44:39 +01:00
Marina Zhurakhinskaya
c692fa4687 StWidget: unset hover when unmapped
This ensures that the hover property doesn't return true after
the widget is unmapped while being hovered over.

https://bugzilla.gnome.org/show_bug.cgi?id=642726
2011-02-21 13:59:18 -05:00
Florian Müllner
a3a6650e66 st-theme-node: Add support for inset box-shadows
Implement inset box-shadows as in the CSS3 draft[0]. As the shadow
should appear beneath the node's border, we pick the slow cairo based
rendering path (though a cogl based path could be added in case the
node has a solid background with no borders).

[0] http://www.w3.org/TR/css3-background/#box-shadow

https://bugzilla.gnome.org/show_bug.cgi?id=642334
2011-02-21 17:38:33 +01:00
Florian Müllner
2b90be77b3 st-shadow: Parse the 'inset' keyword
The box-shadow property in the CSS3 draft[0] supports the optional
'inset' keyword for inner shadows cast onto the background. Add
support for the keyword to the shadow parsing code.

[0] http://www.w3.org/TR/css3-background/#box-shadow

https://bugzilla.gnome.org/show_bug.cgi?id=642334
2011-02-21 17:35:23 +01:00
Florian Müllner
794c986b10 theme-node-drawing: Rename render_background_with_border()
As more cases are added where we pick the slower cairo based
fallback path, use a more generic name.

https://bugzilla.gnome.org/show_bug.cgi?id=642334
2011-02-21 17:35:23 +01:00
Florian Müllner
bffe796413 st-entry: Add API to set an actor as primary/secondary icon
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
2011-02-21 17:35:23 +01:00
Dan Winship
1a639f0b17 StEntry: remove special redundant hover tracking
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
2011-02-18 09:50:14 -05:00
Florian Müllner
0ee5a05e00 shell-a11y: Adjust for renamed 'accessibility' key
The key in org.gnome.desktop.interface has been renamed to
'toolkit-accessibility'.
2011-02-17 18:51:27 +01:00
Dan Winship
493e82e37d gnome_shell_plugin_start: fix bluetooth g_log muting
gnome-bluetooth changed its G_LOG_DOMAIN, so it was escaping our
filters. Fix that.
2011-02-17 10:54:30 -05:00
Giovanni Campagna
a1e019b41a VolumeStatus: play notification on scroll
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
2011-02-17 15:35:17 +01:00
Adel Gadllah
07bde8248e StScrollViewFade: Make fade-offset a property rather than a hardcoded constant
https://bugzilla.gnome.org/show_bug.cgi?id=642510
2011-02-16 23:07:13 +01:00
Dan Winship
bb70be31c0 St: annotate st_adjustment_get_values() 2011-02-16 16:06:31 -05:00
Morten Mjelva
1938a5bcb0 Wrap tp_connection_get_contacts_by_handle
GArray support is broken in Gjs. This commit wraps
tp_connection_get_contacts_by_handle so we can retrieve TpContact objects.
2011-02-16 10:08:41 +01:00
Morten Mjelva
36a624aafd Add telepathy-glib as a dependency
We'll be refactoring the Telepathy client to use telepathy-glib, so we need to
build it.
2011-02-16 10:08:41 +01:00
Ray Strode
8c80a58fa4 StThemeNodeDrawing: clear out node interior before filling pattern
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
2011-02-15 19:57:52 -05:00
Ray Strode
740a946e72 Revert "StThemeNodeDrawing: fill background behind translucent gradients"
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
2011-02-15 19:57:52 -05:00
Dan Winship
1224e959b6 StThemeNode: use (out caller-allocates) on ClutterColor-returning methods
Properly annotate the themenode methods that return ClutterColors, and
update their JS callers to take advantage of that.

https://bugzilla.gnome.org/show_bug.cgi?id=642295
2011-02-14 10:49:26 -05:00
Dan Winship
688b9697c8 shell-drawing: remove
Remove shell-drawing.[ch], which now only contained
shell_draw_clock(), which hadn't been used since the sidebar went
away.

https://bugzilla.gnome.org/show_bug.cgi?id=642059
2011-02-14 09:38:27 -05:00
Dan Winship
0c0e2cc689 shell-drawing: remove shell_draw_box_pointer()
This was originally done in C because it used cairo, but that can be
done from JS now. Since it was only used by altTab.js, move it there.

https://bugzilla.gnome.org/show_bug.cgi?id=642059
2011-02-14 09:38:27 -05:00
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
Owen W. Taylor
af7ba00e97 StIcon: pass in the StThemeNode to get colorized symbolic icons
Use st_texture_cache_load_icon_name_for_theme() so that we get the
right colors for symbolic icons. The code refactoring to achieve this
also avoids constantly starting a new icon load each time we set
a property on initialization ... the icon is loaded only after we
have a #StThemeNode assigned.

https://bugzilla.gnome.org/show_bug.cgi?id=633865
2010-11-12 17:36:26 -05:00
Owen W. Taylor
8d6ab6fe84 Add st_widget_peek_theme_node()
Sometimes it's useful to get the theme node if there is one and do
nothing and wait for the ::style-changed signal if there is no theme
node. Add st_widget_peek_theme_node() that just gets the current
theme node if available. The caller must handle a %NULL return.

https://bugzilla.gnome.org/show_bug.cgi?id=633865
2010-11-12 17:36:26 -05:00
Owen W. Taylor
4917c79d09 StTextureCache: support loading a named icon with colors from a theme node
Add st_texture_cache_load_icon_name_for_theme() which, when loading a
symbolic icon, gets a #StIconColors from the theme node and uses that
to colorize the icon.

https://bugzilla.gnome.org/show_bug.cgi?id=633865
2010-11-12 17:36:26 -05:00
Owen W. Taylor
04da2a61db Add StIconColors object, compute in StThemeNode
A new StIconColors object is used to efficiently track the colors
we need to colorize a symbolic icon.
st_theme_node_compute_icon_colors() is added to compute the
StIconColors for a theme node. (Refcounting of StIconColors means
that we'll typically share the colors object of the parent node.)

https://bugzilla.gnome.org/show_bug.cgi?id=633865
2010-11-12 17:36:26 -05:00
Owen W. Taylor
3ca86b2197 StIcon: Center the icon rather than scaling it up
Scaling up icons from the loaded size to a larger size is uniformly
ugly and results in a long series of "fuzzy icon" bugs. It's better
to just load at the specified size and center. (Centering can be
overridden by packing not-fill in the parent container.)

https://bugzilla.gnome.org/show_bug.cgi?id=633865
2010-11-12 17:36:25 -05:00
Owen W. Taylor
35400238aa StIcon: Always request a square icon size
We don't want the layout to change when we say, change from
battery-full to battery-full-charging, so we should request a square
based on the icon size unconditionally and not try to adapt to the
size of the texture we loaded. This also means that our layout is
independent of the loaded texure which, if we switch away from
using a ClutterActor child will allow us not queue a relayout when
the icon finishes loading.

https://bugzilla.gnome.org/show_bug.cgi?id=633865
2010-11-12 17:36:25 -05:00
Owen W. Taylor
439d7f036f Port StIcon from MX framework to St framework
Make StIcon compile and work in St.

Changes:

 * ::icon-type and st_icon_set_icon_type are added to allow
   specifying SYMBOLIC/FULLCOLOR for an icon.
 * Ability to set the icon name from the theme is removed; it
   wouldn't easily fit into our framework and two levels of
   abstraction between code and image doesn't seem that useful.
 * size CSS property is renamed from x-st-icon-size to icon-size
   to correspond to what we are doing elsewhere.
 * CSS and property based icon sizing are cleanly layered - if
   you set the icon-size property, the CSS size is ignored.
 * Add a simple JS test of StIcon.

https://bugzilla.gnome.org/show_bug.cgi?id=633865
2010-11-12 17:36:25 -05:00
Owen W. Taylor
aed6375a2d Move StIconType to st-types.h from st-texture-cache.h
StIconType will be used by a new StIcon class, so move it to the
header file of common enumerations. Including st-types.h which had
the St single-include check revealed that st-texture-cache.h didn't
have that check and several places were including that directly.
Fix that up.

https://bugzilla.gnome.org/show_bug.cgi?id=633865
2010-11-12 17:36:25 -05:00
Owen W. Taylor
a9a8b1ec6a StIcon: Remove content-image capability
The ability to set a "content image" on an icon relies on the ability
to have custom theme properties of a "border image" (9-slice) type.
We don't have this, and the capability of a bordered image specified
by the theme can be achieved more naturally with standard CSS facilities.

https://bugzilla.gnome.org/show_bug.cgi?id=633865
2010-11-12 17:36:25 -05:00
Owen W. Taylor
b0e713b775 StIcon: use g_strcmp0()
Simplify a check for an unchanged string with g_strcmp0().

https://bugzilla.gnome.org/show_bug.cgi?id=633865
2010-11-12 17:36:25 -05:00
Owen W. Taylor
32fc25a3ac StIcon: Adopt copyright notice to standard
- Replace FSF address with URL
- Remove explicit Authors: list

https://bugzilla.gnome.org/show_bug.cgi?id=633865
2010-11-12 17:36:25 -05:00
Owen W. Taylor
839492f15b Import MxIcon as StIcon
https://bugzilla.gnome.org/show_bug.cgi?id=633865
2010-11-12 17:36:25 -05:00
Owen W. Taylor
c98103ffc8 Add run-js-test executable to run tests
ST makes use of GTK+ for input methods and for icon themes; therefore
we have need to initialize GTK+ in order to test these parts of Clutter.

Instead of LD_PRELOADING our module, use a separately compiled executable
that links to the UI components in GNOME Shell, initializes Clutter and
GTK+ and hooks them together.

Getting all the symbols from St and the GUI components exported for
use via GJS requires a bit of contortion: we need to actually link the
St convenience library into a shared library and link the executable
to that since there is no way with libtool to take a convenience library
and put all its symbols into an executable --whole-archive style.

https://bugzilla.gnome.org/show_bug.cgi?id=633657
2010-11-12 17:36:20 -05:00
Owen W. Taylor
86f3a637f1 st_texture_cache_load_from_raw: Don't pointlessly include size in cache key
The texture is independent of the size that the user passed in; so there
is no obvious reason to include the texture in the cache key.

https://bugzilla.gnome.org/show_bug.cgi?id=633595
2010-11-12 17:34:16 -05:00
Owen W. Taylor
ce72aaf008 Fix up copyright and license notices for St
* Make sure all source files have a LGPL copyright header, and standardize
  non-standard variations of the header to a common form.

* Check and update all copyright notices.

* Remove 'Written By:' lines. They are universally incomplete and
  typically indicate only who started a particular file.

https://bugzilla.gnome.org/show_bug.cgi?id=634550
2010-11-12 15:23:28 -05:00
Giovanni Campagna
ac1b814851 Revert "Transition the ShellApp state when ready."
This reverts commit c171ea12df.
2010-11-12 18:41:54 +01:00
Giovanni Campagna
c171ea12df 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
2010-11-12 17:43:05 +01:00
Owen W. Taylor
b856e2990b StScrollView: null out the right variable in dispose
We weren't properly nulling out the vadjustment variable in dispose()
which meant in the case of explicit-destroy followed some time later
by garbage collection and disposing the actor again we would crash.
2010-11-11 08:41:07 -05:00
Owen W. Taylor
f25e6916bd Remove unused StSubtexture 2010-11-10 22:00:11 -05:00
Florian Müllner
ad624d546f st-texture-cache: Fix include
The file gnome-desktop-thumbnail.h was moved from libgnomeui to
libgnome-desktop.

https://bugzilla.gnome.org/show_bug.cgi?id=634555
2010-11-11 01:42:30 +01:00
Maxim Ermilov
6df21fd5ff never fall back to the window title as application name
https://bugzilla.gnome.org/show_bug.cgi?id=624935
2010-11-10 01:32:55 +03:00
Dan Winship
35f806df4e St: add keyboard support to StClickable and StButton
Allow triggering clicks with space/return

https://bugzilla.gnome.org/show_bug.cgi?id=633853
2010-11-08 13:06:41 -05:00
Dan Winship
4f1f226828 StButton: fix hover and grab tracking
Use StWidget:track-hover rather than doing it ourselves. Don't assume
that hover is always TRUE after an enter_event or FALSE after a
leave_event, since we have a pointer grab and will be getting other
actors' events.

Don't ungrab the pointer when it leaves the button, since that
destroys the whole point of getting a grab in the first place.

Only consider the button to have been clicked when it has both grab
(meaning the mouse was pressed over the button) and hover (meaning the
mouse was released over the button).

Also remove the virtual pressed/released methods, which weren't being
used anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=633853
2010-11-08 13:06:41 -05:00
Dan Winship
4c6dd64e87 StButton: fix code style
https://bugzilla.gnome.org/show_bug.cgi?id=633853
2010-11-08 13:06:41 -05:00
Owen W. Taylor
909ec7a709 Fix cursor image tracking on 64-bit systems
Like all X API, XFixesGetCursorImage returns arrays of 32-bit
quantities as arrays of long; on 64-bit systems we need to
convert to an array of 32-bit words before creating a texture
from the result.

https://bugzilla.gnome.org/show_bug.cgi?id=633591
2010-11-01 11:11:01 -04:00
William Jon McCann
2fe7507689 Use the GNOME 3 WM theme by default
Set up an override to specify the metacity window decoration
theme.  Use the GNOME 3 standard theme as the default.
2010-10-31 11:58:44 -04:00
Dan Winship
5a83ef8325 St: add StFocusManager, to handle keyboard navigation
StFocusManager allows setting up "focus groups" in which it will
automatically handle navigation between can_focus widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=621671
2010-10-29 08:38:05 -04:00
Dan Winship
d2b968a7df St: add keyboard focus navigation support
Add StWidget:can-focus, st_widget_navigate_focus(), and
st_container_get_focus_chain(), and implement as needed to allow
keyboard navigation of widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=621671
2010-10-29 08:38:05 -04:00
Neil Roberts
8872913665 StThemeNode: Fix the confusion between border and background
In d66e7dd49 I got confused between border_texture and
background_texture. The background_texture was being created as normal
but in the one place that it gets drawn I accidentally made it use the
border_material instead. This patch makes it create a
background_material similar to the border_material and uses it to
paint.
2010-10-28 21:51:13 +01:00
Neil Roberts
d66e7dd49e st-theme-node-drawing: Don't create lots of one-shot materials
A few places in st-theme-node-drawing create one-shot material, paint
with it and then free it. This is suboptimal with current Cogl because
it will end up compiling an ARBfp program just for that single paint
and then it will throw it away when the material is destroyed.

There is a new function in st-private.c called
_st_create_texture_material. This creates a simple material for a
texture based on a common parent material that points to a dummy
texture. Any materials created with this function are likely to be
able to share the same program unless the material is further modified
to contain a different number of layers. It would be possible to use
cogl_set_source_texture for this instead except that it's not possible
to modify the material's color in that case so we couldn't render the
texture with opacity.

The corner textures are now stored as a handle to a material that
references the texture rather than storing the texure directly. There
is also a separate border_material member which always points to
border_texture as the only layer.

https://bugzilla.gnome.org/show_bug.cgi?id=633340
2010-10-28 20:02:41 +01:00
Giovanni Campagna
a915af4b30 Avoid warnings on leave-event for widgets tracking hover
ClutterCrossingEvent->related can be NULL if the pointer is not under
any actor. Unconditionally set hover to FALSE in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=633028
2010-10-25 15:18:07 +02:00
Giovanni Campagna
bc22109130 Avoid warnings on null actors for tray icons
Plugging the GtkSocket icon can fail, in which case NaTrayManager emits
tray-icon-removed but the icon has never emitted plug-added, thus the
ShellTrayIcon has not been created. This results in various criticals
and exceptions in the tray-icon-removed handler.

https://bugzilla.gnome.org/show_bug.cgi?id=633028
2010-10-25 15:18:07 +02:00
Owen W. Taylor
2fa6f7ba7e Adapt to removal of Mutter namespace
MutterWindow and MutterPlugin have been renamed to MetaWindowActor
and MetaPlugin, mutter_plugin_list_windows() to
meta_plugin_list_window_actors(). Adapt to those changes.

https://bugzilla.gnome.org/show_bug.cgi?id=632500
2010-10-23 14:02:45 -04:00
Dan Winship
8886b7433c StThemeNode: simplify use of get_color/get_double/get_length
Although within St itself there are situations where the semantics of
these functions (return TRUE or FALSE and return the actual value in
an out parameter) is useful, it's mostly just annoying at the
application level, where you generally know that the CSS property is
going to specified, and there is no especially sane fallback if it's
not.

So rename the current methods to lookup_color, lookup_double, and
lookup_length, and add new get_color, get_double, and get_length
methods that don't take an "inherit" parameter, and return their
values directly. (Well, except for get_color, due to the lack of (out
caller-allocates) in gjs.)

And update the code to use either the old or new methods as appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=632590
2010-10-21 15:02:33 -04:00
Colin Walters
85d3336245 Use gjs-internals.pc
Gjs changed to separate the "basic" API from "embedder" API.  Unfortunately
due to our use of the importer API and a few other bits, we need to use
the "module" one.  In the future I plan to extend the core API to
support this use case.
2010-10-21 10:56:11 -04:00
Dan Winship
33e955770c st_theme_node_get_color: fix inheritance
This wasn't actually recursing if you passed the "inherit" flag

https://bugzilla.gnome.org/show_bug.cgi?id=632590
2010-10-21 09:13:30 -04:00
Giovanni Campagna
0547a582d1 Add volume indicator
Add volume control indicator which uses API from gnome-volume-control
to interact with PulseAudio and shows both input and output volumes.
Also adds a small wrapper around libcanberra in ShellGlobal, used by the
volume indicator to provide auditive feedback.

https://bugzilla.gnome.org/show_bug.cgi?id=629455
2010-10-20 16:59:12 +02:00
Bastien Nocera
8064c6c827 Add private gnome-volume-control library
The library is introspected, and should not require using
Pulseaudio directly.

With help from Giovanni Campagna <scampa.giovanni@gmail.com>
(introspection annotations, build fixes)

https://bugzilla.gnome.org/show_bug.cgi?id=629455
2010-10-19 15:24:04 +01:00
Ray Strode
a5d4abda00 st-theme: ref items in custom stylesheets list
st-theme stores some loaded stylesheets in a custom
stylesheets list.  When removing items from this list
it unrefs them, but when adding items to the list it
neglects to ref them.  This means that under certain
circumstances the list will contain items that have
already been freed.

https://bugzilla.gnome.org/show_bug.cgi?id=632477
2010-10-18 15:52:38 -04:00
Florian Müllner
42c736614c st-drawing-area: Avoid unnecessary repaints
StDrawingArea uses the member variable needs_repaint to keep track
of whether it needs repainting. The variable is set to TRUE correctly,
e.g. on allocation or style changes - alas, it is never set to FALSE,
resulting in the area being repainted continuously.

https://bugzilla.gnome.org/show_bug.cgi?id=632197
2010-10-15 12:31:34 +02:00
Ray Strode
700911ca5f gdm: mute debug messages
Since we're just using a cut-and-paste of gdm code there's a
slight impedance mismatch between how that code and the rest of
the shell manage debug messages.  In GDM, they're out of sight by
default, but in gnome-shell they're visible and quite verbose.
This muddies up and masks the useful messages that other parts
of the code generate.

This commit just mutes the messages unconditionally by default,
since they aren't that useful anyway.
2010-10-14 13:35:04 -04:00
Ray Strode
7ce5ea4142 gdm: resync cut-and-paste code from gdm tree.
The GDM code upstream talks to the account service now,
has better introspection annotations, and is more
asynchronous.

This commit updates the shell's copy to the latest
upstream.

Note, the API changed somewhat and so the callers will
need to be fixed up subsequently.

https://bugzilla.gnome.org/show_bug.cgi?id=631888
2010-10-13 19:05:54 -04:00
Guido Günther
ad557a3515 ShellRecorder: Include math.h for M_PI
https://bugzilla.gnome.org/show_bug.cgi?id=631510
2010-10-11 14:29:46 -04:00
Maxim Ermilov
bd250e188b [ShellAppSystem] Don't use g_desktop_app_info_new
It doesn't fully support convert id to path. For example: multiply
subdirs, "LegacyDir prefix" in .menu files...
https://bugzilla.gnome.org/show_bug.cgi?id=614879
2010-10-11 18:37:21 +04:00
Maxim Ermilov
4456954d30 [panel] Only show starting applications for current workspace
Add the workspace we started on to ShellApp.  Use it inside panel.js
to filter the list.
https://bugzilla.gnome.org/show_bug.cgi?id=623688
2010-10-07 01:31:22 +04:00
Maxim Ermilov
6925a82204 [ShellApp] refactor handling startup sequence
1. move logic to shell-app.c
2. change state to RUNNING only after startup sequence complete
3. correct handle state for applications with several .desktop files
https://bugzilla.gnome.org/show_bug.cgi?id=623688
2010-10-07 01:30:30 +04:00
Dan Winship
dd155e2f87 src: remove no-longer-used file
fix-meta-rectangle.py is not needed with current gobject-introspection
2010-10-05 12:24:56 -04:00
Dan Winship
38a69f56b4 src: consistentify Makefile indentation/alignment 2010-10-05 10:15:22 -04:00
Florian Müllner
3d2d396c09 st-theme-node: Support non-uniform border-radii
Non-uniform border-radii are already supported when using a gradient
background, this patch adds support for solid colors as well.

The currently applied technique of using corner textures and filling
the remaining area with rectangles is extended, so that each corner is
padded with rectangles to the size of the largest corner.

Add border-radius.js to test cases, to test non-uniform border-radii
with both solid color and gradient backgrounds.

https://bugzilla.gnome.org/show_bug.cgi?id=631091
2010-10-05 00:18:49 +02:00
Owen W. Taylor
e15e202e11 Support and require Mutter 2.91.0 2010-10-04 15:07:53 -04:00
Colin Walters
11db188fe9 Support xulrunner 1.9.3+
Add small wrappers around JS_AddValueRoot.
Add JS_BeginRequest in our custom code.

https://bugzilla.gnome.org/show_bug.cgi?id=630539
2010-09-30 12:43:12 -04:00
Vincent Untz
c6eb2761c7 gnome-shell.in: Never add empty elements to LD_LIBRARY_PATH
An empty element means the current directory, and is insecure.

https://bugzilla.gnome.org/show_bug.cgi?id=631004
2010-09-30 15:25:21 +02:00
Florian Müllner
fe5a289460 Fix compilation against latest GTK+-3 changes
Adjust to GDK/GTK+ API changes:
 - removal of GdkColormap
 - expose-event -> draw transition

https://bugzilla.gnome.org/show_bug.cgi?id=630641
2010-09-28 22:56:45 +02:00
Florian Müllner
e967807acf shell-gtk-embed: Use GtkWidget instead of GtkObject
GtkObject has been deprecated and removed from GTK+.
2010-09-27 17:05:40 +02:00
Adel Gadllah
1413fa6e03 Revert "StThemeNodeTransition: work around Cogl bug"
This reverts commit 8f0f159960.

Cogl has been fixed, so it is no longer needed.

https://bugzilla.gnome.org/show_bug.cgi?id=629616
2010-09-24 17:31:41 +02:00
Dan Winship
a6e4bab990 Add symbolic icons to TextureCache's load_icon_name()
Icons can be loaded as St.Icon.SYMBOLIC, FULLCOLOR, APPLICATION or
DOCUMENT. The first will look for a symbolic equivalent, the second
looks for a full-color version (and does fallback, eg, from
"drive-harddisk-usb" to "drive-harddisk"). APPLICATION and DOCUMENT do
full-color icons without fallback (as specified by the icon spec).

And update various callers to use the right flags.

Based on a patch from Matt Novenstern.

https://bugzilla.gnome.org/show_bug.cgi?id=621311
2010-09-24 10:57:27 -04:00
Florian Müllner
437538644e introspection: Fix annotation
The scanner now warns about unknown annotations, which catched this
invalid 'type' annotation.
2010-09-24 02:08:32 +02:00
Owen W. Taylor
8f0f159960 StThemeNodeTransition: work around Cogl bug
Switch to using the layer combine constant rather than the material
primary color for representing the opacity of the material; this
avoids triggering a Cogl bug where changing the primary color corrupts
the layer state.

https://bugzilla.gnome.org/show_bug.cgi?id=629616
2010-09-23 12:44:07 -04:00
Dan Winship
cbf2cbac61 [StatusIconDispatcher] Move non-system-tray icons to message tray
New StatusIconDispatcher dispatches icons to the system or message tray.

Based on a patch from Matt Novenstern
https://bugzilla.gnome.org/show_bug.cgi?id=608869
2010-09-23 09:49:47 -04:00
Dan Winship
ae9360659d [ShellTrayIcon] add ShellTrayIcon, make ShellTrayManager use it
The actor emitted by ShellTrayManager is now ShellTrayIcon, a subclass
of ShellGtkEmbed which has several properties on it which are (or will
soon be) useful to the shell.

Part of the rearranging to use ShellTrayIcon means that we now show
the ShellEmbeddedWindow before creating its ShellGtkEmbed, which
requires a few modifications to ShellEmbeddedWindow (notably, telling
it at construct time what stage it will be drawn on, since it needs to
know that before it has a ShellGtkEmbed now).

https://bugzilla.gnome.org/show_bug.cgi?id=608869
2010-09-23 09:49:47 -04:00
Dan Winship
63f2066135 [ShellGtkEmbed] do a better job of tracking the actor's position
Previously the code to keep the X window aligned with its actor made
various assumptions that were true in the panel status tray area but
that are not true in the message tray. Fix it up by repositioning the
X window at clutter_actor_paint() time, which will definitely be
called every time the actor moves, whether it's because of its own or
its parent/ancestor's changes.

https://bugzilla.gnome.org/show_bug.cgi?id=608869
2010-09-23 09:49:47 -04:00
Dan Winship
745e8f608f [ShellGtkEmbed] base this on ClutterX11TexturePixmap, not ClutterGLX
As of 1.4, ClutterGLXTexturePixmap is identical to
ClutterX11TexturePixmap (with the differences having been moved into
the cogl layer). So make ShellGtkEmbed use the (introspected) X11
version, which then allows us to make the instance and class structs
public as well.

https://bugzilla.gnome.org/show_bug.cgi?id=608869
2010-09-23 09:49:47 -04:00
Adel Gadllah
8591a2fc09 gnome-shell.in: Make xephr available within the scope of run_shell
https://bugzilla.gnome.org/show_bug.cgi?id=629304
2010-09-22 20:42:01 +02:00
Florian Müllner
fd5f30ab0d Use gdk_error_trap_pop_ignore() where appropriate
gdk_error_trap_pop() has been marked with G_GNUC_WARN_UNUSED_RESULT,
so use gdk_error_trap_pop_ignore() whenever the return value is ignored.
2010-09-20 14:54:26 +02:00
Florian Müllner
a2553f48e2 Enable side-by-side tiling
Override the metacity schema for side-by-side tiling to change the
default behavior when running mutter in GNOME Shell.

https://bugzilla.gnome.org/show_bug.cgi?id=606260
2010-09-17 16:02:37 +02:00
Florian Müllner
652ce3ce8c introspection: Fix annotations
The scanner got more strict, now some annotations need fixing.
2010-09-15 03:02:26 +02:00
Alban Browaeys
27e71d9a6c Fix shell_global_format_time_relative_pretty() parameter name
An out parameter annotation was missed due to a difference
in the parameter name between the declaration and the implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=629595
2010-09-14 16:16:02 -04:00
Adel Gadllah
25f907ffb1 St: Use a local material template
To be consistent with what we do with the shadow
material, use the same pattern in setup_framebuffer().
2010-09-14 00:00:34 +02:00
Florian Müllner
1034798969 st-shadows: Use a template material when creating shadows
To avoid recompiling shadows each time a new shadow is created,
use a copy of a static template material.

See http://bugzilla.clutter-project.org/show_bug.cgi?id=2280#c5.

https://bugzilla.gnome.org/show_bug.cgi?id=629383
2010-09-13 18:11:03 +02:00
Florian Müllner
862f1ea18c st: Use template material for transitions
To avoid compiling a new shader each time a transition is started,
use a copy of a static template material.

See http://bugzilla.clutter-project.org/show_bug.cgi?id=2280#c5.

https://bugzilla.gnome.org/show_bug.cgi?id=629384
2010-09-13 17:50:05 +02:00
Maxim Ermilov
a969e82954 Attach dialogs to windows with visual effects
Override the new mutter preference /apps/mutter/general/attach_modal_dialogs
to attach modal dialogs to their parent window. Animate the modal dialogs
expanding from the top of the parent window. Slowly dim the parent window
after the dialog comes up.
https://bugzilla.gnome.org/show_bug.cgi?id=612726
2010-09-11 05:39:57 +04:00
Maxim Ermilov
0e2ed0fb0b add shell_global_[un]set_cursor
This functions set/unset the cursor on the stage window.
https://bugzilla.gnome.org/show_bug.cgi?id=607821
2010-09-10 05:58:19 +04:00
Maxim Ermilov
4f61f9a43d remove scrollbar-[width/height]
1. They are useless
2. We can get its value from get_preferred_[width/height] in StScrollBar
https://bugzilla.gnome.org/show_bug.cgi?id=624893
2010-09-10 05:57:36 +04:00
Maxim Ermilov
d6995194dd add get_preferred_[width/height] to StScrollBar
https://bugzilla.gnome.org/show_bug.cgi?id=624893
2010-09-10 05:57:15 +04:00
Maxim Ermilov
ab25b8ab69 change parent class of StScrollBar from StBin to StWidget
1. It doesn't have child
2. It work like StWidget without child
https://bugzilla.gnome.org/show_bug.cgi?id=624893
2010-09-10 05:56:07 +04:00
Maxim Ermilov
178c8c50a0 Fix build with recent gtk3
use new keysyms names
https://bugzilla.gnome.org/show_bug.cgi?id=629128
2010-09-09 18:34:09 +04:00
Colin Walters
dddd97f6df introspection: Build with --warn-all --warn-error
* Use --warn-all, --warn-error
* Fix various broken gtk-doc
* Drop unused shell_get_event_related
* For header defines, we currently require them to end in _H to be skipped
* Drop the no-longer-necessary fix-meta-rectangle.py hack
* Move to the convention of using -private.h for headers that are,
  well, private.
* Add shell-wm-private.h
2010-09-07 13:07:52 -04:00
Florian Müllner
a243ba6693 [StLabel] Implement text-shadow property
Use the existing shadow code to add a drop shadow to the underlying
ClutterText actor if the text-shadow property is specified.

https://bugzilla.gnome.org/show_bug.cgi?id=624384
2010-09-02 21:49:59 +02:00
Florian Müllner
ba1da9deb9 [StThemeNode] Make shadow helper functions semi-public
Move shadow helper functions from st-theme-node-drawing to st-private
to make them available to widgets which want to add shadows to internal
actors.
Also add a new helper function for creating the shadow material from a
ClutterActor.

https://bugzilla.gnome.org/show_bug.cgi?id=624384
2010-09-02 21:49:59 +02:00
Florian Müllner
29781b2e5c [StThemeNode] Add text-shadow property
Reorganize the existing code which parses the -st-shadow property
to allow parsing different shadow properties and add support for
the text-shadow property.

https://bugzilla.gnome.org/show_bug.cgi?id=624384
2010-09-02 21:49:59 +02:00
Florian Müllner
e942444630 [StShadow] Add reference counting
If a shadow property is inherited from a parent, multiple StThemeNodes
share a common StShadow. It would be possible to use st_shadow_copy()
for this purpose, but proper reference counting is nicer.

https://bugzilla.gnome.org/show_bug.cgi?id=624384
2010-09-02 21:49:59 +02:00
Adel Gadllah
9f9067e29b [StThemeNode] Add basic background-position support
Add basic support for background-position, which only supports absolute
values.

Also don't require an unit to be specified for 0 (because the unit does not
really matter here 0 is 0 regardless of the unit).

https://bugzilla.gnome.org/show_bug.cgi?id=624375
2010-09-01 18:13:43 +02:00
Owen W. Taylor
5e7c25e136 Notice style transitions that don't change how StThemeNode paints
Add st_theme_node_paint_equal() and use that to do two things:

 1) Avoid animating transitions where nothing changes.
 2) Copy cached painting state from the old theme node to the new
    theme node.

https://bugzilla.gnome.org/show_bug.cgi?id=627083
2010-08-30 13:40:12 -04:00
Florian Müllner
5bd977dd3c [transitions] Do not recreate FBOs on opacity changes
Creating an FBO may be expensive, so we should avoid the operation
if possible. When transitioning between theme nodes, the widget's
opacity is used to paint to the offscreen textures which are blended
together - this means that the textures have to be recreated each time
the widget's opacity changes. It is much more effective to paint the
textures at full opacity and respect the widget's paint opacity when
blending the textures together.

https://bugzilla.gnome.org/show_bug.cgi?id=627085
2010-08-23 18:41:34 +02:00
Dan Winship
d9169d27f5 [ShellTrayManager] a few updates
Use the new na_tray_child_get_wm_class() method.
Add the trayicon title to the signal.

https://bugzilla.gnome.org/show_bug.cgi?id=627306
2010-08-19 10:14:18 -04:00
Dan Winship
7ff7ec0e7a [tray] sync NaTray code from gnome-panel
Our copies and gnome-panel's had been ported for GSEAL independently.
Sync them back up again.

https://bugzilla.gnome.org/show_bug.cgi?id=627306
2010-08-19 10:14:10 -04:00
Florian Müllner
a9c0dcbd6b [search] Use 'AND' instead of 'OR' on search terms
The current search system uses the OR operator to concatenate search
terms. While results which are matched multiple times sort before
other matches, it is almost guaranteed that adding an additional term
to the search increments the number of results, which is rather
surprising.

https://bugzilla.gnome.org/show_bug.cgi?id=610955
2010-08-18 23:59:27 +02:00
Owen W. Taylor
cac0848316 Remove usage of gdk_screen_get_rgb_colormap()
gdk_screen_get_rgb_colormap() has been removed from GTK+; there's
no longer a special visual that is used for drawing true-color
images distinct from the system visual. So, we don't need to
check for it; if the visual isn't the system visual, we just
fall through to the case where we create a new GdkColormap.
2010-08-12 20:12:00 -04:00
Florian Müllner
766b5b801c [St] Remove _st_actor_contains()
The function has been upstreamed as clutter_actor_contains() - with
the switch to clutter-1.4 it is now available to the Shell, so it
is no longer necessary to keep a copy in-tree.

https://bugzilla.gnome.org/show_bug.cgi?id=626512
2010-08-10 15:03:13 +02:00
Florian Müllner
0905940ef8 [StContainer] Add :first-child, :last-child pseudo classes
Add support for the CSS :first-child and :last-child properties to
StContainer, and thus to all containers in St and ShellGenericContainer.

The internal ordering of the container's children is used to determine
the child to which to attach the pseudo class, not the children's
positions. This means that containers where positions can differ from
the ordering (ShellGenericContainer / StGroup) may behave unexpectedly,
so some caution is required.

https://bugzilla.gnome.org/show_bug.cgi?id=625316
2010-08-05 19:05:18 +02:00
Adel Gadllah
7fa9e88294 [St] Remove unused width/height from st_theme_node_transition_paint
We query the texture size here but never actually use it.

https://bugzilla.gnome.org/show_bug.cgi?id=625713
2010-08-01 12:10:53 +02:00
Owen W. Taylor
911e71542b Set LD_LIBRARY_PATH before running dconf
When we are manually starting dconf in the case where it can't
be activated via D-Bus, we need to set LD_LIBRARY_PATH in its
environment, since dconf is no longer linked with a rpath.
(Unlike the rest of GNOME, it doesn't use libtool.)
2010-07-28 15:31:16 -04:00
Adel Gadllah
b237cf9a63 Use CoglHandle rather than CoglHandle*
This breaks building on 1.4, and has always been wrong anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=624571
2010-07-26 21:55:25 +02:00
Florian Müllner
02ebd44851 [shadows] Fix shadows with small blur radius
There's an assertion in calculate_gaussian_kernel() to avoid a division
by zero - due to an unnecessary cast from float to int this assertion
is triggered incorrectly for small (but non-zero) values, e.g. a blur
radius of 1px.
2010-07-25 00:37:12 +02:00
Jasper St. Pierre
29c4742383 [gdmuser] Annotate gdm_list_users()
Recently, g-ir-scanner got a little stricter with regard to
GSList, marking functions not introspectable if the element
type is not annotated. This fixes a visible JS Error by g-ir
and gdmuser/gdm-user-manager.c
2010-07-24 13:25:51 +02:00
Dan Winship
229604690b [gnome-shell.in] set $XDG_DATA_DIRS too
This is needed to find gsettings schemas that are installed in
the jhbuild prefix.
2010-07-22 09:23:34 -04:00
Dan Winship
adbf3b1c37 [ShellGlobal] add SHELL_STAGE_INPUT_MODE_FOCUSED
Add SHELL_STAGE_INPUT_MODE_FOCUSED, to move the keyboard focus to the
shell without grabbing the keyboard or mouse, and make
stage_input_mode into a GObject property so that (among other things),
callers can tell when MODE_FOCUSED reverts back to MODE_NORMAL.

https://bugzilla.gnome.org/show_bug.cgi?id=623429
2010-07-20 15:03:17 -04:00
Dan Winship
1b03d5cb45 [St] fix a bug noticed by gcc -O3
https://bugzilla.gnome.org/show_bug.cgi?id=623295
2010-07-12 14:24:16 -04:00
Florian Müllner
643c7fdb3a Switch build to Gtk+-3.0
Update the build dependencies to gtk+-3.0 and adjust the javascript
to run on gtk+-3. Obviously depends on mutter compiled with gtk+-3
as well.

https://bugzilla.gnome.org/show_bug.cgi?id=621845
2010-07-07 12:57:59 -04:00
Owen W. Taylor
174caf0016 Work around g-ir-scanner problem with Gdk.Rectangle
g-ir-scanner is currently buggy and confuses the Gdk.Rectangle alias
with MetaRectangle. Since this is moderately hard to fix in
gobject-introspection and the fix would conflict with in-progress
changes, work around by doing a 'sed job' on the generated Meta.gir.

https://bugzilla.gnome.org/show_bug.cgi?id=623640
2010-07-07 12:57:59 -04:00
Owen W. Taylor
ab0d57d6ca Use MetaRectangle for allocated returns
The conversion of GdkRectangle to a typedef for cairo_rectangle_int_t
in GTK+-3 makes it no longer a proper boxed type (it's still registered
boxed, but gobject-introspection doesn't know that.) So, switch to using
MetaRectangle, which is now registered as a boxed type by Mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=621845
2010-07-07 12:56:47 -04:00
Florian Müllner
a45021bd60 Replace deprecated GDK symbols
The fix depends on API introduced in this cycle, so the required
GTK+ version is bumped to 2.21.1.

https://bugzilla.gnome.org/show_bug.cgi?id=621845
2010-07-05 20:25:50 -04:00
Giovanni Campagna
97f883b10e Implement "text-align"
"text-align" allows setting the alignment of text, with respect to
other lines and allocated space, without requiring a reference to
the ClutterText (which is private for most widgets).
If not specified, all text is left-aligned.

https://bugzilla.gnome.org/show_bug.cgi?id=622447
2010-06-25 22:43:14 +02:00
Owen W. Taylor
e8b72a2a59 Switch to using dconf
* Add dconf and dependencies to the moduleset and add
  libxml2 dependency to gnome-shell-build-setup.sh

* if we can't ping the dconf D-Bus service, try to
  activate it manually.

* Stop forcing GConf via GSETTINGS_BACKEND

https://bugzilla.gnome.org/show_bug.cgi?id=622308
2010-06-25 12:48:14 -04:00
Florian Müllner
35764fa09e Move Tweener.slowDownFactor into St
It has probably crossed the line to evil by a mile or so, but here
it is: a Tweener.slowDownFactor replacement used by all animations
without exception.
While at it, update Tweener to use the new setTimeScale() upstream
function instead of adjusting the timeline directly.

https://bugzilla.gnome.org/show_bug.cgi?id=622249
2010-06-21 16:19:25 +02:00
Florian Müllner
4b1fea2fa4 [windowTracker] Only remove "interesting" windows
Windows are only added to an application if they are considered
"interesting". If we keep it that way, we cannot unconditionally
call _shell_app_remove_window() - applications without interesting
windows are not considered running, so the call crashes the shell.

https://bugzilla.gnome.org/show_bug.cgi?id=622236
2010-06-21 15:35:36 +02:00
Florian Müllner
04ecde9f8e [StButton] Cleanup left-over animation code
StButton used to animate hover changes - the animation itself was
removed in commit a4481b38d, but some related member variables were
left in place.
2010-06-21 00:01:05 +02:00
Florian Müllner
9ef2a46e33 Replace non-toplevel Gtk include 2010-06-19 21:35:24 +02:00
Colin Walters
1f550dbc72 [ShellApp] Move assertion below precondition check
Need to track down why we're calling _remove_window with a window not
in the app, but this is the quick fix for a crasher.
2010-06-19 11:32:00 -04:00
Milan Bouchet-Valat
2799327c84 Migrate to GSettings
Use GSettings for all Shell configuration. GConf is kept to read
configuration from external programs (Metacity, Nautilus and Magnifier),
but ShellGConf is removed because it's mostly useless for the few calls
we still have. Also get rid of unused GConf code in ShellAppSystem.

A basic GConf schema is still used to override Metacity defaults and
configure Magnifier in a system-wide fashion. GConf is also used as
GSettings backend via the GSETTINGS_BACKEND environment variable.
All of this will be removed when these programs have been ported
to GSettings and able to use dconf.

GLib 2.25.9 is required. Schemas are converted to the new XML format,
and compiled at build time in data/ so that the Shell can be run from
the source tree. This also requires setting the GSETTINGS_SCHEMA_DIR
environment variable both when running installed or from source tree,
in src/gnome-shell.in and src/gnome-shell-clock-preferences.in.

https://bugzilla.gnome.org/show_bug.cgi?id=617917
2010-06-18 20:27:41 +02:00
Colin Walters
da4e24555b Split off running state handling into separate structure
This is a small memory usage optimization, and cleans up the code.
In particular, this will help for later patches which perform
more substantial operations on running apps.

https://bugzilla.gnome.org/show_bug.cgi?id=621203
2010-06-18 13:03:41 -04:00
Dan Winship
cae61e62fd [StThemeNode] implement CSS "outline" property
Could potentially be used for focus indication

https://bugzilla.gnome.org/show_bug.cgi?id=621669
2010-06-17 14:06:47 -04:00
Dan Winship
792dc489ee [St] add st_describe_actor, for debugging
This can be used when adding debug printfs, to get clear descriptions of
actors.

Also update the Looking Glass inspector to use it

https://bugzilla.gnome.org/show_bug.cgi?id=621668
2010-06-17 12:48:13 -04:00
Maxim Ermilov
4800a80c3a Update GnomeShellPlugin according to recent changes in MutterPlugin
https://bugzilla.gnome.org/show_bug.cgi?id=621083
2010-06-17 01:44:44 +04:00
Dan Winship
942810e88e [ShellOverflowList] remove ShellOverflowList
Nothing uses ShellOverflowList any more, so remove it. (Even if we
want that sort of functionality again later, we'd want it to be
StWidget-based, and with a name less likely to be confused with
StOverflowBox.)

https://bugzilla.gnome.org/show_bug.cgi?id=621582
2010-06-15 12:02:33 -04:00
Maxim Ermilov
bbfc980fe6 add st_texture_cache_load_sliced_image
This function reads a single image file which contains multiple
images internally.
The image file will be divided using @grid_width and @grid_height;
note that the dimensions of the image loaded from @path
should be a multiple of the specified grid dimensions.
https://bugzilla.gnome.org/show_bug.cgi?id=598349
2010-06-14 19:36:55 +04:00
Maxim Ermilov
302b892dbc [gnome-shell.in] If XDG_CONFIG_DIRS empty or unset, use default value 2010-06-12 23:13:31 +04:00
Florian Müllner
c0134067d7 [Transitions] Add error checking when setting up framebuffers
The framebuffer setup code can fail, e.g. when the texture used as
color buffer has a height/width of 0. In that case, the call to
cogl_pop_framebuffer() will crash the shell trigger an assert. Add
error checking to fail gracefully.
2010-06-12 19:33:19 +02:00
Dan Winship
a4befeba53 De-duplicate "actor contains actor" code
Add _st_actor_contains() in st-private for use within St, and
monkey-patch in a Clutter.Actor.contains() for use by javascript, and
then replace all the duplicate implementations with one or the other
of those.

https://bugzilla.gnome.org/show_bug.cgi?id=621197
2010-06-11 10:05:46 -04:00
Dan Winship
016ab1afee [ShellMenu] remove; no longer used
https://bugzilla.gnome.org/show_bug.cgi?id=619541
2010-06-10 15:04:48 -04:00
Colin Walters
afadeef204 Remove duplication of non_gir_sources, ensures we only need to add a file once
This also fixes shell-window-tracker-private.h not being in the dist.
2010-06-10 10:34:34 -04:00
Florian Müllner
49919acb7c [StyleTransition] Improve style changes during transitions
Our behavior of reversing the animation when the widget's style
changes back to the previous one is sound. On the other hand, when
there's a change to a new style while a transition is active, we
simply cancel the ongoing transition. Updating the transition
correctly so that the new one starts from an intermediate state
is hard.
Nevertheless, if the style changes before any time of the transition
has elapsed, we should do better than the current behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=621140
2010-06-10 04:06:13 +02:00
Colin Walters
f76dae5ec8 Add missing shell-window-tracker-private.h file 2010-06-09 16:23:37 -04:00
Colin Walters
bf6d0dc808 Associate process identifiers with applications
Cache the set of pids for an application, in preparation for
landing an XSMP patch which requires this information.

https://bugzilla.gnome.org/show_bug.cgi?id=619542
2010-06-09 14:44:15 -04:00
Colin Walters
e4a6bf994f Fix ShellAppSystem's use of no_focus_window, clean up state handling
First, we were passing an incorrect timestamp to
meta_display_focus_the_no_focus_window - fix that.

The invocation of set_focus_app to the started app there couldn't
really work, because (if the above call had worked) we'd get the
X reply *after* the started app.

What we need to untangle here is the distinction that's now made in
ShellApp between _STATE_STARTING and _STATE_RUNNING.  A nice way to
start doing this is to rebase ShellWindowTracker to only be concerned
with app states.  Concretely, the current "has windows implies
running" logic now lives just inside shell-app.c.

Rename the app-running-changed signal to be app-state-changed.  This
will ultimately be useful so that inside the panel, we can track
the last started app.

https://bugzilla.gnome.org/show_bug.cgi?id=620899
2010-06-09 14:44:15 -04:00
Marc-Antoine Perennou
0e91a213f5 [StThemeNodeTransition] Do not access CoglColor private members directly
We should not access CoglColor members directly since they are private starting with clutter 1.3.

Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
2010-06-08 21:03:34 +02:00
Florian Müllner
0e40782723 [StWidget] Cancel transitions if duration is zero
The current code only sets up / updates transitions when the new
node's transition-duration is non-zero. It should cancel an
existing transition if the duration is 0.
2010-06-08 20:37:38 +02:00
Florian Müllner
db45c0920b [StWidget] Support style transitions
It is sometimes desirable to fade smoothly between two styles
instead of changing it abruptly.
Add transitions controlled by the transition-duration CSS property.

https://bugzilla.gnome.org/show_bug.cgi?id=619025
2010-06-08 17:55:51 +02:00
Florian Müllner
d4a8c64d22 [StThemeNode] Add transition-duration CSS property
Add a CSS property to control style transitions.

https://bugzilla.gnome.org/show_bug.cgi?id=619025
2010-06-08 17:55:50 +02:00
Florian Müllner
0deffbaaf0 [St] Add StThemeNodeTransition
Introduce a small helper class in order to add transitions between
theme nodes to StWidget.

https://bugzilla.gnome.org/show_bug.cgi?id=619025
transition update
2010-06-08 17:55:50 +02:00
Florian Müllner
af3ca027a1 [StThemeNode] Add helper method to get the paint allocation
StThemeNodes may have properties - namely shadows - which paint
outside an actor's allocation. This is not a problem unless drawing
is redirected to an offscreen buffer, in which case the actually
painted size is needed in advance when setting up the buffer.

Add a convenience method to calculate an allocation large enough to
paint the node.

https://bugzilla.gnome.org/show_bug.cgi?id=619025
2010-06-08 17:55:41 +02:00
Florian Müllner
24a4ca0c6d [StThemeNode] Add a comparison function
Add st_theme_node_equal() - two nodes are considered equal iff they
refer to identical elements, so e.g. .example and .example:hover are
not equal, even if no .example:hover rule exists in the CSS.

https://bugzilla.gnome.org/show_bug.cgi?id=619025
2010-06-08 17:55:40 +02:00