1
0
Fork 0
Commit graph

211 commits

Author SHA1 Message Date
Giovanni Campagna
e039add240 MonitorManager: add support for DPMS levels
To the XRandR and dummy backend (and as usual the dummy backend
has no effect)

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:33:37 +02:00
Giovanni Campagna
3bb33d384f Introduce a new DBus interface for display configuration
This new interface will be used by the control center and possibly
the settings daemon to configure the screens. It is designed to
resemble a simplified XRandR, while still exposing all the quirks
of the hardware, so that the panel can limit the user choices
appropriately.

To do so, MetaMonitorMode needs to track CRTCs, outputs and modes,
so the low level objects have been decoupled from the high-level
MetaMonitorInfo, which is used by core and API and offers a simplified
view of HW, that hides away the details of what is cloned and how.
This is still not efficient as it should be, because on every
HW change we drop all data structures and rebuild them from scratch
(which is not expensive because there aren't many of them, but
at least in the XRandR path it involves a few sync X calls)

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:22:54 +02:00
Giovanni Campagna
214f31257b Rework and consolidate monitor handling in MetaScreen
Consolidate all places that deal with output configuration in
MetaScreen, which gets it either from XRandR or from a dummy static configuration.
We still need to read the Xinerama config, even when running xwayland,
because we need the indices for _NET_WM_FULLSCREEN_MONITORS, but
now we do it only when needed.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:22:54 +02:00
Jasper St. Pierre
c20b007985 Reintroduce mutter binary
I accidentally deleted one too many things.
2013-08-13 10:16:01 -04:00
Jasper St. Pierre
8c1c77482d Remove old, deprecated utilities that nobody has used in a million years
https://bugzilla.gnome.org/show_bug.cgi?id=704437
2013-08-13 09:39:02 -04:00
Jasper St. Pierre
e633606ca9 menu: Remove support for icon items from the window menu
We don't show these by default, and it uses deprecated API.
This also removes our only use of the stock icons, so remove
those as well.

https://bugzilla.gnome.org/show_bug.cgi?id=704437
2013-08-13 09:39:01 -04:00
Adel Gadllah
381a9c2650 core: Remove the eventqueue
It is unused.

https://bugzilla.gnome.org/show_bug.cgi?id=695269
2013-03-06 09:17:12 +01:00
Ray Strode
580feb0c85 compositor: rework how backgrounds are managed
Background handling in GNOME is very roundabout at the moment.

gnome-settings-daemon uses gnome-desktop to read the background from
disk into a screen-sized pixmap. It then sets the XID of that pixmap
on the _XROOTPMAP_ID root window property.

mutter puts that pixmap into a texture/actor which gnome-shell then
uses.

Having the gnome-settings-daemon detour from disk to screen means we
can't easily let the compositor handle transition effects when
switching backgrounds. Also, having the background actor be
per-screen instead of per-monitor means we may have oversized
textures in certain multihead setups.

This commit changes mutter to read backgrounds from disk itself, and
it changes backgrounds to be per-monitor.

This way background handling/compositing is left to the compositor.

https://bugzilla.gnome.org/show_bug.cgi?id=682427
2013-02-19 18:21:00 -05:00
Ray Strode
842bc4421c compositor: export actor_is_untransformed function
actor_is_untransformed is a function meta-window-group uses to determine
if an actor is relatively pixel aligned and not contorted. It then
returns the coordinates of the actor.

In a subsequent commit will need the function in a different file, so
this commit separates it out.

https://bugzilla.gnome.org/show_bug.cgi?id=682427
2013-02-19 18:18:29 -05:00
Owen W. Taylor
b07aea467e Enable CLUTTER / COGL_ENABLE_EXPERIMENTAL_API globally
Instead of defining CLUTTER_ENABLE_EXPERIMENTAL_API and
COGL_ENABLE_EXPERIMENTAL_API in individual source files, enable
them on the command line. We weren't tracking exactly what pieces of
experimental API we were using and we were using the experimental
API in most source files that used Clutter and Cogl, so the
local #defines were annoying rather than useful.

https://bugzilla.gnome.org/show_bug.cgi?id=685463
2013-02-13 09:48:26 -05:00
Jasper St. Pierre
8b21df92f0 barrier: Add a new Meta wrapper for pointer barriers
Currently, we have a few function wrappers in the shell for pointer
barriers. If we want to implement interactive features on barriers,
we need some sort of signal to be notified of the interactivity.
In that case, we need to make a more sophisticated object-based wrapper
for a pointer barrier. Add one, and stick it in mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=677215
2013-02-08 14:23:38 -05:00
Florian Müllner
bdf47aeac4 keybindings: Import keybinding files from Metacity
Fallback mode is going away, so we should stop depending on Metacity
for keybinding files for common bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=687672
2012-11-12 19:27:35 +01:00
Giovanni Campagna
859ea1457d Add the ability to add shader hooks to MetaBackgroundActor
Using ClutterEffect is not pratical on MetaBackgroundActor, as the FBO
redirection has a noticeable performance impact. Instead, allow adding
GLSL code directly to the pipeline used to draw the background texture.
At the same time, port MetaBackgroundActor to modern Cogl API.

https://bugzilla.gnome.org/show_bug.cgi?id=669798
2012-11-05 19:12:37 +01:00
Evan Broder
4148a5cc6a Fix introspection gir metadata
The EXPORT_PACKAGES variable to the GIR makefile should be the
packages needed to use this gir. It's also unnecessary to set PACKAGES
(which is just used for CFLAGS at scan-time) since CFLAGS is already
pulls in all necessary CFLAGS.

https://bugzilla.gnome.org/show_bug.cgi?id=671092
2012-05-02 14:13:48 -04:00
Florian Müllner
8ca86fa8bf ui: Kill tooltips
After the changes in style handling in GTK+, mutter's tooltips no
longer match the tooltip style used in applications. Given that
all buttons in the default layout are well-known, killing tooltips
altogether rather than fixing the styling issues looks like a valid
approach.

https://bugzilla.gnome.org/show_bug.cgi?id=645101
2012-03-15 22:27:43 +01:00
Jasper St. Pierre
3e0ef03fd9 MetaShapedTexture: Make public and directly derive from ClutterActor
ClutterTexture has many features that we simply don't use and don't make
sense for a subclass with custom drawing. Deriving directly from ClutterActor
simplifies our code by avoiding workarounds and makes things more robust.

Additionally, make it public. GNOME Shell was already assuming that any
MetaShapedTexture was also a ClutterTexture, and we need to replace these
bits with new API for GNOME Shell to use.

https://bugzilla.gnome.org/show_bug.cgi?id=660941
2012-02-03 15:35:41 -05:00
Jasper St. Pierre
3a4512cd91 Use generic marshaller
https://bugzilla.gnome.org/show_bug.cgi?id=662153
2011-12-13 19:53:57 -05:00
Florian Müllner
34f6ffd1ad keybindings: Add toggle-tile-left/right bindings
Having keybindings for side-by-side tiling has been requested for
a long time, so add this support now.

https://bugzilla.gnome.org/show_bug.cgi?id=648700
2011-12-13 14:36:40 +01:00
Florian Müllner
d42a2a3c27 keybindings: Store keybindings dynamically
Rather than defining keybindings in static arrays generated at compile
time, store them in a hash table initialized in meta_display_init_keys()
and filled in init_builtin_keybindings().

This is a prerequisite for allowing to add/remove keybindings at runtime.

https://bugzilla.gnome.org/show_bug.cgi?id=663428
2011-11-22 00:42:30 +01:00
Rico Tzschichholz
1a51d307c8 Fix installation of mutter-schemas.convert 2011-11-11 21:39:54 +01:00
Florian Müllner
d0910da036 Port preferences to GSettings
Move preferences to GSettings, using mainly shared schemas from
gsettings-desktop-schemas.

Unlike GConf, GSettings support is not optional, as Gio is already
a hard dependency of GTK+.

https://bugzilla.gnome.org/show_bug.cgi?id=635378
2011-11-11 20:26:38 +01:00
Rui Matos
b28c6533f8 MetaBackgroundActor: make it a public class
https://bugzilla.gnome.org/show_bug.cgi?id=656433
2011-08-29 16:54:09 +01:00
Neil Roberts
fccd626604 Use a utility function to create GL_ARB_texture_rectangles
meta-texture-rectangle and meta-shaped-texture both create textures
with GL_TEXTURE_RECTANGLE_ARB as the target using direct GL
calls. This patch moves that code into a shared utility function in a
separate file instead. The function resolves the required GL symbols
dynamically instead of linking to them directly so that if Clutter
eventually stops linking to -lGL mutter will continue to build. The
function also splits the texture creation into a separate texture
creation and data upload stage so that it can use
cogl_texture_set_region to upload the data. That way it can avoid
clobbering the glPixelStore state and it can let Cogl do any necessary
format conversion. The code preserves the old value of the rectangle
texture binding instead of clobbering it because Cogl expects to be
able to cache this value to avoid redundant glBindTexture
calls. Finally, the function uses cogl_object_set_data to
automatically destroy the GL texture when the Cogl texture is
destroyed. This avoids having to have special code to destroy the cogl
texture.

https://bugzilla.gnome.org/show_bug.cgi?id=654569
2011-07-19 11:06:23 +01:00
Thierry Reding
8033184134 Fix out-of-tree build.
This patch fixes an issue encountered when building mutter
out-of-tree:

  * When generating mutter-enum-types.[ch], the glib-mkenums command is
    executed from $(srcdir), so it is wrong to prepend $(srcdir) to the
    template file.

https://bugzilla.gnome.org/show_bug.cgi?id=624910
2011-07-08 16:33:12 -04:00
Owen W. Taylor
b5f277bd7b Freeze api_version to 3.0
Back the API version down to 3.0; since we don't make any stability
guarantees, there's no reason to have a merry-go-round of different
directories and filenames that people have to keep up with.
2011-07-01 19:19:11 -04:00
Frédéric Péters
9dd642f4af Go with a single libmutter library
https://bugzilla.gnome.org/show_bug.cgi?id=644565
2011-03-17 15:31:53 +01:00
Rico Tzschichholz
bbd98e7b86 Fix ld failure caused by several incomplete LDADD statements
https://bugzilla.gnome.org/show_bug.cgi?id=644188
2011-03-08 11:23:30 -05:00
Dan Winship
c84da3ce1b Move the installed includes to a subdir
If mutter is going to be a "real" library, then it should install its
includes so that users can do

    #include <meta/display.h>

rather than

    #include <display.h>

So rename the includedir accordingly, move src/include to src/meta,
and fix up all internal references.

There were a handful of header files in src/include that were not
installed; this appears to have been part of a plan to keep core/,
ui/, and compositor/ from looking at each others' private includes,
but that wasn't really working anyway. So move all non-installed
headers back into core/ or ui/.

https://bugzilla.gnome.org/show_bug.cgi?id=643959
2011-03-07 18:19:53 -05:00
Dan Winship
bb50f65532 Allow mutter to be used as a library
Move all of the mutter code into a new libmutter-wm.so, split its
main() method into meta_get_option_context(), meta_init() and
meta_run(), add methods for using in-process plugins, and add
libmutter-wm.pc pointing to the new library.

The mutter binary is now just a tiny program that links against
libmutter-wm. The --version and --mutter-plugins options are handled
at the mutter level, not in libmutter-wm, and a few strange unused
command-line options (--no-force-fullscreen and --no-tab-popup) have
been removed.

https://bugzilla.gnome.org/show_bug.cgi?id=643959
2011-03-07 18:19:53 -05:00
Dan Winship
a66ae4ad55 Use standard introspection configure/Makefile bits
This changes the introspection configure flag from
--with/--without-introspection to --enable/--disable-introspection,
and changes it so that trying to enable introspection when g-i is not
installed results in an error, rather than being silently ignored.

https://bugzilla.gnome.org/show_bug.cgi?id=643959
2011-03-06 13:04:58 -05:00
Owen W. Taylor
4ea00e102b Add an "Above_Tab" pseudo-keysym
We want switching between the windows of an application to be an easily
accessible operation. The convenient and memorable keybinding is the
key above the tab key - but the keysym for that key isn't consistent
across different keyboard layouts.

Add code that figures out the key from the XKB geometry and a magic
keysym name "Above_Tab" that refers to this key and switch
the default binding for cycle_group to <Alt>Above_Tab. (This will
have no effect for the normal case of getting the key binding from
GConf until this patch is applied to Metacity as well.)

https://bugzilla.gnome.org/show_bug.cgi?id=635569
2011-01-05 18:58:11 -05:00
Owen W. Taylor
07e6c5aac2 Draw the root window background
Add code to track and draw the root window background. The advantage of doing
it here as compared to in a plugin is that we can use the visiblity smarts
of MetaWindowGroup to optimize out drawing the background when obscured.

If handling other than tracking the _XROOTPMAP_ID property is desired in the
future, more functionality like setting the background from a file or doing
cross-fades can be added.

The new background actor is exposed to plugins via meta_plugin_get_background_actor()
similar to other exposed actors to allow cloning the background for use in
other displays. The actual class is not installed for public consumption at
the moment since it has no useful methods.

https://bugzilla.gnome.org/show_bug.cgi?id=634833
2010-11-18 13:58:37 -05:00
Owen W. Taylor
0477a3066d Refactor "texture material" creation from MetaShadowFactory
Create new cogl-utils.[ch] and move a helper function from
MetaShadowFactory there as meta_create_texture_material(); this
allows us to create single-layer materials from different parts of
Mutter and have them share the same template material.

Also expose a function for creating a 1x1 texture of a given
color meta_create_color_texture_4ub().

https://bugzilla.gnome.org/show_bug.cgi?id=634833
2010-11-18 13:58:37 -05:00
Owen W. Taylor
3c4d52732e Make MetaShadowFactory public
The basic MetaShadowFactory type is moved to a public header, while
the functions to fetch and paint shadows are kept private.
The public object will be used for configuration of shadows by
plugins.

https://bugzilla.gnome.org/show_bug.cgi?id=592382
2010-11-18 09:47:57 -05:00
Owen W. Taylor
9f4942e9a7 Make shadows pretty and configurable
The current shadow code just uses a single fixed texture (the Gaussian
blur of a rectangle with a fixed blur radius) for drawing all window
shadows. This patch adds the ability

* Implement efficient blurring of arbitrary regions by approximating
  a Gaussian blur with multiple box blurs.

* Detect when multiple windows can use the same shadow texture by
  converting their shape into a size-invariant MetaWindowShape.

* Add properties shadow-radius, shadow-x-offset, shadow-y-offset,
  shadow-opacity to allow the shadow for a window to be configured.

* Add meta_window_actor_paint() and draw the shadow directly
  from there rather than using a child actor.

* Remove TidyTextureFrame, which is no longer used

https://bugzilla.gnome.org/show_bug.cgi?id=592382
2010-11-18 09:47:56 -05:00
Florian Müllner
b445ee3763 Remove compatibility for GTK+-2.0
While the Meego developers agreed to switching mutter to GTK+-3.0
unconditionally a while ago, Canonical used a GTK+-2.0 build for their
Unity project. As Canonical now announced a switch to compiz as their
window manager, there is no longer a reason to maintain GTK+-2.0
compatibility.

https://bugzilla.gnome.org/show_bug.cgi?id=633133
2010-10-28 12:16:14 +02:00
Owen W. Taylor
52bc675fcb introspection: remove --allow-unprefixed
Remove --allow-unprefixed option to the scanner, and fix resulting
problems:

 * theme.h and boxes.h are split into a main -header and a private
   header that includes stuff that is not generally useful and
   hard to introspect. Merge theme-parser.h into theme.h.

 * meta_display_get_atom() and meta_window_get_window_type_atom()
   are marked as (skip)

 * Fix annotation: (element-type Strut) => (element-type Meta.Strut)

https://bugzilla.gnome.org/show_bug.cgi?id=632494
2010-10-23 15:58:16 -04:00
Owen W. Taylor
1920f211b0 Remove Mutter namespace prefix
Move all objects and functions namespaced with Mutter into the Meta namespace
to get a single consistent namespace. Changes that aren't simply changing mutter
to meta:

 MutterWindow              => MetaWindowActor
 mutter_get_windows        => meta_get_window_actors
 mutter_plugin_get_windows => meta_plugin_get_window_actors

https://bugzilla.gnome.org/show_bug.cgi?id=628520
2010-10-23 15:48:29 -04:00
Owen W. Taylor
804117c456 Remove MetaRegion
In many places, MetaRegion was being used entirely internally, rather
than for gtk2/gtk3 compatibility. In these cases, it's simpler to just
depend on cairo-1.10 (for both gtk2 and gtk3) and use cairo_region_t.

The few places where we did need GDK compatibility (GdkEvent.region and
gdk_window_shape_combine_mask) are replaced with a combination of
converting GdkRegion to cairo_region_t and conditional code.

https://bugzilla.gnome.org/show_bug.cgi?id=632474
2010-10-23 15:48:29 -04:00
Owen W. Taylor
a1e2e2a13d Fix builddir != srcdir builds
An accidental removal of $$pwd was causing Meta-<version>.gir to
be generated in srcdir.
2010-10-04 13:38:24 -04:00
Benjamin Otte
aa65f94c67 theme: Upgrade to use Cairo for painting (changes API)
This commit is in preparation for the work happening in GTK3, which will
use Cairo for drawing exclusively. So it is necessary to move all
drawing code to Cairo. In this commit the "gtk2" code is used for both
gtk2 and gtk3; compatibility with newer versions of gtk3 where different
code is needed will be added subsequently.
For compatibility with older GTK versions, the file gdk2-drawing-utils.h
provides a compatibility layer.

The commit changes the API of libmutter-private.

https://bugzilla.gnome.org/show_bug.cgi?id=630203
2010-09-26 17:09:20 +02:00
Benjamin Otte
dc80242e51 build: Only install libmutter-private for GTK3 builds
Define INSTALL_LIBMUTTER_PRIVATE with AM_CONDITIONAL and use it to build
an installed or uninstalled libmutter-private.so

https://bugzilla.gnome.org/show_bug.cgi?id=630203
2010-09-26 17:09:20 +02:00
Benjamin Otte
c6f8ad24bd Remove MetaArea widget
It's unused.

https://bugzilla.gnome.org/show_bug.cgi?id=630203
2010-09-23 12:54:14 +02:00
Florian Müllner
97e2b4666b Implement side-by-side tiling
When dragging a window over a screen edge and dropping it there,
maximize it vertically and scale it horizontally to cover the
corresponding half of the current monitor.

Whenever a "hot area" which triggers this behavior is entered, an
indication of window's target size is displayed after a short delay
to avoid distraction when moving a window between monitors.

https://bugzilla.gnome.org/show_bug.cgi?id=606260
2010-09-17 16:00:03 +02:00
Colin Walters
4c0763792d introspection: Build with --warn-fatal, drop fix-meta-rectangle.py hack
Cleanly build with --warn-fatal.  Implementation:

* Liberally apply (skip) where the API is clearly C only, e.g. uses
  XLib.  The theming code and MutterPlugin are skipped too.
* Add missing (transfer) and (element-type) annotations

For a few functions that had a comment, I turned it into gtk-doc, but
I didn't (with a few exceptions) try to write new documentation in
this pass.
2010-09-07 10:48:07 -04:00
Colin Walters
77a5e817a5 introspection: Use new --accept-unprefixed
Also depend on an introspection version which has this.
2010-09-01 13:20:39 -04:00
Colin Walters
47fcb998f5 introspection: Enable warnings
Also depend on Makefile to ensure we rerun on build changes.
2010-08-31 19:50:43 -04:00
Rob Staudinger
1024eae742 Really install region.h as private header
Libmutter-private's preview-widget.h depends on region.h, so that one
needs to be installed as well in order to keep dependees build.

Signed-off-by: Tomas Frydrych <tf@linux.intel.com>
2010-08-27 10:59:21 +01:00
Tomas Frydrych
dad1f01c5b Fixed incorrect location of regin.h in the previous commit
region.h lives in include, not ui
2010-08-27 10:06:37 +01:00
Tomas Frydrych
ce53f35974 Added region.h to installed headers
region.h is explicictely included by the installed preview-widget.h
2010-08-27 09:59:08 +01:00