1
0
Fork 0
Commit graph

2879 commits

Author SHA1 Message Date
Adel Gadllah
d0210c1a97 meta-window-actor: Throttle obscured frame synced apps
We must send frame_drawn and frame_timing messages to even when
we don't actually queue a redraw on screen to comply with the
WM sync spec.

So throttle such apps to down to a ~100ms interval.

https://bugzilla.gnome.org/show_bug.cgi?id=703332
2013-08-27 16:50:38 +02:00
Adel Gadllah
691c107ce9 meta-shaped-texture: Don't queue redraws for obscured regions
When we get a damage event we update the window by calling
meta_shaped_texture_update_area which queues a redraw on the actor.
We can avoid that for obscured regions by comparing the damage area to
our visible area.

This patch causes _NET_WM_FRAME_DRAWN messages to be not sent in some cases
where they should be sent; they will be added back in a later commit.

https://bugzilla.gnome.org/show_bug.cgi?id=703332
2013-08-27 16:50:33 +02:00
Adel Gadllah
5b4924c76e background: Rename visible_region to clip_region
This does better reflect what this region is used for.

https://bugzilla.gnome.org/show_bug.cgi?id=703332
2013-08-27 16:50:28 +02:00
Jasper St. Pierre
576cd87a5b idle-monitor: Fix a warning when a callback removes the user active watch
The user active watch is a one-fire watch, but it is valid in the API
for the callback to explicitly remove the watch itself. In that case,
the watch will be invalid after the user removes it, and the memory
potentially freed. So make sure to not dereference the watch after
the callback is called.

https://bugzilla.gnome.org/show_bug.cgi?id=706825
2013-08-26 16:30:04 -04:00
Tim Lunn
e74ed92993 background: don't save pixbuf in user data
https://bugzilla.gnome.org/show_bug.cgi?id=706777
2013-08-26 18:25:53 +02:00
Giovanni Campagna
eeed3d605b window: ignore skip-taskbar hint on parentless dialogs
Dialogs that don't have a parent should not be skip-taskbar,
otherwise they get lost and there is no way to recover them
(because they're not autoraised when activating the parent),
but toolkits and applications set the hint anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=673399
2013-08-26 17:35:39 +02:00
Giovanni Campagna
a3037a6dd1 MonitorManager: return the new backlight after changing
Modify the interface of ChangeBacklight to return the new value,
to account for rounding to HW limits.

https://bugzilla.gnome.org/show_bug.cgi?id=706729
2013-08-26 17:35:39 +02:00
Rico Tzschichholz
54fc2daa46 build: Add idle-monitor.xml to EXTRA_DIST 2013-08-25 08:59:32 +02:00
Giovanni Campagna
d36f544069 MonitorXrandr: skip CRTC reconfigurations that have no effect
If we're attempting to reconfigure the CRTCs to the same parameter,
skip the X call, as in some drivers a modeset can take time and
cause flicker.

https://bugzilla.gnome.org/show_bug.cgi?id=706672
2013-08-23 17:30:47 +02:00
Giovanni Campagna
d99c0ad384 Fix srcdir != builddir 2013-08-23 16:31:29 +02:00
Giovanni Campagna
387b53977d MetaIdleMonitor: add a DBus interface for the idle monitor
To allow other clients (gnome-session, gnome-settings-daemon)
to monitor user activity, introduce a DBus interface for the
idle monitor inside mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=706005
2013-08-23 15:25:13 +02:00
Giovanni Campagna
c63e5f755f Add a new helper for tracking user idle activity
When running as a wayland compositor, we can't use the xserver's
IDLETIME, because that's updated only in response to X events.
But we have all the events ourselves, so we can just run the timer
in process.

https://bugzilla.gnome.org/show_bug.cgi?id=706005
2013-08-23 15:01:54 +02:00
Colin Guthrie
7476419940 MonitorXrandr: Fix segv when accessing possible_clones
This code requires a double pass and the segv happens later
when trying to iterate over the array.

https://bugzilla.gnome.org/show_bug.cgi?id=706598
2013-08-22 22:10:00 +02:00
Giovanni Campagna
25ad3486a4 MonitorXrandr: fix reading the current DPMS level
Add missing break statements, to avoid falling always through
to the invalid case.

https://bugzilla.gnome.org/show_bug.cgi?id=706582
2013-08-22 16:24:26 +02:00
Florian Müllner
fdfde62a33 tower: Fix erroneous return value
The function's return value is void, not gboolean.
2013-08-21 23:41:28 +02:00
Florian Müllner
4366687b95 window: Fix a compiler warning 2013-08-21 23:41:28 +02:00
Robert Bragg
2b940f6aba tower: make sure not to blend when updating tower
Each level in the tower is initialized by binding the texture for that
level to an offscreen framebuffer and rendering the previous level as a
textured rectangle. The problem was that we were blending the previous
level with undefined data so argb32 windows with transparencies would
result in artefacts. This makes sure to disable blending when drawing
the textured rectangle.
2013-08-21 13:40:46 -04:00
Jasper St. Pierre
f42682711b texture-tower: Remove CPU codepath for mipmap generation
The CPU codepath for mipmapping is unusably slow, and we expect modern
graphics cards with modern TFP/FBO support.
2013-08-21 13:40:46 -04:00
Jasper St. Pierre
ad159d3ebd screen: Add _GTK_FRAME_EXTENTS to _NET_SUPPORTED 2013-08-21 13:40:46 -04:00
Alexander Larsson
6980256a42 ui: Disable scaling support in Gtk+
We can't really support the Gtk+ automatic scaling, as to much
code relies on the GdkWindow and XWindow sizes, etc to match.
In order to keep working we just disable the scaling, meaning
we will pick up the larger fonts, but nothing else. Its not
ideal but it works for now.

https://bugzilla.gnome.org/show_bug.cgi?id=706388
2013-08-20 14:27:49 +02:00
Giovanni Campagna
3f2dcf1698 MetaPlugin: simplify the modal API
Remove grab window and cursor from the API, and just grab always
on the stage window with no cursor.
This is mainly to remove the X11 usage in the public API, in preparation
for implementing this in wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=705917
2013-08-20 14:21:52 +02:00
Giovanni Campagna
44097c1b37 MonitorManager: emit a DBus signal when we change the display configuration
Using out-of-band notifications from the wayland protocol or from
X is racy, in that the client could ask for the new resources before
we have them.
Instead, with a signal, we are sure that when the client asks for
it, it will get the right values.

https://bugzilla.gnome.org/show_bug.cgi?id=706382
2013-08-20 13:56:52 +02:00
Giovanni Campagna
3a786542c4 MonitorManager: extend the API with physical sizes
These will be needed in the new display panel designs to show
the diagonal length and physical aspect ratio.

https://bugzilla.gnome.org/show_bug.cgi?id=706322
2013-08-19 23:34:04 +02:00
Giovanni Campagna
7d1e149905 Add MetaCursorTracker, a new helper for tracking the cursor sprite
Under X, we need to use XFixes to watch the cursor changing, while
on wayland, we're in charge of setting and painting the cursor.
MetaCursorTracker provides the abstraction layer for gnome-shell,
which can thus drop ShellXFixesCursor. In the future, it may grow
the ability to watch for pointer position too, especially if
CursorEvents are added to the next version of XInput2, and thus
it would also replace the PointerWatcher we use for gnome-shell's
magnifier.

https://bugzilla.gnome.org/show_bug.cgi?id=705911
2013-08-19 16:05:40 +02:00
Rico Tzschichholz
1dcd52838b build: Add xrandr.xml to EXTRA_DIST 2013-08-19 11:39:16 +02:00
Giovanni Campagna
909a6607c5 MonitorXrandr: try harder to get decent product/serial IDs
If the EDID does not include free-form product name and serial
number, use the numeric IDs instead, like gnome-desktop did.

https://bugzilla.gnome.org/show_bug.cgi?id=706233
2013-08-19 09:45:31 +02:00
Giovanni Campagna
015c05fbf6 MonitorXrandr: fix setting gamma ramps
The value passed to XRRCrtcSetGamma must be allocated with
XRRAllocGamma (because it relies on the locations of green and blue),
otherwise garbage is sent on the wire.

https://bugzilla.gnome.org/show_bug.cgi?id=706231
2013-08-18 12:11:42 +02:00
Giovanni Campagna
8ad5ccd2f8 MonitorConfig: switch to the real configuration file
Forgot to do before pushing...
2013-08-18 01:10:00 +02:00
Colin Walters
115cc870c7 build: Fix srcdir != builddir 2013-08-17 19:05:50 -04:00
Giovanni Campagna
3112794d83 MonitorXrandr: update the internal data structures after applying
We were relying on the XRandR events from the X server to update
the configuration, but we were calling meta_monitor_config_update_current()
immediately after, so the MonitorConfig would be updated with the
old configuration (and we would save that to disk!)

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:48:31 +02:00
Giovanni Campagna
3528b067d0 MonitorXrandr: follow the right order in applying the new configuration
First disable CRTCs that should be off in the new configuration,
then resize the framebuffer, then enable the new CRTCs.
If we don't do that, and we're making the screen smaller, X complains
with a BadMatch.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:47:53 +02:00
Giovanni Campagna
0986b660be MonitorXrandr: resize the framebuffer prior to setting the CRTC configuration
Otherwise X11 will trim the new configuration and disable outputs
outside the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:47:53 +02:00
Giovanni Campagna
3bb5086173 Monitor: restore correct display name handling
Now that we have the right values from the EDID, we can load
the PNP database and find the proper vendor name, to show in
the control center UI.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:47:53 +02:00
Giovanni Campagna
69467842ab MonitorXrandr: implement correct EDID parsing
To provide valid values for the vendor, product and serial fields
we need to read the EDID and parse it.
Parser kindly provided by gnome-desktop.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:47:53 +02:00
Giovanni Campagna
57077435ed MonitorManager: add EDID properties to the output DBus description
Add "edid-file", if we have one (in the KMS case, where we can point
people to the right sysfs file), or "edid" with inline data.
These are needed by colord to build the default ICC profile for
uncalibrated displays.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:47:53 +02:00
Giovanni Campagna
46de0ed462 MonitorManager: split the XRandR parts in a subclass
Instead of keeping a forest of if backend else ..., use a subclass
and virtual functions to discriminate between XRandR and the
dummy backend (which lives in the parent class togheter with the
common code)

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:47:53 +02:00
Giovanni Campagna
5086626805 MetaPlugin: add a UI hook for confirming display changes
We want to show a dialog when a display change happens from the
control center. To do so, add a new vfunc to MetaPlugin and
call it when a configuration change is requested via DBus.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:47:53 +02:00
Giovanni Campagna
bbbcd8c631 MonitorConfig: handle changes in the laptop lid
This way we don't need to track the current and previous
configuration in gnome-settings-daemon, when we already do so
in mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:47:53 +02:00
Giovanni Campagna
3b61b85f2c MonitorManager: add gamma support
Add GetCrtcGamma() and SetCrtcGamma(), that wrap the similarly
named XRandR API. These are used by GnomeRR inside the color
plugin of the control center (and may go away if the color
plugin decides to do something different under wayland)

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:47:53 +02:00
Giovanni Campagna
cd20f1bc0b MonitorManager: ignore configuration changes that disable all outputs
If we compute a screen size of 0 in either direction, we crash
later on, as it is invalid for clutter, cogl and X.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:47:53 +02:00
Giovanni Campagna
8b52782ed4 MonitorManager: add support for backlight
GnomeRR needs that too.
The backlight is exported as a normalized 0-100 value, or -1 if not
supported. Clamping to HW limits is handled by the backend.
Changing backlight uses a different method call, to avoid recomputing
the full display configuration every time the user presses the
backlight keys.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:47:53 +02:00
Giovanni Campagna
849050be95 MonitorManager: further extend the dummy backend
The default configuration is extended, which is only possible
if there are as many CRTCs as outputs, so make sure that's true.

Also, add more and bigger modes, so that different sizes will
be chosen for the three outputs.
A nice side effect of this is that with a real 1920x1080 + 1600x900
layout, if you disable the VGA you get a stage that matches the
screen size, which triggers the legacy fullscreen path in the
outside mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:47:52 +02:00
Giovanni Campagna
5c27a91684 MonitorManager: store the presentation mode bit in XRandR
Use a private output property to store if the output is in
presentation mode or not, so that this information is not lost
after the configuration read back from the server.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:34:16 +02:00
Giovanni Campagna
764c472edb MonitorConfig: add support for default configurations
Activate the presentation bit on new hotplugged monitors, while
making a fully extended setup when running for the first time.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:34:16 +02:00
Giovanni Campagna
d0529b7482 MonitorConfig: add CRTC assignment
Ripped off libgnome-desktop, trimming the parts that checked
that the configuration was plausible, as that should be done
in gnome-control-center before asking mutter for a change.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:34:15 +02:00
Giovanni Campagna
8f4621240a MonitorManager: add support for persistent monitor configurations
Add a new object, MetaMonitorConfig, that takes care of converting
between the logical configurations stored in monitors.xml and
the HW resources exposed by MonitorManager.
This commit includes loading and saving of configurations, but
still missing is the actual CRTC assignments and a default
configuration when none is found in the file.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:33:37 +02:00
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
dbd8d4d598 MonitorManager: inherit directly from DisplayConfig instead of handling signals
This way we can handle properties too.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:33:37 +02:00
Giovanni Campagna
522542c486 MonitorManager: fix handling of output transform
Read the current transform from XRandR, and expose the transforms
that are really supported on the bus.
The dummy backend now advertises all transforms, since it doesn't
actually apply them.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:33:35 +02:00
Giovanni Campagna
fc67c707e4 default plugin: add a random color background on each monitor
Instead of a full white background, make one with a random color.
This way the different "monitors" are visible and it's easier
to debug the DBus API.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-18 00:32:44 +02:00