Compare commits

..

208 Commits

Author SHA1 Message Date
Jasper St. Pierre
46c0795125 backends: Add a method for monitoring cursor position 2017-02-23 11:06:41 -08:00
Jasper St. Pierre
b51b2f7aa4 backends: Move update cursor position from the tracker to the backend
It doesn't quite fit in with the CursorTracker, and it simply forwards
to the CursorRenderer anyway.
2017-02-23 10:47:04 -08:00
Owen W. Taylor
383ba566bd Call cogl_xlib_renderer_set_threaded_swap_wait_enabled()
Set up things so that if the INTEL_swap_event extension is not present,
but the driver is known to have good thread support, we use an extra
thread and call glXWaitVideoSync() in the thread. This allows idles
to work properly, even when Mutter is constantly redrawing new frames;
otherwise, without INTEL_swap_event, we'll just block in glXSwapBuffers().

https://bugzilla.gnome.org/show_bug.cgi?id=779039
2017-02-21 16:25:02 -05:00
Owen W. Taylor
d200868459 Add cogl_xlib_renderer_set_threaded_swap_wait_enabled()
Because the threaded-swap-wait functionality requires XInitThreads(),
and because it isn't clear that it is a win for all applications,
add a API function to conditionally enable it.

Fix the cogl-crate example not to just have a hard-coded dependency
on libX11.

https://bugzilla.gnome.org/show_bug.cgi?id=779039
2017-02-21 16:25:01 -05:00
Owen W. Taylor
690b232258 For NVIDIA proprietary drivers, implement sync events with a thread
It's a good guess that the buffer swap will occur at the next vblank,
so use glXWaitVideoSync in a separate thread to deliver a sync event
rather than just letting the client block when frame drawing, which
can signficantly change app logic as compared to the INTEL_swap_event
case.

https://bugzilla.gnome.org/show_bug.cgi?id=779039
2017-02-21 16:25:01 -05:00
Owen W. Taylor
e078838774 Fix the get_clock_time() without GLX_OML_sync_control
When we don't have GLX_OML_sync_control, we still can set the
frame presentation time, but we always use the system monotonic time,
so return that from get_clock_time().

https://bugzilla.gnome.org/show_bug.cgi?id=779039
2017-02-21 16:25:01 -05:00
Owen W. Taylor
1b03dd6704 Usability of SGI_video_sync is per-display not per-renderer
As previously commented in the code, SGI_video_sync is per-display, rather
than per-renderer. The is_direct flag for the renderer was tested before
it was initialized (per-display) and that resulted in SGI_video_sync
never being used.

https://bugzilla.gnome.org/show_bug.cgi?id=779039
2017-02-21 16:25:01 -05:00
Owen W. Taylor
1171c4f16d CoglWinsysGLX: factor out some duplicated code
Add a helper function for repeated calls to clock_gettime(CLOCK_MONOTONIC)

https://bugzilla.gnome.org/show_bug.cgi?id=779039
2017-02-21 16:25:01 -05:00
Owen W. Taylor
a9f139cab6 CoglGPUInfo - fix check for NVIDIA
NVIDIA drivers have a vendor of "NVIDIA Corporation" not "NVIDIA".
Check for both in case older drivers did use "NVIDIA"

https://bugzilla.gnome.org/show_bug.cgi?id=779039
2017-02-21 16:25:01 -05:00
Rui Matos
5ba38a4ab6 x11/xprops: Plug a few memory leaks
Commits 6dbec6f8, 734402e1 and f041b35b introduced memory leaks by
switching to returning copies instead of the original buffers but
forgetting to free those original buffers.

Some error cases were also not freeing the ->prop buffer as they
should.

https://bugzilla.gnome.org/show_bug.cgi?id=642652
2017-02-21 19:51:46 +01:00
Rui Matos
8f5a0ec83d constraints: Make zero sized windows be placed in the correct monitor
Wayland windows can be zero sized until clients attach a buffer, but
our rectangle code doesn't deal with this case well, in particular,
meta_screen_get_monitor_for_rect() might end up choosing the wrong
monitor for a zero sized rectangle since
meta_rectangle_contains_rect() considers a zero sized rectangle at the
right or bottom edges of another rectangle (the monitor's) to be
contained there.

Since out size limits constraint will enforce a minimum size of 1x1,
we might as well enforce that when setting up the constraint info so
that the correct monitor gets chosen and the single monitor constraint
doesn't move these windows to the wrong one.

https://bugzilla.gnome.org/show_bug.cgi?id=772525
2017-02-21 19:51:34 +01:00
Rui Matos
bb2e8ff09a window: Make move_to_monitor work for zero sized and offscreen windows
Wayland windows are initially zero sized until clients commit the
first buffer. Despite being invisible, clients are allowed to request
such windows to be fullscreened on a specific output before they
attach the first buffer which means we need to be able to move them.

meta_window_move_to_monitor() doesn't handle this case because these
windows' initial monitor is a placeholder since their initial
coordinates are 0,0+0+0, which results in us using a rectangle as
old_area for meta_window_move_between_rects() that might be to the "right"
of the window causing the move to go further out of the visible
screen's coordinates. This is later "corrected" by the constraints
system but the window might end up in the wrong monitor.

To fix this, we can make meta_window_move_between_rects() accept a
NULL old_area, meaning that we move the window to the new_area without
trying to keep a relative position.

https://bugzilla.gnome.org/show_bug.cgi?id=772525
2017-02-21 19:51:32 +01:00
Rui Matos
1fe10f09d7 wayland-xdg-shell: Handle the wl_output on the set_fullscreen request
This makes us fullscreen wayland windows on the requested monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=772525
2017-02-21 19:51:16 +01:00
Milo Casagrande
328b4d24c6 Update Italian translation 2017-02-21 18:17:56 +00:00
Anders Jonsson
4b2d4a0169 Update Swedish translation 2017-02-21 00:27:05 +00:00
Andika Triwidada
3564b5845e Update Indonesian translation 2017-02-20 06:44:47 +00:00
Piotr Drąg
2907b234c9 Update Polish translation 2017-02-19 21:52:33 +01:00
Florian Müllner
e1ffe15d94 display: Check we have a screen before freeing it
The reason for the display to be closed may be meta_screen_new()
returning NULL, in which case we don't have a screen to free.
Avoid a segfault on exit by adding a proper check.

https://bugzilla.gnome.org/show_bug.cgi?id=778831
2017-02-19 20:56:25 +01:00
Kjartan Maraas
1b0a3f11f9 Updated Norwegian bokmål translation. 2017-02-19 17:44:21 +01:00
Mario Blättermann
b202f5d094 Update German translation 2017-02-17 20:22:53 +00:00
Claude Paroz
cd5c52b550 Updated French translation 2017-02-17 21:09:28 +01:00
Carlos Garnacho
46d516cb04 clutter: Force scale=1 in tests/conform
Device pixel sizes are compared in several places, which breaks
some tests on hidpi setups.
2017-02-17 17:01:57 +01:00
Daniel Mustieles
4d0a886c45 Update Spanish translation 2017-02-17 10:45:58 +00:00
Inaki Larranaga Murgoitio
5db3eebfbb Update Basque language 2017-02-16 22:09:06 +01:00
Rui Matos
36ee6f656a wayland/keyboard: Avoid a division by zero
We don't further sanitize the values since the protocol allows for
everything as long as it's non-negative.

https://bugzilla.gnome.org/show_bug.cgi?id=776919
2017-02-16 16:49:44 +01:00
Rui Matos
966725fcb4 meta-input-settings: Avoid setting key repeat delay or interval to 0
Since doing so causes either errors or misbehavior.

https://bugzilla.gnome.org/show_bug.cgi?id=776919
2017-02-16 16:49:44 +01:00
Rui Matos
90923903ae MetaInputSettings: allow edge scrolling without 2fg capable devices
We should only force edge scrolling off if two finger is enabled *and*
we actually have two finger capable devices.

https://bugzilla.gnome.org/show_bug.cgi?id=778554
2017-02-16 16:49:44 +01:00
Carlos Garnacho
191525cdb4 autogen: Drop usage of gnome-common 2017-02-16 16:01:42 +01:00
Carlos Garnacho
2d18b18fe5 backends: Allow opening /sys/ files on MetaLauncher
libinput may want to access those for fetching LED status, as those are
requested readonly, just forward the request to plain open().

https://bugzilla.gnome.org/show_bug.cgi?id=778472
2017-02-16 13:48:55 +01:00
Piotr Drąg
ead62f1901 Use Unicode in translatable strings
See https://developer.gnome.org/hig/stable/typography.html

https://bugzilla.gnome.org/show_bug.cgi?id=772218
2017-02-16 02:44:16 +01:00
Florian Müllner
f97b2d49f5 Bump version to 3.23.90
Update NEWS.
2017-02-16 00:29:08 +01:00
Florian Müllner
827db6f7c7 build: Clean up .pc files 2017-02-15 23:54:07 +01:00
Juraj Fiala
91c6a144da Update shadows to match Adwaita better
This should make Mutter shadows almost indifferentiable to the ones made
by Adwaita. Based on an initial patch from Maxim <dead.555@bk.ru>.

https://bugzilla.gnome.org/show_bug.cgi?id=744667
2017-02-15 23:54:07 +01:00
Florian Müllner
cb86745245 window-actor: Special-case COMBO window's shadow class
We currently don't have any shadow class for combo box popups,
which means the default shadow of normal windows is used. That's
clearly odd given that the two are very different, and isn't
consistent with GTK+-3's client-side shadows for popups. While
we could add a dedicated shadow class, the designers are fine
with reusing the existing shadow for dropdown-menus, so let's
do that.

https://bugzilla.gnome.org/show_bug.cgi?id=744667
2017-02-15 23:54:07 +01:00
Carlos Garnacho
6b384dc8d1 wayland: Update tool cursor scale when crossing monitors
This makes tool cursors properly scaled on hidpi.

https://bugzilla.gnome.org/show_bug.cgi?id=778474
2017-02-15 23:33:44 +01:00
Carlos Garnacho
a25915f4f9 wayland: Keep pointer to cursor sprite on MetaWaylandTabletTool
https://bugzilla.gnome.org/show_bug.cgi?id=778474
2017-02-15 23:33:44 +01:00
Jeremy Bicha
92a7690e19 build: Update src/Makefile.am
https://bugzilla.gnome.org/show_bug.cgi?id=778699
2017-02-15 12:56:13 -05:00
Lionel Landwerlin
1372690c7f cogl: fix get-value-func annotation
Found while trying to enable Cogl 2.0 APIs access from JS.

https://bugzilla.gnome.org/show_bug.cgi?id=778684
2017-02-15 14:53:43 +00:00
Jonas Ådahl
bd2ca79a48 backends/x11: Only apply keymap when not running nested
https://bugzilla.gnome.org/show_bug.cgi?id=777800
2017-02-15 14:04:16 +08:00
Jonas Ådahl
6d64123849 backends/x11: Split up X11 backend into Cm and Nested
Split up the X11 backend into two parts, one for running as a
Compositing Manager, and one for running as a nested Wayland
compositor.

This commit also cleans up the compositor configuration calculation,
attempting to make it more approachable.

https://bugzilla.gnome.org/show_bug.cgi?id=777800
2017-02-15 14:04:16 +08:00
Matej Urbančič
042a95ef98 Updated Slovenian translation 2017-02-14 09:12:01 +01:00
Kjartan Maraas
2d3af657e7 Updated Norwegian bokmål translation. 2017-02-14 08:00:20 +01:00
Jonas Ådahl
4ebc55f2b3 Make libmutter and friends parallel installable
In order to minimize the amount of breakage, while at the same time
making it easier to make backward incompatible changes needed to
continue turning libmutter into a capable Wayland compositor, make the
libmutter and friends (libmutter-clutter, libmutter-cogl*) parallel
installable by adding a version number to the name. This changes
various filenames, for example what previously was libmutter.so is now
libmutter-0.so (assuming the version for now is 0), and
libmutter-clutter-1.0.so is now libmutter-clutter-0.so. The pkg-config
filenames and GObject introspection has been renamed to reflect this as
well.

This enables a downstream compositor rely on a specific version of the
libmutter API, while gracefully handling API/ABI changes by having to
update to the new version at their own pace.

https://bugzilla.gnome.org/show_bug.cgi?id=777317
2017-02-14 11:16:45 +08:00
Piotr Drąg
7c80e80a92 Update Polish translation 2017-02-12 16:09:00 +01:00
Dušan Kazik
4c5ec5dfa8 Update Slovak translation 2017-02-12 13:38:04 +00:00
Anders Jonsson
c995c0ad1f Update Swedish translation 2017-02-11 22:25:38 +00:00
Marek Černocký
d870ed4317 Updated Czech translation 2017-02-11 15:31:58 +01:00
Carlos Garnacho
9950b4de75 core: Add MetaDisplay::pad-mode-switch signal
This signal provides the necessary information to let gnome-shell trigger
updates of pad leds/oleds whenever a pad group switches mode, and the
actions associated to buttons do too.

https://bugzilla.gnome.org/show_bug.cgi?id=776543
2017-02-10 20:11:19 +01:00
Carlos Garnacho
7e3fbfbdd2 wayland: Notify tablet mode switches
This will show a fancy OSD so the change is immediately visible.

https://bugzilla.gnome.org/show_bug.cgi?id=771098
2017-02-10 20:11:19 +01:00
Carlos Garnacho
ff453c1143 backends: Notify tablet mapping changes in the UI
This takes over the older code in g-s-d.

https://bugzilla.gnome.org/show_bug.cgi?id=771098
2017-02-10 20:11:19 +01:00
Carlos Garnacho
efd9d467f2 backends: Add action label to mode switch buttons
https://bugzilla.gnome.org/show_bug.cgi?id=771098
2017-02-10 20:11:19 +01:00
Carlos Garnacho
07ce981cb0 core: Add MetaDisplay::show-osd signal
And add specific private methods to notify about tablet mapping and mode
switches. The signal allows the mutter side to trigger OSDs in a generic
way.

https://bugzilla.gnome.org/show_bug.cgi?id=771098
2017-02-10 20:11:19 +01:00
Carlos Garnacho
5af848d991 wayland: Clean up MetaWaylandTabletPadGroup
Using the clutter counterparts, some backend-specific code can be removed
from here.

https://bugzilla.gnome.org/show_bug.cgi?id=771098
2017-02-10 20:11:19 +01:00
Carlos Garnacho
fff7da2a96 backends: Have meta_input_settings_handle_pad_button() take an event
As all the relevant backends are expected to provide
ClutterPadButtonEvents, it makes no sense to split the information,
plus all other event fields are now available and might be needed
in the future.

https://bugzilla.gnome.org/show_bug.cgi?id=771098
2017-02-10 20:11:19 +01:00
Carlos Garnacho
d6fc41b73e clutter: Add function to find out the number of modes for a pad group
This is obtained in backend-dependent ways in the upper layers, seems
better to let ClutterInputDevice provide this information.

https://bugzilla.gnome.org/show_bug.cgi?id=771098
2017-02-10 20:11:19 +01:00
Carlos Garnacho
9d38ffa6e3 clutter: Add functions to find out mode switch buttons, and their group
This is done in the upper layers through backend-dependent ways, seems
better to let ClutterInputDevice provide this information.

https://bugzilla.gnome.org/show_bug.cgi?id=771098
2017-02-10 20:11:19 +01:00
Carlos Garnacho
8bcdf9ba61 clutter: Add current group mode on pad events
This info can be obtained here right away, so we don't need
backend-dependent paths in the upper layers.

https://bugzilla.gnome.org/show_bug.cgi?id=771098
2017-02-10 20:11:19 +01:00
Piotr Drąg
938891a2e2 Update POTFILES.skip 2017-02-10 19:22:41 +01:00
Carlos Garnacho
45c9786434 backends/native: Implement keep-aspect
Using ClutterInputDeviceEvdev::output-aspect-ratio. This only applies
to devices which are not calibratable, so again we need to implement
this at the toolkit level.

https://bugzilla.gnome.org/show_bug.cgi?id=774115
2017-02-10 16:31:50 +01:00
Carlos Garnacho
cfbc4fe4d0 backends/native: Use libinput calibration matrix for calibration
We couldn't properly merge output-mapping matrix and calibration into
one. Now that libinput calibration matrix is free to use, we can
actually implement tablet calibration with it.

https://bugzilla.gnome.org/show_bug.cgi?id=774115
2017-02-10 16:31:50 +01:00
Carlos Garnacho
dae5f06069 backends/native: Use ClutterInputDeviceEvdev::device-matrix for map-to-output
The libinput calibration matrix should only be used for calibration purposes,
this ClutterInputDeviceEvdev property has been added in place.

https://bugzilla.gnome.org/show_bug.cgi?id=774115
2017-02-10 16:31:50 +01:00
Carlos Garnacho
1ff9bbd59c clutter/evdev: Add ClutterInputDeviceEvdev::output-aspect-ratio
When != 0, this property will express the W:H ratio of the desired
output area (be it one monitor or the span of all monitors). At
the time of translating coordinates, coordinates will be skewed so
that the input area of the tablet is a rectangle of the given ratio.

Events happening in the input areas that fall outside the output
aspect ratio will be clamped to the nearest coordinate in the rect.

If the ratio is 0, the whole input area of the tablet will be used
and no coordinate skewing will happen.

https://bugzilla.gnome.org/show_bug.cgi?id=774115
2017-02-10 16:31:50 +01:00
Carlos Garnacho
cc838ead8b clutter/evdev: Add ClutterInputDeviceEvdev::device-matrix property
And transform absolute events using this matrix. This property is
akin to the "Coordinate Transformation Matrix" property in X11,
and will be used to map tablets/touchscreens to outputs, favoured
over the libinput matrix which is meant for calibration.

https://bugzilla.gnome.org/show_bug.cgi?id=774115
2017-02-10 16:31:50 +01:00
Jose Marino
9a123847e0 keybindings: fix erratic raise_or_lower behavior
Function "handle_raise_or_lower (src/core/keybindings.c)" is called
when running 'raise-or-lower' on a window. This function iterates
through all the windows in the stack to determine if our window is
already on top or obscured. The problem is that the window stack
includes windows in another workspaces and also windows that are
minimized.

https://bugzilla.gnome.org/show_bug.cgi?id=705200
2017-02-07 14:30:38 +01:00
Adam Jackson
1f0659d516 Use eglGetPlatformDisplay
Different libEGL will do different things for eglGetDisplay since it has
to guess what kind of display it's been handed. Better to just use the
API that makes it explicit.

Signed-off-by: Adam Jackson <ajax@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=772422
2017-02-07 14:16:33 +01:00
Peter Hutterer
4f31b53521 wayland: fix copy/pasto sending tool removed on rings/strips
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

https://bugzilla.gnome.org/show_bug.cgi?id=778262
2017-02-07 14:04:52 +01:00
Jonas Ådahl
962e1d5a69 MetaCursorRendererNative: Always force set hw cursor the first time
The initial state of the hardware cursor is not known, so always force
update it the first time we update the cursor. Do this by changing the
'force' flag of update_hw_cursor() to an 'invalidated' hw cursor state.

https://bugzilla.gnome.org/show_bug.cgi?id=771056
2017-02-07 11:19:52 +08:00
Mandy Wang
57f80f091f Update zh_CN translation 2017-02-05 18:19:23 +08:00
Carlos Garnacho
9c79a1631d backends: Pass seat ID to evdev ClutterDeviceManager
Clutter assumed seat0 which is most usually, but not always correct.
Add an evdev-backend specific function to allow passing the seat
that will be used for ClutterDeviceManager construction, which we
already obtain in MetaLauncher.

https://bugzilla.gnome.org/show_bug.cgi?id=778092
2017-02-02 23:39:02 +01:00
Piotr Drąg
c7853730ed Fix a translator comment
They need to be exactly one line above a string to show up in .po files.
2017-01-28 01:38:29 +01:00
Carlos Garnacho
2cd78bffd9 compositor: Avoid thaw on inconsistent effect_completed calls
If the meta_window_actor_effect_completed() triggers inconsistent
accounting, there's also high chances that the thaw call will be
unexpected at this time too, which will lead to a g_error().

This makes mutter more lenient to effect_completed() calls of the
right type (i.e. those triggering freeze/thaw) being performed more
times than necessary in the upper parts. A warning will be issued,
but the process won't abort.

https://bugzilla.gnome.org/show_bug.cgi?id=777691
2017-01-26 12:31:47 +01:00
Rui Matos
1597b357a1 clutter/evdev: Dispatch libinput before generating key repeat events
Since both the libinput event source and the key repeat timer have the
same priority, the order in which both handlers are called is
arbitrary if both sources are ready on the same poll return. This
means that sometimes we generate key repeats when there's already a
real key event queued on libinput that would cancel the repeat timer
if only it was processed before.

One solution would be lowering the repeat timer source priority a
notch lower than the libinput source but that would mean that a steady
stream of events from libinput (e.g. pointer device motion) would
prevent any key repeats to happen.

Instead, we can fix this problem by trying to dispatch libinput from
the key repeat timer and checking if the timer source has been
destroyed before generating more key repeats.

https://bugzilla.gnome.org/show_bug.cgi?id=774989
2017-01-25 13:07:48 +01:00
Rui Matos
73524cadd4 clutter/evdev: Avoid losing key repeat timestamp resolution
Commit 9214d5029c changed the notify*
API to use microseconds and we already have a microsecond time source
here so we can use the timestamp directly without losing resolution at
this layer.

https://bugzilla.gnome.org/show_bug.cgi?id=774989
2017-01-25 13:07:43 +01:00
Jonas Ådahl
6fa8238ebf monitor-unit-tests: Check monitor <-> logical monitor relationships
Make sure that each logical monitor owns the expected actual monitors.
This currently needs special care when dealing with laptop lid the
configuration, as the MetaMonitorConfigManager path still deosn't
handle restoring the previous configuration, meaning the logical
monitor with the external monitor will continue being primary.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:57 +08:00
Jonas Ådahl
1c6eef48f1 monitor-unit-tests: Move logical monitor checking into separate function
Split the big check function, makes things easier to read.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:57 +08:00
Jonas Ådahl
1fdf2ac746 monitor-unit-tests: Check that each CRTC mode is correct
This is partly redundant given that the current monitor mode is checked
against the CRTC mode, but this also checks the disabled CRTCs. Later
the configured mode position and transform will be checked.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
3ae9feef0c monitor-unit-tests: Check monitor mode CRTC mode positions
Check that the crtc mode has the correct intra-monitor position. In
effect, this tests that the CRTCs in a tiled monitor are configured with
the correct mode on the correct position.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
e9a8208607 tests: Add monitor store and config test for output underscanning
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
e357b4a46a monitor-store: Add support for monitor underscanning
Add a <monitor> subelement <underscanning> for configuring
output underscanning.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
097ca01411 legacy-monitor-config: Init is_underscanning config field from output
Don't loose the is_underscanning field when creating a new configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
e8197e8e05 monitor-config-manager: Add underscanning to MetaMonitorConfig
Set the underscanning state via the monitor config struct so that it
can be configured.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
7fc6b8a746 legacy-monitor-config: Fix primary output state
The MetaOutput::is_primary state was not correctly managed in two cases:

 * for tiled monitors, the primary state got overridden when setting
   the preferred resolution
 * for laptop lid, it was not set if the laptop panel happened to be
   the first output

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
0fd9c00580 tests: Add monitor and monitor store test for custom primary
Test that having a custom primary logical monitor is configured as
expected.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
4a51a1dfe5 monitor-unit-tests: Check handling of the primary presentation flags
The main output of the main (first) monitor of a primary logical
monitor should have the MetaOutput::is_primary field set; all other
outputs should have it not set.

All outputs associated with a logical monitor with presentation set
should have MetaOutput::is_presentation set. No other outputs should
have it set.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
9fb8abf840 monitor-store-unit-tests: Check the primary and presentation flags
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
449320cd23 monitor-unit-tests: Check that a stored config is preferred
Check that the stored config (where the logical monitors are placed
vertically) is preferred to the otherwise generated linear config.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
12b69dbabb monitor-unit-tests: Make hotplug_mode_update optional
Add a flag to the test setup creation function enabling the caller to
specify whether a stored config should be used. This is done by
changing the value of the hotplug_mode_update MetaOutput field,
normally used by VMs to do the same.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
4652bde3d7 tests: Move monitor test helpers to a helper file
Both the monitor unit tests and monitor store unit tests will want to
check whether the config manager is used and set custom configuration
files.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
9b4e1903e1 monitor-config-manager: Prefer to use stored config
If not explicitly set by the backend, prefer to use the stored config
instead of creating a new one, if available.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
702facbc91 monitor-store-unit-tests: Add test for vertical placement
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
339340df34 tests: Add MetaMonitorConfigStore tests
Add tests that check that a XML configuration file results in correct
MetaMonitorsConfig objects.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
1ad386bc28 Introduce MetaMonitorConfigStore
MetaMonitorConfigStore provides an XML storage mechanism for
MetaMonitorConfigManager. It stores configuration files defined in the
same level as the MetaMonitorsConfig format, i.e. refers to high level
"monitors" and "monitor modes" instead of connectors and CRTCs.

Only reading custom files are implemented and so far unused.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
28a8c714ea unit-tests: Pass argc/argv directly to g_test_init
Don't let a dummy option context consume the arguments; just let the
GLib test suite do it. It'll handle the basic command line arguments
and allow doing things such as specifying what test to run.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
c9f18bfef3 monitor-unit-tests: Test headless mode
This tests only the monitor configuration and basic functionality. It
does not test anything related to window management and Wayland client
interaction.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
20cd885443 backend: Only center pointer when not headless
When we are headless, there is no logical monitor to try to center the
pointer on, so just skip it.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
3f994646f2 monitor-config-manager: Handle headless setup gracefully
Handle headless setup gracefully by having no logical monitors. This
commit only makes the monitor management code deal with it; other areas
may still not be able to handle it.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
f45e7703ba monitor-unit-tests: Add lid-closed with no external monitor test case
Test that when the laptop lid is closed, but no external monitors are
connected, that we still have a mode set on the laptop panel.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
1ee0412177 monitor-unit-tests: Use g_assert_cmp* macros when suitable
Use the g_assert_cmp(int|uint|...) macros when comparing integers and
unsigned integers. This means that the mismatched numbers are printed
in the test report.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
4b33f05eda monitor-config-manager: Add MetaMonitorsConfig creation helper
Add a meta_monitors_config_new() helper. It's exposed outside of
meta-monitor-config-manager.c already, as it'll be used externally in a
later commit.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
81923410f6 monitor-unit-tests: Test starting with lid closed
Add a test case that checks that configuration works when the lid is
initialy closed then later opened. This test case is disabled when the
legacy configuration is used as it does not handle that situation.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
f19cb6a610 monitor-config-manager: Handle laptop lid being closed
Handle configuring when the laptop lid is closed. This is so far
handled by creating a linear configuration while ignoring the laptop
panel. Changing the current configuration will come later.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
cde1a730e8 monitor-unit-tests: Add laptop lid switch test case
Test that the laptop panel is disabled if the lid is closed.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
d6efdfab4b monitor-unit-tests: Mock laptop lid state
For now, always assume the laptop lid is open, as all test cases assume
this.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
f7b6271d86 monitor-manager: Move UpClient signal listening into monitor manager
Move the UpClients notify::lid-is-closed signal handling into
MetaMonitorManager, and put the getter behind a vfunc. This means
Placing it behind a vfunc allows custom backends to implement it
differently; for example the test backend can mock the state.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
8d1be7ffc0 monitor-unit-tests: Add test for handling too few CRTCs
Check that configuration when there are more outputs than CRTCs does
something sane.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
a0af7e94a6 monitor-config-manager: Add support for suggested configuration
Create a suggested configuration, if such configuration is provided.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
f607b03456 monitor: Add API to query suggested position
Adds an API to get the position suggested by the backend. This
translates to position advertised by some VM:s, used to hint at a
position making the position more natural (i.e. placed similarly to how
it may be placed on the host desktop).

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
644ee666f6 Introduce new monitor configuration system
The new monitor configuration system (MetaMonitorConfigManager) aims to
replace the current MetaMonitorConfig. The main difference between the
two is that MetaMonitorConfigManager works with higher level input
(MetaMonitor, MetaMonitorMode) instead of directly looking at the CRTC
and connector state. It still produces CRTC and connector configuration
later applied by the respective backends.

Other difference the new system aims to introduce is that the
configuration system doesn't manipulate the monitor manager state; that
responsibility is left for the monitor manager to handle (it only
manages configuration and creates CRTC/connector assignments, it
doesn't apply anything).

The new configuration system allows backends to not rely on deriving the
current configuration from the CRTC/connector state, as this may no longer be
possible (i.e. when using KMS and multiple framebuffers).

The MetaMonitorConfigManager system is so far disabled by default, as
it does not yet have all the features of the old system, but eventually
it will replace MetaMonitorConfig which will at that point be removed.
This will make it possible to remove old hacks introduced due to
limitations in the old system.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
ee0677a021 monitor-manager: Let backend implementations handle inital config
How the initial configuration is done depends on the backend, so let
them do it themself.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
0b4d80d74f wayland/output: Operate on monitors instead of outputs
Operate on MetaMonitor's instead of MetaOutput's, as the latter may be
only a subset of an actual "monitor" when referring to the physical
computer equipment.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
1a2b493d17 tests/monitor-unit-tests: Check current monitor mode
Check both that current mode is up to date, and that deriving it again
won't change it.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
9ceeddd952 monitor: Track current monitor mode
Track what monitor mode is the current. This is derived from the mode
of the corresponding CRTC's.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
e1849ccbfa monitor: Add getter for vendor and serial
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
6262b46928 wayland/output: Pass 'unknown' subpixel order when mismatch
When a logical monitor constains monitors with different subpixel
ordering, make the wl_output have the subpixel order 'unknown' so that
clients don't make assumptions given only a subset of the monitors of
the given region.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
8752f40792 monitor-manager-kms: Some harmless style fixes
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
8c5600e81b monitor-manager-kms: Handle EDID blob not being ready immediately
Sometimes we hit a race on hot-plug where we try to read the KMS
resources and the EDID blob is not yet ready. This would normally
result in a ENOENT when retrieving the blob. Handle this by retrying
after 50 milliseconds after a hot-plug event. Do this up to 10 times,
and after that give up trying to get the EDID blob and continue with
best effort.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
4c1b48d0cc monitor: Add API to get monitor mode from spec
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
536ae8430b monitor-manager: Add API to get monitor from monitor spec
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
aaddf44d45 monitor-manager: Add API to find primary monitor
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
0c42faf34d monitor-manager: Some trivial style fixes
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
be13d0f8ee monitor: Allow monitor mode foreach crtc iterator failable
Allow the function used to iterate over the CRTC modes of a monitor
mode to fail, causing the iteration to fail as well.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
81438eebef monitor-unit-tests: Test suggested-x/y configuration
Test the suggested-x/y output state often set by virtual machines.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
b70187c2d9 monitor-manager: Move meta_monitor_manager_ function to right place
Move a meta_monitor_manager_ function to meta-monitor-manager.c where
it belongs.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
c041851fa5 monitor-manager: Rename read_current_config to read_current_state
The function meta_monitor_manager_read_current_config() was renamed to
meta_monitor_manager_read_current_state() as it does not read any
configuration, but reads the current state as described by the backend.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
b59a8b1de3 monitor-manager: Move configuration paths behind 'legacy' functions
In preparation of replacing the configuration system with one working
with high level monitors instead of low level outputs etc, move
configuarion handling code into obviously named function (containing
the word 'legacy'.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
e3b9fe7e58 monitor-manager: Use MetaMonitor to check laptop panel status
Instead of looking at the current configuration, just find the
MetaMonitor of the laptop display panel and check the currest status
directly.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
0177ab45af MetaMonitor: Add _is_laptop_panel() helper
Add a helper to determine whether the monitor is the laptop panel or
not. To be used by the configuration system.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
bc951557e8 monitor: Add monitor spec object
A monitor spec object is meant to be used to identify a certain monitor
on a certain output. The spec is unique per actual monitor and connector,
meaning that a monitor that changes from one connector from another
(e.g. HDMI1 to HDMI2) will not be identified as the same. It is meant
to associate for example a configuration entry with an actual monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
2c32d94e1d monitor: Determine preferred monitor mode
Determine the preferred monitor mode given what the preferred CRTC mode
is, and expose it via the API.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
5d9e2d8d2e MetaMonitor: Add mode spec concept
Add a "mode spec" concept, meaning to be used as a identifier for an
actual monitor mode. It consists of details making a mode unique, i.e.
the total resolution and refresh rate. This will later be used to get
the actual monitor mode (set of one or more CRTC modes).

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
0637537355 monitor-config: Modernize type declaration
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
63ed134165 monitor-unit-tests: Check monitor modes
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
a6f464a600 monitor: Add monitor modes abstraction
Add "monitor modes" abstracting the modes set on a monitor. On normal
monitors, this directly maps to the CRTC modes, but on tiled monitors,
a monitor mode can consist modes per tiled output.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
0a0c49af71 logical-monitor: Remove outdated comment
Remove the comment about tiling things being calculated. It doesn't add
anything valuable, and tiling is hidden behind MetaMonitor.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
3c6d688c87 logical-monitor: Don't mirror refresh rate
Let the callers figure out how to associate a logical monitor with a
refresh rate, instead of exposing an arbitrary one.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
5d66a13397 logical-monitor: Don't mirror physical dimensions
Don't try to mirror the physical dimension, since that's a property of
one of the monitors, not of the logical monitor. Callers are changed to
deal with choosing the monitor to represent the logical monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
ff633f295e logical-monitor: Don't duplicate output list
Just use the monitor list and the output lists of each monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
310064601c monitor-unit-tests: Check tiled monitor adding/removing notification
Check that the moniter manager backends get the tiled monitor
added/removed notification.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
78799e58d2 monitor-manager: Make tiled Xrandr monitors based on monitors
Don't deal with adding/removing tiled Xrandr monitors in the generic
backend, but leave it to the Xrandr backend. The tiled monitor will
itself notify the backend when such a monitor is added and removed.

Tiled Xrandr monitors are now based no MetaMonitor instead of
MetaLogicalMonitor. This means that mirrored tiled monitors will now be
represented correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
4fa8b74dc7 monitor-unit-tests: Add musing about test declarations
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
bf8b4e9927 monitor-manager: Generate logical monitors from monitors
Instead of using crtcs and outputs to generate logical monitors, use
the ready made monitor abstraction that hides irrelevant things such as
monitor tiling etc.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
f48acd8448 tests: Check that the crtc gets a logical monitor set
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:54 +08:00
Jonas Ådahl
d0c9d2dc7b tests: Check that the monitors are properly generated
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
d9a0f2a88d monitor-manager: Generate a monitor abstraction from outputs and crtcs
Generate a set of "monitors" abstracting the physical concepts. Each
monitor is built up of one or more outputs; multiple outputs being
tiled monitors. Logical monitors will later be built from these.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
4e812410cc monitor-manager: Move logical monitor into its own file
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
0873e3812b backends: Rename MetaMonitorMode to MetaCrtcMode
The MetaMonitorMode referred to the mode of a CRTC, and with the future
introduction of a MetaMonitor, theh old name would be confusing.
Instead call it what it is.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
7eac28189b monitor-manager: Fix private header guard
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
1650c35e38 monitor-manager: Rename MetaCRTC(Info) to MetaCrtc(Info)
Change to follow the naming convention used everywhere else. This means
changing CRTC to Crtc even though it is an abbreviation.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
156c478ccb tests/monitor: Add HiDPI test
This doesn't test the actual calculation, since that is done in the
backend, it only tests the configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
10e6eae0dd tests/monitor: Add tiled monitor test
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
f519093f89 monitor-manager: Initialize tiled logical monitor scale
The logical monitor scale were not initialized properly when created
for a tiled monitor. Set it to the scale of the main monitor tile.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
8a8ab6c673 tests/monitor: Test preferred mode
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
9e28303588 tests/monitor: Test one out of two outputs being off
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
6776329cf5 tests/monitor: Test two crtcs, one output
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
2e4c516d43 tests/monitor-manager: Add API to emulate a hotplug event
Let a test case pass a test setup, which will be used as the new state
emulated by the test backend.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
d920eaba4a tests: Also make test case verification declarative
Set up the expected result in a declarative way in the same place as
the test case setup is declared. This way we have a completely
declarative way to create test cases.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
376a76a082 tests: Make monitor test case setup more declarative
In order to more easily create more test cases, make the test case
setup more declarative.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
c6d940d3b2 tests: Make monitor unit tests create initial config
This way we have both the test setup and testing in the same file.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
95c101a0ba tests: Use custom Wayland display name
This gets rid of a warning about the Wayland display name already being
taken.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
239671f882 wayland: Add API to override display name
Add API that the tests can use in order to override the Wayland display
name.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
12150c1ca7 tests: Add basic monitor configuration tests
The added test checks that two monitors are lied out on a row next to
each other.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
a251675cc0 tests: Use special purpose backend in unit tests
Use a special purpose backend when running the unit tests. This will
eventually allow testing things like configuration and hot plugging.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
d188949101 backends/x11: Make the X11 backend derivable
Make the X11 backend derivable so that we can base a nested test backend
on it.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:53 +08:00
Jonas Ådahl
d3920ddb67 core: Add private API to override compositor configuration
Add private API for overriding the compositor configuration, i.e. the
compositor type (X11 WM or Wayland compositor) and backend type. This
will make it possible to add a special test backend used by src/tests/.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:52 +08:00
Jonas Ådahl
bc5077f623 screen: Put xinerama monitor index outside of MetaLogicalMonitor
Put the monitor xinerama index in a separate struct that is attached to
the logical monitor using g_object_set/get_qdata(). Eventually this
should be moved to some "X11 window manager" object, but lets keep it
in MetaScreen until we have such a thing.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:52 +08:00
Jonas Ådahl
68f3b5849a workspace: Don't keep state given logical monitor indices
Don't store logical monitor specific state in an array where the index
from the monitor manager is used as index locally. Instead just use
table associating a logical monitor with a monitor specific state
holder, and store the state in there. This way we don't have the
workspace implementation relying on implementation details of other
units.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:52 +08:00
Jonas Ådahl
6de3e4a07e Turn MetaLogicalMonitor into a GObject
This will make it easier to move various manually managed data and data
now in MetaLogicalMonitor into GObject QData fields.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:52 +08:00
Jonas Ådahl
1fb0e8e9bb monitor-manager: Store logical monitors in a GList
Instead of storing the logical monitors in an array and having users
either look up them in the array given an index or iterate using
indices, put it in a GList, and use GList iterators when iterating and
alternative API where array indices were previously used.

This allows for more liberty regarding the type of the logical monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:52 +08:00
Jonas Ådahl
20b8743f21 monitor-manager: Refactor tiled monitor assembly code
Refactor the tiled monitor assembly code (that constructs a logical
monitor out of tiling information. Part of the reason is to move away
from array based storage, part is to make the code easier to follow,
and part is to separate logical monitor construction from list
manipulation.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:52 +08:00
Jonas Ådahl
016359ede2 window: Remove public meta_window_get_all_monitors API
It's not used anywhere and used monitor indices which is unoptimal.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:52 +08:00
Jonas Ådahl
410bad88a8 screen: Don't use monitor indices in check_fullscreen_func
Rewrite check_fullscreen_func to not use indexes (and
offset-index-as-pointer) tricks. This also removes the usage of an API
constructing temporary logical monitor arrays carrying indices.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:52 +08:00
Jonas Ådahl
c98bab8327 monitor-manager: Make logical monitor from point API take floats
Change meta_monitor_manager_get_logical_monitor_at() to use floats,
replace users of meta_monitor_manager_get_monitor_at_point() to use the
API that returns a logical monitor and remove the now unused function.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:52 +08:00
Jonas Ådahl
a422d6fe08 Move logical monitor neighbor API into monitor manager
Move the last piece of monitor grid getter API to the monitor manager
away from MetaScreen. The public facing API are still there, but are
thin wrappers around the MetaMonitorManager API.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:52 +08:00
Jonas Ådahl
98ee85ce82 Let the MetaWindow calculate its main logical monitor itself
There is no point in going via a MetaScreen API to calculate the "main
monitor" of a window, so let the window do that calculation itself.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:52 +08:00
Jonas Ådahl
5a8509f895 Move current logical monitor retrieval to the backends
The method used for getting the current logical monitor (the monitor
where the pointer cursor is currently at) depends on the backend type,
so move that logic to the corresponding backends.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:52 +08:00
Jonas Ådahl
06770b0dd4 display: Use logical monitor API when requesting pad OSD
Don't use the array index based logical monitor API and switch to the
one directly referencing logical monitor instances.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:52 +08:00
Jonas Ådahl
af616c96d4 Move more logical monitor getters from the screen to the monitor manager
Turning a rectangle into a logical monitor also has nothing to do with
the screen (MetaScreen) so move it to MetaMonitorManager which has that
information.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:52 +08:00
Jonas Ådahl
f5b2d79f3b backends: Use macros for declaring the backend types
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:52 +08:00
Jonas Ådahl
d644993a74 MetaBackend: Move fields from MetaBackend into MetaBackendPrivate
Lets prepare for being able to declare the MetaBackend type using
the macro helper.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:52 +08:00
Jonas Ådahl
2df4ebff47 Put logical monitor grid lookup API in MetaMonitorManager
Don't falsely assume the screen has anything to do with the monitor
grid, and thus move the related API to MetaMonitorManager.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:52 +08:00
Jonas Ådahl
9337d18468 screen: Remove meta_screen_get_current_monitor_for_pos from public API
It was not used by anyone, and had strange caching behaviour to begin
with.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:52 +08:00
Jonas Ådahl
317b734dcc Move cursor tracker ownership to the backend
Let the backend initialize the cursor tracker, and change all call
sites to get the cursor tracker from the backend instead of from the
screen. It wasn't associated with the screen anyway, so the API was
missleading.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:51 +08:00
Jonas Ådahl
e35ac9be8d cursor-tracker: Don't cache a private pointer to the cursor renderer
This means we don't rely on contruction order any more.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:51 +08:00
Jonas Ådahl
6dbb524b9f core/events: Only get MetaBackend once in meta_display_handle_event
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:51 +08:00
Jonas Ådahl
a3f0bf3ff8 core/events: Don't shadow variable name
Don't use the same variable name for two different things (gesture
tracker vs cursor tracker).

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:51 +08:00
Jonas Ådahl
ecf796f82b window: Keep track of fullscreen monitors directly
Instead of keeping around array indexes, keep track of them by storing
a pointer instead. This also changes from using an array (imitating the
X11 behaviour) to more explicit storing.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:51 +08:00
Jonas Ådahl
0a4fb008f3 core/place: Use logical monitor references instead of indices
Don't rely on the API exposing implementation details and replace it
with the API that takes direct references.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:51 +08:00
Jonas Ådahl
79fd91ec35 Add API for getting work area given a logical monitor
To complement the current API which takes an index referencing a
logical monitor in the logical monitor array, add API that takes a
direct reference to the logical monitor itself. The intention is to
replace the usage of the index based API with one that doesn't rely on
internal implementation details.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:51 +08:00
Jonas Ådahl
e659b07c39 MetaMonitorManager: Add API turning monitor index into logical monitor
This is the current equivalent of looking up the logical monitor in the
logical monitor array using the number, but eventually that will be
deprecated, and before that done differently, so add a temporary helper
for the places that has not been ported yet.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:51 +08:00
Jonas Ådahl
441b854d41 MetaScreen: Remove const qualifiers from monitor getters
They will cause issues when monitors are stared in a GList.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:51 +08:00
Jonas Ådahl
c936056663 MetaMonitorManager: Track primary monitor by pointer instead of index
Instead of keeping an index in an array to keep track of the current
primary logical monitor, just keep a pointer instead.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:51 +08:00
Jonas Ådahl
e22bbd4b14 MetaScreen: Remove redundant copy of logical monitors array
It was just pointer to the actual list; having to synchronize a list of
logical monitors with the actual monitors managed by the backend is
unnecessary.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:51 +08:00
Jonas Ådahl
103df63023 MetaWindow: Clear fullscreen monitors when monitors change
The fullscreen monitors state is set given a set of xinerama monitor
identification numbers. When the monitor configuration changes (e.g. by
a hotplug event) these are no longer valid, and may point to
uninitialized or unallocated data. Avoid accessing
uninitialized/unallocated memory by clearing the fullscreen monitor
state when the monitor configuration changes.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:51 +08:00
Jonas Ådahl
36f2d5b0f1 wayland: Make surface role vfunc better named
It checks whether a surface is on a given "logical monitor", not
output. Output here is the Wayland name for the same thing, but should
not be confused with MetaOutput.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:51 +08:00
Jonas Ådahl
920cc15ea9 screen: Fly-by coding style fixes
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:51 +08:00
Jonas Ådahl
842ff5d6aa Rename MetaMonitorInfo MetaLogicalMonitor
In preparation for further refactorizations, rename the MetaMonitorInfo
struct to MetaLogicalMonitor. Eventually, part of MetaLogicalMonitor
will be split into a MetaMonitor type.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:51 +08:00
Jonas Ådahl
e1b10769e5 screen: Remove unused function
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:51 +08:00
Jonas Ådahl
4177d4f9f4 MetaMonitorManagerKms: Don't leak tile property blob
Also warn when we don't understand the property blob we got.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:51 +08:00
Bastien Nocera
9b64e09a24 egl: Fix GCC warning
src/backends/meta-egl.c: In function ‘set_egl_error’:
src/backends/meta-egl.c:144:16: error: format not a string literal and no format arguments [-Werror=format-security]
      error_str);
      ^~~~~~~~~

https://bugzilla.gnome.org/show_bug.cgi?id=777389
2017-01-17 14:22:27 +01:00
Kjartan Maraas
f5a70aa1e2 Updated Norwegian bokmål translation. 2017-01-05 21:56:29 +01:00
Jonas Ådahl
2df35d636e MetaWaylandEglStream: Use EGL_WL_wayland_eglstream instead of fd hack
Use the proposed EGL_WL_wayland_eglstream EGL extension instead of the
file descriptor hack that was used as a temporary solution.

Note that this results in EGL clients will no longer work if they are
running on a Nvidia driver with a version older than 370.

https://bugzilla.gnome.org/show_bug.cgi?id=773629
2017-01-03 17:50:03 +08:00
Jonas Ådahl
f7fd018cf8 wayland/buffer: Remove unnecessary break
https://bugzilla.gnome.org/show_bug.cgi?id=773629
2017-01-03 17:50:03 +08:00
Jonas Ådahl
405aa8fb9e wayland/buffer: Add 'realization' concept to buffers
Instead of having a way to determine the type of a buffer, add a
realization step that implicitly detects the buffer type. This makes it
possible to both realize (i.e. creating needed objects from the buffer)
and determine the type at the same time, which may be the only possible
way (for example, the only way to know whether a buffer is a EGLStream
is to create the EGLStream from it).

https://bugzilla.gnome.org/show_bug.cgi?id=773629
2017-01-03 17:50:03 +08:00
Jonas Ådahl
0a826da330 egl: Add EGL_WL_wayland_eglstream helpers
These are to replace the file descriptor hack currently in use.

https://bugzilla.gnome.org/show_bug.cgi?id=773629
2017-01-03 17:50:03 +08:00
Jonas Ådahl
139bed73f8 MetaRendererNative: Remove unnecessary ifdef
https://bugzilla.gnome.org/show_bug.cgi?id=773629
2017-01-03 17:50:03 +08:00
Jonas Ådahl
778f92e170 egl: Use correct proc to meta_egl_stream_consumer_aquire_attrib
It should be eglStreamConsumerAcquireAttribNV and not
eglStreamConsumerAcquireAttribEXT as the EXT variant is not defined in
any extension.

https://bugzilla.gnome.org/show_bug.cgi?id=773629
2017-01-03 17:50:03 +08:00
Jonas Ådahl
5a43cc5cf9 cogl: Just define the needed GLES2 extension ourself
We need a GLES2 extension macro in cogl-texture-2d-gl.c, but we can't
include GLES2/gl2ext.h because it will conflict with things in
GL/glext.h. We can't rely on cogl including anything for us since it'd
only include GLES2/gl2ext.h if OpenGL support was explicitly disabled.

https://bugzilla.gnome.org/show_bug.cgi?id=774891
2017-01-03 17:50:03 +08:00
Jonas Ådahl
81b11929f7 wayland/xdg-shell: Scale window menu coordinates
When the monitor the surface is on has a scale other than 1, the
coordinate of the window menu popup position needs to be scaled, as it
is reported in logical pixels, while the stage is still in physical
pixels.

https://bugzilla.gnome.org/show_bug.cgi?id=776055
2016-12-30 21:44:51 +08:00
173 changed files with 14397 additions and 4470 deletions

1
.gitignore vendored
View File

@@ -86,6 +86,7 @@ src/pointer-constraints-unstable-v*-server-protocol.h
src/xdg-foreign-unstable-v*-protocol.c
src/xdg-foreign-unstable-v*-server-protocol.h
src/meta/meta-version.h
src/libmutter-*.pc
doc/reference/*.args
doc/reference/*.bak
doc/reference/*.hierarchy

28
NEWS
View File

@@ -1,3 +1,31 @@
3.23.90
=======
* Fix window menu placement with HiDPI [Jonas; #776055]
* Improve EGLStream support [Jonas; #773629]
* Start moving low-level monitor configuration into mutter [Jonas; #777732]
* Fix erroneous key event repeats [Rui; #774989]
* Don't hardcode seat ID in ClutterDeviceManager [Carlos; #778092]
* Fix "ghost" cursors in multi-monitor setups [Jonas; #771056]
* Use eglGetPlatformDisplay [Adam; #772422]
* Fix erratic raise_or_lower behavior [Jose; #705200]
* Fix coordinate mapping of absolute devices [Carlos; #774115]
* Show OSD on tablet mode switches [Carlos; #771098]
* Make mutter libs parallel installable [Jonas; #777317]
* Only apply keymap when not running nested [Jonas; #777800]
* Set right scale for tablet tool cursors on HiDPI [Carlos; #778474]
* Adjust server-side shadows to match Adwaita [Juraj; #744667]
* Misc. bug fixes [Jonas, Bastien, Carlos, Peter, Lionel, Jeremy, Florian;
#774891, #777389, #777691, #778262, #776543, #778684, #778699, #744667]
Contributors:
Jonas Ådahl, Jeremy Bicha, Piotr Drąg, Juraj Fiala, Carlos Garnacho,
Peter Hutterer, Adam Jackson, Lionel Landwerlin, Jose Marino, Rui Matos,
Florian Müllner, Bastien Nocera
Translations:
Kjartan Maraas [nb], Mandy Wang [zh_CN], Marek Černocký [cs],
Anders Jonsson [sv], Dušan Kazik [sk], Piotr Drąg [pl], Matej Urbančič [sl]
3.23.3
======
* Fix frequent freezes in multihead setups on wayland [Rui; #774557]

View File

@@ -6,16 +6,21 @@ test -z "$srcdir" && srcdir=.
REQUIRED_AUTOMAKE_VERSION=1.11
(test -f $srcdir/configure.ac \
&& test -d $srcdir/src) || {
pushd $srcdir
(test -f configure.ac \
&& test -d src) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level metacity directory"
echo " top-level mutter directory"
exit 1
}
which gnome-autogen.sh || {
echo "You need to install gnome-common from GNOME Subversion (or from"
echo "your distribution's package manager)."
exit 1
}
. gnome-autogen.sh
aclocal --install || exit 1
intltoolize --force --copy --automake || exit 1
autoreconf --verbose --force --install || exit 1
popd
if [ "$NOCONFIGURE" = "" ]; then
$srcdir/configure "$@" || exit 1
fi

View File

@@ -37,7 +37,7 @@ AM_CFLAGS = $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
INTROSPECTION_GIRS =
# the base include path for headers
clutter_base_includedir = $(includedir)/mutter/clutter-$(CLUTTER_API_VERSION)
clutter_base_includedir = $(includedir)/mutter/clutter-$(LIBMUTTER_API_VERSION)
clutter_includedir = $(clutter_base_includedir)/clutter
clutter_deprecateddir = $(clutter_base_includedir)/clutter/deprecated
@@ -356,7 +356,7 @@ EXTRA_DIST += clutter-version.h.in clutter-version.h
# key symbol update script
EXTRA_DIST += clutter-keysyms-update.pl
pc_files += mutter-clutter-$(CLUTTER_API_VERSION).pc
pc_files += mutter-clutter-$(LIBMUTTER_API_VERSION).pc
# in order to be compatible with Clutter < 1.10, when we shipped a single
# shared library whose name was determined by the single backend it
@@ -442,10 +442,10 @@ x11_introspection = $(x11_source_c) $(x11_source_h)
clutterx11_includedir = $(clutter_includedir)/x11
clutterx11_include_HEADERS = $(x11_source_h)
mutter-clutter-x11-$(CLUTTER_API_VERSION).pc: mutter-clutter-$(CLUTTER_API_VERSION).pc
mutter-clutter-x11-@LIBMUTTER_API_VERSION@.pc: mutter-clutter-$(LIBMUTTER_API_VERSION).pc
$(QUIET_GEN)cp -f $< $(@F)
pc_files += mutter-clutter-x11-$(CLUTTER_API_VERSION).pc
pc_files += mutter-clutter-x11-$(LIBMUTTER_API_VERSION).pc
# Shared cogl backend files
cogl_source_h =
@@ -583,17 +583,17 @@ nodist_clutter_include_HEADERS = clutter-config.h $(built_source_h)
clutter_deprecated_HEADERS = $(deprecated_h)
mutterlibdir = $(libdir)/mutter
mutterlib_LTLIBRARIES = libmutter-clutter-@CLUTTER_API_VERSION@.la
mutterlib_LTLIBRARIES = libmutter-clutter-@LIBMUTTER_API_VERSION@.la
libmutter_clutter_@CLUTTER_API_VERSION@_la_LIBADD = \
libmutter_clutter_@LIBMUTTER_API_VERSION@_la_LIBADD = \
$(LIBM) \
$(CLUTTER_LIBS) \
$(top_builddir)/../cogl/cogl/libmutter-cogl.la \
$(top_builddir)/../cogl/cogl-pango/libmutter-cogl-pango.la \
$(top_builddir)/../cogl/cogl-path/libmutter-cogl-path.la \
$(top_builddir)/../cogl/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la \
$(top_builddir)/../cogl/cogl-pango/libmutter-cogl-pango-$(LIBMUTTER_API_VERSION).la \
$(top_builddir)/../cogl/cogl-path/libmutter-cogl-path-$(LIBMUTTER_API_VERSION).la \
$(NULL)
libmutter_clutter_@CLUTTER_API_VERSION@_la_SOURCES = \
libmutter_clutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
$(backend_source_c) \
$(backend_source_h) \
$(backend_source_c_priv) \
@@ -611,12 +611,12 @@ libmutter_clutter_@CLUTTER_API_VERSION@_la_SOURCES = \
$(cally_sources_private) \
$(NULL)
nodist_libmutter_clutter_@CLUTTER_API_VERSION@_la_SOURCES = \
nodist_libmutter_clutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
$(backend_source_built) \
$(built_source_c) \
$(built_source_h)
libmutter_clutter_@CLUTTER_API_VERSION@_la_LDFLAGS = \
libmutter_clutter_@LIBMUTTER_API_VERSION@_la_LDFLAGS = \
$(CLUTTER_LINK_FLAGS) \
$(CLUTTER_LT_LDFLAGS) \
-export-dynamic \
@@ -630,13 +630,13 @@ install-exec-local:
rm -f $$lib.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION); \
) ; \
(cd $(DESTDIR)$(mutterlibdir) && \
{ ln -s -f libmutter-clutter-$(CLUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib.0 || \
{ rm -f $$lib.0 && ln -s libmutter-clutter-1.0.so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib.0; }; \
{ ln -s -f libmutter-clutter-$(LIBMUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib.0 || \
{ rm -f $$lib.0 && ln -s libmutter-clutter-$(LIBMUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib.0; }; \
} \
) ; \
(cd $(DESTDIR)$(mutterlibdir) && \
{ ln -s -f libmutter-clutter-$(CLUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib || \
{ rm -f $$lib && ln -s libmutter-clutter-1.0.so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib; }; \
{ ln -s -f libmutter-clutter-$(LIBMUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib || \
{ rm -f $$lib && ln -s libmutter-clutter-$(LIBMUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib; }; \
} \
) ; \
done
@@ -644,59 +644,65 @@ install-exec-local:
# gobject-introspection rules
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(top_builddir)/../cogl/cogl --add-include-path=$(top_builddir)/../cogl/cogl-pango
INTROSPECTION_COMPILER_ARGS = --includedir=$(top_builddir)/../cogl/cogl --includedir=$(top_builddir)/../cogl/cogl-pango
INTROSPECTION_SCANNER_ARGS = \
--add-include-path=$(top_builddir)/../cogl/cogl \
--add-include-path=$(top_builddir)/../cogl/cogl-pango
INTROSPECTION_COMPILER_ARGS = \
--includedir=$(top_builddir)/../cogl/cogl \
--includedir=$(top_builddir)/../cogl/cogl-pango
INTROSPECTION_SCANNER_ENV = \
PKG_CONFIG_PATH=$(top_builddir)/../cogl/cogl/:$(top_builddir)/../cogl/cogl-pango/:$${PKG_CONFIG_PATH}
Clutter-@CLUTTER_API_VERSION@.gir: libmutter-clutter-@CLUTTER_API_VERSION@.la Makefile
Clutter-@LIBMUTTER_API_VERSION@.gir: libmutter-clutter-@LIBMUTTER_API_VERSION@.la Makefile
Clutter_@CLUTTER_API_VERSION_AM@_gir_NAMESPACE = Clutter
Clutter_@CLUTTER_API_VERSION_AM@_gir_VERSION = @CLUTTER_API_VERSION@
Clutter_@CLUTTER_API_VERSION_AM@_gir_LIBS = libmutter-clutter-@CLUTTER_API_VERSION@.la
Clutter_@CLUTTER_API_VERSION_AM@_gir_FILES = \
Clutter_@LIBMUTTER_API_VERSION@_gir_NAMESPACE = Clutter
Clutter_@LIBMUTTER_API_VERSION@_gir_VERSION = @LIBMUTTER_API_VERSION@
Clutter_@LIBMUTTER_API_VERSION@_gir_LIBS = libmutter-clutter-@LIBMUTTER_API_VERSION@.la
Clutter_@LIBMUTTER_API_VERSION@_gir_FILES = \
$(clutter_include_HEADERS) \
$(clutter_deprecated_HEADERS) \
$(nodist_clutter_include_HEADERS) \
$(source_c) \
$(deprecated_c) \
$(built_source_c)
Clutter_@CLUTTER_API_VERSION_AM@_gir_CFLAGS = $(AM_CPPFLAGS) $(CLUTTER_CFLAGS)
Clutter_@CLUTTER_API_VERSION_AM@_gir_INCLUDES = GL-1.0 GObject-2.0 cairo-1.0 Cogl-1.0 CoglPango-1.0 Atk-1.0 Json-1.0
Clutter_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS = \
Clutter_@LIBMUTTER_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS) $(CLUTTER_CFLAGS)
Clutter_@LIBMUTTER_API_VERSION@_gir_INCLUDES = GL-1.0 GObject-2.0 cairo-1.0 Cogl-@LIBMUTTER_API_VERSION@ CoglPango-@LIBMUTTER_API_VERSION@ Atk-1.0 Json-1.0
Clutter_@LIBMUTTER_API_VERSION@_gir_SCANNERFLAGS = \
--warn-all \
--c-include='clutter/clutter.h' \
--pkg-export=mutter-clutter-@CLUTTER_API_VERSION@
--pkg-export=mutter-clutter-@LIBMUTTER_API_VERSION@
INTROSPECTION_GIRS += Clutter-@CLUTTER_API_VERSION@.gir
INTROSPECTION_GIRS += Clutter-@LIBMUTTER_API_VERSION@.gir
Cally-@CLUTTER_API_VERSION@.gir: Makefile Clutter-@CLUTTER_API_VERSION@.gir
Cally-@LIBMUTTER_API_VERSION@.gir: Makefile Clutter-@LIBMUTTER_API_VERSION@.gir
Cally_@CLUTTER_API_VERSION_AM@_gir_NAMESPACE = Cally
Cally_@CLUTTER_API_VERSION_AM@_gir_VERSION = @CLUTTER_API_VERSION@
Cally_@CLUTTER_API_VERSION_AM@_gir_LIBS = libmutter-clutter-@CLUTTER_API_VERSION@.la
Cally_@CLUTTER_API_VERSION_AM@_gir_FILES = $(cally_sources_h) $(cally_sources_c)
Cally_@CLUTTER_API_VERSION_AM@_gir_CFLAGS = $(AM_CPPFLAGS) $(CLUTTER_CFLAGS)
Cally_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS = \
Cally_@LIBMUTTER_API_VERSION@_gir_NAMESPACE = Cally
Cally_@LIBMUTTER_API_VERSION@_gir_VERSION = @LIBMUTTER_API_VERSION@
Cally_@LIBMUTTER_API_VERSION@_gir_LIBS = libmutter-clutter-@LIBMUTTER_API_VERSION@.la
Cally_@LIBMUTTER_API_VERSION@_gir_FILES = $(cally_sources_h) $(cally_sources_c)
Cally_@LIBMUTTER_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS) $(CLUTTER_CFLAGS)
Cally_@LIBMUTTER_API_VERSION@_gir_SCANNERFLAGS = \
--warn-all \
--c-include='cally/cally.h' \
--pkg-export=mutter-cally-@CLUTTER_API_VERSION@ \
--include-uninstalled=$(top_builddir)/clutter/Clutter-@CLUTTER_API_VERSION@.gir
--pkg-export=mutter-cally-@LIBMUTTER_API_VERSION@ \
--include-uninstalled=$(top_builddir)/clutter/Clutter-@LIBMUTTER_API_VERSION@.gir
INTROSPECTION_GIRS += Cally-@CLUTTER_API_VERSION@.gir
INTROSPECTION_GIRS += Cally-@LIBMUTTER_API_VERSION@.gir
ClutterX11-@CLUTTER_API_VERSION@.gir: Makefile Clutter-@CLUTTER_API_VERSION@.gir
ClutterX11-@LIBMUTTER_API_VERSION@.gir: Makefile Clutter-@LIBMUTTER_API_VERSION@.gir
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_NAMESPACE = ClutterX11
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_INCLUDES = xlib-2.0
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_LIBS = libmutter-clutter-@CLUTTER_API_VERSION@.la
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_FILES = $(x11_introspection)
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_CFLAGS = $(AM_CPPFLAGS) $(CLUTTER_CFLAGS)
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS = \
ClutterX11_@LIBMUTTER_API_VERSION@_gir_NAMESPACE = ClutterX11
ClutterX11_@LIBMUTTER_API_VERSION@_gir_INCLUDES = xlib-2.0
ClutterX11_@LIBMUTTER_API_VERSION@_gir_LIBS = libmutter-clutter-@LIBMUTTER_API_VERSION@.la
ClutterX11_@LIBMUTTER_API_VERSION@_gir_FILES = $(x11_introspection)
ClutterX11_@LIBMUTTER_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS) $(CLUTTER_CFLAGS)
ClutterX11_@LIBMUTTER_API_VERSION@_gir_SCANNERFLAGS = \
--warn-all \
--c-include='clutter/x11/clutter-x11.h' \
--pkg-export=mutter-clutter-x11-@CLUTTER_API_VERSION@ \
--include-uninstalled=$(top_builddir)/clutter/Clutter-@CLUTTER_API_VERSION@.gir
--pkg-export=mutter-clutter-x11-@LIBMUTTER_API_VERSION@ \
--include-uninstalled=$(top_builddir)/clutter/Clutter-@LIBMUTTER_API_VERSION@.gir
INTROSPECTION_GIRS += ClutterX11-@CLUTTER_API_VERSION@.gir
INTROSPECTION_GIRS += ClutterX11-@LIBMUTTER_API_VERSION@.gir
# INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to
# install anything - we need to install inside our prefix.

View File

@@ -154,6 +154,12 @@ struct _ClutterInputDeviceClass
guint *evdev_keycode);
void (* update_from_tool) (ClutterInputDevice *device,
ClutterInputDeviceTool *tool);
gboolean (* is_mode_switch_button) (ClutterInputDevice *device,
guint group,
guint button);
gint (* get_group_n_modes) (ClutterInputDevice *device,
gint group);
};
/* Platform-dependent interface */

View File

@@ -508,6 +508,7 @@ struct _ClutterPadButtonEvent
guint32 button;
guint32 group;
ClutterInputDevice *device;
guint32 mode;
};
struct _ClutterPadStripEvent
@@ -523,6 +524,7 @@ struct _ClutterPadStripEvent
guint32 strip_number;
guint32 group;
gdouble value;
guint32 mode;
};
struct _ClutterPadRingEvent
@@ -538,6 +540,7 @@ struct _ClutterPadRingEvent
guint32 ring_number;
guint32 group;
gdouble angle;
guint32 mode;
};
/**

View File

@@ -2175,6 +2175,63 @@ clutter_input_device_get_n_mode_groups (ClutterInputDevice *device)
return device->n_mode_groups;
}
gint
clutter_input_device_get_group_n_modes (ClutterInputDevice *device,
gint group)
{
ClutterInputDeviceClass *device_class;
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), 0);
g_return_val_if_fail (clutter_input_device_get_device_type (device) ==
CLUTTER_PAD_DEVICE, 0);
g_return_val_if_fail (group >= 0, 0);
device_class = CLUTTER_INPUT_DEVICE_GET_CLASS (device);
if (device_class->get_group_n_modes)
return device_class->get_group_n_modes (device, group);
return 0;
}
gboolean
clutter_input_device_is_mode_switch_button (ClutterInputDevice *device,
guint group,
guint button)
{
ClutterInputDeviceClass *device_class;
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), FALSE);
g_return_val_if_fail (clutter_input_device_get_device_type (device) ==
CLUTTER_PAD_DEVICE, FALSE);
device_class = CLUTTER_INPUT_DEVICE_GET_CLASS (device);
if (device_class->is_mode_switch_button)
return device_class->is_mode_switch_button (device, group, button);
return FALSE;
}
gint
clutter_input_device_get_mode_switch_button_group (ClutterInputDevice *device,
guint button)
{
gint group;
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), -1);
g_return_val_if_fail (clutter_input_device_get_device_type (device) ==
CLUTTER_PAD_DEVICE, -1);
for (group = 0; group < device->n_mode_groups; group++)
{
if (clutter_input_device_is_mode_switch_button (device, group, button))
return group;
}
return -1;
}
const gchar *
clutter_input_device_get_device_node (ClutterInputDevice *device)
{

View File

@@ -147,6 +147,18 @@ gint clutter_input_device_get_n_strips (ClutterInputDev
CLUTTER_AVAILABLE_IN_ALL
gint clutter_input_device_get_n_mode_groups (ClutterInputDevice *device);
CLUTTER_AVAILABLE_IN_ALL
gint clutter_input_device_get_group_n_modes (ClutterInputDevice *device,
gint group);
CLUTTER_AVAILABLE_IN_ALL
gboolean clutter_input_device_is_mode_switch_button (ClutterInputDevice *device,
guint group,
guint button);
CLUTTER_AVAILABLE_IN_ALL
gint clutter_input_device_get_mode_switch_button_group (ClutterInputDevice *device,
guint button);
CLUTTER_AVAILABLE_IN_ALL
const gchar * clutter_input_device_get_device_node (ClutterInputDevice *device);

View File

@@ -124,6 +124,7 @@ G_DEFINE_TYPE_WITH_CODE (ClutterDeviceManagerEvdev,
static ClutterOpenDeviceCallback device_open_callback;
static ClutterCloseDeviceCallback device_close_callback;
static gpointer device_callback_data;
static gchar * evdev_seat_id;
#ifdef CLUTTER_ENABLE_DEBUG
static const char *device_type_str[] = {
@@ -311,6 +312,9 @@ new_absolute_motion_event (ClutterInputDevice *input_device,
_clutter_xkb_translate_state (event, seat->xkb, seat->button_state);
event->motion.x = x;
event->motion.y = y;
clutter_input_device_evdev_translate_coordinates (input_device, stage,
&event->motion.x,
&event->motion.y);
event->motion.axes = axes;
clutter_event_set_source_device (event, input_device);
@@ -509,6 +513,10 @@ notify_touch_event (ClutterInputDevice *input_device,
event->touch.device = seat->core_pointer;
event->touch.x = x;
event->touch.y = y;
clutter_input_device_evdev_translate_coordinates (input_device, stage,
&event->touch.x,
&event->touch.y);
/* "NULL" sequences are special cased in clutter */
event->touch.sequence = GINT_TO_POINTER (slot + 1);
_clutter_xkb_translate_state (event, seat->xkb, seat->button_state);
@@ -660,6 +668,7 @@ notify_pad_button (ClutterInputDevice *input_device,
guint64 time_us,
guint32 button,
guint32 mode_group,
guint32 mode,
guint32 pressed)
{
ClutterInputDeviceEvdev *device_evdev;
@@ -685,6 +694,7 @@ notify_pad_button (ClutterInputDevice *input_device,
event->pad_button.stage = stage;
event->pad_button.button = button;
event->pad_button.group = mode_group;
event->pad_button.mode = mode;
clutter_event_set_device (event, input_device);
clutter_event_set_source_device (event, input_device);
clutter_event_set_time (event, us2ms (time_us));
@@ -700,6 +710,7 @@ notify_pad_strip (ClutterInputDevice *input_device,
guint32 strip_number,
guint32 strip_source,
guint32 mode_group,
guint32 mode,
gdouble value)
{
ClutterInputDeviceEvdev *device_evdev;
@@ -729,6 +740,7 @@ notify_pad_strip (ClutterInputDevice *input_device,
event->pad_strip.strip_number = strip_number;
event->pad_strip.value = value;
event->pad_strip.group = mode_group;
event->pad_strip.mode = mode;
clutter_event_set_device (event, input_device);
clutter_event_set_source_device (event, input_device);
clutter_event_set_time (event, us2ms (time_us));
@@ -744,6 +756,7 @@ notify_pad_ring (ClutterInputDevice *input_device,
guint32 ring_number,
guint32 ring_source,
guint32 mode_group,
guint32 mode,
gdouble angle)
{
ClutterInputDeviceEvdev *device_evdev;
@@ -773,6 +786,7 @@ notify_pad_ring (ClutterInputDevice *input_device,
event->pad_ring.ring_number = ring_number;
event->pad_ring.angle = angle;
event->pad_ring.group = mode_group;
event->pad_ring.mode = mode;
clutter_event_set_device (event, input_device);
clutter_event_set_source_device (event, input_device);
clutter_event_set_time (event, us2ms (time_us));
@@ -1807,7 +1821,7 @@ process_device_event (ClutterDeviceManagerEvdev *manager_evdev,
case LIBINPUT_EVENT_TABLET_PAD_BUTTON:
{
guint64 time;
guint32 button_state, button, group;
guint32 button_state, button, group, mode;
struct libinput_tablet_pad_mode_group *mode_group;
struct libinput_event_tablet_pad *pad_event =
libinput_event_get_tablet_pad_event (event);
@@ -1817,17 +1831,18 @@ process_device_event (ClutterDeviceManagerEvdev *manager_evdev,
mode_group = libinput_event_tablet_pad_get_mode_group (pad_event);
group = libinput_tablet_pad_mode_group_get_index (mode_group);
mode = libinput_event_tablet_pad_get_mode (pad_event);
button = libinput_event_tablet_pad_get_button_number (pad_event);
button_state = libinput_event_tablet_pad_get_button_state (pad_event) ==
LIBINPUT_BUTTON_STATE_PRESSED;
notify_pad_button (device, time, button, group, button_state);
notify_pad_button (device, time, button, group, mode, button_state);
break;
}
case LIBINPUT_EVENT_TABLET_PAD_STRIP:
{
guint64 time;
guint32 number, source, group;
guint32 number, source, group, mode;
struct libinput_tablet_pad_mode_group *mode_group;
struct libinput_event_tablet_pad *pad_event =
libinput_event_get_tablet_pad_event (event);
@@ -1841,14 +1856,15 @@ process_device_event (ClutterDeviceManagerEvdev *manager_evdev,
mode_group = libinput_event_tablet_pad_get_mode_group (pad_event);
group = libinput_tablet_pad_mode_group_get_index (mode_group);
mode = libinput_event_tablet_pad_get_mode (pad_event);
notify_pad_strip (device, time, number, source, group, value);
notify_pad_strip (device, time, number, source, group, mode, value);
break;
}
case LIBINPUT_EVENT_TABLET_PAD_RING:
{
guint64 time;
guint32 number, source, group;
guint32 number, source, group, mode;
struct libinput_tablet_pad_mode_group *mode_group;
struct libinput_event_tablet_pad *pad_event =
libinput_event_get_tablet_pad_event (event);
@@ -1862,8 +1878,9 @@ process_device_event (ClutterDeviceManagerEvdev *manager_evdev,
mode_group = libinput_event_tablet_pad_get_mode_group (pad_event);
group = libinput_tablet_pad_mode_group_get_index (mode_group);
mode = libinput_event_tablet_pad_get_mode (pad_event);
notify_pad_ring (device, time, number, source, group, angle);
notify_pad_ring (device, time, number, source, group, mode, angle);
break;
}
default:
@@ -2045,7 +2062,8 @@ clutter_device_manager_evdev_constructed (GObject *gobject)
return;
}
if (libinput_udev_assign_seat (priv->libinput, "seat0") == -1)
if (libinput_udev_assign_seat (priv->libinput,
evdev_seat_id ? evdev_seat_id : "seat0") == -1)
{
g_critical ("Failed to assign a seat to the libinput object.");
libinput_unref (priv->libinput);
@@ -2278,6 +2296,12 @@ _clutter_device_manager_evdev_acquire_device_id (ClutterDeviceManagerEvdev *mana
return next_id;
}
void
_clutter_device_manager_evdev_dispatch (ClutterDeviceManagerEvdev *manager_evdev)
{
dispatch_libinput (manager_evdev);
}
static int
compare_ids (gconstpointer a,
gconstpointer b)
@@ -2788,3 +2812,18 @@ clutter_evdev_warp_pointer (ClutterInputDevice *pointer_device,
{
notify_absolute_motion (pointer_device, ms2us(time_), x, y, NULL);
}
/**
* clutter_evdev_set_seat_id:
* @seat_id: The seat ID
*
* Sets the seat to assign to the libinput context.
*
* For reliable effects, this function must be called before clutter_init().
*/
void
clutter_evdev_set_seat_id (const gchar *seat_id)
{
g_free (evdev_seat_id);
evdev_seat_id = g_strdup (seat_id);
}

View File

@@ -76,6 +76,8 @@ void _clutter_device_manager_evdev_constrain_pointer (ClutterDeviceManagerEvdev
float *new_x,
float *new_y);
void _clutter_device_manager_evdev_dispatch (ClutterDeviceManagerEvdev *manager_evdev);
static inline guint64
us (guint64 us)
{

View File

@@ -57,6 +57,9 @@ void clutter_evdev_set_device_callbacks (ClutterOpenDeviceCallback open_callba
ClutterCloseDeviceCallback close_callback,
gpointer user_data);
CLUTTER_AVAILABLE_IN_ALL
void clutter_evdev_set_seat_id (const gchar *seat_id);
CLUTTER_AVAILABLE_IN_1_10
void clutter_evdev_release_devices (void);
CLUTTER_AVAILABLE_IN_1_10

View File

@@ -35,6 +35,8 @@
#include "clutter-input-device-evdev.h"
#include "clutter-device-manager-evdev.h"
#include "cairo-gobject.h"
typedef struct _ClutterInputDeviceClass ClutterInputDeviceEvdevClass;
#define clutter_input_device_evdev_get_type _clutter_input_device_evdev_get_type
@@ -43,6 +45,15 @@ G_DEFINE_TYPE (ClutterInputDeviceEvdev,
clutter_input_device_evdev,
CLUTTER_TYPE_INPUT_DEVICE)
enum {
PROP_0,
PROP_DEVICE_MATRIX,
PROP_OUTPUT_ASPECT_RATIO,
N_PROPS
};
static GParamSpec *obj_props[N_PROPS] = { 0 };
static void
clutter_input_device_evdev_finalize (GObject *object)
{
@@ -59,6 +70,53 @@ clutter_input_device_evdev_finalize (GObject *object)
G_OBJECT_CLASS (clutter_input_device_evdev_parent_class)->finalize (object);
}
static void
clutter_input_device_evdev_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
ClutterInputDeviceEvdev *device = CLUTTER_INPUT_DEVICE_EVDEV (object);
switch (prop_id)
{
case PROP_DEVICE_MATRIX:
{
const cairo_matrix_t *matrix = g_value_get_boxed (value);
cairo_matrix_init_identity (&device->device_matrix);
cairo_matrix_multiply (&device->device_matrix,
&device->device_matrix, matrix);
break;
}
case PROP_OUTPUT_ASPECT_RATIO:
device->output_ratio = g_value_get_double (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
static void
clutter_input_device_evdev_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
ClutterInputDeviceEvdev *device = CLUTTER_INPUT_DEVICE_EVDEV (object);
switch (prop_id)
{
case PROP_DEVICE_MATRIX:
g_value_set_boxed (value, &device->device_matrix);
break;
case PROP_OUTPUT_ASPECT_RATIO:
g_value_set_double (value, device->output_ratio);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
static gboolean
clutter_input_device_evdev_keycode_to_evdev (ClutterInputDevice *device,
guint hardware_keycode,
@@ -108,19 +166,69 @@ clutter_input_device_evdev_update_from_tool (ClutterInputDevice *device,
g_object_thaw_notify (G_OBJECT (device));
}
static gboolean
clutter_input_device_evdev_is_mode_switch_button (ClutterInputDevice *device,
guint group,
guint button)
{
struct libinput_device *libinput_device;
struct libinput_tablet_pad_mode_group *mode_group;
libinput_device = clutter_evdev_input_device_get_libinput_device (device);
mode_group = libinput_device_tablet_pad_get_mode_group (libinput_device, group);
return libinput_tablet_pad_mode_group_button_is_toggle (mode_group, button) != 0;
}
static gint
clutter_input_device_evdev_get_group_n_modes (ClutterInputDevice *device,
gint group)
{
struct libinput_device *libinput_device;
struct libinput_tablet_pad_mode_group *mode_group;
libinput_device = clutter_evdev_input_device_get_libinput_device (device);
mode_group = libinput_device_tablet_pad_get_mode_group (libinput_device, group);
return libinput_tablet_pad_mode_group_get_num_modes (mode_group);
}
static void
clutter_input_device_evdev_class_init (ClutterInputDeviceEvdevClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = clutter_input_device_evdev_finalize;
object_class->set_property = clutter_input_device_evdev_set_property;
object_class->get_property = clutter_input_device_evdev_get_property;
klass->keycode_to_evdev = clutter_input_device_evdev_keycode_to_evdev;
klass->update_from_tool = clutter_input_device_evdev_update_from_tool;
klass->is_mode_switch_button = clutter_input_device_evdev_is_mode_switch_button;
klass->get_group_n_modes = clutter_input_device_evdev_get_group_n_modes;
obj_props[PROP_DEVICE_MATRIX] =
g_param_spec_boxed ("device-matrix",
P_("Device input matrix"),
P_("Device input matrix"),
CAIRO_GOBJECT_TYPE_MATRIX,
CLUTTER_PARAM_READWRITE);
obj_props[PROP_OUTPUT_ASPECT_RATIO] =
g_param_spec_double ("output-aspect-ratio",
P_("Output aspect ratio"),
P_("Output aspect ratio"),
0, G_MAXDOUBLE, 0,
CLUTTER_PARAM_READWRITE);
g_object_class_install_properties (object_class, N_PROPS, obj_props);
}
static void
clutter_input_device_evdev_init (ClutterInputDeviceEvdev *self)
{
cairo_matrix_init_identity (&self->device_matrix);
self->device_aspect_ratio = 0;
self->output_ratio = 0;
}
/*
@@ -143,6 +251,7 @@ _clutter_input_device_evdev_new (ClutterDeviceManager *manager,
gchar *vendor, *product;
gint device_id, n_rings = 0, n_strips = 0, n_groups = 1;
gchar *node_path;
gdouble width, height;
type = _clutter_input_device_evdev_determine_type (libinput_device);
vendor = g_strdup_printf ("%.4x", libinput_device_get_id_vendor (libinput_device));
@@ -182,6 +291,9 @@ _clutter_input_device_evdev_new (ClutterDeviceManager *manager,
g_free (vendor);
g_free (product);
if (libinput_device_get_size (libinput_device, &width, &height) == 0)
device->device_aspect_ratio = width / height;
return CLUTTER_INPUT_DEVICE (device);
}
@@ -313,3 +425,39 @@ clutter_evdev_event_sequence_get_slot (const ClutterEventSequence *sequence)
return GPOINTER_TO_INT (sequence) - 1;
}
void
clutter_input_device_evdev_translate_coordinates (ClutterInputDevice *device,
ClutterStage *stage,
gfloat *x,
gfloat *y)
{
ClutterInputDeviceEvdev *device_evdev = CLUTTER_INPUT_DEVICE_EVDEV (device);
double min_x = 0, min_y = 0, max_x = 1, max_y = 1;
gdouble stage_width, stage_height;
double x_d, y_d;
stage_width = clutter_actor_get_width (CLUTTER_ACTOR (stage));
stage_height = clutter_actor_get_height (CLUTTER_ACTOR (stage));
x_d = *x / stage_width;
y_d = *y / stage_height;
/* Apply aspect ratio */
if (device_evdev->output_ratio > 0 &&
device_evdev->device_aspect_ratio > 0)
{
gdouble ratio = device_evdev->device_aspect_ratio / device_evdev->output_ratio;
if (ratio > 1)
x_d *= ratio;
else if (ratio < 1)
y_d *= 1 / ratio;
}
cairo_matrix_transform_point (&device_evdev->device_matrix, &min_x, &min_y);
cairo_matrix_transform_point (&device_evdev->device_matrix, &max_x, &max_y);
cairo_matrix_transform_point (&device_evdev->device_matrix, &x_d, &y_d);
*x = CLAMP (x_d, MIN (min_x, max_x), MAX (min_x, max_x)) * stage_width;
*y = CLAMP (y_d, MIN (min_y, max_y), MAX (min_y, max_y)) * stage_height;
}

View File

@@ -66,6 +66,10 @@ struct _ClutterInputDeviceEvdev
struct libinput_device *libinput_device;
ClutterSeatEvdev *seat;
ClutterInputDeviceTool *last_tool;
cairo_matrix_t device_matrix;
gdouble device_aspect_ratio; /* w:h */
gdouble output_ratio; /* w:h */
};
GType _clutter_input_device_evdev_get_type (void) G_GNUC_CONST;
@@ -102,6 +106,11 @@ void _clutter_evdev_event_set_relative_motion (ClutterEvent *event,
double dx_unaccel,
double dy_unaccel);
void clutter_input_device_evdev_translate_coordinates (ClutterInputDevice *device,
ClutterStage *stage,
gfloat *x,
gfloat *y);
G_END_DECLS
#endif /* __CLUTTER_INPUT_DEVICE_EVDEV_H__ */

View File

@@ -186,15 +186,19 @@ keyboard_repeat (gpointer data)
{
ClutterSeatEvdev *seat = data;
GSource *source;
guint32 time_ms;
/* There might be events queued in libinput that could cancel the
repeat timer. */
_clutter_device_manager_evdev_dispatch (seat->manager_evdev);
if (!seat->repeat_timer)
return G_SOURCE_REMOVE;
g_return_val_if_fail (seat->repeat_device != NULL, G_SOURCE_REMOVE);
source = g_main_context_find_source_by_id (NULL, seat->repeat_timer);
time_ms = g_source_get_time (source) / 1000;
clutter_seat_evdev_notify_key (seat,
seat->repeat_device,
ms2us (time_ms),
g_source_get_time (source),
seat->repeat_key,
AUTOREPEAT_VALUE,
FALSE);

View File

@@ -3,8 +3,8 @@ exec_prefix=@exec_prefix@
libdir=@libdir@/mutter
includedir=@includedir@/mutter
apiversion=@CLUTTER_API_VERSION@
requires=@CLUTTER_REQUIRES@ mutter-cogl-1.0
apiversion=@LIBMUTTER_API_VERSION@
requires=@CLUTTER_REQUIRES@ mutter-cogl-@LIBMUTTER_API_VERSION@
requires_private=@CLUTTER_REQUIRES_PRIVATE@
backends=@CLUTTER_BACKENDS@
@@ -17,7 +17,7 @@ cogl_driver=deprecated
Name: Mutter Clutter
Description: Mutter's Clutter Private Library
Version: @VERSION@
Version: @MUTTER_VERSION@
Libs: -L${libdir} -lmutter-clutter-${apiversion}
Cflags: -I${includedir}/clutter-${apiversion}
Requires: ${requires}

View File

@@ -42,9 +42,6 @@ m4_define([clutter_release_status],
m4_define([clutter_version], [clutter_major_version.clutter_minor_version.clutter_micro_version])
# change this only when breaking the API
m4_define([clutter_api_version], [1.0])
AC_PREREQ([2.63])
AC_INIT([clutter],
@@ -61,12 +58,18 @@ AC_CONFIG_MACRO_DIR([build/autotools])
AM_INIT_AUTOMAKE([1.11 foreign -Wno-portability no-define no-dist-gzip dist-xz tar-ustar])
AM_SILENT_RULES([yes])
dnl = Check that we are configured by mutter ==============================
AC_ARG_VAR([MUTTER_VERSION])
AC_ARG_VAR([LIBMUTTER_API_VERSION])
AS_IF([test "x$MUTTER_VERSION" = "x"],
[AC_MSG_ERROR([Clutter can only be configured by mutter])],)
AC_SUBST([CLUTTER_MAJOR_VERSION], [clutter_major_version])
AC_SUBST([CLUTTER_MINOR_VERSION], [clutter_minor_version])
AC_SUBST([CLUTTER_MICRO_VERSION], [clutter_micro_version])
AC_SUBST([CLUTTER_VERSION], [clutter_version])
AC_SUBST([CLUTTER_API_VERSION], [clutter_api_version])
AC_SUBST([CLUTTER_API_VERSION_AM], [$CLUTTER_MAJOR_VERSION\_0])
AC_SUBST([CLUTTER_RELEASE_STATUS], [clutter_release_status])
m4_define([lt_current], [m4_eval(100 * clutter_minor_version + clutter_micro_version - clutter_interface_age)])
@@ -781,7 +784,7 @@ AC_CONFIG_FILES([
clutter/Makefile
clutter/clutter-config.h
clutter/clutter-version.h
clutter/mutter-clutter-$CLUTTER_API_VERSION.pc:clutter/mutter-clutter.pc.in
clutter/mutter-clutter-$LIBMUTTER_API_VERSION.pc:clutter/mutter-clutter.pc.in
tests/Makefile
tests/accessibility/Makefile

View File

@@ -21,7 +21,7 @@ all_examples += \
image-content
endif
LDADD = $(top_builddir)/clutter/libmutter-clutter-@CLUTTER_API_VERSION@.la $(CLUTTER_LIBS) $(GDK_PIXBUF_LIBS) $(LIBM)
LDADD = $(top_builddir)/clutter/libmutter-clutter-@LIBMUTTER_API_VERSION@.la $(CLUTTER_LIBS) $(GDK_PIXBUF_LIBS) $(LIBM)
AM_CFLAGS = $(CLUTTER_CFLAGS) $(GDK_PIXBUF_CFLAGS) $(MAINTAINER_CFLAGS)
AM_CPPFLAGS = \
-DG_DISABLE_SINGLE_INCLUDES \

View File

@@ -1,5 +1,5 @@
common_ldadd = \
$(top_builddir)/clutter/libmutter-clutter-@CLUTTER_API_VERSION@.la
$(top_builddir)/clutter/libmutter-clutter-@LIBMUTTER_API_VERSION@.la
common_sources = \
cally-examples-util.c \

View File

@@ -3,7 +3,7 @@ installed_testdir = $(libexecdir)/installed-tests/mutter-clutter
include $(top_srcdir)/build/autotools/glib-tap.mk
AM_CFLAGS = -g $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
LDADD = $(top_builddir)/../cogl/cogl/libmutter-cogl.la $(top_builddir)/clutter/libmutter-clutter-1.0.la $(CLUTTER_LIBS) $(LIBM)
LDADD = $(top_builddir)/../cogl/cogl/libmutter-cogl-@LIBMUTTER_API_VERSION@.la $(top_builddir)/clutter/libmutter-clutter-@LIBMUTTER_API_VERSION@.la $(CLUTTER_LIBS) $(LIBM)
AM_LDFLAGS = -export-dynamic
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Clutter-Conform\" \
@@ -79,7 +79,7 @@ script_tests = \
test-script-timeline-markers.json \
test-state-1.json
TESTS_ENVIRONMENT += G_ENABLE_DIAGNOSTIC=0 CLUTTER_ENABLE_DIAGNOSTIC=0
TESTS_ENVIRONMENT += G_ENABLE_DIAGNOSTIC=0 CLUTTER_ENABLE_DIAGNOSTIC=0 CLUTTER_SCALE=1
# simple rules for generating a Git ignore file for the conformance test suite
$(srcdir)/.gitignore: Makefile

View File

@@ -110,8 +110,8 @@ clean-wrappers:
.PHONY: wrappers clean-wrappers
common_ldadd = \
$(top_builddir)/clutter/libmutter-clutter-@CLUTTER_API_VERSION@.la \
$(top_builddir)/../cogl/cogl/libmutter-cogl.la
$(top_builddir)/clutter/libmutter-clutter-@LIBMUTTER_API_VERSION@.la \
$(top_builddir)/../cogl/cogl/libmutter-cogl-@LIBMUTTER_API_VERSION@.la
check_PROGRAMS = test-interactive
check_SCRIPTS = wrappers

View File

@@ -1,6 +1,6 @@
common_ldadd = \
$(top_builddir)/clutter/libmutter-clutter-@CLUTTER_API_VERSION@.la \
$(top_builddir)/../cogl/cogl/libmutter-cogl.la
$(top_builddir)/clutter/libmutter-clutter-@LIBMUTTER_API_VERSION@.la \
$(top_builddir)/../cogl/cogl/libmutter-cogl-@LIBMUTTER_API_VERSION@.la
check_PROGRAMS = \

View File

@@ -7,7 +7,7 @@ check_PROGRAMS = \
test-state-mini \
test-state-pick
common_ldadd = $(top_builddir)/clutter/libmutter-clutter-@CLUTTER_API_VERSION@.la
common_ldadd = $(top_builddir)/clutter/libmutter-clutter-@LIBMUTTER_API_VERSION@.la
LDADD = $(common_ldadd) $(CLUTTER_LIBS) $(LIBM)

View File

@@ -2,8 +2,10 @@
NULL =
DISTCLEANFILES =
mutterlibdir = $(libdir)/mutter
mutterlib_LTLIBRARIES = libmutter-cogl-gles2.la
mutterlib_LTLIBRARIES = libmutter-cogl-gles2-@LIBMUTTER_API_VERSION@.la
AM_CPPFLAGS = \
-I$(top_srcdir) \
@@ -11,8 +13,8 @@ AM_CPPFLAGS = \
AM_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS)
libmutter_cogl_gles2_la_SOURCES = cogl-gles2-api.c
libmutter_cogl_gles2_la_LDFLAGS = \
libmutter_cogl_gles2_@LIBMUTTER_API_VERSION@_la_SOURCES = cogl-gles2-api.c
libmutter_cogl_gles2_@LIBMUTTER_API_VERSION@_la_LDFLAGS = \
-no-undefined \
-rpath $(mutterlibdir) \
-avoid-version \
@@ -25,7 +27,9 @@ coglgles2include_HEADERS = \
GLES2/gl2ext.h \
GLES2/gl2platform.h
pc_files = mutter-cogl-gles2-1.0.pc
pc_files = mutter-cogl-gles2-$(LIBMUTTER_API_VERSION).pc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(pc_files)
DISTCLEANFILES += $(pc_files)

View File

@@ -2,12 +2,12 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@/mutter
includedir=@includedir@/mutter
apiversion=1.0
requires=@COGL_PKG_REQUIRES@ mutter-cogl-1.0
apiversion=@LIBMUTTER_API_VERSION@
requires=@COGL_PKG_REQUIRES@ mutter-cogl-@LIBMUTTER_API_VERSION@
Name: Cogl
Description: An object oriented GL/GLES Abstraction/Utility Layer
Version: @COGL_1_VERSION@
Libs: -L${libdir} -lmutter-cogl-gles2
Version: @MUTTER_VERSION@
Libs: -L${libdir} -lmutter-cogl-gles2-@LIBMUTTER_API_VERSION@
Cflags: -I${includedir}/cogl
Requires: ${requires}

View File

@@ -23,13 +23,13 @@ source_h_priv = \
$(NULL)
mutterlibdir = $(libdir)/mutter
mutterlib_LTLIBRARIES = libmutter-cogl-pango.la
mutterlib_LTLIBRARIES = libmutter-cogl-pango-@LIBMUTTER_API_VERSION@.la
libmutter_cogl_pango_la_SOURCES = $(source_c) $(source_h) $(source_h_priv)
libmutter_cogl_pango_la_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_PANGO_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS)
libmutter_cogl_pango_la_LIBADD = $(top_builddir)/cogl/libmutter-cogl.la
libmutter_cogl_pango_la_LIBADD += $(COGL_DEP_LIBS) $(COGL_PANGO_DEP_LIBS) $(COGL_EXTRA_LDFLAGS)
libmutter_cogl_pango_la_LDFLAGS = \
libmutter_cogl_pango_@LIBMUTTER_API_VERSION@_la_SOURCES = $(source_c) $(source_h) $(source_h_priv)
libmutter_cogl_pango_@LIBMUTTER_API_VERSION@_la_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_PANGO_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS)
libmutter_cogl_pango_@LIBMUTTER_API_VERSION@_la_LIBADD = $(top_builddir)/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la
libmutter_cogl_pango_@LIBMUTTER_API_VERSION@_la_LIBADD += $(COGL_DEP_LIBS) $(COGL_PANGO_DEP_LIBS) $(COGL_EXTRA_LDFLAGS)
libmutter_cogl_pango_@LIBMUTTER_API_VERSION@_la_LDFLAGS = \
-export-dynamic \
-rpath $(mutterlibdir) \
-export-symbols-regex "^cogl_pango_.*" \
@@ -49,7 +49,7 @@ cogl_base_includedir = $(includedir)/mutter
cogl_pangoheadersdir = $(cogl_base_includedir)/cogl/cogl-pango
cogl_pangoheaders_HEADERS = $(source_h)
pc_files = mutter-cogl-pango-1.0.pc
pc_files = mutter-cogl-pango-$(LIBMUTTER_API_VERSION).pc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(pc_files)
@@ -65,23 +65,23 @@ INTROSPECTION_GIRS =
if HAVE_INTROSPECTION
INTROSPECTION_COMPILER_ARGS=--includedir=$(top_builddir)/cogl
CoglPango-1.0.gir: libmutter-cogl-pango.la Makefile
CoglPango-@LIBMUTTER_API_VERSION@.gir: libmutter-cogl-pango-$(LIBMUTTER_API_VERSION).la Makefile
CoglPango_1_0_gir_NAMESPACE = CoglPango
CoglPango_1_0_gir_VERSION = 1.0
CoglPango_1_0_gir_LIBS = $(top_builddir)/cogl/libmutter-cogl.la libmutter-cogl-pango.la
CoglPango_1_0_gir_FILES = $(source_h) $(source_c)
CoglPango_1_0_gir_CFLAGS = $(AM_CPPFLAGS) $(COGL_DEP_CFLAGS) $(COGL_PANGO_DEP_CFLAGS)
CoglPango_1_0_gir_INCLUDES = Pango-1.0 PangoCairo-1.0
CoglPango_1_0_gir_EXPORT_PACKAGES = mutter-cogl-pango-1.0
CoglPango_1_0_gir_SCANNERFLAGS = \
CoglPango_@LIBMUTTER_API_VERSION@_gir_NAMESPACE = CoglPango
CoglPango_@LIBMUTTER_API_VERSION@_gir_VERSION = @LIBMUTTER_API_VERSION@
CoglPango_@LIBMUTTER_API_VERSION@_gir_LIBS = $(top_builddir)/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la libmutter-cogl-pango-$(LIBMUTTER_API_VERSION).la
CoglPango_@LIBMUTTER_API_VERSION@_gir_FILES = $(source_h) $(source_c)
CoglPango_@LIBMUTTER_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS) $(COGL_DEP_CFLAGS) $(COGL_PANGO_DEP_CFLAGS)
CoglPango_@LIBMUTTER_API_VERSION@_gir_INCLUDES = Pango-1.0 PangoCairo-1.0
CoglPango_@LIBMUTTER_API_VERSION@_gir_EXPORT_PACKAGES = mutter-cogl-pango-@LIBMUTTER_API_VERSION@
CoglPango_@LIBMUTTER_API_VERSION@_gir_SCANNERFLAGS = \
--warn-all \
--identifier-prefix=CoglPango \
--symbol-prefix=cogl_pango \
--c-include='cogl-pango/cogl-pango.h' \
--include-uninstalled=$(top_builddir)/cogl/Cogl-1.0.gir
--include-uninstalled=$(top_builddir)/cogl/Cogl-@LIBMUTTER_API_VERSION@.gir
INTROSPECTION_GIRS += CoglPango-1.0.gir
INTROSPECTION_GIRS += CoglPango-@LIBMUTTER_API_VERSION@.gir
girdir = $(mutterlibdir)
gir_DATA = $(INTROSPECTION_GIRS)

View File

@@ -2,12 +2,12 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@/mutter
includedir=@includedir@/mutter
apiversion=1.0
requires=@COGL_PKG_REQUIRES@ mutter-cogl-1.0
apiversion=@LIBMUTTER_API_VERSION@
requires=@COGL_PKG_REQUIRES@ mutter-cogl-@LIBMUTTER_API_VERSION@
Name: Cogl
Description: An object oriented GL/GLES Abstraction/Utility Layer
Version: @COGL_1_VERSION@
Libs: -L${libdir} -lmutter-cogl-pango
Version: @MUTTER_VERSION@
Libs: -L${libdir} -lmutter-cogl-pango-@LIBMUTTER_API_VERSION@
Cflags: -I${includedir}/cogl
Requires: ${requires}

View File

@@ -65,14 +65,14 @@ glib_enum_headers = $(source_1_x_h)
include $(top_srcdir)/build/autotools/Makefile.am.enums
mutterlibdir = $(libdir)/mutter
mutterlib_LTLIBRARIES = libmutter-cogl-path.la
mutterlib_LTLIBRARIES = libmutter-cogl-path-@LIBMUTTER_API_VERSION@.la
libmutter_cogl_path_la_SOURCES = $(source_c) $(source_h)
nodist_libmutter_cogl_path_la_SOURCES = $(BUILT_SOURCES)
libmutter_cogl_path_la_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS)
libmutter_cogl_path_la_LIBADD = $(top_builddir)/cogl/libmutter-cogl.la
libmutter_cogl_path_la_LIBADD += $(COGL_DEP_LIBS) $(COGL_EXTRA_LDFLAGS)
libmutter_cogl_path_la_LDFLAGS = \
libmutter_cogl_path_@LIBMUTTER_API_VERSION@_la_SOURCES = $(source_c) $(source_h)
nodist_libmutter_cogl_path_@LIBMUTTER_API_VERSION@_la_SOURCES = $(BUILT_SOURCES)
libmutter_cogl_path_@LIBMUTTER_API_VERSION@_la_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS)
libmutter_cogl_path_@LIBMUTTER_API_VERSION@_la_LIBADD = $(top_builddir)/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la
libmutter_cogl_path_@LIBMUTTER_API_VERSION@_la_LIBADD += $(COGL_DEP_LIBS) $(COGL_EXTRA_LDFLAGS)
libmutter_cogl_path_@LIBMUTTER_API_VERSION@_la_LDFLAGS = \
-export-dynamic \
-export-symbols-regex "^(cogl|cogl2)_(framebuffer|path|is|clip|[sg]et)_.*" \
-no-undefined \
@@ -94,7 +94,7 @@ cogl_pathheadersdir = $(cogl_base_includedir)/cogl/cogl-path
cogl_pathheaders_HEADERS = $(source_h)
nodist_cogl_pathheaders_HEADERS = cogl-path-enum-types.h
pc_files = mutter-cogl-path-1.0.pc
pc_files = mutter-cogl-path-$(LIBMUTTER_API_VERSION).pc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(pc_files)

View File

@@ -2,12 +2,12 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@/mutter
includedir=@includedir@/mutter
apiversion=1.0
requires=@COGL_PKG_REQUIRES@ mutter-cogl-1.0
apiversion=@LIBMUTTER_API_VERSION@
requires=@COGL_PKG_REQUIRES@ mutter-cogl-@LIBMUTTER_API_VERSION@
Name: Cogl
Description: A 2D path drawing library for Cogl
Version: @COGL_1_VERSION@
Libs: -L${libdir} -lmutter-cogl-path
Version: @MUTTER_VERSION@
Libs: -L${libdir} -lmutter-cogl-path-@LIBMUTTER_API_VERSION@
Cflags: -I${includedir}/cogl
Requires: ${requires}

View File

@@ -41,7 +41,7 @@ BUILT_SOURCES += cogl-defines.h cogl-egl-defines.h cogl-gl-header.h
DISTCLEANFILES += cogl-defines.h cogl-egl-defines.h cogl-gl-header.h
EXTRA_DIST += cogl-defines.h.in cogl-egl-defines.h.in cogl-gl-header.h.in
pc_files = mutter-cogl-1.0.pc
pc_files = mutter-cogl-$(LIBMUTTER_API_VERSION).pc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(pc_files)
@@ -439,23 +439,23 @@ cogl_sources_c += \
endif
mutterlibdir = $(libdir)/mutter
mutterlib_LTLIBRARIES = libmutter-cogl.la
mutterlib_LTLIBRARIES = libmutter-cogl-@LIBMUTTER_API_VERSION@.la
libmutter_cogl_la_LIBADD = $(LIBM) $(COGL_DEP_LIBS) $(COGL_EXTRA_LDFLAGS)
libmutter_cogl_@LIBMUTTER_API_VERSION@_la_LIBADD = $(LIBM) $(COGL_DEP_LIBS) $(COGL_EXTRA_LDFLAGS)
if UNIT_TESTS
libmutter_cogl_la_LIBADD += $(top_builddir)/test-fixtures/libtest-fixtures.la
libmutter_cogl_@LIBMUTTER_API_VERSION@_la_LIBADD += $(top_builddir)/test-fixtures/libtest-fixtures.la
endif
# XXX: The aim is to eventually get rid of all private API exports
# for cogl-pango.
libmutter_cogl_la_LDFLAGS = \
libmutter_cogl_@LIBMUTTER_API_VERSION@_la_LDFLAGS = \
-no-undefined \
-avoid-version \
-export-dynamic \
-rpath $(mutterlibdir) \
-export-symbols-regex "^(cogl|_cogl_debug_flags|_cogl_atlas_new|_cogl_atlas_add_reorganize_callback|_cogl_atlas_reserve_space|_cogl_callback|_cogl_util_get_eye_planes_for_screen_poly|_cogl_atlas_texture_remove_reorganize_callback|_cogl_atlas_texture_add_reorganize_callback|_cogl_texture_get_format|_cogl_texture_foreach_sub_texture_in_region|_cogl_texture_set_region|_cogl_profile_trace_message|_cogl_context_get_default|_cogl_framebuffer_get_stencil_bits|_cogl_clip_stack_push_rectangle|_cogl_framebuffer_get_modelview_stack|_cogl_object_default_unref|_cogl_pipeline_foreach_layer_internal|_cogl_clip_stack_push_primitive|_cogl_buffer_unmap_for_fill_or_fallback|_cogl_framebuffer_draw_primitive|_cogl_debug_instances|_cogl_framebuffer_get_projection_stack|_cogl_pipeline_layer_get_texture|_cogl_buffer_map_for_fill_or_fallback|_cogl_texture_can_hardware_repeat|_cogl_pipeline_prune_to_n_layers|_cogl_primitive_draw|test_|unit_test_|_cogl_winsys_glx_get_vtable|_cogl_winsys_egl_xlib_get_vtable|_cogl_winsys_egl_get_vtable|_cogl_closure_disconnect|_cogl_onscreen_notify_complete|_cogl_onscreen_notify_frame_sync|_cogl_winsys_egl_renderer_connect_common|_cogl_winsys_error_quark|_cogl_set_error|_cogl_poll_renderer_add_fd|_cogl_poll_renderer_add_idle|_cogl_framebuffer_winsys_update_size|_cogl_winsys_egl_make_current|_cogl_pixel_format_get_bytes_per_pixel).*"
libmutter_cogl_la_SOURCES = $(cogl_sources_c)
nodist_libmutter_cogl_la_SOURCES = $(BUILT_SOURCES)
libmutter_cogl_@LIBMUTTER_API_VERSION@_la_SOURCES = $(cogl_sources_c)
nodist_libmutter_cogl_@LIBMUTTER_API_VERSION@_la_SOURCES = $(BUILT_SOURCES)
# Cogl installed headers
cogl_headers = \
@@ -483,22 +483,22 @@ EXTRA_DIST += \
INTROSPECTION_GIRS =
if HAVE_INTROSPECTION
Cogl-1.0.gir: libmutter-cogl.la Makefile
Cogl-@LIBMUTTER_API_VERSION@.gir: libmutter-cogl-$(LIBMUTTER_API_VERSION).la Makefile
Cogl_1_0_gir_NAMESPACE = Cogl
Cogl_1_0_gir_VERSION = 1.0
Cogl_1_0_gir_LIBS = libmutter-cogl.la
Cogl_@LIBMUTTER_API_VERSION@_gir_NAMESPACE = Cogl
Cogl_@LIBMUTTER_API_VERSION@_gir_VERSION = $(LIBMUTTER_API_VERSION)
Cogl_@LIBMUTTER_API_VERSION@_gir_LIBS = libmutter-cogl-$(LIBMUTTER_API_VERSION).la
if UNIT_TESTS
Cogl_1_0_gir_LIBS += $(top_builddir)/test-fixtures/libtest-fixtures.la
Cogl_@LIBMUTTER_API_VERSION@_gir_LIBS += $(top_builddir)/test-fixtures/libtest-fixtures.la
endif
Cogl_1_0_gir_FILES = $(cogl_1_public_h)
Cogl_@LIBMUTTER_API_VERSION@_gir_FILES = $(cogl_1_public_h)
Cogl_1_0_gir_CFLAGS = $(AM_CPPFLAGS) $(COGL_DEP_CFLAGS) -UCOGL_COMPILATION -D__COGL_H_INSIDE__ -D__COGL_XLIB_H_INSIDE__ -D__COGL_EGL_H_INSIDE__ -D__COGL_GLX_H_INSIDE__ -DCOGL_GIR_SCANNING
Cogl_1_0_gir_INCLUDES = GL-1.0 GObject-2.0
Cogl_1_0_gir_EXPORT_PACKAGES = mutter-cogl-1.0
Cogl_1_0_gir_SCANNERFLAGS = --warn-all --c-include='cogl/cogl.h'
Cogl_@LIBMUTTER_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS) $(COGL_DEP_CFLAGS) -UCOGL_COMPILATION -D__COGL_H_INSIDE__ -D__COGL_XLIB_H_INSIDE__ -D__COGL_EGL_H_INSIDE__ -D__COGL_GLX_H_INSIDE__ -DCOGL_GIR_SCANNING
Cogl_@LIBMUTTER_API_VERSION@_gir_INCLUDES = GL-1.0 GObject-2.0
Cogl_@LIBMUTTER_API_VERSION@_gir_EXPORT_PACKAGES = mutter-cogl-@LIBMUTTER_API_VERSION@
Cogl_@LIBMUTTER_API_VERSION@_gir_SCANNERFLAGS = --warn-all --c-include='cogl/cogl.h'
INTROSPECTION_GIRS += Cogl-1.0.gir
INTROSPECTION_GIRS += Cogl-@LIBMUTTER_API_VERSION@.gir
girdir = $(mutterlibdir)
gir_DATA = $(INTROSPECTION_GIRS)

View File

@@ -51,6 +51,9 @@ typedef struct _CoglGLXDisplay
CoglBool found_fbconfig;
CoglBool fbconfig_has_rgba_visual;
CoglBool is_direct;
CoglBool have_vblank_counter;
CoglBool can_vblank_wait;
GLXFBConfig fbconfig;
/* Single context for all wins */

View File

@@ -43,8 +43,6 @@ typedef struct _CoglGLXRenderer
int glx_error_base;
int glx_event_base;
CoglBool is_direct;
/* Vblank stuff */
int dri_fd;

View File

@@ -169,7 +169,8 @@ check_qualcomm_vendor (const CoglGpuInfoStrings *strings)
static CoglBool
check_nvidia_vendor (const CoglGpuInfoStrings *strings)
{
if (strcmp (strings->vendor_string, "NVIDIA") != 0)
if (strcmp (strings->vendor_string, "NVIDIA") != 0 &&
strcmp (strings->vendor_string, "NVIDIA Corporation") != 0)
return FALSE;
return TRUE;

View File

@@ -44,7 +44,7 @@ typedef struct _CoglObject CoglObject;
/**
* CoglObject: (ref-func cogl_object_ref) (unref-func cogl_object_unref)
* (set-value-func cogl_object_value_set_object)
* (get-value-func cogl_object_get_object)
* (get-value-func cogl_object_value_get_object)
*/
/**

View File

@@ -62,7 +62,7 @@ COGL_BEGIN_DECLS
/**
* CoglPrimitive: (ref-func cogl_object_ref) (unref-func cogl_object_unref)
* (set-value-func cogl_object_value_set_object)
* (get-value-func cogl_object_get_object)
* (get-value-func cogl_object_value_get_object)
*/
/**

View File

@@ -77,6 +77,9 @@ typedef enum
COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE,
COGL_PRIVATE_FEATURE_GL_EMBEDDED,
COGL_PRIVATE_FEATURE_GL_WEB,
/* This is currently only implemented for GLX, but isn't actually
* that winsys dependent */
COGL_PRIVATE_FEATURE_THREADED_SWAP_WAIT,
COGL_N_PRIVATE_FEATURES
} CoglPrivateFeature;

View File

@@ -69,6 +69,7 @@ struct _CoglRenderer
Display *foreign_xdpy;
CoglBool xlib_enable_event_retrieval;
CoglBool xlib_want_reset_on_video_memory_purge;
CoglBool xlib_enable_threaded_swap_wait;
#endif
CoglDriver driver;

View File

@@ -285,6 +285,17 @@ cogl_xlib_renderer_request_reset_on_video_memory_purge (CoglRenderer *renderer,
renderer->xlib_want_reset_on_video_memory_purge = enable;
}
void
cogl_xlib_renderer_set_threaded_swap_wait_enabled (CoglRenderer *renderer,
CoglBool enable)
{
_COGL_RETURN_IF_FAIL (cogl_is_renderer (renderer));
/* NB: Renderers are considered immutable once connected */
_COGL_RETURN_IF_FAIL (!renderer->connected);
renderer->xlib_enable_threaded_swap_wait = enable;
}
#endif /* COGL_HAS_XLIB_SUPPORT */
CoglBool

View File

@@ -167,6 +167,36 @@ void
cogl_xlib_renderer_set_event_retrieval_enabled (CoglRenderer *renderer,
CoglBool enable);
/**
* cogl_xlib_renderer_set_threaded_swap_wait_enabled:
* @renderer: a #CoglRenderer
* @enable: The new value
*
* Sets whether Cogl is allowed to use a separate threaded to wait for the
* completion of glXSwapBuffers() and call the frame callback for the
* corresponding #CoglOnscreen. This is a way of emulating the
* INTEL_swap_event extension, and will only ever be used if
* INTEL_swap_event is not present; it will also only be used for
* specific white-listed drivers that are known to work correctly with
* multiple contexts sharing state between threads.
*
* The advantage of enabling this is that it will allow your main loop
* to do other work while waiting for the system to be ready to draw
* the next frame, instead of blocking in glXSwapBuffers(). A disadvantage
* is that the driver will be prevented from buffering up multiple frames
* even if it thinks that it would be advantageous. In general, this
* will work best for something like a system compositor that is doing
* simple drawing but handling lots of other complex tasks.
*
* If you enable this, you must call XInitThreads() before any other
* X11 calls in your program. (See the documentation for XInitThreads())
*
* Stability: unstable
*/
void
cogl_xlib_renderer_set_threaded_swap_wait_enabled (CoglRenderer *renderer,
CoglBool enable);
/**
* cogl_xlib_renderer_get_display: (skip)
*/

View File

@@ -47,14 +47,19 @@
#include "cogl-util-gl-private.h"
#if defined (COGL_HAS_EGL_SUPPORT)
#include "cogl-egl-defines.h"
# ifndef COGL_HAS_GLES2
/* We need this define from GLES2, but can't include the header
as its type definitions may conflict with the GL ones
*/
# define GL_TEXTURE_EXTERNAL_OES 0x8D65
# endif
#endif
#ifndef GL_OES_EGL_image_external
#define GL_OES_EGL_image_external 1
#define GL_TEXTURE_EXTERNAL_OES 0x8D65
#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
#define GL_SAMPLER_EXTERNAL_OES 0x8D66
#endif /* GL_OES_EGL_image_external */
#endif /* defined (COGL_HAS_EGL_SUPPORT) */
void
_cogl_texture_2d_gl_free (CoglTexture2D *tex_2d)

View File

@@ -2,12 +2,12 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@/mutter
includedir=@includedir@/mutter
apiversion=1.0
apiversion=@LIBMUTTER_API_VERSION@
requires=@COGL_PKG_REQUIRES@
Name: Cogl
Description: An object oriented GL/GLES Abstraction/Utility Layer
Version: @COGL_1_VERSION@
Libs: -L${libdir} -lmutter-cogl
Version: @MUTTER_VERSION@
Libs: -L${libdir} -lmutter-cogl-@LIBMUTTER_API_VERSION@
Cflags: -I${includedir}/cogl
Requires: ${requires}

View File

@@ -262,6 +262,39 @@ _cogl_winsys_renderer_disconnect (CoglRenderer *renderer)
g_slice_free (CoglRendererEGL, egl_renderer);
}
static EGLDisplay
_cogl_winsys_egl_get_display (void *native)
{
EGLDisplay dpy = NULL;
const char *client_exts = eglQueryString (NULL, EGL_EXTENSIONS);
if (g_strstr_len (client_exts, -1, "EGL_KHR_platform_base"))
{
PFNEGLGETPLATFORMDISPLAYEXTPROC get_platform_display =
(void *) eglGetProcAddress ("eglGetPlatformDisplay");
if (get_platform_display)
dpy = get_platform_display (EGL_PLATFORM_X11_KHR, native, NULL);
if (dpy)
return dpy;
}
if (g_strstr_len (client_exts, -1, "EGL_EXT_platform_base"))
{
PFNEGLGETPLATFORMDISPLAYEXTPROC get_platform_display =
(void *) eglGetProcAddress ("eglGetPlatformDisplayEXT");
if (get_platform_display)
dpy = get_platform_display (EGL_PLATFORM_X11_KHR, native, NULL);
if (dpy)
return dpy;
}
return eglGetDisplay ((EGLNativeDisplayType) native);
}
static CoglBool
_cogl_winsys_renderer_connect (CoglRenderer *renderer,
CoglError **error)
@@ -278,8 +311,7 @@ _cogl_winsys_renderer_connect (CoglRenderer *renderer,
if (!_cogl_xlib_renderer_connect (renderer, error))
goto error;
egl_renderer->edpy =
eglGetDisplay ((EGLNativeDisplayType) xlib_renderer->xdpy);
egl_renderer->edpy = _cogl_winsys_egl_get_display (xlib_renderer->xdpy);
if (!_cogl_winsys_egl_renderer_connect_common (renderer, error))
goto error;

View File

@@ -65,12 +65,16 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <errno.h>
#include <fcntl.h>
#include <time.h>
#include <unistd.h>
#include <GL/glx.h>
#include <X11/Xlib.h>
#include <glib.h>
/* This is a relatively new extension */
#ifndef GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV
#define GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV 0x20F7
@@ -100,6 +104,14 @@ typedef struct _CoglOnscreenGLX
CoglBool pending_sync_notify;
CoglBool pending_complete_notify;
CoglBool pending_resize_notify;
GThread *swap_wait_thread;
GQueue *swap_wait_queue;
GCond swap_wait_cond;
GMutex swap_wait_mutex;
int swap_wait_pipe[2];
GLXContext swap_wait_context;
CoglBool closing_down;
} CoglOnscreenGLX;
typedef struct _CoglPixmapTextureEyeGLX
@@ -192,6 +204,15 @@ find_onscreen_for_xid (CoglContext *context, uint32_t xid)
return NULL;
}
static int64_t
get_monotonic_time_ns (void)
{
struct timespec ts;
clock_gettime (CLOCK_MONOTONIC, &ts);
return ts.tv_sec * G_GINT64_CONSTANT (1000000000) + ts.tv_nsec;
}
static void
ensure_ust_type (CoglRenderer *renderer,
GLXDrawable drawable)
@@ -202,7 +223,6 @@ ensure_ust_type (CoglRenderer *renderer,
int64_t msc;
int64_t sbc;
struct timeval tv;
struct timespec ts;
int64_t current_system_time;
int64_t current_monotonic_time;
@@ -232,9 +252,7 @@ ensure_ust_type (CoglRenderer *renderer,
/* This is the time source that the newer (fixed) linux drm
* drivers use (Linux >= 3.8) */
clock_gettime (CLOCK_MONOTONIC, &ts);
current_monotonic_time = (ts.tv_sec * G_GINT64_CONSTANT (1000000)) +
(ts.tv_nsec / G_GINT64_CONSTANT (1000));
current_monotonic_time = get_monotonic_time_ns () / 1000;
if (current_monotonic_time > ust - 1000000 &&
current_monotonic_time < ust + 1000000)
@@ -290,6 +308,9 @@ _cogl_winsys_get_clock_time (CoglContext *context)
{
CoglGLXRenderer *glx_renderer = context->display->renderer->winsys;
if (!glx_renderer->glXWaitForMsc)
return get_monotonic_time_ns ();
/* We don't call ensure_ust_type() because we don't have a drawable
* to work with. cogl_get_clock_time() is documented to only work
* once a valid, non-zero, timestamp has been retrieved from Cogl.
@@ -310,10 +331,7 @@ _cogl_winsys_get_clock_time (CoglContext *context)
}
case COGL_GLX_UST_IS_MONOTONIC_TIME:
{
struct timespec ts;
clock_gettime (CLOCK_MONOTONIC, &ts);
return ts.tv_sec * G_GINT64_CONSTANT (1000000000) + ts.tv_nsec;
return get_monotonic_time_ns ();
}
}
@@ -712,23 +730,25 @@ update_base_winsys_features (CoglRenderer *renderer)
g_strfreev (split_extensions);
/* Note: the GLX_SGI_video_sync spec explicitly states this extension
* only works for direct contexts. */
if (!glx_renderer->is_direct)
{
glx_renderer->glXGetVideoSync = NULL;
glx_renderer->glXWaitVideoSync = NULL;
COGL_FLAGS_SET (glx_renderer->base_winsys_features,
COGL_WINSYS_FEATURE_VBLANK_COUNTER,
FALSE);
}
/* The GLX_SGI_video_sync spec explicitly states this extension
* only works for direct contexts; we don't know per-renderer
* if the context is direct or not, so we turn off the feature
* flag; we still use the extension within this file looking
* instead at glx_display->have_vblank_counter.
*/
COGL_FLAGS_SET (glx_renderer->base_winsys_features,
COGL_WINSYS_FEATURE_VBLANK_COUNTER,
FALSE);
COGL_FLAGS_SET (glx_renderer->base_winsys_features,
COGL_WINSYS_FEATURE_MULTIPLE_ONSCREEN,
TRUE);
if (glx_renderer->glXWaitVideoSync ||
glx_renderer->glXWaitForMsc)
/* Because of the direct-context dependency, the VBLANK_WAIT feature
* doesn't reflect the presence of GLX_SGI_video_sync.
*/
if (glx_renderer->glXWaitForMsc)
COGL_FLAGS_SET (glx_renderer->base_winsys_features,
COGL_WINSYS_FEATURE_VBLANK_WAIT,
TRUE);
@@ -861,7 +881,7 @@ update_winsys_features (CoglContext *context, CoglError **error)
* by the SwapInterval so we have to throttle swap_region requests
* manually... */
if (_cogl_winsys_has_feature (COGL_WINSYS_FEATURE_SWAP_REGION) &&
_cogl_winsys_has_feature (COGL_WINSYS_FEATURE_VBLANK_WAIT))
(glx_display->have_vblank_counter || glx_display->can_vblank_wait))
COGL_FLAGS_SET (context->winsys_features,
COGL_WINSYS_FEATURE_SWAP_REGION_THROTTLE, TRUE);
@@ -877,6 +897,29 @@ update_winsys_features (CoglContext *context, CoglError **error)
COGL_FEATURE_ID_PRESENTATION_TIME,
TRUE);
}
else
{
CoglGpuInfo *info = &context->gpu;
if (glx_display->have_vblank_counter &&
context->display->renderer->xlib_enable_threaded_swap_wait &&
info->vendor == COGL_GPU_INFO_VENDOR_NVIDIA)
{
COGL_FLAGS_SET (context->winsys_features,
COGL_WINSYS_FEATURE_SYNC_AND_COMPLETE_EVENT, TRUE);
COGL_FLAGS_SET (context->winsys_features,
COGL_WINSYS_FEATURE_SWAP_BUFFERS_EVENT, TRUE);
/* TODO: remove this deprecated feature */
COGL_FLAGS_SET (context->features,
COGL_FEATURE_ID_SWAP_BUFFERS_EVENT,
TRUE);
COGL_FLAGS_SET (context->features,
COGL_FEATURE_ID_PRESENTATION_TIME,
TRUE);
COGL_FLAGS_SET (context->private_features,
COGL_PRIVATE_FEATURE_THREADED_SWAP_WAIT,
TRUE);
}
}
/* We'll manually handle queueing dirty events in response to
* Expose events from X */
@@ -1139,11 +1182,13 @@ create_context (CoglDisplay *display, CoglError **error)
return FALSE;
}
glx_renderer->is_direct =
glx_display->is_direct =
glx_renderer->glXIsDirect (xlib_renderer->xdpy, glx_display->glx_context);
glx_display->have_vblank_counter = glx_display->is_direct && glx_renderer->glXWaitVideoSync;
glx_display->can_vblank_wait = glx_renderer->glXWaitForMsc || glx_display->have_vblank_counter;
COGL_NOTE (WINSYS, "Setting %s context",
glx_renderer->is_direct ? "direct" : "indirect");
glx_display->is_direct ? "direct" : "indirect");
/* XXX: GLX doesn't let us make a context current without a window
* so we create a dummy window that we can use while no CoglOnscreen
@@ -1471,7 +1516,8 @@ _cogl_winsys_onscreen_init (CoglOnscreen *onscreen,
}
#ifdef GLX_INTEL_swap_event
if (_cogl_winsys_has_feature (COGL_WINSYS_FEATURE_SYNC_AND_COMPLETE_EVENT))
if (_cogl_winsys_has_feature (COGL_WINSYS_FEATURE_SYNC_AND_COMPLETE_EVENT) &&
!_cogl_has_private_feature (context, COGL_PRIVATE_FEATURE_THREADED_SWAP_WAIT))
{
GLXDrawable drawable =
glx_onscreen->glxwin ? glx_onscreen->glxwin : xlib_onscreen->xwin;
@@ -1514,6 +1560,31 @@ _cogl_winsys_onscreen_deinit (CoglOnscreen *onscreen)
xlib_onscreen->output = NULL;
}
if (glx_onscreen->swap_wait_thread)
{
g_mutex_lock (&glx_onscreen->swap_wait_mutex);
glx_onscreen->closing_down = TRUE;
g_cond_signal (&glx_onscreen->swap_wait_cond);
g_mutex_unlock (&glx_onscreen->swap_wait_mutex);
g_thread_join (glx_onscreen->swap_wait_thread);
glx_onscreen->swap_wait_thread = NULL;
g_cond_clear (&glx_onscreen->swap_wait_cond);
g_mutex_clear (&glx_onscreen->swap_wait_mutex);
g_queue_free (glx_onscreen->swap_wait_queue);
glx_onscreen->swap_wait_queue = NULL;
_cogl_poll_renderer_remove_fd (context->display->renderer,
glx_onscreen->swap_wait_pipe[0]);
close (glx_onscreen->swap_wait_pipe[0]);
close (glx_onscreen->swap_wait_pipe[1]);
glx_renderer->glXDestroyContext (xlib_renderer->xdpy,
glx_onscreen->swap_wait_context);
}
_cogl_xlib_renderer_trap_errors (context->display->renderer, &old_state);
drawable =
@@ -1655,12 +1726,13 @@ _cogl_winsys_wait_for_vblank (CoglOnscreen *onscreen)
CoglContext *ctx = framebuffer->context;
CoglGLXRenderer *glx_renderer;
CoglXlibRenderer *xlib_renderer;
CoglGLXDisplay *glx_display;
glx_renderer = ctx->display->renderer->winsys;
xlib_renderer = _cogl_xlib_renderer_get_data (ctx->display->renderer);
glx_display = ctx->display->winsys;
if (glx_renderer->glXWaitForMsc ||
glx_renderer->glXGetVideoSync)
if (glx_display->can_vblank_wait)
{
CoglFrameInfo *info = g_queue_peek_tail (&onscreen->pending_frame_infos);
@@ -1682,16 +1754,13 @@ _cogl_winsys_wait_for_vblank (CoglOnscreen *onscreen)
else
{
uint32_t current_count;
struct timespec ts;
glx_renderer->glXGetVideoSync (&current_count);
glx_renderer->glXWaitVideoSync (2,
(current_count + 1) % 2,
&current_count);
clock_gettime (CLOCK_MONOTONIC, &ts);
info->presentation_time =
ts.tv_sec * G_GINT64_CONSTANT (1000000000) + ts.tv_nsec;
info->presentation_time = get_monotonic_time_ns ();
}
}
}
@@ -1749,6 +1818,199 @@ set_frame_info_output (CoglOnscreen *onscreen,
}
}
static gpointer
threaded_swap_wait (gpointer data)
{
CoglOnscreen *onscreen = data;
CoglOnscreenGLX *glx_onscreen = onscreen->winsys;
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
CoglContext *context = framebuffer->context;
CoglDisplay *display = context->display;
CoglXlibRenderer *xlib_renderer = _cogl_xlib_renderer_get_data (display->renderer);
CoglGLXDisplay *glx_display = display->winsys;
CoglGLXRenderer *glx_renderer = display->renderer->winsys;
GLXDrawable dummy_drawable;
if (glx_display->dummy_glxwin)
dummy_drawable = glx_display->dummy_glxwin;
else
dummy_drawable = glx_display->dummy_xwin;
glx_renderer->glXMakeContextCurrent (xlib_renderer->xdpy,
dummy_drawable,
dummy_drawable,
glx_onscreen->swap_wait_context);
g_mutex_lock (&glx_onscreen->swap_wait_mutex);
while (TRUE)
{
gpointer queue_element;
uint32_t vblank_counter;
while (!glx_onscreen->closing_down && glx_onscreen->swap_wait_queue->length == 0)
g_cond_wait (&glx_onscreen->swap_wait_cond, &glx_onscreen->swap_wait_mutex);
if (glx_onscreen->closing_down)
break;
queue_element = g_queue_pop_tail (glx_onscreen->swap_wait_queue);
vblank_counter = GPOINTER_TO_UINT(queue_element);
g_mutex_unlock (&glx_onscreen->swap_wait_mutex);
glx_renderer->glXWaitVideoSync (2,
(vblank_counter + 1) % 2,
&vblank_counter);
g_mutex_lock (&glx_onscreen->swap_wait_mutex);
if (!glx_onscreen->closing_down)
{
int bytes_written = 0;
union {
char bytes[8];
int64_t presentation_time;
} u;
u.presentation_time = get_monotonic_time_ns ();
while (bytes_written < 8)
{
int res = write (glx_onscreen->swap_wait_pipe[1], u.bytes + bytes_written, 8 - bytes_written);
if (res == -1)
{
if (errno != EINTR)
g_error ("Error writing to swap notification pipe: %s\n",
g_strerror (errno));
}
else
{
bytes_written += res;
}
}
}
}
g_mutex_unlock (&glx_onscreen->swap_wait_mutex);
glx_renderer->glXMakeContextCurrent (xlib_renderer->xdpy,
None,
None,
NULL);
return NULL;
}
static int64_t
threaded_swap_wait_pipe_prepare (void *user_data)
{
return -1;
}
static void
threaded_swap_wait_pipe_dispatch (void *user_data, int revents)
{
CoglOnscreen *onscreen = user_data;
CoglOnscreenGLX *glx_onscreen = onscreen->winsys;
CoglFrameInfo *info;
if ((revents & COGL_POLL_FD_EVENT_IN))
{
int bytes_read = 0;
union {
char bytes[8];
int64_t presentation_time;
} u;
while (bytes_read < 8)
{
int res = read (glx_onscreen->swap_wait_pipe[0], u.bytes + bytes_read, 8 - bytes_read);
if (res == -1)
{
if (errno != EINTR)
g_error ("Error reading from swap notification pipe: %s\n",
g_strerror (errno));
}
else
{
bytes_read += res;
}
}
set_sync_pending (onscreen);
set_complete_pending (onscreen);
info = g_queue_peek_head (&onscreen->pending_frame_infos);
info->presentation_time = u.presentation_time;
}
}
static void
start_threaded_swap_wait (CoglOnscreen *onscreen,
uint32_t vblank_counter)
{
CoglOnscreenGLX *glx_onscreen = onscreen->winsys;
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
CoglContext *context = framebuffer->context;
if (glx_onscreen->swap_wait_thread == NULL)
{
CoglDisplay *display = context->display;
CoglGLXRenderer *glx_renderer = display->renderer->winsys;
CoglGLXDisplay *glx_display = display->winsys;
CoglOnscreenXlib *xlib_onscreen = onscreen->winsys;
CoglXlibRenderer *xlib_renderer =
_cogl_xlib_renderer_get_data (display->renderer);
GLXDrawable drawable =
glx_onscreen->glxwin ? glx_onscreen->glxwin : xlib_onscreen->xwin;
int i;
ensure_ust_type (display->renderer, drawable);
if ((pipe (glx_onscreen->swap_wait_pipe) == -1))
g_error ("Couldn't create pipe for swap notification: %s\n",
g_strerror (errno));
for (i = 0; i < 2; i++)
{
if (fcntl(glx_onscreen->swap_wait_pipe[i], F_SETFD,
fcntl(glx_onscreen->swap_wait_pipe[i], F_GETFD, 0) | FD_CLOEXEC) == -1)
g_error ("Couldn't set swap notification pipe CLOEXEC: %s\n",
g_strerror (errno));
}
_cogl_poll_renderer_add_fd (display->renderer,
glx_onscreen->swap_wait_pipe[0],
COGL_POLL_FD_EVENT_IN,
threaded_swap_wait_pipe_prepare,
threaded_swap_wait_pipe_dispatch,
onscreen);
glx_onscreen->swap_wait_queue = g_queue_new ();
g_mutex_init (&glx_onscreen->swap_wait_mutex);
g_cond_init (&glx_onscreen->swap_wait_cond);
glx_onscreen->swap_wait_context =
glx_renderer->glXCreateNewContext (xlib_renderer->xdpy,
glx_display->fbconfig,
GLX_RGBA_TYPE,
glx_display->glx_context,
True);
glx_onscreen->swap_wait_thread = g_thread_new ("cogl_glx_swap_wait",
threaded_swap_wait,
onscreen);
}
g_mutex_lock (&glx_onscreen->swap_wait_mutex);
g_queue_push_head (glx_onscreen->swap_wait_queue, GUINT_TO_POINTER(vblank_counter));
g_cond_signal (&glx_onscreen->swap_wait_cond);
g_mutex_unlock (&glx_onscreen->swap_wait_mutex);
}
static void
_cogl_winsys_onscreen_swap_region (CoglOnscreen *onscreen,
const int *user_rectangles,
@@ -1759,6 +2021,7 @@ _cogl_winsys_onscreen_swap_region (CoglOnscreen *onscreen,
CoglXlibRenderer *xlib_renderer =
_cogl_xlib_renderer_get_data (context->display->renderer);
CoglGLXRenderer *glx_renderer = context->display->renderer->winsys;
CoglGLXDisplay *glx_display = context->display->winsys;
CoglOnscreenXlib *xlib_onscreen = onscreen->winsys;
CoglOnscreenGLX *glx_onscreen = onscreen->winsys;
GLXDrawable drawable =
@@ -1815,9 +2078,8 @@ _cogl_winsys_onscreen_swap_region (CoglOnscreen *onscreen,
if (framebuffer->config.swap_throttled)
{
have_counter =
_cogl_winsys_has_feature (COGL_WINSYS_FEATURE_VBLANK_COUNTER);
can_wait = _cogl_winsys_has_feature (COGL_WINSYS_FEATURE_VBLANK_WAIT);
have_counter = glx_display->have_vblank_counter;
can_wait = glx_display->can_vblank_wait;
}
else
{
@@ -1974,6 +2236,7 @@ _cogl_winsys_onscreen_swap_buffers_with_damage (CoglOnscreen *onscreen,
CoglXlibRenderer *xlib_renderer =
_cogl_xlib_renderer_get_data (context->display->renderer);
CoglGLXRenderer *glx_renderer = context->display->renderer->winsys;
CoglGLXDisplay *glx_display = context->display->winsys;
CoglOnscreenXlib *xlib_onscreen = onscreen->winsys;
CoglOnscreenGLX *glx_onscreen = onscreen->winsys;
CoglBool have_counter;
@@ -1991,21 +2254,38 @@ _cogl_winsys_onscreen_swap_buffers_with_damage (CoglOnscreen *onscreen,
if (framebuffer->config.swap_throttled)
{
uint32_t end_frame_vsync_counter = 0;
have_counter = glx_display->have_vblank_counter;
have_counter =
_cogl_winsys_has_feature (COGL_WINSYS_FEATURE_VBLANK_COUNTER);
/* If the swap_region API is also being used then we need to track
* the vsync counter for each swap request so we can manually
* throttle swap_region requests. */
if (have_counter)
end_frame_vsync_counter = _cogl_winsys_get_vsync_counter (context);
if (!glx_renderer->glXSwapInterval)
if (glx_renderer->glXSwapInterval)
{
CoglBool can_wait =
_cogl_winsys_has_feature (COGL_WINSYS_FEATURE_VBLANK_WAIT);
if (_cogl_has_private_feature (context, COGL_PRIVATE_FEATURE_THREADED_SWAP_WAIT))
{
/* If we didn't wait for the GPU here, then it's easy to get the case
* where there is a VBlank between the point where we get the vsync counter
* and the point where the GPU is ready to actually perform the glXSwapBuffers(),
* and the swap wait terminates at the first VBlank rather than the one
* where the swap buffers happens. Calling glFinish() here makes this a
* rare race since the GPU is already ready to swap when we call glXSwapBuffers().
* The glFinish() also prevents any serious damage if the rare race happens,
* since it will wait for the preceding glXSwapBuffers() and prevent us from
* getting premanently ahead. (For NVIDIA drivers, glFinish() after glXSwapBuffers()
* waits for the buffer swap to happen.)
*/
_cogl_winsys_wait_for_gpu (onscreen);
start_threaded_swap_wait (onscreen, _cogl_winsys_get_vsync_counter (context));
}
}
else
{
CoglBool can_wait = have_counter || glx_display->can_vblank_wait;
uint32_t end_frame_vsync_counter = 0;
/* If the swap_region API is also being used then we need to track
* the vsync counter for each swap request so we can manually
* throttle swap_region requests. */
if (have_counter)
end_frame_vsync_counter = _cogl_winsys_get_vsync_counter (context);
/* If we are going to wait for VBLANK manually, we not only
* need to flush out pending drawing to the GPU before we

View File

@@ -83,6 +83,16 @@ AC_CONFIG_HEADERS(cogl-config.h)
AC_CONFIG_HEADERS(cogl-mutter-config.h)
AC_GNU_SOURCE
dnl ================================================================
dnl Check that we are configured by mutter
dnl ================================================================
AC_ARG_VAR([MUTTER_VERSION])
AC_ARG_VAR([LIBMUTTER_API_VERSION])
AS_IF([test "x$MUTTER_VERSION" = "x"],
[AC_MSG_ERROR([Clutter can only be configured by mutter])],)
dnl ================================================================
dnl Required versions for dependencies
dnl ================================================================
@@ -945,16 +955,16 @@ AC_OUTPUT(
Makefile
test-fixtures/Makefile
cogl/Makefile
cogl/mutter-cogl-1.0.pc
cogl/mutter-cogl-$LIBMUTTER_API_VERSION.pc:cogl/mutter-cogl.pc.in
cogl/cogl-defines.h
cogl/cogl-gl-header.h
cogl/cogl-egl-defines.h
cogl-pango/Makefile
cogl-pango/mutter-cogl-pango-1.0.pc
cogl-pango/mutter-cogl-pango-$LIBMUTTER_API_VERSION.pc:cogl-pango/mutter-cogl-pango.pc.in
cogl-path/Makefile
cogl-path/mutter-cogl-path-1.0.pc
cogl-path/mutter-cogl-path-$LIBMUTTER_API_VERSION.pc:cogl-path/mutter-cogl-path.pc.in
cogl-gles2/Makefile
cogl-gles2/mutter-cogl-gles2-1.0.pc
cogl-gles2/mutter-cogl-gles2-$LIBMUTTER_API_VERSION.pc:cogl-gles2/mutter-cogl-gles2.pc.in
tests/Makefile
tests/config.env
tests/conform/Makefile

View File

@@ -131,10 +131,10 @@ AM_CPPFLAGS += \
test_conformance_CFLAGS = -g3 -O0 $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) -Wno-error=maybe-uninitialized -Wno-error=nested-externs -Wno-error=missing-prototypes
test_conformance_LDADD = \
$(COGL_DEP_LIBS) \
$(top_builddir)/cogl/libmutter-cogl.la \
$(top_builddir)/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la \
$(LIBM)
if BUILD_COGL_PATH
test_conformance_LDADD += $(top_builddir)/cogl-path/libmutter-cogl-path.la
test_conformance_LDADD += $(top_builddir)/cogl-path/libmutter-cogl-path-$(LIBMUTTER_API_VERSION).la
endif
test_conformance_LDFLAGS = -export-dynamic

View File

@@ -17,7 +17,7 @@ AM_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS)
common_ldadd = \
$(COGL_DEP_LIBS) \
$(top_builddir)/cogl/libmutter-cogl.la \
$(top_builddir)/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la \
$(LIBM)
test_journal_SOURCES = test-journal.c

View File

@@ -13,7 +13,7 @@ wrappers: stamp-test-unit
@true
stamp-test-unit: Makefile test-unit$(EXEEXT)
@mkdir -p wrappers
. $(top_builddir)/cogl/libmutter-cogl.la ; \
. $(top_builddir)/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la ; \
$(NM) $(top_builddir)/cogl/.libs/"$$dlname"| \
grep '[DR] _\?unit_test_'|sed 's/.\+ [DR] _\?//' > unit-tests
@chmod +x $(top_srcdir)/tests/test-launcher.sh
@@ -62,7 +62,7 @@ AM_CPPFLAGS += \
test_unit_CFLAGS = -g3 -O0 $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS)
test_unit_LDADD = \
$(COGL_DEP_LIBS) \
$(top_builddir)/cogl/libmutter-cogl.la \
$(top_builddir)/cogl/libmutter-cogl-$(LIBMUTTER_API_VERSION).la \
$(LIBM)
test_unit_LDFLAGS = -export-dynamic

View File

@@ -2,13 +2,15 @@ AC_PREREQ(2.62)
m4_define([mutter_major_version], [3])
m4_define([mutter_minor_version], [23])
m4_define([mutter_micro_version], [3])
m4_define([mutter_micro_version], [90])
m4_define([mutter_version],
[mutter_major_version.mutter_minor_version.mutter_micro_version])
m4_define([mutter_plugin_api_version], [3])
m4_define([libmutter_api_version], [0])
AC_INIT([mutter], [mutter_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=mutter])
@@ -27,11 +29,18 @@ AC_GNU_SOURCE
MUTTER_MAJOR_VERSION=mutter_major_version
MUTTER_MINOR_VERSION=mutter_minor_version
MUTTER_MICRO_VERSION=mutter_micro_version
MUTTER_VERSION=mutter_version
MUTTER_PLUGIN_API_VERSION=mutter_plugin_api_version
LIBMUTTER_API_VERSION=libmutter_api_version
AC_SUBST(MUTTER_MAJOR_VERSION)
AC_SUBST(MUTTER_MINOR_VERSION)
AC_SUBST(MUTTER_MICRO_VERSION)
AC_SUBST(MUTTER_PLUGIN_API_VERSION)
AC_SUBST(MUTTER_VERSION)
AC_SUBST(LIBMUTTER_API_VERSION)
# Make the mutter versions visible to the cogl and clutter subdirs
export LIBMUTTER_API_VERSION MUTTER_VERSION
MUTTER_PLUGIN_DIR="$libdir/$PACKAGE/plugins"
AC_SUBST(MUTTER_PLUGIN_DIR)
@@ -228,13 +237,6 @@ GOBJECT_INTROSPECTION_CHECK([$INTROSPECTION_VERSION])
if test x$found_introspection != xno; then
AC_DEFINE(HAVE_INTROSPECTION, 1, [Define if GObject introspection is available])
MUTTER_PC_MODULES="$MUTTER_PC_MODULES gobject-introspection-1.0"
# Since we don't make any guarantees about stability and we don't support
# parallel install, there's no real reason to change directories, filenames,
# etc. as we change the Mutter tarball version. Note that this must match
# api_version in src/Makefile.am
META_GIR=Meta_3_0_gir
# META_GIR=[Meta_]mutter_major_version[_]mutter_minor_version[_gir]
AC_SUBST(META_GIR)
fi
AC_SUBST(XWAYLAND_PATH)
@@ -461,7 +463,7 @@ data/Makefile
doc/Makefile
doc/man/Makefile
src/Makefile
src/libmutter.pc
src/libmutter-$LIBMUTTER_API_VERSION.pc:src/libmutter.pc.in
src/compositor/plugins/Makefile
src/meta/meta-version.h
po/Makefile.in
@@ -469,6 +471,16 @@ po/Makefile.in
AC_OUTPUT
# Check that cogl and clutter have their .pc files regenerated with the correct version
COGL_PC_VERSION=$(grep Version: cogl/cogl/mutter-cogl-$LIBMUTTER_API_VERSION.pc|awk '{ print $2; }')
AS_IF([test "x$COGL_PC_VERSION" != "x$MUTTER_VERSION"],
[AC_MSG_ERROR([mutter-cogl pkg-config file not updated, rerun ./configure])])
CLUTTER_PC_VERSION=$(grep Version: clutter/clutter/mutter-clutter-$LIBMUTTER_API_VERSION.pc|awk '{ print $2; }')
AS_IF([test "x$CLUTTER_PC_VERSION" != "x$MUTTER_VERSION"],
[AC_MSG_ERROR([mutter-clutter pkg-config file not updated, rerun ./configure])])
if test x$enable_verbose_mode = xno; then
echo "*** WARNING WARNING WARNING WARNING WARNING"
echo "*** Building without verbose mode"

View File

@@ -6,11 +6,11 @@
<default>'Super_L'</default>
<summary>Modifier to use for extended window management operations</summary>
<description>
This key will initiate the "overlay", which is a combination window
This key will initiate the overlay, which is a combination window
overview and application launching system. The default is intended
to be the "Windows key" on PC hardware.
to be the Windows key on PC hardware.
It's expected that this binding either the default or set to
Its expected that this binding either the default or set to
the empty string.
</description>
</key>
@@ -40,7 +40,7 @@
<summary>Workspaces are managed dynamically</summary>
<description>
Determines whether workspaces are managed dynamically or
whether there's a static number of workspaces (determined
whether theres a static number of workspaces (determined
by the num-workspaces key in org.gnome.desktop.wm.preferences).
</description>
</key>
@@ -67,7 +67,7 @@
<default>false</default>
<summary>Delay focus changes until the pointer stops moving</summary>
<description>
If set to true, and the focus mode is either "sloppy" or "mouse"
If set to true, and the focus mode is either sloppy or mouse
then the focus will not be changed immediately when entering a
window, but only after the pointer stops moving.
</description>
@@ -78,7 +78,7 @@
<range min="0" max="64"/>
<summary>Draggable border width</summary>
<description>
The amount of total draggable borders. If the theme's visible
The amount of total draggable borders. If the themes visible
borders are not enough, invisible borders will be added to meet
this value.
</description>

View File

@@ -72,6 +72,7 @@ clutter/clutter/deprecated/clutter-shader.c
clutter/clutter/deprecated/clutter-state.c
clutter/clutter/deprecated/clutter-table-layout.c
clutter/clutter/deprecated/clutter-texture.c
clutter/clutter/evdev/clutter-input-device-evdev.c
clutter/clutter/evdev/clutter-virtual-input-device-evdev.c
clutter/clutter/wayland/clutter-wayland-surface.c
clutter/clutter/x11/clutter-backend-x11.c

281
po/cs.po
View File

@@ -6,15 +6,15 @@
# Petr Tomeš <ptomes@gmail.com>, 2006.
# Jakub Friedl <jfriedl@suse.cz>, 2006, 2007.
# Petr Kovar <pknbe@volny.cz>, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014.
# Marek Černocký <marek@manet.cz>, 2012, 2013, 2014, 2016.
# Marek Černocký <marek@manet.cz>, 2012, 2013, 2014, 2016, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2016-08-16 12:01+0000\n"
"PO-Revision-Date: 2016-08-17 13:15+0200\n"
"POT-Creation-Date: 2017-02-10 22:51+0000\n"
"PO-Revision-Date: 2017-02-11 15:30+0100\n"
"Last-Translator: Marek Černocký <marek@manet.cz>\n"
"Language-Team: čeština <gnome-cs-list@gnome.org>\n"
"Language: cs\n"
@@ -25,255 +25,255 @@ msgstr ""
"X-Generator: Gtranslator 2.91.7\n"
"X-Project-Style: gnome\n"
#: ../data/50-mutter-navigation.xml.in.h:1
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
msgstr "Navigace"
#: ../data/50-mutter-navigation.xml.in.h:2
#: data/50-mutter-navigation.xml:9
msgid "Move window to workspace 1"
msgstr "Přesunout okno na pracovní plochu 1"
#: ../data/50-mutter-navigation.xml.in.h:3
#: data/50-mutter-navigation.xml:12
msgid "Move window to workspace 2"
msgstr "Přesunout okno na pracovní plochu 2"
#: ../data/50-mutter-navigation.xml.in.h:4
#: data/50-mutter-navigation.xml:15
msgid "Move window to workspace 3"
msgstr "Přesunout okno na pracovní plochu 3"
#: ../data/50-mutter-navigation.xml.in.h:5
#: data/50-mutter-navigation.xml:18
msgid "Move window to workspace 4"
msgstr "Přesunout okno na pracovní plochu 4"
#: ../data/50-mutter-navigation.xml.in.h:6
#: data/50-mutter-navigation.xml:21
msgid "Move window to last workspace"
msgstr "Přesunout okno na poslední pracovní plochu"
#: ../data/50-mutter-navigation.xml.in.h:7
#: data/50-mutter-navigation.xml:24
msgid "Move window one workspace to the left"
msgstr "Přesunout okno o jednu pracovní plochu doleva"
#: ../data/50-mutter-navigation.xml.in.h:8
#: data/50-mutter-navigation.xml:27
msgid "Move window one workspace to the right"
msgstr "Přesunout okno o jednu pracovní plochu doprava"
#: ../data/50-mutter-navigation.xml.in.h:9
#: data/50-mutter-navigation.xml:30
msgid "Move window one workspace up"
msgstr "Přesunout okno o jednu pracovní plochu nahoru"
#: ../data/50-mutter-navigation.xml.in.h:10
#: data/50-mutter-navigation.xml:33
msgid "Move window one workspace down"
msgstr "Přesunout okno o jednu pracovní plochu dolů"
#: ../data/50-mutter-navigation.xml.in.h:11
#: data/50-mutter-navigation.xml:36
msgid "Move window one monitor to the left"
msgstr "Přesunout okno o jeden monitor doleva"
#: ../data/50-mutter-navigation.xml.in.h:12
#: data/50-mutter-navigation.xml:39
msgid "Move window one monitor to the right"
msgstr "Přesunout okno o jeden monitor doprava"
#: ../data/50-mutter-navigation.xml.in.h:13
#: data/50-mutter-navigation.xml:42
msgid "Move window one monitor up"
msgstr "Přesunout okno o jeden monitor nahoru"
#: ../data/50-mutter-navigation.xml.in.h:14
#: data/50-mutter-navigation.xml:45
msgid "Move window one monitor down"
msgstr "Přesunout okno o jeden monitor dolů"
#: ../data/50-mutter-navigation.xml.in.h:15
#: data/50-mutter-navigation.xml:49
msgid "Switch applications"
msgstr "Přepnout do jiné aplikace"
#: ../data/50-mutter-navigation.xml.in.h:16
#: data/50-mutter-navigation.xml:54
msgid "Switch to previous application"
msgstr "Přepnout do předchozí aplikaci"
#: ../data/50-mutter-navigation.xml.in.h:17
#: data/50-mutter-navigation.xml:58
msgid "Switch windows"
msgstr "Přepnout do jiného okna"
#: ../data/50-mutter-navigation.xml.in.h:18
#: data/50-mutter-navigation.xml:63
msgid "Switch to previous window"
msgstr "Přepnout do minulého okna"
#: ../data/50-mutter-navigation.xml.in.h:19
#: data/50-mutter-navigation.xml:67
msgid "Switch windows of an application"
msgstr "Přepnout do jiného okna aplikace"
#: ../data/50-mutter-navigation.xml.in.h:20
#: data/50-mutter-navigation.xml:72
msgid "Switch to previous window of an application"
msgstr "Přepnout do předchozího okna aplikace"
#: ../data/50-mutter-navigation.xml.in.h:21
#: data/50-mutter-navigation.xml:76
msgid "Switch system controls"
msgstr "Přepnout na systémový ovládací prvek"
#: ../data/50-mutter-navigation.xml.in.h:22
#: data/50-mutter-navigation.xml:81
msgid "Switch to previous system control"
msgstr "Přepnout na minulý systémový ovládací prvek"
#: ../data/50-mutter-navigation.xml.in.h:23
#: data/50-mutter-navigation.xml:85
msgid "Switch windows directly"
msgstr "Přepnout do minulého okna"
#: ../data/50-mutter-navigation.xml.in.h:24
#: data/50-mutter-navigation.xml:90
msgid "Switch directly to previous window"
msgstr "Přepnout přímo na předchozí okno"
#: ../data/50-mutter-navigation.xml.in.h:25
#: data/50-mutter-navigation.xml:94
msgid "Switch windows of an app directly"
msgstr "Přepnout do jiného okna aplikace"
#: ../data/50-mutter-navigation.xml.in.h:26
#: data/50-mutter-navigation.xml:99
msgid "Switch directly to previous window of an app"
msgstr "Přepnout do předchozího okna aplikace"
#: ../data/50-mutter-navigation.xml.in.h:27
#: data/50-mutter-navigation.xml:103
msgid "Switch system controls directly"
msgstr "Přepnout na minulý systémový ovládací prvek"
#: ../data/50-mutter-navigation.xml.in.h:28
#: data/50-mutter-navigation.xml:108
msgid "Switch directly to previous system control"
msgstr "Přepnout přímo na předchozí systémové ovládací prvky"
#: ../data/50-mutter-navigation.xml.in.h:29
#: data/50-mutter-navigation.xml:111
msgid "Hide all normal windows"
msgstr "Skrýt všechna běžná okna"
#: ../data/50-mutter-navigation.xml.in.h:30
#: data/50-mutter-navigation.xml:114
msgid "Switch to workspace 1"
msgstr "Přepnout na plochu 1"
#: ../data/50-mutter-navigation.xml.in.h:31
#: data/50-mutter-navigation.xml:117
msgid "Switch to workspace 2"
msgstr "Přepnout na plochu 2"
#: ../data/50-mutter-navigation.xml.in.h:32
#: data/50-mutter-navigation.xml:120
msgid "Switch to workspace 3"
msgstr "Přepnout na plochu 3"
#: ../data/50-mutter-navigation.xml.in.h:33
#: data/50-mutter-navigation.xml:123
msgid "Switch to workspace 4"
msgstr "Přepnout na plochu 4"
#: ../data/50-mutter-navigation.xml.in.h:34
#: data/50-mutter-navigation.xml:126
msgid "Switch to last workspace"
msgstr "Přepnout na poslední plochu"
#: ../data/50-mutter-navigation.xml.in.h:35
#: data/50-mutter-navigation.xml:129
msgid "Move to workspace left"
msgstr "Přesunout na plochu vlevo"
#: ../data/50-mutter-navigation.xml.in.h:36
#: data/50-mutter-navigation.xml:132
msgid "Move to workspace right"
msgstr "Přesunout na plochu vpravo"
#: ../data/50-mutter-navigation.xml.in.h:37
#: data/50-mutter-navigation.xml:135
msgid "Move to workspace above"
msgstr "Přesunout na plochu nad"
#: ../data/50-mutter-navigation.xml.in.h:38
#: data/50-mutter-navigation.xml:138
msgid "Move to workspace below"
msgstr "Přesunout na plochu pod"
#: ../data/50-mutter-system.xml.in.h:1
#: data/50-mutter-system.xml:6
msgid "System"
msgstr "Systém"
#: ../data/50-mutter-system.xml.in.h:2
#: data/50-mutter-system.xml:8
msgid "Show the run command prompt"
msgstr "Zobrazit řádek ke spuštění příkazu"
#: ../data/50-mutter-system.xml.in.h:3
#: data/50-mutter-system.xml:10
msgid "Show the activities overview"
msgstr "Zobrazit přehled činností"
#: ../data/50-mutter-windows.xml.in.h:1
#: data/50-mutter-windows.xml:6
msgid "Windows"
msgstr "Okna"
#: ../data/50-mutter-windows.xml.in.h:2
#: data/50-mutter-windows.xml:8
msgid "Activate the window menu"
msgstr "Aktivovat nabídku okna"
#: ../data/50-mutter-windows.xml.in.h:3
#: data/50-mutter-windows.xml:10
msgid "Toggle fullscreen mode"
msgstr "Přepnout režim celé obrazovky"
#: ../data/50-mutter-windows.xml.in.h:4
#: data/50-mutter-windows.xml:12
msgid "Toggle maximization state"
msgstr "Přepnout stav maximalizace"
#: ../data/50-mutter-windows.xml.in.h:5
#: data/50-mutter-windows.xml:14
msgid "Maximize window"
msgstr "Maximalizovat okno"
#: ../data/50-mutter-windows.xml.in.h:6
#: data/50-mutter-windows.xml:16
msgid "Restore window"
msgstr "Obnovit velikost okna"
#: ../data/50-mutter-windows.xml.in.h:7
#: data/50-mutter-windows.xml:18
msgid "Toggle shaded state"
msgstr "Přepnout stav svinutí"
#: ../data/50-mutter-windows.xml.in.h:8
#: data/50-mutter-windows.xml:20
msgid "Close window"
msgstr "Zavřít okno"
#: ../data/50-mutter-windows.xml.in.h:9
#: data/50-mutter-windows.xml:22
msgid "Hide window"
msgstr "Skrýt okno"
#: ../data/50-mutter-windows.xml.in.h:10
#: data/50-mutter-windows.xml:24
msgid "Move window"
msgstr "Přesunout okno"
#: ../data/50-mutter-windows.xml.in.h:11
#: data/50-mutter-windows.xml:26
msgid "Resize window"
msgstr "Změnit velikost okna"
#: ../data/50-mutter-windows.xml.in.h:12
#: data/50-mutter-windows.xml:29
msgid "Toggle window on all workspaces or one"
msgstr "Přepnout okno na všechny/jednu pracovní plochu"
#: ../data/50-mutter-windows.xml.in.h:13
#: data/50-mutter-windows.xml:31
msgid "Raise window if covered, otherwise lower it"
msgstr "Když je okno zakryté vynést jej do popředí, jinak odsunout do pozadí"
#: ../data/50-mutter-windows.xml.in.h:14
#: data/50-mutter-windows.xml:33
msgid "Raise window above other windows"
msgstr "Vynést okno do popředí nad ostatní okna"
#: ../data/50-mutter-windows.xml.in.h:15
#: data/50-mutter-windows.xml:35
msgid "Lower window below other windows"
msgstr "Odsunout okno do pozadí za ostatní okna"
#: ../data/50-mutter-windows.xml.in.h:16
#: data/50-mutter-windows.xml:37
msgid "Maximize window vertically"
msgstr "Maximalizovat okno svisle"
#: ../data/50-mutter-windows.xml.in.h:17
#: data/50-mutter-windows.xml:39
msgid "Maximize window horizontally"
msgstr "Maximalizovat okno vodorovně"
#: ../data/50-mutter-windows.xml.in.h:18
#: data/50-mutter-windows.xml:43
msgid "View split on left"
msgstr "Rozdělit okno přes levou půlku obrazovky"
#: ../data/50-mutter-windows.xml.in.h:19
#: data/50-mutter-windows.xml:47
msgid "View split on right"
msgstr "Rozdělit okno přes pravou půlku obrazovky"
#: ../data/mutter.desktop.in.h:1
#: data/mutter.desktop.in:4
msgid "Mutter"
msgstr "Mutter"
#: ../data/org.gnome.mutter.gschema.xml.in.h:1
#: data/org.gnome.mutter.gschema.xml.in:7
msgid "Modifier to use for extended window management operations"
msgstr "Modifikátor, který se má použít u operací rozšířené správy oken"
#: ../data/org.gnome.mutter.gschema.xml.in.h:2
#: data/org.gnome.mutter.gschema.xml.in:8
msgid ""
"This key will initiate the \"overlay\", which is a combination window "
"overview and application launching system. The default is intended to be the "
@@ -285,11 +285,11 @@ msgstr ""
"Windows“. Předpokládá se, že tato zkratka bude výchozí, nebo nastavena na "
"prázdný řetězec."
#: ../data/org.gnome.mutter.gschema.xml.in.h:3
#: data/org.gnome.mutter.gschema.xml.in:20
msgid "Attach modal dialogs"
msgstr "Připojit modální dialogová okna"
#: ../data/org.gnome.mutter.gschema.xml.in.h:4
#: data/org.gnome.mutter.gschema.xml.in:21
msgid ""
"When true, instead of having independent titlebars, modal dialogs appear "
"attached to the titlebar of the parent window and are moved together with "
@@ -299,11 +299,11 @@ msgstr ""
"zobrazují jako připojené k záhlaví okna rodiče a jsou přesunovány společně s "
"oknem rodiče."
#: ../data/org.gnome.mutter.gschema.xml.in.h:5
#: data/org.gnome.mutter.gschema.xml.in:30
msgid "Enable edge tiling when dropping windows on screen edges"
msgstr "Zapnout dlaždice na okrajích při upuštění oken na okrajích obrazovky"
#: ../data/org.gnome.mutter.gschema.xml.in.h:6
#: data/org.gnome.mutter.gschema.xml.in:31
msgid ""
"If enabled, dropping windows on vertical screen edges maximizes them "
"vertically and resizes them horizontally to cover half of the available "
@@ -314,11 +314,11 @@ msgstr ""
"dostupného prostoru. Upuštění oken na horním okraji obrazovky je "
"maximalizuje úplně."
#: ../data/org.gnome.mutter.gschema.xml.in.h:7
#: data/org.gnome.mutter.gschema.xml.in:40
msgid "Workspaces are managed dynamically"
msgstr "Pracovní plochy jsou spravovány dynamicky"
#: ../data/org.gnome.mutter.gschema.xml.in.h:8
#: data/org.gnome.mutter.gschema.xml.in:41
msgid ""
"Determines whether workspaces are managed dynamically or whether there's a "
"static number of workspaces (determined by the num-workspaces key in org."
@@ -327,11 +327,11 @@ msgstr ""
"Určuje, zda jsou pracovní plochy spravovány dynamicky nebo jich je pevný "
"počet (daný klíčem num-workspaces v org.gnome.desktop.wm.preferences)."
#: ../data/org.gnome.mutter.gschema.xml.in.h:9
#: data/org.gnome.mutter.gschema.xml.in:50
msgid "Workspaces only on primary"
msgstr "Pracovní plochy pouze na primárním"
#: ../data/org.gnome.mutter.gschema.xml.in.h:10
#: data/org.gnome.mutter.gschema.xml.in:51
msgid ""
"Determines whether workspace switching should happen for windows on all "
"monitors or only for windows on the primary monitor."
@@ -339,11 +339,11 @@ msgstr ""
"Určuje, zda by se měly pracovní plochy přepínat u všech oken na všech "
"monitorech, nebo pouze u oken na primárním monitoru."
#: ../data/org.gnome.mutter.gschema.xml.in.h:11
#: data/org.gnome.mutter.gschema.xml.in:59
msgid "No tab popup"
msgstr "Bez překryvné nabídky tabulátoru"
#: ../data/org.gnome.mutter.gschema.xml.in.h:12
#: data/org.gnome.mutter.gschema.xml.in:60
msgid ""
"Determines whether the use of popup and highlight frame should be disabled "
"for window cycling."
@@ -351,11 +351,11 @@ msgstr ""
"Určuje, zda by se mělo používání překryvné nabídky se zvýrazněním vypnout "
"při procházení okny."
#: ../data/org.gnome.mutter.gschema.xml.in.h:13
#: data/org.gnome.mutter.gschema.xml.in:68
msgid "Delay focus changes until the pointer stops moving"
msgstr "Se změnou zaměření čekat na zastavení pohybu ukazatele"
#: ../data/org.gnome.mutter.gschema.xml.in.h:14
#: data/org.gnome.mutter.gschema.xml.in:69
msgid ""
"If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
"the focus will not be changed immediately when entering a window, but only "
@@ -365,11 +365,11 @@ msgstr ""
"zaměření nezmění hned, když vstoupíte do kona, ale až se přestane pohybovat "
"ukazatel."
#: ../data/org.gnome.mutter.gschema.xml.in.h:15
#: data/org.gnome.mutter.gschema.xml.in:79
msgid "Draggable border width"
msgstr "Šířka přetažitelného okraje"
#: ../data/org.gnome.mutter.gschema.xml.in.h:16
#: data/org.gnome.mutter.gschema.xml.in:80
msgid ""
"The amount of total draggable borders. If the theme's visible borders are "
"not enough, invisible borders will be added to meet this value."
@@ -377,11 +377,11 @@ msgstr ""
"Počet všech přetažitelných okrajů. Nestačí-li viditelné okraje motivu, budou "
"přidány neviditelné okraje, aby bylo docíleno zadané hodnoty."
#: ../data/org.gnome.mutter.gschema.xml.in.h:17
#: data/org.gnome.mutter.gschema.xml.in:89
msgid "Auto maximize nearly monitor sized windows"
msgstr "Automaticky maximalizovat okna téměř o velikosti monitoru"
#: ../data/org.gnome.mutter.gschema.xml.in.h:18
#: data/org.gnome.mutter.gschema.xml.in:90
msgid ""
"If enabled, new windows that are initially the size of the monitor "
"automatically get maximized."
@@ -389,11 +389,11 @@ msgstr ""
"Je-li povoleno, budou automaticky maximalizována okna, která mají počáteční "
"velikost shodnou s velikostí monitoru."
#: ../data/org.gnome.mutter.gschema.xml.in.h:19
#: data/org.gnome.mutter.gschema.xml.in:98
msgid "Place new windows in the center"
msgstr "Umístit nová okna do středu"
#: ../data/org.gnome.mutter.gschema.xml.in.h:20
#: data/org.gnome.mutter.gschema.xml.in:99
msgid ""
"When true, the new windows will always be put in the center of the active "
"screen of the monitor."
@@ -401,114 +401,125 @@ msgstr ""
"Je-li zapnuto, nová okna budou vždy umístěna ve středu aktivní obrazovky "
"monitoru."
#: ../data/org.gnome.mutter.gschema.xml.in.h:21
#: data/org.gnome.mutter.gschema.xml.in:120
msgid "Select window from tab popup"
msgstr "Vybrat okno z překryvné nabídky tabulátoru"
#: ../data/org.gnome.mutter.gschema.xml.in.h:22
#: data/org.gnome.mutter.gschema.xml.in:125
msgid "Cancel tab popup"
msgstr "Zrušit překryvné okno tabulátoru"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:1
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Přepnout na VT 1"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:2
#: data/org.gnome.mutter.wayland.gschema.xml.in:10
msgid "Switch to VT 2"
msgstr "Přepnout na VT 2"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:3
#: data/org.gnome.mutter.wayland.gschema.xml.in:14
msgid "Switch to VT 3"
msgstr "Přepnout na VT 3"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:4
#: data/org.gnome.mutter.wayland.gschema.xml.in:18
msgid "Switch to VT 4"
msgstr "Přepnout na VT 4"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:5
#: data/org.gnome.mutter.wayland.gschema.xml.in:22
msgid "Switch to VT 5"
msgstr "Přepnout na VT 5"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:6
#: data/org.gnome.mutter.wayland.gschema.xml.in:26
msgid "Switch to VT 6"
msgstr "Přepnout na VT 6"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:7
#: data/org.gnome.mutter.wayland.gschema.xml.in:30
msgid "Switch to VT 7"
msgstr "Přepnout na VT 7"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
#: data/org.gnome.mutter.wayland.gschema.xml.in:34
msgid "Switch to VT 8"
msgstr "Přepnout na VT 8"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
#: data/org.gnome.mutter.wayland.gschema.xml.in:38
msgid "Switch to VT 9"
msgstr "Přepnout na VT 9"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
#: data/org.gnome.mutter.wayland.gschema.xml.in:42
msgid "Switch to VT 10"
msgstr "Přepnout na VT 10"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
#: data/org.gnome.mutter.wayland.gschema.xml.in:46
msgid "Switch to VT 11"
msgstr "Přepnout na VT 11"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
#: data/org.gnome.mutter.wayland.gschema.xml.in:50
msgid "Switch to VT 12"
msgstr "Přepnout na VT 12"
#: ../src/backends/meta-input-settings.c:1707
#| msgid "Switch system controls"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1759
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Přepínač režimu (skupina %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1781
msgid "Switch monitor"
msgstr "Přepnout monitor"
#: ../src/backends/meta-input-settings.c:1709
#: src/backends/meta-input-settings.c:1783
msgid "Show on-screen help"
msgstr "Zobrazit nápovědu na obrazovce"
#: ../src/backends/meta-monitor-manager.c:514
#: src/backends/meta-monitor-manager.c:675
msgid "Built-in display"
msgstr "Vestavěný displej"
#: ../src/backends/meta-monitor-manager.c:537
#: src/backends/meta-monitor-manager.c:698
msgid "Unknown"
msgstr "Neznámý"
#: ../src/backends/meta-monitor-manager.c:539
#: src/backends/meta-monitor-manager.c:700
msgid "Unknown Display"
msgstr "Neznámý displej"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: ../src/backends/meta-monitor-manager.c:547
#: src/backends/meta-monitor-manager.c:708
#, c-format
msgid "%s %s"
msgstr "%s %s"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: ../src/compositor/compositor.c:463
#: src/compositor/compositor.c:471
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display \"%s"
"\"."
msgstr "Jiný kompozitní správce již běží na obrazovce %i displeje „%s“."
#: ../src/core/bell.c:194
#: src/core/bell.c:194
msgid "Bell event"
msgstr "Událost zvonku"
#: ../src/core/delete.c:127
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "„%s“ nereaguje."
#: ../src/core/delete.c:129
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "Aplikace nereaguje."
#: ../src/core/delete.c:134
#: src/core/delete.c:134
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
@@ -516,56 +527,56 @@ msgstr ""
"Je možné chvíli počkat, aby aplikace mohla pokračovat, nebo si vynutit úplné "
"ukončení aplikace."
#: ../src/core/delete.c:141
msgid "_Wait"
msgstr "_Počkat"
#: ../src/core/delete.c:141
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Vynutit ukončení"
#: ../src/core/display.c:590
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Počkat"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "Nelze otevřít displej X Window System „%s“\n"
#: ../src/core/main.c:182
#: src/core/main.c:187
msgid "Disable connection to session manager"
msgstr "Zakáže připojení ke správci sezení"
#: ../src/core/main.c:188
#: src/core/main.c:193
msgid "Replace the running window manager"
msgstr "Nahradí běžícího správce oken"
#: ../src/core/main.c:194
#: src/core/main.c:199
msgid "Specify session management ID"
msgstr "Určení ID správy sezení"
#: ../src/core/main.c:199
#: src/core/main.c:204
msgid "X Display to use"
msgstr "Displej X, který použije"
#: ../src/core/main.c:205
#: src/core/main.c:210
msgid "Initialize session from savefile"
msgstr "Spustí sezení z uloženého souboru"
#: ../src/core/main.c:211
#: src/core/main.c:216
msgid "Make X calls synchronous"
msgstr "Provede volání X synchronně"
#: ../src/core/main.c:218
#: src/core/main.c:223
msgid "Run as a wayland compositor"
msgstr "Spustit jako kompozitor protokolu Wayland"
#: ../src/core/main.c:224
#: src/core/main.c:229
msgid "Run as a nested compositor"
msgstr "Spustit jako podkladový kompozitor"
#: ../src/core/main.c:232
#: src/core/main.c:237
msgid "Run as a full display server, rather than nested"
msgstr "Spustit jako plnohodnotný server displeje, nikoliv vnořeně"
#: ../src/core/mutter.c:39
#: src/core/mutter.c:39
#, c-format
msgid ""
"mutter %s\n"
@@ -581,20 +592,20 @@ msgstr ""
"Tento software je BEZ JAKÉKOLIV ZÁRUKY; neposkytují se ani záruky "
"PRODEJNOSTI anebo VHODNOSTI PRO URČITÝ ÚČEL.\n"
#: ../src/core/mutter.c:53
#: src/core/mutter.c:53
msgid "Print version"
msgstr "Vypsat verzi"
#: ../src/core/mutter.c:59
#: src/core/mutter.c:59
msgid "Mutter plugin to use"
msgstr "Zásuvný modul Mutter, který se má použít"
#: ../src/core/prefs.c:1997
#: src/core/prefs.c:1997
#, c-format
msgid "Workspace %d"
msgstr "Plocha %d"
#: ../src/core/screen.c:521
#: src/core/screen.c:580
#, c-format
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
@@ -603,21 +614,21 @@ msgstr ""
"Displej „%s“ již správce oken má; zkuste prosím nahradit aktuálního správce "
"oken pomocí přepínače --replace."
#: ../src/core/screen.c:606
#: src/core/screen.c:665
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgstr "Obrazovka %d na displeji „%s“ je neplatná\n"
#: ../src/core/util.c:120
#: src/core/util.c:120
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter bylo přeloženo bez podpory podrobného režimu\n"
#: ../src/wayland/meta-wayland-tablet-pad.c:595
#: src/wayland/meta-wayland-tablet-pad.c:563
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "Přepínač režimu: režim %d"
#: ../src/x11/session.c:1815
#: src/x11/session.c:1815
msgid ""
"These windows do not support &quot;save current setup&quot; and will have to "
"be restarted manually next time you log in."
@@ -625,7 +636,7 @@ msgstr ""
"Tato okna nepodporují &quot;ukládání aktuálního nastavení&quot; a po vašem "
"příštím přihlášení je budete muset spustit ručně."
#: ../src/x11/window-props.c:548
#: src/x11/window-props.c:559
#, c-format
msgid "%s (on %s)"
msgstr "%s (na %s)"

105
po/de.po
View File

@@ -3,7 +3,7 @@
# Matthias Warkus <mawarkus@gnome.org>, 2002.
# Christian Neumair <chris@gnome-de.org>, 2002-2004.
# Hendrik Richter <hendrikr@gnome.org>, 2005, 2006, 2007, 2008.
# Mario Blättermann <mario.blaettermann@gmail.com>, 2010-2013, 2016.
# Mario Blättermann <mario.blaettermann@gmail.com>, 2010-2013, 2016-2017.
# Christian Kirbach <Christian.Kirbach@googlemail.com>, 2009, 2011, 2012.
# Wolfgang Stöggl <c72578@yahoo.de> 2011.
# Tobias Endrigkeit <tobiasendrigkeit@googlemail.com>, 2012.
@@ -13,8 +13,8 @@ msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2016-09-07 09:27+0000\n"
"PO-Revision-Date: 2016-09-07 18:55+0200\n"
"POT-Creation-Date: 2017-02-16 01:44+0000\n"
"PO-Revision-Date: 2017-02-17 21:22+0100\n"
"Last-Translator: Mario Blättermann <mario.blaettermann@gmail.com>\n"
"Language-Team: Deutsch <gnome-de@gnome.org>\n"
"Language: de\n"
@@ -22,7 +22,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.8.9\n"
"X-Generator: Poedit 1.8.11\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@@ -276,10 +276,10 @@ msgstr "Zusatztaste für erweiterte Aktionen der Fensterverwaltung"
# bzw- die Apfel-Taste auf Mac-Computern
#: data/org.gnome.mutter.gschema.xml.in:8
msgid ""
"This key will initiate the \"overlay\", which is a combination window "
"overview and application launching system. The default is intended to be the "
"\"Windows key\" on PC hardware. It's expected that this binding either the "
"default or set to the empty string."
"This key will initiate the overlay, which is a combination window overview "
"and application launching system. The default is intended to be the “Windows "
"key on PC hardware. Its expected that this binding either the default or "
"set to the empty string."
msgstr ""
"Dieser Schlüssel wird die »Überlagerung« auslösen, d.h. eine kombinierte "
"Fensterübersicht und ein System zum Starten von Anwendungen. Als "
@@ -323,7 +323,7 @@ msgstr "Arbeitsflächen sollen dynamisch verwaltet werden "
#: data/org.gnome.mutter.gschema.xml.in:41
msgid ""
"Determines whether workspaces are managed dynamically or whether there's a "
"Determines whether workspaces are managed dynamically or whether theres a "
"static number of workspaces (determined by the num-workspaces key in org."
"gnome.desktop.wm.preferences)."
msgstr ""
@@ -361,9 +361,9 @@ msgstr "Fokus-Änderungen verzögern, bis der Zeiger aufhört sich zu bewegen"
#: data/org.gnome.mutter.gschema.xml.in:69
msgid ""
"If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
"the focus will not be changed immediately when entering a window, but only "
"after the pointer stops moving."
"If set to true, and the focus mode is either sloppy or mouse then the "
"focus will not be changed immediately when entering a window, but only after "
"the pointer stops moving."
msgstr ""
"Falls dieser Schlüssel gesetzt ist und der Fokusmodus entweder »sloppy« oder "
"»mouse« ist, wird der Fokus nicht sofort beim Erreichen eines Fensters "
@@ -376,7 +376,7 @@ msgstr "Breite der ziehbaren Ränder"
# Lange Beschreibung von »Draggable border width«
#: data/org.gnome.mutter.gschema.xml.in:80
msgid ""
"The amount of total draggable borders. If the theme's visible borders are "
"The amount of total draggable borders. If the themes visible borders are "
"not enough, invisible borders will be added to meet this value."
msgstr ""
"Die Gesamtbreite ziehbarer Ränder. Falls die im Thema sichtbaren Ränder "
@@ -463,41 +463,51 @@ msgstr "Zum virtuellen Terminal 11 wechseln"
msgid "Switch to VT 12"
msgstr "Zum virtuellen Terminal 12 wechseln"
#: src/backends/meta-input-settings.c:1707
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1759
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Moduswechsel (Gruppe %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1781
msgid "Switch monitor"
msgstr "Bildschirm wechseln"
#: src/backends/meta-input-settings.c:1709
#: src/backends/meta-input-settings.c:1783
msgid "Show on-screen help"
msgstr "Bildschirmhilfe anzeigen"
#: src/backends/meta-monitor-manager.c:514
#: src/backends/meta-monitor-manager.c:675
msgid "Built-in display"
msgstr "Eingebaute Anzeige"
#: src/backends/meta-monitor-manager.c:537
#: src/backends/meta-monitor-manager.c:698
msgid "Unknown"
msgstr "Unbekannt"
#: src/backends/meta-monitor-manager.c:539
#: src/backends/meta-monitor-manager.c:700
msgid "Unknown Display"
msgstr "Unbekannte Anzeige"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:547
#: src/backends/meta-monitor-manager.c:708
#, c-format
msgid "%s %s"
msgstr "%s %s"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: src/compositor/compositor.c:463
#: src/compositor/compositor.c:471
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display \"%s"
"\"."
"Another compositing manager is already running on screen %i on display “%s”."
msgstr ""
"Ein weiterer Compositing-Verwalter läuft bereits auf Bildschirm %i der "
"Anzeige »%s«."
@@ -506,6 +516,7 @@ msgstr ""
msgid "Bell event"
msgstr "Klangereignis"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
@@ -523,52 +534,52 @@ msgstr ""
"Sie können der Anwendung noch etwas Zeit geben oder ein sofortiges Beenden "
"erzwingen."
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Warten"
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Beenden erzwingen"
#: src/core/display.c:590
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Warten"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgid "Failed to open X Window System display %s\n"
msgstr "X-Window-Systemanzeige »%s« konnte nicht geöffnet werden\n"
#: src/core/main.c:182
#: src/core/main.c:189
msgid "Disable connection to session manager"
msgstr "Verbindung zur Sitzungsverwaltung deaktivieren"
#: src/core/main.c:188
#: src/core/main.c:195
msgid "Replace the running window manager"
msgstr "Den aktuellen Fensterverwalter ersetzen"
#: src/core/main.c:194
#: src/core/main.c:201
msgid "Specify session management ID"
msgstr "Kennung der Sitzungsverwaltung angeben"
#: src/core/main.c:199
#: src/core/main.c:206
msgid "X Display to use"
msgstr "Zu verwendende X-Anzeige"
#: src/core/main.c:205
#: src/core/main.c:212
msgid "Initialize session from savefile"
msgstr "Sitzung anhand gespeicherter Datei starten"
#: src/core/main.c:211
#: src/core/main.c:218
msgid "Make X calls synchronous"
msgstr "X-Aufrufe abgleichen"
#: src/core/main.c:218
#: src/core/main.c:225
msgid "Run as a wayland compositor"
msgstr "Als Wayland-Compositor ausführen"
#: src/core/main.c:224
#: src/core/main.c:231
msgid "Run as a nested compositor"
msgstr "Als eingebetteten Compositor ausführen"
#: src/core/main.c:232
#: src/core/main.c:239
msgid "Run as a full display server, rather than nested"
msgstr "Als vollwertigen Display-Server verwenden (nicht eingebettet)"
@@ -578,7 +589,7 @@ msgstr "Als vollwertigen Display-Server verwenden (nicht eingebettet)"
#, c-format
msgid ""
"mutter %s\n"
"Copyright (C) 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"This is free software; see the source for copying conditions.\n"
"There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A "
"PARTICULAR PURPOSE.\n"
@@ -603,38 +614,38 @@ msgstr "Zu benutzendes Mutter-Plugin"
msgid "Workspace %d"
msgstr "Arbeitsfläche %d"
#: src/core/screen.c:521
#: src/core/screen.c:580
#, c-format
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
"to replace the current window manager."
"Display “%s” already has a window manager; try using the --replace option to "
"replace the current window manager."
msgstr ""
"Bildschirm »%s« hat bereits einen Fensterverwalter. Versuchen Sie die Option "
"»--replace«, um den aktuellen Fensterverwalter zu ersetzen."
#: src/core/screen.c:606
#: src/core/screen.c:665
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgid "Screen %d on display %s is invalid\n"
msgstr "Bildschirm %d auf Anzeige »%s« ist ungültig\n"
#: src/core/util.c:120
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter wurde ohne Unterstützung für den redseligen Modus kompiliert\n"
#: src/wayland/meta-wayland-tablet-pad.c:595
#: src/wayland/meta-wayland-tablet-pad.c:563
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "Moduswechsel: Modus %d"
#: src/x11/session.c:1815
msgid ""
"These windows do not support &quot;save current setup&quot; and will have to "
"be restarted manually next time you log in."
"These windows do not support save current setup and will have to be "
"restarted manually next time you log in."
msgstr ""
"Diese Fenster unterstützen das Speichern der aktuellen Einstellungen nicht "
"und müssen bei der nächsten Anmeldung manuell neu gestartet werden."
#: src/x11/window-props.c:548
#: src/x11/window-props.c:559
#, c-format
msgid "%s (on %s)"
msgstr "%s (auf %s)"

364
po/es.po
View File

@@ -7,17 +7,17 @@
# Pablo Gonzalo del Campo <pablodc@bigfoot.com>,2002,2003.
# Francisco Javier F. Serrador <serrador@cvs.gnome.org>, 2004, 2005, 2006.
# Jorge González <jorgegonz@svn.gnome.org>, 2007, 2008, 2009, 2010, 2011.
# Daniel Mustieles <daniel.mustieles@gmail.com>, 2011, 2012, 2013, 2014, 2015, 2016.
# Daniel Mustieles <daniel.mustieles@gmail.com>, 2011, 2012, 2013, 2014, 2015, 2016, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: mutter.master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2016-07-24 19:39+0000\n"
"PO-Revision-Date: 2016-07-26 13:00+0200\n"
"POT-Creation-Date: 2017-02-16 01:44+0000\n"
"PO-Revision-Date: 2017-02-17 11:38+0100\n"
"Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n"
"Language-Team: Español; Castellano <gnome-es-list@gnome.org>\n"
"Language-Team: es <gnome-es-list@gnome.org>\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -25,261 +25,266 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Gtranslator 2.91.6\n"
#: ../data/50-mutter-navigation.xml.in.h:1
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
msgstr "Navegación"
#: ../data/50-mutter-navigation.xml.in.h:2
#: data/50-mutter-navigation.xml:9
msgid "Move window to workspace 1"
msgstr "Mover la ventana al área de trabajo 1"
#: ../data/50-mutter-navigation.xml.in.h:3
#: data/50-mutter-navigation.xml:12
msgid "Move window to workspace 2"
msgstr "Mover la ventana al área de trabajo 2"
#: ../data/50-mutter-navigation.xml.in.h:4
#: data/50-mutter-navigation.xml:15
msgid "Move window to workspace 3"
msgstr "Mover la ventana al área de trabajo 3"
#: ../data/50-mutter-navigation.xml.in.h:5
#: data/50-mutter-navigation.xml:18
msgid "Move window to workspace 4"
msgstr "Mover la ventana al área de trabajo 4"
#: ../data/50-mutter-navigation.xml.in.h:6
#: data/50-mutter-navigation.xml:21
msgid "Move window to last workspace"
msgstr "Mover la ventana a la última área de trabajo"
#: ../data/50-mutter-navigation.xml.in.h:7
#: data/50-mutter-navigation.xml:24
msgid "Move window one workspace to the left"
msgstr "Mover la ventana un área de trabajo a la izquierda"
#: ../data/50-mutter-navigation.xml.in.h:8
#: data/50-mutter-navigation.xml:27
msgid "Move window one workspace to the right"
msgstr "Mover la ventana un área de trabajo a la derecha"
#: ../data/50-mutter-navigation.xml.in.h:9
#: data/50-mutter-navigation.xml:30
msgid "Move window one workspace up"
msgstr "Subir la ventana un área de trabajo"
#: ../data/50-mutter-navigation.xml.in.h:10
#: data/50-mutter-navigation.xml:33
msgid "Move window one workspace down"
msgstr "Bajar la ventana un área de trabajo"
#: ../data/50-mutter-navigation.xml.in.h:11
#: data/50-mutter-navigation.xml:36
msgid "Move window one monitor to the left"
msgstr "Mover la ventana una pantalla a la izquierda"
#: ../data/50-mutter-navigation.xml.in.h:12
#: data/50-mutter-navigation.xml:39
msgid "Move window one monitor to the right"
msgstr "Mover la ventana una pantalla a la derecha"
#: ../data/50-mutter-navigation.xml.in.h:13
#: data/50-mutter-navigation.xml:42
msgid "Move window one monitor up"
msgstr "Subir la ventana una pantalla"
#: ../data/50-mutter-navigation.xml.in.h:14
#: data/50-mutter-navigation.xml:45
msgid "Move window one monitor down"
msgstr "Bajar la ventana una pantalla"
#: ../data/50-mutter-navigation.xml.in.h:15
#: data/50-mutter-navigation.xml:49
msgid "Switch applications"
msgstr "Cambiar entre aplicaciones"
#: ../data/50-mutter-navigation.xml.in.h:16
#: data/50-mutter-navigation.xml:54
msgid "Switch to previous application"
msgstr "Cambiar a la aplicación anterior"
#: ../data/50-mutter-navigation.xml.in.h:17
#: data/50-mutter-navigation.xml:58
msgid "Switch windows"
msgstr "Cambiar entre ventanas"
#: ../data/50-mutter-navigation.xml.in.h:18
#: data/50-mutter-navigation.xml:63
msgid "Switch to previous window"
msgstr "Cambiar a la ventana anterior"
#: ../data/50-mutter-navigation.xml.in.h:19
#: data/50-mutter-navigation.xml:67
msgid "Switch windows of an application"
msgstr "Cambiar entre ventanas de una aplicación"
#: ../data/50-mutter-navigation.xml.in.h:20
#: data/50-mutter-navigation.xml:72
msgid "Switch to previous window of an application"
msgstr "Cambiar a la ventana anterior de una aplicación"
#: ../data/50-mutter-navigation.xml.in.h:21
#: data/50-mutter-navigation.xml:76
msgid "Switch system controls"
msgstr "Cambiar entre controles del sistema"
#: ../data/50-mutter-navigation.xml.in.h:22
#: data/50-mutter-navigation.xml:81
msgid "Switch to previous system control"
msgstr "Cambiar al control del sistema anterior"
#: ../data/50-mutter-navigation.xml.in.h:23
#: data/50-mutter-navigation.xml:85
msgid "Switch windows directly"
msgstr "Cambiar entre ventanas directamente"
#: ../data/50-mutter-navigation.xml.in.h:24
#: data/50-mutter-navigation.xml:90
msgid "Switch directly to previous window"
msgstr "Cambiar directamente a la ventana anterior"
#: ../data/50-mutter-navigation.xml.in.h:25
#: data/50-mutter-navigation.xml:94
msgid "Switch windows of an app directly"
msgstr "Cambiar entre ventanas de una aplicación directamente"
#: ../data/50-mutter-navigation.xml.in.h:26
#: data/50-mutter-navigation.xml:99
msgid "Switch directly to previous window of an app"
msgstr "Cambiar directamente a la ventana anterior de una aplicación"
#: ../data/50-mutter-navigation.xml.in.h:27
#: data/50-mutter-navigation.xml:103
msgid "Switch system controls directly"
msgstr "Cambiar entre controles del sistema directamente"
#: ../data/50-mutter-navigation.xml.in.h:28
#: data/50-mutter-navigation.xml:108
msgid "Switch directly to previous system control"
msgstr "Cambiar directamente al control del sistema anterior"
#: ../data/50-mutter-navigation.xml.in.h:29
#: data/50-mutter-navigation.xml:111
msgid "Hide all normal windows"
msgstr "Ocultar todas las ventanas normales"
#: ../data/50-mutter-navigation.xml.in.h:30
#: data/50-mutter-navigation.xml:114
msgid "Switch to workspace 1"
msgstr "Cambiar al área de trabajo 1"
#: ../data/50-mutter-navigation.xml.in.h:31
#: data/50-mutter-navigation.xml:117
msgid "Switch to workspace 2"
msgstr "Cambiar al área de trabajo 2"
#: ../data/50-mutter-navigation.xml.in.h:32
#: data/50-mutter-navigation.xml:120
msgid "Switch to workspace 3"
msgstr "Cambiar al área de trabajo 3"
#: ../data/50-mutter-navigation.xml.in.h:33
#: data/50-mutter-navigation.xml:123
msgid "Switch to workspace 4"
msgstr "Cambiar al área de trabajo 4"
#: ../data/50-mutter-navigation.xml.in.h:34
#: data/50-mutter-navigation.xml:126
msgid "Switch to last workspace"
msgstr "Cambiar a la útima área de trabajo"
#: ../data/50-mutter-navigation.xml.in.h:35
#: data/50-mutter-navigation.xml:129
msgid "Move to workspace left"
msgstr "Mover al área de trabajo de la izquierda"
#: ../data/50-mutter-navigation.xml.in.h:36
#: data/50-mutter-navigation.xml:132
msgid "Move to workspace right"
msgstr "Mover al área de trabajo de la derecha"
#: ../data/50-mutter-navigation.xml.in.h:37
#: data/50-mutter-navigation.xml:135
msgid "Move to workspace above"
msgstr "Mover al área de trabajo de la arriba"
#: ../data/50-mutter-navigation.xml.in.h:38
#: data/50-mutter-navigation.xml:138
msgid "Move to workspace below"
msgstr "Mover al área de trabajo de abajo"
#: ../data/50-mutter-system.xml.in.h:1
#: data/50-mutter-system.xml:6
msgid "System"
msgstr "Sistema"
#: ../data/50-mutter-system.xml.in.h:2
#: data/50-mutter-system.xml:8
msgid "Show the run command prompt"
msgstr "Mostrar el elemento «ejecutar comando»"
#: ../data/50-mutter-system.xml.in.h:3
#: data/50-mutter-system.xml:10
msgid "Show the activities overview"
msgstr "Mostrar la vista de actividades"
#: ../data/50-mutter-windows.xml.in.h:1
#: data/50-mutter-windows.xml:6
msgid "Windows"
msgstr "Ventanas"
#: ../data/50-mutter-windows.xml.in.h:2
#: data/50-mutter-windows.xml:8
msgid "Activate the window menu"
msgstr "Activar el menú de la ventana"
#: ../data/50-mutter-windows.xml.in.h:3
#: data/50-mutter-windows.xml:10
msgid "Toggle fullscreen mode"
msgstr "Cambiar el modo a pantalla completa"
#: ../data/50-mutter-windows.xml.in.h:4
#: data/50-mutter-windows.xml:12
msgid "Toggle maximization state"
msgstr "Cambiar el estado de maximización"
#: ../data/50-mutter-windows.xml.in.h:5
#: data/50-mutter-windows.xml:14
msgid "Maximize window"
msgstr "Maximizar la ventana"
#: ../data/50-mutter-windows.xml.in.h:6
#: data/50-mutter-windows.xml:16
msgid "Restore window"
msgstr "Restaurar la ventana"
#: ../data/50-mutter-windows.xml.in.h:7
#: data/50-mutter-windows.xml:18
msgid "Toggle shaded state"
msgstr "Cambiar el estado de enrollado"
#: ../data/50-mutter-windows.xml.in.h:8
#: data/50-mutter-windows.xml:20
msgid "Close window"
msgstr "Cerrar la ventana"
#: ../data/50-mutter-windows.xml.in.h:9
#: data/50-mutter-windows.xml:22
msgid "Hide window"
msgstr "Ocultar la ventana"
#: ../data/50-mutter-windows.xml.in.h:10
#: data/50-mutter-windows.xml:24
msgid "Move window"
msgstr "Mover la ventana"
#: ../data/50-mutter-windows.xml.in.h:11
#: data/50-mutter-windows.xml:26
msgid "Resize window"
msgstr "Redimensionar la ventana"
#: ../data/50-mutter-windows.xml.in.h:12
#: data/50-mutter-windows.xml:29
msgid "Toggle window on all workspaces or one"
msgstr "Conmutar la ventana en todas las áreas de trabajo o sólo en una"
#: ../data/50-mutter-windows.xml.in.h:13
#: data/50-mutter-windows.xml:31
msgid "Raise window if covered, otherwise lower it"
msgstr "Elevar la ventana si está cubierta, de lo contrario, bajarla"
#: ../data/50-mutter-windows.xml.in.h:14
#: data/50-mutter-windows.xml:33
msgid "Raise window above other windows"
msgstr "Elevar la ventana sobre las otras ventanas"
#: ../data/50-mutter-windows.xml.in.h:15
#: data/50-mutter-windows.xml:35
msgid "Lower window below other windows"
msgstr "Bajar la ventana por debajo de otras ventanas"
#: ../data/50-mutter-windows.xml.in.h:16
#: data/50-mutter-windows.xml:37
msgid "Maximize window vertically"
msgstr "Maximizar la ventana verticalmente"
#: ../data/50-mutter-windows.xml.in.h:17
#: data/50-mutter-windows.xml:39
msgid "Maximize window horizontally"
msgstr "Maximizar la ventana horizontalmente"
#: ../data/50-mutter-windows.xml.in.h:18
#: data/50-mutter-windows.xml:43
msgid "View split on left"
msgstr "Ver división a la izquierda"
#: ../data/50-mutter-windows.xml.in.h:19
#: data/50-mutter-windows.xml:47
msgid "View split on right"
msgstr "Ver división a la derecha"
#: ../data/mutter.desktop.in.h:1
#: data/mutter.desktop.in:4
msgid "Mutter"
msgstr "Mutter"
#: ../data/org.gnome.mutter.gschema.xml.in.h:1
#: data/org.gnome.mutter.gschema.xml.in:7
msgid "Modifier to use for extended window management operations"
msgstr ""
"Modificador que usar para extender las operaciones de gestión sobre ventanas"
#: ../data/org.gnome.mutter.gschema.xml.in.h:2
#: data/org.gnome.mutter.gschema.xml.in:8
#| msgid ""
#| "This key will initiate the \"overlay\", which is a combination window "
#| "overview and application launching system. The default is intended to be "
#| "the \"Windows key\" on PC hardware. It's expected that this binding "
#| "either the default or set to the empty string."
msgid ""
"This key will initiate the \"overlay\", which is a combination window "
"overview and application launching system. The default is intended to be the "
"\"Windows key\" on PC hardware. It's expected that this binding either the "
"default or set to the empty string."
"This key will initiate the overlay, which is a combination window overview "
"and application launching system. The default is intended to be the “Windows "
"key on PC hardware. Its expected that this binding either the default or "
"set to the empty string."
msgstr ""
"Esta clave iniciará el «revestimiento» («overlay»), que es una combinación "
"de vista general de la ventana y el sistema de lanzamiento de aplicaciones. "
@@ -287,11 +292,11 @@ msgstr ""
"esta combinación de tecla sea la predeterminada o se establezca a una cadena "
"vacía."
#: ../data/org.gnome.mutter.gschema.xml.in.h:3
#: data/org.gnome.mutter.gschema.xml.in:20
msgid "Attach modal dialogs"
msgstr "Adjuntar diálogos modales"
#: ../data/org.gnome.mutter.gschema.xml.in.h:4
#: data/org.gnome.mutter.gschema.xml.in:21
msgid ""
"When true, instead of having independent titlebars, modal dialogs appear "
"attached to the titlebar of the parent window and are moved together with "
@@ -301,13 +306,13 @@ msgstr ""
"aparecen diálogos modales adjuntos a la barra de título de la ventana padre "
"y se mueven junto con la ventana padre."
#: ../data/org.gnome.mutter.gschema.xml.in.h:5
#: data/org.gnome.mutter.gschema.xml.in:30
msgid "Enable edge tiling when dropping windows on screen edges"
msgstr ""
"Activar el mosaico en los bordes al arrastrar ventanas a los bordes de la "
"ventana"
#: ../data/org.gnome.mutter.gschema.xml.in.h:6
#: data/org.gnome.mutter.gschema.xml.in:31
msgid ""
"If enabled, dropping windows on vertical screen edges maximizes them "
"vertically and resizes them horizontally to cover half of the available "
@@ -318,13 +323,17 @@ msgstr ""
"mitad del área disponible. Arrastrar ventanas al borde superior de la "
"pantalla las maximiza por completo."
#: ../data/org.gnome.mutter.gschema.xml.in.h:7
#: data/org.gnome.mutter.gschema.xml.in:40
msgid "Workspaces are managed dynamically"
msgstr "Las áreas de trabajo se gestionan dinámicamente"
#: ../data/org.gnome.mutter.gschema.xml.in.h:8
#: data/org.gnome.mutter.gschema.xml.in:41
#| msgid ""
#| "Determines whether workspaces are managed dynamically or whether there's "
#| "a static number of workspaces (determined by the num-workspaces key in "
#| "org.gnome.desktop.wm.preferences)."
msgid ""
"Determines whether workspaces are managed dynamically or whether there's a "
"Determines whether workspaces are managed dynamically or whether theres a "
"static number of workspaces (determined by the num-workspaces key in org."
"gnome.desktop.wm.preferences)."
msgstr ""
@@ -332,11 +341,11 @@ msgstr ""
"número estático de áreas de trabajo (determinado por la clave «num-"
"workspaces» en «org.gnome.desktop.wm.preferences»)."
#: ../data/org.gnome.mutter.gschema.xml.in.h:9
#: data/org.gnome.mutter.gschema.xml.in:50
msgid "Workspaces only on primary"
msgstr "Áreas de trabajo sólo en el primario"
#: ../data/org.gnome.mutter.gschema.xml.in.h:10
#: data/org.gnome.mutter.gschema.xml.in:51
msgid ""
"Determines whether workspace switching should happen for windows on all "
"monitors or only for windows on the primary monitor."
@@ -344,11 +353,11 @@ msgstr ""
"Determina si el cambio entre áreas de trabajo debería suceder para las "
"ventanas en todos los monitores o sólo para ventanas en el monitor primario."
#: ../data/org.gnome.mutter.gschema.xml.in.h:11
#: data/org.gnome.mutter.gschema.xml.in:59
msgid "No tab popup"
msgstr "No hay pestaña emergente"
#: ../data/org.gnome.mutter.gschema.xml.in.h:12
#: data/org.gnome.mutter.gschema.xml.in:60
msgid ""
"Determines whether the use of popup and highlight frame should be disabled "
"for window cycling."
@@ -356,39 +365,47 @@ msgstr ""
"Determina si el uso de ventanas emergentes y marcos resaltados se debe "
"desactivar al cambiar entre ventanas."
#: ../data/org.gnome.mutter.gschema.xml.in.h:13
#: data/org.gnome.mutter.gschema.xml.in:68
msgid "Delay focus changes until the pointer stops moving"
msgstr "Retrasar el cambio de foco hasta detener el puntero"
#: ../data/org.gnome.mutter.gschema.xml.in.h:14
#: data/org.gnome.mutter.gschema.xml.in:69
#| msgid ""
#| "If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
#| "the focus will not be changed immediately when entering a window, but "
#| "only after the pointer stops moving."
msgid ""
"If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
"the focus will not be changed immediately when entering a window, but only "
"after the pointer stops moving."
"If set to true, and the focus mode is either sloppy or mouse then the "
"focus will not be changed immediately when entering a window, but only after "
"the pointer stops moving."
msgstr ""
"Si está establecido a «true» y el modo del foco es «sloppy» o «mouse» "
"entonces el foco no se cambiará inmediatamente al entrar en una ventana, "
"pero sí después de dejar quieto el puntero."
#: ../data/org.gnome.mutter.gschema.xml.in.h:15
#: data/org.gnome.mutter.gschema.xml.in:79
msgid "Draggable border width"
msgstr "Anchura arrastrable del borde"
#: ../data/org.gnome.mutter.gschema.xml.in.h:16
#: data/org.gnome.mutter.gschema.xml.in:80
#| msgid ""
#| "The amount of total draggable borders. If the theme's visible borders are "
#| "not enough, invisible borders will be added to meet this value."
msgid ""
"The amount of total draggable borders. If the theme's visible borders are "
"The amount of total draggable borders. If the themes visible borders are "
"not enough, invisible borders will be added to meet this value."
msgstr ""
"La cantidad total de borde arrastrable. Si los bordes visibles del tema no "
"son suficientes, se añadirán bordes invisibles para satisfacer este valor."
"La cantidad total de borde que se puede arrastrar. Si los bordes visibles "
"del tema no son suficientes, se añadirán bordes invisibles para satisfacer "
"este valor."
#: ../data/org.gnome.mutter.gschema.xml.in.h:17
#: data/org.gnome.mutter.gschema.xml.in:89
msgid "Auto maximize nearly monitor sized windows"
msgstr ""
"Maximizar automáticamente las ventanas que casi tengan el tamaño de la "
"pantalla"
#: ../data/org.gnome.mutter.gschema.xml.in.h:18
#: data/org.gnome.mutter.gschema.xml.in:90
msgid ""
"If enabled, new windows that are initially the size of the monitor "
"automatically get maximized."
@@ -396,11 +413,11 @@ msgstr ""
"Si está activada, las ventanas nuevas que inicialmente tienen el tamaño de "
"la pantalla, se maximizan."
#: ../data/org.gnome.mutter.gschema.xml.in.h:19
#: data/org.gnome.mutter.gschema.xml.in:98
msgid "Place new windows in the center"
msgstr "Colocar las ventanas nuevas en el centro"
#: ../data/org.gnome.mutter.gschema.xml.in.h:20
#: data/org.gnome.mutter.gschema.xml.in:99
msgid ""
"When true, the new windows will always be put in the center of the active "
"screen of the monitor."
@@ -408,116 +425,130 @@ msgstr ""
"Cuando es cierto, las ventanas nuevas se colocarán siempre en el centro de "
"la pantalla activa del monitor."
#: ../data/org.gnome.mutter.gschema.xml.in.h:21
#: data/org.gnome.mutter.gschema.xml.in:120
msgid "Select window from tab popup"
msgstr "Seleccionar ventana de la pestaña emergente"
#: ../data/org.gnome.mutter.gschema.xml.in.h:22
#: data/org.gnome.mutter.gschema.xml.in:125
msgid "Cancel tab popup"
msgstr "Cancelar pestaña emergente"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:1
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Cambiar al VT 1"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:2
#: data/org.gnome.mutter.wayland.gschema.xml.in:10
msgid "Switch to VT 2"
msgstr "Cambiar al VT 2"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:3
#: data/org.gnome.mutter.wayland.gschema.xml.in:14
msgid "Switch to VT 3"
msgstr "Cambiar al VT 3"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:4
#: data/org.gnome.mutter.wayland.gschema.xml.in:18
msgid "Switch to VT 4"
msgstr "Cambiar al VT 4"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:5
#: data/org.gnome.mutter.wayland.gschema.xml.in:22
msgid "Switch to VT 5"
msgstr "Cambiar al VT 5"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:6
#: data/org.gnome.mutter.wayland.gschema.xml.in:26
msgid "Switch to VT 6"
msgstr "Cambiar al VT 6"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:7
#: data/org.gnome.mutter.wayland.gschema.xml.in:30
msgid "Switch to VT 7"
msgstr "Cambiar al VT 7"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
#: data/org.gnome.mutter.wayland.gschema.xml.in:34
msgid "Switch to VT 8"
msgstr "Cambiar al VT 8"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
#: data/org.gnome.mutter.wayland.gschema.xml.in:38
msgid "Switch to VT 9"
msgstr "Cambiar al VT 9"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
#: data/org.gnome.mutter.wayland.gschema.xml.in:42
msgid "Switch to VT 10"
msgstr "Cambiar al VT 10"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
#: data/org.gnome.mutter.wayland.gschema.xml.in:46
msgid "Switch to VT 11"
msgstr "Cambiar al VT 11"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
#: data/org.gnome.mutter.wayland.gschema.xml.in:50
msgid "Switch to VT 12"
msgstr "Cambiar al VT 12"
#: ../src/backends/meta-input-settings.c:1605
#| msgid "Switch system controls"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1759
#, c-format
#| msgid "Mode Switch: Mode %d"
msgid "Mode Switch (Group %d)"
msgstr "Cambiar modo (grupo %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1781
msgid "Switch monitor"
msgstr "Cambiar monitor"
#: ../src/backends/meta-input-settings.c:1607
#: src/backends/meta-input-settings.c:1783
msgid "Show on-screen help"
msgstr "Mostrar la ayuda en pantalla"
#: ../src/backends/meta-monitor-manager.c:515
#: src/backends/meta-monitor-manager.c:675
msgid "Built-in display"
msgstr "Pantalla integrada"
#: ../src/backends/meta-monitor-manager.c:538
#: src/backends/meta-monitor-manager.c:698
msgid "Unknown"
msgstr "Desconocida"
#: ../src/backends/meta-monitor-manager.c:540
#: src/backends/meta-monitor-manager.c:700
msgid "Unknown Display"
msgstr "Pantalla desconocida"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: ../src/backends/meta-monitor-manager.c:548
#: src/backends/meta-monitor-manager.c:708
#, c-format
msgid "%s %s"
msgstr "%s %s"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: ../src/compositor/compositor.c:463
#: src/compositor/compositor.c:471
#, c-format
#| msgid ""
#| "Another compositing manager is already running on screen %i on display "
#| "\"%s\"."
msgid ""
"Another compositing manager is already running on screen %i on display \"%s"
"\"."
"Another compositing manager is already running on screen %i on display “%s”."
msgstr ""
"Ya existe un gestor de composición ejecutándose en la monitor %i, pantalla "
"«%s»."
#: ../src/core/bell.c:194
#: src/core/bell.c:194
msgid "Bell event"
msgstr "Evento de campana"
#: ../src/core/delete.c:127
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "«%s» no está respondiendo."
#: ../src/core/delete.c:129
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "La aplicación no está respondiendo."
#: ../src/core/delete.c:134
#: src/core/delete.c:134
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
@@ -525,115 +556,130 @@ msgstr ""
"Puede elegir esperar un rato para ver si continua o forzar la aplicación "
"para cerrarla completamente."
#: ../src/core/delete.c:141
msgid "_Wait"
msgstr "_Esperar"
#: ../src/core/delete.c:141
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Forzar la salida"
#: ../src/core/display.c:590
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Esperar"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display '%s'\n"
#| msgid "Failed to open X Window System display '%s'\n"
msgid "Failed to open X Window System display “%s”\n"
msgstr "Ocurrió un error al abrir la pantalla de X Window System «%s»\n"
#: ../src/core/main.c:182
#: src/core/main.c:189
msgid "Disable connection to session manager"
msgstr "Desactivar conexión al gestor de sesión"
#: ../src/core/main.c:188
#: src/core/main.c:195
msgid "Replace the running window manager"
msgstr "Reemplazar el gestor de ventanas en ejecución"
#: ../src/core/main.c:194
#: src/core/main.c:201
msgid "Specify session management ID"
msgstr "Especificar el ID se gestión de sesión"
#: ../src/core/main.c:199
#: src/core/main.c:206
msgid "X Display to use"
msgstr "Pantalla X que usar"
#: ../src/core/main.c:205
#: src/core/main.c:212
msgid "Initialize session from savefile"
msgstr "Inicializar sesión desde el archivo de salvaguarda"
#: ../src/core/main.c:211
#: src/core/main.c:218
msgid "Make X calls synchronous"
msgstr "Hacer que las llamadas a las X sean síncronas"
#: ../src/core/main.c:218
#: src/core/main.c:225
msgid "Run as a wayland compositor"
msgstr "Ejecutar como compositor Wayland"
#: ../src/core/main.c:224
#: src/core/main.c:231
msgid "Run as a nested compositor"
msgstr "Ejecutar como compositor anidado"
#: ../src/core/main.c:232
#: src/core/main.c:239
msgid "Run as a full display server, rather than nested"
msgstr "Ejecutar como servidor completo, en lugar de anidado"
#: ../src/core/mutter.c:39
#: src/core/mutter.c:39
#, c-format
#| msgid ""
#| "mutter %s\n"
#| "Copyright (C) 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
#| "This is free software; see the source for copying conditions.\n"
#| "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A "
#| "PARTICULAR PURPOSE.\n"
msgid ""
"mutter %s\n"
"Copyright (C) 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"This is free software; see the source for copying conditions.\n"
"There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A "
"PARTICULAR PURPOSE.\n"
msgstr ""
"muttery %s\n"
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., y otros\n"
"Este programa es software libre; vea el código fuente para obtener las\n"
"condiciones de copia. NO se proporciona ninguna garantía; ni de\n"
"MERCANTILIDAD O DE IDONEIDAD PARA UN PROPÓSITO PARTICULAR.\n"
"Este programa es software libre; vea el código fuente para obtener las "
"condiciones de copia.\n"
"NO se proporciona ninguna garantía; ni de MERCANTILIDAD O DE IDONEIDAD PARA "
"UN PROPÓSITO PARTICULAR.\n"
#: ../src/core/mutter.c:53
#: src/core/mutter.c:53
msgid "Print version"
msgstr "Imprimir versión"
#: ../src/core/mutter.c:59
#: src/core/mutter.c:59
msgid "Mutter plugin to use"
msgstr "Complemento de mutter que usar"
#: ../src/core/prefs.c:1997
#: src/core/prefs.c:1997
#, c-format
msgid "Workspace %d"
msgstr "Área de trabajo %d"
#: ../src/core/screen.c:521
#: src/core/screen.c:580
#, c-format
#| msgid ""
#| "Display \"%s\" already has a window manager; try using the --replace "
#| "option to replace the current window manager."
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
"to replace the current window manager."
"Display “%s” already has a window manager; try using the --replace option to "
"replace the current window manager."
msgstr ""
"La pantalla «%s» ya tiene un gestor de ventanas; pruebe a usar la opción «--"
"replace» para reemplazar el gestor de ventanas activo."
#: ../src/core/screen.c:606
#: src/core/screen.c:665
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
#| msgid "Screen %d on display '%s' is invalid\n"
msgid "Screen %d on display “%s” is invalid\n"
msgstr "La ventana %d en la pantalla «%s» no es válida\n"
#: ../src/core/util.c:120
#: src/core/util.c:120
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter fue compilado sin soporte para modo prolijo\n"
#: ../src/wayland/meta-wayland-tablet-pad.c:595
#: src/wayland/meta-wayland-tablet-pad.c:563
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "Cambiar modo: modo %d"
#: ../src/x11/session.c:1815
#: src/x11/session.c:1815
#| msgid ""
#| "These windows do not support &quot;save current setup&quot; and will have "
#| "to be restarted manually next time you log in."
msgid ""
"These windows do not support &quot;save current setup&quot; and will have to "
"be restarted manually next time you log in."
"These windows do not support save current setup and will have to be "
"restarted manually next time you log in."
msgstr ""
"Estas ventanas no soportan «guardar la configuración actual» y tendrán que "
"reiniciarse manualmente la próxima vez que inicie una sesión."
#: ../src/x11/window-props.c:548
#: src/x11/window-props.c:559
#, c-format
msgid "%s (on %s)"
msgstr "%s (on %s)"

175
po/eu.po
View File

@@ -2,24 +2,23 @@
# This file is distributed under the same license as the PACKAGE package.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
#
#
# Hizkuntza Politikarako Sailburuordetza <hizpol@ej-gv.es>, 2004.
# Iñaki Larrañaga Murgoitio <dooteo@zundan.com>, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011.
# Iñaki Larrañaga Murgoitio <dooteo@zundan.com>, 2012, 2013, 2014, 2015, 2016.
# Iñaki Larrañaga Murgoitio <dooteo@zundan.com>, 2012, 2013, 2014, 2015, 2016, 2017.
msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=mutter"
"&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2016-09-07 09:27+0000\n"
"PO-Revision-Date: 2016-09-18 19:02+0100\n"
"Last-Translator: dooteo <dooteo@zundan.com>\n"
"Language-Team: Basque <librezale@librezale.org>\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-02-16 01:44+0000\n"
"PO-Revision-Date: 2017-02-16 22:07+0100\n"
"Last-Translator: Iñaki Larrañaga Murgoitio <dooteo@zundan.com>\n"
"Language-Team: Basque <librezale@librezale.eus>\n"
"Language: eu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Lokalize 2.0\n"
"X-Generator: Lokalize 1.5\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: data/50-mutter-navigation.xml:6
@@ -271,16 +270,21 @@ msgid "Modifier to use for extended window management operations"
msgstr "Aldatzailea leihoak kudeatzeko eragiketa hedatuetan erabiltzeko"
#: data/org.gnome.mutter.gschema.xml.in:8
#| msgid ""
#| "This key will initiate the \"overlay\", which is a combination window "
#| "overview and application launching system. The default is intended to be "
#| "the \"Windows key\" on PC hardware. It's expected that this binding "
#| "either the default or set to the empty string."
msgid ""
"This key will initiate the \"overlay\", which is a combination window "
"overview and application launching system. The default is intended to be the "
"\"Windows key\" on PC hardware. It's expected that this binding either the "
"default or set to the empty string."
"This key will initiate the overlay, which is a combination window overview "
"and application launching system. The default is intended to be the “Windows "
"key on PC hardware. Its expected that this binding either the default or "
"set to the empty string."
msgstr ""
"Gako honek \"overlay\" (gainjarria) hasieratuko du: hau leihoaren ikuspegi "
"Gako honek overlay (gainjarria) hasieratuko du: hau leihoaren ikuspegi "
"orokorraren eta aplikazioa abiarazteko sistemaren arteko konbinazioa da. "
"Lehenetsi gisa, PC ordenagailuko \"Windows tekla\" da. Tekla konbinazio hau "
"lehenetsia izatea edo kate hutz gisa ezartzea da."
"Lehenetsi gisa, PC ordenagailuko Windows tekla da. Tekla konbinazio hau "
"lehenetsia izatea edo kate huts gisa ezartzea da."
#: data/org.gnome.mutter.gschema.xml.in:20
msgid "Attach modal dialogs"
@@ -316,13 +320,17 @@ msgid "Workspaces are managed dynamically"
msgstr "Laneko areak dinamikoki kudeatzen dira"
#: data/org.gnome.mutter.gschema.xml.in:41
#| msgid ""
#| "Determines whether workspaces are managed dynamically or whether there's "
#| "a static number of workspaces (determined by the num-workspaces key in "
#| "org.gnome.desktop.wm.preferences)."
msgid ""
"Determines whether workspaces are managed dynamically or whether there's a "
"Determines whether workspaces are managed dynamically or whether theres a "
"static number of workspaces (determined by the num-workspaces key in org."
"gnome.desktop.wm.preferences)."
msgstr ""
"Laneko areak dinamikoki kudeatzen diren edo laneko areak kopuru estatikoa "
"('org.gnome.desktop.wm.preferences'-eko 'num-workspaces' gakoak zehazten du) "
"(org.gnome.desktop.wm.preferences-eko num-workspaces gakoak zehazten du) "
"daukan zehazten du ."
#: data/org.gnome.mutter.gschema.xml.in:50
@@ -354,12 +362,16 @@ msgid "Delay focus changes until the pointer stops moving"
msgstr "Atzeratu fokuaren aldaketa erakuslea mugitzeari utzi arte"
#: data/org.gnome.mutter.gschema.xml.in:69
#| msgid ""
#| "If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
#| "the focus will not be changed immediately when entering a window, but "
#| "only after the pointer stops moving."
msgid ""
"If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
"the focus will not be changed immediately when entering a window, but only "
"after the pointer stops moving."
"If set to true, and the focus mode is either sloppy or mouse then the "
"focus will not be changed immediately when entering a window, but only after "
"the pointer stops moving."
msgstr ""
"TRUE (egia) gisa ezartzen bada, eta fokuaren modua 'sloppy' edo 'mouse' "
"TRUE (egia) gisa ezartzen bada, eta fokuaren modua sloppy edo mouse "
"bada, fokua ez da berehala aldatuko leiho batean sartzean baizik eta soilik "
"erakuslea gelditzean."
@@ -368,8 +380,11 @@ msgid "Draggable border width"
msgstr "Ertz arrastragarriaren zabalera"
#: data/org.gnome.mutter.gschema.xml.in:80
#| msgid ""
#| "The amount of total draggable borders. If the theme's visible borders are "
#| "not enough, invisible borders will be added to meet this value."
msgid ""
"The amount of total draggable borders. If the theme's visible borders are "
"The amount of total draggable borders. If the themes visible borders are "
"not enough, invisible borders will be added to meet this value."
msgstr ""
"Ertz arrastragarri guztien kopurua. Gaiaren ertz ikusgaiak ez badira "
@@ -455,50 +470,64 @@ msgstr "Aldatu 11. TBra"
msgid "Switch to VT 12"
msgstr "Aldatu 12. TBra"
#: src/backends/meta-input-settings.c:1707
#| msgid "Switch system controls"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1759
#, c-format
#| msgid "Mode Switch: Mode %d"
msgid "Mode Switch (Group %d)"
msgstr "Modu aldaketa (%d taldea)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1781
msgid "Switch monitor"
msgstr "Aldatu monitorea"
#: src/backends/meta-input-settings.c:1709
#: src/backends/meta-input-settings.c:1783
msgid "Show on-screen help"
msgstr "Erakutsi pantailako laguntza"
#: src/backends/meta-monitor-manager.c:514
#: src/backends/meta-monitor-manager.c:675
msgid "Built-in display"
msgstr "Bertako pantaila"
#: src/backends/meta-monitor-manager.c:537
#: src/backends/meta-monitor-manager.c:698
msgid "Unknown"
msgstr "Ezezaguna"
#: src/backends/meta-monitor-manager.c:539
#: src/backends/meta-monitor-manager.c:700
msgid "Unknown Display"
msgstr "Pantaila ezezaguna"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:547
#: src/backends/meta-monitor-manager.c:708
#, c-format
msgid "%s %s"
msgstr "%s %s"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: src/compositor/compositor.c:463
#: src/compositor/compositor.c:471
#, c-format
#| msgid ""
#| "Another compositing manager is already running on screen %i on display "
#| "\"%s\"."
msgid ""
"Another compositing manager is already running on screen %i on display \"%s"
"\"."
"Another compositing manager is already running on screen %i on display “%s”."
msgstr ""
"Dagoeneko beste konposatze-kudeatzailea ari da exekutatzen \"%2$s\" "
"pantailako %1$i. monitorean \"."
"Dagoeneko beste konposatze-kudeatzailea ari da exekutatzen %2$s "
"pantailako %1$i. monitorean."
#: src/core/bell.c:194
msgid "Bell event"
msgstr "Soinuaren gertaera"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
@@ -516,66 +545,73 @@ msgstr ""
"Aukeratu piskatean zai egotea aplikazioak jarraitzeko edo derrigortu "
"aplikazioa erabat ixtea."
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Itxaron"
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Behartu ixtera"
#: src/core/display.c:590
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "Huts egin du X Window sistemaren '%s' pantaila irekitzean\n"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Itxaron"
#: src/core/main.c:182
#: src/core/display.c:608
#, c-format
#| msgid "Failed to open X Window System display '%s'\n"
msgid "Failed to open X Window System display “%s”\n"
msgstr "Huts egin du X Window sistemaren “%s“ pantaila irekitzean\n"
#: src/core/main.c:189
msgid "Disable connection to session manager"
msgstr "Desgaitu saio-kudeatzailearen konexioa"
#: src/core/main.c:188
#: src/core/main.c:195
msgid "Replace the running window manager"
msgstr "Ordeztu exekutatzen dagoen leiho-kudeatzailea"
#: src/core/main.c:194
#: src/core/main.c:201
msgid "Specify session management ID"
msgstr "Zehaztu saio-kudeatzailearen IDa"
#: src/core/main.c:199
#: src/core/main.c:206
msgid "X Display to use"
msgstr "X pantaila erabiltzeko"
#: src/core/main.c:205
#: src/core/main.c:212
msgid "Initialize session from savefile"
msgstr "Hasieratu saioa babes-fitxategitik"
#: src/core/main.c:211
#: src/core/main.c:218
msgid "Make X calls synchronous"
msgstr "Egin X deiak sinkronoak izatea"
#: src/core/main.c:218
#: src/core/main.c:225
msgid "Run as a wayland compositor"
msgstr "Exekutatu wayland konposatzaile gisa"
#: src/core/main.c:224
#: src/core/main.c:231
msgid "Run as a nested compositor"
msgstr "Exekutatu habiaratutako konposatzaile gisa"
#: src/core/main.c:232
#: src/core/main.c:239
msgid "Run as a full display server, rather than nested"
msgstr "Exekutatu pantaila-zerbitzari oso bezala, habiaratuta baino"
#: src/core/mutter.c:39
#, c-format
#| msgid ""
#| "mutter %s\n"
#| "Copyright (C) 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
#| "This is free software; see the source for copying conditions.\n"
#| "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A "
#| "PARTICULAR PURPOSE.\n"
msgid ""
"mutter %s\n"
"Copyright (C) 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"This is free software; see the source for copying conditions.\n"
"There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A "
"PARTICULAR PURPOSE.\n"
msgstr ""
"mutter %s\n"
"Copyright-a (C) 2001-%d Havoc Pennington, Red Hat, Inc., eta beste batzuk\n"
"Copyright-a © 2001-%d Havoc Pennington, Red Hat, Inc., eta beste batzuk\n"
"Hau software librea da; ikus kopiatzeko baldintzak iturburu-kodean.\n"
"EZ du bermerik; ezta MERKATURATZEKO edo XEDE JAKIN BATERAKO EGOKITASUNAREN "
"BERMERIK ERE.\n"
@@ -593,38 +629,45 @@ msgstr "Mutter-en osagaia erabiltzeko"
msgid "Workspace %d"
msgstr "%d. laneko area"
#: src/core/screen.c:521
#: src/core/screen.c:580
#, c-format
#| msgid ""
#| "Display \"%s\" already has a window manager; try using the --replace "
#| "option to replace the current window manager."
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
"to replace the current window manager."
"Display “%s” already has a window manager; try using the --replace option to "
"replace the current window manager."
msgstr ""
"'%s' pantailak badu leiho-kudeatzailea; erabili --replace aukera uneko leiho-"
"%s pantailak badu leiho-kudeatzailea; erabili --replace aukera uneko leiho-"
"kudeatzailea ordezteko."
#: src/core/screen.c:606
#: src/core/screen.c:665
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgstr "'%2$s' bistaratzeko %1$d pantaila ez da baliozkoa\n"
#| msgid "Screen %d on display '%s' is invalid\n"
msgid "Screen %d on display “%s” is invalid\n"
msgstr "“%2$s“ bistaratzeko %1$d pantaila ez da baliozkoa\n"
#: src/core/util.c:120
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter modu xehatuaren euskarririk gabe konpilatu da\n"
#: src/wayland/meta-wayland-tablet-pad.c:595
#: src/wayland/meta-wayland-tablet-pad.c:563
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "Modu aldaketa: %d modua"
#: src/x11/session.c:1815
#| msgid ""
#| "These windows do not support &quot;save current setup&quot; and will have "
#| "to be restarted manually next time you log in."
msgid ""
"These windows do not support &quot;save current setup&quot; and will have to "
"be restarted manually next time you log in."
"These windows do not support save current setup and will have to be "
"restarted manually next time you log in."
msgstr ""
"Leiho hauek ez dute onartzen &quot;gorde uneko konfigurazioa&quot; eta eskuz "
"Leiho hauek ez dute onartzen gorde uneko konfigurazioa; eta eskuz "
"berrabiarazi beharko dituzu hurrengo saioa hasten duzunean."
#: src/x11/window-props.c:548
#: src/x11/window-props.c:559
#, c-format
msgid "%s (on %s)"
msgstr "%s (%s)"

105
po/fr.po
View File

@@ -1,5 +1,5 @@
# French translation of mutter.
# Copyright (C) 2002-2016 Free Software Foundation, Inc.
# Copyright (C) 2002-2017 Free Software Foundation, Inc.
# This file is distributed under the same license as the metacity package.
#
# Christophe Fergeau <teuf@users.sourceforge.net>, 2002.
@@ -11,7 +11,7 @@
# Cyprien Le Pannérer <cyplp@free.fr>, 2006.
# Robert-André Mauchin <zebob.m@gmail.com>, 2007.
# Stéphane Raimbault <stephane.raimbault@gmail.com>, 2007.
# Claude Paroz <claude@2xlibre.net>, 2008-2016.
# Claude Paroz <claude@2xlibre.net>, 2008-2017.
# Bruno Brouard <annoa.b@gmail.com>, 2011-12.
# Charles Monzat <superboa@hotmail.fr>, 2016.
msgid ""
@@ -19,15 +19,14 @@ msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2016-09-12 23:59+0000\n"
"PO-Revision-Date: 2016-09-13 12:13+0200\n"
"Last-Translator: Charles Monzat <superboa@hotmail.fr>\n"
"POT-Creation-Date: 2017-02-16 01:44+0000\n"
"PO-Revision-Date: 2017-02-17 21:09+0100\n"
"Last-Translator: Claude Paroz <claude@2xlibre.net>\n"
"Language-Team: GNOME French Team <gnomefr@traduc.org>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.9\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@@ -280,10 +279,10 @@ msgstr "Touche à utiliser pour les opérations étendues de gestion des fenêtr
#: data/org.gnome.mutter.gschema.xml.in:8
msgid ""
"This key will initiate the \"overlay\", which is a combination window "
"overview and application launching system. The default is intended to be the "
"\"Windows key\" on PC hardware. It's expected that this binding either the "
"default or set to the empty string."
"This key will initiate the overlay, which is a combination window overview "
"and application launching system. The default is intended to be the “Windows "
"key on PC hardware. Its expected that this binding either the default or "
"set to the empty string."
msgstr ""
"Cette touche initie l'« overlay », une combinaison d'aperçu des fenêtres et "
"d'un système de lancement d'applications. La touche par défaut sur le "
@@ -325,7 +324,7 @@ msgstr "Les espaces de travail sont gérés de manière dynamique"
#: data/org.gnome.mutter.gschema.xml.in:41
msgid ""
"Determines whether workspaces are managed dynamically or whether there's a "
"Determines whether workspaces are managed dynamically or whether theres a "
"static number of workspaces (determined by the num-workspaces key in org."
"gnome.desktop.wm.preferences)."
msgstr ""
@@ -364,9 +363,9 @@ msgstr "Attend l'arrêt du pointeur avant le changement de focus"
#: data/org.gnome.mutter.gschema.xml.in:69
msgid ""
"If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
"the focus will not be changed immediately when entering a window, but only "
"after the pointer stops moving."
"If set to true, and the focus mode is either sloppy or mouse then the "
"focus will not be changed immediately when entering a window, but only after "
"the pointer stops moving."
msgstr ""
"Si défini à true et que le mode de focus est soit « sloppy » ou « souris », "
"alors le focus ne sera pas changé immédiatement en passant sur une fenêtre, "
@@ -378,7 +377,7 @@ msgstr "Largeur de bordure ajustable"
#: data/org.gnome.mutter.gschema.xml.in:80
msgid ""
"The amount of total draggable borders. If the theme's visible borders are "
"The amount of total draggable borders. If the themes visible borders are "
"not enough, invisible borders will be added to meet this value."
msgstr ""
"La taille totale des bordures que l'on peut déplacer. Si les bordures "
@@ -469,44 +468,51 @@ msgstr "Passer à l'émulateur de terminal 11"
msgid "Switch to VT 12"
msgstr "Passer à l'émulateur de terminal 12"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1759
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Changement de mode (groupe %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1845
#: src/backends/meta-input-settings.c:1781
msgid "Switch monitor"
msgstr "Changer de moniteur"
#: src/backends/meta-input-settings.c:1847
#: src/backends/meta-input-settings.c:1783
msgid "Show on-screen help"
msgstr "Afficher l'aide à l'écran"
#: src/backends/meta-monitor-manager.c:514
#: src/backends/meta-monitor-manager.c:675
msgid "Built-in display"
msgstr "Affichage intégré"
#: src/backends/meta-monitor-manager.c:537
#: src/backends/meta-monitor-manager.c:698
msgid "Unknown"
msgstr "Inconnu"
#: src/backends/meta-monitor-manager.c:539
#: src/backends/meta-monitor-manager.c:700
msgid "Unknown Display"
msgstr "Affichage inconnu"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:547
#: src/backends/meta-monitor-manager.c:708
#, c-format
msgid "%s %s"
msgstr "%s %s"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: src/compositor/compositor.c:463
#: src/compositor/compositor.c:471
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display \"%s"
"\"."
"Another compositing manager is already running on screen %i on display “%s”."
msgstr ""
"Un autre gestionnaire de composition est déjà lancé sur l'écran %i de "
"l'affichage « %s »."
@@ -515,6 +521,7 @@ msgstr ""
msgid "Bell event"
msgstr "Évènement sonore"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
@@ -532,52 +539,52 @@ msgstr ""
"Vous pouvez patienter un instant pour continuer ou forcer l'application à "
"quitter définitivement."
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Attendre"
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Forcer à quitter"
#: src/core/display.c:590
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Attendre"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgid "Failed to open X Window System display %s\n"
msgstr "Impossible d'ouvrir l'affichage « %s » du système X Window\n"
#: src/core/main.c:182
#: src/core/main.c:189
msgid "Disable connection to session manager"
msgstr "Désactiver la connexion au gestionnaire de sessions"
#: src/core/main.c:188
#: src/core/main.c:195
msgid "Replace the running window manager"
msgstr "Remplacer le gestionnaire de fenêtres en cours de fonctionnement"
#: src/core/main.c:194
#: src/core/main.c:201
msgid "Specify session management ID"
msgstr "Indiquer l'ID de gestion de sessions"
#: src/core/main.c:199
#: src/core/main.c:206
msgid "X Display to use"
msgstr "Affichage X à utiliser"
#: src/core/main.c:205
#: src/core/main.c:212
msgid "Initialize session from savefile"
msgstr "Initialiser la session depuis le fichier de sauvegarde"
#: src/core/main.c:211
#: src/core/main.c:218
msgid "Make X calls synchronous"
msgstr "Rendre synchrones les appels à X"
#: src/core/main.c:218
#: src/core/main.c:225
msgid "Run as a wayland compositor"
msgstr "Lancer comme un compositeur wayland"
#: src/core/main.c:224
#: src/core/main.c:231
msgid "Run as a nested compositor"
msgstr "Lancer comme un compositeur imbriqué"
#: src/core/main.c:232
#: src/core/main.c:239
msgid "Run as a full display server, rather than nested"
msgstr "Lancer comme un serveur d'affichage complet, plutôt qu'imbriqué"
@@ -585,7 +592,7 @@ msgstr "Lancer comme un serveur d'affichage complet, plutôt qu'imbriqué"
#, c-format
msgid ""
"mutter %s\n"
"Copyright (C) 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"This is free software; see the source for copying conditions.\n"
"There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A "
"PARTICULAR PURPOSE.\n"
@@ -610,39 +617,39 @@ msgstr "Greffon de Mutter à utiliser"
msgid "Workspace %d"
msgstr "Espace de travail %d"
#: src/core/screen.c:521
#: src/core/screen.c:580
#, c-format
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
"to replace the current window manager."
"Display “%s” already has a window manager; try using the --replace option to "
"replace the current window manager."
msgstr ""
"L'affichage « %s » a déjà un gestionnaire de fenêtres ; essayez d'utiliser "
"l'option --replace pour remplacer le gestionnaire de fenêtres actuel."
#: src/core/screen.c:606
#: src/core/screen.c:665
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgid "Screen %d on display %s is invalid\n"
msgstr "L'écran %d sur l'affichage « %s » n'est pas valide\n"
#: src/core/util.c:120
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter a été compilé sans la prise en charge du mode bavard\n"
#: src/wayland/meta-wayland-tablet-pad.c:595
#: src/wayland/meta-wayland-tablet-pad.c:563
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "Changement de mode : mode %d"
#: src/x11/session.c:1815
msgid ""
"These windows do not support &quot;save current setup&quot; and will have to "
"be restarted manually next time you log in."
"These windows do not support save current setup and will have to be "
"restarted manually next time you log in."
msgstr ""
"Ces fenêtres ne prennent pas en charge « l'enregistrement de la "
"configuration actuelle » et devront être redémarrées manuellement à la "
"prochaine connexion."
#: src/x11/window-props.c:548
#: src/x11/window-props.c:559
#, c-format
msgid "%s (on %s)"
msgstr "%s (sur %s)"

383
po/id.po
View File

@@ -11,17 +11,257 @@ msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2016-08-19 21:04+0000\n"
"PO-Revision-Date: 2016-08-22 17:38+0700\n"
"POT-Creation-Date: 2017-02-16 01:44+0000\n"
"PO-Revision-Date: 2017-02-20 13:44+0700\n"
"Last-Translator: Andika Triwidada <andika@gmail.com>\n"
"Language-Team: Indonesian <gnome-l10n-id@googlegroups.com>\n"
"Language: id\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.8\n"
"X-Generator: Poedit 1.6.10\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
msgstr "Navigasi"
#: data/50-mutter-navigation.xml:9
msgid "Move window to workspace 1"
msgstr "Pindahkan jendela ke ruang kerja 1"
#: data/50-mutter-navigation.xml:12
msgid "Move window to workspace 2"
msgstr "Pindahkan jendela ke ruang kerja 2"
#: data/50-mutter-navigation.xml:15
msgid "Move window to workspace 3"
msgstr "Pindahkan jendela ke ruang kerja 3"
#: data/50-mutter-navigation.xml:18
msgid "Move window to workspace 4"
msgstr "Pindahkan jendela ke ruang kerja 4"
#: data/50-mutter-navigation.xml:21
msgid "Move window to last workspace"
msgstr "Pindahkan jendela ke ruang kerja terakhir"
#: data/50-mutter-navigation.xml:24
msgid "Move window one workspace to the left"
msgstr "Pindahkan jendela satu ruang kerja ke kiri"
#: data/50-mutter-navigation.xml:27
msgid "Move window one workspace to the right"
msgstr "Pindahkan jendela satu ruang kerja ke kanan"
#: data/50-mutter-navigation.xml:30
msgid "Move window one workspace up"
msgstr "Pindahkan jendela satu ruang kerja ke atas"
#: data/50-mutter-navigation.xml:33
msgid "Move window one workspace down"
msgstr "Pindahkan jendela satu ruang kerja ke bawah"
#: data/50-mutter-navigation.xml:36
msgid "Move window one monitor to the left"
msgstr "Pindahkan jendela satu monitor ke kiri"
#: data/50-mutter-navigation.xml:39
msgid "Move window one monitor to the right"
msgstr "Pindahkan jendela satu monitor ke kanan"
#: data/50-mutter-navigation.xml:42
msgid "Move window one monitor up"
msgstr "Pindahkan jendela satu monitor ke atas"
#: data/50-mutter-navigation.xml:45
msgid "Move window one monitor down"
msgstr "Pindahkan jendela satu monitor ke bawah"
#: data/50-mutter-navigation.xml:49
msgid "Switch applications"
msgstr "Bertukar aplikasi"
#: data/50-mutter-navigation.xml:54
msgid "Switch to previous application"
msgstr "Bertukar ke aplikasi sebelumnya"
#: data/50-mutter-navigation.xml:58
msgid "Switch windows"
msgstr "Bertukar jendela"
#: data/50-mutter-navigation.xml:63
msgid "Switch to previous window"
msgstr "Bertukar ke jendela sebelumnya"
#: data/50-mutter-navigation.xml:67
msgid "Switch windows of an application"
msgstr "Bertukar jendela dari suatu aplikasi"
#: data/50-mutter-navigation.xml:72
msgid "Switch to previous window of an application"
msgstr "Bertukar ke jendela aplikasi sebelumnya"
#: data/50-mutter-navigation.xml:76
msgid "Switch system controls"
msgstr "Bertukar kendali sistem"
#: data/50-mutter-navigation.xml:81
msgid "Switch to previous system control"
msgstr "Bertukar ke kendali sistem sebelumnya"
#: data/50-mutter-navigation.xml:85
msgid "Switch windows directly"
msgstr "Bertukar jendela secara langsung"
#: data/50-mutter-navigation.xml:90
msgid "Switch directly to previous window"
msgstr "Bertukar secara langsung ke jendela sebelumnya"
#: data/50-mutter-navigation.xml:94
msgid "Switch windows of an app directly"
msgstr "Bertukar jendela dari suatu app secara langsung"
#: data/50-mutter-navigation.xml:99
msgid "Switch directly to previous window of an app"
msgstr "Bertukar secara langsung ke jendela sebelumnya dari suatu app"
#: data/50-mutter-navigation.xml:103
msgid "Switch system controls directly"
msgstr "Bertukar kendali sistem secara langsung"
#: data/50-mutter-navigation.xml:108
msgid "Switch directly to previous system control"
msgstr "Bertukar secara langsung ke kendali sistem sebelumnya"
#: data/50-mutter-navigation.xml:111
msgid "Hide all normal windows"
msgstr "Sembunyikan semua jendela normal"
#: data/50-mutter-navigation.xml:114
msgid "Switch to workspace 1"
msgstr "Bertukar ke ruang kerja 1"
#: data/50-mutter-navigation.xml:117
msgid "Switch to workspace 2"
msgstr "Bertukar ke ruang kerja 2"
#: data/50-mutter-navigation.xml:120
msgid "Switch to workspace 3"
msgstr "Bertukar ke ruang kerja 3"
#: data/50-mutter-navigation.xml:123
msgid "Switch to workspace 4"
msgstr "Bertukar ke ruang kerja 4"
#: data/50-mutter-navigation.xml:126
msgid "Switch to last workspace"
msgstr "Bertukar ke ruang kerja terakhir"
#: data/50-mutter-navigation.xml:129
msgid "Move to workspace left"
msgstr "Pindahkan ke ruang kerja kiri"
#: data/50-mutter-navigation.xml:132
msgid "Move to workspace right"
msgstr "Pindahkan ke ruang kerja kanan"
#: data/50-mutter-navigation.xml:135
msgid "Move to workspace above"
msgstr "Pindahkan ke ruang kerja di atas"
#: data/50-mutter-navigation.xml:138
msgid "Move to workspace below"
msgstr "Pindahkan ke ruang kerja di bawah"
#: data/50-mutter-system.xml:6
msgid "System"
msgstr "Sistem"
#: data/50-mutter-system.xml:8
msgid "Show the run command prompt"
msgstr "Tampilkan sapaan jalankan perintah"
#: data/50-mutter-system.xml:10
msgid "Show the activities overview"
msgstr "Tampilkan ringkasan aktivitas"
#: data/50-mutter-windows.xml:6
msgid "Windows"
msgstr "Jendela"
#: data/50-mutter-windows.xml:8
msgid "Activate the window menu"
msgstr "Mengaktifkan menu jendela"
#: data/50-mutter-windows.xml:10
msgid "Toggle fullscreen mode"
msgstr "Jungkitkan mode layar penuh"
#: data/50-mutter-windows.xml:12
msgid "Toggle maximization state"
msgstr "Jungkitkan keadaan termaksimalkan"
#: data/50-mutter-windows.xml:14
msgid "Maximize window"
msgstr "Maksimalkan jendela"
#: data/50-mutter-windows.xml:16
msgid "Restore window"
msgstr "Pulihkan jendela"
#: data/50-mutter-windows.xml:18
msgid "Toggle shaded state"
msgstr "Jungkitkan keadaan berbayang"
#: data/50-mutter-windows.xml:20
msgid "Close window"
msgstr "Tutup jendela"
#: data/50-mutter-windows.xml:22
msgid "Hide window"
msgstr "Sembunyikan jendela"
#: data/50-mutter-windows.xml:24
msgid "Move window"
msgstr "Pindahkan jendela"
#: data/50-mutter-windows.xml:26
msgid "Resize window"
msgstr "Ubah ukuran jendela"
#: data/50-mutter-windows.xml:29
msgid "Toggle window on all workspaces or one"
msgstr "Jungkitkan jendela pada semua atau satu area kerja"
#: data/50-mutter-windows.xml:31
msgid "Raise window if covered, otherwise lower it"
msgstr "Naikkan jendela bila tertutup jendela lain, sebaliknya turunkan"
#: data/50-mutter-windows.xml:33
msgid "Raise window above other windows"
msgstr "Naikkan jendela di atas jendela-jendela lain"
#: data/50-mutter-windows.xml:35
msgid "Lower window below other windows"
msgstr "Turunkan jendela di bawah jendela-jendela lain"
#: data/50-mutter-windows.xml:37
msgid "Maximize window vertically"
msgstr "Maksimalkan ukuran jendela secara vertikal"
#: data/50-mutter-windows.xml:39
msgid "Maximize window horizontally"
msgstr "Maksimalkan ukuran jendela secara horisontal"
#: data/50-mutter-windows.xml:43
msgid "View split on left"
msgstr "Tilik belah di kiri"
#: data/50-mutter-windows.xml:47
msgid "View split on right"
msgstr "Tilik belah di kanan"
#: data/mutter.desktop.in:4
msgid "Mutter"
msgstr "Mutter"
@@ -32,14 +272,14 @@ msgstr "Tombol yang digunakan untuk memperluas operasi manajemen jendela"
#: data/org.gnome.mutter.gschema.xml.in:8
msgid ""
"This key will initiate the \"overlay\", which is a combination window "
"overview and application launching system. The default is intended to be the "
"\"Windows key\" on PC hardware. It's expected that this binding either the "
"default or set to the empty string."
"This key will initiate the overlay, which is a combination window overview "
"and application launching system. The default is intended to be the “Windows "
"key on PC hardware. Its expected that this binding either the default or "
"set to the empty string."
msgstr ""
"Kunci ini akan mengawali \"overlay\", yang merupakan kombinasi ringkasan "
"jendela dan sistem peluncuran aplikasi. Nilai baku ditujukan agar menjadi "
"\"Windows key\" pada perangkat keras PC. Diharapkan agar pengikatan ini "
"\"tombol Windows\" pada perangkat keras PC. Diharapkan agar pengikatan ini "
"berupa baku atau diisi dengan kalimat kosong."
#: data/org.gnome.mutter.gschema.xml.in:20
@@ -76,7 +316,7 @@ msgstr "Ruang kerja dikelola secara dinamis"
#: data/org.gnome.mutter.gschema.xml.in:41
msgid ""
"Determines whether workspaces are managed dynamically or whether there's a "
"Determines whether workspaces are managed dynamically or whether theres a "
"static number of workspaces (determined by the num-workspaces key in org."
"gnome.desktop.wm.preferences)."
msgstr ""
@@ -114,9 +354,9 @@ msgstr "Tunda perubahan fokus sampai penunjuk berhenti bergerak"
#: data/org.gnome.mutter.gschema.xml.in:69
msgid ""
"If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
"the focus will not be changed immediately when entering a window, but only "
"after the pointer stops moving."
"If set to true, and the focus mode is either sloppy or mouse then the "
"focus will not be changed immediately when entering a window, but only after "
"the pointer stops moving."
msgstr ""
"Bila diisi dengan true, dan mode fokus adalah \"sloppy\" atau \"mouse\" maka "
"fokus tak akan berubah seketika saat memasuki suatu jendela, tapi hanya "
@@ -128,7 +368,7 @@ msgstr "Lebar batas yang dapat diseret"
#: data/org.gnome.mutter.gschema.xml.in:80
msgid ""
"The amount of total draggable borders. If the theme's visible borders are "
"The amount of total draggable borders. If the themes visible borders are "
"not enough, invisible borders will be added to meet this value."
msgstr ""
"Total banyaknya tepi yang dapat diseret. Bila tepi tema yang nampak tak "
@@ -168,87 +408,97 @@ msgstr "Batalkan popup tab"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Pindah ke VT 1"
msgstr "Bertukar ke VT 1"
#: data/org.gnome.mutter.wayland.gschema.xml.in:10
msgid "Switch to VT 2"
msgstr "Pindah ke VT 2"
msgstr "Bertukar ke VT 2"
#: data/org.gnome.mutter.wayland.gschema.xml.in:14
msgid "Switch to VT 3"
msgstr "Pindah ke VT 3"
msgstr "Bertukar ke VT 3"
#: data/org.gnome.mutter.wayland.gschema.xml.in:18
msgid "Switch to VT 4"
msgstr "Pindah ke VT 4"
msgstr "Bertukar ke VT 4"
#: data/org.gnome.mutter.wayland.gschema.xml.in:22
msgid "Switch to VT 5"
msgstr "Pindah ke VT 5"
msgstr "Bertukar ke VT 5"
#: data/org.gnome.mutter.wayland.gschema.xml.in:26
msgid "Switch to VT 6"
msgstr "Pindah ke VT 6"
msgstr "Bertukar ke VT 6"
#: data/org.gnome.mutter.wayland.gschema.xml.in:30
msgid "Switch to VT 7"
msgstr "Pindah ke VT 7"
msgstr "Bertukar ke VT 7"
#: data/org.gnome.mutter.wayland.gschema.xml.in:34
msgid "Switch to VT 8"
msgstr "Pindah ke VT 8"
msgstr "Bertukar ke VT 8"
#: data/org.gnome.mutter.wayland.gschema.xml.in:38
msgid "Switch to VT 9"
msgstr "Pindah ke VT 9"
msgstr "Bertukar ke VT 9"
#: data/org.gnome.mutter.wayland.gschema.xml.in:42
msgid "Switch to VT 10"
msgstr "Pindah ke VT 10"
msgstr "Bertukar ke VT 10"
#: data/org.gnome.mutter.wayland.gschema.xml.in:46
msgid "Switch to VT 11"
msgstr "Pindah ke VT 11"
msgstr "Bertukar ke VT 11"
#: data/org.gnome.mutter.wayland.gschema.xml.in:50
msgid "Switch to VT 12"
msgstr "Pindah ke VT 12"
msgstr "Bertukar ke VT 12"
#: src/backends/meta-input-settings.c:1707
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1759
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Tukar Mode: (Grup %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1781
msgid "Switch monitor"
msgstr "Berpindah monitor"
#: src/backends/meta-input-settings.c:1709
#: src/backends/meta-input-settings.c:1783
msgid "Show on-screen help"
msgstr "Tampilkan bantuan pada layar"
#: src/backends/meta-monitor-manager.c:514
#: src/backends/meta-monitor-manager.c:675
msgid "Built-in display"
msgstr "Tampilan bawaan"
#: src/backends/meta-monitor-manager.c:537
#: src/backends/meta-monitor-manager.c:698
msgid "Unknown"
msgstr "Tak Dikenal"
#: src/backends/meta-monitor-manager.c:539
#: src/backends/meta-monitor-manager.c:700
msgid "Unknown Display"
msgstr "Tampilan Tak Dikenal"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:547
#: src/backends/meta-monitor-manager.c:708
#, c-format
msgid "%s %s"
msgstr "%s %s"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: src/compositor/compositor.c:463
#: src/compositor/compositor.c:471
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display \"%s"
"\"."
"Another compositing manager is already running on screen %i on display “%s”."
msgstr ""
"Manajer komposit lain telah berjalan pada layar %i pada tampilan \"%s\"."
@@ -256,6 +506,7 @@ msgstr ""
msgid "Bell event"
msgstr "Bel peristiwa"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
@@ -272,52 +523,52 @@ msgid ""
msgstr ""
"Anda bisa memilih untuk menunggu sebentar atau memaksa aplikasi keluar."
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Tunggu"
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Matikan Paksa"
#: src/core/display.c:590
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "Gagal membuka tampilan X Window System '%s'\n"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Tunggu"
#: src/core/main.c:182
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr "Gagal membuka tampilan X Window System \"%s\"\n"
#: src/core/main.c:189
msgid "Disable connection to session manager"
msgstr "Menonaktifkan koneksi ke manajer sesi"
#: src/core/main.c:188
#: src/core/main.c:195
msgid "Replace the running window manager"
msgstr "Mengganti manajer jendela yang tengah berjalan"
#: src/core/main.c:194
#: src/core/main.c:201
msgid "Specify session management ID"
msgstr "Tentukan kode pengaturan sesi"
#: src/core/main.c:199
#: src/core/main.c:206
msgid "X Display to use"
msgstr "Tampilan X yang digunakna"
#: src/core/main.c:205
#: src/core/main.c:212
msgid "Initialize session from savefile"
msgstr "Aktifkan sesi dari berkas simpanan"
#: src/core/main.c:211
#: src/core/main.c:218
msgid "Make X calls synchronous"
msgstr "Buat panggilan X selaras"
#: src/core/main.c:218
#: src/core/main.c:225
msgid "Run as a wayland compositor"
msgstr "Jalankan sebagai kompositor wayland"
#: src/core/main.c:224
#: src/core/main.c:231
msgid "Run as a nested compositor"
msgstr "Jalankan sebagai kompositor bersarang"
#: src/core/main.c:232
#: src/core/main.c:239
msgid "Run as a full display server, rather than nested"
msgstr "Jalankan sebagai server tampilan penuh, ketimbang tampilan bersarang"
@@ -325,14 +576,14 @@ msgstr "Jalankan sebagai server tampilan penuh, ketimbang tampilan bersarang"
#, c-format
msgid ""
"mutter %s\n"
"Copyright (C) 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"This is free software; see the source for copying conditions.\n"
"There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A "
"PARTICULAR PURPOSE.\n"
msgstr ""
"mutter %s\n"
"Hak cipta (C) 2001-%d Havoc Pennington, Red Hat, Inc., dan lain-lain.\n"
"Ini adalah perangkat lunak bebas; lihatlah kode sumbernya untuk kondisi "
"Hak Cipta (C) 2001-%d Havoc Pennington, Red Hat, Inc., dan lain-lain.\n"
"Ini adalah perangkat lunak bebas; lihat kode asalnya untuk kondisi "
"penyalinan.\n"
"TIDAK ADA jaminan, bahkan untuk KELAYAKAN JUAL atau KELAYAKAN UNTUK KEGUNAAN "
"TERTENTU.\n"
@@ -350,38 +601,38 @@ msgstr "Pengaya Mutter yang dipakai"
msgid "Workspace %d"
msgstr "Area kerja %d"
#: src/core/screen.c:521
#: src/core/screen.c:580
#, c-format
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
"to replace the current window manager."
"Display “%s” already has a window manager; try using the --replace option to "
"replace the current window manager."
msgstr ""
"Tampilan \"%s\" sudah memiliki manajer jendela; cobalah gunakan pilihan --"
"replace untuk mengganti manajer jendela saat ini."
#: src/core/screen.c:606
#: src/core/screen.c:665
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgstr "Layar %d pada tampilan '%s' tidak benar\n"
msgid "Screen %d on display %s is invalid\n"
msgstr "Layar %d pada tampilan \"%s\" tidak valid\n"
#: src/core/util.c:120
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Muter dikompilasi tanpa dukungan mode riuh\n"
#: src/wayland/meta-wayland-tablet-pad.c:595
#: src/wayland/meta-wayland-tablet-pad.c:563
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "Tukar Mode: Mode %d"
#: src/x11/session.c:1815
msgid ""
"These windows do not support &quot;save current setup&quot; and will have to "
"be restarted manually next time you log in."
"These windows do not support save current setup and will have to be "
"restarted manually next time you log in."
msgstr ""
"Jendela ini tidak bisa &quot;menyimpan setelan aktif saat ini&quot; dan bila "
"log masuk kali lain Anda harus menjalankannya ulang."
"Jendela ini tidak mendukung \"menyimpan setelan aktif saat ini\" dan mesti "
"dijalankan ulang secara manual kala berikut Anda log masuk."
#: src/x11/window-props.c:548
#: src/x11/window-props.c:559
#, c-format
msgid "%s (on %s)"
msgstr "%s (pada %s)"

113
po/it.po
View File

@@ -1,19 +1,19 @@
# Italian translation for Mutter.
# Based on Italian translation for Metacity
# This file is distributed under the same license as metacity package
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc.
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Free Software Foundation, Inc.
# Pier Luigi Fiorini <plfiorini@libero.it>, 2002.
# Lapo Calamandrei <lapo.calamandrei@virgilio.it>, 2003.
# Luca Ferretti <lferrett@gnome.org>, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012.
# Milo Casagrande <milo@milo.name>, 2012, 2013, 2014, 2015, 2016.
# Milo Casagrande <milo@milo.name>, 2012, 2013, 2014, 2015, 2016, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2016-09-07 09:27+0000\n"
"PO-Revision-Date: 2016-10-03 11:50+0200\n"
"POT-Creation-Date: 2017-02-16 15:52+0000\n"
"PO-Revision-Date: 2017-02-17 22:11+0100\n"
"Last-Translator: Milo Casagrande <milo@milo.name>\n"
"Language-Team: Italian <tp@lists.linux.it>\n"
"Language: it\n"
@@ -21,7 +21,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
"X-Generator: Poedit 1.8.9\n"
"X-Generator: Poedit 2.0beta3\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@@ -277,10 +277,10 @@ msgstr "Modificatore da utilizzare per le azioni di gestione finestre estese"
#: data/org.gnome.mutter.gschema.xml.in:8
msgid ""
"This key will initiate the \"overlay\", which is a combination window "
"overview and application launching system. The default is intended to be the "
"\"Windows key\" on PC hardware. It's expected that this binding either the "
"default or set to the empty string."
"This key will initiate the overlay, which is a combination window overview "
"and application launching system. The default is intended to be the “Windows "
"key on PC hardware. Its expected that this binding either the default or "
"set to the empty string."
msgstr ""
"Questa chiave pone inizio alla \"overlay\", cioè una combinazione tra la "
"panoramica delle finestre e il sistema di lancio delle applicazioni. Il "
@@ -325,7 +325,7 @@ msgstr "Spazi di lavoro gestiti dinamicamente"
#: data/org.gnome.mutter.gschema.xml.in:41
msgid ""
"Determines whether workspaces are managed dynamically or whether there's a "
"Determines whether workspaces are managed dynamically or whether theres a "
"static number of workspaces (determined by the num-workspaces key in org."
"gnome.desktop.wm.preferences)."
msgstr ""
@@ -365,9 +365,9 @@ msgstr "Ritarda il cambio del focus fino a quando il puntatore si ferma"
#: data/org.gnome.mutter.gschema.xml.in:69
msgid ""
"If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
"the focus will not be changed immediately when entering a window, but only "
"after the pointer stops moving."
"If set to true, and the focus mode is either sloppy or mouse then the "
"focus will not be changed immediately when entering a window, but only after "
"the pointer stops moving."
msgstr ""
"Se impostato a VERO, e la modalità di focus è impostata a \"sloppy\" o "
"\"mouse\", il focus non viene spostato immediatamente quando si passa su una "
@@ -379,7 +379,7 @@ msgstr "Larghezza bordo trascinabile"
#: data/org.gnome.mutter.gschema.xml.in:80
msgid ""
"The amount of total draggable borders. If the theme's visible borders are "
"The amount of total draggable borders. If the themes visible borders are "
"not enough, invisible borders will be added to meet this value."
msgstr ""
"Lo spessore effettivo totale per i bordi trascinabili. Se i bordi visibili "
@@ -466,41 +466,51 @@ msgstr "Passa al VT 11"
msgid "Switch to VT 12"
msgstr "Passa al VT 12"
#: src/backends/meta-input-settings.c:1707
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1800
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Cambio modalità (gruppo %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1822
msgid "Switch monitor"
msgstr "Cambia monitor"
#: src/backends/meta-input-settings.c:1709
#: src/backends/meta-input-settings.c:1824
msgid "Show on-screen help"
msgstr "Mostra aiuto sullo schermo"
#: src/backends/meta-monitor-manager.c:514
#: src/backends/meta-monitor-manager.c:675
msgid "Built-in display"
msgstr "Display integrato"
#: src/backends/meta-monitor-manager.c:537
#: src/backends/meta-monitor-manager.c:698
msgid "Unknown"
msgstr "Sconosciuto"
#: src/backends/meta-monitor-manager.c:539
#: src/backends/meta-monitor-manager.c:700
msgid "Unknown Display"
msgstr "Display sconosciuto"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:547
#: src/backends/meta-monitor-manager.c:708
#, c-format
msgid "%s %s"
msgstr "%s %s"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: src/compositor/compositor.c:463
#: src/compositor/compositor.c:471
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display \"%s"
"\"."
"Another compositing manager is already running on screen %i on display “%s”."
msgstr ""
"Un altro compositing manager è già in esecuzione sullo schermo %i sul "
"display «%s»."
@@ -509,6 +519,7 @@ msgstr ""
msgid "Bell event"
msgstr "Evento campanella"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
@@ -526,52 +537,52 @@ msgstr ""
"È possibile scegliere di attendere un po' lasciando che l'applicazione "
"continui, oppure forzare la terminazione dell'applicazione."
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Attendi"
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Forza uscita"
#: src/core/display.c:590
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Attendi"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgid "Failed to open X Window System display %s\n"
msgstr "Apertura del display «%s» di X Window System non riuscita\n"
#: src/core/main.c:182
#: src/core/main.c:189
msgid "Disable connection to session manager"
msgstr "Disabilita la connessione al gestore di sessione"
#: src/core/main.c:188
#: src/core/main.c:195
msgid "Replace the running window manager"
msgstr "Sostituisce il window manager in esecuzione"
#: src/core/main.c:194
#: src/core/main.c:201
msgid "Specify session management ID"
msgstr "Specifica l'ID di gestione sessione"
#: src/core/main.c:199
#: src/core/main.c:206
msgid "X Display to use"
msgstr "Display X da usare"
#: src/core/main.c:205
#: src/core/main.c:212
msgid "Initialize session from savefile"
msgstr "Inizializza la sessione da file salvato"
#: src/core/main.c:211
#: src/core/main.c:218
msgid "Make X calls synchronous"
msgstr "Rende le chiamate X sincrone"
#: src/core/main.c:218
#: src/core/main.c:225
msgid "Run as a wayland compositor"
msgstr "Esegui come compositor Wayland"
#: src/core/main.c:224
#: src/core/main.c:231
msgid "Run as a nested compositor"
msgstr "Esegui come compositor annidato"
#: src/core/main.c:232
#: src/core/main.c:239
msgid "Run as a full display server, rather than nested"
msgstr "Esegui come display server invece che annidato"
@@ -579,7 +590,7 @@ msgstr "Esegui come display server invece che annidato"
#, c-format
msgid ""
"mutter %s\n"
"Copyright (C) 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"This is free software; see the source for copying conditions.\n"
"There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A "
"PARTICULAR PURPOSE.\n"
@@ -603,39 +614,39 @@ msgstr "Plugin Mutter da usare"
msgid "Workspace %d"
msgstr "Spazio di lavoro %d"
#: src/core/screen.c:521
#: src/core/screen.c:580
#, c-format
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
"to replace the current window manager."
"Display “%s” already has a window manager; try using the --replace option to "
"replace the current window manager."
msgstr ""
"Il display «%s» ha già un window manager; provare a utilizzare l'opzione --"
"replace per sostituirlo."
#: src/core/screen.c:606
#: src/core/screen.c:665
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgstr "Lo schermo %d nel display «%s» non è valido\n"
msgid "Screen %d on display %s is invalid\n"
msgstr "Lo schermo %d sul display «%s» non è valido\n"
#: src/core/util.c:120
msgid "Mutter was compiled without support for verbose mode\n"
msgstr ""
"Mutter è stato compilato escludendo il supporto per la modalità prolissa\n"
#: src/wayland/meta-wayland-tablet-pad.c:595
#: src/wayland/meta-wayland-tablet-pad.c:563
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "Cambio modalità: modalità %d"
#: src/x11/session.c:1815
msgid ""
"These windows do not support &quot;save current setup&quot; and will have to "
"be restarted manually next time you log in."
"These windows do not support save current setup and will have to be "
"restarted manually next time you log in."
msgstr ""
"Queste finestre non supportano la funzione &quot;salva impostazioni "
"attuali&quot; e dovranno essere riavviate manualmente al prossimo accesso."
"Queste finestre non supportano la funzione «salva impostazioni attuali» e "
"dovranno essere riavviate manualmente al prossimo accesso."
#: src/x11/window-props.c:548
#: src/x11/window-props.c:559
#, c-format
msgid "%s (on %s)"
msgstr "%s (su %s)"

1254
po/nb.po

File diff suppressed because it is too large Load Diff

118
po/pl.po
View File

@@ -1,20 +1,21 @@
# Polish translation for mutter.
# Copyright © 2002-2016 the mutter authors.
# Copyright © 2002-2017 the mutter authors.
# This file is distributed under the same license as the mutter package.
# Zbigniew Chyla <chyla@alice.ci.pwr.wroc.pl>, 2002-2003.
# Artur Flinta <aflinta@at.kernel.pl>, 2003-2005.
# Marek Stępień <marcoos@aviary.pl>, 2007.
# Wadim Dziedzic <wdziedzic@aviary.pl>, 2007.
# Tomasz Dominikowski <dominikowski@gmail.com>, 2008-2009.
# Piotr Drąg <piotrdrag@gmail.com>, 2010-2016.
# Aviary.pl <community-poland@mozilla.org>, 2007-2016.
# Piotr Drąg <piotrdrag@gmail.com>, 2010-2017.
# Aviary.pl <community-poland@mozilla.org>, 2007-2017.
#
msgid ""
msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-09-07 09:27+0000\n"
"PO-Revision-Date: 2016-09-09 23:58+0200\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-02-16 21:09+0000\n"
"PO-Revision-Date: 2017-02-19 21:52+0100\n"
"Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n"
"Language-Team: Polish <community-poland@mozilla.org>\n"
"Language: pl\n"
@@ -276,10 +277,10 @@ msgstr "Modyfikator używany do rozszerzonych działań menedżera okien"
#: data/org.gnome.mutter.gschema.xml.in:8
msgid ""
"This key will initiate the \"overlay\", which is a combination window "
"overview and application launching system. The default is intended to be the "
"\"Windows key\" on PC hardware. It's expected that this binding either the "
"default or set to the empty string."
"This key will initiate the overlay, which is a combination window overview "
"and application launching system. The default is intended to be the “Windows "
"key on PC hardware. Its expected that this binding either the default or "
"set to the empty string."
msgstr ""
"Ten klawisz inicjuje tryb „overlay” (nakładki), który jest połączeniem "
"podglądu okien i systemu uruchamiania programów. Domyślnie jest przeznaczony "
@@ -297,8 +298,8 @@ msgid ""
"the parent window."
msgstr ""
"Jeśli wynosi wartość „true”, to modalne okna dialogowe pojawiają się "
"dołączone do paska tytułowego okna nadrzędnego, zamiast mieć oddzielne "
"paski tytułowe, i są przenoszone razem z nim."
"dołączone do paska tytułowego okna nadrzędnego, zamiast mieć oddzielne paski "
"tytułowe, i są przenoszone razem z nim."
#: data/org.gnome.mutter.gschema.xml.in:30
msgid "Enable edge tiling when dropping windows on screen edges"
@@ -323,7 +324,7 @@ msgstr "Dynamiczne zarządzanie obszarami roboczymi"
#: data/org.gnome.mutter.gschema.xml.in:41
msgid ""
"Determines whether workspaces are managed dynamically or whether there's a "
"Determines whether workspaces are managed dynamically or whether theres a "
"static number of workspaces (determined by the num-workspaces key in org."
"gnome.desktop.wm.preferences)."
msgstr ""
@@ -361,9 +362,9 @@ msgstr "Opóźnienie zmian aktywności do zatrzymania ruchu kursora"
#: data/org.gnome.mutter.gschema.xml.in:69
msgid ""
"If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
"the focus will not be changed immediately when entering a window, but only "
"after the pointer stops moving."
"If set to true, and the focus mode is either sloppy or mouse then the "
"focus will not be changed immediately when entering a window, but only after "
"the pointer stops moving."
msgstr ""
"Jeśli jest ustawione na wartość „true”, a tryb aktywności to „sloppy” lub "
"„mouse”, to aktywność nie będzie zmieniana od razu po przejściu do okna, ale "
@@ -375,7 +376,7 @@ msgstr "Szerokość krawędzi możliwej do przenoszenia"
#: data/org.gnome.mutter.gschema.xml.in:80
msgid ""
"The amount of total draggable borders. If the theme's visible borders are "
"The amount of total draggable borders. If the themes visible borders are "
"not enough, invisible borders will be added to meet this value."
msgstr ""
"Suma całkowitych krawędzi możliwych do przenoszenia. Jeśli widoczne "
@@ -464,41 +465,51 @@ msgstr "Przełączenie na 11. konsolę wirtualną"
msgid "Switch to VT 12"
msgstr "Przełączenie na 12. konsolę wirtualną"
#: src/backends/meta-input-settings.c:1707
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1800
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Przełącznik trybu (%d. grupa)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1822
msgid "Switch monitor"
msgstr "Przełączenie monitora"
#: src/backends/meta-input-settings.c:1709
#: src/backends/meta-input-settings.c:1824
msgid "Show on-screen help"
msgstr "Wyświetlenie pomocy na ekranie"
#: src/backends/meta-monitor-manager.c:514
#: src/backends/meta-monitor-manager.c:675
msgid "Built-in display"
msgstr "Wbudowany ekran"
#: src/backends/meta-monitor-manager.c:537
#: src/backends/meta-monitor-manager.c:698
msgid "Unknown"
msgstr "Nieznany"
#: src/backends/meta-monitor-manager.c:539
#: src/backends/meta-monitor-manager.c:700
msgid "Unknown Display"
msgstr "Nieznany ekran"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:547
#: src/backends/meta-monitor-manager.c:708
#, c-format
msgid "%s %s"
msgstr "%s %s"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: src/compositor/compositor.c:463
#: src/compositor/compositor.c:471
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display \"%s"
"\"."
"Another compositing manager is already running on screen %i on display “%s”."
msgstr ""
"Inny menedżer składania jest już uruchomiony na podekranie %i ekranu „%s”."
@@ -506,6 +517,7 @@ msgstr ""
msgid "Bell event"
msgstr "Zdarzenie sygnału dźwiękowego"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
@@ -521,52 +533,52 @@ msgid ""
"application to quit entirely."
msgstr "Można poczekać chwilę dłużej lub wymusić zakończenie programu."
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Czekaj"
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Zakończ"
#: src/core/display.c:590
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Czekaj"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgid "Failed to open X Window System display %s\n"
msgstr "Otwarcie połączenia z ekranem „%s” systemu X Window się nie powiodło\n"
#: src/core/main.c:182
#: src/core/main.c:189
msgid "Disable connection to session manager"
msgstr "Rozłącza połączenie z menedżerem sesji"
#: src/core/main.c:188
#: src/core/main.c:195
msgid "Replace the running window manager"
msgstr "Zastępuje uruchomionego menedżera okien"
#: src/core/main.c:194
#: src/core/main.c:201
msgid "Specify session management ID"
msgstr "Podaje identyfikator zarządzania sesją"
#: src/core/main.c:199
#: src/core/main.c:206
msgid "X Display to use"
msgstr "Używany ekran X"
#: src/core/main.c:205
#: src/core/main.c:212
msgid "Initialize session from savefile"
msgstr "Inicjuje sesję z zapisanego pliku"
#: src/core/main.c:211
#: src/core/main.c:218
msgid "Make X calls synchronous"
msgstr "Synchroniczne wywołania X"
#: src/core/main.c:218
#: src/core/main.c:225
msgid "Run as a wayland compositor"
msgstr "Uruchamia jako menedżer składania Wayland"
#: src/core/main.c:224
#: src/core/main.c:231
msgid "Run as a nested compositor"
msgstr "Uruchamia jako osadzony menedżer składania"
#: src/core/main.c:232
#: src/core/main.c:239
msgid "Run as a full display server, rather than nested"
msgstr "Uruchamia jako pełny serwer wyświetlania zamiast osadzonego"
@@ -574,13 +586,13 @@ msgstr "Uruchamia jako pełny serwer wyświetlania zamiast osadzonego"
#, c-format
msgid ""
"mutter %s\n"
"Copyright (C) 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"This is free software; see the source for copying conditions.\n"
"There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A "
"PARTICULAR PURPOSE.\n"
msgstr ""
"mutter %s\n"
"Copyright (C) 2001-%d Havoc Pennington, Red Hat, Inc., oraz inni\n"
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., oraz inni\n"
"Niniejszy program jest wolnym oprogramowaniem, aby poznać warunki, pod\n"
"jakimi dopuszczalne jest kopiowanie programu, zajrzyj do jego źródeł.\n"
"Na program nie udziela się ŻADNYCH GWARANCJI, nawet domyślnej gwarancji\n"
@@ -599,18 +611,18 @@ msgstr "Używana wtyczka menedżera Mutter"
msgid "Workspace %d"
msgstr "%d. obszar roboczy"
#: src/core/screen.c:521
#: src/core/screen.c:580
#, c-format
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
"to replace the current window manager."
"Display “%s” already has a window manager; try using the --replace option to "
"replace the current window manager."
msgstr ""
"Na ekranie „%s” działa już menedżer okien. Aby zastąpić działającego "
"menedżera okien, należy użyć opcji „--replace”."
#: src/core/screen.c:606
#: src/core/screen.c:665
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgid "Screen %d on display %s is invalid\n"
msgstr "Podekran %d ekranu „%s” jest nieprawidłowy\n"
#: src/core/util.c:120
@@ -618,20 +630,20 @@ msgid "Mutter was compiled without support for verbose mode\n"
msgstr ""
"Menedżer Mutter został skompilowany bez obsługi trybu z obszerną informacją\n"
#: src/wayland/meta-wayland-tablet-pad.c:595
#: src/wayland/meta-wayland-tablet-pad.c:563
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "Przełącznik trybu: tryb %d"
msgstr "Przełącznik trybu: %d. tryb"
#: src/x11/session.c:1815
msgid ""
"These windows do not support &quot;save current setup&quot; and will have to "
"be restarted manually next time you log in."
"These windows do not support save current setup and will have to be "
"restarted manually next time you log in."
msgstr ""
"Te okna nie obsługują opcji zapisu obecnego stanu („save current setup”), "
"więc przy następnym zalogowaniu będą musiały zostać uruchomione ręcznie."
#: src/x11/window-props.c:548
#: src/x11/window-props.c:559
#, c-format
msgid "%s (on %s)"
msgstr "%s (na %s)"

280
po/sk.po
View File

@@ -14,8 +14,8 @@ msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2016-07-22 13:03+0000\n"
"PO-Revision-Date: 2016-08-04 15:28+0200\n"
"POT-Creation-Date: 2017-02-10 22:51+0000\n"
"PO-Revision-Date: 2017-02-12 14:37+0100\n"
"Last-Translator: Dušan Kazik <prescott66@gmail.com>\n"
"Language-Team: Slovak <gnome-sk-list@gnome.org>\n"
"Language: sk\n"
@@ -23,318 +23,318 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 1 : (n>=2 && n<=4) ? 2 : 0;\n"
"X-Generator: Poedit 1.8.8\n"
"X-Generator: Poedit 1.8.11\n"
#: ../data/50-mutter-navigation.xml.in.h:1
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
msgstr "Navigácia"
# description
#: ../data/50-mutter-navigation.xml.in.h:2
#: data/50-mutter-navigation.xml:9
msgid "Move window to workspace 1"
msgstr "Presunúť okno na pracovný priestor č. 1"
# description
#: ../data/50-mutter-navigation.xml.in.h:3
#: data/50-mutter-navigation.xml:12
msgid "Move window to workspace 2"
msgstr "Presunúť okno na pracovný priestor č. 2"
# description
#: ../data/50-mutter-navigation.xml.in.h:4
#: data/50-mutter-navigation.xml:15
msgid "Move window to workspace 3"
msgstr "Presunúť okno na pracovný priestor č. 3"
# description
#: ../data/50-mutter-navigation.xml.in.h:5
#: data/50-mutter-navigation.xml:18
msgid "Move window to workspace 4"
msgstr "Presunúť okno na pracovný priestor č. 4"
# description
#: ../data/50-mutter-navigation.xml.in.h:6
#: data/50-mutter-navigation.xml:21
msgid "Move window to last workspace"
msgstr "Presunúť okno na posledný pracovný priestor"
# description
#: ../data/50-mutter-navigation.xml.in.h:7
#: data/50-mutter-navigation.xml:24
msgid "Move window one workspace to the left"
msgstr "Presunúť okno o jeden pracovný priestor vľavo"
# description
#: ../data/50-mutter-navigation.xml.in.h:8
#: data/50-mutter-navigation.xml:27
msgid "Move window one workspace to the right"
msgstr "Presunúť okno o jeden pracovný priestor vpravo"
# description
#: ../data/50-mutter-navigation.xml.in.h:9
#: data/50-mutter-navigation.xml:30
msgid "Move window one workspace up"
msgstr "Presunúť okno o jeden pracovný priestor hore"
# description
#: ../data/50-mutter-navigation.xml.in.h:10
#: data/50-mutter-navigation.xml:33
msgid "Move window one workspace down"
msgstr "Presunúť okno o jeden pracovný priestor dolu"
# description
#: ../data/50-mutter-navigation.xml.in.h:11
#: data/50-mutter-navigation.xml:36
msgid "Move window one monitor to the left"
msgstr "Presunúť okno o jeden monitor vľavo"
# description
#: ../data/50-mutter-navigation.xml.in.h:12
#: data/50-mutter-navigation.xml:39
msgid "Move window one monitor to the right"
msgstr "Presunúť okno o jeden monitor vpravo"
# description
#: ../data/50-mutter-navigation.xml.in.h:13
#: data/50-mutter-navigation.xml:42
msgid "Move window one monitor up"
msgstr "Presunúť okno o jeden monitor hore"
# description
#: ../data/50-mutter-navigation.xml.in.h:14
#: data/50-mutter-navigation.xml:45
msgid "Move window one monitor down"
msgstr "Presunúť okno o jeden monitor dolu"
# description
#: ../data/50-mutter-navigation.xml.in.h:15
#: data/50-mutter-navigation.xml:49
msgid "Switch applications"
msgstr "Prepnúť aplikácie"
# description
#: ../data/50-mutter-navigation.xml.in.h:16
#: data/50-mutter-navigation.xml:54
msgid "Switch to previous application"
msgstr "Prepnúť na predchádzajúcu aplikáciu"
# description
#: ../data/50-mutter-navigation.xml.in.h:17
#: data/50-mutter-navigation.xml:58
msgid "Switch windows"
msgstr "Prepnúť okná"
# description
#: ../data/50-mutter-navigation.xml.in.h:18
#: data/50-mutter-navigation.xml:63
msgid "Switch to previous window"
msgstr "Prepnúť na predchádzajúce okno"
# description
#: ../data/50-mutter-navigation.xml.in.h:19
#: data/50-mutter-navigation.xml:67
msgid "Switch windows of an application"
msgstr "Prepnúť okná aplikácie"
# description
#: ../data/50-mutter-navigation.xml.in.h:20
#: data/50-mutter-navigation.xml:72
msgid "Switch to previous window of an application"
msgstr "Prepnúť na predchádzajúce okno aplikácie"
# PK: predpokladam ze to prepisane medzi tlacidlami
# description
#: ../data/50-mutter-navigation.xml.in.h:21
#: data/50-mutter-navigation.xml:76
msgid "Switch system controls"
msgstr "Prepnúť medzi ovládacími prvkami systému"
# PK: predpokladam ze to prepisane medzi tlacidlami
# description
#: ../data/50-mutter-navigation.xml.in.h:22
#: data/50-mutter-navigation.xml:81
msgid "Switch to previous system control"
msgstr "Prepnúť na predchádzajúci ovládací prvok systému"
# description
#: ../data/50-mutter-navigation.xml.in.h:23
#: data/50-mutter-navigation.xml:85
msgid "Switch windows directly"
msgstr "Prepnúť okná priamo"
#: ../data/50-mutter-navigation.xml.in.h:24
#: data/50-mutter-navigation.xml:90
msgid "Switch directly to previous window"
msgstr "Priamo prepnúť na predchádzajúce okno"
# description
#: ../data/50-mutter-navigation.xml.in.h:25
#: data/50-mutter-navigation.xml:94
msgid "Switch windows of an app directly"
msgstr "Prepnúť okná aplikácie priamo"
# description
#: ../data/50-mutter-navigation.xml.in.h:26
#: data/50-mutter-navigation.xml:99
msgid "Switch directly to previous window of an app"
msgstr "Priamo prepnúť na predchádzajúce okno aplikácie"
# description
#: ../data/50-mutter-navigation.xml.in.h:27
#: data/50-mutter-navigation.xml:103
msgid "Switch system controls directly"
msgstr "Prepnúť medzi ovládacími prvkami systému priamo"
# PK: predpokladam ze to prepisane medzi tlacidlami
# description
#: ../data/50-mutter-navigation.xml.in.h:28
#: data/50-mutter-navigation.xml:108
msgid "Switch directly to previous system control"
msgstr "Priamo prepnúť na predchádzajúci ovládací prvok systému"
# description
#: ../data/50-mutter-navigation.xml.in.h:29
#: data/50-mutter-navigation.xml:111
msgid "Hide all normal windows"
msgstr "Skryť všetky normálne okná"
# description
#: ../data/50-mutter-navigation.xml.in.h:30
#: data/50-mutter-navigation.xml:114
msgid "Switch to workspace 1"
msgstr "Prepnúť na pracovný priestor č. 1"
# description
#: ../data/50-mutter-navigation.xml.in.h:31
#: data/50-mutter-navigation.xml:117
msgid "Switch to workspace 2"
msgstr "Prepnúť na pracovný priestor č. 2"
# description
#: ../data/50-mutter-navigation.xml.in.h:32
#: data/50-mutter-navigation.xml:120
msgid "Switch to workspace 3"
msgstr "Prepnúť na pracovný priestor č. 3"
# description
#: ../data/50-mutter-navigation.xml.in.h:33
#: data/50-mutter-navigation.xml:123
msgid "Switch to workspace 4"
msgstr "Prepnúť na pracovný priestor č. 4"
# description
#: ../data/50-mutter-navigation.xml.in.h:34
#: data/50-mutter-navigation.xml:126
msgid "Switch to last workspace"
msgstr "Prepnúť na posledný pracovný priestor"
# description
#: ../data/50-mutter-navigation.xml.in.h:35
#: data/50-mutter-navigation.xml:129
msgid "Move to workspace left"
msgstr "Presunúť na pracovný priestor vľavo"
# description
#: ../data/50-mutter-navigation.xml.in.h:36
#: data/50-mutter-navigation.xml:132
msgid "Move to workspace right"
msgstr "Presunúť na pracovný priestor vpravo"
# description
#: ../data/50-mutter-navigation.xml.in.h:37
#: data/50-mutter-navigation.xml:135
msgid "Move to workspace above"
msgstr "Presunúť na pracovný priestor hore"
# description
#: ../data/50-mutter-navigation.xml.in.h:38
#: data/50-mutter-navigation.xml:138
msgid "Move to workspace below"
msgstr "Presunúť na pracovný priestor dole"
#: ../data/50-mutter-system.xml.in.h:1
#: data/50-mutter-system.xml:6
msgid "System"
msgstr "Systém"
# description
#: ../data/50-mutter-system.xml.in.h:2
#: data/50-mutter-system.xml:8
msgid "Show the run command prompt"
msgstr "Zobraziť riadok pre spustenie príkazu"
# description
#: ../data/50-mutter-system.xml.in.h:3
#: data/50-mutter-system.xml:10
msgid "Show the activities overview"
msgstr "Zobraziť prehľad aktivít"
#: ../data/50-mutter-windows.xml.in.h:1
#: data/50-mutter-windows.xml:6
msgid "Windows"
msgstr "Okná"
# description
#: ../data/50-mutter-windows.xml.in.h:2
#: data/50-mutter-windows.xml:8
msgid "Activate the window menu"
msgstr "Aktivovať ponuku okna"
# description
#: ../data/50-mutter-windows.xml.in.h:3
#: data/50-mutter-windows.xml:10
msgid "Toggle fullscreen mode"
msgstr "Prepnúť režim na celú obrazovku"
# description
#: ../data/50-mutter-windows.xml.in.h:4
#: data/50-mutter-windows.xml:12
msgid "Toggle maximization state"
msgstr "Prepnúť stav maximalizácie"
# description
#: ../data/50-mutter-windows.xml.in.h:5
#: data/50-mutter-windows.xml:14
msgid "Maximize window"
msgstr "Maximalizovať okno"
# description
#: ../data/50-mutter-windows.xml.in.h:6
#: data/50-mutter-windows.xml:16
msgid "Restore window"
msgstr "Obnoviť okno"
# description
#: ../data/50-mutter-windows.xml.in.h:7
#: data/50-mutter-windows.xml:18
msgid "Toggle shaded state"
msgstr "Prepnúť stav zatienenia"
# description
#: ../data/50-mutter-windows.xml.in.h:8
#: data/50-mutter-windows.xml:20
msgid "Close window"
msgstr "Zatvoriť okno"
# description
#: ../data/50-mutter-windows.xml.in.h:9
#: data/50-mutter-windows.xml:22
msgid "Hide window"
msgstr "Skryť okno"
# description
#: ../data/50-mutter-windows.xml.in.h:10
#: data/50-mutter-windows.xml:24
msgid "Move window"
msgstr "Presunúť okno"
# description
#: ../data/50-mutter-windows.xml.in.h:11
#: data/50-mutter-windows.xml:26
msgid "Resize window"
msgstr "Zmeniť veľkosť okna"
# description
#: ../data/50-mutter-windows.xml.in.h:12
#: data/50-mutter-windows.xml:29
msgid "Toggle window on all workspaces or one"
msgstr "Prepnúť okno na všetky pracovné priestory alebo len na jeden"
# description
#: ../data/50-mutter-windows.xml.in.h:13
#: data/50-mutter-windows.xml:31
msgid "Raise window if covered, otherwise lower it"
msgstr "Presunúť okno dopredu ak je zakryté, inak presunúť dozadu"
# description
#: ../data/50-mutter-windows.xml.in.h:14
#: data/50-mutter-windows.xml:33
msgid "Raise window above other windows"
msgstr "Presunúť okno nad ostatné okná"
# description
#: ../data/50-mutter-windows.xml.in.h:15
#: data/50-mutter-windows.xml:35
msgid "Lower window below other windows"
msgstr "Presunúť okno pod ostatné okná"
# description
#: ../data/50-mutter-windows.xml.in.h:16
#: data/50-mutter-windows.xml:37
msgid "Maximize window vertically"
msgstr "Maximalizovať okno zvisle"
# description
#: ../data/50-mutter-windows.xml.in.h:17
#: data/50-mutter-windows.xml:39
msgid "Maximize window horizontally"
msgstr "Maximalizovať okno vodorovne"
# Description
#: ../data/50-mutter-windows.xml.in.h:18
#: data/50-mutter-windows.xml:43
msgid "View split on left"
msgstr "Zobraziť rozdelenie naľavo"
# Description
#: ../data/50-mutter-windows.xml.in.h:19
#: data/50-mutter-windows.xml:47
msgid "View split on right"
msgstr "Zobraziť rozdelenie napravo"
#: ../data/mutter.desktop.in.h:1
#: data/mutter.desktop.in:4
msgid "Mutter"
msgstr "Mutter"
# summary
#: ../data/org.gnome.mutter.gschema.xml.in.h:1
#: data/org.gnome.mutter.gschema.xml.in:7
msgid "Modifier to use for extended window management operations"
msgstr "Modifikátor pre rozšírené operácie správcu okien"
# description
#: ../data/org.gnome.mutter.gschema.xml.in.h:2
#: data/org.gnome.mutter.gschema.xml.in:8
msgid ""
"This key will initiate the \"overlay\", which is a combination window "
"overview and application launching system. The default is intended to be the "
@@ -347,12 +347,12 @@ msgstr ""
"nastavenie na prázdny reťazec."
# summary
#: ../data/org.gnome.mutter.gschema.xml.in.h:3
#: data/org.gnome.mutter.gschema.xml.in:20
msgid "Attach modal dialogs"
msgstr "Pripojiť modálne dialógové okná"
# description
#: ../data/org.gnome.mutter.gschema.xml.in.h:4
#: data/org.gnome.mutter.gschema.xml.in:21
msgid ""
"When true, instead of having independent titlebars, modal dialogs appear "
"attached to the titlebar of the parent window and are moved together with "
@@ -363,12 +363,12 @@ msgstr ""
"spolu s oknom rodiča."
# summary
#: ../data/org.gnome.mutter.gschema.xml.in.h:5
#: data/org.gnome.mutter.gschema.xml.in:30
msgid "Enable edge tiling when dropping windows on screen edges"
msgstr "Povoliť natiahnutie k okraju pri pustení okien na okrajoch obrazovky"
# description
#: ../data/org.gnome.mutter.gschema.xml.in.h:6
#: data/org.gnome.mutter.gschema.xml.in:31
msgid ""
"If enabled, dropping windows on vertical screen edges maximizes them "
"vertically and resizes them horizontally to cover half of the available "
@@ -379,12 +379,12 @@ msgstr ""
"Upustenie okien pri vrchnom okraji obrazovky ich maximalizuje úplne."
# summary
#: ../data/org.gnome.mutter.gschema.xml.in.h:7
#: data/org.gnome.mutter.gschema.xml.in:40
msgid "Workspaces are managed dynamically"
msgstr "Pracovné priestory sú spravované dynamicky"
# description
#: ../data/org.gnome.mutter.gschema.xml.in.h:8
#: data/org.gnome.mutter.gschema.xml.in:41
msgid ""
"Determines whether workspaces are managed dynamically or whether there's a "
"static number of workspaces (determined by the num-workspaces key in org."
@@ -394,12 +394,12 @@ msgstr ""
"pevný (určený kľúčom num-workspaces v org.gnome.desktop.wm.preferences)."
# summary
#: ../data/org.gnome.mutter.gschema.xml.in.h:9
#: data/org.gnome.mutter.gschema.xml.in:50
msgid "Workspaces only on primary"
msgstr "Pracovné priestory len na hlavnom monitore"
# description
#: ../data/org.gnome.mutter.gschema.xml.in.h:10
#: data/org.gnome.mutter.gschema.xml.in:51
msgid ""
"Determines whether workspace switching should happen for windows on all "
"monitors or only for windows on the primary monitor."
@@ -408,12 +408,12 @@ msgstr ""
"monitoroch alebo iba medzi oknami na hlavnom monitore."
# summary
#: ../data/org.gnome.mutter.gschema.xml.in.h:11
#: data/org.gnome.mutter.gschema.xml.in:59
msgid "No tab popup"
msgstr "Bez vyvolávania tabulátorom"
# description
#: ../data/org.gnome.mutter.gschema.xml.in.h:12
#: data/org.gnome.mutter.gschema.xml.in:60
msgid ""
"Determines whether the use of popup and highlight frame should be disabled "
"for window cycling."
@@ -422,12 +422,12 @@ msgstr ""
"vypnúť pri prepínaní okien."
# summary
#: ../data/org.gnome.mutter.gschema.xml.in.h:13
#: data/org.gnome.mutter.gschema.xml.in:68
msgid "Delay focus changes until the pointer stops moving"
msgstr "Odložiť zmeny zamerania až po zastavení pohybu ukazovateľa"
# description
#: ../data/org.gnome.mutter.gschema.xml.in.h:14
#: data/org.gnome.mutter.gschema.xml.in:69
msgid ""
"If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
"the focus will not be changed immediately when entering a window, but only "
@@ -438,12 +438,12 @@ msgstr ""
"okna a zastavení ukazovateľa."
# summary
#: ../data/org.gnome.mutter.gschema.xml.in.h:15
#: data/org.gnome.mutter.gschema.xml.in:79
msgid "Draggable border width"
msgstr "Šírka posúvateľného okraja"
# description
#: ../data/org.gnome.mutter.gschema.xml.in.h:16
#: data/org.gnome.mutter.gschema.xml.in:80
msgid ""
"The amount of total draggable borders. If the theme's visible borders are "
"not enough, invisible borders will be added to meet this value."
@@ -452,12 +452,12 @@ msgstr ""
"nastavené témou, budú pridané neviditeľné okraje až do požadovanej hodnoty."
# summary
#: ../data/org.gnome.mutter.gschema.xml.in.h:17
#: data/org.gnome.mutter.gschema.xml.in:89
msgid "Auto maximize nearly monitor sized windows"
msgstr "Automaticky maximalizovať okná podobnej veľkosti ako je monitor"
# description
#: ../data/org.gnome.mutter.gschema.xml.in.h:18
#: data/org.gnome.mutter.gschema.xml.in:90
msgid ""
"If enabled, new windows that are initially the size of the monitor "
"automatically get maximized."
@@ -465,11 +465,11 @@ msgstr ""
"Ak je povolené, nové okná inicializované na veľkosť monitora budú "
"automaticky maximalizované."
#: ../data/org.gnome.mutter.gschema.xml.in.h:19
#: data/org.gnome.mutter.gschema.xml.in:98
msgid "Place new windows in the center"
msgstr "Umiestniť nové okná do stredu"
#: ../data/org.gnome.mutter.gschema.xml.in.h:20
#: data/org.gnome.mutter.gschema.xml.in:99
msgid ""
"When true, the new windows will always be put in the center of the active "
"screen of the monitor."
@@ -478,103 +478,114 @@ msgstr ""
"obrazovky monitoru."
# summary
#: ../data/org.gnome.mutter.gschema.xml.in.h:21
#: data/org.gnome.mutter.gschema.xml.in:120
msgid "Select window from tab popup"
msgstr "Vybrať okno z rozbaľovacej ponuky tabulátora"
# summary
#: ../data/org.gnome.mutter.gschema.xml.in.h:22
#: data/org.gnome.mutter.gschema.xml.in:125
msgid "Cancel tab popup"
msgstr "Zrušit rozbaľovaciu ponuku tabulátora"
# description
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:1
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Prepnúť na VT č. 1"
# description
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:2
#: data/org.gnome.mutter.wayland.gschema.xml.in:10
msgid "Switch to VT 2"
msgstr "Prepnúť na VT č. 2"
# description
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:3
#: data/org.gnome.mutter.wayland.gschema.xml.in:14
msgid "Switch to VT 3"
msgstr "Prepnúť na VT č. 3"
# description
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:4
#: data/org.gnome.mutter.wayland.gschema.xml.in:18
msgid "Switch to VT 4"
msgstr "Prepnúť na VT č. 4"
# description
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:5
#: data/org.gnome.mutter.wayland.gschema.xml.in:22
msgid "Switch to VT 5"
msgstr "Prepnúť na VT č. 5"
# description
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:6
#: data/org.gnome.mutter.wayland.gschema.xml.in:26
msgid "Switch to VT 6"
msgstr "Prepnúť na VT č. 6"
# description
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:7
#: data/org.gnome.mutter.wayland.gschema.xml.in:30
msgid "Switch to VT 7"
msgstr "Prepnúť na VT č. 7"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
#: data/org.gnome.mutter.wayland.gschema.xml.in:34
msgid "Switch to VT 8"
msgstr "Prepnúť na VT č. 8"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
#: data/org.gnome.mutter.wayland.gschema.xml.in:38
msgid "Switch to VT 9"
msgstr "Prepnúť na VT č. 9"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
#: data/org.gnome.mutter.wayland.gschema.xml.in:42
msgid "Switch to VT 10"
msgstr "Prepnúť na VT č. 10"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
#: data/org.gnome.mutter.wayland.gschema.xml.in:46
msgid "Switch to VT 11"
msgstr "Prepnúť na VT č. 11"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
#: data/org.gnome.mutter.wayland.gschema.xml.in:50
msgid "Switch to VT 12"
msgstr "Prepnúť na VT č. 12"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1759
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Prepínač režimu (skupina č. %d)"
# PK: predpokladam ze to prepisane medzi tlacidlami
# description
#: ../src/backends/meta-input-settings.c:1601
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1781
msgid "Switch monitor"
msgstr "Prepnúť monitor"
#: ../src/backends/meta-input-settings.c:1603
#: src/backends/meta-input-settings.c:1783
msgid "Show on-screen help"
msgstr "Zobraziť pomocníka na obrazovke"
#: ../src/backends/meta-monitor-manager.c:515
#: src/backends/meta-monitor-manager.c:675
msgid "Built-in display"
msgstr "Vstavaný displej"
#: ../src/backends/meta-monitor-manager.c:538
#: src/backends/meta-monitor-manager.c:698
msgid "Unknown"
msgstr "Neznámy"
#: ../src/backends/meta-monitor-manager.c:540
#: src/backends/meta-monitor-manager.c:700
msgid "Unknown Display"
msgstr "Neznámy displej"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: ../src/backends/meta-monitor-manager.c:548
#: src/backends/meta-monitor-manager.c:708
#, c-format
msgid "%s %s"
msgstr "%s %s"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: ../src/compositor/compositor.c:463
#: src/compositor/compositor.c:471
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display \"%s"
@@ -582,85 +593,86 @@ msgid ""
msgstr ""
"Pre obrazovku č. %i na displeji „%s“ je spustený už iný správca rozloženia."
#: ../src/core/bell.c:194
#: src/core/bell.c:194
msgid "Bell event"
msgstr "Udalosť zvončeka"
# %s is a window title
#: ../src/core/delete.c:127
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "„%s“ neodpovedá."
#: ../src/core/delete.c:129
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "Aplikácia neodpovedá."
#: ../src/core/delete.c:134
#: src/core/delete.c:134
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Môžete chvíľu počkať na pokračovanie aplikácie, alebo ju môžete ukončiť."
#: ../src/core/delete.c:141
msgid "_Wait"
msgstr "_Počkať"
#: ../src/core/delete.c:141
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Vynútiť ukončenie"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Počkať"
# X window system preloz, napr. system na spravu okien X
#: ../src/core/display.c:590
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "Zlyhalo otvorenie displeja systému na správu okien X „%s“\n"
# cmd desc
#: ../src/core/main.c:182
#: src/core/main.c:187
msgid "Disable connection to session manager"
msgstr "Zakáže pripojenia k správcovi relácií"
# cmd desc
#: ../src/core/main.c:188
#: src/core/main.c:193
msgid "Replace the running window manager"
msgstr "Nahradí bežiaceho správcu okien"
# cmd desc
#: ../src/core/main.c:194
#: src/core/main.c:199
msgid "Specify session management ID"
msgstr "Zadá identifikátor správy relácií"
#: ../src/core/main.c:199
#: src/core/main.c:204
msgid "X Display to use"
msgstr "X displej, ktorý bude použitý"
# cmd desc
#: ../src/core/main.c:205
#: src/core/main.c:210
msgid "Initialize session from savefile"
msgstr "Inicializuje reláciu z uloženého súboru"
# cmd desc
#: ../src/core/main.c:211
#: src/core/main.c:216
msgid "Make X calls synchronous"
msgstr "Použije synchrónne volania X"
# cmd desc
#: ../src/core/main.c:218
#: src/core/main.c:223
msgid "Run as a wayland compositor"
msgstr "Spustí ako kompozitor protokolu wayland"
# cmd desc
#: ../src/core/main.c:224
#: src/core/main.c:229
msgid "Run as a nested compositor"
msgstr "Spustí ako kompozitor s vnoreným režimom"
#: ../src/core/main.c:232
#: src/core/main.c:237
msgid "Run as a full display server, rather than nested"
msgstr "Spustí ako plnohodnotný zobrazovací server, namiesto vnoreného režimu"
#: ../src/core/mutter.c:39
#: src/core/mutter.c:39
#, c-format
msgid ""
"mutter %s\n"
@@ -676,21 +688,21 @@ msgstr ""
"Záruka sa NEPOSKYTUJE; ani na PREDAJNOSŤ alebo VHODNOSŤ PRE URČITÝ ÚČEL.\n"
# cmd desc
#: ../src/core/mutter.c:53
#: src/core/mutter.c:53
msgid "Print version"
msgstr "Zobrazí verziu"
# cmd desc
#: ../src/core/mutter.c:59
#: src/core/mutter.c:59
msgid "Mutter plugin to use"
msgstr "Použije zásuvný modul Mutter"
#: ../src/core/prefs.c:1997
#: src/core/prefs.c:1997
#, c-format
msgid "Workspace %d"
msgstr "Pracovný priestor č. %d"
#: ../src/core/screen.c:521
#: src/core/screen.c:580
#, c-format
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
@@ -699,21 +711,21 @@ msgstr ""
"Displej „%s“ už má správcu okien. Skúste použiť prepínač --replace, aby sa "
"aktuálny správca nahradil."
#: ../src/core/screen.c:603
#: src/core/screen.c:665
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgstr "Obrazovka č. %d na displeji „%s“ nie je platná\n"
#: ../src/core/util.c:120
#: src/core/util.c:120
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter bol skompilovaný bez výpisu podrobností pri behu\n"
#: ../src/wayland/meta-wayland-tablet-pad.c:595
#: src/wayland/meta-wayland-tablet-pad.c:563
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "Prepínač režimu: Režim č. %d"
#: ../src/x11/session.c:1815
#: src/x11/session.c:1815
msgid ""
"These windows do not support &quot;save current setup&quot; and will have to "
"be restarted manually next time you log in."
@@ -722,7 +734,7 @@ msgstr ""
"prihlásení ich budete musieť znovu spustiť ručne."
# window title; wm_client_machine
#: ../src/x11/window-props.c:548
#: src/x11/window-props.c:559
#, c-format
msgid "%s (on %s)"
msgstr "%s (na %s)"

285
po/sl.po
View File

@@ -4,276 +4,275 @@
#
# Andraž Tori <andraz.tori1@guest.arnes.si>, 2000.
# Matjaž Horvat <m@owca.info>, 2006.
# Matej Urbančič <mateju@svn.gnome.org>, 2007-2016.
# Matej Urbančič <mateju@svn.gnome.org>, 20072017.
#
msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2016-08-18 22:38+0200\n"
"PO-Revision-Date: 2016-08-18 22:39+0200\n"
"POT-Creation-Date: 2017-02-14 08:48+0100\n"
"PO-Revision-Date: 2017-02-14 08:48+0100\n"
"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
"Language: sl_SI\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n"
"%100==4 ? 3 : 0);\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0);\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Generator: Poedit 1.8.7.1\n"
"X-Generator: Poedit 1.8.9\n"
#: ../data/50-mutter-navigation.xml.in.h:1
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
msgstr "Krmarjenje"
#: ../data/50-mutter-navigation.xml.in.h:2
#: data/50-mutter-navigation.xml:9
msgid "Move window to workspace 1"
msgstr "Premakni okno na delovno površino 1"
#: ../data/50-mutter-navigation.xml.in.h:3
#: data/50-mutter-navigation.xml:12
msgid "Move window to workspace 2"
msgstr "Premakni okno na delovno površino 2"
#: ../data/50-mutter-navigation.xml.in.h:4
#: data/50-mutter-navigation.xml:15
msgid "Move window to workspace 3"
msgstr "Premakni okno na delovno površino 3"
#: ../data/50-mutter-navigation.xml.in.h:5
#: data/50-mutter-navigation.xml:18
msgid "Move window to workspace 4"
msgstr "Premakni okno na delovno površino 4"
#: ../data/50-mutter-navigation.xml.in.h:6
#: data/50-mutter-navigation.xml:21
msgid "Move window to last workspace"
msgstr "Premakni okno na zadnjo delovno površino"
#: ../data/50-mutter-navigation.xml.in.h:7
#: data/50-mutter-navigation.xml:24
msgid "Move window one workspace to the left"
msgstr "Premakni okno eno delovno površino levo"
#: ../data/50-mutter-navigation.xml.in.h:8
#: data/50-mutter-navigation.xml:27
msgid "Move window one workspace to the right"
msgstr "Premakni okno eno delovno površino desno"
#: ../data/50-mutter-navigation.xml.in.h:9
#: data/50-mutter-navigation.xml:30
msgid "Move window one workspace up"
msgstr "Premakni okno eno delovno površino navzgor"
#: ../data/50-mutter-navigation.xml.in.h:10
#: data/50-mutter-navigation.xml:33
msgid "Move window one workspace down"
msgstr "Prestavi okno eno delovno površino navzdol"
#: ../data/50-mutter-navigation.xml.in.h:11
#: data/50-mutter-navigation.xml:36
msgid "Move window one monitor to the left"
msgstr "Premakni okno en zaslon levo"
#: ../data/50-mutter-navigation.xml.in.h:12
#: data/50-mutter-navigation.xml:39
msgid "Move window one monitor to the right"
msgstr "Premakni okno en zaslon desno"
#: ../data/50-mutter-navigation.xml.in.h:13
#: data/50-mutter-navigation.xml:42
msgid "Move window one monitor up"
msgstr "Premakni okno en zaslon navzgor"
#: ../data/50-mutter-navigation.xml.in.h:14
#: data/50-mutter-navigation.xml:45
msgid "Move window one monitor down"
msgstr "Prestavi okno en zaslon navzdol"
#: ../data/50-mutter-navigation.xml.in.h:15
#: data/50-mutter-navigation.xml:49
msgid "Switch applications"
msgstr "Preklopi programe"
#: ../data/50-mutter-navigation.xml.in.h:16
#: data/50-mutter-navigation.xml:54
msgid "Switch to previous application"
msgstr "Preklopi na prejšnji program"
#: ../data/50-mutter-navigation.xml.in.h:17
#: data/50-mutter-navigation.xml:58
msgid "Switch windows"
msgstr "Preklopi okna"
#: ../data/50-mutter-navigation.xml.in.h:18
#: data/50-mutter-navigation.xml:63
msgid "Switch to previous window"
msgstr "Preklopi na prejšnje okno"
#: ../data/50-mutter-navigation.xml.in.h:19
#: data/50-mutter-navigation.xml:67
msgid "Switch windows of an application"
msgstr "Preklopi okna programa"
#: ../data/50-mutter-navigation.xml.in.h:20
#: data/50-mutter-navigation.xml:72
msgid "Switch to previous window of an application"
msgstr "Preklopi na predhodno okno programa"
#: ../data/50-mutter-navigation.xml.in.h:21
#: data/50-mutter-navigation.xml:76
msgid "Switch system controls"
msgstr "Preklopi tipkovne bližnjice"
#: ../data/50-mutter-navigation.xml.in.h:22
#: data/50-mutter-navigation.xml:81
msgid "Switch to previous system control"
msgstr "Preklopi na predhodno sistemsko okno"
#: ../data/50-mutter-navigation.xml.in.h:23
#: data/50-mutter-navigation.xml:85
msgid "Switch windows directly"
msgstr "Preklopi okna neposredno"
#: ../data/50-mutter-navigation.xml.in.h:24
#: data/50-mutter-navigation.xml:90
msgid "Switch directly to previous window"
msgstr "Preklopi na predhodno okno"
#: ../data/50-mutter-navigation.xml.in.h:25
#: data/50-mutter-navigation.xml:94
msgid "Switch windows of an app directly"
msgstr "Preklopi okna programa neposredno"
#: ../data/50-mutter-navigation.xml.in.h:26
#: data/50-mutter-navigation.xml:99
msgid "Switch directly to previous window of an app"
msgstr "Preklopi na predhodno okno programa"
#: ../data/50-mutter-navigation.xml.in.h:27
#: data/50-mutter-navigation.xml:103
msgid "Switch system controls directly"
msgstr "Preklopi tipkovne bližnjice neposredno"
#: ../data/50-mutter-navigation.xml.in.h:28
#: data/50-mutter-navigation.xml:108
msgid "Switch directly to previous system control"
msgstr "Preklopi na predhodno sistemsko okno"
#: ../data/50-mutter-navigation.xml.in.h:29
#: data/50-mutter-navigation.xml:111
msgid "Hide all normal windows"
msgstr "Skrij vsa običajna okna"
#: ../data/50-mutter-navigation.xml.in.h:30
#: data/50-mutter-navigation.xml:114
msgid "Switch to workspace 1"
msgstr "Preklopi na delovno površino 1"
#: ../data/50-mutter-navigation.xml.in.h:31
#: data/50-mutter-navigation.xml:117
msgid "Switch to workspace 2"
msgstr "Preklopi na delovno površino 2"
#: ../data/50-mutter-navigation.xml.in.h:32
#: data/50-mutter-navigation.xml:120
msgid "Switch to workspace 3"
msgstr "Preklopi na delovno površino 3"
#: ../data/50-mutter-navigation.xml.in.h:33
#: data/50-mutter-navigation.xml:123
msgid "Switch to workspace 4"
msgstr "Preklopi na delovno površino 4"
#: ../data/50-mutter-navigation.xml.in.h:34
#: data/50-mutter-navigation.xml:126
msgid "Switch to last workspace"
msgstr "Preklopi na zadnjo delovno površino"
#: ../data/50-mutter-navigation.xml.in.h:35
#: data/50-mutter-navigation.xml:129
msgid "Move to workspace left"
msgstr "Premakni na levo delovno površino"
#: ../data/50-mutter-navigation.xml.in.h:36
#: data/50-mutter-navigation.xml:132
msgid "Move to workspace right"
msgstr "Premakni na desno delovno površino"
#: ../data/50-mutter-navigation.xml.in.h:37
#: data/50-mutter-navigation.xml:135
msgid "Move to workspace above"
msgstr "Premakni na zgornjo delovno površino"
#: ../data/50-mutter-navigation.xml.in.h:38
#: data/50-mutter-navigation.xml:138
msgid "Move to workspace below"
msgstr "Premakni na spodnjo delovno površino"
#: ../data/50-mutter-system.xml.in.h:1
#: data/50-mutter-system.xml:6
msgid "System"
msgstr "Sistem"
#: ../data/50-mutter-system.xml.in.h:2
#: data/50-mutter-system.xml:8
msgid "Show the run command prompt"
msgstr "Pokaži možnost zagona ukazne vrstice"
#: ../data/50-mutter-system.xml.in.h:3
#: data/50-mutter-system.xml:10
msgid "Show the activities overview"
msgstr "Pokaži okno pregleda dejavnosti"
#: ../data/50-mutter-windows.xml.in.h:1
#: data/50-mutter-windows.xml:6
msgid "Windows"
msgstr "Okna"
#: ../data/50-mutter-windows.xml.in.h:2
#: data/50-mutter-windows.xml:8
msgid "Activate the window menu"
msgstr "Omogoči meni okna"
#: ../data/50-mutter-windows.xml.in.h:3
#: data/50-mutter-windows.xml:10
msgid "Toggle fullscreen mode"
msgstr "Preklopi celozaslonski način"
#: ../data/50-mutter-windows.xml.in.h:4
#: data/50-mutter-windows.xml:12
msgid "Toggle maximization state"
msgstr "Preklopi stanje razpetosti"
# G:1 K:0 O:0
#: ../data/50-mutter-windows.xml.in.h:5
#: data/50-mutter-windows.xml:14
msgid "Maximize window"
msgstr "Razpni okno"
#: ../data/50-mutter-windows.xml.in.h:6
#: data/50-mutter-windows.xml:16
msgid "Restore window"
msgstr "Obnovi okno"
#: ../data/50-mutter-windows.xml.in.h:7
#: data/50-mutter-windows.xml:18
msgid "Toggle shaded state"
msgstr "Preklopi stanje senčenja"
#: ../data/50-mutter-windows.xml.in.h:8
#: data/50-mutter-windows.xml:20
msgid "Close window"
msgstr "Zapri okno"
#: ../data/50-mutter-windows.xml.in.h:9
#: data/50-mutter-windows.xml:22
msgid "Hide window"
msgstr "Skrij okno"
#: ../data/50-mutter-windows.xml.in.h:10
#: data/50-mutter-windows.xml:24
msgid "Move window"
msgstr "Premakni okno"
#: ../data/50-mutter-windows.xml.in.h:11
#: data/50-mutter-windows.xml:26
msgid "Resize window"
msgstr "Spremeni velikost okna"
#: ../data/50-mutter-windows.xml.in.h:12
#: data/50-mutter-windows.xml:29
msgid "Toggle window on all workspaces or one"
msgstr "Preklopi okno na vse delovne površine oziroma le na eno"
#: ../data/50-mutter-windows.xml.in.h:13
#: data/50-mutter-windows.xml:31
msgid "Raise window if covered, otherwise lower it"
msgstr "Dvigni okno, če ga prekriva drugo okno, sicer ga spusti"
#: ../data/50-mutter-windows.xml.in.h:14
#: data/50-mutter-windows.xml:33
msgid "Raise window above other windows"
msgstr "Dvigni okno nad druga okna"
#: ../data/50-mutter-windows.xml.in.h:15
#: data/50-mutter-windows.xml:35
msgid "Lower window below other windows"
msgstr "Spusti okno pod druga"
#: ../data/50-mutter-windows.xml.in.h:16
#: data/50-mutter-windows.xml:37
msgid "Maximize window vertically"
msgstr "Razpni okno navpično"
#: ../data/50-mutter-windows.xml.in.h:17
#: data/50-mutter-windows.xml:39
msgid "Maximize window horizontally"
msgstr "Razpni okno vodoravno"
#: ../data/50-mutter-windows.xml.in.h:18
#: data/50-mutter-windows.xml:43
msgid "View split on left"
msgstr "Poglej razdelek na levi"
#: ../data/50-mutter-windows.xml.in.h:19
#: data/50-mutter-windows.xml:47
msgid "View split on right"
msgstr "Poglej razdelek na desni"
#: ../data/mutter.desktop.in.h:1
#: data/mutter.desktop.in:4
msgid "Mutter"
msgstr "Mutter"
#: ../data/org.gnome.mutter.gschema.xml.in.h:1
#: data/org.gnome.mutter.gschema.xml.in:7
msgid "Modifier to use for extended window management operations"
msgstr "Spremenilnik, ki naj se uporabi za upravljanje oken"
#: ../data/org.gnome.mutter.gschema.xml.in.h:2
#: data/org.gnome.mutter.gschema.xml.in:8
msgid ""
"This key will initiate the \"overlay\", which is a combination window "
"overview and application launching system. The default is intended to be the "
@@ -285,11 +284,11 @@ msgstr ""
"računalnika. Pričakovano je, da je vrednost določena privzeto ali pa ni "
"določena."
#: ../data/org.gnome.mutter.gschema.xml.in.h:3
#: data/org.gnome.mutter.gschema.xml.in:20
msgid "Attach modal dialogs"
msgstr "Pripni modalna pogovorna okna"
#: ../data/org.gnome.mutter.gschema.xml.in.h:4
#: data/org.gnome.mutter.gschema.xml.in:21
msgid ""
"When true, instead of having independent titlebars, modal dialogs appear "
"attached to the titlebar of the parent window and are moved together with "
@@ -298,11 +297,11 @@ msgstr ""
"Izbrana možnost omogoči, da je namesto samostojnih nazivnih vrstic, na to "
"mesto pripeto modalno pogovorno okno, ki se premika z nadrejenim oknom."
#: ../data/org.gnome.mutter.gschema.xml.in.h:5
#: data/org.gnome.mutter.gschema.xml.in:30
msgid "Enable edge tiling when dropping windows on screen edges"
msgstr "Omogoči prilagajanje velikosti okna ob dotiku robov zaslona"
#: ../data/org.gnome.mutter.gschema.xml.in.h:6
#: data/org.gnome.mutter.gschema.xml.in:31
msgid ""
"If enabled, dropping windows on vertical screen edges maximizes them "
"vertically and resizes them horizontally to cover half of the available "
@@ -312,11 +311,11 @@ msgstr ""
"razpeta po navpični osi in razširjena na polovično širino. Dotik vrhnjega "
"roba razpne okno čez cel zaslon."
#: ../data/org.gnome.mutter.gschema.xml.in.h:7
#: data/org.gnome.mutter.gschema.xml.in:40
msgid "Workspaces are managed dynamically"
msgstr "Število delovnih površin je spremenljivo"
#: ../data/org.gnome.mutter.gschema.xml.in.h:8
#: data/org.gnome.mutter.gschema.xml.in:41
msgid ""
"Determines whether workspaces are managed dynamically or whether there's a "
"static number of workspaces (determined by the num-workspaces key in org."
@@ -326,11 +325,11 @@ msgstr ""
"število stalno (določenih s ključem števila delovnih površin med možnostmi v "
"org.gnome.desktop.wm.preferences)."
#: ../data/org.gnome.mutter.gschema.xml.in.h:9
#: data/org.gnome.mutter.gschema.xml.in:50
msgid "Workspaces only on primary"
msgstr "Delovne površine le na prvem zaslonu"
#: ../data/org.gnome.mutter.gschema.xml.in.h:10
#: data/org.gnome.mutter.gschema.xml.in:51
msgid ""
"Determines whether workspace switching should happen for windows on all "
"monitors or only for windows on the primary monitor."
@@ -338,11 +337,11 @@ msgstr ""
"Določa ali naj se delovne površine preklapljajo na vseh zaslonih ali le na "
"prvem, glavnem zaslonu."
#: ../data/org.gnome.mutter.gschema.xml.in.h:11
#: data/org.gnome.mutter.gschema.xml.in:59
msgid "No tab popup"
msgstr "Brez pojavnih zavihkov"
#: ../data/org.gnome.mutter.gschema.xml.in.h:12
#: data/org.gnome.mutter.gschema.xml.in:60
msgid ""
"Determines whether the use of popup and highlight frame should be disabled "
"for window cycling."
@@ -350,11 +349,11 @@ msgstr ""
"Določa ali naj bo uporaba pojavnih zavihkov in poudarjanja onemogočena med "
"kroženjem oken."
#: ../data/org.gnome.mutter.gschema.xml.in.h:13
#: data/org.gnome.mutter.gschema.xml.in:68
msgid "Delay focus changes until the pointer stops moving"
msgstr "Zamakni spremembe žarišča, dokler se kazalnik še premika"
#: ../data/org.gnome.mutter.gschema.xml.in.h:14
#: data/org.gnome.mutter.gschema.xml.in:69
msgid ""
"If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
"the focus will not be changed immediately when entering a window, but only "
@@ -364,11 +363,11 @@ msgstr ""
"ali \"miška\", ne spremeni takoj ob izbiri okna. Žarišče se spremeni, ko se "
"kazalnik preneha premikati."
#: ../data/org.gnome.mutter.gschema.xml.in.h:15
#: data/org.gnome.mutter.gschema.xml.in:79
msgid "Draggable border width"
msgstr "Prilagodljiva obroba pravokotnika"
#: ../data/org.gnome.mutter.gschema.xml.in.h:16
#: data/org.gnome.mutter.gschema.xml.in:80
msgid ""
"The amount of total draggable borders. If the theme's visible borders are "
"not enough, invisible borders will be added to meet this value."
@@ -376,11 +375,11 @@ msgstr ""
"Delež skupne prilagodljive obrobe. V kolikor vidni robovi teme niso dovolj, "
"so dodane nevidne obrobe, za dodatno prilagajanje."
#: ../data/org.gnome.mutter.gschema.xml.in.h:17
#: data/org.gnome.mutter.gschema.xml.in:89
msgid "Auto maximize nearly monitor sized windows"
msgstr "Samodejno razpni okna, ki so skoraj enaka velikosti zaslona"
#: ../data/org.gnome.mutter.gschema.xml.in.h:18
#: data/org.gnome.mutter.gschema.xml.in:90
msgid ""
"If enabled, new windows that are initially the size of the monitor "
"automatically get maximized."
@@ -388,104 +387,115 @@ msgstr ""
"Izbrana možnost omogoča, da bodo okna, ki so skoraj tako velika, kot je "
"velik zaslon, med preslikavo samodejno razpeta."
#: ../data/org.gnome.mutter.gschema.xml.in.h:19
#: data/org.gnome.mutter.gschema.xml.in:98
msgid "Place new windows in the center"
msgstr "Postavi novo okno v središče"
#: ../data/org.gnome.mutter.gschema.xml.in.h:20
#: data/org.gnome.mutter.gschema.xml.in:99
msgid ""
"When true, the new windows will always be put in the center of the active "
"screen of the monitor."
msgstr ""
"Izbrana možnost določa, da bo novo okno vedno v središču dejavnega zaslona."
#: ../data/org.gnome.mutter.gschema.xml.in.h:21
#: data/org.gnome.mutter.gschema.xml.in:120
msgid "Select window from tab popup"
msgstr "Izbor okna iz pojavnega zavihka"
#: ../data/org.gnome.mutter.gschema.xml.in.h:22
#: data/org.gnome.mutter.gschema.xml.in:125
msgid "Cancel tab popup"
msgstr "Prekliči pojavni zavihek"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:1
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Preklopi na VT 1"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:2
#: data/org.gnome.mutter.wayland.gschema.xml.in:10
msgid "Switch to VT 2"
msgstr "Preklopi na VT 2"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:3
#: data/org.gnome.mutter.wayland.gschema.xml.in:14
msgid "Switch to VT 3"
msgstr "Preklopi na VT 3"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:4
#: data/org.gnome.mutter.wayland.gschema.xml.in:18
msgid "Switch to VT 4"
msgstr "Preklopi na VT 4"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:5
#: data/org.gnome.mutter.wayland.gschema.xml.in:22
msgid "Switch to VT 5"
msgstr "Preklopi na VT 5"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:6
#: data/org.gnome.mutter.wayland.gschema.xml.in:26
msgid "Switch to VT 6"
msgstr "Preklopi na VT 6"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:7
#: data/org.gnome.mutter.wayland.gschema.xml.in:30
msgid "Switch to VT 7"
msgstr "Preklopi na VT 7"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
#: data/org.gnome.mutter.wayland.gschema.xml.in:34
msgid "Switch to VT 8"
msgstr "Preklopi na VT 8"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
#: data/org.gnome.mutter.wayland.gschema.xml.in:38
msgid "Switch to VT 9"
msgstr "Preklopi na VT 9"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
#: data/org.gnome.mutter.wayland.gschema.xml.in:42
msgid "Switch to VT 10"
msgstr "Preklopi na VT 10"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
#: data/org.gnome.mutter.wayland.gschema.xml.in:46
msgid "Switch to VT 11"
msgstr "Preklopi na VT 11"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
#: data/org.gnome.mutter.wayland.gschema.xml.in:50
msgid "Switch to VT 12"
msgstr "Preklopi na VT 12"
#: ../src/backends/meta-input-settings.c:1707
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1759
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Preklop načina (skupina %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1781
msgid "Switch monitor"
msgstr "Nadzornik preklopa"
#: ../src/backends/meta-input-settings.c:1709
#: src/backends/meta-input-settings.c:1783
msgid "Show on-screen help"
msgstr "Pokaži zaslonsko pomoč"
#: ../src/backends/meta-monitor-manager.c:514
#: src/backends/meta-monitor-manager.c:675
msgid "Built-in display"
msgstr "Vgrajen zaslon"
#: ../src/backends/meta-monitor-manager.c:537
#: src/backends/meta-monitor-manager.c:698
msgid "Unknown"
msgstr "Neznano"
#: ../src/backends/meta-monitor-manager.c:539
#: src/backends/meta-monitor-manager.c:700
msgid "Unknown Display"
msgstr "Neznan zaslon"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: ../src/backends/meta-monitor-manager.c:547
#: src/backends/meta-monitor-manager.c:708
#, c-format
msgid "%s %s"
msgstr "%s %s"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: ../src/compositor/compositor.c:463
#: src/compositor/compositor.c:471
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display \"%s"
@@ -493,20 +503,21 @@ msgid ""
msgstr ""
"Drug upravljalnik sestavljanja je že zagnan na zaslonu %i prikaza \"%s\"."
#: ../src/core/bell.c:194
#: src/core/bell.c:194
msgid "Bell event"
msgstr "Dogodek zvonjenja"
#: ../src/core/delete.c:127
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "“%s” se ne odziva."
#: ../src/core/delete.c:129
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "Program se ne odziva."
#: ../src/core/delete.c:134
#: src/core/delete.c:134
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
@@ -514,56 +525,56 @@ msgstr ""
"Lahko še malo počakate, če program morda spet začne delovati, ali pa vsilite "
"končanje delovanja."
#: ../src/core/delete.c:141
msgid "_Wait"
msgstr "_Počakaj"
#: ../src/core/delete.c:141
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Vsili konec"
#: ../src/core/display.c:590
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Počakaj"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "Ni mogoče odpreti zaslona '%s' okenskega sistema X\n"
#: ../src/core/main.c:182
#: src/core/main.c:187
msgid "Disable connection to session manager"
msgstr "Onemogoči povezavo z upravljalnikom sej"
#: ../src/core/main.c:188
#: src/core/main.c:193
msgid "Replace the running window manager"
msgstr "Zamenjaj trenutni upravljalnik oken"
#: ../src/core/main.c:194
#: src/core/main.c:199
msgid "Specify session management ID"
msgstr "Navedite ID upravljanja seje"
#: ../src/core/main.c:199
#: src/core/main.c:204
msgid "X Display to use"
msgstr "Zaslon X za uporabo"
#: ../src/core/main.c:205
#: src/core/main.c:210
msgid "Initialize session from savefile"
msgstr "Začni sejo iz shranjene datoteke"
#: ../src/core/main.c:211
#: src/core/main.c:216
msgid "Make X calls synchronous"
msgstr "Uskladi klice X"
#: ../src/core/main.c:218
#: src/core/main.c:223
msgid "Run as a wayland compositor"
msgstr "Zaženi izbirnik wayland"
#: ../src/core/main.c:224
#: src/core/main.c:229
msgid "Run as a nested compositor"
msgstr "Zaženi kot gnezden vpisovalnik"
#: ../src/core/main.c:232
#: src/core/main.c:237
msgid "Run as a full display server, rather than nested"
msgstr "Zaženi kot polni strežnik zaslona in ne vstavljeno"
#: ../src/core/mutter.c:39
#: src/core/mutter.c:39
#, c-format
msgid ""
"mutter %s\n"
@@ -578,21 +589,21 @@ msgstr ""
"kodo.\n"
"Program je na voljo BREZ KAKRŠNIHKOLI ZAGOTOVIL.\n"
#: ../src/core/mutter.c:53
#: src/core/mutter.c:53
msgid "Print version"
msgstr "Izpiši različico"
#: ../src/core/mutter.c:59
#: src/core/mutter.c:59
msgid "Mutter plugin to use"
msgstr "Vstavek Mutter za uporabo"
# G:1 K:0 O:0
#: ../src/core/prefs.c:1997
#: src/core/prefs.c:1997
#, c-format
msgid "Workspace %d"
msgstr "Delovna površina %d"
#: ../src/core/screen.c:521
#: src/core/screen.c:580
#, c-format
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
@@ -601,23 +612,23 @@ msgstr ""
"Zaslon \"%s\" že ima določen upravljalnik oken; poskušajte uporabiti možnost "
"--replace za zamenjavo trenutnega upravljalnika zaslona."
#: ../src/core/screen.c:606
#: src/core/screen.c:665
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgstr "Zaslon %d na prikazu '%s' ni veljaven\n"
#: ../src/core/util.c:120
#: src/core/util.c:120
msgid "Mutter was compiled without support for verbose mode\n"
msgstr ""
"Program Mutter je kodno preveden brez podpore za podrobni način izpisovanja\n"
#: ../src/wayland/meta-wayland-tablet-pad.c:595
#: src/wayland/meta-wayland-tablet-pad.c:563
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "Način preklopa: način %d"
# G:2 K:6 O:0
#: ../src/x11/session.c:1815
#: src/x11/session.c:1815
msgid ""
"These windows do not support &quot;save current setup&quot; and will have to "
"be restarted manually next time you log in."
@@ -625,7 +636,7 @@ msgstr ""
"Ta okna ne podpirajo možnosti &quot;shranjevanja trenutnih nastavitev&quot;, "
"zato jih bo treba ob naslednji prijavi zagnati ročno."
#: ../src/x11/window-props.c:548
#: src/x11/window-props.c:559
#, c-format
msgid "%s (on %s)"
msgstr "%s (na %s)"

121
po/sv.po
View File

@@ -1,9 +1,9 @@
# Swedish messages for mutter.
# Copyright © 2001-2016 Free Software Foundation, Inc.
# Copyright © 2001-2017 Free Software Foundation, Inc.
# Christian Rose <menthos@menthos.com>, 2001, 2002, 2003, 2004, 2005.
# Daniel Nylander <po@danielnylander.se>, 2006, 2007, 2008, 2009, 2010, 2011, 2012.
# Mattias Eriksson <snaggen@gmail.com>, 2014.
# Anders Jonsson <anders.jonsson@norsjovallen.se>, 2015, 2016.
# Anders Jonsson <anders.jonsson@norsjovallen.se>, 2015, 2016, 2017.
# Sebastian Rasmussen <sebras@gmail.com>, 2016.
#
msgid ""
@@ -11,15 +11,15 @@ msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2016-09-07 09:27+0000\n"
"PO-Revision-Date: 2016-09-07 11:54+0200\n"
"POT-Creation-Date: 2017-02-16 21:09+0000\n"
"PO-Revision-Date: 2017-02-21 01:20+0100\n"
"Last-Translator: Anders Jonsson <anders.jonsson@norsjovallen.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
"Language: sv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.8\n"
"X-Generator: Poedit 1.8.11\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@@ -271,15 +271,15 @@ msgstr "Modifierare att använda för utökade fönsterhanteringsåtgärder"
#: data/org.gnome.mutter.gschema.xml.in:8
msgid ""
"This key will initiate the \"overlay\", which is a combination window "
"overview and application launching system. The default is intended to be the "
"\"Windows key\" on PC hardware. It's expected that this binding either the "
"default or set to the empty string."
"This key will initiate the overlay, which is a combination window overview "
"and application launching system. The default is intended to be the “Windows "
"key on PC hardware. Its expected that this binding either the default or "
"set to the empty string."
msgstr ""
"Denna nyckel kommer att initiera \"overlay\", som är en kombinerad "
"fönsteröversikt och programstartare. Standard är tänkt att vara \"Windows-"
"tangenten\" på PC-maskinvara. Det är förväntat att denna bindning antingen "
"är standard eller inställd till en tom sträng."
"Denna nyckel kommer att initiera overlay, som är en kombinerad "
"fönsteröversikt och programstartare. Standard är tänkt att vara Windows-"
"tangenten på PC-maskinvara. Det är förväntat att denna bindning antingen är "
"standard eller inställd till en tom sträng."
#: data/org.gnome.mutter.gschema.xml.in:20
msgid "Attach modal dialogs"
@@ -315,7 +315,7 @@ msgstr "Arbetsytor hanteras dynamiskt"
#: data/org.gnome.mutter.gschema.xml.in:41
msgid ""
"Determines whether workspaces are managed dynamically or whether there's a "
"Determines whether workspaces are managed dynamically or whether theres a "
"static number of workspaces (determined by the num-workspaces key in org."
"gnome.desktop.wm.preferences)."
msgstr ""
@@ -353,11 +353,11 @@ msgstr "Fördröj fokusändringar till muspekaren hålls still"
#: data/org.gnome.mutter.gschema.xml.in:69
msgid ""
"If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
"the focus will not be changed immediately when entering a window, but only "
"after the pointer stops moving."
"If set to true, and the focus mode is either sloppy or mouse then the "
"focus will not be changed immediately when entering a window, but only after "
"the pointer stops moving."
msgstr ""
"Om satt till \"true\", och fokusläget är antingen \"sloppy\" eller \"mouse\" "
"Om satt till true (sant), och fokusläget är antingen sloppy eller mouse "
"kommer fokus inte att ändras omedelbart när muspekaren går in över ett "
"fönster, utan först efter att muspekaren slutar röra sig."
@@ -367,7 +367,7 @@ msgstr "Dragbar rambredd"
#: data/org.gnome.mutter.gschema.xml.in:80
msgid ""
"The amount of total draggable borders. If the theme's visible borders are "
"The amount of total draggable borders. If the themes visible borders are "
"not enough, invisible borders will be added to meet this value."
msgstr ""
"Mängd av totalt dragbara ramar. Om temats synliga ramar inte är tillräckliga "
@@ -453,47 +453,58 @@ msgstr "Växla till VT 11"
msgid "Switch to VT 12"
msgstr "Växla till VT 12"
#: src/backends/meta-input-settings.c:1707
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1800
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Lägesväxel (grupp %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1822
msgid "Switch monitor"
msgstr "Växla skärm"
#: src/backends/meta-input-settings.c:1709
#: src/backends/meta-input-settings.c:1824
msgid "Show on-screen help"
msgstr "Visa hjälp på skärmen"
#: src/backends/meta-monitor-manager.c:514
#: src/backends/meta-monitor-manager.c:675
msgid "Built-in display"
msgstr "Inbyggd display"
#: src/backends/meta-monitor-manager.c:537
#: src/backends/meta-monitor-manager.c:698
msgid "Unknown"
msgstr "Okänd"
#: src/backends/meta-monitor-manager.c:539
#: src/backends/meta-monitor-manager.c:700
msgid "Unknown Display"
msgstr "Okänd display"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:547
#: src/backends/meta-monitor-manager.c:708
#, c-format
msgid "%s %s"
msgstr "%s %s"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: src/compositor/compositor.c:463
#: src/compositor/compositor.c:471
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display \"%s"
"\"."
"Another compositing manager is already running on screen %i on display “%s”."
msgstr "En annan kompositionshanterare körs redan på skärm %i på display ”%s”."
#: src/core/bell.c:194
msgid "Bell event"
msgstr "Ljudsignalhändelse"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
@@ -511,52 +522,52 @@ msgstr ""
"Du kan välja att vänta en kort stund på det för att fortsätta eller tvinga "
"programmet att helt avslutas."
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Vänta"
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Tvinga avslut"
#: src/core/display.c:590
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Vänta"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgid "Failed to open X Window System display %s\n"
msgstr "Misslyckades med att öppna X Window System-displayen ”%s”\n"
#: src/core/main.c:182
#: src/core/main.c:189
msgid "Disable connection to session manager"
msgstr "Inaktivera anslutning till sessionshanteraren"
#: src/core/main.c:188
#: src/core/main.c:195
msgid "Replace the running window manager"
msgstr "Ersätt körande fönsterhanteraren"
#: src/core/main.c:194
#: src/core/main.c:201
msgid "Specify session management ID"
msgstr "Ange sessionshanteringsid"
#: src/core/main.c:199
#: src/core/main.c:206
msgid "X Display to use"
msgstr "X-display att använda"
#: src/core/main.c:205
#: src/core/main.c:212
msgid "Initialize session from savefile"
msgstr "Initiera session från sparandefil"
#: src/core/main.c:211
#: src/core/main.c:218
msgid "Make X calls synchronous"
msgstr "Gör X-anrop synkrona"
#: src/core/main.c:218
#: src/core/main.c:225
msgid "Run as a wayland compositor"
msgstr "Kör som en wayland-kompositionshanterare"
#: src/core/main.c:224
#: src/core/main.c:231
msgid "Run as a nested compositor"
msgstr "Kör som en nästlad kompositionshanterare"
#: src/core/main.c:232
#: src/core/main.c:239
msgid "Run as a full display server, rather than nested"
msgstr "Kör som en full display-tjänst, i stället för nästlad"
@@ -564,7 +575,7 @@ msgstr "Kör som en full display-tjänst, i stället för nästlad"
#, c-format
msgid ""
"mutter %s\n"
"Copyright (C) 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"This is free software; see the source for copying conditions.\n"
"There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A "
"PARTICULAR PURPOSE.\n"
@@ -588,38 +599,38 @@ msgstr "Mutter-insticksmodul att använda"
msgid "Workspace %d"
msgstr "Arbetsyta %d"
#: src/core/screen.c:521
#: src/core/screen.c:580
#, c-format
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
"to replace the current window manager."
"Display “%s” already has a window manager; try using the --replace option to "
"replace the current window manager."
msgstr ""
"Display ”%s” har redan en fönsterhanterare; försök med flaggan --replace för "
"att ersätta den aktuella fönsterhanteraren."
#: src/core/screen.c:606
#: src/core/screen.c:665
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgid "Screen %d on display %s is invalid\n"
msgstr "Skärm %d på display ”%s” är ogiltig\n"
#: src/core/util.c:120
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter kompilerades utan stöd för utförligt läge\n"
#: src/wayland/meta-wayland-tablet-pad.c:595
#: src/wayland/meta-wayland-tablet-pad.c:563
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "Lägesväxel: Läge %d"
#: src/x11/session.c:1815
msgid ""
"These windows do not support &quot;save current setup&quot; and will have to "
"be restarted manually next time you log in."
"These windows do not support save current setup and will have to be "
"restarted manually next time you log in."
msgstr ""
"Dessa fönster saknar stöd för &quot;spara nuvarande inställningar&quot; och "
"kommer att behöva startas om manuellt nästa gång du loggar in."
"Dessa fönster saknar stöd för spara nuvarande inställningar” och kommer att "
"behöva startas om manuellt nästa gång du loggar in."
#: src/x11/window-props.c:548
#: src/x11/window-props.c:559
#, c-format
msgid "%s (on %s)"
msgstr "%s (på %s)"

View File

@@ -17,266 +17,266 @@ msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2016-05-05 13:30+0000\n"
"PO-Revision-Date: 2016-10-30 02:19+0800\n"
"Last-Translator: Tong Hui <tonghuix@gmail.com>\n"
"POT-Creation-Date: 2017-02-03 10:06+0000\n"
"PO-Revision-Date: 2017-01-04 21:52+0800\n"
"Last-Translator: Mandy Wang <wangmychn@gmail.com>\n"
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 1.8.11\n"
"X-Generator: Poedit 1.8.7.1\n"
#: ../data/50-mutter-navigation.xml.in.h:1
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
msgstr "导航"
#: ../data/50-mutter-navigation.xml.in.h:2
#: data/50-mutter-navigation.xml:9
msgid "Move window to workspace 1"
msgstr "将窗口移到工作区 1"
#: ../data/50-mutter-navigation.xml.in.h:3
#: data/50-mutter-navigation.xml:12
msgid "Move window to workspace 2"
msgstr "将窗口移到工作区 2"
#: ../data/50-mutter-navigation.xml.in.h:4
#: data/50-mutter-navigation.xml:15
msgid "Move window to workspace 3"
msgstr "将窗口移到工作区 3"
#: ../data/50-mutter-navigation.xml.in.h:5
#: data/50-mutter-navigation.xml:18
msgid "Move window to workspace 4"
msgstr "将窗口移到工作区 4"
#: ../data/50-mutter-navigation.xml.in.h:6
#: data/50-mutter-navigation.xml:21
msgid "Move window to last workspace"
msgstr "将窗口移到最后一个工作区"
#: ../data/50-mutter-navigation.xml.in.h:7
#: data/50-mutter-navigation.xml:24
msgid "Move window one workspace to the left"
msgstr "将窗口左移一个工作区"
#: ../data/50-mutter-navigation.xml.in.h:8
#: data/50-mutter-navigation.xml:27
msgid "Move window one workspace to the right"
msgstr "将窗口右移一个工作区"
#: ../data/50-mutter-navigation.xml.in.h:9
#: data/50-mutter-navigation.xml:30
msgid "Move window one workspace up"
msgstr "将窗口上移一个工作区"
#: ../data/50-mutter-navigation.xml.in.h:10
#: data/50-mutter-navigation.xml:33
msgid "Move window one workspace down"
msgstr "将窗口下移一个工作区"
#: ../data/50-mutter-navigation.xml.in.h:11
#: data/50-mutter-navigation.xml:36
msgid "Move window one monitor to the left"
msgstr "将窗口左移一个显示器"
#: ../data/50-mutter-navigation.xml.in.h:12
#: data/50-mutter-navigation.xml:39
msgid "Move window one monitor to the right"
msgstr "将窗口右移一个显示器"
#: ../data/50-mutter-navigation.xml.in.h:13
#: data/50-mutter-navigation.xml:42
msgid "Move window one monitor up"
msgstr "将窗口上移一个显示器"
#: ../data/50-mutter-navigation.xml.in.h:14
#: data/50-mutter-navigation.xml:45
msgid "Move window one monitor down"
msgstr "将窗口下移一个显示器"
#: ../data/50-mutter-navigation.xml.in.h:15
#: data/50-mutter-navigation.xml:49
msgid "Switch applications"
msgstr "切换应用程序"
#: ../data/50-mutter-navigation.xml.in.h:16
#: data/50-mutter-navigation.xml:54
msgid "Switch to previous application"
msgstr "切换到前一个应用程序"
#: ../data/50-mutter-navigation.xml.in.h:17
#: data/50-mutter-navigation.xml:58
msgid "Switch windows"
msgstr "切换窗口"
#: ../data/50-mutter-navigation.xml.in.h:18
#: data/50-mutter-navigation.xml:63
msgid "Switch to previous window"
msgstr "切换到前一个窗口"
#: ../data/50-mutter-navigation.xml.in.h:19
#: data/50-mutter-navigation.xml:67
msgid "Switch windows of an application"
msgstr "在应用程序的窗口之间切换窗口"
#: ../data/50-mutter-navigation.xml.in.h:20
#: data/50-mutter-navigation.xml:72
msgid "Switch to previous window of an application"
msgstr "切换到一个应用程序的前一个窗口"
#: ../data/50-mutter-navigation.xml.in.h:21
#: data/50-mutter-navigation.xml:76
msgid "Switch system controls"
msgstr "切换系统控制"
#: ../data/50-mutter-navigation.xml.in.h:22
#: data/50-mutter-navigation.xml:81
msgid "Switch to previous system control"
msgstr "切换到前一个系统控制"
#: ../data/50-mutter-navigation.xml.in.h:23
#: data/50-mutter-navigation.xml:85
msgid "Switch windows directly"
msgstr "直接切换窗口"
#: ../data/50-mutter-navigation.xml.in.h:24
#: data/50-mutter-navigation.xml:90
msgid "Switch directly to previous window"
msgstr "直接切换到前一个窗口"
#: ../data/50-mutter-navigation.xml.in.h:25
#: data/50-mutter-navigation.xml:94
msgid "Switch windows of an app directly"
msgstr "在应用程序窗口间直接移动焦点"
#: ../data/50-mutter-navigation.xml.in.h:26
#: data/50-mutter-navigation.xml:99
msgid "Switch directly to previous window of an app"
msgstr "直接切换到一个应用程序的前一个窗口"
#: ../data/50-mutter-navigation.xml.in.h:27
#: data/50-mutter-navigation.xml:103
msgid "Switch system controls directly"
msgstr "直接切换系统控制"
#: ../data/50-mutter-navigation.xml.in.h:28
#: data/50-mutter-navigation.xml:108
msgid "Switch directly to previous system control"
msgstr "直接切换到前一个系统控制"
#: ../data/50-mutter-navigation.xml.in.h:29
#: data/50-mutter-navigation.xml:111
msgid "Hide all normal windows"
msgstr "隐藏所有正常窗口"
#: ../data/50-mutter-navigation.xml.in.h:30
#: data/50-mutter-navigation.xml:114
msgid "Switch to workspace 1"
msgstr "切换到工作区 1"
#: ../data/50-mutter-navigation.xml.in.h:31
#: data/50-mutter-navigation.xml:117
msgid "Switch to workspace 2"
msgstr "切换到工作区 2"
#: ../data/50-mutter-navigation.xml.in.h:32
#: data/50-mutter-navigation.xml:120
msgid "Switch to workspace 3"
msgstr "切换到工作区 3"
#: ../data/50-mutter-navigation.xml.in.h:33
#: data/50-mutter-navigation.xml:123
msgid "Switch to workspace 4"
msgstr "切换到工作区 4"
#: ../data/50-mutter-navigation.xml.in.h:34
#: data/50-mutter-navigation.xml:126
msgid "Switch to last workspace"
msgstr "切换到最后一个工作区"
#: ../data/50-mutter-navigation.xml.in.h:35
#: data/50-mutter-navigation.xml:129
msgid "Move to workspace left"
msgstr "移动到左侧工作区"
#: ../data/50-mutter-navigation.xml.in.h:36
#: data/50-mutter-navigation.xml:132
msgid "Move to workspace right"
msgstr "移动到右侧工作区"
#: ../data/50-mutter-navigation.xml.in.h:37
#: data/50-mutter-navigation.xml:135
msgid "Move to workspace above"
msgstr "移动到上层工作区"
#: ../data/50-mutter-navigation.xml.in.h:38
#: data/50-mutter-navigation.xml:138
msgid "Move to workspace below"
msgstr "移动到下层工作区"
#: ../data/50-mutter-system.xml.in.h:1
#: data/50-mutter-system.xml:6
msgid "System"
msgstr "系统"
#: ../data/50-mutter-system.xml.in.h:2
#: data/50-mutter-system.xml:8
msgid "Show the run command prompt"
msgstr "显示运行命令提示符"
#: ../data/50-mutter-system.xml.in.h:3
#: data/50-mutter-system.xml:10
msgid "Show the activities overview"
msgstr "显示活动大纲"
#: ../data/50-mutter-windows.xml.in.h:1
#: data/50-mutter-windows.xml:6
msgid "Windows"
msgstr "窗口"
#: ../data/50-mutter-windows.xml.in.h:2
#: data/50-mutter-windows.xml:8
msgid "Activate the window menu"
msgstr "激活窗口菜单"
#: ../data/50-mutter-windows.xml.in.h:3
#: data/50-mutter-windows.xml:10
msgid "Toggle fullscreen mode"
msgstr "切换全屏模式"
#: ../data/50-mutter-windows.xml.in.h:4
#: data/50-mutter-windows.xml:12
msgid "Toggle maximization state"
msgstr "切换最大化状态"
#: ../data/50-mutter-windows.xml.in.h:5
#: data/50-mutter-windows.xml:14
msgid "Maximize window"
msgstr "最大化窗口"
#: ../data/50-mutter-windows.xml.in.h:6
#: data/50-mutter-windows.xml:16
msgid "Restore window"
msgstr "恢复窗口"
#: ../data/50-mutter-windows.xml.in.h:7
#: data/50-mutter-windows.xml:18
msgid "Toggle shaded state"
msgstr "切换卷起状态"
#: ../data/50-mutter-windows.xml.in.h:8
#: data/50-mutter-windows.xml:20
msgid "Close window"
msgstr "关闭窗口"
#: ../data/50-mutter-windows.xml.in.h:9
#: data/50-mutter-windows.xml:22
msgid "Hide window"
msgstr "隐藏窗口"
#: ../data/50-mutter-windows.xml.in.h:10
#: data/50-mutter-windows.xml:24
msgid "Move window"
msgstr "移动窗口"
#: ../data/50-mutter-windows.xml.in.h:11
#: data/50-mutter-windows.xml:26
msgid "Resize window"
msgstr "改变窗口大小"
#: ../data/50-mutter-windows.xml.in.h:12
#: data/50-mutter-windows.xml:29
msgid "Toggle window on all workspaces or one"
msgstr "在位于所有或仅一个工作区的窗口间切换"
#: ../data/50-mutter-windows.xml.in.h:13
#: data/50-mutter-windows.xml:31
msgid "Raise window if covered, otherwise lower it"
msgstr "如果窗口被其他窗口遮盖,则提升它,否则降低它"
#: ../data/50-mutter-windows.xml.in.h:14
#: data/50-mutter-windows.xml:33
msgid "Raise window above other windows"
msgstr "将窗口提升到其它窗口之上"
#: ../data/50-mutter-windows.xml.in.h:15
#: data/50-mutter-windows.xml:35
msgid "Lower window below other windows"
msgstr "将窗口降低到其它窗口之下"
#: ../data/50-mutter-windows.xml.in.h:16
#: data/50-mutter-windows.xml:37
msgid "Maximize window vertically"
msgstr "垂直最大化窗口"
#: ../data/50-mutter-windows.xml.in.h:17
#: data/50-mutter-windows.xml:39
msgid "Maximize window horizontally"
msgstr "水平最大化窗口"
#: ../data/50-mutter-windows.xml.in.h:18
#: data/50-mutter-windows.xml:43
msgid "View split on left"
msgstr "在左侧查看分割"
#: ../data/50-mutter-windows.xml.in.h:19
#: data/50-mutter-windows.xml:47
msgid "View split on right"
msgstr "在右侧查看分割"
#: ../data/mutter.desktop.in.h:1
#: data/mutter.desktop.in:4
msgid "Mutter"
msgstr "Mutter"
#: ../data/org.gnome.mutter.gschema.xml.in.h:1
#: data/org.gnome.mutter.gschema.xml.in:7
msgid "Modifier to use for extended window management operations"
msgstr "用于修改窗口点击动作的修饰键 met"
#: ../data/org.gnome.mutter.gschema.xml.in.h:2
#: data/org.gnome.mutter.gschema.xml.in:8
msgid ""
"This key will initiate the \"overlay\", which is a combination window "
"overview and application launching system. The default is intended to be the "
@@ -286,11 +286,11 @@ msgstr ""
"这个键指出的“覆盖”是一种混合窗口概述和应用程序运行的系统。默认要求使用 "
"“Super 键”。可能使用默认或者空白。"
#: ../data/org.gnome.mutter.gschema.xml.in.h:3
#: data/org.gnome.mutter.gschema.xml.in:20
msgid "Attach modal dialogs"
msgstr "依附模态对话框"
#: ../data/org.gnome.mutter.gschema.xml.in.h:4
#: data/org.gnome.mutter.gschema.xml.in:21
msgid ""
"When true, instead of having independent titlebars, modal dialogs appear "
"attached to the titlebar of the parent window and are moved together with "
@@ -299,11 +299,11 @@ msgstr ""
"当为 true 时,模态对话框会依附在父窗口的标题栏出现,并随父窗口移动,而不使用"
"单独的标题栏。"
#: ../data/org.gnome.mutter.gschema.xml.in.h:5
#: data/org.gnome.mutter.gschema.xml.in:30
msgid "Enable edge tiling when dropping windows on screen edges"
msgstr "当窗口位于屏幕边缘时,启用边缘平铺"
#: ../data/org.gnome.mutter.gschema.xml.in.h:6
#: data/org.gnome.mutter.gschema.xml.in:31
msgid ""
"If enabled, dropping windows on vertical screen edges maximizes them "
"vertically and resizes them horizontally to cover half of the available "
@@ -312,11 +312,11 @@ msgstr ""
"如果启用,将窗口拖放到屏幕竖直边缘时会将窗口纵向最大化、横向占据半屏;将窗口"
"拖放到屏幕上边缘时会将窗口最大化。"
#: ../data/org.gnome.mutter.gschema.xml.in.h:7
#: data/org.gnome.mutter.gschema.xml.in:40
msgid "Workspaces are managed dynamically"
msgstr "动态管理工作区"
#: ../data/org.gnome.mutter.gschema.xml.in.h:8
#: data/org.gnome.mutter.gschema.xml.in:41
msgid ""
"Determines whether workspaces are managed dynamically or whether there's a "
"static number of workspaces (determined by the num-workspaces key in org."
@@ -326,32 +326,32 @@ msgstr ""
"的 num-workspaces 键确定)。"
# 或者 只在主显示器上显示工作区
#: ../data/org.gnome.mutter.gschema.xml.in.h:9
#: data/org.gnome.mutter.gschema.xml.in:50
msgid "Workspaces only on primary"
msgstr "只对主显示器上的工作区"
# monitors 是否该翻译为 屏幕?
#: ../data/org.gnome.mutter.gschema.xml.in.h:10
#: data/org.gnome.mutter.gschema.xml.in:51
msgid ""
"Determines whether workspace switching should happen for windows on all "
"monitors or only for windows on the primary monitor."
msgstr "决定工作区切换对所有显示器上的窗口还是只对主显示器上的有效。"
#: ../data/org.gnome.mutter.gschema.xml.in.h:11
#: data/org.gnome.mutter.gschema.xml.in:59
msgid "No tab popup"
msgstr "TAB轮换不弹出"
#: ../data/org.gnome.mutter.gschema.xml.in.h:12
#: data/org.gnome.mutter.gschema.xml.in:60
msgid ""
"Determines whether the use of popup and highlight frame should be disabled "
"for window cycling."
msgstr "决定窗口轮换时是否禁用弹出和高亮边框。"
#: ../data/org.gnome.mutter.gschema.xml.in.h:13
#: data/org.gnome.mutter.gschema.xml.in:68
msgid "Delay focus changes until the pointer stops moving"
msgstr "将焦点改变推迟到光标停止移动之后"
#: ../data/org.gnome.mutter.gschema.xml.in.h:14
#: data/org.gnome.mutter.gschema.xml.in:69
msgid ""
"If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
"the focus will not be changed immediately when entering a window, but only "
@@ -360,187 +360,202 @@ msgstr ""
"如果为 true而聚焦模式为“sloppy”或“mouse”那么进入某个窗口时焦点将不会立即"
"改变,而是等到光标停止移动之后。"
#: ../data/org.gnome.mutter.gschema.xml.in.h:15
#: data/org.gnome.mutter.gschema.xml.in:79
msgid "Draggable border width"
msgstr "可拖拽的边界宽度"
#: ../data/org.gnome.mutter.gschema.xml.in.h:16
#: data/org.gnome.mutter.gschema.xml.in:80
msgid ""
"The amount of total draggable borders. If the theme's visible borders are "
"not enough, invisible borders will be added to meet this value."
msgstr ""
"可拖拽的边界总数。如果主题的可见边界不足,将添加不可见的边界来满足此值。"
#: ../data/org.gnome.mutter.gschema.xml.in.h:17
#: data/org.gnome.mutter.gschema.xml.in:89
msgid "Auto maximize nearly monitor sized windows"
msgstr "自动最大化接近显示器大小的窗口"
#: ../data/org.gnome.mutter.gschema.xml.in.h:18
#: data/org.gnome.mutter.gschema.xml.in:90
msgid ""
"If enabled, new windows that are initially the size of the monitor "
"automatically get maximized."
msgstr "如果启用,初始时为显示器大小的新窗口将自动最大化"
#: ../data/org.gnome.mutter.gschema.xml.in.h:19
#: data/org.gnome.mutter.gschema.xml.in:98
msgid "Place new windows in the center"
msgstr "将窗口置于中央"
#: ../data/org.gnome.mutter.gschema.xml.in.h:20
#: data/org.gnome.mutter.gschema.xml.in:99
msgid ""
"When true, the new windows will always be put in the center of the active "
"screen of the monitor."
msgstr "为 true 时,新窗口将总是置于此显示器已激活屏幕的中央。"
#: ../data/org.gnome.mutter.gschema.xml.in.h:21
#: data/org.gnome.mutter.gschema.xml.in:120
msgid "Select window from tab popup"
msgstr "从 Tab 轮换弹出界面选择窗口"
#: ../data/org.gnome.mutter.gschema.xml.in.h:22
#: data/org.gnome.mutter.gschema.xml.in:125
msgid "Cancel tab popup"
msgstr "取消 Tab 轮换弹出"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:1
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "切换到 VT 1"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:2
#: data/org.gnome.mutter.wayland.gschema.xml.in:10
msgid "Switch to VT 2"
msgstr "切换到 VT 2"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:3
#: data/org.gnome.mutter.wayland.gschema.xml.in:14
msgid "Switch to VT 3"
msgstr "切换到 VT 3"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:4
#: data/org.gnome.mutter.wayland.gschema.xml.in:18
msgid "Switch to VT 4"
msgstr "切换到 VT 4"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:5
#: data/org.gnome.mutter.wayland.gschema.xml.in:22
msgid "Switch to VT 5"
msgstr "切换到 VT 5"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:6
#: data/org.gnome.mutter.wayland.gschema.xml.in:26
msgid "Switch to VT 6"
msgstr "切换到 VT 6"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:7
#: data/org.gnome.mutter.wayland.gschema.xml.in:30
msgid "Switch to VT 7"
msgstr "切换到 VT 7"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
#: data/org.gnome.mutter.wayland.gschema.xml.in:34
msgid "Switch to VT 8"
msgstr "切换到 VT 8"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
#: data/org.gnome.mutter.wayland.gschema.xml.in:38
msgid "Switch to VT 9"
msgstr "切换到 VT 9"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
#: data/org.gnome.mutter.wayland.gschema.xml.in:42
msgid "Switch to VT 10"
msgstr "切换到 VT 10"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
#: data/org.gnome.mutter.wayland.gschema.xml.in:46
msgid "Switch to VT 11"
msgstr "切换到 VT 11"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
#: data/org.gnome.mutter.wayland.gschema.xml.in:50
msgid "Switch to VT 12"
msgstr "切换到 VT 12"
#: ../src/backends/meta-monitor-manager.c:518
msgid "Built-in display"
msgstr "内置显示屏"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1861
msgid "Switch monitor"
msgstr "切换显示器"
#: ../src/backends/meta-monitor-manager.c:544
#: src/backends/meta-input-settings.c:1863
msgid "Show on-screen help"
msgstr "显示在屏帮助"
#: src/backends/meta-monitor-manager.c:515
msgid "Built-in display"
msgstr "内置显示器"
#: src/backends/meta-monitor-manager.c:538
msgid "Unknown"
msgstr "未知"
#: ../src/backends/meta-monitor-manager.c:546
#: src/backends/meta-monitor-manager.c:540
msgid "Unknown Display"
msgstr "未知的显示器"
msgstr "未知的 Display"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: ../src/backends/meta-monitor-manager.c:554
#: src/backends/meta-monitor-manager.c:548
#, c-format
msgid "%s %s"
msgstr "%s %s"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: ../src/compositor/compositor.c:456
#: src/compositor/compositor.c:471
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display \"%s"
"\"."
msgstr "DISPLAY %2$s 的屏幕 %1$i 上已有另外一个混成窗口管理器正在运行。"
msgstr "显示器 %2$s 的屏幕 %1$i 上已有另外一个混成窗口管理器正在运行。"
#: ../src/core/bell.c:185
#: src/core/bell.c:194
msgid "Bell event"
msgstr "响铃事件"
#: ../src/core/delete.c:127
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "“%s” 未响应。"
#: ../src/core/delete.c:129
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "应用程序未响应。"
#: ../src/core/delete.c:134
#: src/core/delete.c:134
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr "您可以选择稍等一会儿,或者强制退出该应用程序。"
#: ../src/core/delete.c:141
#: src/core/delete.c:141
msgid "_Wait"
msgstr "等待(_W)"
#: ../src/core/delete.c:141
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "强制退出(_F)"
#: ../src/core/display.c:563
#: src/core/display.c:590
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "无法打开 X Window System 显示“%s”\n"
msgstr "无法打开 X Window System 显示“%s”\n"
#: ../src/core/main.c:176
#: src/core/main.c:182
msgid "Disable connection to session manager"
msgstr "禁止连接到会话管理器"
#: ../src/core/main.c:182
#: src/core/main.c:188
msgid "Replace the running window manager"
msgstr "替换正在运行的窗口管理器"
#: ../src/core/main.c:188
#: src/core/main.c:194
msgid "Specify session management ID"
msgstr "指定会话管理 ID"
#: ../src/core/main.c:193
#: src/core/main.c:199
msgid "X Display to use"
msgstr "要使用的 X 显示"
msgstr "要使用的 X Display"
#: ../src/core/main.c:199
#: src/core/main.c:205
msgid "Initialize session from savefile"
msgstr "从保存文件中初始化会话"
#: ../src/core/main.c:205
#: src/core/main.c:211
msgid "Make X calls synchronous"
msgstr "使 X 调用同步"
#: ../src/core/main.c:212
#: src/core/main.c:218
msgid "Run as a wayland compositor"
msgstr "作为 wayland 混成管理器运行"
#: ../src/core/main.c:220
#: src/core/main.c:224
msgid "Run as a nested compositor"
msgstr "作为嵌套混成器运行"
#: src/core/main.c:232
msgid "Run as a full display server, rather than nested"
msgstr "以完整显示服务器方式运行,而不是以嵌套方式"
#: ../src/core/mutter.c:39
#: src/core/mutter.c:39
#, c-format
msgid ""
"mutter %s\n"
@@ -554,38 +569,43 @@ msgstr ""
"本软件为自由软件:版权条款请参见源码\n"
"不存在任何保证:即便是对商业性或者特定目的的适应性也不作保证。\n"
#: ../src/core/mutter.c:53
#: src/core/mutter.c:53
msgid "Print version"
msgstr "打印版本"
#: ../src/core/mutter.c:59
#: src/core/mutter.c:59
msgid "Mutter plugin to use"
msgstr "要使用的 Mutter 插件"
#: ../src/core/prefs.c:2050
#: src/core/prefs.c:1997
#, c-format
msgid "Workspace %d"
msgstr "工作区 %d"
#: ../src/core/screen.c:526
#: src/core/screen.c:521
#, c-format
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
"to replace the current window manager."
msgstr ""
"显示器“%s”已经有一个窗口管理器请尝试使用 --replace 选项替换当前的窗口管理"
"Display“%s”已经有一个窗口管理器请尝试使用 --replace 选项替换当前的窗口管理"
"器。"
#: ../src/core/screen.c:608
#: src/core/screen.c:606
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgstr "显示“%2$s”上的屏幕 %1$d 无效\n"
#: ../src/core/util.c:118
#: src/core/util.c:120
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter 编译的时候没有加入详细模式的支持\n"
#: ../src/x11/session.c:1815
#: src/wayland/meta-wayland-tablet-pad.c:595
#, c-format
msgid "Mode Switch: Mode %d"
msgstr "模式切换:%d 模式"
#: src/x11/session.c:1815
msgid ""
"These windows do not support &quot;save current setup&quot; and will have to "
"be restarted manually next time you log in."
@@ -593,7 +613,7 @@ msgstr ""
"这些窗口不支持 &quot;保存当前设置 &quot; 您在下次登录时,必须手动重启动它"
"们。"
#: ../src/x11/window-props.c:549
#: src/x11/window-props.c:548
#, c-format
msgid "%s (on %s)"
msgstr "%s (于 %s)"

View File

@@ -27,13 +27,25 @@ endif
EXTRA_DIST += tests/mutter-all.test.in
mutter_test_client_SOURCES = tests/test-client.c
mutter_test_client_LDADD = $(MUTTER_LIBS) libmutter.la
mutter_test_client_LDADD = $(MUTTER_LIBS) libmutter-$(LIBMUTTER_API_VERSION).la
mutter_test_runner_SOURCES = tests/test-runner.c
mutter_test_runner_LDADD = $(MUTTER_LIBS) libmutter.la
mutter_test_runner_LDADD = $(MUTTER_LIBS) libmutter-$(LIBMUTTER_API_VERSION).la
mutter_test_unit_tests_SOURCES = tests/unit-tests.c
mutter_test_unit_tests_LDADD = $(MUTTER_LIBS) libmutter.la
mutter_test_unit_tests_SOURCES = \
tests/unit-tests.c \
tests/meta-backend-test.c \
tests/meta-backend-test.h \
tests/meta-monitor-manager-test.c \
tests/meta-monitor-manager-test.h \
tests/monitor-store-unit-tests.c \
tests/monitor-store-unit-tests.h \
tests/monitor-test-utils.c \
tests/monitor-test-utils.h \
tests/monitor-unit-tests.c \
tests/monitor-unit-tests.h \
$(NULL)
mutter_test_unit_tests_LDADD = $(MUTTER_LIBS) libmutter-$(LIBMUTTER_API_VERSION).la
.PHONY: run-tests run-test-runner-tests run-unit-tests
@@ -50,6 +62,6 @@ endif
# Some random test programs for bits of the code
testboxes_SOURCES = core/testboxes.c
testboxes_LDADD = $(MUTTER_LIBS) libmutter.la
testboxes_LDADD = $(MUTTER_LIBS) libmutter-$(LIBMUTTER_API_VERSION).la
noinst_PROGRAMS += testboxes

View File

@@ -1,7 +1,7 @@
# Flag build for parallelism; see https://savannah.gnu.org/patch/?6905
.AUTOPARALLEL:
lib_LTLIBRARIES = libmutter.la
lib_LTLIBRARIES = libmutter-@LIBMUTTER_API_VERSION@.la
SUBDIRS=compositor/plugins
@@ -79,7 +79,7 @@ wayland_protocols = \
wayland/protocol/gtk-primary-selection.xml \
$(NULL)
libmutter_la_SOURCES = \
libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
backends/meta-backend.c \
meta/meta-backend.h \
backends/meta-backend-private.h \
@@ -101,8 +101,16 @@ libmutter_la_SOURCES = \
backends/meta-idle-monitor-dbus.h \
backends/meta-input-settings.c \
backends/meta-input-settings-private.h \
backends/meta-logical-monitor.c \
backends/meta-logical-monitor.h \
backends/meta-monitor-config.c \
backends/meta-monitor-config.h \
backends/meta-monitor-config-manager.c \
backends/meta-monitor-config-manager.h \
backends/meta-monitor-config-store.c \
backends/meta-monitor-config-store.h \
backends/meta-monitor.c \
backends/meta-monitor.h \
backends/meta-monitor-manager.c \
meta/meta-monitor-manager.h \
backends/meta-monitor-manager-private.h \
@@ -126,6 +134,10 @@ libmutter_la_SOURCES = \
backends/x11/meta-clutter-backend-x11.h \
backends/x11/meta-cursor-renderer-x11.c \
backends/x11/meta-cursor-renderer-x11.h \
backends/x11/cm/meta-backend-x11-cm.c \
backends/x11/cm/meta-backend-x11-cm.h \
backends/x11/nested/meta-backend-x11-nested.c \
backends/x11/nested/meta-backend-x11-nested.h \
backends/x11/nested/meta-cursor-renderer-x11-nested.c \
backends/x11/nested/meta-cursor-renderer-x11-nested.h \
backends/x11/meta-idle-monitor-xsync.c \
@@ -220,6 +232,7 @@ libmutter_la_SOURCES = \
core/meta-gesture-tracker-private.h \
core/keybindings.c \
core/keybindings-private.h \
core/main-private.h \
core/main.c \
core/place.c \
core/place.h \
@@ -276,7 +289,7 @@ libmutter_la_SOURCES = \
$(NULL)
if HAVE_WAYLAND
libmutter_la_SOURCES += \
libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES += \
compositor/meta-surface-actor-wayland.c \
compositor/meta-surface-actor-wayland.h \
wayland/meta-wayland.c \
@@ -360,7 +373,7 @@ libmutter_la_SOURCES += \
endif
if HAVE_NATIVE_BACKEND
libmutter_la_SOURCES += \
libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES += \
backends/native/meta-backend-native.c \
backends/native/meta-backend-native.h \
backends/native/meta-backend-native-private.h \
@@ -388,13 +401,14 @@ libmutter_la_SOURCES += \
$(NULL)
endif
nodist_libmutter_la_SOURCES = $(mutter_built_sources)
nodist_libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES = $(mutter_built_sources)
libmutter_la_LDFLAGS = -no-undefined -export-symbols-regex "^(meta|ag)_.*"
libmutter_la_LIBADD = \
libmutter_@LIBMUTTER_API_VERSION@_la_LDFLAGS = \
-no-undefined -export-symbols-regex "^(meta|ag)_.*"
libmutter_@LIBMUTTER_API_VERSION@_la_LIBADD = \
$(MUTTER_LIBS) \
$(MUTTER_NATIVE_BACKEND_LIBS) \
$(top_builddir)/clutter/clutter/libmutter-clutter-1.0.la \
$(top_builddir)/clutter/clutter/libmutter-clutter-$(LIBMUTTER_API_VERSION).la \
$(NULL)
# Headers installed for plugins; introspected information will
@@ -453,7 +467,7 @@ bin_PROGRAMS=mutter
noinst_PROGRAMS=
mutter_SOURCES = core/mutter.c
mutter_LDADD = $(MUTTER_LIBS) libmutter.la
mutter_LDADD = $(MUTTER_LIBS) libmutter-@LIBMUTTER_API_VERSION@.la
libexec_PROGRAMS = mutter-restart-helper
mutter_restart_helper_SOURCES = core/restart-helper.c
@@ -462,36 +476,51 @@ mutter_restart_helper_LDADD = $(MUTTER_LIBS)
include Makefile-tests.am
if HAVE_INTROSPECTION
include $(INTROSPECTION_MAKEFILE)
# Since we don't make any guarantees about stability and we don't support
# parallel install, there's no real reason to change directories, filenames,
# etc. as we change the Mutter tarball version.
#api_version = $(MUTTER_MAJOR_VERSION).$(MUTTER_MINOR_VERSION)
api_version = 3.0
include $(INTROSPECTION_MAKEFILE)
# These files are in package-private directories, even though they may be used
# by plugins. If you're writing a plugin, use g-ir-compiler --add-include-path
# and g-ir-compiler --includedir.
girdir = $(pkglibdir)
gir_DATA = Meta-$(api_version).gir
gir_DATA = Meta-$(LIBMUTTER_API_VERSION).gir
typelibdir = $(pkglibdir)
typelib_DATA = Meta-$(api_version).typelib
typelib_DATA = Meta-$(LIBMUTTER_API_VERSION).typelib
INTROSPECTION_GIRS = Meta-$(api_version).gir
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(top_builddir)/clutter/clutter --add-include-path=$(top_builddir)/cogl/cogl --add-include-path=$(top_builddir)/cogl/cogl-pango
INTROSPECTION_COMPILER_ARGS = --includedir=$(top_builddir)/clutter/clutter --includedir=$(top_builddir)/cogl/cogl --includedir=$(top_builddir)/cogl/cogl-pango
INTROSPECTION_GIRS = Meta-$(LIBMUTTER_API_VERSION).gir
INTROSPECTION_SCANNER_ARGS = \
--add-include-path=$(top_builddir)/clutter/clutter \
--add-include-path=$(top_builddir)/cogl/cogl \
--add-include-path=$(top_builddir)/cogl/cogl-pango \
$(NULL)
INTROSPECTION_COMPILER_ARGS = \
--includedir=$(top_builddir)/clutter/clutter \
--includedir=$(top_builddir)/cogl/cogl \
--includedir=$(top_builddir)/cogl/cogl-pango \
$(NULL)
INTROSPECTION_SCANNER_ENV = \
PKG_CONFIG_PATH=$(top_builddir)/clutter/clutter/:$(top_builddir)/cogl/cogl/:$(top_builddir)/cogl/cogl-pango/:$${PKG_CONFIG_PATH}
Meta-$(api_version).gir: libmutter.la
@META_GIR@_INCLUDES = GObject-2.0 GDesktopEnums-3.0 Gdk-3.0 Gtk-3.0 Clutter-1.0 xlib-2.0 xfixes-4.0 Cogl-1.0
@META_GIR@_EXPORT_PACKAGES = libmutter
@META_GIR@_CFLAGS = $(AM_CPPFLAGS)
@META_GIR@_LIBS = libmutter.la
@META_GIR@_FILES = \
$(libmutterinclude_base_headers) \
$(filter %.c,$(libmutter_la_SOURCES) $(nodist_libmutter_la_SOURCES))
@META_GIR@_SCANNERFLAGS = --warn-all --warn-error
Meta-@LIBMUTTER_API_VERSION@.gir: libmutter-$(LIBMUTTER_API_VERSION).la
Meta_@LIBMUTTER_API_VERSION@_gir_VERSION = $(LIBMUTTER_API_VERSION)
Meta_@LIBMUTTER_API_VERSION@_gir_INCLUDES = \
GObject-2.0 \
GDesktopEnums-3.0 \
Gdk-3.0 \
Gtk-3.0 \
Cogl-$(LIBMUTTER_API_VERSION) \
Clutter-$(LIBMUTTER_API_VERSION) \
xlib-2.0 \
xfixes-4.0 \
$(NULL)
Meta_@LIBMUTTER_API_VERSION@_gir_EXPORT_PACKAGES = libmutter-$(LIBMUTTER_API_VERSION)
Meta_@LIBMUTTER_API_VERSION@_gir_CFLAGS = $(AM_CPPFLAGS)
Meta_@LIBMUTTER_API_VERSION@_gir_LIBS = libmutter-$(LIBMUTTER_API_VERSION).la
Meta_@LIBMUTTER_API_VERSION@_gir_FILES = \
$(libmutterinclude_base_headers) \
$(filter %.c,$(libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES) $(nodist_libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES))
Meta_@LIBMUTTER_API_VERSION@_SCANNERFLAGS = --warn-all --warn-error
endif
@@ -503,10 +532,11 @@ CLEANFILES = \
$(gir_DATA)
DISTCLEANFILES = \
$(libmutterinclude_built_headers)
$(libmutterinclude_built_headers) \
$(pkgconfig_DATA)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libmutter.pc
pkgconfig_DATA = libmutter-$(LIBMUTTER_API_VERSION).pc
EXTRA_DIST += \
$(wayland_protocols) \

View File

@@ -43,22 +43,8 @@
#define DEFAULT_XKB_RULES_FILE "evdev"
#define DEFAULT_XKB_MODEL "pc105+inet"
#define META_TYPE_BACKEND (meta_backend_get_type ())
#define META_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_BACKEND, MetaBackend))
#define META_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_BACKEND, MetaBackendClass))
#define META_IS_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_BACKEND))
#define META_IS_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_BACKEND))
#define META_BACKEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_BACKEND, MetaBackendClass))
struct _MetaBackend
{
GObject parent;
GHashTable *device_monitors;
gint current_device_id;
MetaPointerConstraint *client_pointer_constraint;
};
#define META_TYPE_BACKEND (meta_backend_get_type ())
G_DECLARE_DERIVABLE_TYPE (MetaBackend, meta_backend, META, BACKEND, GObject)
struct _MetaBackendClass
{
@@ -85,6 +71,8 @@ struct _MetaBackendClass
int x,
int y);
MetaLogicalMonitor * (* get_current_logical_monitor) (MetaBackend *backend);
void (* set_keymap) (MetaBackend *backend,
const char *layouts,
const char *variants,
@@ -107,15 +95,22 @@ struct _MetaBackendClass
void (* set_numlock) (MetaBackend *backend,
gboolean numlock_state);
void (* track_position) (MetaBackend *backend,
gboolean enabled);
};
void meta_init_backend (MetaBackendType backend_type);
void meta_init_backend (GType backend_gtype);
ClutterBackend * meta_backend_get_clutter_backend (MetaBackend *backend);
MetaIdleMonitor * meta_backend_get_idle_monitor (MetaBackend *backend,
int device_id);
void meta_backend_foreach_device_monitor (MetaBackend *backend,
GFunc func,
gpointer user_data);
MetaMonitorManager * meta_backend_get_monitor_manager (MetaBackend *backend);
MetaCursorTracker * meta_backend_get_cursor_tracker (MetaBackend *backend);
MetaCursorRenderer * meta_backend_get_cursor_renderer (MetaBackend *backend);
MetaRenderer * meta_backend_get_renderer (MetaBackend *backend);
MetaEgl * meta_backend_get_egl (MetaBackend *backend);
@@ -131,6 +126,8 @@ void meta_backend_warp_pointer (MetaBackend *backend,
int x,
int y);
MetaLogicalMonitor * meta_backend_get_current_logical_monitor (MetaBackend *backend);
struct xkb_keymap * meta_backend_get_keymap (MetaBackend *backend);
void meta_backend_update_last_device (MetaBackend *backend,
@@ -143,6 +140,7 @@ gboolean meta_backend_get_relative_motion_deltas (MetaBackend *backend,
double *dx_unaccel,
double *dy_unaccel);
MetaPointerConstraint * meta_backend_get_client_pointer_constraint (MetaBackend *backend);
void meta_backend_set_client_pointer_constraint (MetaBackend *backend,
MetaPointerConstraint *constraint);
@@ -154,4 +152,10 @@ gboolean meta_is_stage_views_enabled (void);
MetaInputSettings *meta_backend_get_input_settings (MetaBackend *backend);
void meta_backend_update_cursor_position (MetaBackend *backend, int x, int y);
void meta_backend_cursor_position_changed (MetaBackend *backend);
void meta_backend_track_position_ref (MetaBackend *backend);
void meta_backend_track_position_unref (MetaBackend *backend);
#endif /* META_BACKEND_PRIVATE_H */

View File

@@ -41,7 +41,7 @@
#endif
#include "backends/meta-idle-monitor-private.h"
#include "backends/meta-logical-monitor.h"
#include "backends/meta-monitor-manager-dummy.h"
static MetaBackend *_backend;
@@ -62,6 +62,7 @@ meta_get_backend (void)
struct _MetaBackendPrivate
{
MetaMonitorManager *monitor_manager;
MetaCursorTracker *cursor_tracker;
MetaCursorRenderer *cursor_renderer;
MetaInputSettings *input_settings;
MetaRenderer *renderer;
@@ -71,6 +72,14 @@ struct _MetaBackendPrivate
ClutterActor *stage;
guint device_update_idle_id;
GHashTable *device_monitors;
int current_device_id;
MetaPointerConstraint *client_pointer_constraint;
uint32_t track_position_refcount;
};
typedef struct _MetaBackendPrivate MetaBackendPrivate;
@@ -94,7 +103,7 @@ meta_backend_finalize (GObject *object)
if (priv->device_update_idle_id)
g_source_remove (priv->device_update_idle_id);
g_hash_table_destroy (backend->device_monitors);
g_hash_table_destroy (priv->device_monitors);
G_OBJECT_CLASS (meta_backend_parent_class)->finalize (object);
}
@@ -114,11 +123,12 @@ static void
center_pointer (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
MetaMonitorInfo *monitors, *primary;
guint n_monitors;
MetaMonitorManager *monitor_manager = priv->monitor_manager;
MetaLogicalMonitor *primary;
primary =
meta_monitor_manager_get_primary_logical_monitor (monitor_manager);
monitors = meta_monitor_manager_get_monitor_infos (priv->monitor_manager, &n_monitors);
primary = &monitors[meta_monitor_manager_get_primary_index (priv->monitor_manager)];
meta_backend_warp_pointer (backend,
primary->rect.x + primary->rect.width / 2,
primary->rect.y + primary->rect.height / 2);
@@ -138,12 +148,31 @@ meta_backend_monitors_changed (MetaBackend *backend)
if (clutter_input_device_get_coords (device, NULL, &point))
{
/* If we're outside all monitors, warp the pointer back inside */
if (meta_monitor_manager_get_monitor_at_point (monitor_manager,
point.x, point.y) < 0)
if (!meta_monitor_manager_get_logical_monitor_at (monitor_manager,
point.x, point.y) &&
!meta_monitor_manager_is_headless (monitor_manager))
center_pointer (backend);
}
}
void
meta_backend_foreach_device_monitor (MetaBackend *backend,
GFunc func,
gpointer user_data)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
GHashTableIter iter;
gpointer value;
g_hash_table_iter_init (&iter, priv->device_monitors);
while (g_hash_table_iter_next (&iter, NULL, &value))
{
MetaIdleMonitor *device_monitor = META_IDLE_MONITOR (value);
func (device_monitor, user_data);
}
}
static MetaIdleMonitor *
meta_backend_create_idle_monitor (MetaBackend *backend,
int device_id)
@@ -155,19 +184,22 @@ static void
create_device_monitor (MetaBackend *backend,
int device_id)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
MetaIdleMonitor *idle_monitor;
g_assert (g_hash_table_lookup (backend->device_monitors, &device_id) == NULL);
g_assert (g_hash_table_lookup (priv->device_monitors, &device_id) == NULL);
idle_monitor = meta_backend_create_idle_monitor (backend, device_id);
g_hash_table_insert (backend->device_monitors, &idle_monitor->device_id, idle_monitor);
g_hash_table_insert (priv->device_monitors, &idle_monitor->device_id, idle_monitor);
}
static void
destroy_device_monitor (MetaBackend *backend,
int device_id)
{
g_hash_table_remove (backend->device_monitors, &device_id);
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
g_hash_table_remove (priv->device_monitors, &device_id);
}
static void
@@ -236,6 +268,7 @@ on_device_removed (ClutterDeviceManager *device_manager,
gpointer user_data)
{
MetaBackend *backend = META_BACKEND (user_data);
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
int device_id = clutter_input_device_get_device_id (device);
destroy_device_monitor (backend, device_id);
@@ -243,9 +276,9 @@ on_device_removed (ClutterDeviceManager *device_manager,
/* If the device the user last interacted goes away, check again pointer
* visibility.
*/
if (backend->current_device_id == device_id)
if (priv->current_device_id == device_id)
{
MetaCursorTracker *cursor_tracker = meta_cursor_tracker_get_for_screen (NULL);
MetaCursorTracker *cursor_tracker = priv->cursor_tracker;
gboolean has_touchscreen, has_pointing_device;
ClutterInputDeviceType device_type;
@@ -291,8 +324,9 @@ meta_backend_real_post_init (MetaBackend *backend)
priv->cursor_renderer = META_BACKEND_GET_CLASS (backend)->create_cursor_renderer (backend);
backend->device_monitors = g_hash_table_new_full (g_int_hash, g_int_equal,
NULL, (GDestroyNotify) g_object_unref);
priv->device_monitors =
g_hash_table_new_full (g_int_hash, g_int_equal,
NULL, (GDestroyNotify) g_object_unref);
{
MetaCursorTracker *cursor_tracker;
@@ -318,7 +352,7 @@ meta_backend_real_post_init (MetaBackend *backend)
has_touchscreen |= device_is_slave_touchscreen (device);
}
cursor_tracker = meta_cursor_tracker_get_for_screen (NULL);
cursor_tracker = priv->cursor_tracker;
meta_cursor_tracker_set_pointer_visible (cursor_tracker, !has_touchscreen);
g_slist_free (devices);
@@ -423,6 +457,8 @@ meta_backend_initable_init (GInitable *initable,
return FALSE;
}
priv->cursor_tracker = g_object_new (META_TYPE_CURSOR_TRACKER, NULL);
return TRUE;
}
@@ -451,7 +487,9 @@ MetaIdleMonitor *
meta_backend_get_idle_monitor (MetaBackend *backend,
int device_id)
{
return g_hash_table_lookup (backend->device_monitors, &device_id);
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
return g_hash_table_lookup (priv->device_monitors, &device_id);
}
/**
@@ -465,6 +503,14 @@ meta_backend_get_monitor_manager (MetaBackend *backend)
return priv->monitor_manager;
}
MetaCursorTracker *
meta_backend_get_cursor_tracker (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
return priv->cursor_tracker;
}
/**
* meta_backend_get_cursor_renderer: (skip)
*/
@@ -529,6 +575,12 @@ meta_backend_warp_pointer (MetaBackend *backend,
META_BACKEND_GET_CLASS (backend)->warp_pointer (backend, x, y);
}
MetaLogicalMonitor *
meta_backend_get_current_logical_monitor (MetaBackend *backend)
{
return META_BACKEND_GET_CLASS (backend)->get_current_logical_monitor (backend);
}
void
meta_backend_set_keymap (MetaBackend *backend,
const char *layouts,
@@ -581,8 +633,8 @@ meta_backend_get_stage (MetaBackend *backend)
static gboolean
update_last_device (MetaBackend *backend)
{
MetaCursorTracker *cursor_tracker = meta_cursor_tracker_get_for_screen (NULL);
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
MetaCursorTracker *cursor_tracker = priv->cursor_tracker;
ClutterInputDeviceType device_type;
ClutterDeviceManager *manager;
ClutterInputDevice *device;
@@ -590,11 +642,11 @@ update_last_device (MetaBackend *backend)
priv->device_update_idle_id = 0;
manager = clutter_device_manager_get_default ();
device = clutter_device_manager_get_device (manager,
backend->current_device_id);
priv->current_device_id);
device_type = clutter_input_device_get_device_type (device);
g_signal_emit_by_name (backend, "last-device-changed",
backend->current_device_id);
priv->current_device_id);
switch (device_type)
{
@@ -619,7 +671,7 @@ meta_backend_update_last_device (MetaBackend *backend,
ClutterDeviceManager *manager;
ClutterInputDevice *device;
if (backend->current_device_id == device_id)
if (priv->current_device_id == device_id)
return;
manager = clutter_device_manager_get_default ();
@@ -629,7 +681,7 @@ meta_backend_update_last_device (MetaBackend *backend,
clutter_input_device_get_device_mode (device) == CLUTTER_INPUT_MODE_MASTER)
return;
backend->current_device_id = device_id;
priv->current_device_id = device_id;
if (priv->device_update_idle_id == 0)
{
@@ -655,15 +707,25 @@ meta_backend_get_relative_motion_deltas (MetaBackend *backend,
dx_unaccel, dy_unaccel);
}
MetaPointerConstraint *
meta_backend_get_client_pointer_constraint (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
return priv->client_pointer_constraint;
}
void
meta_backend_set_client_pointer_constraint (MetaBackend *backend,
MetaPointerConstraint *constraint)
{
g_assert (!constraint || !backend->client_pointer_constraint);
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
g_clear_object (&backend->client_pointer_constraint);
g_assert (!constraint || !priv->client_pointer_constraint);
g_clear_object (&priv->client_pointer_constraint);
if (constraint)
backend->client_pointer_constraint = g_object_ref (constraint);
priv->client_pointer_constraint = g_object_ref (constraint);
}
/* Mutter is responsible for pulling events off the X queue, so Clutter
@@ -737,31 +799,14 @@ meta_get_clutter_backend (void)
}
void
meta_init_backend (MetaBackendType backend_type)
meta_init_backend (GType backend_gtype)
{
GType type;
MetaBackend *backend;
GError *error = NULL;
switch (backend_type)
{
case META_BACKEND_TYPE_X11:
type = META_TYPE_BACKEND_X11;
break;
#ifdef HAVE_NATIVE_BACKEND
case META_BACKEND_TYPE_NATIVE:
type = META_TYPE_BACKEND_NATIVE;
break;
#endif
default:
g_assert_not_reached ();
}
/* meta_backend_init() above install the backend globally so
* so meta_get_backend() works even during initialization. */
backend = g_object_new (type, NULL);
backend = g_object_new (backend_gtype, NULL);
if (!g_initable_init (G_INITABLE (backend), NULL, &error))
{
g_warning ("Failed to create backend: %s", error->message);
@@ -823,3 +868,42 @@ meta_backend_get_input_settings (MetaBackend *backend)
return priv->input_settings;
}
void
meta_backend_update_cursor_position (MetaBackend *backend, int x, int y)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
meta_cursor_renderer_set_position (priv->cursor_renderer, x, y);
meta_backend_cursor_position_changed (backend);
}
void
meta_backend_cursor_position_changed (MetaBackend *backend)
{
meta_cursor_tracker_cursor_position_changed (backend->cursor_tracker);
}
static void
meta_backend_track_position (MetaBackend *backend, gboolean enabled)
{
if (META_BACKEND_GET_CLASS (backend)->track_position)
META_BACKEND_GET_CLASS (backend)->track_position (backend, enabled);
}
void
meta_backend_track_position_ref (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
if (priv->track_position_refcount++ == 0)
meta_backend_track_position (backend, TRUE);
}
void
meta_backend_track_position_unref (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
if (priv->track_position_refcount-- == 0)
meta_backend_track_position (backend, FALSE);
}

View File

@@ -30,8 +30,6 @@
struct _MetaCursorTracker {
GObject parent_instance;
MetaCursorRenderer *renderer;
gboolean is_showing;
MetaCursorSprite *displayed_cursor;
@@ -63,10 +61,8 @@ void meta_cursor_tracker_unset_window_cursor (MetaCursorTracker *tracker);
void meta_cursor_tracker_set_root_cursor (MetaCursorTracker *tracker,
MetaCursorSprite *cursor_sprite);
void meta_cursor_tracker_update_position (MetaCursorTracker *tracker,
int new_x,
int new_y);
MetaCursorSprite * meta_cursor_tracker_get_displayed_cursor (MetaCursorTracker *tracker);
void meta_backend_cursor_position_changed (MetaCursorTracker *tracker);
#endif

View File

@@ -47,6 +47,7 @@
G_DEFINE_TYPE (MetaCursorTracker, meta_cursor_tracker, G_TYPE_OBJECT);
enum {
POSITION_CHANGED,
CURSOR_CHANGED,
LAST_SIGNAL
};
@@ -73,7 +74,11 @@ get_displayed_cursor (MetaCursorTracker *tracker)
static void
update_displayed_cursor (MetaCursorTracker *tracker)
{
meta_cursor_renderer_set_cursor (tracker->renderer, tracker->displayed_cursor);
MetaBackend *backend = meta_get_backend ();
MetaCursorRenderer *cursor_renderer =
meta_backend_get_cursor_renderer (backend);
meta_cursor_renderer_set_cursor (cursor_renderer, tracker->displayed_cursor);
}
static void
@@ -95,9 +100,6 @@ sync_cursor (MetaCursorTracker *tracker)
static void
meta_cursor_tracker_init (MetaCursorTracker *self)
{
MetaBackend *backend = meta_get_backend ();
self->renderer = meta_backend_get_cursor_renderer (backend);
self->is_showing = TRUE;
}
@@ -127,16 +129,15 @@ meta_cursor_tracker_class_init (MetaCursorTrackerClass *klass)
0,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
}
static MetaCursorTracker *
meta_cursor_tracker_new (void)
{
return g_object_new (META_TYPE_CURSOR_TRACKER, NULL);
signals[POSITION_CHANGED] = g_signal_new ("position-changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
}
static MetaCursorTracker *_cursor_tracker;
/**
* meta_cursor_tracker_get_for_screen:
* @screen: the #MetaScreen
@@ -148,10 +149,12 @@ static MetaCursorTracker *_cursor_tracker;
MetaCursorTracker *
meta_cursor_tracker_get_for_screen (MetaScreen *screen)
{
if (!_cursor_tracker)
_cursor_tracker = meta_cursor_tracker_new ();
MetaBackend *backend = meta_get_backend ();
MetaCursorTracker *tracker = meta_backend_get_cursor_tracker (backend);
return _cursor_tracker;
g_assert (tracker);
return tracker;
}
static void
@@ -353,16 +356,6 @@ meta_cursor_tracker_set_root_cursor (MetaCursorTracker *tracker,
sync_cursor (tracker);
}
void
meta_cursor_tracker_update_position (MetaCursorTracker *tracker,
int new_x,
int new_y)
{
g_assert (meta_is_wayland_compositor ());
meta_cursor_renderer_set_position (tracker->renderer, new_x, new_y);
}
static void
get_pointer_position_gdk (int *x,
int *y,
@@ -436,3 +429,21 @@ meta_cursor_tracker_get_displayed_cursor (MetaCursorTracker *tracker)
{
return tracker->displayed_cursor;
}
void
meta_cursor_tracker_position_changed (MetaCursorTracker *tracker)
{
g_signal_emit (tracker, signals[POSITION_CHANGED], 0);
}
void
meta_cursor_tracker_enable_track_position (MetaCursorTracker *tracker)
{
meta_backend_track_position_ref (meta_get_backend ());
}
void
meta_cursor_tracker_disable_track_position (MetaCursorTracker *tracker)
{
meta_backend_track_position_unref (meta_get_backend ());
}

View File

@@ -77,4 +77,25 @@ EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireAttribEXT (EGLDisplay dpy,
#define EGL_DRM_FLIP_EVENT_DATA_NV 0x333E
#endif /* EGL_NV_output_drm_flip_event */
#ifndef EGL_NV_stream_attrib
#define EGL_NV_stream_attrib 1
#ifdef EGL_EGLEXT_PROTOTYPES
EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamAttribNV(EGLDisplay dpy, const EGLAttrib *attrib_list);
EGLAPI EGLBoolean EGLAPIENTRY eglSetStreamAttribNV(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib value);
EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamAttribNV(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib *value);
EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireAttribNV(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseAttribNV(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
#endif
typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMATTRIBNVPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETSTREAMATTRIBNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib value);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMATTRIBNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib *value);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREATTRIBNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEATTRIBNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
#endif /* EGL_NV_stream_attrib */
#ifndef EGL_WL_wayland_eglstream
#define EGL_WL_wayland_eglstream 1
#define EGL_WAYLAND_EGLSTREAM_WL 0x334B
#endif /* EGL_WL_wayland_eglstream */
#endif /* META_EGL_EXT_H */

View File

@@ -56,17 +56,16 @@ struct _MetaEgl
PFNEGLDESTROYSTREAMKHRPROC eglDestroyStreamKHR;
PFNEGLQUERYSTREAMKHRPROC eglQueryStreamKHR;
PFNEGLCREATESTREAMATTRIBNVPROC eglCreateStreamAttribNV;
PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC eglCreateStreamProducerSurfaceKHR;
PFNEGLSTREAMCONSUMEROUTPUTEXTPROC eglStreamConsumerOutputEXT;
PFNEGLSTREAMCONSUMERACQUIREATTRIBEXTPROC eglStreamConsumerAcquireAttribEXT;
PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC eglStreamConsumerGLTextureExternalKHR;
PFNEGLSTREAMCONSUMERACQUIREKHRPROC eglStreamConsumerAcquireKHR;
PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC eglCreateStreamFromFileDescriptorKHR;
PFNEGLSTREAMCONSUMERACQUIREATTRIBNVPROC eglStreamConsumerAcquireAttribNV;
};
G_DEFINE_TYPE (MetaEgl, meta_egl, G_TYPE_OBJECT)
@@ -140,9 +139,9 @@ set_egl_error (GError **error)
return;
error_str = get_egl_error_str ();
g_set_error (error, G_IO_ERROR,
G_IO_ERROR_FAILED,
error_str);
g_set_error_literal (error, G_IO_ERROR,
G_IO_ERROR_FAILED,
error_str);
}
static gboolean
@@ -577,6 +576,27 @@ meta_egl_query_stream (MetaEgl *egl,
return TRUE;
}
EGLStreamKHR
meta_egl_create_stream_attrib (MetaEgl *egl,
EGLDisplay display,
const EGLAttrib *attrib_list,
GError **error)
{
EGLStreamKHR stream;
if (!is_egl_proc_valid (egl->eglCreateStreamAttribNV, error))
return FALSE;
stream = egl->eglCreateStreamAttribNV (display, attrib_list);
if (stream == EGL_NO_STREAM_KHR)
{
set_egl_error (error);
return EGL_NO_STREAM_KHR;
}
return stream;
}
EGLSurface
meta_egl_create_stream_producer_surface (MetaEgl *egl,
EGLDisplay display,
@@ -629,10 +649,10 @@ meta_egl_stream_consumer_acquire_attrib (MetaEgl *egl,
EGLAttrib *attrib_list,
GError **error)
{
if (!is_egl_proc_valid (egl->eglStreamConsumerAcquireAttribEXT, error))
if (!is_egl_proc_valid (egl->eglStreamConsumerAcquireAttribNV, error))
return FALSE;
if (!egl->eglStreamConsumerAcquireAttribEXT (display, stream, attrib_list))
if (!egl->eglStreamConsumerAcquireAttribNV (display, stream, attrib_list))
{
set_egl_error (error);
return FALSE;
@@ -677,27 +697,6 @@ meta_egl_stream_consumer_acquire (MetaEgl *egl,
return TRUE;
}
EGLStreamKHR
meta_egl_create_stream_from_file_descriptor (MetaEgl *egl,
EGLDisplay display,
EGLNativeFileDescriptorKHR file_descriptor,
GError **error)
{
EGLStreamKHR stream;
if (!is_egl_proc_valid (egl->eglCreateStreamFromFileDescriptorKHR, error))
return EGL_NO_STREAM_KHR;
stream = egl->eglCreateStreamFromFileDescriptorKHR (display, file_descriptor);
if (stream == EGL_NO_STREAM_KHR)
{
set_egl_error (error);
return EGL_NO_STREAM_KHR;
}
return stream;
}
#define GET_EGL_PROC_ADDR(proc) \
egl->proc = (void *) eglGetProcAddress (#proc);
@@ -730,17 +729,16 @@ meta_egl_constructed (GObject *object)
GET_EGL_PROC_ADDR (eglDestroyStreamKHR);
GET_EGL_PROC_ADDR (eglQueryStreamKHR);
GET_EGL_PROC_ADDR (eglCreateStreamAttribNV);
GET_EGL_PROC_ADDR (eglCreateStreamProducerSurfaceKHR);
GET_EGL_PROC_ADDR (eglStreamConsumerOutputEXT);
GET_EGL_PROC_ADDR (eglStreamConsumerAcquireAttribEXT);
GET_EGL_PROC_ADDR (eglStreamConsumerGLTextureExternalKHR);
GET_EGL_PROC_ADDR (eglStreamConsumerAcquireKHR);
GET_EGL_PROC_ADDR (eglCreateStreamFromFileDescriptorKHR);
GET_EGL_PROC_ADDR (eglStreamConsumerAcquireAttribNV);
}
#undef GET_EGL_PROC_ADDR

View File

@@ -129,6 +129,11 @@ gboolean meta_egl_query_stream (MetaEgl *egl,
EGLint *value,
GError **error);
EGLStreamKHR meta_egl_create_stream_attrib (MetaEgl *egl,
EGLDisplay display,
const EGLAttrib *attrib_list,
GError **error);
EGLSurface meta_egl_create_stream_producer_surface (MetaEgl *egl,
EGLDisplay display,
EGLConfig config,
@@ -158,9 +163,4 @@ gboolean meta_egl_stream_consumer_gl_texture_external (MetaEgl *egl,
EGLStreamKHR stream,
GError **error);
EGLStreamKHR meta_egl_create_stream_from_file_descriptor (MetaEgl *egl,
EGLDisplay display,
EGLNativeFileDescriptorKHR file_descriptor,
GError **error);
#endif /* META_EGL_H */

View File

@@ -117,6 +117,9 @@ struct _MetaInputSettingsClass
ClutterInputDeviceTool *tool,
GDesktopStylusButtonAction primary,
GDesktopStylusButtonAction secondary);
gboolean (* has_two_finger_scroll) (MetaInputSettings *settings,
ClutterInputDevice *device);
};
GType meta_input_settings_get_type (void) G_GNUC_CONST;
@@ -125,8 +128,8 @@ MetaInputSettings * meta_input_settings_create (void);
GSettings * meta_input_settings_get_tablet_settings (MetaInputSettings *settings,
ClutterInputDevice *device);
MetaMonitorInfo * meta_input_settings_get_tablet_monitor_info (MetaInputSettings *settings,
ClutterInputDevice *device);
MetaLogicalMonitor * meta_input_settings_get_tablet_logical_monitor (MetaInputSettings *settings,
ClutterInputDevice *device);
GDesktopTabletMapping meta_input_settings_get_tablet_mapping (MetaInputSettings *settings,
ClutterInputDevice *device);
@@ -135,10 +138,8 @@ gboolean meta_input_settings_is_pad_button_grabbed (MetaIn
ClutterInputDevice *pad,
guint button);
gboolean meta_input_settings_handle_pad_button (MetaInputSettings *input_settings,
ClutterInputDevice *pad,
gboolean is_press,
guint button);
gboolean meta_input_settings_handle_pad_button (MetaInputSettings *input_settings,
const ClutterPadButtonEvent *event);
gchar * meta_input_settings_get_pad_button_action_label (MetaInputSettings *input_settings,
ClutterInputDevice *pad,
guint button);

View File

@@ -74,6 +74,8 @@ struct _MetaInputSettingsPrivate
#ifdef HAVE_LIBWACOM
WacomDeviceDatabase *wacom_db;
#endif
GHashTable *two_finger_devices;
};
typedef void (*ConfigBoolFunc) (MetaInputSettings *input_settings,
@@ -141,6 +143,8 @@ meta_input_settings_dispose (GObject *object)
libwacom_database_destroy (priv->wacom_db);
#endif
g_clear_pointer (&priv->two_finger_devices, g_hash_table_destroy);
G_OBJECT_CLASS (meta_input_settings_parent_class)->dispose (object);
}
@@ -477,6 +481,7 @@ update_touchpad_edge_scroll (MetaInputSettings *input_settings,
MetaInputSettingsClass *input_settings_class;
gboolean edge_scroll_enabled;
gboolean two_finger_scroll_enabled;
gboolean two_finger_scroll_available;
MetaInputSettingsPrivate *priv;
if (device &&
@@ -487,9 +492,10 @@ update_touchpad_edge_scroll (MetaInputSettings *input_settings,
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
edge_scroll_enabled = g_settings_get_boolean (priv->touchpad_settings, "edge-scrolling-enabled");
two_finger_scroll_enabled = g_settings_get_boolean (priv->touchpad_settings, "two-finger-scrolling-enabled");
two_finger_scroll_available = g_hash_table_size (priv->two_finger_devices) > 0;
/* If both are enabled we prefer two finger. */
if (edge_scroll_enabled && two_finger_scroll_enabled)
if (edge_scroll_enabled && two_finger_scroll_enabled && two_finger_scroll_available)
edge_scroll_enabled = FALSE;
if (device)
@@ -672,6 +678,9 @@ update_keyboard_repeat (MetaInputSettings *input_settings)
delay = g_settings_get_uint (priv->keyboard_settings, "delay");
interval = g_settings_get_uint (priv->keyboard_settings, "repeat-interval");
delay = MAX (1, delay);
interval = MAX (1, interval);
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
input_settings_class->set_keyboard_repeat (input_settings,
repeat, delay, interval);
@@ -1268,6 +1277,23 @@ apply_stylus_settings (MetaInputSettings *input_settings,
update_stylus_buttonmap (input_settings, device, tool);
}
static void
evaluate_two_finger_scrolling (MetaInputSettings *input_settings,
ClutterInputDevice *device)
{
MetaInputSettingsClass *klass;
MetaInputSettingsPrivate *priv;
if (clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE)
return;
klass = META_INPUT_SETTINGS_GET_CLASS (input_settings);
priv = meta_input_settings_get_instance_private (input_settings);
if (klass->has_two_finger_scroll (input_settings, device))
g_hash_table_add (priv->two_finger_devices, device);
}
static void
meta_input_settings_device_added (ClutterDeviceManager *device_manager,
ClutterInputDevice *device,
@@ -1276,6 +1302,8 @@ meta_input_settings_device_added (ClutterDeviceManager *device_manager,
if (clutter_input_device_get_device_mode (device) == CLUTTER_INPUT_MODE_MASTER)
return;
evaluate_two_finger_scrolling (input_settings, device);
apply_device_settings (input_settings, device);
check_add_mappable_device (input_settings, device);
}
@@ -1289,6 +1317,10 @@ meta_input_settings_device_removed (ClutterDeviceManager *device_manager,
priv = meta_input_settings_get_instance_private (input_settings);
g_hash_table_remove (priv->mappable_devices, device);
if (g_hash_table_remove (priv->two_finger_devices, device) &&
g_hash_table_size (priv->two_finger_devices) == 0)
apply_device_settings (input_settings, NULL);
}
static void
@@ -1327,6 +1359,13 @@ static void
meta_input_settings_constructed (GObject *object)
{
MetaInputSettings *input_settings = META_INPUT_SETTINGS (object);
GSList *devices, *d;
devices = meta_input_settings_get_devices (input_settings, CLUTTER_TOUCHPAD_DEVICE);
for (d = devices; d; d = d->next)
evaluate_two_finger_scrolling (input_settings, d->data);
g_slist_free (devices);
apply_device_settings (input_settings, NULL);
update_keyboard_repeat (input_settings);
@@ -1390,6 +1429,8 @@ meta_input_settings_init (MetaInputSettings *settings)
"expect tablets to misbehave");
}
#endif
priv->two_finger_devices = g_hash_table_new (NULL, NULL);
}
MetaInputSettings *
@@ -1425,9 +1466,9 @@ meta_input_settings_get_tablet_settings (MetaInputSettings *settings,
return info ? g_object_ref (info->settings) : NULL;
}
MetaMonitorInfo *
meta_input_settings_get_tablet_monitor_info (MetaInputSettings *settings,
ClutterInputDevice *device)
MetaLogicalMonitor *
meta_input_settings_get_tablet_logical_monitor (MetaInputSettings *settings,
ClutterInputDevice *device)
{
MetaInputSettingsPrivate *priv;
DeviceMappingInfo *info;
@@ -1559,7 +1600,7 @@ meta_input_settings_cycle_tablet_output (MetaInputSettings *input_settings,
MetaInputSettingsPrivate *priv;
DeviceMappingInfo *info;
MetaOutput *output;
const gchar *edid[4] = { 0 };
const gchar *edid[4] = { 0 }, *pretty_name = NULL;
g_return_if_fail (META_IS_INPUT_SETTINGS (input_settings));
g_return_if_fail (CLUTTER_IS_INPUT_DEVICE (device));
@@ -1571,10 +1612,14 @@ meta_input_settings_cycle_tablet_output (MetaInputSettings *input_settings,
g_return_if_fail (info != NULL);
#ifdef HAVE_LIBWACOM
/* Output rotation only makes sense on external tablets */
if (info->wacom_device &&
(libwacom_get_integration_flags (info->wacom_device) != WACOM_DEVICE_INTEGRATED_NONE))
return;
if (info->wacom_device)
{
/* Output rotation only makes sense on external tablets */
if (libwacom_get_integration_flags (info->wacom_device) != WACOM_DEVICE_INTEGRATED_NONE)
return;
pretty_name = libwacom_get_name (info->wacom_device);
}
#endif
output = meta_input_settings_find_output (input_settings,
@@ -1586,6 +1631,9 @@ meta_input_settings_cycle_tablet_output (MetaInputSettings *input_settings,
edid[1] = output ? output->product : "";
edid[2] = output ? output->serial : "";
g_settings_set_strv (info->settings, "display", edid);
meta_display_show_tablet_mapping_notification (meta_get_display (),
device, pretty_name);
}
static void
@@ -1671,17 +1719,41 @@ meta_input_settings_is_pad_button_grabbed (MetaInputSettings *input_settings,
}
gboolean
meta_input_settings_handle_pad_button (MetaInputSettings *input_settings,
ClutterInputDevice *pad,
gboolean is_press,
guint button)
meta_input_settings_handle_pad_button (MetaInputSettings *input_settings,
const ClutterPadButtonEvent *event)
{
GDesktopPadButtonAction action;
ClutterInputDevice *pad;
gint button, group, mode;
gboolean is_press;
g_return_val_if_fail (META_IS_INPUT_SETTINGS (input_settings), FALSE);
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (pad), FALSE);
g_return_val_if_fail (clutter_input_device_get_device_type (pad) ==
CLUTTER_PAD_DEVICE, FALSE);
g_return_val_if_fail (event->type == CLUTTER_PAD_BUTTON_PRESS ||
event->type == CLUTTER_PAD_BUTTON_RELEASE, FALSE);
pad = clutter_event_get_source_device ((ClutterEvent *) event);
button = event->button;
mode = event->mode;
group = clutter_input_device_get_mode_switch_button_group (pad, button);
is_press = event->type == CLUTTER_PAD_BUTTON_PRESS;
if (is_press && group >= 0)
{
guint n_modes = clutter_input_device_get_group_n_modes (pad, group);
const gchar *pretty_name = NULL;
#ifdef HAVE_LIBWACOM
MetaInputSettingsPrivate *priv;
DeviceMappingInfo *info;
priv = meta_input_settings_get_instance_private (input_settings);
info = g_hash_table_lookup (priv->mappable_devices, pad);
if (info && info->wacom_device)
pretty_name = libwacom_get_name (info->wacom_device);
#endif
meta_display_notify_pad_group_switch (meta_get_display (), pad,
pretty_name, group, mode, n_modes);
}
action = meta_input_settings_get_pad_button_action (input_settings, pad, button);
@@ -1711,12 +1783,23 @@ meta_input_settings_get_pad_button_action_label (MetaInputSettings *input_setti
guint button)
{
GDesktopPadButtonAction action;
gint group;
g_return_val_if_fail (META_IS_INPUT_SETTINGS (input_settings), NULL);
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (pad), NULL);
g_return_val_if_fail (clutter_input_device_get_device_type (pad) ==
CLUTTER_PAD_DEVICE, NULL);
group = clutter_input_device_get_mode_switch_button_group (pad, button);
if (group >= 0)
{
/* TRANSLATORS: This string refers to a button that switches between
* different modes.
*/
return g_strdup_printf (_("Mode Switch (Group %d)"), group);
}
action = meta_input_settings_get_pad_button_action (input_settings, pad, button);
switch (action)

View File

@@ -0,0 +1,137 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2016 Red Hat
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#include "config.h"
#include "backends/meta-logical-monitor.h"
G_DEFINE_TYPE (MetaLogicalMonitor, meta_logical_monitor, G_TYPE_OBJECT)
MetaLogicalMonitor *
meta_logical_monitor_new (MetaMonitor *monitor,
int x,
int y,
int number)
{
MetaLogicalMonitor *logical_monitor;
MetaOutput *main_output;
GList *outputs;
GList *l;
gboolean is_presentation;
g_assert (meta_monitor_is_active (monitor));
logical_monitor = g_object_new (META_TYPE_LOGICAL_MONITOR, NULL);
main_output = meta_monitor_get_main_output (monitor);
logical_monitor->number = number;
logical_monitor->winsys_id = main_output->winsys_id;
logical_monitor->scale = main_output->scale;
logical_monitor->in_fullscreen = -1;
logical_monitor->rect.x = x;
logical_monitor->rect.y = y;
meta_monitor_get_dimensions (monitor,
&logical_monitor->rect.width,
&logical_monitor->rect.height);
is_presentation = TRUE;
outputs = meta_monitor_get_outputs (monitor);
for (l = outputs; l; l = l->next)
{
MetaOutput *output = l->data;
output->crtc->logical_monitor = logical_monitor;
is_presentation = is_presentation && output->is_presentation;
}
logical_monitor->is_presentation = is_presentation;
logical_monitor->monitors = g_list_append (logical_monitor->monitors,
monitor);
return logical_monitor;
}
void
meta_logical_monitor_add_monitor (MetaLogicalMonitor *logical_monitor,
MetaMonitor *monitor)
{
GList *l;
gboolean is_presentation;
is_presentation = logical_monitor->is_presentation;
logical_monitor->monitors = g_list_append (logical_monitor->monitors,
monitor);
for (l = logical_monitor->monitors; l; l = l->next)
{
MetaMonitor *monitor = l->data;
GList *outputs;
GList *l_output;
outputs = meta_monitor_get_outputs (monitor);
for (l_output = outputs; l_output; l_output = l_output->next)
{
MetaOutput *output = l_output->data;
is_presentation = is_presentation && output->is_presentation;
output->crtc->logical_monitor = logical_monitor;
}
}
logical_monitor->is_presentation = is_presentation;
}
gboolean
meta_logical_monitor_is_primary (MetaLogicalMonitor *logical_monitor)
{
return logical_monitor->is_primary;
}
void
meta_logical_monitor_make_primary (MetaLogicalMonitor *logical_monitor)
{
logical_monitor->is_primary = TRUE;
}
int
meta_logical_monitor_get_scale (MetaLogicalMonitor *logical_monitor)
{
return logical_monitor->scale;
}
GList *
meta_logical_monitor_get_monitors (MetaLogicalMonitor *logical_monitor)
{
return logical_monitor->monitors;
}
static void
meta_logical_monitor_init (MetaLogicalMonitor *logical_monitor)
{
}
static void
meta_logical_monitor_class_init (MetaLogicalMonitorClass *klass)
{
}

View File

@@ -0,0 +1,78 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2016 Red Hat
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef META_LOGICAL_MONITOR_H
#define META_LOGICAL_MONITOR_H
#include <glib-object.h>
#include "backends/meta-monitor.h"
#include "backends/meta-monitor-manager-private.h"
#include "meta/boxes.h"
#define META_MAX_OUTPUTS_PER_MONITOR 4
struct _MetaLogicalMonitor
{
GObject parent;
int number;
MetaRectangle rect;
gboolean is_primary;
gboolean is_presentation; /* XXX: not yet used */
gboolean in_fullscreen;
int scale;
/* The primary or first output for this monitor, 0 if we can't figure out.
It can be matched to a winsys_id of a MetaOutput.
This is used as an opaque token on reconfiguration when switching from
clone to extened, to decide on what output the windows should go next
(it's an attempt to keep windows on the same monitor, and preferably on
the primary one).
*/
glong winsys_id;
GList *monitors;
};
#define META_TYPE_LOGICAL_MONITOR (meta_logical_monitor_get_type ())
G_DECLARE_FINAL_TYPE (MetaLogicalMonitor, meta_logical_monitor,
META, LOGICAL_MONITOR,
GObject)
MetaLogicalMonitor * meta_logical_monitor_new (MetaMonitor *monitor,
int x,
int y,
int number);
void meta_logical_monitor_add_monitor (MetaLogicalMonitor *logical_monitor,
MetaMonitor *monitor);
gboolean meta_logical_monitor_is_primary (MetaLogicalMonitor *logical_monitor);
void meta_logical_monitor_make_primary (MetaLogicalMonitor *logical_monitor);
int meta_logical_monitor_get_scale (MetaLogicalMonitor *logical_monitor);
GList * meta_logical_monitor_get_monitors (MetaLogicalMonitor *logical_monitor);
#endif /* META_LOGICAL_MONITOR_H */

View File

@@ -0,0 +1,794 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2016 Red Hat
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#include "config.h"
#include "backends/meta-monitor-config-manager.h"
#include "backends/meta-monitor-config-store.h"
#include "backends/meta-monitor-manager-private.h"
#include "core/boxes-private.h"
struct _MetaMonitorConfigManager
{
GObject parent;
MetaMonitorManager *monitor_manager;
MetaMonitorConfigStore *config_store;
MetaMonitorsConfig *current_config;
};
G_DEFINE_TYPE (MetaMonitorConfigManager, meta_monitor_config_manager,
G_TYPE_OBJECT)
G_DEFINE_TYPE (MetaMonitorsConfig, meta_monitors_config,
G_TYPE_OBJECT)
MetaMonitorConfigManager *
meta_monitor_config_manager_new (MetaMonitorManager *monitor_manager)
{
MetaMonitorConfigManager *config_manager;
config_manager = g_object_new (META_TYPE_MONITOR_CONFIG_MANAGER, NULL);
config_manager->monitor_manager = monitor_manager;
config_manager->config_store = g_object_new (META_TYPE_MONITOR_CONFIG_STORE,
NULL);
return config_manager;
}
MetaMonitorConfigStore *
meta_monitor_config_manager_get_store (MetaMonitorConfigManager *config_manager)
{
return config_manager->config_store;
}
static gboolean
is_crtc_assigned (MetaCrtc *crtc,
GPtrArray *crtc_infos)
{
unsigned int i;
for (i = 0; i < crtc_infos->len; i++)
{
MetaCrtcInfo *assigned_crtc_info = g_ptr_array_index (crtc_infos, i);
if (assigned_crtc_info->crtc == crtc)
return TRUE;
}
return FALSE;
}
static MetaCrtc *
find_unassigned_crtc (MetaOutput *output,
GPtrArray *crtc_infos)
{
unsigned int i;
for (i = 0; i < output->n_possible_crtcs; i++)
{
MetaCrtc *crtc = output->possible_crtcs[i];
if (is_crtc_assigned (crtc, crtc_infos))
continue;
return crtc;
}
return NULL;
}
typedef struct
{
MetaLogicalMonitorConfig *logical_monitor_config;
MetaMonitorConfig *monitor_config;
GPtrArray *crtc_infos;
GPtrArray *output_infos;
} MonitorAssignmentData;
static gboolean
assign_monitor_crtc (MetaMonitor *monitor,
MetaMonitorMode *mode,
MetaMonitorCrtcMode *monitor_crtc_mode,
gpointer user_data,
GError **error)
{
MonitorAssignmentData *data = user_data;
MetaOutput *output;
MetaCrtc *crtc;
MetaCrtcInfo *crtc_info;
MetaOutputInfo *output_info;
MetaMonitorConfig *first_monitor_config;
gboolean assign_output_as_primary;
gboolean assign_output_as_presentation;
output = monitor_crtc_mode->output;
crtc = find_unassigned_crtc (output, data->crtc_infos);
if (!crtc)
{
MetaMonitorSpec *monitor_spec = meta_monitor_get_spec (monitor);
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"No available CRTC for monitor '%s %s' not found",
monitor_spec->vendor, monitor_spec->product);
return FALSE;
}
crtc_info = g_slice_new0 (MetaCrtcInfo);
*crtc_info = (MetaCrtcInfo) {
.crtc = crtc,
.mode = monitor_crtc_mode->crtc_mode,
.x = monitor_crtc_mode->x,
.y = monitor_crtc_mode->y,
.transform = META_MONITOR_TRANSFORM_NORMAL,
.outputs = g_ptr_array_new ()
};
g_ptr_array_add (crtc_info->outputs, output);
/*
* Currently, MetaCrtcInfo are deliberately offset incorrectly to carry over
* logical monitor location inside the MetaCrtc struct, when in fact this
* depends on the framebuffer configuration. This will eventually be negated
* when setting the actual KMS mode.
*
* TODO: Remove this hack when we don't need to rely on MetaCrtc to pass
* logical monitor state.
*/
crtc_info->x += data->logical_monitor_config->layout.x;
crtc_info->y += data->logical_monitor_config->layout.y;
/*
* Only one output can be marked as primary (due to Xrandr limitation),
* so only mark the main output of the first monitor in the logical monitor
* as such.
*/
first_monitor_config = data->logical_monitor_config->monitor_configs->data;
if (data->monitor_config == first_monitor_config &&
meta_monitor_get_main_output (monitor) == output)
assign_output_as_primary = TRUE;
else
assign_output_as_primary = FALSE;
if (data->logical_monitor_config->is_presentation)
assign_output_as_presentation = TRUE;
else
assign_output_as_presentation = FALSE;
output_info = g_slice_new0 (MetaOutputInfo);
*output_info = (MetaOutputInfo) {
.output = output,
.is_primary = assign_output_as_primary,
.is_presentation = assign_output_as_presentation,
.is_underscanning = data->monitor_config->is_underscanning
};
g_ptr_array_add (data->crtc_infos, crtc_info);
g_ptr_array_add (data->output_infos, output_info);
return TRUE;
}
static gboolean
assign_monitor_crtcs (MetaMonitorManager *manager,
MetaLogicalMonitorConfig *logical_monitor_config,
MetaMonitorConfig *monitor_config,
GPtrArray *crtc_infos,
GPtrArray *output_infos,
GError **error)
{
MetaMonitorSpec *monitor_spec = monitor_config->monitor_spec;
MetaMonitorModeSpec *monitor_mode_spec = monitor_config->mode_spec;
MetaMonitor *monitor;
MetaMonitorMode *monitor_mode;
MonitorAssignmentData data;
monitor = meta_monitor_manager_get_monitor_from_spec (manager, monitor_spec);
if (!monitor)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Configured monitor '%s %s' not found",
monitor_spec->vendor, monitor_spec->product);
return FALSE;
}
monitor_mode = meta_monitor_get_mode_from_spec (monitor, monitor_mode_spec);
if (!monitor_mode)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Invalid mode %dx%d (%f) for monitor '%s %s'",
monitor_mode_spec->width, monitor_mode_spec->height,
monitor_mode_spec->refresh_rate,
monitor_spec->vendor, monitor_spec->product);
return FALSE;
}
data = (MonitorAssignmentData) {
.logical_monitor_config = logical_monitor_config,
.monitor_config = monitor_config,
.crtc_infos = crtc_infos,
.output_infos = output_infos
};
if (!meta_monitor_mode_foreach_crtc (monitor, monitor_mode,
assign_monitor_crtc,
&data,
error))
return FALSE;
return TRUE;
}
static gboolean
assign_logical_monitor_crtcs (MetaMonitorManager *manager,
MetaLogicalMonitorConfig *logical_monitor_config,
GPtrArray *crtc_infos,
GPtrArray *output_infos,
GError **error)
{
GList *l;
for (l = logical_monitor_config->monitor_configs; l; l = l->next)
{
MetaMonitorConfig *monitor_config = l->data;
if (!assign_monitor_crtcs (manager,
logical_monitor_config,
monitor_config,
crtc_infos, output_infos,
error))
return FALSE;
}
return TRUE;
}
gboolean
meta_monitor_config_manager_assign (MetaMonitorManager *manager,
MetaMonitorsConfig *config,
GPtrArray **out_crtc_infos,
GPtrArray **out_output_infos,
GError **error)
{
GPtrArray *crtc_infos;
GPtrArray *output_infos;
GList *l;
crtc_infos =
g_ptr_array_new_with_free_func ((GDestroyNotify) meta_crtc_info_free);
output_infos =
g_ptr_array_new_with_free_func ((GDestroyNotify) meta_output_info_free);
for (l = config->logical_monitor_configs; l; l = l->next)
{
MetaLogicalMonitorConfig *logical_monitor_config = l->data;
if (!assign_logical_monitor_crtcs (manager, logical_monitor_config,
crtc_infos, output_infos,
error))
{
g_ptr_array_free (crtc_infos, TRUE);
g_ptr_array_free (output_infos, TRUE);
return FALSE;
}
}
*out_crtc_infos = crtc_infos;
*out_output_infos = output_infos;
return TRUE;
}
static MetaMonitorsConfigKey *
create_key_for_current_state (MetaMonitorManager *monitor_manager)
{
MetaMonitorsConfigKey *config_key;
GList *l;
GList *monitor_specs;
monitor_specs = NULL;
for (l = monitor_manager->monitors; l; l = l->next)
{
MetaMonitor *monitor = l->data;
MetaMonitorSpec *monitor_spec;
if (meta_monitor_is_laptop_panel (monitor) &&
meta_monitor_manager_is_lid_closed (monitor_manager))
continue;
monitor_spec = meta_monitor_spec_clone (meta_monitor_get_spec (monitor));
monitor_specs = g_list_prepend (monitor_specs, monitor_spec);
}
if (!monitor_specs)
return NULL;
monitor_specs = g_list_sort (monitor_specs,
(GCompareFunc) meta_monitor_spec_compare);
config_key = g_new0 (MetaMonitorsConfigKey, 1);
*config_key = (MetaMonitorsConfigKey) {
.monitor_specs = monitor_specs
};
return config_key;
}
MetaMonitorsConfig *
meta_monitor_config_manager_get_stored (MetaMonitorConfigManager *config_manager)
{
MetaMonitorsConfigKey *config_key;
MetaMonitorsConfig *config;
config_key = create_key_for_current_state (config_manager->monitor_manager);
if (!config_key)
return NULL;
config = meta_monitor_config_store_lookup (config_manager->config_store,
config_key);
meta_monitors_config_key_free (config_key);
return config;
}
typedef enum _MonitorMatchRule
{
MONITOR_MATCH_ALL = 0,
MONITOR_MATCH_EXTERNAL = (1 << 0)
} MonitorMatchRule;
static MetaMonitor *
find_monitor_with_highest_preferred_resolution (MetaMonitorManager *monitor_manager,
MonitorMatchRule match_rule)
{
GList *monitors;
GList *l;
int largest_area = 0;
MetaMonitor *largest_monitor = NULL;
monitors = meta_monitor_manager_get_monitors (monitor_manager);
for (l = monitors; l; l = l->next)
{
MetaMonitor *monitor = l->data;
MetaMonitorMode *mode;
int width, height;
int area;
if (match_rule & MONITOR_MATCH_EXTERNAL)
{
if (meta_monitor_is_laptop_panel (monitor))
continue;
}
mode = meta_monitor_get_preferred_mode (monitor);
meta_monitor_mode_get_resolution (mode, &width, &height);
area = width * height;
if (area > largest_area)
{
largest_area = area;
largest_monitor = monitor;
}
}
return largest_monitor;
}
/*
* Try to find the primary monitor. The priority of classification is:
*
* 1. Find the primary monitor as reported by the underlying system,
* 2. Find the laptop panel
* 3. Find the external monitor with highest resolution
*
* If the laptop lid is closed, exclude the laptop panel from possible
* alternatives, except if no other alternatives exist.
*/
static MetaMonitor *
find_primary_monitor (MetaMonitorManager *monitor_manager)
{
MetaMonitor *monitor;
if (meta_monitor_manager_is_lid_closed (monitor_manager))
{
monitor = meta_monitor_manager_get_primary_monitor (monitor_manager);
if (monitor && !meta_monitor_is_laptop_panel (monitor))
return monitor;
monitor =
find_monitor_with_highest_preferred_resolution (monitor_manager,
MONITOR_MATCH_EXTERNAL);
if (monitor)
return monitor;
return find_monitor_with_highest_preferred_resolution (monitor_manager,
MONITOR_MATCH_ALL);
}
else
{
monitor = meta_monitor_manager_get_primary_monitor (monitor_manager);
if (monitor)
return monitor;
monitor = meta_monitor_manager_get_laptop_panel (monitor_manager);
if (monitor)
return monitor;
return find_monitor_with_highest_preferred_resolution (monitor_manager,
MONITOR_MATCH_ALL);
}
}
static MetaMonitorConfig *
create_monitor_config (MetaMonitor *monitor,
MetaMonitorMode *mode)
{
MetaMonitorSpec *monitor_spec;
MetaMonitorModeSpec *mode_spec;
MetaMonitorConfig *monitor_config;
monitor_spec = meta_monitor_get_spec (monitor);
mode_spec = meta_monitor_mode_get_spec (mode);
monitor_config = g_new0 (MetaMonitorConfig, 1);
*monitor_config = (MetaMonitorConfig) {
.monitor_spec = meta_monitor_spec_clone (monitor_spec),
.mode_spec = g_memdup (mode_spec, sizeof (MetaMonitorModeSpec)),
.is_underscanning = meta_monitor_is_underscanning (monitor)
};
return monitor_config;
}
static MetaLogicalMonitorConfig *
create_preferred_logical_monitor_config (MetaMonitor *monitor,
int x,
int y)
{
MetaMonitorMode *mode;
int width, height;
MetaMonitorConfig *monitor_config;
MetaLogicalMonitorConfig *logical_monitor_config;
mode = meta_monitor_get_preferred_mode (monitor);
meta_monitor_mode_get_resolution (mode, &width, &height);
monitor_config = create_monitor_config (monitor, mode);
logical_monitor_config = g_new0 (MetaLogicalMonitorConfig, 1);
*logical_monitor_config = (MetaLogicalMonitorConfig) {
.layout = (MetaRectangle) {
.x = x,
.y = y,
.width = width,
.height = height
},
.monitor_configs = g_list_append (NULL, monitor_config)
};
return logical_monitor_config;
}
MetaMonitorsConfig *
meta_monitor_config_manager_create_linear (MetaMonitorConfigManager *config_manager)
{
MetaMonitorManager *monitor_manager = config_manager->monitor_manager;
GList *logical_monitor_configs;
MetaMonitor *primary_monitor;
MetaLogicalMonitorConfig *primary_logical_monitor_config;
int x;
GList *monitors;
GList *l;
primary_monitor = find_primary_monitor (monitor_manager);
if (!primary_monitor)
return NULL;
primary_logical_monitor_config =
create_preferred_logical_monitor_config (primary_monitor, 0, 0);
primary_logical_monitor_config->is_primary = TRUE;
logical_monitor_configs = g_list_append (NULL,
primary_logical_monitor_config);
x = primary_logical_monitor_config->layout.width;
monitors = meta_monitor_manager_get_monitors (monitor_manager);
for (l = monitors; l; l = l->next)
{
MetaMonitor *monitor = l->data;
MetaLogicalMonitorConfig *logical_monitor_config;
if (monitor == primary_monitor)
continue;
if (meta_monitor_is_laptop_panel (monitor) &&
meta_monitor_manager_is_lid_closed (monitor_manager))
continue;
logical_monitor_config =
create_preferred_logical_monitor_config (monitor, x, 0);
logical_monitor_configs = g_list_append (logical_monitor_configs,
logical_monitor_config);
x += logical_monitor_config->layout.width;
}
return meta_monitors_config_new (logical_monitor_configs);
}
MetaMonitorsConfig *
meta_monitor_config_manager_create_fallback (MetaMonitorConfigManager *config_manager)
{
MetaMonitorManager *monitor_manager = config_manager->monitor_manager;
MetaMonitor *primary_monitor;
GList *logical_monitor_configs;
MetaLogicalMonitorConfig *primary_logical_monitor_config;
primary_monitor = find_primary_monitor (monitor_manager);
if (!primary_monitor)
return NULL;
primary_logical_monitor_config =
create_preferred_logical_monitor_config (primary_monitor, 0, 0);
primary_logical_monitor_config->is_primary = TRUE;
logical_monitor_configs = g_list_append (NULL,
primary_logical_monitor_config);
return meta_monitors_config_new (logical_monitor_configs);
}
MetaMonitorsConfig *
meta_monitor_config_manager_create_suggested (MetaMonitorConfigManager *config_manager)
{
MetaMonitorManager *monitor_manager = config_manager->monitor_manager;
MetaLogicalMonitorConfig *primary_logical_monitor_config = NULL;
MetaMonitor *primary_monitor;
GList *logical_monitor_configs;
GList *region;
GList *monitors;
GList *l;
primary_monitor = find_primary_monitor (monitor_manager);
if (!primary_monitor)
return NULL;
logical_monitor_configs = NULL;
region = NULL;
monitors = meta_monitor_manager_get_monitors (monitor_manager);
for (l = monitors; l; l = l->next)
{
MetaMonitor *monitor = l->data;
MetaLogicalMonitorConfig *logical_monitor_config;
int x, y;
if (!meta_monitor_get_suggested_position (monitor, &x, &y))
continue;
logical_monitor_config =
create_preferred_logical_monitor_config (monitor, x, y);
logical_monitor_configs = g_list_append (logical_monitor_configs,
logical_monitor_config);
if (meta_rectangle_overlaps_with_region (region,
&logical_monitor_config->layout))
{
g_warning ("Suggested monitor config has overlapping region, rejecting");
g_list_free (region);
g_list_free_full (logical_monitor_configs,
(GDestroyNotify) meta_logical_monitor_config_free);
return NULL;
}
region = g_list_prepend (region, &logical_monitor_config->layout);
if (monitor == primary_monitor)
primary_logical_monitor_config = logical_monitor_config;
}
g_list_free (region);
if (!logical_monitor_configs)
return NULL;
if (!primary_logical_monitor_config)
primary_logical_monitor_config =
g_list_first (logical_monitor_configs)->data;
primary_logical_monitor_config->is_primary = TRUE;
return meta_monitors_config_new (logical_monitor_configs);
}
void
meta_monitor_config_manager_set_current (MetaMonitorConfigManager *config_manager,
MetaMonitorsConfig *config)
{
g_set_object (&config_manager->current_config, config);
}
MetaMonitorsConfig *
meta_monitor_config_manager_get_current (MetaMonitorConfigManager *config_manager)
{
return config_manager->current_config;
}
static void
meta_monitor_config_manager_dispose (GObject *object)
{
MetaMonitorConfigManager *config_manager =
META_MONITOR_CONFIG_MANAGER (object);
g_clear_object (&config_manager->current_config);
G_OBJECT_CLASS (meta_monitor_config_manager_parent_class)->dispose (object);
}
static void
meta_monitor_config_manager_init (MetaMonitorConfigManager *config_manager)
{
}
static void
meta_monitor_config_manager_class_init (MetaMonitorConfigManagerClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->dispose = meta_monitor_config_manager_dispose;
}
void
meta_monitor_config_free (MetaMonitorConfig *monitor_config)
{
meta_monitor_spec_free (monitor_config->monitor_spec);
g_free (monitor_config->mode_spec);
g_free (monitor_config);
}
void
meta_logical_monitor_config_free (MetaLogicalMonitorConfig *logical_monitor_config)
{
g_list_free_full (logical_monitor_config->monitor_configs,
(GDestroyNotify) meta_monitor_config_free);
g_free (logical_monitor_config);
}
static MetaMonitorsConfigKey *
meta_monitors_config_key_new (GList *logical_monitor_configs)
{
MetaMonitorsConfigKey *config_key;
GList *monitor_specs;
GList *l;
monitor_specs = NULL;
for (l = logical_monitor_configs; l; l = l->next)
{
MetaLogicalMonitorConfig *logical_monitor_config = l->data;
GList *k;
for (k = logical_monitor_config->monitor_configs; k; k = k->next)
{
MetaMonitorConfig *monitor_config = k->data;
MetaMonitorSpec *monitor_spec;
monitor_spec = meta_monitor_spec_clone (monitor_config->monitor_spec);
monitor_specs = g_list_prepend (monitor_specs, monitor_spec);
}
}
monitor_specs = g_list_sort (monitor_specs,
(GCompareFunc) meta_monitor_spec_compare);
config_key = g_new0 (MetaMonitorsConfigKey, 1);
*config_key = (MetaMonitorsConfigKey) {
.monitor_specs = monitor_specs
};
return config_key;
}
void
meta_monitors_config_key_free (MetaMonitorsConfigKey *config_key)
{
g_list_free_full (config_key->monitor_specs,
(GDestroyNotify) meta_monitor_spec_free);
g_free (config_key);
}
unsigned int
meta_monitors_config_key_hash (gconstpointer data)
{
const MetaMonitorsConfigKey *config_key = data;
GList *l;
unsigned long hash;
hash = 0;
for (l = config_key->monitor_specs; l; l = l->next)
{
MetaMonitorSpec *monitor_spec = l->data;
hash ^= (g_str_hash (monitor_spec->connector) ^
g_str_hash (monitor_spec->vendor) ^
g_str_hash (monitor_spec->product) ^
g_str_hash (monitor_spec->serial));
}
return hash;
}
gboolean
meta_monitors_config_key_equal (gconstpointer data_a,
gconstpointer data_b)
{
const MetaMonitorsConfigKey *config_key_a = data_a;
const MetaMonitorsConfigKey *config_key_b = data_b;
GList *l_a, *l_b;
for (l_a = config_key_a->monitor_specs, l_b = config_key_b->monitor_specs;
l_a && l_b;
l_a = l_a->next, l_b = l_b->next)
{
MetaMonitorSpec *monitor_spec_a = l_a->data;
MetaMonitorSpec *monitor_spec_b = l_b->data;
if (!meta_monitor_spec_equals (monitor_spec_a, monitor_spec_b))
return FALSE;
}
if (l_b || l_b)
return FALSE;
return TRUE;
}
MetaMonitorsConfig *
meta_monitors_config_new (GList *logical_monitor_configs)
{
MetaMonitorsConfig *config;
config = g_object_new (META_TYPE_MONITORS_CONFIG, NULL);
config->logical_monitor_configs = logical_monitor_configs;
config->key = meta_monitors_config_key_new (logical_monitor_configs);
return config;
}
static void
meta_monitors_config_finalize (GObject *object)
{
MetaMonitorsConfig *config = META_MONITORS_CONFIG (object);
meta_monitors_config_key_free (config->key);
g_list_free_full (config->logical_monitor_configs,
(GDestroyNotify) meta_logical_monitor_config_free);
}
static void
meta_monitors_config_init (MetaMonitorsConfig *config)
{
}
static void
meta_monitors_config_class_init (MetaMonitorsConfigClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = meta_monitors_config_finalize;
}

View File

@@ -0,0 +1,100 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2016 Red Hat
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef META_MONITOR_CONFIG_MANAGER_H
#define META_MONITOR_CONFIG_MANAGER_H
#include "backends/meta-monitor.h"
#include "backends/meta-monitor-manager-private.h"
#define META_TYPE_MONITOR_CONFIG_MANAGER (meta_monitor_config_manager_get_type ())
G_DECLARE_FINAL_TYPE (MetaMonitorConfigManager, meta_monitor_config_manager,
META, MONITOR_CONFIG_MANAGER, GObject)
typedef struct _MetaMonitorConfig
{
MetaMonitorSpec *monitor_spec;
MetaMonitorModeSpec *mode_spec;
gboolean is_underscanning;
} MetaMonitorConfig;
typedef struct _MetaLogicalMonitorConfig
{
MetaRectangle layout;
GList *monitor_configs;
gboolean is_primary;
gboolean is_presentation;
} MetaLogicalMonitorConfig;
typedef struct _MetaMonitorsConfigKey
{
GList *monitor_specs;
} MetaMonitorsConfigKey;
struct _MetaMonitorsConfig
{
GObject parent;
MetaMonitorsConfigKey *key;
GList *logical_monitor_configs;
};
#define META_TYPE_MONITORS_CONFIG (meta_monitors_config_get_type ())
G_DECLARE_FINAL_TYPE (MetaMonitorsConfig, meta_monitors_config,
META, MONITORS_CONFIG, GObject)
MetaMonitorConfigManager * meta_monitor_config_manager_new (MetaMonitorManager *monitor_manager);
MetaMonitorConfigStore * meta_monitor_config_manager_get_store (MetaMonitorConfigManager *config_manager);
gboolean meta_monitor_config_manager_assign (MetaMonitorManager *manager,
MetaMonitorsConfig *config,
GPtrArray **crtc_infos,
GPtrArray **output_infos,
GError **error);
MetaMonitorsConfig * meta_monitor_config_manager_get_stored (MetaMonitorConfigManager *config_manager);
MetaMonitorsConfig * meta_monitor_config_manager_create_linear (MetaMonitorConfigManager *config_manager);
MetaMonitorsConfig * meta_monitor_config_manager_create_fallback (MetaMonitorConfigManager *config_manager);
MetaMonitorsConfig * meta_monitor_config_manager_create_suggested (MetaMonitorConfigManager *config_manager);
void meta_monitor_config_manager_set_current (MetaMonitorConfigManager *config_manager,
MetaMonitorsConfig *config);
MetaMonitorsConfig * meta_monitor_config_manager_get_current (MetaMonitorConfigManager *config_manager);
MetaMonitorsConfig * meta_monitors_config_new (GList *logical_monitor_configs);
unsigned int meta_monitors_config_key_hash (gconstpointer config_key);
gboolean meta_monitors_config_key_equal (gconstpointer config_key_a,
gconstpointer config_key_b);
void meta_monitors_config_key_free (MetaMonitorsConfigKey *config_key);
void meta_logical_monitor_config_free (MetaLogicalMonitorConfig *logical_monitor_config);
void meta_monitor_config_free (MetaMonitorConfig *monitor_config);
#endif /* META_MONITOR_CONFIG_MANAGER_H */

View File

@@ -0,0 +1,986 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2017 Red Hat
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#include "config.h"
#include "backends/meta-monitor-config-store.h"
#include <gio/gio.h>
#include <string.h>
#include "backends/meta-monitor-config-manager.h"
#include "core/boxes-private.h"
/*
* Example configuration:
*
* <monitors version="2">
* <configuration>
* <logicalmonitor>
* <x>0</x>
* <y>0</y>
* <monitor>
* <monitorspec>
* <connector>LVDS1</connector>
* <vendor>Vendor A</vendor>
* <product>Product A</product>
* <serial>Serial A</serial>
* </monitorspec>
* <mode>
* <width>1920</width>
* <height>1080</height>
* <rate>60.049972534179688</rate>
* </mode>
* </monitor>
* <primary>yes</primary>
* <presentation>no</presentation>
* </logicalmonitor>
* <logicalmonitor>
* <x>1920</x>
* <y>1080</y>
* <monitor>
* <monitorspec>
* <connector>LVDS2</connector>
* <vendor>Vendor B</vendor>
* <product>Product B</product>
* <serial>Serial B</serial>
* </monitorspec>
* <mode>
* <width>1920</width>
* <height>1080</height>
* <rate>60.049972534179688</rate>
* </mode>
* <underscanning>yes</underscanning>
* </monitor>
* <presentation>yes</presentation>
* </logicalmonitor>
* </configuration>
* </monitors>
*
*/
struct _MetaMonitorConfigStore
{
GObject parent;
GHashTable *configs;
};
typedef enum
{
STATE_INITIAL,
STATE_MONITORS,
STATE_CONFIGURATION,
STATE_LOGICAL_MONITOR,
STATE_LOGICAL_MONITOR_X,
STATE_LOGICAL_MONITOR_Y,
STATE_LOGICAL_MONITOR_PRIMARY,
STATE_LOGICAL_MONITOR_PRESENTATION,
STATE_MONITOR,
STATE_MONITOR_SPEC,
STATE_MONITOR_SPEC_CONNECTOR,
STATE_MONITOR_SPEC_VENDOR,
STATE_MONITOR_SPEC_PRODUCT,
STATE_MONITOR_SPEC_SERIAL,
STATE_MONITOR_MODE,
STATE_MONITOR_MODE_WIDTH,
STATE_MONITOR_MODE_HEIGHT,
STATE_MONITOR_MODE_RATE,
STATE_MONITOR_UNDERSCANNING
} ParserState;
typedef struct
{
ParserState state;
MetaMonitorConfigStore *config_store;
GList *current_logical_monitor_configs;
MetaMonitorSpec *current_monitor_spec;
MetaMonitorModeSpec *current_monitor_mode_spec;
MetaMonitorConfig *current_monitor_config;
MetaLogicalMonitorConfig *current_logical_monitor_config;
} ConfigParser;
G_DEFINE_TYPE (MetaMonitorConfigStore, meta_monitor_config_store,
G_TYPE_OBJECT)
static void
handle_start_element (GMarkupParseContext *context,
const char *element_name,
const char **attribute_names,
const char **attribute_values,
gpointer user_data,
GError **error)
{
ConfigParser *parser = user_data;
switch (parser->state)
{
case STATE_INITIAL:
{
char *version;
if (!g_str_equal (element_name, "monitors"))
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
"Invalid document element '%s'", element_name);
return;
}
if (!g_markup_collect_attributes (element_name, attribute_names, attribute_values,
error,
G_MARKUP_COLLECT_STRING, "version", &version,
G_MARKUP_COLLECT_INVALID))
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
"Missing config file format version");
}
/* TODO: Handle converting version 1 configuration files. */
if (!g_str_equal (version, "2"))
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
"Invalid or unsupported version '%s'", version);
return;
}
parser->state = STATE_MONITORS;
return;
}
case STATE_MONITORS:
{
if (!g_str_equal (element_name, "configuration"))
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
"Invalid toplevel element '%s'", element_name);
return;
}
parser->state = STATE_CONFIGURATION;
return;
}
case STATE_CONFIGURATION:
{
if (!g_str_equal (element_name, "logicalmonitor"))
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
"Invalid configuration element '%s'", element_name);
return;
}
parser->current_logical_monitor_config =
g_new0 (MetaLogicalMonitorConfig, 1);
parser->state = STATE_LOGICAL_MONITOR;
return;
}
case STATE_LOGICAL_MONITOR:
{
if (g_str_equal (element_name, "x"))
{
parser->state = STATE_LOGICAL_MONITOR_X;
}
else if (g_str_equal (element_name, "y"))
{
parser->state = STATE_LOGICAL_MONITOR_Y;
}
else if (g_str_equal (element_name, "primary"))
{
parser->state = STATE_LOGICAL_MONITOR_PRIMARY;
}
else if (g_str_equal (element_name, "presentation"))
{
parser->state = STATE_LOGICAL_MONITOR_PRESENTATION;
}
else if (g_str_equal (element_name, "monitor"))
{
parser->current_monitor_config = g_new0 (MetaMonitorConfig, 1);;
parser->state = STATE_MONITOR;
}
else
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
"Invalid monitor logicalmonitor element '%s'", element_name);
return;
}
return;
}
case STATE_LOGICAL_MONITOR_X:
case STATE_LOGICAL_MONITOR_Y:
case STATE_LOGICAL_MONITOR_PRIMARY:
case STATE_LOGICAL_MONITOR_PRESENTATION:
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
"Invalid logical monitor element '%s'", element_name);
return;
}
case STATE_MONITOR:
{
if (g_str_equal (element_name, "monitorspec"))
{
parser->current_monitor_spec = g_new0 (MetaMonitorSpec, 1);
parser->state = STATE_MONITOR_SPEC;
}
else if (g_str_equal (element_name, "mode"))
{
parser->current_monitor_mode_spec = g_new0 (MetaMonitorModeSpec, 1);
parser->state = STATE_MONITOR_MODE;
}
else if (g_str_equal (element_name, "underscanning"))
{
parser->state = STATE_MONITOR_UNDERSCANNING;
}
else
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
"Invalid monitor element '%s'", element_name);
return;
}
return;
}
case STATE_MONITOR_SPEC:
{
if (g_str_equal (element_name, "connector"))
{
parser->state = STATE_MONITOR_SPEC_CONNECTOR;
}
else if (g_str_equal (element_name, "vendor"))
{
parser->state = STATE_MONITOR_SPEC_VENDOR;
}
else if (g_str_equal (element_name, "product"))
{
parser->state = STATE_MONITOR_SPEC_PRODUCT;
}
else if (g_str_equal (element_name, "serial"))
{
parser->state = STATE_MONITOR_SPEC_SERIAL;
}
else
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
"Invalid monitor spec element '%s'", element_name);
return;
}
return;
}
case STATE_MONITOR_SPEC_CONNECTOR:
case STATE_MONITOR_SPEC_VENDOR:
case STATE_MONITOR_SPEC_PRODUCT:
case STATE_MONITOR_SPEC_SERIAL:
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
"Invalid monitor spec element '%s'", element_name);
return;
}
case STATE_MONITOR_MODE:
{
if (g_str_equal (element_name, "width"))
{
parser->state = STATE_MONITOR_MODE_WIDTH;
}
else if (g_str_equal (element_name, "height"))
{
parser->state = STATE_MONITOR_MODE_HEIGHT;
}
else if (g_str_equal (element_name, "rate"))
{
parser->state = STATE_MONITOR_MODE_RATE;
}
else
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
"Invalid mode element '%s'", element_name);
return;
}
return;
}
case STATE_MONITOR_MODE_WIDTH:
case STATE_MONITOR_MODE_HEIGHT:
case STATE_MONITOR_MODE_RATE:
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
"Invalid mode sub element '%s'", element_name);
return;
}
case STATE_MONITOR_UNDERSCANNING:
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
"Invalid element '%s' under underscanning", element_name);
return;
}
}
}
static gboolean
verify_monitor_spec (MetaMonitorSpec *monitor_spec,
GError **error)
{
if (monitor_spec->connector &&
monitor_spec->vendor &&
monitor_spec->product &&
monitor_spec->serial)
{
return TRUE;
}
else
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Monitor spec incomplete");
return FALSE;
}
}
static gboolean
verify_monitor_mode (MetaMonitorModeSpec *monitor_mode_spec,
GError **error)
{
if (monitor_mode_spec->width > 0 &&
monitor_mode_spec->height > 0 &&
monitor_mode_spec->refresh_rate > 0.0f)
{
return TRUE;
}
else
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Monitor mode invalid");
return FALSE;
}
}
static gboolean
verify_monitor_config (MetaMonitorConfig *monitor_config,
GError **error)
{
if (monitor_config->monitor_spec && monitor_config->mode_spec)
{
return TRUE;
}
else
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Monitor config incomplete");
return FALSE;
}
}
static gboolean
verify_logical_monitor_config (MetaLogicalMonitorConfig *logical_monitor_config,
GError **error)
{
if (logical_monitor_config->layout.x < 0 ||
logical_monitor_config->layout.y < 0)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Invalid logical monitor position (%d, %d)",
logical_monitor_config->layout.x,
logical_monitor_config->layout.y);
return FALSE;
}
if (!logical_monitor_config->monitor_configs)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Logical monitor is empty");
return FALSE;
}
return TRUE;
}
static gboolean
derive_logical_monitor_layout (MetaLogicalMonitorConfig *logical_monitor_config,
GError **error)
{
MetaMonitorConfig *monitor_config;
int mode_width, mode_height;
GList *l;
monitor_config = logical_monitor_config->monitor_configs->data;
mode_width = monitor_config->mode_spec->width;
mode_height = monitor_config->mode_spec->height;
for (l = logical_monitor_config->monitor_configs->next; l; l = l->next)
{
monitor_config = l->data;
if (monitor_config->mode_spec->width != mode_width ||
monitor_config->mode_spec->height != mode_height)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Monitors in logical monitor incompatible");
return FALSE;
}
}
logical_monitor_config->layout.width = mode_width;
logical_monitor_config->layout.height = mode_height;
return TRUE;
}
static gboolean
verify_config (MetaMonitorsConfig *config,
GError **error)
{
gboolean has_primary;
GList *region;
GList *l;
if (!config->logical_monitor_configs)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Monitors config incomplete");
return FALSE;
}
region = NULL;
has_primary = FALSE;
for (l = config->logical_monitor_configs; l; l = l->next)
{
MetaLogicalMonitorConfig *logical_monitor_config = l->data;
if (meta_rectangle_overlaps_with_region (region,
&logical_monitor_config->layout))
{
g_list_free (region);
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Logical monitors overlap");
return FALSE;
}
if (has_primary && logical_monitor_config->is_primary)
{
g_list_free (region);
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Config contains multiple primary logical monitors");
return FALSE;
}
else if (logical_monitor_config->is_primary)
{
has_primary = TRUE;
}
region = g_list_prepend (region, &logical_monitor_config->layout);
}
g_list_free (region);
if (!has_primary)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Config is missing primary logical");
return FALSE;
}
return TRUE;
}
static void
handle_end_element (GMarkupParseContext *context,
const char *element_name,
gpointer user_data,
GError **error)
{
ConfigParser *parser = user_data;
switch (parser->state)
{
case STATE_LOGICAL_MONITOR_X:
case STATE_LOGICAL_MONITOR_Y:
case STATE_LOGICAL_MONITOR_PRIMARY:
case STATE_LOGICAL_MONITOR_PRESENTATION:
{
parser->state = STATE_LOGICAL_MONITOR;
return;
}
case STATE_MONITOR_SPEC_CONNECTOR:
case STATE_MONITOR_SPEC_VENDOR:
case STATE_MONITOR_SPEC_PRODUCT:
case STATE_MONITOR_SPEC_SERIAL:
{
parser->state = STATE_MONITOR_SPEC;
return;
}
case STATE_MONITOR_SPEC:
{
g_assert (g_str_equal (element_name, "monitorspec"));
if (!verify_monitor_spec (parser->current_monitor_spec, error))
return;
parser->current_monitor_config->monitor_spec =
parser->current_monitor_spec;
parser->current_monitor_spec = NULL;
parser->state = STATE_MONITOR;
return;
}
case STATE_MONITOR_MODE_WIDTH:
case STATE_MONITOR_MODE_HEIGHT:
case STATE_MONITOR_MODE_RATE:
{
parser->state = STATE_MONITOR_MODE;
return;
}
case STATE_MONITOR_MODE:
{
g_assert (g_str_equal (element_name, "mode"));
if (!verify_monitor_mode (parser->current_monitor_mode_spec, error))
return;
parser->current_monitor_config->mode_spec =
parser->current_monitor_mode_spec;
parser->current_monitor_mode_spec = NULL;
parser->state = STATE_MONITOR;
return;
}
case STATE_MONITOR_UNDERSCANNING:
{
g_assert (g_str_equal (element_name, "underscanning"));
parser->state = STATE_MONITOR;
return;
}
case STATE_MONITOR:
{
MetaLogicalMonitorConfig *logical_monitor_config;
g_assert (g_str_equal (element_name, "monitor"));
if (!verify_monitor_config (parser->current_monitor_config, error))
return;
logical_monitor_config = parser->current_logical_monitor_config;
logical_monitor_config->monitor_configs =
g_list_append (logical_monitor_config->monitor_configs,
parser->current_monitor_config);
parser->current_monitor_config = NULL;
parser->state = STATE_LOGICAL_MONITOR;
return;
}
case STATE_LOGICAL_MONITOR:
{
MetaLogicalMonitorConfig *logical_monitor_config =
parser->current_logical_monitor_config;
g_assert (g_str_equal (element_name, "logicalmonitor"));
if (!verify_logical_monitor_config (logical_monitor_config, error))
return;
if (!derive_logical_monitor_layout (logical_monitor_config, error))
return;
parser->current_logical_monitor_configs =
g_list_append (parser->current_logical_monitor_configs,
logical_monitor_config);
parser->current_logical_monitor_config = NULL;
parser->state = STATE_CONFIGURATION;
return;
}
case STATE_CONFIGURATION:
{
MetaMonitorsConfig *config;
g_assert (g_str_equal (element_name, "configuration"));
config =
meta_monitors_config_new (parser->current_logical_monitor_configs);
if (!verify_config (config, error))
{
g_object_unref (config);
return;
}
g_hash_table_replace (parser->config_store->configs,
config->key, config);
parser->current_logical_monitor_configs = NULL;
parser->state = STATE_MONITORS;
return;
}
case STATE_MONITORS:
{
g_assert (g_str_equal (element_name, "monitors"));
parser->state = STATE_INITIAL;
return;
}
case STATE_INITIAL:
{
g_assert_not_reached ();
}
}
}
static gboolean
read_int (const char *text,
gsize text_len,
gint *out_value,
GError **error)
{
char buf[64];
int64_t value;
char *end;
strncpy (buf, text, text_len);
buf[MIN (63, text_len)] = 0;
value = g_ascii_strtoll (buf, &end, 10);
if (*end || value < 0 || value > G_MAXINT16)
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
"Expected a number, got %s", buf);
return FALSE;
}
else
{
*out_value = value;
return TRUE;
}
}
static gboolean
read_float (const char *text,
gsize text_len,
float *out_value,
GError **error)
{
char buf[64];
float value;
char *end;
strncpy (buf, text, text_len);
buf[MIN (63, text_len)] = 0;
value = g_ascii_strtod (buf, &end);
if (*end)
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
"Expected a number, got %s", buf);
return FALSE;
}
else
{
*out_value = value;
return TRUE;
}
}
static gboolean
read_bool (const char *text,
gsize text_len,
gboolean *out_value,
GError **error)
{
if (strncmp (text, "no", text_len) == 0)
{
*out_value = FALSE;
return TRUE;
}
else if (strncmp (text, "yes", text_len) == 0)
{
*out_value = TRUE;
return TRUE;
}
else
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
"Invalid boolean value '%.*s'", (int) text_len, text);
return FALSE;
}
}
static gboolean
is_all_whitespace (const char *text,
gsize text_len)
{
gsize i;
for (i = 0; i < text_len; i++)
if (!g_ascii_isspace (text[i]))
return FALSE;
return TRUE;
}
static void
handle_text (GMarkupParseContext *context,
const gchar *text,
gsize text_len,
gpointer user_data,
GError **error)
{
ConfigParser *parser = user_data;
switch (parser->state)
{
case STATE_INITIAL:
case STATE_MONITORS:
case STATE_CONFIGURATION:
case STATE_LOGICAL_MONITOR:
case STATE_MONITOR:
case STATE_MONITOR_SPEC:
case STATE_MONITOR_MODE:
{
if (!is_all_whitespace (text, text_len))
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
"Unexpected content at this point");
return;
}
case STATE_MONITOR_SPEC_CONNECTOR:
{
parser->current_monitor_spec->connector = g_strndup (text, text_len);
return;
}
case STATE_MONITOR_SPEC_VENDOR:
{
parser->current_monitor_spec->vendor = g_strndup (text, text_len);
return;
}
case STATE_MONITOR_SPEC_PRODUCT:
{
parser->current_monitor_spec->product = g_strndup (text, text_len);
return;
}
case STATE_MONITOR_SPEC_SERIAL:
{
parser->current_monitor_spec->serial = g_strndup (text, text_len);
return;
}
case STATE_LOGICAL_MONITOR_X:
{
read_int (text, text_len,
&parser->current_logical_monitor_config->layout.x, error);
return;
}
case STATE_LOGICAL_MONITOR_Y:
{
read_int (text, text_len,
&parser->current_logical_monitor_config->layout.y, error);
return;
}
case STATE_LOGICAL_MONITOR_PRIMARY:
{
read_bool (text, text_len,
&parser->current_logical_monitor_config->is_primary,
error);
return;
}
case STATE_LOGICAL_MONITOR_PRESENTATION:
{
read_bool (text, text_len,
&parser->current_logical_monitor_config->is_presentation,
error);
return;
}
case STATE_MONITOR_MODE_WIDTH:
{
read_int (text, text_len,
&parser->current_monitor_mode_spec->width,
error);
return;
}
case STATE_MONITOR_MODE_HEIGHT:
{
read_int (text, text_len,
&parser->current_monitor_mode_spec->height,
error);
return;
}
case STATE_MONITOR_MODE_RATE:
{
read_float (text, text_len,
&parser->current_monitor_mode_spec->refresh_rate,
error);
return;
}
case STATE_MONITOR_UNDERSCANNING:
{
read_bool (text, text_len,
&parser->current_monitor_config->is_underscanning,
error);
return;
}
}
}
static const GMarkupParser config_parser = {
.start_element = handle_start_element,
.end_element = handle_end_element,
.text = handle_text
};
static gboolean
read_config_file (MetaMonitorConfigStore *config_store,
GFile *file,
GError **error)
{
char *buffer;
gsize size;
ConfigParser parser;
GMarkupParseContext *parse_context;
if (!g_file_load_contents (file, NULL, &buffer, &size, NULL, error))
return FALSE;
parser = (ConfigParser) {
.state = STATE_INITIAL,
.config_store = config_store
};
parse_context = g_markup_parse_context_new (&config_parser,
G_MARKUP_TREAT_CDATA_AS_TEXT |
G_MARKUP_PREFIX_ERROR_POSITION,
&parser, NULL);
if (!g_markup_parse_context_parse (parse_context, buffer, size, error))
{
g_list_free_full (parser.current_logical_monitor_configs,
(GDestroyNotify) meta_logical_monitor_config_free);
g_clear_pointer (&parser.current_monitor_spec,
meta_monitor_spec_free);
g_free (parser.current_monitor_mode_spec);
g_clear_pointer (&parser.current_monitor_config,
meta_monitor_config_free);
g_clear_pointer (&parser.current_logical_monitor_config,
meta_logical_monitor_config_free);
return FALSE;
}
g_markup_parse_context_free (parse_context);
g_free (buffer);
return TRUE;
}
MetaMonitorsConfig *
meta_monitor_config_store_lookup (MetaMonitorConfigStore *config_store,
MetaMonitorsConfigKey *key)
{
return META_MONITORS_CONFIG (g_hash_table_lookup (config_store->configs,
key));
}
void
meta_monitor_config_store_add (MetaMonitorConfigStore *config_store,
MetaMonitorsConfig *config)
{
g_hash_table_insert (config_store->configs,
config->key, g_object_ref (config));
}
gboolean
meta_monitor_config_store_set_custom (MetaMonitorConfigStore *config_store,
const char *path,
GError **error)
{
g_autoptr (GFile) custom_file = NULL;
g_hash_table_remove_all (config_store->configs);
custom_file = g_file_new_for_path (path);
return read_config_file (config_store, custom_file, error);
}
int
meta_monitor_config_store_get_config_count (MetaMonitorConfigStore *config_store)
{
return (int) g_hash_table_size (config_store->configs);
}
static void
meta_monitor_config_store_dispose (GObject *object)
{
MetaMonitorConfigStore *config_store = META_MONITOR_CONFIG_STORE (object);
g_clear_pointer (&config_store->configs, g_hash_table_destroy);
G_OBJECT_CLASS (meta_monitor_config_store_parent_class)->dispose (object);
}
static void
meta_monitor_config_store_init (MetaMonitorConfigStore *config_store)
{
config_store->configs = g_hash_table_new_full (meta_monitors_config_key_hash,
meta_monitors_config_key_equal,
NULL,
g_object_unref);
}
static void
meta_monitor_config_store_class_init (MetaMonitorConfigStoreClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->dispose = meta_monitor_config_store_dispose;
}

View File

@@ -0,0 +1,45 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2017 Red Hat
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef META_MONITOR_CONFIG_STORE_H
#define META_MONITOR_CONFIG_STORE_H
#include <glib-object.h>
#include "backends/meta-monitor-config-manager.h"
#define META_TYPE_MONITOR_CONFIG_STORE (meta_monitor_config_store_get_type ())
G_DECLARE_FINAL_TYPE (MetaMonitorConfigStore, meta_monitor_config_store,
META, MONITOR_CONFIG_STORE, GObject)
MetaMonitorsConfig * meta_monitor_config_store_lookup (MetaMonitorConfigStore *config_store,
MetaMonitorsConfigKey *key);
void meta_monitor_config_store_add (MetaMonitorConfigStore *config_store,
MetaMonitorsConfig *config);
gboolean meta_monitor_config_store_set_custom (MetaMonitorConfigStore *config_store,
const char *path,
GError **error);
int meta_monitor_config_store_get_config_count (MetaMonitorConfigStore *config_store);
#endif /* META_MONITOR_CONFIG_STORE_H */

View File

@@ -39,7 +39,6 @@
#include <string.h>
#include <clutter/clutter.h>
#include <libupower-glib/upower.h>
#include <meta/main.h>
#include <meta/errors.h>
@@ -87,14 +86,9 @@ struct _MetaMonitorConfig {
GFile *system_file;
GCancellable *save_cancellable;
UpClient *up_client;
gboolean lid_is_closed;
};
struct _MetaMonitorConfigClass {
GObjectClass parent;
};
G_DEFINE_TYPE (MetaMonitorConfig, meta_monitor_config, G_TYPE_OBJECT);
static gboolean meta_monitor_config_assign_crtcs (MetaConfiguration *config,
@@ -102,8 +96,7 @@ static gboolean meta_monitor_config_assign_crtcs (MetaConfiguration *config,
GPtrArray *crtcs,
GPtrArray *outputs);
static void power_client_changed_cb (UpClient *client,
GParamSpec *pspec,
static void power_client_changed_cb (MetaMonitorManager *manager,
gpointer user_data);
static void
@@ -259,12 +252,6 @@ meta_monitor_config_init (MetaMonitorConfig *self)
self->system_file = g_file_new_for_path (path);
g_free (path);
}
self->up_client = up_client_new ();
self->lid_is_closed = up_client_get_lid_is_closed (self->up_client);
g_signal_connect_object (self->up_client, "notify::lid-is-closed",
G_CALLBACK (power_client_changed_cb), self, 0);
}
static void
@@ -800,11 +787,16 @@ meta_monitor_config_load (MetaMonitorConfig *self)
}
MetaMonitorConfig *
meta_monitor_config_new (void)
meta_monitor_config_new (MetaMonitorManager *manager)
{
MetaMonitorConfig *self;
self = g_object_new (META_TYPE_MONITOR_CONFIG, NULL);
self->lid_is_closed = meta_monitor_manager_is_lid_closed (manager);
g_signal_connect_object (manager, "lid-is-closed-changed",
G_CALLBACK (power_client_changed_cb), self, 0);
meta_monitor_config_load (self);
return self;
@@ -840,22 +832,6 @@ make_config_key (MetaConfiguration *key,
key->n_outputs = o;
}
gboolean
meta_monitor_manager_has_hotplug_mode_update (MetaMonitorManager *manager)
{
MetaOutput *outputs;
unsigned n_outputs;
unsigned int i;
outputs = meta_monitor_manager_get_outputs (manager, &n_outputs);
for (i = 0; i < n_outputs; i++)
if (outputs[i].hotplug_mode_update)
return TRUE;
return FALSE;
}
static MetaConfiguration *
meta_monitor_config_get_stored (MetaMonitorConfig *self,
MetaOutput *outputs,
@@ -898,7 +874,7 @@ apply_configuration (MetaMonitorConfig *self,
return FALSE;
meta_monitor_manager_apply_configuration (manager,
(MetaCRTCInfo**)crtcs->pdata, crtcs->len,
(MetaCrtcInfo**)crtcs->pdata, crtcs->len,
(MetaOutputInfo**)outputs->pdata, outputs->len);
set_current (self, config);
@@ -1011,8 +987,18 @@ make_laptop_lid_config (MetaConfiguration *reference)
break;
}
}
if (!has_primary)
new->outputs[0].is_primary = TRUE;
{
for (i = 0; i < new->n_outputs; i++)
{
if (new->outputs[i].enabled)
{
new->outputs[i].is_primary = TRUE;
break;
}
}
}
return new;
}
@@ -1103,6 +1089,11 @@ find_primary_output (MetaOutput *outputs,
best_width = 0; best_height = 0;
for (i = 0; i < n_outputs; i++)
{
if (outputs[i].tile_info.group_id &&
(outputs[i].tile_info.loc_h_tile != 0 ||
outputs[i].tile_info.loc_v_tile != 0))
continue;
if (outputs[i].preferred_mode->width * outputs[i].preferred_mode->height >
best_width * best_height)
{
@@ -1128,6 +1119,7 @@ init_config_from_preferred_mode (MetaOutputConfig *config,
config->transform = META_MONITOR_TRANSFORM_NORMAL;
config->is_primary = FALSE;
config->is_presentation = FALSE;
config->is_underscanning = output->is_underscanning;
}
/* This function handles configuring the outputs when the driver provides a
@@ -1235,13 +1227,13 @@ config_one_tiled_group (MetaOutput *outputs,
outputs[j].tile_info.loc_v_tile != vt)
continue;
if (ht == 0 && vt == 0 && is_primary)
config->outputs[j].is_primary = TRUE;
init_config_from_preferred_mode (&config->outputs[j], &outputs[j]);
config->outputs[j].rect.x = cur_x;
config->outputs[j].rect.y = cur_y;
if (ht == 0 && vt == 0 && is_primary)
config->outputs[j].is_primary = TRUE;
*output_configured_bitmap |= (1 << j);
cur_y += outputs[j].tile_info.tile_h;
if (vt == 0)
@@ -1588,15 +1580,13 @@ turn_off_laptop_display (MetaMonitorConfig *self,
}
static void
power_client_changed_cb (UpClient *client,
GParamSpec *pspec,
gpointer user_data)
power_client_changed_cb (MetaMonitorManager *manager,
gpointer user_data)
{
MetaMonitorManager *manager = meta_monitor_manager_get ();
MetaMonitorConfig *self = user_data;
gboolean is_closed;
is_closed = up_client_get_lid_is_closed (self->up_client);
is_closed = meta_monitor_manager_is_lid_closed (manager);
if (is_closed != self->lid_is_closed)
{
@@ -1772,7 +1762,7 @@ output_can_clone (MetaOutput *output,
}
static gboolean
can_clone (MetaCRTCInfo *info,
can_clone (MetaCrtcInfo *info,
MetaOutput *output)
{
unsigned int i;
@@ -1789,7 +1779,7 @@ can_clone (MetaCRTCInfo *info,
}
static gboolean
crtc_can_drive_output (MetaCRTC *crtc,
crtc_can_drive_output (MetaCrtc *crtc,
MetaOutput *output)
{
unsigned int i;
@@ -1803,14 +1793,14 @@ crtc_can_drive_output (MetaCRTC *crtc,
static gboolean
crtc_assignment_assign (CrtcAssignment *assign,
MetaCRTC *crtc,
MetaMonitorMode *mode,
MetaCrtc *crtc,
MetaCrtcMode *mode,
int x,
int y,
MetaMonitorTransform transform,
MetaOutput *output)
{
MetaCRTCInfo *info = g_hash_table_lookup (assign->info, crtc);
MetaCrtcInfo *info = g_hash_table_lookup (assign->info, crtc);
if (!crtc_can_drive_output (crtc, output))
return FALSE;
@@ -1834,7 +1824,7 @@ crtc_assignment_assign (CrtcAssignment *assign,
}
else
{
info = g_slice_new0 (MetaCRTCInfo);
info = g_slice_new0 (MetaCrtcInfo);
info->crtc = crtc;
info->mode = mode;
@@ -1852,10 +1842,10 @@ crtc_assignment_assign (CrtcAssignment *assign,
static void
crtc_assignment_unassign (CrtcAssignment *assign,
MetaCRTC *crtc,
MetaCrtc *crtc,
MetaOutput *output)
{
MetaCRTCInfo *info = g_hash_table_lookup (assign->info, crtc);
MetaCrtcInfo *info = g_hash_table_lookup (assign->info, crtc);
if (info)
{
@@ -1901,7 +1891,7 @@ static gboolean
real_assign_crtcs (CrtcAssignment *assignment,
unsigned int output_num)
{
MetaCRTC *crtcs;
MetaCrtc *crtcs;
MetaOutput *outputs;
unsigned int n_crtcs, n_outputs;
MetaOutputKey *output_key;
@@ -1925,7 +1915,7 @@ real_assign_crtcs (CrtcAssignment *assignment,
for (i = 0; i < n_crtcs; i++)
{
MetaCRTC *crtc = &crtcs[i];
MetaCrtc *crtc = &crtcs[i];
unsigned int pass;
/* Make two passes, one where frequencies must match, then
@@ -1938,7 +1928,7 @@ real_assign_crtcs (CrtcAssignment *assignment,
for (j = 0; j < output->n_modes; j++)
{
MetaMonitorMode *mode = output->modes[j];
MetaCrtcMode *mode = output->modes[j];
int width, height;
if (meta_monitor_transform_is_rotated (output_config->transform))
@@ -1989,8 +1979,8 @@ meta_monitor_config_assign_crtcs (MetaConfiguration *config,
{
CrtcAssignment assignment;
GHashTableIter iter;
MetaCRTC *crtc;
MetaCRTCInfo *info;
MetaCrtc *crtc;
MetaCrtcInfo *info;
unsigned int i;
MetaOutput *all_outputs;
unsigned int n_outputs;
@@ -2041,10 +2031,10 @@ meta_monitor_config_assign_crtcs (MetaConfiguration *config,
}
void
meta_crtc_info_free (MetaCRTCInfo *info)
meta_crtc_info_free (MetaCrtcInfo *info)
{
g_ptr_array_free (info->outputs, TRUE);
g_slice_free (MetaCRTCInfo, info);
g_slice_free (MetaCrtcInfo, info);
}
void

View File

@@ -25,16 +25,11 @@
#include "meta-monitor-manager-private.h"
#define META_TYPE_MONITOR_CONFIG (meta_monitor_config_get_type ())
#define META_MONITOR_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_MONITOR_CONFIG, MetaMonitorConfig))
#define META_MONITOR_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_MONITOR_CONFIG, MetaMonitorConfigClass))
#define META_IS_MONITOR_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_MONITOR_CONFIG))
#define META_IS_MONITOR_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_MONITOR_CONFIG))
#define META_MONITOR_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_MONITOR_CONFIG, MetaMonitorConfigClass))
#define META_TYPE_MONITOR_CONFIG (meta_monitor_config_get_type ())
G_DECLARE_FINAL_TYPE (MetaMonitorConfig, meta_monitor_config,
META, MONITOR_CONFIG, GObject)
GType meta_monitor_config_get_type (void) G_GNUC_CONST;
MetaMonitorConfig *meta_monitor_config_new (void);
MetaMonitorConfig *meta_monitor_config_new (MetaMonitorManager *manager);
gboolean meta_monitor_config_apply_stored (MetaMonitorConfig *config,
MetaMonitorManager *manager);

View File

@@ -30,6 +30,7 @@
#include <stdlib.h>
#include <meta/util.h>
#include "backends/meta-monitor-config-manager.h"
#define ALL_TRANSFORMS ((1 << (META_MONITOR_TRANSFORM_FLIPPED_270 + 1)) - 1)
@@ -113,7 +114,7 @@ meta_monitor_manager_dummy_read_current (MetaMonitorManager *manager)
manager->screen_width = 1024 * num_monitors;
manager->screen_height = 768;
manager->modes = g_new0 (MetaMonitorMode, 1);
manager->modes = g_new0 (MetaCrtcMode, 1);
manager->n_modes = 1;
manager->modes[0].mode_id = 0;
@@ -121,7 +122,7 @@ meta_monitor_manager_dummy_read_current (MetaMonitorManager *manager)
manager->modes[0].height = 768;
manager->modes[0].refresh_rate = 60.0;
manager->crtcs = g_new0 (MetaCRTC, num_monitors);
manager->crtcs = g_new0 (MetaCrtc, num_monitors);
manager->n_crtcs = num_monitors;
manager->outputs = g_new0 (MetaOutput, num_monitors);
manager->n_outputs = num_monitors;
@@ -154,10 +155,10 @@ meta_monitor_manager_dummy_read_current (MetaMonitorManager *manager)
manager->outputs[i].subpixel_order = COGL_SUBPIXEL_ORDER_UNKNOWN;
manager->outputs[i].preferred_mode = &manager->modes[0];
manager->outputs[i].n_modes = 1;
manager->outputs[i].modes = g_new0 (MetaMonitorMode *, 1);
manager->outputs[i].modes = g_new0 (MetaCrtcMode *, 1);
manager->outputs[i].modes[0] = &manager->modes[0];
manager->outputs[i].n_possible_crtcs = 1;
manager->outputs[i].possible_crtcs = g_new0 (MetaCRTC *, 1);
manager->outputs[i].possible_crtcs = g_new0 (MetaCrtc *, 1);
manager->outputs[i].possible_crtcs[0] = &manager->crtcs[i];
manager->outputs[i].n_possible_clones = 0;
manager->outputs[i].possible_clones = g_new0 (MetaOutput *, 0);
@@ -170,19 +171,32 @@ meta_monitor_manager_dummy_read_current (MetaMonitorManager *manager)
}
static void
meta_monitor_manager_dummy_apply_config (MetaMonitorManager *manager,
MetaCRTCInfo **crtcs,
unsigned int n_crtcs,
MetaOutputInfo **outputs,
unsigned int n_outputs)
meta_monitor_manager_dummy_ensure_initial_config (MetaMonitorManager *manager)
{
unsigned i;
int screen_width = 0, screen_height = 0;
MetaMonitorsConfig *config;
config = meta_monitor_manager_ensure_configured (manager);
if (manager->config_manager)
meta_monitor_manager_update_logical_state (manager, config);
else
meta_monitor_manager_update_logical_state_derived (manager);
}
static void
apply_crtc_assignments (MetaMonitorManager *manager,
MetaCrtcInfo **crtcs,
unsigned int n_crtcs,
MetaOutputInfo **outputs,
unsigned int n_outputs)
{
unsigned i;
int screen_width = 0, screen_height = 0;
for (i = 0; i < n_crtcs; i++)
{
MetaCRTCInfo *crtc_info = crtcs[i];
MetaCRTC *crtc = crtc_info->crtc;
MetaCrtcInfo *crtc_info = crtcs[i];
MetaCrtc *crtc = crtc_info->crtc;
crtc->is_dirty = TRUE;
if (crtc_info->mode == NULL)
@@ -195,7 +209,7 @@ meta_monitor_manager_dummy_apply_config (MetaMonitorManager *manager,
}
else
{
MetaMonitorMode *mode;
MetaCrtcMode *mode;
MetaOutput *output;
unsigned int j;
int width, height;
@@ -245,7 +259,7 @@ meta_monitor_manager_dummy_apply_config (MetaMonitorManager *manager,
/* Disable CRTCs not mentioned in the list */
for (i = 0; i < manager->n_crtcs; i++)
{
MetaCRTC *crtc = &manager->crtcs[i];
MetaCrtc *crtc = &manager->crtcs[i];
crtc->logical_monitor = NULL;
@@ -279,6 +293,43 @@ meta_monitor_manager_dummy_apply_config (MetaMonitorManager *manager,
manager->screen_width = screen_width;
manager->screen_height = screen_height;
}
static gboolean
meta_monitor_manager_dummy_apply_monitors_config (MetaMonitorManager *manager,
MetaMonitorsConfig *config,
GError **error)
{
GPtrArray *crtc_infos;
GPtrArray *output_infos;
if (!meta_monitor_config_manager_assign (manager, config,
&crtc_infos, &output_infos,
error))
return FALSE;
apply_crtc_assignments (manager,
(MetaCrtcInfo **) crtc_infos->pdata,
crtc_infos->len,
(MetaOutputInfo **) output_infos->pdata,
output_infos->len);
g_ptr_array_free (crtc_infos, TRUE);
g_ptr_array_free (output_infos, TRUE);
meta_monitor_manager_rebuild (manager, config);
return TRUE;
}
static void
meta_monitor_manager_dummy_apply_config (MetaMonitorManager *manager,
MetaCrtcInfo **crtcs,
unsigned int n_crtcs,
MetaOutputInfo **outputs,
unsigned int n_outputs)
{
apply_crtc_assignments (manager, crtcs, n_crtcs, outputs, n_outputs);
meta_monitor_manager_rebuild_derived (manager);
}
@@ -289,6 +340,8 @@ meta_monitor_manager_dummy_class_init (MetaMonitorManagerDummyClass *klass)
MetaMonitorManagerClass *manager_class = META_MONITOR_MANAGER_CLASS (klass);
manager_class->read_current = meta_monitor_manager_dummy_read_current;
manager_class->ensure_initial_config = meta_monitor_manager_dummy_ensure_initial_config;
manager_class->apply_monitors_config = meta_monitor_manager_dummy_apply_monitors_config;
manager_class->apply_configuration = meta_monitor_manager_dummy_apply_config;
}

View File

@@ -32,11 +32,12 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef META_MONITOR_PRIVATE_H
#define META_MONITOR_PRIVATE_H
#ifndef META_MONITOR_MANAGER_PRIVATE_H
#define META_MONITOR_MANAGER_PRIVATE_H
#include <cogl/cogl.h>
#include <libgnome-desktop/gnome-pnp-ids.h>
#include <libupower-glib/upower.h>
#include "display-private.h"
#include <meta/screen.h>
@@ -47,18 +48,26 @@
#include "meta-dbus-display-config.h"
#include "meta-cursor.h"
typedef struct _MetaMonitorConfigClass MetaMonitorConfigClass;
typedef struct _MetaMonitorConfig MetaMonitorConfig;
typedef struct _MetaMonitorConfig MetaMonitorConfig;
typedef struct _MetaMonitorConfigManager MetaMonitorConfigManager;
typedef struct _MetaMonitorConfigStore MetaMonitorConfigStore;
typedef struct _MetaMonitorsConfig MetaMonitorsConfig;
typedef struct _MetaCRTC MetaCRTC;
typedef struct _MetaMonitor MetaMonitor;
typedef struct _MetaMonitorNormal MetaMonitorNormal;
typedef struct _MetaMonitorTiled MetaMonitorTiled;
typedef struct _MetaMonitorSpec MetaMonitorSpec;
typedef struct _MetaLogicalMonitor MetaLogicalMonitor;
typedef struct _MetaCrtc MetaCrtc;
typedef struct _MetaOutput MetaOutput;
typedef struct _MetaMonitorMode MetaMonitorMode;
typedef struct _MetaMonitorInfo MetaMonitorInfo;
typedef struct _MetaCRTCInfo MetaCRTCInfo;
typedef struct _MetaCrtcMode MetaCrtcMode;
typedef struct _MetaCrtcInfo MetaCrtcInfo;
typedef struct _MetaOutputInfo MetaOutputInfo;
typedef struct _MetaTileInfo MetaTileInfo;
typedef enum {
typedef enum
{
META_MONITOR_TRANSFORM_NORMAL,
META_MONITOR_TRANSFORM_90,
META_MONITOR_TRANSFORM_180,
@@ -70,7 +79,8 @@ typedef enum {
} MetaMonitorTransform;
/* This matches the values in drm_mode.h */
typedef enum {
typedef enum
{
META_CONNECTOR_TYPE_Unknown = 0,
META_CONNECTOR_TYPE_VGA = 1,
META_CONNECTOR_TYPE_DVII = 2,
@@ -90,7 +100,8 @@ typedef enum {
META_CONNECTOR_TYPE_DSI = 16,
} MetaConnectorType;
struct _MetaTileInfo {
struct _MetaTileInfo
{
guint32 group_id;
guint32 flags;
guint32 max_h_tiles;
@@ -104,7 +115,7 @@ struct _MetaTileInfo {
struct _MetaOutput
{
/* The CRTC driving this output, NULL if the output is not enabled */
MetaCRTC *crtc;
MetaCrtc *crtc;
/* The low-level ID of this output, used to apply back configuration */
glong winsys_id;
char *name;
@@ -118,11 +129,11 @@ struct _MetaOutput
MetaConnectorType connector_type;
MetaMonitorMode *preferred_mode;
MetaMonitorMode **modes;
MetaCrtcMode *preferred_mode;
MetaCrtcMode **modes;
unsigned int n_modes;
MetaCRTC **possible_crtcs;
MetaCrtc **possible_crtcs;
unsigned int n_possible_crtcs;
MetaOutput **possible_clones;
@@ -136,7 +147,7 @@ struct _MetaOutput
gboolean is_dirty;
/* The low-level bits used to build the high-level info
in MetaMonitorInfo
in MetaLogicalMonitor
XXX: flags maybe?
There is a lot of code that uses MonitorInfo->is_primary,
@@ -158,18 +169,18 @@ struct _MetaOutput
MetaTileInfo tile_info;
};
struct _MetaCRTC
struct _MetaCrtc
{
glong crtc_id;
MetaRectangle rect;
MetaMonitorMode *current_mode;
MetaCrtcMode *current_mode;
MetaMonitorTransform transform;
unsigned int all_transforms;
/* Only used to build the logical configuration
from the HW one
*/
MetaMonitorInfo *logical_monitor;
MetaLogicalMonitor *logical_monitor;
/* Used when changing configuration */
gboolean is_dirty;
@@ -181,7 +192,7 @@ struct _MetaCRTC
GDestroyNotify driver_notify;
};
struct _MetaMonitorMode
struct _MetaCrtcMode
{
/* The low-level ID of this mode, used to apply back configuration */
glong mode_id;
@@ -196,59 +207,18 @@ struct _MetaMonitorMode
GDestroyNotify driver_notify;
};
#define META_MAX_OUTPUTS_PER_MONITOR 4
/**
* MetaMonitorInfo:
*
* A structure with high-level information about monitors.
* This corresponds to a subset of the compositor coordinate space.
* Clones are only reported once, irrespective of the way
* they're implemented (two CRTCs configured for the same
* coordinates or one CRTCs driving two outputs). Inactive CRTCs
* are ignored, and so are disabled outputs.
*/
struct _MetaMonitorInfo
{
int number;
int xinerama_index;
MetaRectangle rect;
/* for tiled monitors these are calculated, from untiled just copied */
float refresh_rate;
int width_mm;
int height_mm;
gboolean is_primary;
gboolean is_presentation; /* XXX: not yet used */
gboolean in_fullscreen;
int scale;
/* The primary or first output for this monitor, 0 if we can't figure out.
It can be matched to a winsys_id of a MetaOutput.
This is used as an opaque token on reconfiguration when switching from
clone to extened, to decide on what output the windows should go next
(it's an attempt to keep windows on the same monitor, and preferably on
the primary one).
*/
glong winsys_id;
guint32 tile_group_id;
int monitor_winsys_xid;
int n_outputs;
MetaOutput *outputs[META_MAX_OUTPUTS_PER_MONITOR];
};
/*
* MetaCRTCInfo:
* MetaCrtcInfo:
* This represents the writable part of a CRTC, as deserialized from DBus
* or built by MetaMonitorConfig
*
* Note: differently from the other structures in this file, MetaCRTCInfo
* Note: differently from the other structures in this file, MetaCrtcInfo
* is handled by pointer. This is to accomodate the usage in MetaMonitorConfig
*/
struct _MetaCRTCInfo {
MetaCRTC *crtc;
MetaMonitorMode *mode;
struct _MetaCrtcInfo
{
MetaCrtc *crtc;
MetaCrtcMode *mode;
int x;
int y;
MetaMonitorTransform transform;
@@ -257,9 +227,10 @@ struct _MetaCRTCInfo {
/*
* MetaOutputInfo:
* this is the same as MetaCRTCInfo, but for outputs
* this is the same as MetaCrtcInfo, but for outputs
*/
struct _MetaOutputInfo {
struct _MetaOutputInfo
{
MetaOutput *output;
gboolean is_primary;
gboolean is_presentation;
@@ -273,6 +244,8 @@ struct _MetaOutputInfo {
#define META_IS_MONITOR_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_MONITOR_MANAGER))
#define META_MONITOR_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_MONITOR_MANAGER, MetaMonitorManagerClass))
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MetaMonitorManager, g_object_unref)
struct _MetaMonitorManager
{
MetaDBusDisplayConfigSkeleton parent_instance;
@@ -294,27 +267,31 @@ struct _MetaMonitorManager
/* Outputs refer to physical screens,
CRTCs refer to stuff that can drive outputs
(like encoders, but less tied to the HW),
while monitor_infos refer to logical ones.
while logical_monitors refer to logical ones.
*/
MetaOutput *outputs;
unsigned int n_outputs;
MetaMonitorMode *modes;
MetaCrtcMode *modes;
unsigned int n_modes;
MetaCRTC *crtcs;
MetaCrtc *crtcs;
unsigned int n_crtcs;
MetaMonitorInfo *monitor_infos;
unsigned int n_monitor_infos;
int primary_monitor_index;
GList *monitors;
GList *logical_monitors;
MetaLogicalMonitor *primary_logical_monitor;
int dbus_name_id;
int persistent_timeout_id;
MetaMonitorConfig *config;
MetaMonitorConfig *legacy_config;
MetaMonitorConfigManager *config_manager;
GnomePnpIds *pnp_ids;
UpClient *up_client;
};
struct _MetaMonitorManagerClass
@@ -328,8 +305,16 @@ struct _MetaMonitorManagerClass
GBytes* (*read_edid) (MetaMonitorManager *,
MetaOutput *);
gboolean (*is_lid_closed) (MetaMonitorManager *);
void (*ensure_initial_config) (MetaMonitorManager *);
gboolean (*apply_monitors_config) (MetaMonitorManager *,
MetaMonitorsConfig *,
GError **);
void (*apply_configuration) (MetaMonitorManager *,
MetaCRTCInfo **,
MetaCrtcInfo **,
unsigned int ,
MetaOutputInfo **,
unsigned int);
@@ -342,44 +327,70 @@ struct _MetaMonitorManagerClass
int);
void (*get_crtc_gamma) (MetaMonitorManager *,
MetaCRTC *,
MetaCrtc *,
gsize *,
unsigned short **,
unsigned short **,
unsigned short **);
void (*set_crtc_gamma) (MetaMonitorManager *,
MetaCRTC *,
MetaCrtc *,
gsize ,
unsigned short *,
unsigned short *,
unsigned short *);
void (*add_monitor) (MetaMonitorManager *,
MetaMonitorInfo *);
void (*tiled_monitor_added) (MetaMonitorManager *,
MetaMonitor *);
void (*delete_monitor) (MetaMonitorManager *,
int monitor_winsys_xid);
void (*tiled_monitor_removed) (MetaMonitorManager *,
MetaMonitor *);
};
void meta_monitor_manager_rebuild (MetaMonitorManager *manager,
MetaMonitorsConfig *config);
void meta_monitor_manager_rebuild_derived (MetaMonitorManager *manager);
MetaMonitorInfo *meta_monitor_manager_get_monitor_infos (MetaMonitorManager *manager,
unsigned int *n_infos);
int meta_monitor_manager_get_num_logical_monitors (MetaMonitorManager *manager);
GList * meta_monitor_manager_get_logical_monitors (MetaMonitorManager *manager);
MetaLogicalMonitor *meta_monitor_manager_get_logical_monitor_from_number (MetaMonitorManager *manager,
int number);
MetaLogicalMonitor *meta_monitor_manager_get_primary_logical_monitor (MetaMonitorManager *manager);
MetaLogicalMonitor *meta_monitor_manager_get_logical_monitor_at (MetaMonitorManager *manager,
float x,
float y);
MetaLogicalMonitor *meta_monitor_manager_get_logical_monitor_from_rect (MetaMonitorManager *manager,
MetaRectangle *rect);
MetaLogicalMonitor *meta_monitor_manager_get_logical_monitor_neighbor (MetaMonitorManager *manager,
MetaLogicalMonitor *logical_monitor,
MetaScreenDirection direction);
MetaMonitor * meta_monitor_manager_get_primary_monitor (MetaMonitorManager *manager);
MetaMonitor * meta_monitor_manager_get_laptop_panel (MetaMonitorManager *manager);
MetaMonitor * meta_monitor_manager_get_monitor_from_spec (MetaMonitorManager *manager,
MetaMonitorSpec *monitor_spec);
GList * meta_monitor_manager_get_monitors (MetaMonitorManager *manager);
MetaOutput *meta_monitor_manager_get_outputs (MetaMonitorManager *manager,
unsigned int *n_outputs);
void meta_monitor_manager_get_resources (MetaMonitorManager *manager,
MetaMonitorMode **modes,
MetaCrtcMode **modes,
unsigned int *n_modes,
MetaCRTC **crtcs,
MetaCrtc **crtcs,
unsigned int *n_crtcs,
MetaOutput **outputs,
unsigned int *n_outputs);
int meta_monitor_manager_get_primary_index (MetaMonitorManager *manager);
void meta_monitor_manager_get_screen_size (MetaMonitorManager *manager,
int *width,
int *height);
@@ -389,7 +400,7 @@ void meta_monitor_manager_get_screen_limits (MetaMonitorManager *
int *height);
void meta_monitor_manager_apply_configuration (MetaMonitorManager *manager,
MetaCRTCInfo **crtcs,
MetaCrtcInfo **crtcs,
unsigned int n_crtcs,
MetaOutputInfo **outputs,
unsigned int n_outputs);
@@ -401,24 +412,37 @@ void meta_output_parse_edid (MetaOutput *output,
GBytes *edid);
gboolean meta_output_is_laptop (MetaOutput *output);
void meta_crtc_info_free (MetaCRTCInfo *info);
void meta_crtc_info_free (MetaCrtcInfo *info);
void meta_output_info_free (MetaOutputInfo *info);
gboolean meta_monitor_manager_has_hotplug_mode_update (MetaMonitorManager *manager);
void meta_monitor_manager_read_current_config (MetaMonitorManager *manager);
void meta_monitor_manager_read_current_state (MetaMonitorManager *manager);
void meta_monitor_manager_on_hotplug (MetaMonitorManager *manager);
gboolean meta_monitor_manager_get_monitor_matrix (MetaMonitorManager *manager,
MetaOutput *output,
gfloat matrix[6]);
gint meta_monitor_manager_get_monitor_at_point (MetaMonitorManager *manager,
gfloat x,
gfloat y);
void meta_monitor_manager_tiled_monitor_added (MetaMonitorManager *manager,
MetaMonitor *monitor);
void meta_monitor_manager_tiled_monitor_removed (MetaMonitorManager *manager,
MetaMonitor *monitor);
MetaMonitorsConfig * meta_monitor_manager_ensure_configured (MetaMonitorManager *manager);
void meta_monitor_manager_update_logical_state (MetaMonitorManager *manager,
MetaMonitorsConfig *config);
void meta_monitor_manager_update_logical_state_derived (MetaMonitorManager *manager);
gboolean meta_monitor_manager_is_lid_closed (MetaMonitorManager *manager);
void meta_monitor_manager_lid_is_closed_changed (MetaMonitorManager *manager);
gboolean meta_monitor_manager_is_headless (MetaMonitorManager *manager);
void meta_monitor_manager_clear_output (MetaOutput *output);
void meta_monitor_manager_clear_mode (MetaMonitorMode *mode);
void meta_monitor_manager_clear_crtc (MetaCRTC *crtc);
void meta_monitor_manager_clear_mode (MetaCrtcMode *mode);
void meta_monitor_manager_clear_crtc (MetaCrtc *crtc);
/* Returns true if transform causes width and height to be inverted
This is true for the odd transforms in the enum */
@@ -428,4 +452,4 @@ meta_monitor_transform_is_rotated (MetaMonitorTransform transform)
return (transform % 2);
}
#endif
#endif /* META_MONITOR_MANAGER_PRIVATE_H */

File diff suppressed because it is too large Load Diff

789
src/backends/meta-monitor.c Normal file
View File

@@ -0,0 +1,789 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2016 Red Hat
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#include "config.h"
#include "backends/meta-monitor.h"
#include "backends/meta-backend-private.h"
#include "backends/meta-monitor-manager-private.h"
typedef struct _MetaMonitorMode
{
MetaMonitorModeSpec spec;
MetaMonitorCrtcMode *crtc_modes;
} MetaMonitorMode;
typedef struct _MetaMonitorPrivate
{
GList *outputs;
GList *modes;
MetaMonitorMode *preferred_mode;
MetaMonitorMode *current_mode;
MetaMonitorSpec *spec;
/*
* The primary or first output for this monitor, 0 if we can't figure out.
* It can be matched to a winsys_id of a MetaOutput.
*
* This is used as an opaque token on reconfiguration when switching from
* clone to extened, to decide on what output the windows should go next
* (it's an attempt to keep windows on the same monitor, and preferably on
* the primary one).
*/
long winsys_id;
} MetaMonitorPrivate;
G_DEFINE_TYPE_WITH_PRIVATE (MetaMonitor, meta_monitor, G_TYPE_OBJECT)
struct _MetaMonitorNormal
{
MetaMonitor parent;
};
G_DEFINE_TYPE (MetaMonitorNormal, meta_monitor_normal, META_TYPE_MONITOR)
struct _MetaMonitorTiled
{
MetaMonitor parent;
uint32_t tile_group_id;
MetaOutput *main_output;
};
G_DEFINE_TYPE (MetaMonitorTiled, meta_monitor_tiled, META_TYPE_MONITOR)
static void
meta_monitor_mode_free (MetaMonitorMode *mode);
MetaMonitorSpec *
meta_monitor_spec_clone (MetaMonitorSpec *monitor_spec)
{
MetaMonitorSpec *new_monitor_spec;
new_monitor_spec = g_new0 (MetaMonitorSpec, 1);
*new_monitor_spec = (MetaMonitorSpec) {
.connector = g_strdup (monitor_spec->connector),
.vendor = g_strdup (monitor_spec->vendor),
.product = g_strdup (monitor_spec->product),
.serial = g_strdup (monitor_spec->serial),
};
return new_monitor_spec;
}
gboolean
meta_monitor_spec_equals (MetaMonitorSpec *monitor_spec,
MetaMonitorSpec *other_monitor_spec)
{
return (g_str_equal (monitor_spec->connector, other_monitor_spec->connector) &&
g_str_equal (monitor_spec->vendor, other_monitor_spec->vendor) &&
g_str_equal (monitor_spec->product, other_monitor_spec->product) &&
g_str_equal (monitor_spec->serial, other_monitor_spec->serial));
}
int
meta_monitor_spec_compare (MetaMonitorSpec *monitor_spec_a,
MetaMonitorSpec *monitor_spec_b)
{
int ret;
ret = strcmp (monitor_spec_a->connector, monitor_spec_b->connector);
if (ret != 0)
return ret;
ret = strcmp (monitor_spec_a->vendor, monitor_spec_b->vendor);
if (ret != 0)
return ret;
ret = strcmp (monitor_spec_a->product, monitor_spec_b->product);
if (ret != 0)
return ret;
return strcmp (monitor_spec_a->serial, monitor_spec_b->serial);
}
void
meta_monitor_spec_free (MetaMonitorSpec *monitor_spec)
{
g_free (monitor_spec->connector);
g_free (monitor_spec->vendor);
g_free (monitor_spec->product);
g_free (monitor_spec->serial);
g_free (monitor_spec);
}
static void
meta_monitor_generate_id (MetaMonitor *monitor)
{
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
MetaOutput *output = meta_monitor_get_main_output (monitor);
MetaMonitorSpec *monitor_spec;
monitor_spec = g_new0 (MetaMonitorSpec, 1);
*monitor_spec = (MetaMonitorSpec) {
.connector = g_strdup (output->name),
.vendor = g_strdup (output->vendor),
.product = g_strdup (output->product),
.serial = g_strdup (output->serial),
};
priv->spec = monitor_spec;
}
GList *
meta_monitor_get_outputs (MetaMonitor *monitor)
{
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
return priv->outputs;
}
MetaOutput *
meta_monitor_get_main_output (MetaMonitor *monitor)
{
return META_MONITOR_GET_CLASS (monitor)->get_main_output (monitor);
}
gboolean
meta_monitor_is_active (MetaMonitor *monitor)
{
MetaOutput *output;
output = meta_monitor_get_main_output (monitor);
return output->crtc && output->crtc->current_mode;
}
gboolean
meta_monitor_is_primary (MetaMonitor *monitor)
{
MetaOutput *output;
output = meta_monitor_get_main_output (monitor);
return output->is_primary;
}
gboolean
meta_monitor_is_underscanning (MetaMonitor *monitor)
{
MetaOutput *output;
output = meta_monitor_get_main_output (monitor);
return output->is_underscanning;
}
gboolean
meta_monitor_is_laptop_panel (MetaMonitor *monitor)
{
MetaOutput *output;
output = meta_monitor_get_main_output (monitor);
switch (output->connector_type)
{
case META_CONNECTOR_TYPE_eDP:
case META_CONNECTOR_TYPE_LVDS:
case META_CONNECTOR_TYPE_DSI:
return TRUE;
default:
return FALSE;
}
}
void
meta_monitor_get_dimensions (MetaMonitor *monitor,
int *width,
int *height)
{
META_MONITOR_GET_CLASS (monitor)->get_dimensions (monitor, width, height);
}
void
meta_monitor_get_physical_dimensions (MetaMonitor *monitor,
int *width_mm,
int *height_mm)
{
MetaOutput *output;
output = meta_monitor_get_main_output (monitor);
*width_mm = output->width_mm;
*height_mm = output->height_mm;
}
CoglSubpixelOrder
meta_monitor_get_subpixel_order (MetaMonitor *monitor)
{
MetaOutput *output;
output = meta_monitor_get_main_output (monitor);
return output->subpixel_order;
}
const char *
meta_monitor_get_vendor (MetaMonitor *monitor)
{
MetaOutput *output;
output = meta_monitor_get_main_output (monitor);
return output->vendor;
}
const char *
meta_monitor_get_product (MetaMonitor *monitor)
{
MetaOutput *output;
output = meta_monitor_get_main_output (monitor);
return output->product;
}
const char *
meta_monitor_get_serial (MetaMonitor *monitor)
{
MetaOutput *output;
output = meta_monitor_get_main_output (monitor);
return output->serial;
}
static void
meta_monitor_finalize (GObject *object)
{
MetaMonitor *monitor = META_MONITOR (object);
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
g_list_free_full (priv->modes, (GDestroyNotify) meta_monitor_mode_free);
g_clear_pointer (&priv->outputs, g_list_free);
meta_monitor_spec_free (priv->spec);
}
static void
meta_monitor_init (MetaMonitor *monitor)
{
}
static void
meta_monitor_class_init (MetaMonitorClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = meta_monitor_finalize;
}
static void
meta_monitor_normal_generate_modes (MetaMonitorNormal *monitor_normal)
{
MetaMonitor *monitor = META_MONITOR (monitor_normal);
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
MetaOutput *output;
unsigned int i;
output = meta_monitor_get_main_output (monitor);
for (i = 0; i < output->n_modes; i++)
{
MetaCrtcMode *crtc_mode = output->modes[i];
MetaMonitorMode *mode;
mode = g_new0 (MetaMonitorMode, 1);
mode->spec = (MetaMonitorModeSpec) {
.width = crtc_mode->width,
.height = crtc_mode->height,
.refresh_rate = crtc_mode->refresh_rate
},
mode->crtc_modes = g_new (MetaMonitorCrtcMode, 1);
mode->crtc_modes[0] = (MetaMonitorCrtcMode) {
.x = 0,
.y = 0,
.output = output,
.crtc_mode = crtc_mode
};
if (crtc_mode == output->preferred_mode)
monitor_priv->preferred_mode = mode;
if (output->crtc && crtc_mode == output->crtc->current_mode)
monitor_priv->current_mode = mode;
monitor_priv->modes = g_list_append (monitor_priv->modes, mode);
}
}
MetaMonitorNormal *
meta_monitor_normal_new (MetaOutput *output)
{
MetaMonitorNormal *monitor_normal;
MetaMonitor *monitor;
MetaMonitorPrivate *monitor_priv;
monitor_normal = g_object_new (META_TYPE_MONITOR_NORMAL, NULL);
monitor = META_MONITOR (monitor_normal);
monitor_priv = meta_monitor_get_instance_private (monitor);
monitor_priv->outputs = g_list_append (NULL, output);
monitor_priv->winsys_id = output->winsys_id;
meta_monitor_normal_generate_modes (monitor_normal);
meta_monitor_generate_id (monitor);
return monitor_normal;
}
static MetaOutput *
meta_monitor_normal_get_main_output (MetaMonitor *monitor)
{
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
return monitor_priv->outputs->data;
}
static void
meta_monitor_normal_get_dimensions (MetaMonitor *monitor,
int *width,
int *height)
{
MetaOutput *output;
output = meta_monitor_get_main_output (monitor);
*width = output->crtc->rect.width;
*height = output->crtc->rect.height;
}
static void
meta_monitor_normal_init (MetaMonitorNormal *monitor)
{
}
static void
meta_monitor_normal_class_init (MetaMonitorNormalClass *klass)
{
MetaMonitorClass *monitor_class = META_MONITOR_CLASS (klass);
monitor_class->get_main_output = meta_monitor_normal_get_main_output;
monitor_class->get_dimensions = meta_monitor_normal_get_dimensions;
}
uint32_t
meta_monitor_tiled_get_tile_group_id (MetaMonitorTiled *monitor_tiled)
{
return monitor_tiled->tile_group_id;
}
gboolean
meta_monitor_get_suggested_position (MetaMonitor *monitor,
int *x,
int *y)
{
MetaOutput *main_output;
main_output = meta_monitor_get_main_output (monitor);
if (main_output->suggested_x < 0 && main_output->suggested_y < 0)
return FALSE;
*x = main_output->suggested_x;
*y = main_output->suggested_y;
return TRUE;
}
static void
add_tiled_monitor_outputs (MetaMonitorManager *monitor_manager,
MetaMonitorTiled *monitor_tiled)
{
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (META_MONITOR (monitor_tiled));
unsigned int i;
for (i = 0; i < monitor_manager->n_outputs; i++)
{
MetaOutput *output = &monitor_manager->outputs[i];
if (output->tile_info.group_id != monitor_tiled->tile_group_id)
continue;
g_warn_if_fail (output->subpixel_order ==
monitor_tiled->main_output->subpixel_order);
monitor_priv->outputs = g_list_append (monitor_priv->outputs, output);
}
}
static void
calculate_tile_coordinate (MetaMonitor *monitor,
MetaOutput *output,
int *out_x,
int *out_y)
{
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
GList *l;
int x = 0;
int y = 0;
for (l = monitor_priv->outputs; l; l = l->next)
{
MetaOutput *other_output = l->data;
if (other_output->tile_info.loc_v_tile == output->tile_info.loc_v_tile &&
other_output->tile_info.loc_h_tile < output->tile_info.loc_h_tile)
x += other_output->tile_info.tile_w;
if (other_output->tile_info.loc_h_tile == output->tile_info.loc_h_tile &&
other_output->tile_info.loc_v_tile < output->tile_info.loc_v_tile)
y += other_output->tile_info.tile_h;
}
*out_x = x;
*out_y = y;
}
static void
meta_monitor_tiled_calculate_tiled_size (MetaMonitor *monitor,
int *out_width,
int *out_height)
{
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
GList *l;
int width;
int height;
width = 0;
height = 0;
for (l = monitor_priv->outputs; l; l = l->next)
{
MetaOutput *output = l->data;
if (output->tile_info.loc_v_tile == 0)
width += output->tile_info.tile_w;
if (output->tile_info.loc_h_tile == 0)
height += output->tile_info.tile_h;
}
*out_width = width;
*out_height = height;
}
static void
meta_monitor_tiled_generate_modes (MetaMonitorTiled *monitor_tiled)
{
MetaMonitor *monitor = META_MONITOR (monitor_tiled);
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
MetaMonitorMode *mode;
gboolean preferred_mode_is_current;
GList *l;
int i;
mode = g_new0 (MetaMonitorMode, 1);
meta_monitor_tiled_calculate_tiled_size (monitor,
&mode->spec.width,
&mode->spec.height);
mode->crtc_modes = g_new (MetaMonitorCrtcMode,
g_list_length (monitor_priv->outputs));
preferred_mode_is_current = TRUE;
for (l = monitor_priv->outputs, i = 0; l; l = l->next, i++)
{
MetaOutput *output = l->data;
MetaCrtcMode *preferred_crtc_mode = output->preferred_mode;
int x;
int y;
calculate_tile_coordinate (monitor, output, &x, &y);
mode->crtc_modes[i] = (MetaMonitorCrtcMode) {
.x = x,
.y = y,
.output = output,
.crtc_mode = preferred_crtc_mode
};
g_warn_if_fail (mode->spec.refresh_rate == 0.0f ||
(mode->spec.refresh_rate ==
preferred_crtc_mode->refresh_rate));
mode->spec.refresh_rate = preferred_crtc_mode->refresh_rate;
if (!output->crtc ||
mode->crtc_modes[i].crtc_mode != output->crtc->current_mode)
preferred_mode_is_current = FALSE;
}
monitor_priv->modes = g_list_append (monitor_priv->modes, mode);
monitor_priv->preferred_mode = mode;
if (preferred_mode_is_current)
monitor_priv->current_mode = mode;
/* TODO: Add single tile modes */
}
MetaMonitorTiled *
meta_monitor_tiled_new (MetaMonitorManager *monitor_manager,
MetaOutput *output)
{
MetaMonitorTiled *monitor_tiled;
MetaMonitor *monitor;
MetaMonitorPrivate *monitor_priv;
monitor_tiled = g_object_new (META_TYPE_MONITOR_TILED, NULL);
monitor = META_MONITOR (monitor_tiled);
monitor_priv = meta_monitor_get_instance_private (monitor);
monitor_tiled->tile_group_id = output->tile_info.group_id;
monitor_priv->winsys_id = output->winsys_id;
monitor_tiled->main_output = output;
add_tiled_monitor_outputs (monitor_manager, monitor_tiled);
meta_monitor_manager_tiled_monitor_added (monitor_manager,
META_MONITOR (monitor_tiled));
meta_monitor_tiled_generate_modes (monitor_tiled);
meta_monitor_generate_id (monitor);
return monitor_tiled;
}
static MetaOutput *
meta_monitor_tiled_get_main_output (MetaMonitor *monitor)
{
MetaMonitorTiled *monitor_tiled = META_MONITOR_TILED (monitor);
return monitor_tiled->main_output;
}
static void
meta_monitor_tiled_get_dimensions (MetaMonitor *monitor,
int *width,
int *height)
{
meta_monitor_tiled_calculate_tiled_size (monitor, width, height);
}
static void
meta_monitor_tiled_finalize (GObject *object)
{
MetaMonitorTiled *monitor_tiled = META_MONITOR_TILED (object);
MetaBackend *backend = meta_get_backend ();
MetaMonitorManager *monitor_manager =
meta_backend_get_monitor_manager (backend);
meta_monitor_manager_tiled_monitor_removed (monitor_manager,
META_MONITOR (monitor_tiled));
}
static void
meta_monitor_tiled_init (MetaMonitorTiled *monitor)
{
}
static void
meta_monitor_tiled_class_init (MetaMonitorTiledClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
MetaMonitorClass *monitor_class = META_MONITOR_CLASS (klass);
object_class->finalize = meta_monitor_tiled_finalize;
monitor_class->get_main_output = meta_monitor_tiled_get_main_output;
monitor_class->get_dimensions = meta_monitor_tiled_get_dimensions;
}
static void
meta_monitor_mode_free (MetaMonitorMode *monitor_mode)
{
g_free (monitor_mode->crtc_modes);
g_free (monitor_mode);
}
MetaMonitorSpec *
meta_monitor_get_spec (MetaMonitor *monitor)
{
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
return priv->spec;
}
MetaLogicalMonitor *
meta_monitor_get_logical_monitor (MetaMonitor *monitor)
{
MetaOutput *output = meta_monitor_get_main_output (monitor);
if (output->crtc)
return output->crtc->logical_monitor;
else
return NULL;
}
static gboolean
meta_monitor_mode_spec_equals (MetaMonitorModeSpec *monitor_mode_spec,
MetaMonitorModeSpec *other_monitor_mode_spec)
{
return (monitor_mode_spec->width == other_monitor_mode_spec->width &&
monitor_mode_spec->height == other_monitor_mode_spec->height &&
(monitor_mode_spec->refresh_rate ==
other_monitor_mode_spec->refresh_rate));
}
MetaMonitorMode *
meta_monitor_get_mode_from_spec (MetaMonitor *monitor,
MetaMonitorModeSpec *monitor_mode_spec)
{
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
GList *l;
for (l = priv->modes; l; l = l->next)
{
MetaMonitorMode *monitor_mode = l->data;
if (meta_monitor_mode_spec_equals (monitor_mode_spec,
&monitor_mode->spec))
return monitor_mode;
}
return NULL;
}
MetaMonitorMode *
meta_monitor_get_preferred_mode (MetaMonitor *monitor)
{
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
return priv->preferred_mode;
}
MetaMonitorMode *
meta_monitor_get_current_mode (MetaMonitor *monitor)
{
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
return priv->current_mode;
}
static gboolean
is_monitor_mode_assigned (MetaMonitor *monitor,
MetaMonitorMode *mode)
{
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
GList *l;
int i;
for (l = priv->outputs, i = 0; l; l = l->next, i++)
{
MetaOutput *output = l->data;
MetaMonitorCrtcMode *monitor_crtc_mode = &mode->crtc_modes[i];
if (!output->crtc ||
output->crtc->current_mode != monitor_crtc_mode->crtc_mode)
return FALSE;
}
return TRUE;
}
void
meta_monitor_derive_current_mode (MetaMonitor *monitor)
{
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
MetaMonitorMode *current_mode = NULL;
GList *l;
for (l = priv->modes; l; l = l->next)
{
MetaMonitorMode *mode = l->data;
if (is_monitor_mode_assigned (monitor, mode))
{
current_mode = mode;
break;
}
}
priv->current_mode = current_mode;
}
void
meta_monitor_set_current_mode (MetaMonitor *monitor,
MetaMonitorMode *mode)
{
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
priv->current_mode = mode;
}
GList *
meta_monitor_get_modes (MetaMonitor *monitor)
{
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
return priv->modes;
}
MetaMonitorModeSpec *
meta_monitor_mode_get_spec (MetaMonitorMode *monitor_mode)
{
return &monitor_mode->spec;
}
void
meta_monitor_mode_get_resolution (MetaMonitorMode *monitor_mode,
int *width,
int *height)
{
*width = monitor_mode->spec.width;
*height = monitor_mode->spec.height;
}
float
meta_monitor_mode_get_refresh_rate (MetaMonitorMode *monitor_mode)
{
return monitor_mode->spec.refresh_rate;
}
gboolean
meta_monitor_mode_foreach_crtc (MetaMonitor *monitor,
MetaMonitorMode *mode,
MetaMonitorModeFunc func,
gpointer user_data,
GError **error)
{
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
GList *l;
int i;
for (l = monitor_priv->outputs, i = 0; l; l = l->next, i++)
{
MetaMonitorCrtcMode *monitor_crtc_mode = &mode->crtc_modes[i];
if (!func (monitor, mode, monitor_crtc_mode, user_data, error))
return FALSE;
}
return TRUE;
}

164
src/backends/meta-monitor.h Normal file
View File

@@ -0,0 +1,164 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2016 Red Hat
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef META_MONITOR_H
#define META_MONITOR_H
#include <glib-object.h>
#include "backends/meta-monitor-manager-private.h"
typedef struct _MetaMonitorMode MetaMonitorMode;
typedef struct _MetaMonitorSpec
{
char *connector;
char *vendor;
char *product;
char *serial;
} MetaMonitorSpec;
typedef struct _MetaMonitorModeSpec
{
int width;
int height;
float refresh_rate;
} MetaMonitorModeSpec;
typedef struct _MetaMonitorCrtcMode
{
int x;
int y;
MetaOutput *output;
MetaCrtcMode *crtc_mode;
} MetaMonitorCrtcMode;
typedef gboolean (* MetaMonitorModeFunc) (MetaMonitor *monitor,
MetaMonitorMode *mode,
MetaMonitorCrtcMode *monitor_crtc_mode,
gpointer user_data,
GError **error);
#define META_TYPE_MONITOR (meta_monitor_get_type ())
G_DECLARE_DERIVABLE_TYPE (MetaMonitor, meta_monitor, META, MONITOR, GObject)
struct _MetaMonitorClass
{
GObjectClass parent_class;
MetaOutput * (* get_main_output) (MetaMonitor *monitor);
void (* get_dimensions) (MetaMonitor *monitor,
int *width,
int *height);
};
#define META_TYPE_MONITOR_NORMAL (meta_monitor_normal_get_type ())
G_DECLARE_FINAL_TYPE (MetaMonitorNormal, meta_monitor_normal,
META, MONITOR_NORMAL,
MetaMonitor)
#define META_TYPE_MONITOR_TILED (meta_monitor_tiled_get_type ())
G_DECLARE_FINAL_TYPE (MetaMonitorTiled, meta_monitor_tiled,
META, MONITOR_TILED,
MetaMonitor)
MetaMonitorTiled * meta_monitor_tiled_new (MetaMonitorManager *monitor_manager,
MetaOutput *main_output);
MetaMonitorNormal * meta_monitor_normal_new (MetaOutput *output);
MetaMonitorSpec * meta_monitor_get_spec (MetaMonitor *monitor);
gboolean meta_monitor_is_active (MetaMonitor *monitor);
MetaOutput * meta_monitor_get_main_output (MetaMonitor *monitor);
gboolean meta_monitor_is_primary (MetaMonitor *monitor);
gboolean meta_monitor_is_underscanning (MetaMonitor *monitor);
gboolean meta_monitor_is_laptop_panel (MetaMonitor *monitor);
GList * meta_monitor_get_outputs (MetaMonitor *monitor);
void meta_monitor_get_dimensions (MetaMonitor *monitor,
int *width,
int *height);
void meta_monitor_get_physical_dimensions (MetaMonitor *monitor,
int *width_mm,
int *height_mm);
CoglSubpixelOrder meta_monitor_get_subpixel_order (MetaMonitor *monitor);
const char * meta_monitor_get_vendor (MetaMonitor *monitor);
const char * meta_monitor_get_product (MetaMonitor *monitor);
const char * meta_monitor_get_serial (MetaMonitor *monitor);
uint32_t meta_monitor_tiled_get_tile_group_id (MetaMonitorTiled *monitor_tiled);
gboolean meta_monitor_get_suggested_position (MetaMonitor *monitor,
int *x,
int *y);
MetaLogicalMonitor * meta_monitor_get_logical_monitor (MetaMonitor *monitor);
MetaMonitorMode * meta_monitor_get_mode_from_spec (MetaMonitor *monitor,
MetaMonitorModeSpec *monitor_mode_spec);
MetaMonitorMode * meta_monitor_get_preferred_mode (MetaMonitor *monitor);
MetaMonitorMode * meta_monitor_get_current_mode (MetaMonitor *monitor);
void meta_monitor_derive_current_mode (MetaMonitor *monitor);
void meta_monitor_set_current_mode (MetaMonitor *monitor,
MetaMonitorMode *mode);
GList * meta_monitor_get_modes (MetaMonitor *monitor);
MetaMonitorModeSpec * meta_monitor_mode_get_spec (MetaMonitorMode *monitor_mode);
void meta_monitor_mode_get_resolution (MetaMonitorMode *monitor_mode,
int *width,
int *height);
float meta_monitor_mode_get_refresh_rate (MetaMonitorMode *monitor_mode);
gboolean meta_monitor_mode_foreach_crtc (MetaMonitor *monitor,
MetaMonitorMode *mode,
MetaMonitorModeFunc func,
gpointer user_data,
GError **error);
MetaMonitorSpec * meta_monitor_spec_clone (MetaMonitorSpec *monitor_id);
gboolean meta_monitor_spec_equals (MetaMonitorSpec *monitor_id,
MetaMonitorSpec *other_monitor_id);
int meta_monitor_spec_compare (MetaMonitorSpec *monitor_spec_a,
MetaMonitorSpec *monitor_spec_b);
void meta_monitor_spec_free (MetaMonitorSpec *monitor_id);
#endif /* META_MONITOR_H */

View File

@@ -39,16 +39,16 @@ struct _MetaRendererView
ClutterStageViewCogl parent;
MetaMonitorTransform transform;
MetaMonitorInfo *monitor_info;
MetaLogicalMonitor *logical_monitor;
};
G_DEFINE_TYPE (MetaRendererView, meta_renderer_view,
CLUTTER_TYPE_STAGE_VIEW_COGL)
MetaMonitorInfo *
meta_renderer_view_get_monitor_info (MetaRendererView *view)
MetaLogicalMonitor *
meta_renderer_view_get_logical_monitor (MetaRendererView *view)
{
return view->monitor_info;
return view->logical_monitor;
}
static void
@@ -128,7 +128,7 @@ meta_renderer_view_get_property (GObject *object,
switch (prop_id)
{
case PROP_MONITOR_INFO:
g_value_set_pointer (value, view->monitor_info);
g_value_set_pointer (value, view->logical_monitor);
break;
case PROP_TRANSFORM:
g_value_set_uint (value, view->transform);
@@ -150,7 +150,7 @@ meta_renderer_view_set_property (GObject *object,
switch (prop_id)
{
case PROP_MONITOR_INFO:
view->monitor_info = g_value_get_pointer (value);
view->logical_monitor = g_value_get_pointer (value);
break;
case PROP_TRANSFORM:
meta_renderer_view_set_transform (view, g_value_get_uint (value));
@@ -181,9 +181,9 @@ meta_renderer_view_class_init (MetaRendererViewClass *klass)
object_class->set_property = meta_renderer_view_set_property;
obj_props[PROP_MONITOR_INFO] =
g_param_spec_pointer ("monitor-info",
"MetaMonitorInfo",
"The monitor info of the view",
g_param_spec_pointer ("logical-monitor",
"MetaLogicalMonitor",
"The logical monitor of the view",
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS |
G_PARAM_CONSTRUCT_ONLY);

View File

@@ -26,6 +26,6 @@ G_DECLARE_FINAL_TYPE (MetaRendererView, meta_renderer_view,
META, RENDERER_VIEW,
ClutterStageViewCogl)
MetaMonitorInfo *meta_renderer_view_get_monitor_info (MetaRendererView *view);
MetaLogicalMonitor *meta_renderer_view_get_logical_monitor (MetaRendererView *view);
#endif /* META_RENDERER_VIEW_H */

View File

@@ -43,11 +43,11 @@ meta_renderer_create_cogl_renderer (MetaRenderer *renderer)
}
static MetaRendererView *
meta_renderer_create_view (MetaRenderer *renderer,
MetaMonitorInfo *monitor_info)
meta_renderer_create_view (MetaRenderer *renderer,
MetaLogicalMonitor *logical_monitor)
{
return META_RENDERER_GET_CLASS (renderer)->create_view (renderer,
monitor_info);
logical_monitor);
}
void
@@ -57,21 +57,20 @@ meta_renderer_rebuild_views (MetaRenderer *renderer)
MetaBackend *backend = meta_get_backend ();
MetaMonitorManager *monitor_manager =
meta_backend_get_monitor_manager (backend);
MetaMonitorInfo *monitor_infos;
unsigned int num_monitor_infos;
unsigned int i;
GList *logical_monitors, *l;
g_list_free_full (priv->views, g_object_unref);
priv->views = NULL;
monitor_infos = meta_monitor_manager_get_monitor_infos (monitor_manager,
&num_monitor_infos);
logical_monitors =
meta_monitor_manager_get_logical_monitors (monitor_manager);
for (i = 0; i < num_monitor_infos; i++)
for (l = logical_monitors; l; l = l->next)
{
MetaLogicalMonitor *logical_monitor = l->data;
MetaRendererView *view;
view = meta_renderer_create_view (renderer, &monitor_infos[i]);
view = meta_renderer_create_view (renderer, logical_monitor);
priv->views = g_list_append (priv->views, view);
}
}

View File

@@ -40,8 +40,8 @@ struct _MetaRendererClass
GObjectClass parent_class;
CoglRenderer * (* create_cogl_renderer) (MetaRenderer *renderer);
MetaRendererView * (* create_view) (MetaRenderer *renderer,
MetaMonitorInfo *monitor_info);
MetaRendererView * (* create_view) (MetaRenderer *renderer,
MetaLogicalMonitor *logical_monitor);
};
CoglRenderer * meta_renderer_create_cogl_renderer (MetaRenderer *renderer);

View File

@@ -37,6 +37,8 @@
#include "meta-cursor-renderer-native.h"
#include "meta-launcher.h"
#include "backends/meta-cursor-tracker-private.h"
#include "backends/meta-logical-monitor.h"
#include "backends/meta-monitor-manager-private.h"
#include "backends/meta-pointer-constraint.h"
#include "backends/meta-stage.h"
#include "backends/native/meta-clutter-backend-native.h"
@@ -45,6 +47,11 @@
#include <stdlib.h>
struct _MetaBackendNative
{
MetaBackend parent;
};
struct _MetaBackendNativePrivate
{
MetaLauncher *launcher;
@@ -154,7 +161,8 @@ constrain_to_client_constraint (ClutterInputDevice *device,
float *y)
{
MetaBackend *backend = meta_get_backend ();
MetaPointerConstraint *constraint = backend->client_pointer_constraint;
MetaPointerConstraint *constraint =
meta_backend_get_client_pointer_constraint (backend);
if (!constraint)
return;
@@ -174,14 +182,13 @@ constrain_to_client_constraint (ClutterInputDevice *device,
static void
constrain_all_screen_monitors (ClutterInputDevice *device,
MetaMonitorInfo *monitors,
unsigned n_monitors,
float *x,
float *y)
MetaMonitorManager *monitor_manager,
float *x,
float *y)
{
ClutterPoint current;
unsigned int i;
float cx, cy;
GList *logical_monitors, *l;
clutter_input_device_get_coords (device, NULL, &current);
@@ -189,15 +196,18 @@ constrain_all_screen_monitors (ClutterInputDevice *device,
cy = current.y;
/* if we're trying to escape, clamp to the CRTC we're coming from */
for (i = 0; i < n_monitors; i++)
logical_monitors =
meta_monitor_manager_get_logical_monitors (monitor_manager);
for (l = logical_monitors; l; l = l->next)
{
MetaMonitorInfo *monitor = &monitors[i];
MetaLogicalMonitor *logical_monitor = l->data;
int left, right, top, bottom;
left = monitor->rect.x;
right = left + monitor->rect.width;
top = monitor->rect.y;
bottom = top + monitor->rect.height;
left = logical_monitor->rect.x;
right = left + logical_monitor->rect.width;
top = logical_monitor->rect.y;
bottom = top + logical_monitor->rect.height;
if ((cx >= left) && (cx < right) && (cy >= top) && (cy < bottom))
{
@@ -224,9 +234,9 @@ pointer_constrain_callback (ClutterInputDevice *device,
float *new_y,
gpointer user_data)
{
MetaMonitorManager *monitor_manager;
MetaMonitorInfo *monitors;
unsigned int n_monitors;
MetaBackend *backend = meta_get_backend ();
MetaMonitorManager *monitor_manager =
meta_backend_get_monitor_manager (backend);
/* Constrain to barriers */
constrain_to_barriers (device, time, new_x, new_y);
@@ -234,15 +244,13 @@ pointer_constrain_callback (ClutterInputDevice *device,
/* Constrain to pointer lock */
constrain_to_client_constraint (device, time, prev_x, prev_y, new_x, new_y);
monitor_manager = meta_monitor_manager_get ();
monitors = meta_monitor_manager_get_monitor_infos (monitor_manager, &n_monitors);
/* if we're moving inside a monitor, we're fine */
if (meta_monitor_manager_get_monitor_at_point (monitor_manager, *new_x, *new_y) >= 0)
if (meta_monitor_manager_get_logical_monitor_at (monitor_manager,
*new_x, *new_y))
return;
/* if we're trying to escape, clamp to the CRTC we're coming from */
constrain_all_screen_monitors(device, monitors, n_monitors, new_x, new_y);
constrain_all_screen_monitors (device, monitor_manager, new_x, new_y);
}
static ClutterBackend *
@@ -314,7 +322,6 @@ meta_backend_native_warp_pointer (MetaBackend *backend,
{
ClutterDeviceManager *manager = clutter_device_manager_get_default ();
ClutterInputDevice *device = clutter_device_manager_get_core_device (manager, CLUTTER_POINTER_DEVICE);
MetaCursorTracker *tracker = meta_cursor_tracker_get_for_screen (NULL);
/* XXX */
guint32 time_ = 0;
@@ -323,7 +330,19 @@ meta_backend_native_warp_pointer (MetaBackend *backend,
clutter_evdev_warp_pointer (device, time_, x, y);
/* Warp displayed pointer cursor. */
meta_cursor_tracker_update_position (tracker, x, y);
meta_backend_set_cursor_position (backend, x, y);
}
static MetaLogicalMonitor *
meta_backend_native_get_current_logical_monitor (MetaBackend *backend)
{
MetaCursorTracker *cursor_tracker = meta_backend_get_cursor_tracker (backend);
MetaMonitorManager *monitor_manager =
meta_backend_get_monitor_manager (backend);
int x, y;
meta_cursor_tracker_get_pointer (cursor_tracker, &x, &y, NULL);
return meta_monitor_manager_get_logical_monitor_at (monitor_manager, x, y);
}
static void
@@ -426,6 +445,9 @@ meta_backend_native_class_init (MetaBackendNativeClass *klass)
backend_class->create_renderer = meta_backend_native_create_renderer;
backend_class->warp_pointer = meta_backend_native_warp_pointer;
backend_class->get_current_logical_monitor = meta_backend_native_get_current_logical_monitor;
backend_class->set_keymap = meta_backend_native_set_keymap;
backend_class->get_keymap = meta_backend_native_get_keymap;
backend_class->lock_layout_group = meta_backend_native_lock_layout_group;

View File

@@ -28,27 +28,9 @@
#include "backends/meta-backend-private.h"
#include "backends/native/meta-clutter-backend-native.h"
#define META_TYPE_BACKEND_NATIVE (meta_backend_native_get_type ())
#define META_BACKEND_NATIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_BACKEND_NATIVE, MetaBackendNative))
#define META_BACKEND_NATIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_BACKEND_NATIVE, MetaBackendNativeClass))
#define META_IS_BACKEND_NATIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_BACKEND_NATIVE))
#define META_IS_BACKEND_NATIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_BACKEND_NATIVE))
#define META_BACKEND_NATIVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_BACKEND_NATIVE, MetaBackendNativeClass))
typedef struct _MetaBackendNative MetaBackendNative;
typedef struct _MetaBackendNativeClass MetaBackendNativeClass;
struct _MetaBackendNative
{
MetaBackend parent;
};
struct _MetaBackendNativeClass
{
MetaBackendClass parent_class;
};
GType meta_backend_native_get_type (void) G_GNUC_CONST;
#define META_TYPE_BACKEND_NATIVE (meta_backend_native_get_type ())
G_DECLARE_FINAL_TYPE (MetaBackendNative, meta_backend_native,
META, BACKEND_NATIVE, MetaBackend)
gboolean meta_activate_vt (int vt, GError **error);

View File

@@ -63,6 +63,7 @@ static GQuark quark_cursor_sprite = 0;
struct _MetaCursorRendererNativePrivate
{
gboolean hw_state_invalidated;
gboolean has_hw_cursor;
MetaCursorSprite *last_cursor;
@@ -158,9 +159,8 @@ set_pending_cursor_sprite_gbm_bo (MetaCursorSprite *cursor_sprite,
static void
set_crtc_cursor (MetaCursorRendererNative *native,
MetaCRTC *crtc,
MetaCursorSprite *cursor_sprite,
gboolean force)
MetaCrtc *crtc,
MetaCursorSprite *cursor_sprite)
{
MetaCursorRendererNativePrivate *priv = meta_cursor_renderer_native_get_instance_private (native);
@@ -177,7 +177,7 @@ set_crtc_cursor (MetaCursorRendererNative *native,
else
bo = get_active_cursor_sprite_gbm_bo (cursor_sprite);
if (!force && bo == crtc->cursor_renderer_private)
if (!priv->hw_state_invalidated && bo == crtc->cursor_renderer_private)
return;
crtc->cursor_renderer_private = bo;
@@ -197,7 +197,7 @@ set_crtc_cursor (MetaCursorRendererNative *native,
}
else
{
if (force || crtc->cursor_renderer_private != NULL)
if (priv->hw_state_invalidated || crtc->cursor_renderer_private != NULL)
{
drmModeSetCursor2 (priv->drm_fd, crtc->crtc_id, 0, 0, 0, 0, 0);
crtc->cursor_renderer_private = NULL;
@@ -207,13 +207,12 @@ set_crtc_cursor (MetaCursorRendererNative *native,
static void
update_hw_cursor (MetaCursorRendererNative *native,
MetaCursorSprite *cursor_sprite,
gboolean force)
MetaCursorSprite *cursor_sprite)
{
MetaCursorRendererNativePrivate *priv = meta_cursor_renderer_native_get_instance_private (native);
MetaCursorRenderer *renderer = META_CURSOR_RENDERER (native);
MetaMonitorManager *monitors;
MetaCRTC *crtcs;
MetaCrtc *crtcs;
unsigned int i, n_crtcs;
MetaRectangle rect;
gboolean painted = FALSE;
@@ -241,7 +240,7 @@ update_hw_cursor (MetaCursorRendererNative *native,
else
crtc_cursor = NULL;
set_crtc_cursor (native, &crtcs[i], crtc_cursor, force);
set_crtc_cursor (native, &crtcs[i], crtc_cursor);
if (crtc_cursor)
{
@@ -252,6 +251,8 @@ update_hw_cursor (MetaCursorRendererNative *native,
}
}
priv->hw_state_invalidated = FALSE;
if (painted)
meta_cursor_renderer_emit_painted (renderer, cursor_sprite);
}
@@ -285,7 +286,7 @@ cursor_over_transformed_crtc (MetaCursorRenderer *renderer,
MetaCursorSprite *cursor_sprite)
{
MetaMonitorManager *monitors;
MetaCRTC *crtcs;
MetaCrtc *crtcs;
unsigned int i, n_crtcs;
MetaRectangle rect;
@@ -394,7 +395,7 @@ meta_cursor_renderer_native_update_cursor (MetaCursorRenderer *renderer,
meta_cursor_renderer_native_trigger_frame (native, cursor_sprite);
priv->has_hw_cursor = should_have_hw_cursor (renderer, cursor_sprite);
update_hw_cursor (native, cursor_sprite, FALSE);
update_hw_cursor (native, cursor_sprite);
return priv->has_hw_cursor;
}
@@ -656,8 +657,11 @@ static void
force_update_hw_cursor (MetaCursorRendererNative *native)
{
MetaCursorRenderer *renderer = META_CURSOR_RENDERER (native);
MetaCursorRendererNativePrivate *priv =
meta_cursor_renderer_native_get_instance_private (native);
update_hw_cursor (native, meta_cursor_renderer_get_cursor (renderer), TRUE);
priv->hw_state_invalidated = TRUE;
update_hw_cursor (native, meta_cursor_renderer_get_cursor (renderer));
}
static void
@@ -678,6 +682,8 @@ meta_cursor_renderer_native_init (MetaCursorRendererNative *native)
g_signal_connect_object (monitors, "monitors-changed",
G_CALLBACK (on_monitors_changed), native, 0);
priv->hw_state_invalidated = TRUE;
#if defined(CLUTTER_WINDOWING_EGL)
if (clutter_check_windowing_backend (CLUTTER_WINDOWING_EGL))
{

View File

@@ -27,6 +27,7 @@
#include <linux/input-event-codes.h>
#include <libinput.h>
#include "meta-backend-native.h"
#include "meta-input-settings-native.h"
G_DEFINE_TYPE (MetaInputSettingsNative, meta_input_settings_native, META_TYPE_INPUT_SETTINGS)
@@ -65,14 +66,11 @@ meta_input_settings_native_set_matrix (MetaInputSettings *settings,
ClutterInputDevice *device,
gfloat matrix[6])
{
struct libinput_device *libinput_device;
cairo_matrix_t dev_matrix;
libinput_device = clutter_evdev_input_device_get_libinput_device (device);
if (!libinput_device)
return;
if (libinput_device_config_calibration_has_matrix (libinput_device) > 0)
libinput_device_config_calibration_set_matrix (libinput_device, matrix);
cairo_matrix_init (&dev_matrix, matrix[0], matrix[3], matrix[1],
matrix[4], matrix[2], matrix[5]);
g_object_set (device, "device-matrix", &dev_matrix, NULL);
}
static void
@@ -190,6 +188,19 @@ meta_input_settings_native_set_two_finger_scroll (MetaInputSettings *
device_set_scroll_method (libinput_device, current | method);
}
static gboolean
meta_input_settings_native_has_two_finger_scroll (MetaInputSettings *settings,
ClutterInputDevice *device)
{
struct libinput_device *libinput_device;
libinput_device = clutter_evdev_input_device_get_libinput_device (device);
if (!libinput_device)
return FALSE;
return libinput_device_config_scroll_get_methods (libinput_device) & LIBINPUT_CONFIG_SCROLL_2FG;
}
static void
meta_input_settings_native_set_scroll_button (MetaInputSettings *settings,
ClutterInputDevice *device,
@@ -382,7 +393,33 @@ meta_input_settings_native_set_tablet_keep_aspect (MetaInputSettings *settings,
MetaOutput *output,
gboolean keep_aspect)
{
/* FIXME: Implement */
gdouble output_aspect = 0;
if (keep_aspect)
{
gint output_width, output_height;
if (output && output->crtc)
{
output_width = output->crtc->rect.width;
output_height = output->crtc->rect.height;
}
else
{
MetaMonitorManager *monitor_manager;
MetaBackend *backend;
backend = meta_get_backend ();
monitor_manager = meta_backend_get_monitor_manager (backend);
meta_monitor_manager_get_screen_limits (monitor_manager,
&output_width,
&output_height);
}
output_aspect = (gdouble) output_width / output_height;
}
g_object_set (device, "output-aspect-ratio", output_aspect, NULL);
}
static void
@@ -393,7 +430,16 @@ meta_input_settings_native_set_tablet_area (MetaInputSettings *settings,
gdouble padding_top,
gdouble padding_bottom)
{
/* FIXME: Implement */
struct libinput_device *libinput_device;
gfloat matrix[6] = { 1. - (padding_left + padding_right), 0., padding_left,
0., 1. - (padding_top + padding_bottom), padding_top };
libinput_device = clutter_evdev_input_device_get_libinput_device (device);
if (!libinput_device ||
!libinput_device_config_calibration_has_matrix (libinput_device))
return;
libinput_device_config_calibration_set_matrix (libinput_device, matrix);
}
static void
@@ -470,6 +516,8 @@ meta_input_settings_native_class_init (MetaInputSettingsNativeClass *klass)
input_settings_class->set_stylus_pressure = meta_input_settings_native_set_stylus_pressure;
input_settings_class->set_stylus_button_map = meta_input_settings_native_set_stylus_button_map;
input_settings_class->has_two_finger_scroll = meta_input_settings_native_has_two_finger_scroll;
}
static void

View File

@@ -58,6 +58,7 @@ struct _MetaLauncher
Login1Session *session_proxy;
Login1Seat *seat_proxy;
GHashTable *sysfs_fds;
gboolean session_active;
int kms_fd;
@@ -220,6 +221,15 @@ on_evdev_device_open (const char *path,
int fd;
int major, minor;
/* Allow readonly access to sysfs */
if (g_str_has_prefix (path, "/sys/"))
{
fd = open (path, flags);
if (fd >= 0)
g_hash_table_add (self->sysfs_fds, GINT_TO_POINTER (fd));
return fd;
}
if (!get_device_info_from_path (path, &major, &minor))
{
g_set_error (error,
@@ -243,6 +253,14 @@ on_evdev_device_close (int fd,
int major, minor;
GError *error = NULL;
if (g_hash_table_lookup (self->sysfs_fds, GINT_TO_POINTER (fd)))
{
/* /sys/ paths just need close() here */
g_hash_table_remove (self->sysfs_fds, GINT_TO_POINTER (fd));
close (fd);
return;
}
if (!get_device_info_from_fd (fd, &major, &minor))
{
g_warning ("Could not get device info for fd %d: %m", fd);
@@ -540,11 +558,14 @@ meta_launcher_new (GError **error)
self = g_slice_new0 (MetaLauncher);
self->session_proxy = g_object_ref (session_proxy);
self->seat_proxy = g_object_ref (seat_proxy);
self->sysfs_fds = g_hash_table_new (NULL, NULL);
self->session_active = TRUE;
self->kms_fd = kms_fd;
self->kms_file_path = kms_file_path;
clutter_evdev_set_seat_id (seat_id);
clutter_evdev_set_device_callbacks (on_evdev_device_open,
on_evdev_device_close,
self);
@@ -563,6 +584,7 @@ meta_launcher_free (MetaLauncher *self)
{
g_object_unref (self->seat_proxy);
g_object_unref (self->session_proxy);
g_hash_table_destroy (self->sysfs_fds);
g_free (self->kms_file_path);
g_slice_free (MetaLauncher, self);
}

View File

@@ -25,6 +25,7 @@
#include "meta-monitor-manager-kms.h"
#include "meta-monitor-config.h"
#include "meta-monitor-config-manager.h"
#include "meta-backend-private.h"
#include "meta-renderer-native.h"
@@ -51,7 +52,12 @@
#define ALL_TRANSFORMS_MASK ((1 << ALL_TRANSFORMS) - 1)
#define SYNC_TOLERANCE 0.01 /* 1 percent */
typedef struct {
/* Try each 50 milleseconds up to half a second to get a proper EDID read */
#define EDID_RETRY_TIMEOUT_MS 50
#define EDID_MAX_NUM_RETRIES 10
typedef struct
{
drmModeConnector *connector;
unsigned n_encoders;
@@ -76,7 +82,8 @@ typedef struct {
gboolean has_scaling;
} MetaOutputKms;
typedef struct {
typedef struct
{
uint32_t underscan_prop_id;
uint32_t underscan_hborder_prop_id;
uint32_t underscan_vborder_prop_id;
@@ -84,7 +91,7 @@ typedef struct {
uint32_t rotation_prop_id;
uint32_t rotation_map[ALL_TRANSFORMS];
uint32_t all_hw_transforms;
} MetaCRTCKms;
} MetaCrtcKms;
typedef struct
{
@@ -109,6 +116,9 @@ struct _MetaMonitorManagerKms
GSettings *desktop_settings;
gboolean page_flips_not_supported;
guint handle_hotplug_timeout;
int read_edid_tries;
};
struct _MetaMonitorManagerKmsClass
@@ -187,13 +197,13 @@ meta_output_destroy_notify (MetaOutput *output)
}
static void
meta_monitor_mode_destroy_notify (MetaMonitorMode *output)
meta_monitor_mode_destroy_notify (MetaCrtcMode *mode)
{
g_slice_free (drmModeModeInfo, output->driver_private);
g_slice_free (drmModeModeInfo, mode->driver_private);
}
static void
meta_crtc_destroy_notify (MetaCRTC *crtc)
meta_crtc_destroy_notify (MetaCrtc *crtc)
{
g_free (crtc->driver_private);
}
@@ -281,9 +291,9 @@ find_connector_properties (MetaMonitorManagerKms *manager_kms,
static void
find_crtc_properties (MetaMonitorManagerKms *manager_kms,
MetaCRTC *meta_crtc)
MetaCrtc *meta_crtc)
{
MetaCRTCKms *crtc_kms;
MetaCrtcKms *crtc_kms;
drmModeObjectPropertiesPtr props;
size_t i;
@@ -310,33 +320,48 @@ find_crtc_properties (MetaMonitorManagerKms *manager_kms,
}
}
static GBytes *
read_output_edid (MetaMonitorManagerKms *manager_kms,
MetaOutput *output)
static drmModePropertyBlobPtr
read_edid_blob (MetaMonitorManagerKms *manager_kms,
uint32_t edid_blob_id,
GError **error)
{
MetaOutputKms *output_kms = output->driver_private;
drmModePropertyBlobPtr edid_blob = NULL;
if (output_kms->edid_blob_id == 0)
return NULL;
edid_blob = drmModeGetPropertyBlob (manager_kms->fd, output_kms->edid_blob_id);
edid_blob = drmModeGetPropertyBlob (manager_kms->fd, edid_blob_id);
if (!edid_blob)
{
meta_warning ("Failed to read EDID of output %s: %s\n", output->name, strerror(errno));
g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errno),
"Failed to get EDID property blob: %s", strerror (errno));
return NULL;
}
if (edid_blob->length > 0)
{
return g_bytes_new_with_free_func (edid_blob->data, edid_blob->length,
(GDestroyNotify)drmModeFreePropertyBlob, edid_blob);
}
else
return edid_blob;
}
static GBytes *
read_output_edid (MetaMonitorManagerKms *manager_kms,
MetaOutput *output,
GError **error)
{
MetaOutputKms *output_kms = output->driver_private;
drmModePropertyBlobPtr edid_blob;
g_assert (output_kms->edid_blob_id != 0);
edid_blob = read_edid_blob (manager_kms, output_kms->edid_blob_id, error);
if (!edid_blob)
return NULL;
if (edid_blob->length == 0)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "EDID blob was empty");
drmModeFreePropertyBlob (edid_blob);
return NULL;
}
return g_bytes_new_with_free_func (edid_blob->data, edid_blob->length,
(GDestroyNotify) drmModeFreePropertyBlob,
edid_blob);
}
static gboolean
@@ -368,9 +393,13 @@ output_get_tile_info (MetaMonitorManagerKms *manager_kms,
&output->tile_info.loc_v_tile,
&output->tile_info.tile_w,
&output->tile_info.tile_h);
drmModeFreePropertyBlob (tile_blob);
if (ret != 8)
return FALSE;
{
meta_warning ("Couldn't understand output tile property blob\n");
return FALSE;
}
return TRUE;
}
else
@@ -380,7 +409,7 @@ output_get_tile_info (MetaMonitorManagerKms *manager_kms,
}
}
static MetaMonitorMode *
static MetaCrtcMode *
find_meta_mode (MetaMonitorManager *manager,
const drmModeModeInfo *drm_mode)
{
@@ -415,7 +444,7 @@ drm_mode_vrefresh (const drmModeModeInfo *mode)
}
static void
init_mode (MetaMonitorMode *mode,
init_mode (MetaCrtcMode *mode,
const drmModeModeInfo *drm_mode,
long mode_id)
{
@@ -433,8 +462,8 @@ static int
compare_modes (const void *one,
const void *two)
{
MetaMonitorMode *a = *(MetaMonitorMode **) one;
MetaMonitorMode *b = *(MetaMonitorMode **) two;
MetaCrtcMode *a = *(MetaCrtcMode **) one;
MetaCrtcMode *b = *(MetaCrtcMode **) two;
if (a->width != b->width)
return a->width > b->width ? -1 : 1;
@@ -557,9 +586,9 @@ find_property_index (MetaMonitorManager *manager,
static void
parse_transforms (MetaMonitorManager *manager,
drmModePropertyPtr prop,
MetaCRTC *crtc)
MetaCrtc *crtc)
{
MetaCRTCKms *crtc_kms = crtc->driver_private;
MetaCrtcKms *crtc_kms = crtc->driver_private;
int i;
for (i = 0; i < prop->count_enums; i++)
@@ -600,14 +629,14 @@ is_primary_plane (MetaMonitorManager *manager,
static void
init_crtc_rotations (MetaMonitorManager *manager,
MetaCRTC *crtc,
MetaCrtc *crtc,
unsigned int idx)
{
MetaMonitorManagerKms *manager_kms = META_MONITOR_MANAGER_KMS (manager);
drmModeObjectPropertiesPtr props;
drmModePlaneRes *planes;
drmModePlane *drm_plane;
MetaCRTCKms *crtc_kms;
MetaCrtcKms *crtc_kms;
unsigned int i;
crtc_kms = crtc->driver_private;
@@ -692,15 +721,17 @@ add_common_modes (MetaMonitorManager *manager,
g_ptr_array_add (array, find_meta_mode (manager, mode));
}
output->modes = g_renew (MetaMonitorMode *, output->modes, output->n_modes + array->len);
memcpy (output->modes + output->n_modes, array->pdata, array->len * sizeof (MetaMonitorMode *));
output->modes = g_renew (MetaCrtcMode *, output->modes,
output->n_modes + array->len);
memcpy (output->modes + output->n_modes, array->pdata,
array->len * sizeof (MetaCrtcMode *));
output->n_modes += array->len;
g_ptr_array_free (array, TRUE);
}
static void
init_crtc (MetaCRTC *crtc,
init_crtc (MetaCrtc *crtc,
MetaMonitorManager *manager,
drmModeCrtc *drm_crtc)
{
@@ -728,7 +759,7 @@ init_crtc (MetaCRTC *crtc,
}
}
crtc->driver_private = g_new0 (MetaCRTCKms, 1);
crtc->driver_private = g_new0 (MetaCrtcKms, 1);
crtc->driver_notify = (GDestroyNotify) meta_crtc_destroy_notify;
}
@@ -779,7 +810,7 @@ init_output (MetaOutput *output,
output->preferred_mode = NULL;
output->n_modes = connector->count_modes;
output->modes = g_new0 (MetaMonitorMode *, output->n_modes);
output->modes = g_new0 (MetaCrtcMode *, output->n_modes);
for (i = 0; i < output->n_modes; i++) {
output->modes[i] = find_meta_mode (manager, &connector->modes[i]);
if (connector->modes[i].type & DRM_MODE_TYPE_PREFERRED)
@@ -799,7 +830,7 @@ init_output (MetaOutput *output,
if (output_kms->has_scaling)
add_common_modes (manager, output);
qsort (output->modes, output->n_modes, sizeof (MetaMonitorMode *), compare_modes);
qsort (output->modes, output->n_modes, sizeof (MetaCrtcMode *), compare_modes);
output_kms->n_encoders = connector->count_encoders;
output_kms->encoders = g_new0 (drmModeEncoderPtr, output_kms->n_encoders);
@@ -823,13 +854,13 @@ init_output (MetaOutput *output,
output_kms->current_encoder = output_kms->encoders[i];
}
crtcs = g_array_new (FALSE, FALSE, sizeof (MetaCRTC*));
crtcs = g_array_new (FALSE, FALSE, sizeof (MetaCrtc*));
for (i = 0; i < manager->n_crtcs; i++)
{
if (crtc_mask & (1 << i))
{
MetaCRTC *crtc = &manager->crtcs[i];
MetaCrtc *crtc = &manager->crtcs[i];
g_array_append_val (crtcs, crtc);
}
}
@@ -868,7 +899,22 @@ init_output (MetaOutput *output,
output->suggested_y = output_kms->suggested_y;
output->hotplug_mode_update = output_kms->hotplug_mode_update;
edid = read_output_edid (manager_kms, output);
if (output_kms->edid_blob_id != 0)
{
GError *error = NULL;
edid = read_output_edid (manager_kms, output, &error);
if (!edid)
{
g_warning ("Failed to read EDID: %s", error->message);
g_error_free (error);
}
}
else
{
edid = NULL;
}
meta_output_parse_edid (output, edid);
g_bytes_unref (edid);
@@ -1033,13 +1079,13 @@ init_modes (MetaMonitorManager *manager,
}
manager->n_modes = g_hash_table_size (modes) + G_N_ELEMENTS (meta_default_drm_mode_infos);
manager->modes = g_new0 (MetaMonitorMode, manager->n_modes);
manager->modes = g_new0 (MetaCrtcMode, manager->n_modes);
g_hash_table_iter_init (&iter, modes);
mode_id = 0;
while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &drm_mode))
{
MetaMonitorMode *mode;
MetaCrtcMode *mode;
mode = &manager->modes[mode_id];
init_mode (mode, drm_mode, (long) mode_id);
@@ -1051,7 +1097,7 @@ init_modes (MetaMonitorManager *manager,
for (i = 0; i < G_N_ELEMENTS (meta_default_drm_mode_infos); i++)
{
MetaMonitorMode *mode;
MetaCrtcMode *mode;
mode = &manager->modes[mode_id];
init_mode (mode, &meta_default_drm_mode_infos[i], (long) mode_id);
@@ -1068,12 +1114,12 @@ init_crtcs (MetaMonitorManager *manager,
unsigned int i;
manager->n_crtcs = resources->count_crtcs;
manager->crtcs = g_new0 (MetaCRTC, manager->n_crtcs);
manager->crtcs = g_new0 (MetaCrtc, manager->n_crtcs);
for (i = 0; i < (unsigned)resources->count_crtcs; i++)
{
drmModeCrtc *drm_crtc;
MetaCRTC *crtc;
MetaCrtc *crtc;
drm_crtc = drmModeGetCrtc (manager_kms->fd, resources->crtcs[i]);
@@ -1132,31 +1178,13 @@ init_outputs (MetaMonitorManager *manager,
detect_and_setup_output_clones (manager, resources);
}
static void
calculate_screen_size (MetaMonitorManager *manager)
{
unsigned int i;
int width = 0, height = 0;
for (i = 0; i < manager->n_crtcs; i++)
{
MetaCRTC *crtc = &manager->crtcs[i];
width = MAX (width, crtc->rect.x + crtc->rect.width);
height = MAX (height, crtc->rect.y + crtc->rect.height);
}
manager->screen_width = width;
manager->screen_height = height;
}
static void
meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
{
MetaMonitorManagerKms *manager_kms = META_MONITOR_MANAGER_KMS (manager);
drmModeRes *resources;
resources = drmModeGetResources(manager_kms->fd);
resources = drmModeGetResources (manager_kms->fd);
/* TODO: max screen width only matters for stage views is not enabled. */
manager->max_screen_width = resources->max_width;
@@ -1175,8 +1203,6 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
init_crtcs (manager, resources);
init_outputs (manager, resources);
calculate_screen_size (manager);
drmModeFreeResources (resources);
}
@@ -1184,9 +1210,24 @@ static GBytes *
meta_monitor_manager_kms_read_edid (MetaMonitorManager *manager,
MetaOutput *output)
{
MetaOutputKms *output_kms = output->driver_private;
MetaMonitorManagerKms *manager_kms = META_MONITOR_MANAGER_KMS (manager);
GError *error = NULL;
GBytes *edid;
return read_output_edid (manager_kms, output);
if (output_kms->edid_blob_id == 0)
return NULL;
edid = read_output_edid (manager_kms, output, &error);
if (!edid)
{
g_warning ("Failed to read EDID from '%s': %s",
output->name, error->message);
g_error_free (error);
return NULL;
}
return edid;
}
static void
@@ -1216,21 +1257,21 @@ meta_monitor_manager_kms_set_power_save_mode (MetaMonitorManager *manager,
for (i = 0; i < manager->n_outputs; i++)
{
MetaOutput *meta_output;
MetaOutput *output;
MetaOutputKms *output_kms;
meta_output = &manager->outputs[i];
output_kms = meta_output->driver_private;
output = &manager->outputs[i];
output_kms = output->driver_private;
if (output_kms->dpms_prop_id != 0)
{
int ok = drmModeObjectSetProperty (manager_kms->fd, meta_output->winsys_id,
int ok = drmModeObjectSetProperty (manager_kms->fd, output->winsys_id,
DRM_MODE_OBJECT_CONNECTOR,
output_kms->dpms_prop_id, state);
if (ok < 0)
meta_warning ("Failed to set power save mode for output %s: %s\n",
meta_output->name, strerror (errno));
output->name, strerror (errno));
}
}
}
@@ -1242,8 +1283,8 @@ set_underscan (MetaMonitorManagerKms *manager_kms,
if (!output->crtc)
return;
MetaCRTC *crtc = output->crtc;
MetaCRTCKms *crtc_kms = crtc->driver_private;
MetaCrtc *crtc = output->crtc;
MetaCrtcKms *crtc_kms = crtc->driver_private;
if (!crtc_kms->underscan_prop_id)
return;
@@ -1278,22 +1319,33 @@ set_underscan (MetaMonitorManagerKms *manager_kms,
}
static void
meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager,
MetaCRTCInfo **crtcs,
unsigned int n_crtcs,
MetaOutputInfo **outputs,
unsigned int n_outputs)
meta_monitor_manager_kms_ensure_initial_config (MetaMonitorManager *manager)
{
MetaMonitorsConfig *config;
config = meta_monitor_manager_ensure_configured (manager);
if (manager->config_manager)
meta_monitor_manager_update_logical_state (manager, config);
else
meta_monitor_manager_update_logical_state_derived (manager);
}
static void
apply_crtc_assignments (MetaMonitorManager *manager,
MetaCrtcInfo **crtcs,
unsigned int n_crtcs,
MetaOutputInfo **outputs,
unsigned int n_outputs)
{
MetaMonitorManagerKms *manager_kms = META_MONITOR_MANAGER_KMS (manager);
unsigned i;
int screen_width, screen_height;
screen_width = 0; screen_height = 0;
for (i = 0; i < n_crtcs; i++)
{
MetaCRTCInfo *crtc_info = crtcs[i];
MetaCRTC *crtc = crtc_info->crtc;
MetaCRTCKms *crtc_kms = crtc->driver_private;
MetaCrtcInfo *crtc_info = crtcs[i];
MetaCrtc *crtc = crtc_info->crtc;
MetaCrtcKms *crtc_kms = crtc->driver_private;
MetaMonitorTransform hw_transform;
crtc->is_dirty = TRUE;
@@ -1308,7 +1360,7 @@ meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager,
}
else
{
MetaMonitorMode *mode;
MetaCrtcMode *mode;
unsigned int j;
int width, height;
@@ -1325,9 +1377,6 @@ meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager,
height = mode->height;
}
screen_width = MAX (screen_width, crtc_info->x + width);
screen_height = MAX (screen_height, crtc_info->y + height);
crtc->rect.x = crtc_info->x;
crtc->rect.y = crtc_info->y;
crtc->rect.width = width;
@@ -1368,7 +1417,7 @@ meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager,
because they weren't seen in the first loop) */
for (i = 0; i < manager->n_crtcs; i++)
{
MetaCRTC *crtc = &manager->crtcs[i];
MetaCrtc *crtc = &manager->crtcs[i];
crtc->logical_monitor = NULL;
@@ -1411,16 +1460,106 @@ meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager,
output->crtc = NULL;
output->is_primary = FALSE;
}
}
static void
update_screen_size (MetaMonitorManager *manager,
MetaMonitorsConfig *config)
{
GList *l;
int screen_width = 0;
int screen_height = 0;
for (l = config->logical_monitor_configs; l; l = l->next)
{
MetaLogicalMonitorConfig *logical_monitor_config = l->data;
int right_edge;
int bottom_edge;
right_edge = (logical_monitor_config->layout.width +
logical_monitor_config->layout.x);
if (right_edge > screen_width)
screen_width = right_edge;
bottom_edge = (logical_monitor_config->layout.height +
logical_monitor_config->layout.y);
if (bottom_edge > screen_height)
screen_height = bottom_edge;
}
manager->screen_width = screen_width;
manager->screen_height = screen_height;
}
static gboolean
meta_monitor_manager_kms_apply_monitors_config (MetaMonitorManager *manager,
MetaMonitorsConfig *config,
GError **error)
{
GPtrArray *crtc_infos;
GPtrArray *output_infos;
if (!config)
{
manager->screen_width = 0;
manager->screen_height = 0;
return TRUE;
}
if (!meta_monitor_config_manager_assign (manager, config,
&crtc_infos, &output_infos,
error))
return FALSE;
apply_crtc_assignments (manager,
(MetaCrtcInfo **) crtc_infos->pdata,
crtc_infos->len,
(MetaOutputInfo **) output_infos->pdata,
output_infos->len);
g_ptr_array_free (crtc_infos, TRUE);
g_ptr_array_free (output_infos, TRUE);
update_screen_size (manager, config);
meta_monitor_manager_rebuild (manager, config);
return TRUE;
}
static void
legacy_calculate_screen_size (MetaMonitorManager *manager)
{
unsigned int i;
int width = 0, height = 0;
for (i = 0; i < manager->n_crtcs; i++)
{
MetaCrtc *crtc = &manager->crtcs[i];
width = MAX (width, crtc->rect.x + crtc->rect.width);
height = MAX (height, crtc->rect.y + crtc->rect.height);
}
manager->screen_width = width;
manager->screen_height = height;
}
static void
meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager,
MetaCrtcInfo **crtcs,
unsigned int n_crtcs,
MetaOutputInfo **outputs,
unsigned int n_outputs)
{
apply_crtc_assignments (manager, crtcs, n_crtcs, outputs, n_outputs);
legacy_calculate_screen_size (manager);
meta_monitor_manager_rebuild_derived (manager);
}
static void
meta_monitor_manager_kms_get_crtc_gamma (MetaMonitorManager *manager,
MetaCRTC *crtc,
MetaCrtc *crtc,
gsize *size,
unsigned short **red,
unsigned short **green,
@@ -1443,7 +1582,7 @@ meta_monitor_manager_kms_get_crtc_gamma (MetaMonitorManager *manager,
static void
meta_monitor_manager_kms_set_crtc_gamma (MetaMonitorManager *manager,
MetaCRTC *crtc,
MetaCrtc *crtc,
gsize size,
unsigned short *red,
unsigned short *green,
@@ -1454,6 +1593,114 @@ meta_monitor_manager_kms_set_crtc_gamma (MetaMonitorManager *manager,
drmModeCrtcSetGamma (manager_kms->fd, crtc->crtc_id, size, red, green, blue);
}
static gboolean
has_pending_edid_blob (MetaMonitorManagerKms *manager_kms)
{
drmModeRes *resources;
int n_connectors;
int i, j;
gboolean edid_blob_pending;
resources = drmModeGetResources (manager_kms->fd);
n_connectors = resources->count_connectors;
edid_blob_pending = FALSE;
for (i = 0; i < n_connectors; i++)
{
drmModeConnector *drm_connector;
uint32_t edid_blob_id;
drm_connector = drmModeGetConnector (manager_kms->fd,
resources->connectors[i]);
edid_blob_id = 0;
for (j = 0; j < drm_connector->count_props; j++)
{
drmModePropertyPtr prop;
prop = drmModeGetProperty (manager_kms->fd, drm_connector->props[j]);
if (prop->flags & DRM_MODE_PROP_BLOB &&
g_str_equal (prop->name, "EDID"))
edid_blob_id = drm_connector->prop_values[j];
drmModeFreeProperty (prop);
if (edid_blob_id)
break;
}
drmModeFreeConnector (drm_connector);
if (edid_blob_id)
{
GError *error = NULL;
drmModePropertyBlobPtr edid_blob;
edid_blob = read_edid_blob (manager_kms, edid_blob_id, &error);
if (!edid_blob &&
g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
{
edid_blob_pending = TRUE;
g_error_free (error);
}
else if (!edid_blob)
{
g_error_free (error);
}
else
{
drmModeFreePropertyBlob (edid_blob);
}
}
if (edid_blob_pending)
break;
}
drmModeFreeResources (resources);
return edid_blob_pending;
}
static void
handle_hotplug_event (MetaMonitorManager *manager)
{
meta_monitor_manager_read_current_state (manager);
meta_monitor_manager_on_hotplug (manager);
}
static gboolean
handle_hotplug_event_timeout (gpointer user_data)
{
MetaMonitorManager *manager = user_data;
MetaMonitorManagerKms *manager_kms = META_MONITOR_MANAGER_KMS (user_data);
if (!has_pending_edid_blob (manager_kms))
{
handle_hotplug_event (manager);
manager_kms->handle_hotplug_timeout = 0;
return G_SOURCE_REMOVE;
}
manager_kms->read_edid_tries++;
if (manager_kms->read_edid_tries > EDID_MAX_NUM_RETRIES)
{
g_warning ("Tried to read the EDID %d times, "
"but one or more are still missing, continuing without",
manager_kms->read_edid_tries);
handle_hotplug_event (manager);
manager_kms->handle_hotplug_timeout = 0;
return G_SOURCE_REMOVE;
}
return G_SOURCE_CONTINUE;
}
static void
on_uevent (GUdevClient *client,
const char *action,
@@ -1466,9 +1713,29 @@ on_uevent (GUdevClient *client,
if (!g_udev_device_get_property_as_boolean (device, "HOTPLUG"))
return;
meta_monitor_manager_read_current_config (manager);
if (manager_kms->handle_hotplug_timeout)
{
g_source_remove (manager_kms->handle_hotplug_timeout);
manager_kms->handle_hotplug_timeout = 0;
}
meta_monitor_manager_on_hotplug (manager);
/*
* On a hot-plug event, the EDID of one or more connectors might not yet be
* ready at this point, resulting in invalid configuration potentially being
* applied. Avoid this by first checking whether the EDID is ready at this
* point, or otherwise wait a bit and try again.
*/
manager_kms->read_edid_tries = 0;
if (has_pending_edid_blob (manager_kms))
{
manager_kms->handle_hotplug_timeout =
g_timeout_add (EDID_RETRY_TIMEOUT_MS,
handle_hotplug_event_timeout,
manager);
return;
}
handle_hotplug_event (manager);
}
static gboolean
@@ -1527,7 +1794,7 @@ meta_monitor_manager_kms_init (MetaMonitorManagerKms *manager_kms)
static void
get_crtc_connectors (MetaMonitorManager *manager,
MetaCRTC *crtc,
MetaCrtc *crtc,
uint32_t **connectors,
unsigned int *n_connectors)
{
@@ -1548,7 +1815,7 @@ get_crtc_connectors (MetaMonitorManager *manager,
gboolean
meta_monitor_manager_kms_apply_crtc_mode (MetaMonitorManagerKms *manager_kms,
MetaCRTC *crtc,
MetaCrtc *crtc,
int x,
int y,
uint32_t fb_id)
@@ -1594,7 +1861,7 @@ invoke_flip_closure (GClosure *flip_closure)
gboolean
meta_monitor_manager_kms_is_crtc_active (MetaMonitorManagerKms *manager_kms,
MetaCRTC *crtc)
MetaCrtc *crtc)
{
MetaMonitorManager *manager = META_MONITOR_MANAGER (manager_kms);
unsigned int i;
@@ -1623,7 +1890,7 @@ meta_monitor_manager_kms_is_crtc_active (MetaMonitorManagerKms *manager_kms,
gboolean
meta_monitor_manager_kms_flip_crtc (MetaMonitorManagerKms *manager_kms,
MetaCRTC *crtc,
MetaCrtc *crtc,
int x,
int y,
uint32_t fb_id,
@@ -1734,6 +2001,8 @@ meta_monitor_manager_kms_class_init (MetaMonitorManagerKmsClass *klass)
manager_class->read_current = meta_monitor_manager_kms_read_current;
manager_class->read_edid = meta_monitor_manager_kms_read_edid;
manager_class->ensure_initial_config = meta_monitor_manager_kms_ensure_initial_config;
manager_class->apply_monitors_config = meta_monitor_manager_kms_apply_monitors_config;
manager_class->apply_configuration = meta_monitor_manager_kms_apply_configuration;
manager_class->set_power_save_mode = meta_monitor_manager_kms_set_power_save_mode;
manager_class->get_crtc_gamma = meta_monitor_manager_kms_get_crtc_gamma;
@@ -1742,9 +2011,9 @@ meta_monitor_manager_kms_class_init (MetaMonitorManagerKmsClass *klass)
MetaMonitorTransform
meta_monitor_manager_kms_get_view_transform (MetaMonitorManagerKms *manager,
MetaCRTC *crtc)
MetaCrtc *crtc)
{
MetaCRTCKms *crtc_kms;
MetaCrtcKms *crtc_kms;
crtc_kms = crtc->driver_private;
if ((1 << crtc->transform) & crtc_kms->all_hw_transforms)

View File

@@ -40,16 +40,16 @@ GType meta_monitor_manager_kms_get_type (void);
typedef void (*MetaKmsFlipCallback) (void *user_data);
gboolean meta_monitor_manager_kms_apply_crtc_mode (MetaMonitorManagerKms *manager_kms,
MetaCRTC *crtc,
MetaCrtc *crtc,
int x,
int y,
uint32_t fb_id);
gboolean meta_monitor_manager_kms_is_crtc_active (MetaMonitorManagerKms *manager_kms,
MetaCRTC *crtc);
MetaCrtc *crtc);
gboolean meta_monitor_manager_kms_flip_crtc (MetaMonitorManagerKms *manager_kms,
MetaCRTC *crtc,
MetaCrtc *crtc,
int x,
int y,
uint32_t fb_id,
@@ -60,7 +60,7 @@ void meta_monitor_manager_kms_wait_for_flip (MetaMonitorManagerKms *manager_kms)
MetaMonitorTransform
meta_monitor_manager_kms_get_view_transform (MetaMonitorManagerKms *manager,
MetaCRTC *crtc);
MetaCrtc *crtc);
#endif /* META_MONITOR_MANAGER_KMS_H */

View File

@@ -50,6 +50,7 @@
#include "backends/meta-backend-private.h"
#include "backends/meta-egl.h"
#include "backends/meta-egl-ext.h"
#include "backends/meta-logical-monitor.h"
#include "backends/meta-renderer-view.h"
#include "backends/native/meta-monitor-manager-kms.h"
#include "backends/native/meta-renderer-native.h"
@@ -564,7 +565,7 @@ flip_egl_stream (MetaRendererNative *renderer_native,
static void
meta_onscreen_native_flip_crtc (MetaOnscreenNative *onscreen_native,
GClosure *flip_closure,
MetaCRTC *crtc,
MetaCrtc *crtc,
int x,
int y,
gboolean *fb_in_use)
@@ -617,7 +618,7 @@ meta_onscreen_native_set_crtc_modes (MetaOnscreenNative *onscreen_native)
META_MONITOR_MANAGER_KMS (monitor_manager);
MetaRendererView *view = onscreen_native->view;
uint32_t fb_id = 0;
MetaMonitorInfo *monitor_info;
MetaLogicalMonitor *logical_monitor;
switch (renderer_native->mode)
{
@@ -633,18 +634,18 @@ meta_onscreen_native_set_crtc_modes (MetaOnscreenNative *onscreen_native)
g_assert (fb_id != 0);
monitor_info = meta_renderer_view_get_monitor_info (view);
if (monitor_info)
logical_monitor = meta_renderer_view_get_logical_monitor (view);
if (logical_monitor)
{
unsigned int i;
for (i = 0; i < monitor_manager->n_crtcs; i++)
{
MetaCRTC *crtc = &monitor_manager->crtcs[i];
int x = crtc->rect.x - monitor_info->rect.x;
int y = crtc->rect.y - monitor_info->rect.y;
MetaCrtc *crtc = &monitor_manager->crtcs[i];
int x = crtc->rect.x - logical_monitor->rect.x;
int y = crtc->rect.y - logical_monitor->rect.y;
if (crtc->logical_monitor != monitor_info)
if (crtc->logical_monitor != logical_monitor)
continue;
meta_monitor_manager_kms_apply_crtc_mode (monitor_manager_kms,
@@ -659,7 +660,7 @@ meta_onscreen_native_set_crtc_modes (MetaOnscreenNative *onscreen_native)
for (i = 0; i < monitor_manager->n_crtcs; i++)
{
MetaCRTC *crtc = &monitor_manager->crtcs[i];
MetaCrtc *crtc = &monitor_manager->crtcs[i];
meta_monitor_manager_kms_apply_crtc_mode (monitor_manager_kms,
crtc,
@@ -679,7 +680,7 @@ meta_onscreen_native_flip_crtcs (CoglOnscreen *onscreen)
meta_backend_get_monitor_manager (backend);
MetaRendererView *view = onscreen_native->view;
GClosure *flip_closure;
MetaMonitorInfo *monitor_info;
MetaLogicalMonitor *logical_monitor;
gboolean fb_in_use = FALSE;
/*
@@ -700,18 +701,18 @@ meta_onscreen_native_flip_crtcs (CoglOnscreen *onscreen)
/* Either flip the CRTC's of the monitor info, if we are drawing just part
* of the stage, or all of the CRTC's if we are drawing the whole stage.
*/
monitor_info = meta_renderer_view_get_monitor_info (view);
if (monitor_info)
logical_monitor = meta_renderer_view_get_logical_monitor (view);
if (logical_monitor)
{
unsigned int i;
for (i = 0; i < monitor_manager->n_crtcs; i++)
{
MetaCRTC *crtc = &monitor_manager->crtcs[i];
int x = crtc->rect.x - monitor_info->rect.x;
int y = crtc->rect.y - monitor_info->rect.y;
MetaCrtc *crtc = &monitor_manager->crtcs[i];
int x = crtc->rect.x - logical_monitor->rect.x;
int y = crtc->rect.y - logical_monitor->rect.y;
if (crtc->logical_monitor != monitor_info)
if (crtc->logical_monitor != logical_monitor)
continue;
meta_onscreen_native_flip_crtc (onscreen_native, flip_closure,
@@ -725,7 +726,7 @@ meta_onscreen_native_flip_crtcs (CoglOnscreen *onscreen)
for (i = 0; i < monitor_manager->n_crtcs; i++)
{
MetaCRTC *crtc = &monitor_manager->crtcs[i];
MetaCrtc *crtc = &monitor_manager->crtcs[i];
meta_onscreen_native_flip_crtc (onscreen_native, flip_closure,
crtc, crtc->rect.x, crtc->rect.y,
@@ -951,7 +952,7 @@ meta_renderer_native_create_surface_gbm (MetaRendererNative *renderer_native,
#ifdef HAVE_EGL_DEVICE
static gboolean
meta_renderer_native_create_surface_egl_device (MetaRendererNative *renderer_native,
MetaMonitorInfo *monitor_info,
MetaLogicalMonitor *logical_monitor,
int width,
int height,
EGLStreamKHR *out_egl_stream,
@@ -967,25 +968,17 @@ meta_renderer_native_create_surface_egl_device (MetaRendererNative *renderer_nat
CoglRenderer *cogl_renderer = cogl_display->renderer;
CoglRendererEGL *egl_renderer = cogl_renderer->winsys;
EGLDisplay egl_display = egl_renderer->edpy;
MetaMonitor *monitor;
MetaOutput *output;
EGLConfig egl_config;
EGLStreamKHR egl_stream;
EGLSurface egl_surface;
EGLint num_layers;
EGLOutputLayerEXT output_layer;
EGLAttrib output_attribs[] = {
/*
* An "monitor_info" may have multiple outputs/crtcs in case its tiled,
* but as far as I can tell, EGL only allows you to pass one crtc_id, so
* lets pass the first one.
*/
EGL_DRM_CRTC_EXT, monitor_info->outputs[0]->crtc->crtc_id,
EGL_NONE,
};
EGLAttrib output_attribs[3];
EGLint stream_attribs[] = {
EGL_STREAM_FIFO_LENGTH_KHR, 1,
#ifdef EGL_EXT_stream_acquire_mode
EGL_CONSUMER_AUTO_ACQUIRE_EXT, EGL_FALSE,
#endif
EGL_NONE
};
EGLint stream_producer_attribs[] = {
@@ -998,6 +991,18 @@ meta_renderer_native_create_surface_egl_device (MetaRendererNative *renderer_nat
if (egl_stream == EGL_NO_STREAM_KHR)
return FALSE;
monitor = meta_logical_monitor_get_monitors (logical_monitor)->data;
output = meta_monitor_get_main_output (monitor);
/*
* An "logical_monitor" may have multiple outputs/crtcs in case its tiled,
* but as far as I can tell, EGL only allows you to pass one crtc_id, so
* lets pass the first one.
*/
output_attribs[0] = EGL_DRM_CRTC_EXT;
output_attribs[1] = output->crtc->crtc_id;
output_attribs[2] = EGL_NONE;
if (!meta_egl_get_output_layers (egl, egl_display,
output_attribs,
&output_layer, 1, &num_layers,
@@ -1224,7 +1229,7 @@ meta_onscreen_native_allocate (CoglOnscreen *onscreen,
int height;
#ifdef HAVE_EGL_DEVICE
MetaRendererView *view;
MetaMonitorInfo *monitor_info;
MetaLogicalMonitor *logical_monitor;
EGLStreamKHR egl_stream;
#endif
@@ -1260,9 +1265,9 @@ meta_onscreen_native_allocate (CoglOnscreen *onscreen,
return FALSE;
view = onscreen_native->view;
monitor_info = meta_renderer_view_get_monitor_info (view);
logical_monitor = meta_renderer_view_get_logical_monitor (view);
if (!meta_renderer_native_create_surface_egl_device (renderer_native,
monitor_info,
logical_monitor,
width, height,
&egl_stream,
&egl_surface,
@@ -1387,19 +1392,22 @@ meta_renderer_native_queue_modes_reset (MetaRendererNative *renderer_native)
}
static MetaMonitorTransform
meta_renderer_native_get_monitor_info_transform (MetaRenderer *renderer,
MetaMonitorInfo *monitor_info)
meta_renderer_native_get_logical_monitor_transform (MetaRenderer *renderer,
MetaLogicalMonitor *logical_monitor)
{
MetaBackend *backend = meta_get_backend ();
MetaMonitorManager *monitor_manager =
meta_backend_get_monitor_manager (backend);
MetaMonitorManagerKms *monitor_manager_kms =
META_MONITOR_MANAGER_KMS (monitor_manager);
MetaMonitor *monitor;
MetaOutput *output;
g_assert (monitor_info->n_outputs > 0);
monitor = meta_logical_monitor_get_monitors (logical_monitor)->data;
output = meta_monitor_get_main_output (monitor);
return meta_monitor_manager_kms_get_view_transform (monitor_manager_kms,
monitor_info->outputs[0]->crtc);
output->crtc);
}
static CoglOnscreen *
@@ -1675,8 +1683,8 @@ meta_renderer_native_create_legacy_view (MetaRendererNative *renderer_native)
}
static MetaRendererView *
meta_renderer_native_create_view (MetaRenderer *renderer,
MetaMonitorInfo *monitor_info)
meta_renderer_native_create_view (MetaRenderer *renderer,
MetaLogicalMonitor *logical_monitor)
{
MetaBackend *backend = meta_get_backend ();
ClutterBackend *clutter_backend = meta_backend_get_clutter_backend (backend);
@@ -1690,14 +1698,14 @@ meta_renderer_native_create_view (MetaRenderer *renderer,
MetaRendererView *view;
GError *error = NULL;
transform = meta_renderer_native_get_monitor_info_transform (renderer,
monitor_info);
transform = meta_renderer_native_get_logical_monitor_transform (renderer,
logical_monitor);
onscreen = meta_renderer_native_create_onscreen (META_RENDERER_NATIVE (renderer),
cogl_context,
transform,
monitor_info->rect.width,
monitor_info->rect.height);
logical_monitor->rect.width,
logical_monitor->rect.height);
if (!onscreen)
meta_fatal ("Failed to allocate onscreen framebuffer\n");
@@ -1706,17 +1714,17 @@ meta_renderer_native_create_view (MetaRenderer *renderer,
offscreen = meta_renderer_native_create_offscreen (META_RENDERER_NATIVE (renderer),
cogl_context,
transform,
monitor_info->rect.width,
monitor_info->rect.height);
logical_monitor->rect.width,
logical_monitor->rect.height);
if (!offscreen)
meta_fatal ("Failed to allocate back buffer texture\n");
}
view = g_object_new (META_TYPE_RENDERER_VIEW,
"layout", &monitor_info->rect,
"layout", &logical_monitor->rect,
"framebuffer", onscreen,
"offscreen", offscreen,
"monitor-info", monitor_info,
"logical-monitor", logical_monitor,
"transform", transform,
NULL);
g_clear_pointer (&offscreen, cogl_object_unref);

View File

@@ -0,0 +1,411 @@
/*
* Copyright (C) 2017 Red Hat
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#include "config.h"
#include "backends/x11/cm/meta-backend-x11-cm.h"
#include <stdlib.h>
#include <X11/XKBlib.h>
#include <X11/extensions/XKBrules.h>
#include <xkbcommon/xkbcommon-x11.h>
#include "backends/meta-backend-private.h"
#include "backends/x11/meta-cursor-renderer-x11.h"
#include "backends/x11/meta-monitor-manager-xrandr.h"
struct _MetaBackendX11Cm
{
MetaBackendX11 parent;
char *keymap_layouts;
char *keymap_variants;
char *keymap_options;
int locked_group;
};
G_DEFINE_TYPE (MetaBackendX11Cm, meta_backend_x11_cm, META_TYPE_BACKEND_X11)
static void
apply_keymap (MetaBackendX11 *x11);
static void
take_touch_grab (MetaBackend *backend)
{
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
Display *xdisplay = meta_backend_x11_get_xdisplay (x11);
unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 };
XIEventMask mask = { META_VIRTUAL_CORE_POINTER_ID, sizeof (mask_bits), mask_bits };
XIGrabModifiers mods = { XIAnyModifier, 0 };
XISetMask (mask.mask, XI_TouchBegin);
XISetMask (mask.mask, XI_TouchUpdate);
XISetMask (mask.mask, XI_TouchEnd);
XIGrabTouchBegin (xdisplay, META_VIRTUAL_CORE_POINTER_ID,
DefaultRootWindow (xdisplay),
False, &mask, 1, &mods);
}
static void
on_device_added (ClutterDeviceManager *device_manager,
ClutterInputDevice *device,
gpointer user_data)
{
MetaBackendX11 *x11 = META_BACKEND_X11 (user_data);
if (clutter_input_device_get_device_type (device) == CLUTTER_KEYBOARD_DEVICE)
apply_keymap (x11);
}
static void
meta_backend_x11_cm_post_init (MetaBackend *backend)
{
MetaBackendClass *parent_backend_class =
META_BACKEND_CLASS (meta_backend_x11_cm_parent_class);
parent_backend_class->post_init (backend);
g_signal_connect_object (clutter_device_manager_get_default (),
"device-added",
G_CALLBACK (on_device_added), backend, 0);
take_touch_grab (backend);
}
static MetaMonitorManager *
meta_backend_x11_cm_create_monitor_manager (MetaBackend *backend)
{
return g_object_new (META_TYPE_MONITOR_MANAGER_XRANDR, NULL);
}
static MetaCursorRenderer *
meta_backend_x11_cm_create_cursor_renderer (MetaBackend *backend)
{
return g_object_new (META_TYPE_CURSOR_RENDERER_X11, NULL);
}
static void
meta_backend_x11_cm_update_screen_size (MetaBackend *backend,
int width,
int height)
{
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
Display *xdisplay = meta_backend_x11_get_xdisplay (x11);
Window xwin = meta_backend_x11_get_xwindow (x11);
XResizeWindow (xdisplay, xwin, width, height);
}
static void
select_xi_stage (MetaBackend *backend,
gboolean include_motion)
{
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
Display *xdisplay = meta_backend_x11_get_xdisplay (x11);
Window xwin = meta_backend_x11_get_xwindow (x11);
unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 };
XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits };
XISetMask (mask.mask, XI_KeyPress);
XISetMask (mask.mask, XI_KeyRelease);
XISetMask (mask.mask, XI_ButtonPress);
XISetMask (mask.mask, XI_ButtonRelease);
XISetMask (mask.mask, XI_Enter);
XISetMask (mask.mask, XI_Leave);
XISetMask (mask.mask, XI_FocusIn);
XISetMask (mask.mask, XI_FocusOut);
XISetMask (mask.mask, XI_Motion);
if (include_motion)
XISetMask (mask.mask, XI_RawMotion);
XISelectEvents (xdisplay, xwin, &mask, 1);
}
static void
meta_backend_x11_cm_select_stage_events (MetaBackend *backend)
{
select_xi_stage (backend, FALSE);
}
static void
meta_backend_x11_cm_track_position (MetaBackend *x11, gboolean enabled)
{
select_xi_stage (backend, enabled);
}
static void
get_xkbrf_var_defs (Display *xdisplay,
const char *layouts,
const char *variants,
const char *options,
char **rules_p,
XkbRF_VarDefsRec *var_defs)
{
char *rules = NULL;
/* Get it from the X property or fallback on defaults */
if (!XkbRF_GetNamesProp (xdisplay, &rules, var_defs) || !rules)
{
rules = strdup (DEFAULT_XKB_RULES_FILE);
var_defs->model = strdup (DEFAULT_XKB_MODEL);
var_defs->layout = NULL;
var_defs->variant = NULL;
var_defs->options = NULL;
}
/* Swap in our new options... */
free (var_defs->layout);
var_defs->layout = strdup (layouts);
free (var_defs->variant);
var_defs->variant = strdup (variants);
free (var_defs->options);
var_defs->options = strdup (options);
/* Sometimes, the property is a file path, and sometimes it's
not. Normalize it so it's always a file path. */
if (rules[0] == '/')
*rules_p = g_strdup (rules);
else
*rules_p = g_build_filename (XKB_BASE, "rules", rules, NULL);
free (rules);
}
static void
free_xkbrf_var_defs (XkbRF_VarDefsRec *var_defs)
{
free (var_defs->model);
free (var_defs->layout);
free (var_defs->variant);
free (var_defs->options);
}
static void
free_xkb_component_names (XkbComponentNamesRec *p)
{
free (p->keymap);
free (p->keycodes);
free (p->types);
free (p->compat);
free (p->symbols);
free (p->geometry);
}
static void
upload_xkb_description (Display *xdisplay,
const gchar *rules_file_path,
XkbRF_VarDefsRec *var_defs,
XkbComponentNamesRec *comp_names)
{
XkbDescRec *xkb_desc;
gchar *rules_file;
/* Upload it to the X server using the same method as setxkbmap */
xkb_desc = XkbGetKeyboardByName (xdisplay,
XkbUseCoreKbd,
comp_names,
XkbGBN_AllComponentsMask,
XkbGBN_AllComponentsMask &
(~XkbGBN_GeometryMask), True);
if (!xkb_desc)
{
g_warning ("Couldn't upload new XKB keyboard description");
return;
}
XkbFreeKeyboard (xkb_desc, 0, True);
rules_file = g_path_get_basename (rules_file_path);
if (!XkbRF_SetNamesProp (xdisplay, rules_file, var_defs))
g_warning ("Couldn't update the XKB root window property");
g_free (rules_file);
}
static void
apply_keymap (MetaBackendX11 *x11)
{
MetaBackendX11Cm *x11_cm = META_BACKEND_X11_CM (x11);
Display *xdisplay = meta_backend_x11_get_xdisplay (x11);
XkbRF_RulesRec *xkb_rules;
XkbRF_VarDefsRec xkb_var_defs = { 0 };
char *rules_file_path;
if (!x11_cm->keymap_layouts ||
!x11_cm->keymap_variants ||
!x11_cm->keymap_options)
return;
get_xkbrf_var_defs (xdisplay,
x11_cm->keymap_layouts,
x11_cm->keymap_variants,
x11_cm->keymap_options,
&rules_file_path,
&xkb_var_defs);
xkb_rules = XkbRF_Load (rules_file_path, NULL, True, True);
if (xkb_rules)
{
XkbComponentNamesRec xkb_comp_names = { 0 };
XkbRF_GetComponents (xkb_rules, &xkb_var_defs, &xkb_comp_names);
upload_xkb_description (xdisplay, rules_file_path, &xkb_var_defs, &xkb_comp_names);
free_xkb_component_names (&xkb_comp_names);
XkbRF_Free (xkb_rules, True);
}
else
{
g_warning ("Couldn't load XKB rules");
}
free_xkbrf_var_defs (&xkb_var_defs);
g_free (rules_file_path);
}
static void
meta_backend_x11_cm_set_keymap (MetaBackend *backend,
const char *layouts,
const char *variants,
const char *options)
{
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
MetaBackendX11Cm *x11_cm = META_BACKEND_X11_CM (x11);
g_free (x11_cm->keymap_layouts);
x11_cm->keymap_layouts = g_strdup (layouts);
g_free (x11_cm->keymap_variants);
x11_cm->keymap_variants = g_strdup (variants);
g_free (x11_cm->keymap_options);
x11_cm->keymap_options = g_strdup (options);
apply_keymap (x11);
}
static void
meta_backend_x11_cm_lock_layout_group (MetaBackend *backend,
guint idx)
{
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
MetaBackendX11Cm *x11_cm = META_BACKEND_X11_CM (x11);
Display *xdisplay = meta_backend_x11_get_xdisplay (x11);
x11_cm->locked_group = idx;
XkbLockGroup (xdisplay, XkbUseCoreKbd, idx);
}
static gboolean
meta_backend_x11_cm_handle_host_xevent (MetaBackendX11 *backend_x11,
XEvent *event)
{
MetaBackend *backend = META_BACKEND (backend_x11);
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
MetaBackendX11Cm *x11_cm = META_BACKEND_X11_CM (x11);
MetaMonitorManager *monitor_manager =
meta_backend_get_monitor_manager (backend);
MetaMonitorManagerXrandr *monitor_manager_xrandr =
META_MONITOR_MANAGER_XRANDR (monitor_manager);
Display *xdisplay = meta_backend_x11_get_xdisplay (x11);
if (event->type == meta_backend_x11_get_xkb_event_base (x11))
{
XkbEvent *xkb_ev = (XkbEvent *) event;
if (xkb_ev->any.device == META_VIRTUAL_CORE_KEYBOARD_ID)
{
switch (xkb_ev->any.xkb_type)
{
case XkbStateNotify:
if (xkb_ev->state.changed & XkbGroupLockMask)
{
if (x11_cm->locked_group != xkb_ev->state.locked_group)
XkbLockGroup (xdisplay, XkbUseCoreKbd,
x11_cm->locked_group);
}
break;
default:
break;
}
}
}
return meta_monitor_manager_xrandr_handle_xevent (monitor_manager_xrandr,
event);
}
static void
meta_backend_x11_cm_translate_device_event (MetaBackendX11 *x11,
XIDeviceEvent *device_event)
{
Window stage_window = meta_backend_x11_get_xwindow (x11);
if (device_event->event != stage_window)
{
device_event->event = stage_window;
/* As an X11 compositor, the stage window is always at 0,0, so
* using root coordinates will give us correct stage coordinates
* as well... */
device_event->event_x = device_event->root_x;
device_event->event_y = device_event->root_y;
}
}
static void
meta_backend_x11_cm_translate_crossing_event (MetaBackendX11 *x11,
XIEnterEvent *enter_event)
{
Window stage_window = meta_backend_x11_get_xwindow (x11);
if (enter_event->event != stage_window)
{
enter_event->event = stage_window;
enter_event->event_x = enter_event->root_x;
enter_event->event_y = enter_event->root_y;
}
}
static void
meta_backend_x11_cm_init (MetaBackendX11Cm *backend_x11_cm)
{
}
static void
meta_backend_x11_cm_class_init (MetaBackendX11CmClass *klass)
{
MetaBackendClass *backend_class = META_BACKEND_CLASS (klass);
MetaBackendX11Class *backend_x11_class = META_BACKEND_X11_CLASS (klass);
backend_class->post_init = meta_backend_x11_cm_post_init;
backend_class->create_monitor_manager = meta_backend_x11_cm_create_monitor_manager;
backend_class->create_cursor_renderer = meta_backend_x11_cm_create_cursor_renderer;
backend_class->update_screen_size = meta_backend_x11_cm_update_screen_size;
backend_class->select_stage_events = meta_backend_x11_cm_select_stage_events;
backend_class->lock_layout_group = meta_backend_x11_cm_lock_layout_group;
backend_class->set_keymap = meta_backend_x11_cm_set_keymap;
backend_class->track_position = meta_backend_x11_cm_track_position;
backend_x11_class->handle_host_xevent = meta_backend_x11_cm_handle_host_xevent;
backend_x11_class->translate_device_event = meta_backend_x11_cm_translate_device_event;
backend_x11_class->translate_crossing_event = meta_backend_x11_cm_translate_crossing_event;
}

View File

@@ -0,0 +1,31 @@
/*
* Copyright (C) 2017 Red Hat
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef META_BACKEND_X11_CM_H
#define META_BACKEND_X11_CM_H
#include <glib-object.h>
#include "backends/x11/meta-backend-x11.h"
#define META_TYPE_BACKEND_X11_CM (meta_backend_x11_cm_get_type ())
G_DECLARE_FINAL_TYPE (MetaBackendX11Cm, meta_backend_x11_cm,
META, BACKEND_X11_CM, MetaBackendX11)
#endif /* META_BACKEND_X11_CM_H */

Some files were not shown because too many files have changed in this diff Show More