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
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
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
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
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
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
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.
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
* 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
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
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
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
Currently we only relayout when the screen size changes, this gets
the cases where a monitor gets added/removed but not when the primary
monitor changes.
We need to relayout on all monitor layout changes.
Remove ShellGlobal::screen-size-changed signal as it is no longer used, Gdk is
used to track changes now.
A ShellGlobal::gdk-screen property is added for this purpose.
https://bugzilla.gnome.org/show_bug.cgi?id=620377
Add a helper function to write a string as UTF-8 to a GOutputStream.
The signature of GOutputStream:
gboolean g_output_stream_write_all (GOutputStream *stream,
const void *buffer,
gsize count,
gsize *bytes_written,
GCancellable *cancellable,
GError **error);
Can't currently be handled by GJS.
https://bugzilla.gnome.org/show_bug.cgi?id=618189
To support scheduling performance-measurement scripts that want to run
a number of actions in series, add shell_global_run_at_leisure() to run
a callback when all work is finished.
The initial implementation of this is not that accurate: we track
business in Tweener.js via new shell_global_begin_work(),
shell_global_end_work() functions, and we also handle the case
where the main loop is continually busy.
https://bugzilla.gnome.org/show_bug.cgi?id=618189
The ShellGlobal initialization performs several actions like connecting
to the X server, ensuring directories exist, etc., that are problematic
because we were creating the object even when running the binary for
introspection scanning. During compilation we may not even have X11
available in e.g. autobuilder type environments, and it's just a
bad idea to connect even if we do.
Avoid this by deferring creation of the ShellGlobal object
until the plugin is actually started.
Now that we're initializing things later, remove the connection to
screen changes, and initialize cached ShellGlobal state at the point
when the plugin is set. The root pixmap actor is now sized initially
on creation too. Instead of relying on screen-size-changed being
emitted on startup, explicitly invoke _relayout().
https://bugzilla.gnome.org/show_bug.cgi?id=618371
Starting with gtk-2.20.0 there is a gdk_screen_get_primary_monitor,
which supports querying the primary monitor from xrandr.
But due to a sorting bug and lack of heuristics in the fallback path,
it isn't really useable.
Those bugs are fixed in gtk-2.20.1, so use it when building with
gtk-2.20.1+.
https://bugzilla.gnome.org/show_bug.cgi?id=608647
Adds the ability to create one or more zoom regions that show magnified or
enhanced views of the desktop. The magnifier provides options for:
* magnification factor,
* four mouse tracking modes common to screen magnifiers,
* positioning the magnified view in one of four screen location, or full screen,
* crosshairs to accentuate the position of the mouse,
* user preferences persistence via GConf (schemas in
.../data/gnome-shell.schemas).
* a DBus API to allow other processes to drive the magnifier as a service.
https://bugzilla.gnome.org/show_bug.cgi?id=595507
When creating the directory to store user data, XDG_DATA_HOME is
not guaranteed to exist. Also, the standard mandates permissions
of 0700 for the directory.
https://bugzilla.gnome.org/show_bug.cgi?id=617555
While the extension system already uses an XDG location (XDG_CONFIG_HOME),
other components use the deprecated $HOME/.gnome2 directory.
Replace both with XDG_DATA_HOME - the existing data (app usage stats,
looking glass history and extensions) is not migrated to the new location.
https://bugzilla.gnome.org/show_bug.cgi?id=617555
We can't use gdk_display_get_pointer/gdk_window_get_pointer from gjs
when XKB is active. We already had a wrapper that did the
get-modifier-state part of that, but some places also need the
get-pointer-location part of it. So update our wrapper to return both,
and update js code to use it.
https://bugzilla.gnome.org/show_bug.cgi?id=613428
Currently shell_global_get_primary_monitor just returns the first screen,
in the list as primary.
This is not always correct as the first screen reported by mutter isn't always,
the first one listed by RANDR.
Use gdk_screen_* to query the monitor information and add a heuristic to prefer
LVDS displays (similar like in done for gnome-panel) to prefer the laptop's
internal screen over external displays.
https://bugzilla.gnome.org/show_bug.cgi?id=608647
When the window's top-left corner is the same as the monitor's top-left
corner the check in shell_global_get_focus_monitor fails to detect that.
Use <= rather than < to fix that.
https://bugzilla.gnome.org/show_bug.cgi?id=613944
Fixes drawing of the overview in the case where there is no root pixmap
(eg, --xephyr mode).
(And the workaround for not drawing an unintialized ClutterTexture can
be removed now, since the texture will always have been initialized.)
https://bugzilla.gnome.org/show_bug.cgi?id=609339
Added signal 'screen-size-changed' to ShellGlobal.
Connect to this signal in main.js and run the _relayout() method.
If Overview or calendar are visible when this signal emit, they will be hiding.
https://bugzilla.gnome.org/show_bug.cgi?id=584526
Replace ngettext with dngettext and set the correct translation
domain, so gnome-shell's domain is searched for translations
rather than mutter's.
https://bugzilla.gnome.org/show_bug.cgi?id=597882
Consumer documentation will live at http://live.gnome.org/GnomeShell/Extensions
In terms of implementation; basically we load extensions from the well-known
directories. Add a GConf key to disable extensions by uuid. There is a new
option --create-extension for the gnome-shell script which takes a bit of
interactive input, sets up some sample files, and launches gedit.
No extensions UI in this patch; that will come later.
https://bugzilla.gnome.org/show_bug.cgi?id=599661
When we get a ClutterModifierType from Clutter, it might contain
bits not in the enumeration. See bug 59771 for a similar problem
with GdkModifierType.
Add a wrapper Shell.get_event_state() around clutter_event_get_state()
to mask these bits out and only return approved bits.
https://bugzilla.gnome.org/show_bug.cgi?id=597735
gdk_display_get_pointer() sometimes returns values for the mask that
aren't part of the GdkModifierType enumeration, which gjs doesn't like
(bug 597292). Work around that by adding a C wrapper that strips out
the extra flags.
https://bugzilla.gnome.org/show_bug.cgi?id=597559
Fix panel, app switcher, and looking glass to limit themselves to the
primary monitor, and run dialog to limit itself to the monitor
containing the currently-focused window.
The overview is also limited to the primary monitor now (with the
other monitors being blacked out), although the workspaces within the
overview are shaped like the full "screen" (the bounding box of all
monitors). To be fixed later.
https://bugzilla.gnome.org/show_bug.cgi?id=593060
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
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
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
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.
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.
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
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.
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.
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 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
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
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.
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
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.
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.
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.
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.
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
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
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
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
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
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