Commit Graph

190 Commits

Author SHA1 Message Date
Ray Strode
3c8325f1f3 layout: rework background handling
This commit updates the code to use mutter's new background
api, and changes the shell's startup animation to be closer
to the mockups.

Based on initial work by Giovanni Campagna

https://bugzilla.gnome.org/show_bug.cgi?id=682429
2013-02-19 18:39:54 -05:00
Jasper St. Pierre
22ddec46ab Place popup menus and other override-redirect windows on top of the panel
https://bugzilla.gnome.org/show_bug.cgi?id=633620
2013-02-14 13:45:39 -05:00
Giovanni Campagna
c30661c44c NotificationDaemon: support sound in notifications
The notifications spec has two hints for playing a sound, sound-file
and sound-name. We can support them using the existing code that
wraps libcanberra.

https://bugzilla.gnome.org/show_bug.cgi?id=642831
2013-02-14 18:54:08 +01:00
Jasper St. Pierre
c0279df3c6 layout: Port to the new mutter-based barrier wrappers
As pressure barriers need a signalling mechanism to provide
information about when and where they are hit, an object which
provides a signal is a more appropriate abstraction for a pointer
barrier than a functional ID-based approach. Mutter has gained
pointer barrier wrappers, so use its objects instead of ours.

https://bugzilla.gnome.org/show_bug.cgi?id=677215
2013-02-08 14:27:42 -05:00
Jasper St. Pierre
23717cc4d7 shell: Remove old jsapi-compat file
As we now depend on mozjs185, we know the API we'll be porting to.

https://bugzilla.gnome.org/show_bug.cgi?id=693284
2013-02-06 22:32:03 -05:00
Giovanni Campagna
427750d6af ShellGlobal: improve code to emit sound events
Use libcanberra-gtk3 and improve the set of context properties to correctly
associate the sounds with the shell.

https://bugzilla.gnome.org/show_bug.cgi?id=642831
2013-01-21 18:03:23 +01:00
Jasper St. Pierre
622c1c9236 shell-global: Move shell_fonts_init() back to main
We do not need any stage-specific code, so let's move
the initialization back to where other components are
initialized.

https://bugzilla.gnome.org/show_bug.cgi?id=691745
2013-01-18 00:25:42 -05:00
Cosimo Cecchi
dd19459e18 Add a SelectArea() DBus method
This will be useful for e.g. selecting an area for a screenshot.

https://bugzilla.gnome.org/show_bug.cgi?id=687954
2013-01-03 12:56:45 +01:00
Rico Tzschichholz
f41d0938a4 shell-global: Drop unused variable
Leftover from 5566aa4588
2012-12-26 16:23:38 +01:00
Jasper St. Pierre
5566aa4588 shell-global: Remove hacks around clutter_event_get_current_time()
clutter_event_get_current_time() has been fixed upstream as part
of reentrant bug fixes, so there's no need for these shenanigans.

https://bugzilla.gnome.org/show_bug.cgi?id=690665
2012-12-23 21:17:40 -05:00
Jasper St. Pierre
85728f0d15 layout: Use a MetaBackgroundActor, not a custom ClutterX11TexturePixmap
While looking at how the plymouth implementation was built, I was so
short-sighted and focused on the string "_XROOTPMAP_ID" that I didn't
realize it was the name of the standard background on the root window.
Remove our own implementation, and switch to using a standard mutter
MetaBackgroundActor.

https://bugzilla.gnome.org/show_bug.cgi?id=682428
2012-10-26 11:54:25 -04:00
Jasper St. Pierre
5e12e5f42a layout: Add a fake root pixmap actor at startup, and fade it out
This provides us with a smooth transition between plymouth and gdm.

https://bugzilla.gnome.org/show_bug.cgi?id=682428
2012-09-19 11:45:24 +02:00
Jasper St. Pierre
cb9062f818 calendar: Launch the calendar server with DBus autostart
The supposed reason for launching the calendar server in a peculiar
way was so that the process would be killed when the Shell was killed,
but that didn't actually work. Launch the calendar server through auto-start,
and persist all throughout the session.

https://bugzilla.gnome.org/show_bug.cgi?id=683156
2012-09-03 18:14:53 -03:00
Cosimo Cecchi
6f605598de global: don't run a garbage collection on tweeners end
This currently causes the shell to freeze very often in a thread
deadlock, and the gjs garbage collector behavior is currently getting
fixed at the right level in gjs itself.

https://bugzilla.gnome.org/show_bug.cgi?id=679832
2012-07-12 20:11:39 -04:00
Cosimo Cecchi
85bc8ccccc shell-global: remove shell_global_gc()
It's unused now.

https://bugzilla.gnome.org/show_bug.cgi?id=679832
2012-07-12 20:11:39 -04:00
Cosimo Cecchi
e82fe14f00 shell-global: remove unused shell_global_maybe_gc()
It's not used anywhere, and we're removing the manual garbage collection
invocations anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=679832
2012-07-12 20:11:38 -04:00
Florian Müllner
a277569d31 Revert "main: Make sure that --mode parameter is valid"
This reverts commit a7a46bbe1c.

Conflicts:

	js/ui/sessionMode.js
2012-05-24 19:34:06 +02:00
Florian Müllner
19318a1eeb global: Remove session_type property
ShellGlobal:session-type is now unsed, remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=676156
2012-05-22 19:42:28 +02:00
Florian Müllner
a7a46bbe1c main: Make sure that --mode parameter is valid
Instead of falling back to a set of default values or crashing the
window manager when an invalid mode is specified, check the value
of the ShellGlobal:session-mode property before taking over as WM
and make a clean exit if it cannot be resolved to an existent mode.

https://bugzilla.gnome.org/show_bug.cgi?id=676156
2012-05-22 19:42:27 +02:00
Florian Müllner
940ddb104c global: Add session-mode property
Add a session-mode property on ShellGlobal which corresponds to the
new --mode switch. Make the existing ShellGlobal:session-type property
readonly and base it on ShellGlobal:session-mode to avoid conflicts.

https://bugzilla.gnome.org/show_bug.cgi?id=676156
2012-05-22 19:42:27 +02:00
Jasper St. Pierre
de8a66d4ce st: Remove our own font DPI resolution implementation
Clutter has had clutter_backend_get_resolution for a little while.

https://bugzilla.gnome.org/show_bug.cgi?id=672807
2012-05-18 13:57:12 -04:00
Jasper St. Pierre
dc3d3acb3b global: Remove XSettings font handling code
Clutter now has its own XSettings implementation, ClutterSettings, which
handles this automatically now.

https://bugzilla.gnome.org/show_bug.cgi?id=672807
2012-05-18 13:57:12 -04:00
Giovanni Campagna
55a4517cd1 Fix documentation warnings
gobject-introspection now emits many more warnings for malformed
comments, and they fail the build.

https://bugzilla.gnome.org/show_bug.cgi?id=673656
2012-04-09 19:57:51 +02:00
Jasper St. Pierre
895745ac14 Don't depend on removed MetaPlugin APIs
Several MetaPlugin APIs that were just wrappers around other functions
were removed - switch to using the other functions directly.

https://bugzilla.gnome.org/show_bug.cgi?id=671103
2012-03-08 16:59:31 -05:00
Jasper St. Pierre
d81958a074 st: Remove st-tooltip
StTooltip has been plagued by lots of issues, and we recently ditched
it in the dash. Remove it for good.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-15 20:12:49 -05:00
Adel Gadllah
4516e4cc3b screenshot: Split into separate file / class
Split the screenshot functionality from ShellGlobal into its own class.

https://bugzilla.gnome.org/show_bug.cgi?id=670086
2012-02-14 21:10:08 +01:00
Adel Gadllah
b2ec340f9e screenshot: Add include_cursor parameter
Add a boolean parameter to Screenshot and ScreenshotWindow which draws the cursor on the screenshot when set
to true.

https://bugzilla.gnome.org/show_bug.cgi?id=670086
2012-02-14 21:10:08 +01:00
Jasper St. Pierre
b2f33e2895 Split off the extension importing stuff into a new library, 'ShellJS'
This allows us to create a separate utility to import things from
shell extensions that does not have the entire Shell stack built up

https://bugzilla.gnome.org/show_bug.cgi?id=668429
2012-02-07 16:00:37 -05:00
Jasper St. Pierre
d254e2e1f2 shell-global: Correct screenshot_window() after mutter changes
Recent mutter changes made MetaShapedTexture not a ClutterTexture,
but instead a special ClutterActor subclass that implemented the texture-y
bits itself. Use recently introduced API in MetaShapedTexture so that we can
get the raw texture data and spit it out as a PNG.

Use the new meta_shaped_texture_get_image() to get a window's texture data.
meta_shaped_texture_get_image() flattens the image against any mask it may
have, so a screenshot of it should look exactly as it does on the display.

https://bugzilla.gnome.org/show_bug.cgi?id=662486
2012-02-03 19:58:39 -05:00
Owen W. Taylor
4e89a5edde ShellScreenGrabber: grab the screen using pixel buffers
For the Intel drivers, using glReadPixels() to read into client-memory
directly from the frame buffer is much slower than creating a pixel
buffer, copying into that, and then mapping that for reading. On other
drivers, the two approaches are likely to be similar in speed. Create
a ShellScreenGrabber abstraction that uses pixel buffers if available.
Use that for screenshots and screen recording.

https://bugzilla.gnome.org/show_bug.cgi?id=669065
2012-01-31 10:47:19 -05:00
Cosimo Cecchi
9147dee0de screenshot: use the correct offsets when calculating the window area
Use the correct clip offsets when taking the screenshot of a window, to
exclude possible invisible borders and to include the case where the
window doesn't have any frame itself.
2012-01-27 17:15:03 -05:00
Cosimo Cecchi
049a561466 screenshot: add a 'flash' boolean flag to screenshot methods
Add a flag to these methods that allows flashing the area of the
screenshot directly from the compositor.

https://bugzilla.gnome.org/show_bug.cgi?id=668618
2012-01-25 19:20:09 -05:00
Jasper St. Pierre
b40b19997a shell: Use generic marshaller
https://bugzilla.gnome.org/show_bug.cgi?id=662152
2012-01-25 19:03:48 -05:00
Adel Gadllah
882fe48d80 Screenshot: Move filesystem I/O to a thread
Writting the screenshot to a file can take a relativly long time
in which we block the compositor, so do that part in a separate
thread to avoid the hang.

https://bugzilla.gnome.org/show_bug.cgi?id=652952
2012-01-22 11:47:56 +01:00
Jasper St. Pierre
faff0738eb Do not use the default stage
https://bugzilla.gnome.org/show_bug.cgi?id=664052
2011-12-15 16:13:29 -05:00
Jasper St. Pierre
628e59894b Doc fixes
https://bugzilla.gnome.org/show_bug.cgi?id=663277
2011-11-07 15:24:59 -05:00
Florian Müllner
8a39145e3c Replace deprecated GDK functions
https://bugzilla.gnome.org/show_bug.cgi?id=662245
2011-10-24 18:31:22 +02:00
Adel Gadllah
f4d8a35b9d altTab: Don't refuse to work when a pointer grab is in place
Allow push_modal to optionally only work with a keyboard only grab and
use that in altTab as a fallback to allow switching windows while a pointer grab
is in effect (like during DND operations).

https://bugzilla.gnome.org/show_bug.cgi?id=660457
2011-10-21 09:12:17 +02:00
Ray Strode
de352a309d global: drop incorrect memset
shell_global_get_memory_info tries to zero initialize the output
parameter with memset, but it passes the wrong size (because of
a missing *).  There's no reason to do the memset, though. In the
normal case all members of the struct gets initialized before the
function returns anyway.

This commit drops the memset call in favor of one explicit 0 assignment
that only gets executed on on atypical platforms.

https://bugzilla.gnome.org/show_bug.cgi?id=662236
2011-10-19 17:13:20 -04:00
Ray Strode
c573e7f9a1 global: add missing break statement
Just a drive by fix.

https://bugzilla.gnome.org/show_bug.cgi?id=662235
2011-10-19 17:13:20 -04:00
Jasper St. Pierre
577ccc4d56 Unmanage the screen before reexecing
This ensures a 'clean shutdown' of mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=660848
2011-10-17 21:55:13 -04:00
Colin Walters
f54b82f64c global: Initiate *full* GC at idle
While I've been trying to make the GC kick in more often, I've decided
it's a better tradeoff to aggressively GC at "leisure", for multiple
reasons.

We can and should revisit this at a later time, but basically:

* The shell doesn't generate *that* much JS data - garbage collection
  is very fast here.
* Long periods without GC mean we're not calling free() when we
  could, which in turn makes heap fragmentation much worse.
* Ensuring the GC runs at idle makes it much less likely we'll take
  a random large GC hit in the middle of an animation.

https://bugzilla.gnome.org/show_bug.cgi?id=659254
2011-09-17 10:16:35 -04:00
Colin Walters
36bfe8c533 memory: Add display of elapsed seconds since a garbage collection
This is useful information for debugging.

https://bugzilla.gnome.org/show_bug.cgi?id=659254
2011-09-17 10:16:35 -04:00
Ray Strode
5088f22388 global: Add concept of "session type"
This commit introduces a "session type" for
gnome-shell.  It essentially defines what
mode of operation the shell runs in
(normal-in-a-users-session mode, or at-the-login-screen mode).

Note this commit only lays the groundwork.  Actually
looking at the key and appropriately differentiating
the UI will happen in subsequent commits.

https://bugzilla.gnome.org/show_bug.cgi?id=657082
2011-08-28 12:22:38 -04:00
Ray Strode
4156a4c2d0 shell-global: require init call before shell_global_get()
shell_global_get() currently implicitly instantiates the shell
global singleton the first time it's called.  This means there's
no opportunity to set construction-time properties on the singleton.

This isn't an issue yet, because there aren't any.  We will need it
in the future, though, when we grow a --gdm-mode that gets exposed as
a property through the global singleton.

This commit adds a new _shell_global_init() function that must be
invoked before shell_global_get() can be called.

https://bugzilla.gnome.org/show_bug.cgi?id=657082
2011-08-28 12:20:16 -04:00
Adel Gadllah
b7fd78b254 Add screenshot interface
Adds methods to shell_global to allow taking screenshots
save the result into a specified png image.

It exposes three methods via shellDBus applications like
gnome-screenshot:

*) Screenshot (screenshots the whole screen)
*) ScreenshotWindow (screenshots the focused window)
*) ScreenshotArea (screenshots a specific area)

https://bugzilla.gnome.org/show_bug.cgi?id=652952
2011-08-24 16:06:13 +02:00
Colin Walters
f19e8b1e78 ShellGlobal: Remove unused dbus-glib include
https://bugzilla.gnome.org/show_bug.cgi?id=648651
2011-08-09 08:07:34 -04:00
Dan Winship
7765d6a08f shell-global: remove "gratuitous" meta_plugin_* calls
MetaPlugin wraps a bunch of compositor (and plain metacity) methods
that we can just call ourselves, so just do that. (Presumably this
dates back to some ancient time when it was imagined that plugins
wouldn't need access to the full metacity API.)

https://bugzilla.gnome.org/show_bug.cgi?id=654639
2011-08-03 09:09:55 -04:00
Dan Winship
aed50e2a39 shell-global: add a "display" property
and update callers to fetch that rather than doing
"global.screen.get_display()"

https://bugzilla.gnome.org/show_bug.cgi?id=654639
2011-08-03 09:09:55 -04:00
Dan Winship
b262a42458 shell-global: keep better track of screens and displays
Rather than constantly asking mutter for the MetaScreen, and then
figuring out the MetaDisplay/Display/etc from there, just keep track
of everything we care about inside ShellGlobal.

https://bugzilla.gnome.org/show_bug.cgi?id=654639
2011-08-03 09:09:55 -04:00