This fixes a regression where we weren't using the correct event
timestamps, because for both of these we were sending an XClientMessage
to ourself.
https://bugzilla.gnome.org/show_bug.cgi?id=596262
A previous patch fixed a leak when loading items which shouldn't
be cached, but we also had a leak if two requests for the same
item were outstanding. In that case we load the pixbuf twice,
but should discard subsequent loads when we notice we've already
cached it.
https://bugzilla.gnome.org/show_bug.cgi?id=595321
The menu is needed by the app switcher as well as the overview, so
make it slightly more generic and move the code to appIcon. Also add
support for drawing the menu either to the right of or below the icon.
https://bugzilla.gnome.org/show_bug.cgi?id=590563
When the user click+hold+release over the icon, the effect we want
is for the menu to stick around.
Also, allow the user to mouse over the actual windows and select
them directly. If the user mouses over a window, reflect that in
the menu.
https://bugzilla.gnome.org/show_bug.cgi?id=594699
Callers will generally expect _popup and _popdown to be a no-op if
the menu is already in that state; make it so.
Also change the 'popdown' signal to be 'cancelled'; this is
clearer and allows us to avoid having activate also call popdown.
https://bugzilla.gnome.org/show_bug.cgi?id=594699
We have compatibility code which detects from the window title what
an application is. However, the code didn't handle the case where
we discovered by title, but didn't have the expected .desktop file
installed.
When the user click+hold+release over the icon, the effect we want
is for the menu to stick around.
Also, allow the user to mouse over the actual windows and select
them directly. If the user mouses over a window, reflect that in
the menu.
If start_shell() threw an exception before, we'd overwrite it with
an exception in the finally() clause. Handle this and just print a message
and let the exception propagate.
Before Clutter gained accessors for event information, we had
shell_global_ functions. Now that Clutter has them, use them and
delete the ShellGlobal code.
http://bugzilla.gnome.org/show_bug.cgi?id=594561
When we have multiple windows for an application, implement the following
behavior:
* On click + immediate release, go to the most recently used
* On click, hold for 0.6s, pop up a menu with windows, filtering
the window list to just those windows.
Mouse over on the window list highlights the moused-over window.
Implement this by splitting well item into InactiveWellItem
and RunningWellItem, sharing a base class BaseWellItem.
The application menu code wants to do a popup after a given timeout
while holding. We can implement that by adding a function to
manually break the grab held by the button box.
Freeze+thaw around the hover and pressed property notification on leave
since handlers may want to depend on the pressed state on a hover
transition.
The windows we considered for both the app monitor and the overview
workspaces were the same, but the code was duplicated once in C, once
in Javascript.
On OpenSolaris /usr/bin/python is 2.4; use AM_PATH_PYTHON to find
a newer Python. (The PYTHON environment variable can also be set
before running configure to override the search.)
http://bugzilla.gnome.org/show_bug.cgi?id=578196
Add .AUTOPARALELL which is my GNU-make fix for projects to specify
that the build is parallel-safe, and to automatically parallelize.
Add a missing dependency on built sources, and specify --libtool
to be safe.
Only mouse button 1 is supposed to activate button controls; other
mouse buttons should do nothing unless there is a context menu.
Checking the click count is important, since double-clicks will
otherwise look like unpaired button presses.
http://bugzilla.gnome.org/show_bug.cgi?id=593504
There's seldom a good justification for connecting to signals on
yourself rather than using the default handler slots in the class.
But in particular using the default handler slots means that
an application can connect to ::button-press-event and get in
before the default handling, to implement a button that does
something on press.
http://bugzilla.gnome.org/show_bug.cgi?id=593503
Add an 'active' property to ShellButtonBox. This allows ShellButtonBox
to be used as a "toggle button". It's up the application to connect
it to the ::activate signal; there's no default handling of this.
(It's seldom that the only time you want to toggle a toggle button
through the user interface, so you need some connection to the backend
data store in any case. Removing the default handling all-together
prevents weird interactions.)
When we have built-in styling for ShellButtonBox the 'active' state
would be one of the elements that would be affect the styling.
http://bugzilla.gnome.org/show_bug.cgi?id=593502
shell-global.[ch]: Add shell_global_display_is_grabbed() that
uses the newly added meta_display_get_grab_op() to check
for existing grabs.
shell-status-menu.[ch]: Add shell_status_menu_is_active() to
check if the menu is popped up. Check for active grabs before
popping the menu up. Use gtk_menu_popdown() rather than
gtk_widget_hide(). Remove an excess gtk_widget_show() and
some excess casts.
panel.js: Check whether the status menu is popped up after button
release, and if it's not popped up, unhighlight the button.
Reported by Nuno Donato
http://bugzilla.gnome.org/show_bug.cgi?id=593362
gnome-shell.in: Remove the code to replace gnome-panel by attaching
to it with GDB; this was always problematical (required gdb, debug
symbols, finding the pid of gnome-panel, etc.)
gnome-shell-build-setup.sh: Require 2.26 to be in place before building
the shell; remove gdb from the list of required packages.
http://bugzilla.gnome.org/show_bug.cgi?id=593325
This is a Box subclass which adds several signals useful for implementing
"button like" behavior, such as hover and pressed states, as well as
click activation on release.
Instead of starting Xephyr automatically, require --xephyr to be
passed explicitly.
This makes the operation easier to understand and has the benefit
of allowing running in Xephyr mode when some other window manager
(like gnome-shell!) is running. We also want to emphasize that
Xephyr is a development tool, and not a good preview of the
user-interface.
http://bugzilla.gnome.org/show_bug.cgi?id=592881
In both, using our allocation directly for the child is wrong; we
should create a new allocation that's our width and height.
In ShellDrawingArea, also need to chain up to parent.
For Firefox/OpenOffice, right now we have a workaround in the
code where we look at their "title" property. However, we
weren't monitoring that property for changes, and I'm fairly
certain Firefox at least was mapping a window and then very
quickly changing its title after. So we need to handle
dynamic changes.
Split out the wm_class mapping from the title hack. It was
messy and weird to have the two mixed because they're not
at all related, and we're not trying to handle WM_CLASS changes
right now.
Explicitly connect to notify::title in the case where we had
a title fallback. When a title changes, just treat it as
an add+remove.
In the Application Menu area in the panel, hook up to app-added
and app-removed so we get notification of the active app changing.
Clean up the vendor prefix handling a bit, and add "mozilla" so that
we pick up "mozilla-firefox.desktop" from Firefox's (recent?) change
to have a WM_CLASS of "Firefox".
Separate the application monitor logic for "tracking" and "usage tracking".
The first means we associate an application with a window. The second
means we count focus time inside that window, and consider the window
interesting from a user point of view.
(Really, should probably split ShellAppMonitor into two classes along
this line, with the second consuming the first).
For the purposes of counting running applications and returning
the list of open windows for an application, skip not-usage-tracked
windows.
Together this allows us to associate the Nautilus desktop window
with the nautilus.desktop, but not show "File Manager" open all
of the time.
We now have functionality in Mutter to grab the keyboard on behalf
of a plugin. This avoids interactions with the key handling code
in Mutter that could leave the user with an inconsistent state
and no way to get out of it.
src/shell-global.[ch]: Change shell_global_grab_keyboard() and
shell_global_grab_keyboard() to shell_global_begin_modal()
shell_global_end_modal() and call mutter_plugin_begin_modal()
mutter_plugin_end_modal() rather than directly grabbing the
keyboard.
main.js: Call global.begin_modal/end_modal from Main.startModal()
and Main.endModal()
altTab.js; Remove call to Main.startModal() - we're letting Mutter
handle modality for Alt-Tab.
main.js lookingGlass.js overview.js runDialog.js: Rename
Main.startModal() to Main.beginModal() for consistency with
naming in mutter and ShellGlobal.
http://bugzilla.gnome.org/show_bug.cgi?id=590686
If Mutter exits with an exit status of 0, then that most likely
means that it was replaced by another window manager and we shoudln't
try to start the previous window manager and the panel.
(We don't actually know about the panel, but assume that if someone
is replacing us they know what they are doing.)
When Mutter exits with a signal, we know we want to restart.
When Mutter exits with a non-signal non-zero exit status, it's
ambiguous - we could be exiting because we lost the connection to
the X server, or because of a assertion failure in gnome-shell.
We assume the latter; if the X server is gone, all that will happen
is a bit of noise.
To know why Mutter exited accurately, we always wait() and
kill() the Mutter process, and then, if running in Xephyr, clean up
Xephyr afterwards. This has the nice side effect of exiting when
gnome-shell does and not forcing the user to close Xephyr manually.
http://bugzilla.gnome.org/show_bug.cgi?id=591171
The design has smaller icons in two columns. Add a new
custom display to docDisplay for it.
Clean up some of the texture cache handling for recent URIs so
it's not size-dependent, since the dash size is now different
from the default GenericDisplay size.
Use MetaGroup for a window when looking up applications. If
we know the application for a TYPE_NORMAL window in the group,
use that.
However, we aren't always going to know the application for a window. In
that case, create a fake one.
ShellAppInfo has a "transient" flag so we know not to write these
fake apps to the usage file.
Clean up the idle focus handler to better handle the case where
no window is focused, and where we don't want to track the
particular window.
Update track_window to create the fake window.
When a window goes away, we want to delete the usage.
Rewrite shell_app_monitor_get_running_apps to be based
on the window_to_app hash, because that's what has the pointer
to ShellAppInfo*. Before we were looking up all ids through
ShellAppSystem, but that shouldn't be holding a ref to transients.
Change the well display icon to be centered, since our icons for
window apps aren't 48 pixels.
We need to use the -lib variant which in turn uses the
GETTEXT_PACKAGE define, because the default translation
domain is actually mutter, not gnome-shell.
$(builddir) is not a standard automake variable. With autoconf < 2.64
it ends up getting set in every Makefile.in to '.' (because autoconf
defines it), but that is no longer the case for 2.64.
Since $(builddir) was always '.', just use that instead.
Infrastructure for localization; hook up intltool, create po/
and po/POTFILES.in. We need to call bindtextdomain/bind_textdomain_codeset.
Switch to gnome-autogen.sh to call intltool.
If we pass in -1 for both width and height, we'd attempt
to scale the image to 0x0. Don't do that; just avoid
scaling the pixbuf and let ClutterTexture do it for us.
Because of a history of cut and paste, the different enumeration
and marshal generation generation shell snippets were using the
same temporary file names. This caused problems for parallel
builds.
http://bugzilla.gnome.org/show_bug.cgi?id=591474
This is a start at the "Active Appliction Item" component of the
shell design. Currently we just show the currently focused
application. When launching a new application, we show that as well.
The implementation here is not complete; basically when launching
we de-focus the active one, and the application well shows the
most recent startup sequence.
This kind of fails in the case of multiple sequences, and we
also don't correctly de-focus the current window in other
launch paths.
Pass the error variable to g_key_file_load_from_data_dirs in
Shell.AppSystem.get_default().load_from_desktop_file again, and
use a try/catch in places.js.
This fixes Shell.TextureCache.get_default().load_thumbnail so
that it can be used to get thumbnails (with an icon matching
the mimetype or, in the worst case, gtk-file, as fallback) for
items which don't have a GtkRecentlyUsed object. This is needed
for the Zeitgeist integration.
- Avoid error '"iconname" may be used uninitialized in this function'
by initializing said variable to NULL.
- Define shell_util_get_file_description as static (like the other
similar functions) to avoid another compiler error.
- Don't save errors from g_key_file_load_from_data_dirs into the
variable "error" (ie. pass NULL to it instead). Without this,
gnome-shell crashes if the key file can't be found (with message
"Error invoking Shell.load_from_desktop_file: Valid key file could
not be found in search dirs").
- Check the result of the load_from_desktop_file() call in places.js,
as it may be null.
Previously, ShellAppSystem only loaded (and cached) the set of
.desktop files from applications.menu and settings.menu, using
the gnome-menus library. The ShellAppInfo structure was
a "hidden typedef" for GMenuTreeEntry.
But we need to support loading an arbitrary .desktop file. Thus,
refactor the ShellAppInfo into a real struct, with a refcount,
and allow it to point to either a GMenuTreeEntry or a GKeyFile.
Also, in the case where we fail to lookup an icon for an
application, ensure we return a 0 opacity texture.
Use ShellGenericContainer to implement a fully dynamic layout
for the application well. It's still fixed to 4 columns by default,
but no longer requires a fixed width to be passed in on start.
With another chunk of work, it could likely try to adjust to
the case where we can only fit fewer than 4 items in the well.
Remove the border highlighting on mouseover, since that caused
reallocations, and the grid layout isn't trivial.
Delete the unused shell_global_get_word_with function.
For both of these, because of optimizations a few patches ago, we
ended up relying on hash table ordering which caused instability
in the application well among other things. Define an ordering
for both.
The favorites is just the order of the GConf keys, and new items
get appended. In the future we should allow insertion at any
point which the grid could use.
For running applications order, define a new "initially_seen_sequence"
transient variable which is just an monotonically incrementing
integer assigned to an application for the first time we saw it
running in this session. When an application is closed, it's reset.
When exiting from --replace mode, we want to start the new
gnome-panel with a reasonable working directory so that if, you say,
open a terminal from it it doesn't start off in the gnome-shell
directory.
(gnome-shell itself is running in $HOME because mutter changes
directory itself at startup.)
Reported by Mathieu Bridon
http://bugzilla.gnome.org/show_bug.cgi?id=591145
Some C library versions have __attribute__((warn_unused_result)) on
fgets(). We really don't care since we are just throwing the data
away, but check the result anyways.
When AM_SILENT_RULES is available, use it to strip down the output
of make so we can see what's important rather than gigantic long
compile lines.
Use 'make V=1' to see everything again.
Fix a couple of places where we had 'cmp' rather than 'cmp' and were
getting standard-error spew about missing files when generating
enum-types.h files.
http://bugzilla.gnome.org/show_bug.cgi?id=591002
src/shell-global.c src/shell-process.c: Remove dead code
src/shell-texture-cache.c src/shell-status-menu.c: Remove
<foo>_new() functions that weren't in the header file and
not used anyways:
src/shell-texture-cache.[ch]: Fix a prototype that used ()
when (void) was intended.
http://bugzilla.gnome.org/show_bug.cgi?id=590998
Move the GStreamer initialization from the Javascript code into
shell_recorder_init(). This avoids a dependency on the GStreamer
introspection information and will make it easier to drop the
gir-repository module dependency.
Said function in genericDisplay.js was returning the index of the
actor based upon its position in the entire list, while everywhere
else indexes relative to the currently displayed page were used.
This made actions in the details pane break (bug #590949), so I
replace it with a new function in shell-overflow-list.c,
shell_overflow_list_get_actor_index, which is page based.
Subclass ClutterGroup (to avoid having to implement all of dispose,
raise, lower, add, etc.), and have it proxy the allocation requests
out into signals. We have to group up the two out parameters
into a struct unfortunately.
Included example code in the C file source for now.
The previous application monitoring code was originally designed
to be based on WM_CLASS, which was then resolved on a server.
We have that resolution code locally now, so instead
of saving WM_CLASS data, save application IDs.
Also, inside the WM we have a much better
infrastructure for tracking windows. In particular, rather
than polling, we can just watch for focus notification on
the display, and window add/remove.
Instead of polling XScreensaver, use DBus to watch org.gnome.Session
which already has an idle time watch.
Now there is no polling at all inside the monitor.
When we fail to load a texture, make sure we keep it 0 opacity to avoid
a white square. Also this is useful to avoid the square while loading
a texture asynchronously.
Corresponding with the design, if an application is in a running
state (has > 0 windows open), draw a glow behind the name.
To make the display look a bit nicer, set the width of each item
to be equal to the longest word among all the items.
Make sure that we calculate the next update time correctly.
Store timeout time instead of the timeout delta, so that it doesn't get outdated.
Create a new callback when the time update happens for the original callback.
Make sure last visited time is updated in the details pane by keeping track
of the description actors created for the detail actors.
Add comments to the new functions.
Avoid depending on gdb for replacing an existing panel, since it
requires debuginfo and gdb installed.
Instead we grab the org.gnome.Panel DBus name, using DBus name
replacement semantics.
Extend ShellTextureCache by adding the concept of a policy, which
we expose to the public API for loading URIs.
This lets us have the shell tell the cache to keep the information
icon texture around forever.
Secondly, fix the caching of recent info; we shouldn't always be
loading the backup pixbuf. Move recent info loading entirely
into ShellTextureCache.
GenericDisplay wasn't quite completely converted to the ShellOverflowList
model. Since the list now holds all actors, the indexing/wrapping
was incorrect.
Add a property which lets us keep track of how many items are displayed,
use this in genericDisplay.
Avoid setting selectedIndex to -2 when going up with no items.
If we're not displaying any results at all, don't attempt keynav (for now).
Make the ClutterText and ClutterTexture from the status menu
button available to JavaScript, and from there improve the
font definition of the user name.
shell-status-menu.[ch]: Add public get_name() and get_icon()
functions that return the user name label and icon
texture, remove the markup from update_name_text().
panel.js: Set the font for the button consistently with that
of the other panel labels.
Move thumbnail creation into ShellTextureCache. It's now asynchronous,
and we cache the result.
Create a DocManager class which keeps around the DocInfo objects between
invocations. This is also where we ensure we remove thumbnails for
recent items not known anymore.
Before, we looked up application data in several ways; the ShellAppSystem
exported just application ids (though it parsed the .desktop files internally),
and we'd create a Gio.DesktopAppInfo object (reparsing the desktop file again),
wrapping that inside a JavaScript AppInfo class, and finally the AppDisplay
would again parse the .desktop file to get the categories.
Also, to look up applications by id previously, we traversed the entire
menu structure each time.
Some qualities such as the NoDisplay flag were not easily exposed in the old
system. And if we wanted to expose them we'd have to change several different
application information wrapper classes.
All in all, it was quite suboptimal.
The theme of this new code is basically "just use libgnome-menus". We do
not call into Gio for app lookups anymore. The new Shell.AppInfo class
is a disguised pointer for the GMenuTreeEntry item.
To fix the caching, we keep a simple hash table of desktop id -> ShellAppInfo.
ShellDrawingArea is a size-independent wrapper for a ClutterCairoTexture.
Useful when drawing non-fixed size areas.
ShellStack is a simple container class which holds items
in a completely overlapping Z stack. The main difference
from ClutterGroup is that items will be constrained to
(and allocated) the size of the stack, not getting their
preferred size always.
Although methods like gconf_client_get/set_bool() and such are usable
from gjs, get_list/set_list is not, since there's only one method for
all list types. So ShellGConf wraps GConfClient and adds separate
typed list methods.
Also, add a detailed "changed" signal that can easily be connected to
from js, since we can't currently use gconf_client_notify_add()
directly.
Searching across NoDisplay desktop items can produce weird
results to the user (including duplicates, and items that
aren't really applications at all.) So, don't include them
normally.
But continue including NoDisplay items when we look up the
desktop file for a window, since we want to catch applications
like Evince and Nautilus which are otherwise NoDisplay.
http://bugzilla.gnome.org/show_bug.cgi?id=587548
This is not a complete patch; it doesn't attempt to handle the homogenous
property or column major.
(Based on patch by Colin Walters <walters@verbum.org>)
http://bugzilla.gnome.org/show_bug.cgi?id=587720
Add a GConf key for favorites, and API for retrieving them.
Also add shell_app_system_lookup_basename, which we use from
the app monitor to look up WM_CLASS ids.
Track all windows; at the time of opening (and shell startup)
we call into ShellAppSystem to take the WM_CLASS property and
try to find an associated .desktop file.
Add mozilla-firefox to the list of our WM_CLASS workarounds.
Add shell_global_get_screen, since it's often used.
Fix up the comments about the horizontal gradient code and use 8x1 texture
instead of 8x8.
Make sure the values we assign to the three-stop horizontal gradient
require the use of the three stop gradient, with the middle value not being
right between the side values.
Display the results pane above the workspaces. The results pane is somewhat
transparent and has a blue gradient background. The dash pane is slightly
transparent and also has a blue gradient background.
The results pane shows up when a More control is clicked. It disappears when
a Less control is clicked, an area outside of the dash area is clicked,
an item starts being dragged, or the overlay mode is exited.
Add shell_global_create_horizontal_gradient() to shell-global.[ch]
Currently we position the user status menu at the upper left of
the user status button. Then, because Mutter is inappropriately
positioning override-redirect windows it get shoved into the
workarea. Once that bug is fixed (bug 582639), we'll have to
position the menu ourselves.
This patch aligns the user status menu at the left end of
and beneath the top panel.
http://bugzilla.gnome.org/show_bug.cgi?id=586156
Currently function shell_get_thumbnail_for_recent_info located in
src/shell-global.c is used to get thumbnails for recently used files.
However, it only works if you have a GtkRecentInfo object for the file,
even though the thumbnail generation code doesn't depend on it. This commit
renames the function to shell_get_thumbnail and makes it generic so that it
just takes two strings: a filename and a mimetype.
When there is no root pixmap, the result will be a CoglMaterial
with a layer with no texture, and that causes a crash.
Work around this by supressing painting the root pixmap actor
when there is no root pixmap.
http://bugzilla.gnome.org/show_bug.cgi?id=585196
- clutter_actor_get_transformed_position()/size() return floats
- clutter_stage_get_actor_at_pos() takes a pick mode
- ClutterTimeline no longer has a concept of frames
- ClutterUnit is now replaced by float
- cogl_texture_new_from_data() signature changed
http://bugzilla.gnome.org/show_bug.cgi?id=585013
With clutter changes, we can now no longer clone an actor unless
it is part of a stage. So, we hide the root pixmap source, and
add it.
This means that the logic to free the source actor when the
last clone disappears no longer applies, since the stage will also
reference it; so we just leave the actor around permanently.
http://bugzilla.gnome.org/show_bug.cgi?id=585012
We need a foreach_with_internals() function that includes the
background_texture/background_rectangle actors, so that states
will properly be updated on map/unmap/etc.
http://bugzilla.gnome.org/show_bug.cgi?id=585007
- ClutterUnit is now replaced with float
- allocate() now takes flags rather than absolute_origin_changed boolean
- cogl_texture_new_from_data() signature changed
http://bugzilla.gnome.org/show_bug.cgi?id=585007
The code here is significantly cleaner if we use the data Metacity
already has cached and validated, rather than talking to X directly.
Also some preparatory work for extending the monitor API by
clarifying the name of the (current) main entry point.
To avoid loading applications from two different systems, use
ShellAppSystem solely. This unifies the initial load and the
reload.
Extend ShellAppSystem to also load settings/preferences, and
ensure they appear in the search.
We need to include the icon size in the data we pass to on_pixbuf_loaded()
so that we can include it in the key we use when caching the icon
Currently we save icons in the cache at size 0 but look them up at size 48
so no caching occurs.
http://bugzilla.gnome.org/show_bug.cgi?id=583503
Recent gjs changes have made it log most types of messages (including
log() calls) only to a configured log file and not to stderr. So,
set GJS_DEBUG_OUTPUT=stderr to make *stderr* the log file and get
our log() calls back.
Add a ShellTextureCache class which loads (and can cache)
pixmap->texture conversions. This fixes a problem with the
async code in ClutterTexture that it was lower priority
than animations, and also ensures we're really only
loading these pixbufs once in the icon case.
We need to reset the popularity GSList* at start, and everytime we load data about a another activity. This also implies fixing the typo about (activity != -1).
Thanks to Dan Winship. http://bugzilla.gnome.org/show_bug.cgi?id=582215
If a file already has a failed thumbnail indicator, don't try to
thumbnail it, and if thumbnailing fails, create a failed thumbnail
indicator. (In particular, so that if thumbnail creation times out, we
don't keep retrying and eventually timing out every time the user
opens the overlay.)
http://bugzilla.gnome.org/show_bug.cgi?id=568081
This solves several issues:
- use built-in default so that app monitoring is enabled when schemas are not installed
- don't start/stop timers without checking their previous state
- unreference the default GConfClient
- use #define for the GConf key path
Just because ShellTrayManagerChild had a 'manager' field, I shouldn't
have assumed it was actually being set; fixes a crash with tray icons
that don't support RGBA visuals.
Unless we're running gnome-shell from the source directory, we shouldn't
use the .la file as the mutter plugin. Instead, we use the dynamic
library.
Closes: bgo#581327
* Rename ShellGtkWindowActor to ShellGtkEmbed, and make it require
a ShellEmbeddedWindow rather than a general GtkWindow.
* Add ShellEmbeddedWindow subclass of GtkWindow that bypasses most
of the GtkWindow complexity for size negotiation, and calls out
to a clutter actor instead; also automatically handle reparenting
the GtkWindow into the stage window.
* Use the reworked ShellGtkEmbed in ShellTrayManager, this simplifies
the code a bit, and more importantly results in the tray icons
having the correct size negotiation, rather than having a fixed
24x24 size.
http://bugzilla.gnome.org/show_bug.cgi?id=580047
This is a fairly simple implementation, not all that different from
plain metacity's. Further improvements could be made to
js/ui/altTab.js in the future.
http://bugzilla.gnome.org/show_bug.cgi?id=580917
Calling gdk_window_get_events() then gdk_window_set_events() will
remove "exotic" X event masks that GDK doesn't know about like
SubstructureRedirectMask. A window manager that doesn't select
for SubstructureRedirectMask on the root window is no longer
really a window manager, so various Bad Things were happening.
We can just piggy-back on Mutter selecting for PropertyNotify
events on the root window, so removing the code works fine.
http://bugzilla.gnome.org/show_bug.cgi?id=580572 (reported by Mike Bursell)
Now code can call Main.addShellActor(actor) to declare that that actor
is part of the shell, and so it should (a) be protected by wm struts, and
(b) be part of the stage input area, and then that code automatically
deals with updating if the actor changes size or visibility.
Use the actual image from the file for expanded mode previews for image files. Use the pixbuf loader to set the appropriate image size as soon as the image is prepared, but before it is loaded, to avoid loading large images. Apply the pixbuf orientation setting so that the image is properly rotated. Preserve the original size of the image if its dimensions are smaller than the space available.
Make sure we provide the accurate available width for the details actor. This
width has to exclude the padding and border width. Also provide the available height for the details actor.
Use code copied from GLib to close all file descriptors before we reexec ourselves
on the restart Alt-F2 command. This fixes serious memory leaks when we have mapped
graphics buffers.
http://bugzilla.gnome.org/show_bug.cgi?id=579776
The overlay looks nicer with the root window pixmap drawn on the
background. It is scaled up to twice the size, with positioning
based on the rule of thirds.
The sideshow animations shown when entering or leaving the
overlay and toggling the extended view were implemented by
Marina Zhurakhinskaya. They replace the old method of having a
black rectangle behind the workspaces that partly covers the
sideshow during transitions.
configure.ac: Add gdk-x11, clutter-x11 and clutter-glx modules.
overlay.js: Add a root window pixmap actor, make sideshow width
definitions more logical, replace the way the sideshow
animates when entering or leaving the overlay.
workspaces.js: Remove the backdrop, add helper functions for the
overlay transitions.
shell-global.[ch]: Add a method that creates an actor displaying
the root window pixmap and returning clones of it.
Icons with real alpha transparency weren't being drawn correctly
because the NaTrayIcon was being set redirected in addition to the
window holding it. And nothing drew the icon onto the window holding
it. Use the newly added na_tray_icon_set_composited() to fix.
na-tray-child.[ch]: Add na_tray_child_set_composited() to allow the
application to modify the behavior where gdk_window_set_composited(TRUE)
is called for icons with alpha. Rename na_tray_child_is_composited() to
na_tray_child_has_alpha() to better reflect the meaning and fix things
so that it can be called at any time and not only after the icon is
realized.
na-tray.c: Adapt to na_tray_child_is_composited() rename.
http://bugzilla.gnome.org/show_bug.cgi?id=579454
Merge from gnome-panel
2008-12-09 Vincent Untz <vuntz@gnome.org>
* na-tray-child.c: (na_tray_child_size_request): remove translatable
string in a warning
ShellAppMonitor now depends on gmenu to load menus.
Use the menu data from ShellAppMonitor to show a menu list.
GenericDisplay implementations can now have a sidebar area. We
handle keystrokes such as left/right explicitly.
Some internal API changes to account for the fact that a display
can have another filter in addition to the search.
If Xephyr isn't installed currently src/gnome-shell raises
an exception which isn't at all obvious without looking at
the source. This commit catches the exception and replaces
it with a more informative error message.
Change the overlay behavior to display more details about an item on single
click and launch it on double click.
When the item is clicked on in the expanded view, the details are shown in the
area on the right that is allocated for showing details. The details pop-up is
not shown for the item that was clicked on, but it is shown for other items on
hover and for the item that was clicked if the mouse pointer is moved back to
it.
Both hovering and single clicking results in the details pop-up being shown in
the regular view. (Single clicking actually doesn't do anything in the regular
view, but the details pop-up is shown due to hovering within the time it takes
to perform a single click.)
The overlay now uses 3 columns on the wide screen for displaying items in the
expanded view. This allows keeping the size of the details area the same for
expanded and regular views.
Add shell_get_button_event_click_count() to shell-global.[hc] to retrieve
the click count for button press and release events.
Add selectedItemDetails public variable actor to the generic display to
contain the details of the selected item and be shown in the overlay when
it is in the expanded view mode.
Fix the bug when the sideshow section would loose selection in the expanded
view if it did not have any items, and would not regain it if it was repopulated
with some items (e.g. when the search string changes).
The sideshow no longer takes overlay parent and width as constructor arguments.
It is added to the overlay inside the overlay code and manages its own width
instead (which is ok, since it is pretty much a private class within overlay).
Clean up the way selection is moved when an item is launched in order to have
selection on click and activation on double click be implemented in a similar
fashion. An unneeded _activatedItem variable in generic display was removed,
and the selected item is activated instead when necessary. The flow of processing
signals changed so that generic display no longer waits for the selection from
a different sideshow section to be removed before selecting an item that was
clicked on. This removed the need for doActivate() function.
The panel looks nicer when it is drawn as a semi-transparent gradient
above the background color.
shell-global.[ch]: Add a function that creates vertical gradient actors.
panel.js: Change the look of the panel and put the tray in a framed box.
overlay.js: Extend the overlay background to behind the panel.
For development and demonstration purposes, it's neat to be able to
record a screencast of gnome-shell without any external setup.
Built-in recording can also give much better quality than is possible
with a generic desktop recording, since we hook right into the paint
loop.
src/shell-recorder.[ch]: A general-purposes object to record a Clutter
stage to a GStreamer stream.
src/shell-recorder-src.[ch]: A simple GStreamer source element (similar
to appsrc in the most recent versions of GStreamer) for injecting
captured data into a GStreamer pipeline.
src/test-recorder.c: Test program that records a simple animation.
configure.ac src/Makefile.am: Add machinery to conditionally build
ShellRecorder.
tools/build/gnome-shell-build-setup.sh: Add gstreamer packages
to the list of required packages for Fedora.
js/ui/main.js: Hook up the recorder to a MetaScreen ::toggle-recording
keybinding.
http://bugzilla.gnome.org/show_bug.cgi?id=575290
- Force off text mipmapping - it isn't useful to us and causes
problems with old (pre-GEM) Intel drivers.
- Set Pango font options explicitly to enable font hinting.
tools/build/gnome-shell.modules: Point at master branch of Clutter (0.9)
and make gobject-introspection a dep of Clutter.
configure.ac src/Makefile.am: Use Clutter-0.9
js/ui/button.js js/ui/genericDisplay.js js/ui/overlay.js js/ui/panel.js
js/ui/runDialog.js js/ui/workspaces.js src/shell-status-menu.c:
Use ClutterText instead of ClutterLabel and ClutterEntry
js/ui/workspaces.js js/ui/genericDisplay.js: Use ClutterClone instead
of ClutterCloneTexture
src/shell-global.[ch]: Add Shell.get_event_key_symbol() to workaround
unaccessibility of clutter_key_event_symbol() to use.
js/runDialog.js js/overlay.js: Use Shell.get_event_key_symbol() as
appropriate.
Positioning actors at non-integer positions produces bad looking
text. Therefore, do centering as x + round((a-b)/2) rather than
x + (a-b)/2. (This does mean that centering will be less accurate
if an actor is scaled up by a lot, but it's pretty reasonable
to assume that scaling only occurs during an effect and static
displays are unscaled.)
- include only <clutter/clutter.h>
- cogl_rectangle() takes x1/y1/x2/y2 instead of x/y/width/height
- cogl_color() renamed to cogl_set_source_color4ub()
- use explicit CoglMaterial in BigRectangle to combine a texture
and a color.
- Remove defensive calls to cogl_enable(0) - cogl_enable() no
longer exists (enable flags are part of the material)
- Use ClutterCairoTexture actor (from Clutter) rather than ClutterCairo
This ensures that any popup windows we create in process, such as
the user status menu, will get X events delivered even if the user clicks
on the stage input area.
In particular, this lets us track the actor's location better; the old code
didn't work if the actor was put into a container that got moved around.
Part of #568712.
svn path=/trunk/; revision=167
main.js: set desktop environment to "GNOME" so that GIO can determine correctly which applications should be shown in the menus.
appDisplay.js: filter out applications that should not be shown in the menus, check if get_executable() for GAppInfo is not null before using it
svn path=/trunk/; revision=163
This is implemented as a separate process, since creating and running
toplevel windows from inside Metacity has issues.
We now grab a DBus name, and exec the child process. The child monitors
our name to know when to exit.
svn path=/trunk/; revision=153
gjs requires flags types to be registered with GObject to
work properly; g-ir-scanner requires the get_type() functions
to be present in a scanned header in order to find the
GObject type for a flag. So pass {tidy,big}-enum-types.h to
the scanner as appropriate.
svn path=/trunk/; revision=148
The plugin-gobject branch of Mutter (now merged into our branch) converts
plugins to more-standard GObject GTypePlugin, with the plugin itself
being a GObject class.
gnome-shell-plugin.c: Switch plugin to the new scheme
shell-wm.[ch]: Forward effect signals to ShellWM rather than hooking
directly into the plugin vtable.
default: Remove this (accidentally committed) file
svn path=/trunk/; revision=133
We don't want the X server to draw the icons onto the screen, so
use pass automatic=FALSE to clutter_x11_texture_pixmap_set_window();
causing CompositeRedirectManual to be used.
svn path=/trunk/; revision=122
shell-global.[ch]: Replace shell_global_focus_stage()
with shell_global_grab_keyboard()/shell_global_ungrab_keyboard()
main.js: Add startModal()/endModal() functions to go modal and
undo that.
run_dialog.js overlay.js main.js: Use startModal() for the overlay
and for the run dialog.
http://bugzilla.gnome.org/show_bug.cgi?id=561880
svn path=/trunk/; revision=83
shell_tray_manager.c: Add a bg-color property and implement it
by setting a 1x1 pixmap of the right color as the background.
Also, make the colormap of the tray manager window match that
of the socket. That should (untested) make transparency work
properly if the tray icon supports it.
panel.js: Set the bg-color property of the tray manager to
match the panel.
http://bugzilla.gnome.org/show_bug.cgi?id=561872
svn path=/trunk/; revision=82
Add a a method shell_global_focus_stage() to set the
input focus to the stage window, so that Clutter gets
keyboard events.
Adapted from patch in Bug 561299 from Colin Walters
svn path=/trunk/; revision=59
Move libtidy and libtray from lib_LTLIBRARIES to noinst_LTLIBRARIES; this keeps
automake from passing an -rpath when building them, which in turn convinces
libtool to build them as convenience libraries rather than shared objects.
svn path=/trunk/; revision=55
* configure.ac: Look for paths to all the g-i tools, and
also get the full path to metacity
* src/Makefile.am: Remove noinst library, not necessary now
svn path=/trunk/; revision=45
notification are to the panel. A bit warty, but we don't know how we want
the final UI to look anyway. (The fact that transparency doesn't work is
a known bug.)
svn path=/trunk/; revision=44
For experimenting with using tidy, import TidyButton and TidyGrid
(+ dependencies) into our source tree and set up build machinery
to build them and build a typelib for them.
The sources are build right into libgnome-shell.so, so the Shell.gir
and Tidy.gir actually point to the same shared library.
src/Makefile-tidy.am: Build libtidy-1.0.la
src/Makefile.am: Include built tidy into gnome-shell.la and
build Tidy-1.0.typelib
src/tidy/*: Add some source files from Tidy
svn path=/trunk/; revision=42
When we are animating the overlay, we don't want to be continually
redrawing the (obscured) window actors.
src/shell-global.c: Add 'window-group' property to expose the group
holding the window actors.
js/ui/overlay.js: Hide the window group while the overlay is up.
svn path=/trunk/; revision=39
Make sure that all functions in metacity-symbols.c with a return value
return something so that the compilation is clean.
svn path=/trunk/; revision=38
Installing the plugin typelib into $(libdir)/girepository is
non-sensical since no other program would want to reference it.
Move it to $(pkglibdir)/girepository instead. (Will need to set
environment variables to find it when we make installed operation
work.)
svn path=/trunk/; revision=25
shell-global.[ch]: Add shell_global_get_windows() to get
the list of all MutterWindow for the screen
Makefile.am: Include the metacity typelib so that we can
reference the MutterWindow type
js/ui/overlay.js: Cascade the open windows, scaled down
in the overlay
svn path=/trunk/; revision=24
By default, mutter doesn't pass events to clutter. We need to add an
xevent_filter method to our plugin and do that ourselves.
svn path=/trunk/; revision=7
A plugin for metacity-clutter (mutter) that initializes Javascript
and via Javascript adds an object to the mutter scene graph.
src/gnome-shell-plugin.c: metacity-clutter-plugin
src/shell-global.[ch]: Simple global-information object
js/: Directory for javascript
scripts/start-in-Xephyr: Launch metacity with our plugin
"nested" within an Xephy X server
svn path=/trunk/; revision=2