Commit Graph

184 Commits

Author SHA1 Message Date
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
Dan Winship
64b2b4a7d4 layout: new file handling shell layout
Remove ShellGlobal's monitor-related methods, and have
Main.layoutManager provide that information instead. Move
Main._relayout() to LayoutManager, and have other objects connect to
the layout manager's 'monitors-changed' signal to know when the screen
geometry has changed.

https://bugzilla.gnome.org/show_bug.cgi?id=636963
2011-07-06 08:38:35 -04:00
Dan Winship
bfec396ec2 shell-global: remove some cruft
Some of the bookkeeping associated with the
ShellGlobal::screen-size-changed signal didn't get removed when that
signal did.

https://bugzilla.gnome.org/show_bug.cgi?id=633620
2011-06-28 11:07:04 -04:00
Colin Walters
26aa4333a5 shell_global_set_property_mutable: Remove
All introspection properties are now writable;
See https://bugzilla.gnome.org/show_bug.cgi?id=646633

https://bugzilla.gnome.org/show_bug.cgi?id=652597
2011-06-20 17:58:40 -04:00
Colin Walters
aa03734d39 Add "Memory" tab to lg
shell_global_get_memory_info() is a new function which extracts a few
global counters we have already, namely glibc's mallinfo, spidermonkey's
JSGC_BYTES, and gjs' counters for boxed/object/etc wrappers.

There is some slight overlap with perf; ultimately though I'd
like this function to do some more extensive analysis, so it wouldn't
be quite the same.

perf is going to be mainly concerned with how big the whole process
over time is; memory_info is for debugging memory leaks.

https://bugzilla.gnome.org/show_bug.cgi?id=650692
2011-06-07 14:44:35 -04:00
Colin Walters
a8baf4a2a2 Change 'debugexit' to quit main loop rather than exit(), add cleanup
A new envrionment variable GNOME_SHELL_ENABLE_CLEANUP is added which
causes us to attempt freeing global data.  The reason this isn't
enabled by default is that it's a waste of time at best, and at
worst in corner cases could cause crashes which would fill up
crash databases.  Better to leave it as a developer-only tool.

Start stubbing out some cleanup in ShellGlobal.

https://bugzilla.gnome.org/show_bug.cgi?id=649517
2011-05-19 15:35:04 -04:00
Dan Winship
61577e176e shell: move non-ShellGlobal functions from shell-global to shell-util
shell-global had become a dumping ground for functions that didn't
have anywhere else to be. Make shell-util the dumping ground instead,
and have shell-global only have methods that involve the ShellGlobal
object.

https://bugzilla.gnome.org/show_bug.cgi?id=648755
2011-05-16 14:51:35 -04:00