Compare commits

...

232 Commits

Author SHA1 Message Date
25fd9e005b Fix cursor size update on non-wayland 2017-08-28 10:50:44 +08:00
114bfc04ef Move workspace related code from MetaDisplay to MetaWorkspaceManager 2017-08-28 10:50:44 +08:00
26dde9dfe0 Add MetaWorkspaceManager skeleton 2017-08-28 10:50:44 +08:00
25c9ce2dad Rename errors.[ch] to meta-x11-errors.[ch]
Also rename meta_error_trap_* to meta_x11_error_trap_* and
move meta-x11-errors.c to src/x11
2017-08-28 10:50:44 +08:00
7d2ef2d821 Add --no-x11 flag so mutter wayland can be started without X11 2017-08-28 10:50:44 +08:00
1838ec08a2 Use MetaMonitorManager insted of MetaDisplay where possible
This drops display's monitors-changed signal and makes all
the code rely on MetaMonitorManager.
2017-08-28 10:50:44 +08:00
9a405fb943 Fix XDND handling to work without GDK and MetaX11Display
This fixes mutter --nested --wayland without X11
2017-08-28 10:50:44 +08:00
7515c80d7a Split GDK initialization from MetaUI
Get rid of the deprecated gdk_display_get_default_screen ()
2017-08-28 10:50:44 +08:00
6ff46b5f64 Don't use gtk_settings callback to set shell_shows_app_menu
GTK+ won't be initialized if X11 is not available

Instead, when setting gtk-shell-shows-app-menu,
meta_prefs_set_show_fallback_app_menu should be
called as well.
2017-08-28 10:50:44 +08:00
703f05f6e3 Make stack tracker work without X11 2017-08-28 10:50:44 +08:00
d2c2fe6e09 Move workarea hint setting to MetaX11Display 2017-08-28 10:50:44 +08:00
e2c02c6014 Make bell and libstartup-notification bits work without X11 2017-08-28 10:50:44 +08:00
c0e6128182 Make workspace management work without X11 2017-08-28 10:50:44 +08:00
4c40b7591d Prepare for making MetaX11Display conditional
- Stop using CurrentTime, introduce META_CURRENT_TIME
- Add signals for signaling when MetaX11Display is opened
  or closed down
- Use g_get_monotonic_time () instead of relying on an
  X server running and making roundtrip to it
2017-08-28 10:50:44 +08:00
6c0e889a85 Get rid of MetaScreen 2017-08-28 10:50:44 +08:00
046712a28b Stop using MetaScreen where it is unnecessary 2017-08-28 10:50:44 +08:00
91c9d5182d Move workspace handing to MetaDisplay/MetaX11Display 2017-08-28 10:50:44 +08:00
e0105ee425 Move UI and key grabs to MetaX11Display 2017-08-28 10:50:44 +08:00
773aab96bf Move mouse window tracking to MetaDisplay 2017-08-28 10:50:44 +08:00
f53a605c4f Move xinerama management to MetaX11Display 2017-08-28 10:50:44 +08:00
383f2ed815 Move MetaScreen monitor API to MetaDisplay 2017-08-28 10:50:38 +08:00
38a8559fbe Move rest of non-X11 specific objects from MetaScreen
This moves following objects from MetaScreen to MetaDisplay

- workareas_later and in_fullscreen_later signals and functions
- startup_sequences signals and functions
- tile_preview functions
2017-08-26 21:10:38 +02:00
b24136d0d5 Move X11 event, icon cache and property handling to MetaX11Display 2017-08-26 20:54:39 +02:00
90826dd660 Move X11 helper windows and xprops to MetaX11Display 2017-08-26 20:51:28 +02:00
467a6fa8fc Move stack tracking and guard_window outside of MetaScreen
stack, stack_tracker to MetaDisplay
guard_window to MetaX11Display
2017-08-26 19:03:51 +02:00
3974925819 Move groups and window/group prop hooks to MetaX11Display 2017-08-26 18:58:29 +02:00
b157d34417 Move alarm and xids management to MetaX11Display 2017-08-26 18:56:44 +02:00
a2d13e76cc Move screen size and cursor setting to MetaDisplay
Split X11 specific parts into MetaX11Display
2017-08-26 18:49:51 +02:00
a72a2381de Move X11 extension queries to MetaX11Display
Also split extension queries into their own functions
2017-08-26 18:28:53 +02:00
2d0a1b8179 Switch meta_error_trap functions to MetaX11Display
They are X11 specific functions, used for X11 code. They have been
improved per jadahl's suggestion to use gdk_x11_lookup_xdisplay and
gdk_x11_display_error_trap_* functions, instead of current code.
2017-08-26 18:27:50 +02:00
1d97da1631 Start populating MetaX11Display
- Moved xdisplay, name and various atoms from MetaDisplay
- Moved xroot, screen_name, default_depth and default_xvisual
  from MetaScreen

- Moved some X11 specific functions from screen.c and display.c
  to meta-x11-display.c
2017-08-26 18:26:30 +02:00
88b5580af7 Add MetaX11Display skeleton
Also reorder meta_display_open () and meta_display_close ()
to sort X11 and non-X11 specific members.
2017-08-26 18:24:46 +02:00
98fcd616a3 Update Catalan translation 2017-08-25 13:23:23 +02:00
06d0989014 wayland-dma-buf: Fix 32bpp channel order inversion
Apparently my understanding of Cogl pixel formats, or at least their
use, was somewhat shaky.

Un-invert the inversion of the DRM FourCC -> Cogl pixel format mapping
when creating dmabufs from clients, fixing inverted channel ordering
seen from GL clients, e.g. gold highlights in gtk4-demo when using the
GSK GL backend when they should be blue.

https://bugzilla.gnome.org/show_bug.cgi?id=786677
2017-08-24 15:11:37 +02:00
c248feb3c1 Update Italian translation 2017-08-24 07:45:30 +00:00
3f2c5ca9bd Update Slovak translation 2017-08-23 17:50:59 +00:00
520c56fe53 Update Croatian translation 2017-08-23 15:40:53 +00:00
d3a670b043 Update Galician translation 2017-08-23 10:22:13 +00:00
6eca267eee Update Polish translation 2017-08-23 04:16:46 +02:00
fdefe776d3 Updated Lithuanian translation 2017-08-22 23:18:07 +03:00
bba8776184 Updated Czech translation 2017-08-22 18:48:01 +02:00
e075242801 egl: Don't require eglGetPlatformDisplayEXT
Trying to unilaterally require eglGetPlatformDisplayEXT causes problems in
scenarios where this method is not available. Besides, this should only be
required on Wayland, so we can stop requiring it always and simply let the
eglGetPlatformDisplay() function error accordingly when needed.

https://bugzilla.gnome.org/show_bug.cgi?id=786619
2017-08-22 18:33:13 +02:00
0f9686fb5a Bump version to 3.25.91
Update NEWS.
2017-08-22 00:21:48 +02:00
168479862d meta-background-actor: Unset flags when they are not valid anymore
Currently, the flags that describe what is changed are never unsetted.
Unset each flag just after using them.

https://bugzilla.gnome.org/show_bug.cgi?id=783512
2017-08-21 22:18:28 +02:00
483ed98777 cogl: Only do the swizzling hack for GL contexts
The GL_BGRA definition is not available for GLES2 contexts, which use
the EXT_texture_format_BGRA8888 instead, causing a build failure when
trying to use it in those contexts.

Fortunately, this hack is only relevant for GL, so let's guard it to
prevent the failure in GLES2, where that extension is used instead.

https://bugzilla.gnome.org/show_bug.cgi?id=786568
2017-08-21 16:29:39 +02:00
14fe6e9c95 cursor-renderer-native: Don't use HW cursor on transformed logical monitor
The HW cursor plane can't do any transformations, and as we still don't
pre-transform any buffer before uploading to the cursor plane, we must
disable the HW cursor when a logical monitor is transformed.

This worked previously because the transform of a MetaCrtc did not
correspond to the transform of a CRTC, but the transform of the logical
monitor the CRTC was assigned to.

https://bugzilla.gnome.org/show_bug.cgi?id=786023
2017-08-21 21:20:19 +08:00
6584d06bb5 monitor-manager: Don't cancel confirm dialog on verifying
When another D-Bus call that just tries to verify a configuration is
made, don't cancel any active monitor configuration dialog, as doing so
would effectively confirm queried configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=786023
2017-08-21 21:20:19 +08:00
92a53f08f4 keybindings: Only resolve keysyms for the current layout group
When resolving what keycodes a key binding resolves to, only look up
key codes from the current layout group. Without this, unwanted
overlaps may occur. For example when a keymap has both a dvorak and a
qwerty layout on different layout groups, one keybinding may be bound
on multiple keys, arbitrarily "shadowing" another.

https://bugzilla.gnome.org/show_bug.cgi?id=786408
2017-08-21 21:19:18 +08:00
a81d4aed7a backend/x11: Notify whenever the layout group changes
Will be used to trigger keyboard binding rebuild.

https://bugzilla.gnome.org/show_bug.cgi?id=786408
2017-08-21 21:19:18 +08:00
517488ef67 backends/native: Only emit layout group changed event when changed
Check that the layout group changed before emitting a changed event.
2017-08-21 21:19:18 +08:00
33f1706634 backend: Add API to get layout group
Add API to get the layout group (layout index) currently active. In the
native backend this is done by fetching the state directly from the
evdev backend; on X11 this works by listening for XkbStateNotify
events, caching the layout group value.

https://bugzilla.gnome.org/show_bug.cgi?id=786408
2017-08-21 21:19:18 +08:00
5685449e15 clutter/evdev: Add API to get current layout index
We set the layout index when changing keyboard layout, but have no way
to get it back would so be needed. Add that.

https://bugzilla.gnome.org/show_bug.cgi?id=786408
2017-08-21 21:19:18 +08:00
a6d67b164a x11: Open backend X11 connection ourself
Don't wait for clutter to initialize for connecting to X11; do it when
constructing the backend instance. This way we can later depend on
having an X11 connection earlier during initialization.

https://bugzilla.gnome.org/show_bug.cgi?id=786408
2017-08-21 21:19:18 +08:00
f950380202 monitor-manager-xrandr: Use G_DECLARE_FINAL_TYPE macro
Declare the MetaMonitorManagerXrandr type using the helper macro,
instead of manually.

https://bugzilla.gnome.org/show_bug.cgi?id=786408
2017-08-21 21:19:18 +08:00
a4270fa7ac Update Indonesian translation 2017-08-21 07:33:47 +00:00
35c9280fb6 monitor-manager: Try to restore previous config before regenerating
When opening a laptop lid, one will likely want to restore the
configuration one had prior to closing it, so when ensuring monitor
configuration, first try to see if the previously set configuration is
both complete (all connected monitors are configured) and applicable
(it is a valid configuration) and only try to generate a new from
scratch if that failed.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-08-21 12:23:51 +08:00
8b92ad1d4b tests/monitor-unit-tests: Clear config history before each test
To not let different tests interfere with each other, clear the config
history before each run.
2017-08-21 12:23:51 +08:00
0d6e3fd675 tests/monitor-unit-tests: Use special purpose add test helper
Will later be used to set a setup function.
2017-08-21 12:23:51 +08:00
b140e7fbeb monitor-config-manager: Keep short history of configurations
In order to go back in monitor configurations, save them to a history.
The history is implemented as a max 3 element long queue, where newly
set configurations are pushed to the head, and old are popped from the
tail.

The difference between using a single previous config reference and a
queue is that we can now remember the configuration used prior to a
D-Bus triggered configuration when the user discarded the configuration.

This will later be used to restore a previous configuration when a
laptop lid is opened.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-08-21 12:23:51 +08:00
6c0f107db0 tests: Add rotated multi head monitor config migration test
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-08-21 12:23:51 +08:00
61950755ec tests: Add monitor config migration tests
So far some basic testing, including:

 * Test that the migrated configuration is applicable
 * Test that a monitors.xml with multiple configurations are translated
 * Test rotation
 * Test tiled monitor discovery (well, test a made up tiled monitor
   configuration since I don't have a real one)

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-08-21 12:23:51 +08:00
bc3162460f Migrate old monitor configuration files to new system
This commit changes the new configuration system to use monitors.xml
instead of monitors-experimental.xml. When starting up and the
monitors.xml file is loaded, if a legacy monitors.xml file is
discovered (it has the version number 1), an attempt is made to migrate
the stored configuration onto the new system.

This is done in two steps:

1) Parsing and translation of the old configuration. This works by
parsing file using the mostly the old parser, but then translating the
resulting configuration structs into the new configuration system. As
the legacy configuration system doesn't carry over some state (such as
tiling and scale used), some things are not available. For tiling, the
migration paths makes an attempt to discover tiled monitors by
comparing EDID data, and guessing what the main tile is. Determination
of the scale of a migrated configuration is postponed until the
configuration is actually applied. This works by flagging the
configuration as 'migrated'.

2) Finishing the migration when applying. When a configuration with the
'migrated' flag is retrieved from the configuration store, the final
step of the migration is taken place. This involves calculating the
preferred scale given the mode configured, while making sure this
doesn't result in any overlapping logical monitor regions etc.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-08-21 12:23:51 +08:00
27a4f9f862 monitor-manager/kms: Use connector id to find old output
The zero-initialized winsys id was incorrectly used as the key to find
the old output to base active/primary state from, which would never
succeed unless the winsys id happened to be 0. Fix this by using the
winsys id that will be used, i.e. the connector id.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-08-21 12:23:51 +08:00
88f2441330 monitor-manager: Fix output variable naming
Fix the last case of using the variable name "meta_output" for a
MetaOutput.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-08-21 12:23:51 +08:00
ab04286c6b monitor-manager/x11: Don't complain about 'normal' transform
The 'normal' transform has the value 0, so the g_warn_if_fail()
expression failed. Correct it so that it doesn't complain when no
transform is checked.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-08-21 12:23:51 +08:00
e8a62861c9 Remove old monitor configuration system
Remove the old MetaMonitorConfig system and mark the new one as
non-experimental. This also removes the D-Bus property.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-08-21 12:20:53 +08:00
9ac87b36c1 monitor-manager/xrandr: Fix name inconsistencies
MetaOutputs should be "output" and external types should be named as
such, i.e. XRandr outputs are renamed to "xrandr_output".

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-08-21 12:20:30 +08:00
ce7819949f Update Nepali translation 2017-08-20 09:01:04 +00:00
12792f99a0 Add tag-and-drag setting from libinput into mutter
The problem is that libinput offers the possibility to not enabled
dragging when tap-to-click is enabled but mutter doesn't. For people who
have a sensitive touchpad and who like tap-to-click option, dragging is
launched even when you don't want it : for example, when you select a
folder, most of the time the folder is dragging whereas just selected or
when you want to select some lines of a text file, several lines are
moved as a cut-paste which is not expected and erase datas.

To fix it, you need to have the possibility to desactivate the drag
option when you use tap-to-click in mutter. Because it's already a
specification of libinput, it remains to add it to mutter.
Implementation with X11 is added too.

https://bugzilla.gnome.org/show_bug.cgi?id=775755
2017-08-20 09:27:28 +08:00
66996dee4b wayland/inhibit-shortcuts-dialog: Destroy the dialog after response
We'll never actually show it again, but just use the last response, so
we can just destroy it now already.

https://bugzilla.gnome.org/show_bug.cgi?id=786385
2017-08-19 17:24:06 +08:00
2f45e88f06 wayland/inhibit-shortcuts-dialog: Just hide the dialog when hiding
The meta_wayland_surface_hide_inhibit_shortcuts_dialog() function
disconnected the "destroy" handler, but we'd still be listening on
response events. Change this to just hide the dialog, leaving the data
intact with the proper life time signal in place.

https://bugzilla.gnome.org/show_bug.cgi?id=786385
2017-08-19 17:24:06 +08:00
c1439e141e wayland/inhibit-shortcuts-dialog: Make the dialog ownership clearer
Make it clear that the data object is the owner of the dialog; it
creates it, and eventually destroys it.

https://bugzilla.gnome.org/show_bug.cgi?id=786385
2017-08-19 17:24:02 +08:00
dceb0f1f1f wayland/inhibit-shortcuts-dialog: Make data life cycle a bit clearer
The 'data' object is attached to the MetaWaylandSurface as a GObject
qdata. It is created once, and stays allocated until the surface is
destroyed. To make things clearer, connect to the "destroy" signal just
after creating, and from a on_surface_destroyed() callback call the
.._free() function.

https://bugzilla.gnome.org/show_bug.cgi?id=786385
2017-08-19 17:23:07 +08:00
a7915ff8ae wayland/inhibit-shortcuts-dialog: Only reuse last reply if there was one
We might have hidden the dialog, without a response. To avoid using the
not answered response, make sure we have actually got one before
reusing.

https://bugzilla.gnome.org/show_bug.cgi?id=786385
2017-08-19 17:11:21 +08:00
420a712ad5 meta-monitor: Make supported scales determination saner
Scales below 1 and scales that result in a too small logical monitor
size don't make sense. We also don't need so many intermediate scales.

https://bugzilla.gnome.org/show_bug.cgi?id=786474
2017-08-18 18:41:01 +02:00
9a47e5c832 wayland/buffer: Add missing breaks in switch statement
We'd process damage, and no matter whether it succeeded or not we'd
pretend it succeeded, meaning any potential GError would be leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=786300
2017-08-16 13:33:17 +08:00
dbc63430d8 renderer-native: Destroy monitor framebuffers when suspending
When suspending (i.e. VT switching away, the GDM gnome-shell instance
gets hidden, or changing user), destroy the onscreen and offscreen
monitor framebuffers. When resuming, the stage views and framebuffers
will be recreated anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=786299
2017-08-16 13:17:43 +08:00
0f861cecac Updated Serbian translation 2017-08-15 20:57:06 +02:00
586f9666d7 Updated French translation 2017-08-15 09:16:45 +02:00
05a2331052 Update Turkish translation 2017-08-13 15:55:41 +00:00
9f8bee7781 Update Turkish translation 2017-08-13 15:54:17 +00:00
d9505315da Update Turkish translation 2017-08-13 15:46:57 +00:00
c9937faf1e clutter: Fix build with --enable-debug
Message was poking stage_x11, which doesn't exist in this context.
Just print the Window that is receiving the event, the event will be
emitted into the only existing stage anyway.
2017-08-12 11:55:19 +02:00
98606bc046 data: fix gettext domain
https://bugzilla.gnome.org/show_bug.cgi?id=691611
2017-08-10 22:17:55 +03:00
49096f0530 Bump version to 3.25.90
Update NEWS.
2017-08-10 18:30:08 +02:00
ff6eb86bb4 Update Hungarian translation 2017-08-10 08:27:55 +00:00
c735eab216 Update Galician translation 2017-08-09 15:56:33 +00:00
299aa9759c Update Indonesian translation 2017-08-08 23:53:08 +00:00
35e9020f4c Updated Slovenian translation 2017-08-07 10:06:34 +02:00
6d4234e300 Updated Spanish translation 2017-08-05 12:03:45 +02:00
0457870ff1 Update Croatian translation 2017-08-03 19:58:02 +00:00
a52c4c2795 Update Croatian translation 2017-08-03 19:37:50 +00:00
bb8c388a37 Updated Czech translation 2017-08-03 09:42:45 +02:00
46cb506f8f wayland: use the inhibit shortcuts dialog
Plug the new MetaInhbitShortcutsDialog to the relevant Wayland protocol
implementation.

Also, remember the last user choice for a given surface to avoid asking
continuously the same question.

https://bugzilla.gnome.org/show_bug.cgi?id=783342
2017-08-02 11:58:55 +02:00
ce20c964a6 compositor: add vmethod to override inhibit shortcut dialog
A MetaPlugin implementation of the MetaInhibitShortcutsDialog can be
used in place of the default inhibit shortcut.

https://bugzilla.gnome.org/show_bug.cgi?id=783342
2017-08-02 11:58:55 +02:00
e3f76e9482 core: implement MetaInhibitShortcutsDialogDefault
this is the default implementation of the inhibit shortcuts dialog,
does nothing but allowing the shortcut inhibit request.

https://bugzilla.gnome.org/show_bug.cgi?id=783342
2017-08-02 11:58:55 +02:00
b894fbd9ff core: add MetaInhibitShortcutsDialog
Add a new interface for allowing or denying shortcuts inhibit requests.

https://bugzilla.gnome.org/show_bug.cgi?id=783342
2017-08-02 11:58:55 +02:00
2ca0871724 wayland: add keyboard shortcuts inhibitor protocol
https://bugzilla.gnome.org/show_bug.cgi?id=783342
2017-08-02 11:58:55 +02:00
dd12f569d9 wayland: add inhibit shortcut mechanism
Add a mechanism to MetaWaylandSurface that inhibits compositor's own
shortcuts when the surface has input focus, so that clients can receive
all key events regardless of the compositor own shortcuts.

This will help with implementing "fake" active grabs in Wayland and
XWayland clients.

https://bugzilla.gnome.org/show_bug.cgi?id=783342
2017-08-02 11:58:55 +02:00
c54377e3ba configure.ac: update wayland-server requirement
Raise wayland-server requirement to 1.13.0 to use the new API to control
wl_global visibility, so that we can hide Xwayland specific protocols
from other regular clients.

https://bugzilla.gnome.org/show_bug.cgi?id=783342
2017-08-02 11:58:55 +02:00
346acaf7f6 Updated Slovenian translation 2017-08-02 10:29:57 +02:00
3343a199c2 Update Catalan translation 2017-08-02 06:45:02 +02:00
1fb3c9f8bf configure.ac: Bump the API version
We added/changed various API for example the DisplayConfig D-Bus API,
so bump the API version.
2017-08-01 23:55:45 +08:00
b7b5fb293d wayland: Add zwp_linux_dmabuf_v1 support
https://bugzilla.gnome.org/show_bug.cgi?id=785262
Signed-off-by: Daniel Stone <daniels@collabora.com>
2017-08-01 19:05:50 +08:00
1455c402b9 monitor-manager: add API to get the display configuration timeout
Instead of hardcoding this into two different places, add an API so that
gnome-shell can fetch it.

https://bugzilla.gnome.org/show_bug.cgi?id=767805
2017-07-31 15:41:15 +01:00
4c1fe4c30d prefs: fix a couple of typos
It's "threshold", not "trheshold". Also, make sure to add the enum value
to the documentation section.

https://bugzilla.gnome.org/show_bug.cgi?id=767805
2017-07-31 15:21:06 +01:00
9b97a44760 Update Kazakh translation 2017-07-27 12:30:06 +00:00
26fa7b8f6a wayland: Reset tablet tool cursor surface on proximity out
The cursor surface would be remembered until the next proximity in
event, causing flashing of the old cursor till the client underneath
the tablet tool sent the zwp_tablet_tool.set_cursor request.

Forgetting about the cursor surface on proximity out makes the cursor
invisible till the request is made.
2017-07-26 15:41:28 +02:00
7486783692 Updated Spanish translation 2017-07-25 20:17:32 +02:00
9929efb65e Updated Lithuanian translation 2017-07-24 23:59:50 +03:00
5db48faca4 wayland: Update button state on motion/button events
More specifically, avoid crossing events, since clutter does not set
modifier/button state on those. Fixes implicit grabs being broken when
the pointer moves past the surface boundaries.

https://bugzilla.gnome.org/show_bug.cgi?id=785347
2017-07-24 17:57:31 +02:00
b0c54b6675 Update Indonesian translation 2017-07-23 02:46:38 +00:00
d8354cb153 Update Friulian translation 2017-07-22 20:54:15 +00:00
9a348aa859 wayland/buffer: Create EGLImage with no context
Since a wl_buffer is independent of the GL context in use (unlike, e.g.,
a GL renderbuffer), EGLImages with the EGL_WAYLAND_BUFFER_WL target must
pass EGL_NO_CONTEXT as the context. Quoting from the
EGL_WL_bind_wayland_display spec:

    After querying the wl_buffer layout, create EGLImages for the
    planes by calling eglCreateImageKHR with wl_buffer as
    EGLClientBuffer, EGL_WAYLAND_BUFFER_WL as the target, NULL
    context.

The check was already present inside _cogl_egl_create_image.

https://bugzilla.gnome.org/show_bug.cgi?id=785263
Signed-off-by: Daniel Stone <daniels@collabora.com>
2017-07-22 11:44:44 +02:00
fe6e24ddbd Bump version to 3.25.4
Update NEWS.
2017-07-19 20:19:11 +02:00
7e330bd65f keybindings: Add a switch-monitor builtin keybinding
Moved from g-s-d's media keys plugin, where it was called "video-out",
since it requires changing the current monitor configuration and we
want to remove the old DBus API.

This implementation is intentionally simple and not really meant for
more than debugging and validating the various configurations. A
better user experience will be introduced in gnome-shell with a custom
keybinding handler.

The default value includes <Super>P in addition to the standard keysym
for historical reasons.

https://bugzilla.gnome.org/show_bug.cgi?id=781906
2017-07-19 11:18:53 +02:00
3f9c5823cb backends: Add API to switch to predetermined monitor configurations
This will allows us to support the XF86Display key present on some
laptops, directly in mutter. This is also known, in evdev, as
KEY_SWITCHVIDEOMODE.

The common usage for this key is to alternate between a few well known
multi-monitor configurations though these aren't officially
standardized. As an example, Lenovo documents it as:

"Switches the display output location between the computer display
and an external monitor."

On this patch, we're just introducing the configurations that have been
implemented in g-s-d until now, which go a bit beyond the above
description.

https://bugzilla.gnome.org/show_bug.cgi?id=781906
2017-07-19 11:18:53 +02:00
2bdd97e067 monitor-unit-tests: Check tiled monitors with non-origin main output
Test that a tiled monitor with tile (0, 0) as the non-main output,
where main output is defined as the output that is active as long as
the monitor is active.

https://bugzilla.gnome.org/show_bug.cgi?id=781723
2017-07-19 17:06:17 +08:00
32fd1e8c08 monitor-manager: Let the MetaMonitor derive the whole layout
Instead of letting MetaMonitor derive the logical monitor size, then
using the main monitor for the position, just let MetaMonitor derive
the whole layout including the position. This means it can deal with
tiled monitors better, for example when the main output (the output
always active when the monitor is active) is not the origin output (the
output with tile position (0, 0)).

https://bugzilla.gnome.org/show_bug.cgi?id=781723
2017-07-19 17:06:17 +08:00
e126b6ed16 data: Enable monitor-config-manager by default
We'll need to drop the old monitor configuration system to pave way to
better hi-dpi and multi-gpu support. Let's start by defaulting to the
new system in order to give it more real world testing.
2017-07-18 22:32:59 +02:00
4d8cb5408b wayland: Provide basic tablet wheel event support
Adds basic support for the "wheel" event from the Wayland tablet protocol.
Ideally we would accumulate the angle and report a wheel event with an
appropriate value for "clicks". We can get away with a much cruder method
for the time being, however, since no Wacom tablet puck actually provides
a smooth scrollwheel. Checking whether the angle in CLUTTER_INPUT_AXIS_WHEEL
exceeds a nominally-small threshold is sufficient to determine that the
wheel has advanced by at least one physical click.

https://bugzilla.gnome.org/show_bug.cgi?id=783716
2017-07-17 21:22:15 +02:00
f852d2b0eb backends: Extend pad action label checks to rings/strips
This way the pad OSD can obtain the keycombos that are mapped to these
for labeling purposes.

https://bugzilla.gnome.org/show_bug.cgi?id=782033
2017-07-17 19:43:13 +02:00
5c3b27d02f clutter/x11: Emit CLUTTER_PAD_RING/STRIP events on X11
These events will be useful on gnome-shell UI, so translate the
4-5 button events with exotic axes to those. Also use the
XI_Motion event received when first touching those to reset
the ring/strip state, so we don't receive spurious direction
changes in the upper layers.

https://bugzilla.gnome.org/show_bug.cgi?id=782033
2017-07-17 19:43:13 +02:00
ead6556b50 clutter: Add clutter_event_get_pad_event_details()
This function extracts pad event information, and more importantly
exposes it for gobject introspection.

https://bugzilla.gnome.org/show_bug.cgi?id=782033
2017-07-17 19:10:05 +02:00
4afa66fe41 wayland/window: Update toplevel main monitor before non-toplevel
When updating the main monitor, make sure to update the toplevel main
monitor before trying to use that as the main monitor for non-toplevel
windows (such as popups). Without this, when the main monitor is
updated as a side effect to monitors being changed (for example due to
a hot plug event, or coming back from being suspended) the
main monitor pointer may, after 'monitors-changed' has completed, point to
freed memory resulting in undefined behaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=784867
2017-07-17 09:59:34 +08:00
408292959e core: Add meta_close_dialog_focus() vmethod
This is used to request key focus on the close dialog whenever
a window that is frozen would receive key focus. Also, ensure
that the dialog gets focus when first shown if the window was
meant to receive input.

https://bugzilla.gnome.org/show_bug.cgi?id=762083
2017-07-16 19:21:41 +02:00
2d8d9dea97 core: Ensure we send SIGTERM only once to the zenity close dialog. 2017-07-16 19:21:41 +02:00
f38c90961a core: Forward events meant for non-alive windows to clutter
Otherwise the ClutterEventFilter will consider these handled, and not
forward these to Clutter. This gets necessary for key handling if we
mean to implement the close dialog with Clutter UI.

https://bugzilla.gnome.org/show_bug.cgi?id=762083
2017-07-16 19:21:41 +02:00
aa47374d0e core: Add meta_close_dialog_is_visible() property
Since the last show/hide call should be effective, implement
it without requiring an extra interface property.

https://bugzilla.gnome.org/show_bug.cgi?id=762083
2017-07-16 19:21:41 +02:00
5aee5048ba Remove the stamp file for enumeration types
The file was committed by accident.
2017-07-16 11:43:09 +01:00
0e3f80d238 build: Fix enum types rules
The list of files being parsed for enumerations include the header file
we are building with the enumeration types.

Additionally, we are concatenating multiple runs in the same temporary
files; on failure, the temporary files are left around, which means we
end up with broken headers and sources.
2017-07-16 11:43:09 +01:00
ef13ee4488 backends: Map tablet pad rings/strips to action settings
Just like we do for buttons, with a few twists. These have 2 directions
mappable to different keycombos, and are affected by the current mode
in their group.

https://bugzilla.gnome.org/show_bug.cgi?id=782033
2017-07-14 22:30:49 +02:00
8b5d34b24a monitor-manager: Shut up a compiler warning
Add a default switch statement to make it clear that 'transform'
won't be used uninitialized.
2017-07-14 16:56:43 +02:00
c614a2db28 keybindings: Add a rotate-monitor builtin keybinding
Moved from g-s-d's media keys plugin, where it was called
"video-rotate", since it requires changing the current monitor
configuration and we want to remove the old DBus API.

https://bugzilla.gnome.org/show_bug.cgi?id=781906
2017-07-14 15:31:20 +02:00
7360f51ee8 meta-monitor-manager: Add API to rotate the current configuration
This will allows us to support the XF86RotateWindows key present on
some laptops directly in mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=781906
2017-07-14 15:31:20 +02:00
6ae42f3845 monitor-manager: Hook MetaOrientationManager to change the config
On orientation changes we'll apply the appropriate monitor transform
to the current configuration if possible.

https://bugzilla.gnome.org/show_bug.cgi?id=781906
2017-07-14 15:31:20 +02:00
26b66826dc meta-monitor-config: Add API to rotate the current config
This will allow us to do automatic rotation of the builtin display if
that's the only active monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=781906
2017-07-14 15:31:20 +02:00
6d082bf442 monitor-config-manager: Add API to rotate the current config
This will allow us to do automatic rotation of the builtin display if
that's the only active monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=781906
2017-07-14 15:31:20 +02:00
aad2280309 backends: Add a MetaOrientationManager class
This basically moves g-s-d's orientation plugin into mutter so that
eventually g-s-d doesn't need to build monitor configurations by
itself anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=781906
2017-07-14 15:31:20 +02:00
e3d5bc077d stack-tracker: Keep override redirect windows on top
Since commit 6b5cf2e, we keep override redirect windows on a layer
above regular windows in the clutter actor scene graph. In the X
server, and thus for input purposes, these windows might end up being
stacked below regular windows though, e.g. because a new regular
window is mapped after an OR window.

Fix this disconnect by re-stacking OR windows on top when syncing the
window stack with the compositor.

https://bugzilla.gnome.org/show_bug.cgi?id=780485
2017-07-14 15:30:57 +02:00
777963eeb6 monitor-manager: Don't set current config if only verifying
When verifying if a configuration is applicable, don't set it as
current when applying succeeded, or else reverting to a previous
configuration doesn't work after having verified.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:27 +08:00
4cc5b25493 tests: Add test for setting an interlaced monitor mode
https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:27 +08:00
49c5228655 DisplayConfig: Add support for interlaced modes
Differentiate between non-interlaced and interlaced modes. This is done
by appending an "i" after the resolution part of the mode ID, and
adding a 'is-interlaced' (b) property to the mode properties.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:27 +08:00
85638c1b19 tests: Check expected monitor mode count
https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:27 +08:00
2507e53d04 tests: Test monitor mode refresh rate
Check that the monitor refresh rate corresponds to the CRTC mode
refresh rate.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:27 +08:00
a9c1c6d9fb Fix a couple of wrong indentations
https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:27 +08:00
0a8e108f10 DisplayConfig: Replace mode 'u' flags with 'a{sv}' property bag
To be more flexible without having to change any D-Bus type signatures
in the future, replace the 'uint' flags value (currently determining
whether a mode is current and/or preferred) with a variant lookup table.

The keys 'is-current' (b) and 'is-preferred' (b) replace the existing
flags.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:27 +08:00
859b01fc39 DisplayConfig: Specify mode ID string instead of mode spec
To be able to add more modes types that happen to have the same
resolution and refresh rate, change the API to specify modes using an
ID string. The ID string is temporary, and only works for associating a
mode for the monitor instance that it was part of.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:27 +08:00
e42206cc43 tests: Add non-precise fractional scaling test
https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:27 +08:00
41eea5a942 monitor-config: Handle fractional scale precision loss
When calculating sizes given some size and a fractional logical monitor
scale with precision loss, round the result of the floating point
calculation to the closest integer, as otherwise we might end up with
result smaller by 1 if there was a loss of precision when calculating
the scale.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:27 +08:00
197401fbf8 cursor-renderer: Track cursor position using floats
To be able to render the pointer cursor sprite at sub-(logical)-pixel
positions, track the pointer position using floats instead of ints.
This also requires users of the cursor sprite rect to deal with
floating points, when e.g. finding the logical monitor etc.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:27 +08:00
9ab338d7b6 clutter/stage-cogl: Track regions in buffer coordinate space
When fractional scaling is used, damage and paint clip region is tracked
in stage coordinate space using integers might end up missing some
pixels when the border ends up on half pixels. Change the damage
tracking and clip regions to be in buffer coordinates so we can align
damage on physical pixel borders.

However, just using rounding up to the next physical pixel results in
glitches. To avoid this, extend the damage by one logical pixel in all
directions, but still (scissor) clip the drawing to the non-extended
region, as otherwise drawing the damaged regions will result in
incorrect pixels on the right and bottom edges of the clip region. It is
possible that there are better ways to do this, which can be explored in
the future.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:27 +08:00
aa5d8ac68c monitor-config-store: Don't discard scale < 1.0 configurations
It's not the task of the XML parser to decide this; let the code
listing allowed scales sort out configurations with invalid scales.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
0adc56779f clutter/stage: Don't loose precision when setting up viewport
We always hit non-fractional floats here because the stage views are
always made so that they are aligned on integer positions with integer
sizes, but there is no reason to go float -> int -> float when
calculating the viewport.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
67eb289a6a monitor-manager: Find the supported scales from one passed
When passing scales over D-Bus, we'll loose some precision. To set the
correct scale, use the configured scale and look up the one actually
supported by the monitor mode, and use that. To match the supported one
with the configured one, the difference must be within rounding error
range.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
dfc4d0d523 clutter/stage-view: Allow scales down to 0.5
There is support for scaling logical monitors down to 0.5, so don't let
ClutterStageView stand in the way for that.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
5f2bb43061 backend/native: Don't double-scale pointer motions on scaled monitors
We manually scaled pointer motions when they travel over a scaled
monitor. When a stage view of a monitor is also scaled, in practice this
meant we scaled twice. Avoid this by only manually scaling the pointer
motion when stage views are not scaled.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
fef81cd628 clutter/stage: Fix capturing scaled views
Make clutter_stage_capture() work if views are scaled. This needs
adaptations on the using side to deal with the cairo surface device
scale that is used to communicate the scale used when capturing.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
3e8d0204bd monitor: Dynamically calculate supported scales per resolution
When using logical sized monitors we are allowed to use fractional scaling
but only if the resulting scaled logical monitor size is in integer form.
So, in order to get this, we allow to scale the monitor to up to
8 fractional values per integer, doing some computation in order to
fetch the nearest values which are closer to the scaling factors we can
permit.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
b2a530b326 DisplayConfig: Make supported scales per mode
This changes the API to pass supported scales per mode instead of
providing a global list. This allows for more flexible scaling
scenarious, where a scale compatible with one mode can still be made
available even though another mode is incompatible.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
5ab116a87f tests: Add tests for fractional scaling
https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
10b0351a59 Add support for rudimentary fractional scaling
When the logical layout mode is used, allow configuring the scaling to
be non-integer. Supported scales are so far hard coded to include at
most 1, 1.5 and 2, and scales that doesn't result in non-fractional
logical monitor sizes are discarded.

Wayland outputs are set to have scale ceil(actual_scale) meaning well
behaving Wayland clients will provide buffers with buffer scale 2, thus
being scaled down to the fractional scale.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
b64c69e4bc logical-monitor: Make scale a float
To support fractional scaling, the logical monitor scale must be stored
as a float. No other functional changes is part of this commit.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
c2e49f1bb5 clutter: Change stage view scale to be float
To support fractional scaling, change the stage view scale to be a
float instead of an int. Also change the places where it is retrieved
and used when scaling things.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
a3d63d0ac0 clutter/stage-view: Add G_PARAM_CONSTRUCT flag to properties
Otherwise those properties won't be set when ->construct is called.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
88cae8bd3d settings: Manage our own font DPI
Previously gnome-shell listened on the Xft Xsettings via GTK+s
GtkSettings to get the font DPI setting. The Xsetting might not
be what we want, and we should not rely on Xsettings when we don't need
to, so lets manage it ourself.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 20:54:26 +08:00
a6ec2b1d42 backends: Set error when opening /sys file fails
The caller in clutter really expects an error if fd==-1, so make
sure we set one here. Otherwise we get a nice crash in addition to
the failure to open the /sys file. Also, retry on EINTR.

https://bugzilla.gnome.org/show_bug.cgi?id=784881
2017-07-14 12:28:32 +02:00
ca600973ba wayland: Store and retrieve implicit grab information for tablet tools
Window moving and resizing depends on the `meta_wayland_seat_get_grab_info`
function succeeding. At the moment, tablet tools do not generate implicit
grabs like the pointer and touch. This commit adds the necessary elements
to track implicit grabs and retrieve their information.

https://bugzilla.gnome.org/show_bug.cgi?id=777333
2017-07-13 19:10:52 +02:00
4b8dd51c4d backends: Fix dangling callback not being disconnected
This fixes possible crashes if configuration is changed on a device that
was added and then removed.

https://bugzilla.gnome.org/show_bug.cgi?id=784881
2017-07-13 19:05:44 +02:00
56c468a2ef clutter/x11: Set master device on pad button events
These should be set one, but just set the master to be the slave
pad device. We are passively grabbing the pad device, so this is
consistent with active grabs on slave devices. Besides, pads are
paired to the VCP, which is not really truthful.

Fixes inoffensive warnings when trying to check whether motion
throttling applies for these events.

https://bugzilla.gnome.org/show_bug.cgi?id=784881
2017-07-13 19:05:44 +02:00
10b30eaba5 backend: Set mapping-mode on X11 pen/eraser devices
And use it in the generic code for the checks about whether mapping to
an specific display applies or not.

https://bugzilla.gnome.org/show_bug.cgi?id=784402
2017-07-12 23:43:23 +02:00
328e3f8f4f clutter: Extend mapping-mode to pen/eraser devices
This just used to apply to CLUTTER_TABLET_DEVICE on wayland, allow using
it on pen/eraser devices (as X11 sees tablets) for consistency.

https://bugzilla.gnome.org/show_bug.cgi?id=784402
2017-07-12 23:43:23 +02:00
7bd69f0b32 window: Don't crash when moving across non-adjecent logical monitors
When moving a window between two non-adjecent logical monitors, don't
try to tile a window when the window position is outside of any logical
monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=783630
2017-07-12 12:30:54 +08:00
538e402d71 wayland: Random whitespace fixes
https://bugzilla.gnome.org/show_bug.cgi?id=784080
2017-07-12 12:08:57 +08:00
9af6ec78ab wayland: Add support for wl_surface.damage_buffer
Implements support for the wl_surface.damage_buffer request, which
damages the buffer using buffer coordinate space.

https://bugzilla.gnome.org/show_bug.cgi?id=784080
2017-07-12 12:08:57 +08:00
41e22ab592 Use newer glib-genmarshal option
When building against a glib-genmarshal from GLib 2.54 we can use the
`--prototypes` command line argument to generate the prototypes for the
marshallers in the C source, and avoid a missing-prototypes compiler
warning.
2017-07-11 11:30:08 +01:00
1303c626b1 renderer-native: Fix compilation when EGLDevice renderer not enabled
When --enable-egl-device is not passed to ./configure, the
egl_device_error will not be declared; don't try to free it when its not
declared.
2017-07-07 17:59:20 +08:00
7eea82d3d7 MetaRendererNative: Give EGLDevice backend priority over GBM
With GLVND, whenever we have both Mesa's and NVIDIA's drives installed
in the system, initializing the GBM backend will always succeed,
regardless of what GPU you have on your system.

This is due to GBM's software rendering fallback.

It seems better to initialize the EGLDevice backend first, which will
fail to find a device match when given a non-NVIDIA GPU.

https://bugzilla.gnome.org/show_bug.cgi?id=784272
2017-07-07 11:55:18 +08:00
80e5955918 screen: Remove stray assert
When the number of (static) workspaces decreases, we relocate windows
from extra workspaces before removing them. As removing a non-empty
workspace is not allowed, we assert that it doesn't contain any windows
before removing it.

However that assert is

 - pointless, because meta_workspace_remove() already asserts that
   the workspace is empty

 - wrong, because even empty workspaces contain windows that are set
   to show on all workspaces

Simply drop the assert to avoid a crash when trying to remove a workspace
while on-all-workspaces windows are present.

https://bugzilla.gnome.org/show_bug.cgi?id=784223
2017-07-05 16:31:18 +02:00
ce989976fa backends: Apply tablet settings on all tablet device types during startup
This skipped the device types that are in use on X11.

https://bugzilla.gnome.org/show_bug.cgi?id=782027
2017-07-03 13:57:35 +02:00
529e5adb2e wayland: Base tablet tool coordinates on the current event
Instead of the last device position. This was copied a little bit too
straight from MetaWaylandPointer.

https://bugzilla.gnome.org/show_bug.cgi?id=783535
2017-07-03 13:56:21 +02:00
a70ae50ca9 clutter: Do not throttle motion events on tablet tools
Events from tablets must not be filtered out, as the event coalescing
results in precision loss.

https://bugzilla.gnome.org/show_bug.cgi?id=783535
2017-07-03 13:56:21 +02:00
74882b2502 backends/x11: Account for non-zero device origin when setting tablet area
Wacom's display tablets typically do not have (0,0) coincident with the top
left corner of the screen. This "outbound" area must be taken into account
when setting the area or else an unexpected offset of the pointer will
occur.

https://bugzilla.gnome.org/show_bug.cgi?id=784009
2017-07-03 13:49:14 +02:00
5f49bda591 window: Include window itself in transient loop check
While it doesn't make sense to set a window as transient to
itself, our existing check whether making a window transient
doesn't cover it, so it's still possible to create an infinite
loop.

https://bugzilla.gnome.org/show_bug.cgi?id=783502
2017-06-22 08:49:40 +02:00
edab8c3a4c Bump version to 3.25.3
Update NEWS.
2017-06-21 21:30:33 +02:00
8153c5b544 compositor: Handle EXIF orientation for backgrounds
Apply the embedded EXIF orientation when the background is loaded.

https://bugzilla.gnome.org/show_bug.cgi?id=783125
2017-06-21 20:23:09 +02:00
a4cef8586c backends/native: Interpret tablet padding as being input-centric
It is possible to interpret the ammount of padding provided to the
*_set_tablet_area functions in two different and incompatible ways. The X11
backend effectively treats them as being input-centric (i.e., the padding
defines the size of the "dead zone" on the tablet) while the native backend
has an output-centric viewpoint (i.e., the padding defines the size of the
"dead zone" on the display) viewpoint. This difference in opinion causes the
cursor offset to change when switching between Xorg and a Wayland sessions.

The calibration utility within g-c-c does its calculations with an input-
centric viewpoint, so this patch modifies the native backend to work
correctly with these values. To change viewpoints, we can simply invert
the scale and negate the offset. It should be noted that this function
also forgot to apply scaling to the offsets (as required by the matrix
transform done by libinput) which would have further compounded the
cursor offset issue under Wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=784009
2017-06-20 23:42:38 +02:00
9b9bb9cf86 backends: Fix output cycling in non display-attached tablets
It would only allow to alternate between the logical monitors, we actually
want to return NULL here so it can cycle to the whole span of monitors.

https://bugzilla.gnome.org/show_bug.cgi?id=782032
2017-06-20 22:02:04 +02:00
dc5b2e396c backends: Fix typo
Instead of checking all MetaMonitors in the monitor manager, we want to
look (as the function name says) in the MetaMonitors contained in the
given logical monitor.

Otherwise, it will return TRUE for every logical monitor, given we are
querying for an existing EDID.

https://bugzilla.gnome.org/show_bug.cgi?id=782032
2017-06-20 22:02:04 +02:00
d23275bc76 backends/x11: Handle left-handed mode on pen/eraser devices correctly
Due to the pen/eraser device separation in X11, CLUTTER_TABLET_DEVICE does
not apply there, this device type is only used in native/evdev. Checking
for CLUTTER_PEN/ERASER_DEVICE makes the left-handed mode correctly applied
on tablets.

https://bugzilla.gnome.org/show_bug.cgi?id=782027
2017-06-20 22:02:04 +02:00
48e820235e backends/x11: Fix c&p issue in tablet area calculation
instead of filling in the last array value, it overwrote the previous one.

https://bugzilla.gnome.org/show_bug.cgi?id=781703
2017-06-20 22:02:04 +02:00
2d3c56b089 Updated Spanish translation 2017-06-19 17:37:23 +02:00
85b2e59e7e Update Arabic translation 2017-06-18 21:28:17 +02:00
e1950ed76f texture-tower: Fix usage of G_*_DECLS
https://bugzilla.gnome.org/show_bug.cgi?id=783505
2017-06-14 11:15:04 +02:00
7938f41c11 monitor: invert logic for 4k TV scaling
For devices connected via HDMI (supposedly TVs) we want have a
scale factor of 1 if we are *below* the smallest 4k resolution
width (not equal or above) and do the scaling factor computation
if we are above the limit. This check was apparently wrongly
ported from gnome-settings-daemon.

Based of a patch by Caolan McNamara <caolanm@redhat.com>.

https://bugzilla.gnome.org/show_bug.cgi?id=777347
2017-06-07 14:03:03 +02:00
9f41bdb086 Update Indonesian translation 2017-06-07 08:01:27 +00:00
8457e2bad6 wayland/pointer: Check for subsurfaces when grabbing
Previously, the function only returned `TRUE` if the given surface was
equal to the given pointer's focused surface. This changes the behaviour
to also return `TRUE` if any of the given surface's subsurfaces are
equal to the pointer's focused surface.

https://bugzilla.gnome.org/show_bug.cgi?id=781811.
2017-06-07 09:47:29 +08:00
4d7329a7e2 window: Include STATE_CHANGED flag when tiling
For size change animations, plugins rely on the size change effect being
followed by size changed signal (or effects being kill altogether).
However unless the move_resize operation included the STATE_CHANGED flag,
the size changed event emitted when the compositor syncs the window
geometry only happens when the operation resulted in an actual change.

To avoid animations getting stuck in that case, make sure to include the
flag when tiling a window.

https://bugzilla.gnome.org/show_bug.cgi?id=783293
2017-06-06 15:35:06 +02:00
b4120a75e0 wayland/pointer: Track lifetime of current surface
Clear the pointer->current when the surface is destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=783113
2017-06-01 12:46:32 +08:00
b19e4592df wayland/pointer: Use glib signals tracking focus surface
Use the "destroy" MetaWaylandSurface signal instead of the wl_resource
destroy signal for tracking the lifetime of the surface with pointer
focus.

As unsetting the focus may have side effects due to handlers of the
"focus-surface-changed" signal, connect the signal after the default
handler to make sure other clean up facilities have the chance deal with
the surface destruction before we try to unset the focus.

https://bugzilla.gnome.org/show_bug.cgi?id=783113
2017-06-01 12:46:32 +08:00
e9c9ee844c backends/x11: Ensure reply is initialised to NULL 2017-05-31 19:15:39 -04:00
f5f0ff0a2f monitor-manager: Fix crash when UPower is not available
Don't access the upower client if it doesn't exist

https://bugzilla.gnome.org/show_bug.cgi?id=780407
2017-05-31 16:11:24 +02:00
68dacb531b keybindings: handle multiple keycodes for keysym
A single keysym can resolve to multiple keycodes. Instead of only using
the first one and ignoring the others, we store all codes in
MetaResolvedKeyCombo and then handle all of them in keybinding
resolution. If we already have bound a keycode for a keybinding with a
specific keysym then this can get overwritten by a new keybinding with a
different keysym that resolves to the same keycode. Now that we resolve
and bind all keycodes for a keysym this might happen more often; in that
case warn but still overwrite, but only for the first keycode for each
keysym. If a secondary (i.e. all non-first keycodes) is already indexed
we just ignore that; this should resemble the old behavior  where we
only took the first keycode for any keysym as close as possible.

https://bugzilla.gnome.org/show_bug.cgi?id=781223
2017-05-30 15:23:00 +02:00
dd82f4afcd configure: require glib 2.53.2
This is required for the new glib-genmarshal as introduced in
 commit 9131f26cae

https://bugzilla.gnome.org/show_bug.cgi?id=783161
2017-05-28 11:21:42 +10:00
fc010e0edc Update Friulian translation 2017-05-27 20:55:46 +00:00
5132ea64be Use Unicode quotation marks in a translatable string
Also fixes a typo.

See https://developer.gnome.org/hig/stable/typography.html

https://bugzilla.gnome.org/show_bug.cgi?id=772218
2017-05-26 16:15:25 +02:00
82325cbcfd monitor: Don't get the monitor manager from the backend
We will both create and destroy monitors during initialization (when
using the X11 backend), so don't try to access the monitor manager from
the backend, but store a pointer to it instead.

It's stored in MetaMonitor even though only MetaMonitorTiled uses it,
mostly because it makes more sense to store such a pointer there.

https://bugzilla.gnome.org/show_bug.cgi?id=781723
2017-05-26 14:32:43 +08:00
fb5ebffb8d tests/monitor-unit-tests: Check handling of odd tiled monitors
Add tests for handling tiled monitors where the origin tile output is
not the main output.

https://bugzilla.gnome.org/show_bug.cgi?id=781723
2017-05-26 14:32:43 +08:00
94d843b80e tests/monitor-unit-tests: Check meta_monitor_is_active()
https://bugzilla.gnome.org/show_bug.cgi?id=781723
2017-05-26 14:32:43 +08:00
c32e2d17d9 monitor: Handle tiled monitors where (0, 0) is not the main output
In some circumstances, the origin tile (0, 0) is not the one that
should be used to drive the monitor when using a non-tiled mode. Update
MetaMonitorTiled to support this case. It also seems to be so that the
preferred mode might be some low resolution or bogus mode on these
monitors, so also adapt MetaMonitorTiled to manage to ignore the
preferred mode of a tiled monitor if the preferred mode doesn't use
both tiles.

https://bugzilla.gnome.org/show_bug.cgi?id=781723
2017-05-26 14:32:43 +08:00
2b05748d5c monitor: Move get_suggested() behind behind vfunc
Only support suggested monitor positioning if the monitor is non-tiled.
Normally this functionality is used by virtual machines to provide a
hint of how to place the virtual monitors, and they don't tend to use
tiled monitors anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=781723
2017-05-26 14:32:43 +08:00
cd775929bf monitor: Move tiled CRTC mode identification into helper
It'll be used in more places later.

https://bugzilla.gnome.org/show_bug.cgi?id=781723
2017-05-26 14:32:43 +08:00
7303a78b06 monitor: Generate spec struct earlier
By generating the spec struct earlier, code executed later can use the
fields in the spec.

https://bugzilla.gnome.org/show_bug.cgi?id=781723
2017-05-26 14:32:43 +08:00
07b8cc0773 monitor: Fix naming of spec generation function
It was at one point referred to as 'id', but was changed to 'spec', but
the name of this function was not updated.

https://bugzilla.gnome.org/show_bug.cgi?id=781723
2017-05-26 14:32:43 +08:00
1bb0e18042 monitor-manager/xrandr: Allow configuring scales on X11 too
This commit makes it possible to configure logical monitor scale also
when running on top of an X11 server using Xrandr. An extra property
'requires-globla-scale' is added to the D-Bus API is added to instruct
a configuration application to only allow setting a global logical
monitor scale.

This is needed to let gsd-xsettings use the configured state to set a
XSettings state that respects the explicit monitor configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-05-26 14:31:48 +08:00
05bc2e2331 gschema: Add description for "monitor-config-manager"
https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-05-26 14:31:48 +08:00
3b097c7e77 monitor-manager/kms: Move scale calculation to MetaMonitor
The scale calculation doesn't really have anything to do with KMS, and
eventually we'll want to have mutter calculate the monitor scale for
non-KMS backends too, so move the scale calculation to MetaMonitor.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-05-26 14:31:48 +08:00
0bc312a54b monitor-manager/kms: Move global ui scaling setting to MetaSettings
It'll be used elsewhere, so shouldn't be in MetaMonitorManagerKms.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-05-26 14:31:48 +08:00
2718699ccc backend: Move settings into a new MetaSettings object
Introduce MetaSettings and add the settings managed by MetaBackend into
the new object. These settings include: experimental-features and UI
scaling factor.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-05-26 14:31:48 +08:00
be175558c3 backend: Make X11 display opened function explicitly named
It didn't say anything about being the X11 display, so make it say so.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-05-26 14:31:48 +08:00
df39a7d0fd monitor-manager/xrandr: Use xcb API to configure CRTC
Use xcb-randr instead of libXrandr to set the CRTC configuration. This
is needed because data from the reply will later be used.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-05-26 14:31:48 +08:00
43cdf81f6b backend: Make the getter use the cached ui scale
The cached ui scale is kept up to date, so don't recalculate it
everytime meta_backend_get_ui_scaling() is called.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-05-26 14:31:48 +08:00
183f4b0c13 MetaMonitorManager: ignore hotplug_mode_update at startup
hotplug_mode_update is used (mostly by VMs nowadays, and
VMware has implemented it) to inform that modes list (including
the preferred one) might change after an uevent.

However, when using MetaMonitorConfigManager we should
ignore this value at initialization level, or mutter
won't restore the configured values at startup.

https://bugzilla.gnome.org/show_bug.cgi?id=783073
2017-05-25 16:50:29 +08:00
38a772bce7 Bump version to 3.25.2
Update NEWS.
2017-05-24 21:04:07 +02:00
dd451547a5 tests: Fix actor-anchors test
Since commit 5cb5baa7d4, we skip transitions when updating an
actor's scale/position to the existing value. As a result, we
don't get change notification on those properties either - given
that the properties did not actually change, that behavior seems
fine, so just modify the test to not expect a notify signal for
unchanged properties.
2017-05-24 21:04:07 +02:00
270da95cbc window: Notify about size-change when tiling
Call meta_compositor_size_change_window while tiling in order
to emit the size-change signal. Since the untiling action is
considered a unmaximize size change, treat tiling as a maximize
size change for consistency.

https://bugzilla.gnome.org/show_bug.cgi?id=782968
2017-05-24 09:51:29 +02:00
76198e0b3b Implements disable-while-typing in mutter.
Disable-while-typing disables the touchpad while the user is typing.

This patch introduces the necessary backend code to implement the
org.gnome.desktop.peripherals.touchpad.disable-while-typing setting of
gsettings-desktop-schemas which was implemented in commit
4c5b1c1df399d6afaaccb237e299ccd1d5d29ddd and released as part of 3.24.
This is known as dwt in libinput.

This patch has been tested on X11 and Wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=764852
2017-05-24 11:56:54 +08:00
efc190789f backend: Couple of whitespace fixes
https://bugzilla.gnome.org/show_bug.cgi?id=782152
2017-05-24 11:18:56 +08:00
81e99c2680 input-settings: Minor structural cleanup
Let the backend implementations create their own input settings
backend, as is done with other backend specific special purpose
backends. Also use the macro for declaring the GType.

https://bugzilla.gnome.org/show_bug.cgi?id=782152
2017-05-24 11:18:56 +08:00
755755a2f3 backend: Move out some code from post_init()
meta_backend_real_post_init() had some open coded initialization with
some unexpected interdependencies. Split these up and move them to their
own functions in order to make meta_backend_real_post_init() a bit more
readable.

https://bugzilla.gnome.org/show_bug.cgi?id=782152
2017-05-24 11:17:46 +08:00
4b23eb064c clutter: Update pointer position on master clock's update stage
Ensure the pointer position is up-to-date for the pointers inside
the clip area after the stage got actors relayout.

https://bugzilla.gnome.org/show_bug.cgi?id=755164
2017-05-23 16:37:53 +02:00
498200776c wayland: Ensure we repick the pointer on synthesized crossing events
Relayouts in clutter may trigger synthesized crossing events if the
actor below the pointer changes. In that situation we do need to
repick() the MetaWaylandPointer to end up with the right current
wayland surface.

https://bugzilla.gnome.org/show_bug.cgi?id=755164
2017-05-22 17:45:17 +02:00
233 changed files with 25147 additions and 18502 deletions

103
NEWS
View File

@ -1,3 +1,106 @@
3.25.91
=======
* Reduce memory use of suspended instances [Jonas; #786299]
* Make supported scales determination saner [Rui; #786474]
* Fix crash on inhibit-shortcuts dialog reponse [Jonas; #786385]
* Support libinput's tag-and-drag setting [freeroot; #775755]
* Avoid overlapping keybindings with multiple layouts [Jonas; #786408]
* Fix non-transformed cursor on rotated monitors [Jonas; #786023]
* Avoid unnecessary work during background painting [Alessandro; #783512]
* Misc. bug fixes [Alberts, Jonas, Mario; #691611, #786300, #777732, #786568]
Contributors:
freeroot, Jonas Ådahl, Alessandro Bono, Carlos Garnacho, Rui Matos,
Alberts Muktupāvels, Mario Sanchez Prada
Translations:
Muhammet Kara [tr], Claude Paroz [fr], Мирослав Николић [sr, sr@latin],
Pawan Chitrakar [ne], Kukuh Syafaat [id]
3.25.90
=======
* Add zwp_linux_dmabuf_v1 support [Daniel; #785262]
* Add (x)wayland shortcut inhibitor support [Olivier; #783342]
* Misc. bug fixes [Daniel, Carlos, Cosimo; #785263, #785347, #767805]
Contributors:
Jonas Ådahl, Cosimo Cecchi, Olivier Fourdan, Carlos Garnacho, Daniel Stone
Translations:
Fabio Tomat [fur], Kukuh Syafaat [id], Aurimas Černius [lt],
Daniel Mustieles [es], Baurzhan Muftakhidinov [kk], Jordi Mas [ca],
Matej Urbančič [sl], Marek Cernocky [cs], gogo [hr], Fran Dieguez [gl],
Balázs Meskó [hu]
3.25.4
======
* Do not throttle motion events on tablet tools [Carlos; #783535]
* Handle left-handed mode on pen/eraser devices [Carlos; #782027]
* Add wl_surface.damage_buffer() support [Jonas; #784080]
* Fix crash when moving across on-adjacent monitors [Jonas; #783630]
* Fix window moving/resizing via tablet tools [Jason; #777333]
* Support fractional monitor scaling [Jonas, Marco; #765011]
* Keep override-redirect windows stacked on top [Rui; #780485]
* Implement tablet rings/strips configuration [Carlos; #782033]
* Support tablet wheel events on wayland [Jason; #783716]
* Move g-s-d xrandr functionality into mutter [Rui; #781906]
* Misc. bug fixes [Florian, Jason, Miguel, Carlos, Jonas; #783502, #784009,
#784223, #784272, #784402, #784881, #762083, #784867, #781723]
Contributors:
Jonas Ådahl, Miguel A. Vico, Emmanuele Bassi, Carlos Garnacho, Jason Gerecke,
Rui Matos, Florian Müllner, Marco Trevisan (Treviño)
3.25.3
======
* Ignore hotplug-mode-update value on startup [Marco; #783073]
* Implement configurable monitor scales on X11 [Jonas; #777732]
* Fix handling of tiled monitors [Jonas; #781723]
* Handle multiple keycodes for keysym [Christian; #781223]
* Consider subsurfaces when grabbing [mindtree; #781811]
* Fix logic for HiPDPI scaling of TV outputs [Christian; #777347]
* Fix handling of left-handed mode on pen/eraser devices [Carlos; #782027]
* Fix output cycling in non-display-attached tablets [Carlos; #782032]
* Fix wacom cursor offset on wayland [Jason; #784009]
* Handle EXIF orientation of backgrounds [Silvère; #783125]
* Misc. bug fixes [Piotr, Tim, Bastien, Jonas, Florian, Benoit, Carlos; #772218,
#783161, #780407, #783113, #783293, #783505, #781703]
Contributors:
mitchmindtree, Jonas Ådahl, Ikey Doherty, Piotr Drąg, Carlos Garnacho,
Jason Gerecke, Benoit Gschwind, Christian Kellner, Silvère Latchurié,
Tim Lunn, Florian Müllner, Bastien Nocera, Marco Trevisan (Treviño)
Translations:
Fabio Tomat [fur], Kukuh Syafaat [id], Khaled Hosny [ar],
Daniel Mustieles [es]
3.25.2
======
* Fix frame updates on hide-titlebar-when-maximized changes [Florian; #781862]
* Fix accessible screen coordinates on X11 [Florian; #781902]
* Use less CPU when rendering fast-updating windows [Carlos, Emmanuele; #782344]
* Compute geometry of clients that don't set one explicitly [Olivier; #782213]
* Fix copy+paste of UTF8 strings between X11 and wayland [Carlos; #782472]
* Fix non-wayland builds [Chris; #780533]
* Add plugin vfunc to implement a custom force-quit dialog [Carlos; #711619]
* Fix swapped red and blue channels in CoglTexture data [Carlos; #779234
* Fix build where libtool's link_all_deplibs defaults to 'no' [Marco; #782821]
* Fix glitches when opening a window maximized [Olivier; #781353, #782183]
* Fix wrong cursor after window underneath the pointer changed [Carlos; #755164]
* Implement support for disable-while-typing option [Evan; #764852]
* Emit size-change signal when tiling [Alessandro; #782968]
* Misc. bug fixes [Nigel, Matthias, Jonas; #759085, #780215, #782156, #782152]
Contributors:
Jonas Ådahl, Emmanuele Bassi, Alessandro Bono, Olivier Fourdan,
Carlos Garnacho, Matthias Liertzer, Florian Müllner, Nigel Taylor,
Marco Trevisan (Treviño), Chris Vine, Evan Welsh
Translations:
Fabio Tomat [fur], Jordi Mas [ca], Mario Blättermann [de],
Emin Tufan Çetin [tr], Balázs Úr [hu]
3.25.1
======
* Always sync window geometry on state changes [Jonas; #780292]

View File

@ -34,6 +34,7 @@ stamp-marshal: $(marshal_list)
$(AM_V_GEN)$(GLIB_GENMARSHAL) \
--prefix=$(glib_marshal_prefix) \
--header \
--valist-marshallers \
$(marshal_list) > xgen-mh \
&& (cmp -s xgen-mh $(marshal_h) || cp -f xgen-mh $(marshal_h)) \
&& rm -f xgen-mh \
@ -46,6 +47,8 @@ $(marshal_c): $(marshal_h)
$(AM_V_GEN)$(GLIB_GENMARSHAL) \
--prefix=$(glib_marshal_prefix) \
--body \
--valist-marshallers \
--prototypes \
$(marshal_list) > xgen-mc \
&& (cmp -s xgen-mc $(marshal_c) || cp -f xgen-mc $(marshal_c)) \
&& rm -f xgen-mc

View File

@ -2179,3 +2179,61 @@ clutter_event_get_mode_group (const ClutterEvent *event)
return 0;
}
}
/**
* clutter_event_get_pad_event_details:
* @event: a pad event
* @number: (out) (optional): ring/strip/button number
* @mode: (out) (optional): pad mode as per the event
* @value: (out) (optional): event axis value
*
* Returns the details of a pad event.
*
* Returns: #TRUE if event details could be obtained
**/
gboolean
clutter_event_get_pad_event_details (const ClutterEvent *event,
guint *number,
guint *mode,
gdouble *value)
{
guint n, m;
gdouble v;
g_return_val_if_fail (event != NULL, FALSE);
g_return_val_if_fail (event->type == CLUTTER_PAD_BUTTON_PRESS ||
event->type == CLUTTER_PAD_BUTTON_RELEASE ||
event->type == CLUTTER_PAD_RING ||
event->type == CLUTTER_PAD_STRIP, FALSE);
switch (event->type)
{
case CLUTTER_PAD_BUTTON_PRESS:
case CLUTTER_PAD_BUTTON_RELEASE:
n = event->pad_button.button;
m = event->pad_button.mode;
v = 0.0;
break;
case CLUTTER_PAD_RING:
n = event->pad_ring.ring_number;
m = event->pad_ring.mode;
v = event->pad_ring.angle;
break;
case CLUTTER_PAD_STRIP:
n = event->pad_strip.strip_number;
m = event->pad_strip.mode;
v = event->pad_strip.value;
break;
default:
return FALSE;
}
if (number)
*number = n;
if (mode)
*mode = m;
if (value)
*value = v;
return TRUE;
}

View File

@ -778,6 +778,12 @@ ClutterScrollFinishFlags clutter_event_get_scroll_finish_flags (const Clut
CLUTTER_AVAILABLE_IN_ALL
guint clutter_event_get_mode_group (const ClutterEvent *event);
CLUTTER_AVAILABLE_IN_MUTTER
gboolean clutter_event_get_pad_event_details (const ClutterEvent *event,
guint *number,
guint *mode,
gdouble *value);
G_END_DECLS

View File

@ -2243,10 +2243,15 @@ clutter_input_device_get_device_node (ClutterInputDevice *device)
ClutterInputDeviceMapping
clutter_input_device_get_mapping_mode (ClutterInputDevice *device)
{
ClutterInputDeviceType device_type;
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device),
CLUTTER_INPUT_DEVICE_MAPPING_ABSOLUTE);
g_return_val_if_fail (clutter_input_device_get_device_type (device) ==
CLUTTER_TABLET_DEVICE,
device_type = clutter_input_device_get_device_type (device);
g_return_val_if_fail (device_type == CLUTTER_TABLET_DEVICE ||
device_type == CLUTTER_PEN_DEVICE ||
device_type == CLUTTER_ERASER_DEVICE,
CLUTTER_INPUT_DEVICE_MAPPING_ABSOLUTE);
return device->mapping_mode;
@ -2256,9 +2261,14 @@ void
clutter_input_device_set_mapping_mode (ClutterInputDevice *device,
ClutterInputDeviceMapping mapping)
{
ClutterInputDeviceType device_type;
g_return_if_fail (CLUTTER_IS_INPUT_DEVICE (device));
g_return_if_fail (clutter_input_device_get_device_type (device) ==
CLUTTER_TABLET_DEVICE);
device_type = clutter_input_device_get_device_type (device);
g_return_if_fail (device_type == CLUTTER_TABLET_DEVICE ||
device_type == CLUTTER_PEN_DEVICE ||
device_type == CLUTTER_ERASER_DEVICE);
if (device->mapping_mode == mapping)
return;

View File

@ -20,6 +20,7 @@
#include "clutter/clutter-stage-view.h"
#include <cairo-gobject.h>
#include <math.h>
enum
{
@ -38,7 +39,7 @@ static GParamSpec *obj_props[PROP_LAST];
typedef struct _ClutterStageViewPrivate
{
cairo_rectangle_int_t layout;
int scale;
float scale;
CoglFramebuffer *framebuffer;
CoglOffscreen *offscreen;
@ -143,7 +144,7 @@ clutter_stage_view_blit_offscreen (ClutterStageView *view,
cogl_framebuffer_pop_matrix (priv->framebuffer);
}
int
float
clutter_stage_view_get_scale (ClutterStageView *view)
{
ClutterStageViewPrivate *priv =
@ -241,7 +242,7 @@ clutter_stage_view_get_property (GObject *object,
g_value_set_boxed (value, priv->offscreen);
break;
case PROP_SCALE:
g_value_set_int (value, priv->scale);
g_value_set_float (value, priv->scale);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@ -266,13 +267,29 @@ clutter_stage_view_set_property (GObject *object,
priv->layout = *layout;
break;
case PROP_FRAMEBUFFER:
g_clear_pointer (&priv->framebuffer, cogl_object_unref);
priv->framebuffer = g_value_dup_boxed (value);
#ifndef G_DISABLE_CHECKS
if (priv->framebuffer)
{
int fb_width, fb_height;
fb_width = cogl_framebuffer_get_width (priv->framebuffer);
fb_height = cogl_framebuffer_get_height (priv->framebuffer);
g_warn_if_fail (fabsf (roundf (fb_width / priv->scale) -
fb_width / priv->scale) < FLT_EPSILON);
g_warn_if_fail (fabsf (roundf (fb_height / priv->scale) -
fb_height / priv->scale) < FLT_EPSILON);
}
#endif
break;
case PROP_OFFSCREEN:
g_clear_pointer (&priv->offscreen, cogl_object_unref);
priv->offscreen = g_value_dup_boxed (value);
break;
case PROP_SCALE:
priv->scale = g_value_get_int (value);
priv->scale = g_value_get_float (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@ -301,7 +318,7 @@ clutter_stage_view_init (ClutterStageView *view)
priv->dirty_viewport = TRUE;
priv->dirty_projection = TRUE;
priv->scale = 1;
priv->scale = 1.0;
}
static void
@ -322,6 +339,7 @@ clutter_stage_view_class_init (ClutterStageViewClass *klass)
"The view layout on the screen",
CAIRO_GOBJECT_TYPE_RECTANGLE_INT,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS);
obj_props[PROP_FRAMEBUFFER] =
@ -330,6 +348,7 @@ clutter_stage_view_class_init (ClutterStageViewClass *klass)
"The front buffer of the view",
COGL_TYPE_HANDLE,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS);
obj_props[PROP_OFFSCREEN] =
@ -338,16 +357,17 @@ clutter_stage_view_class_init (ClutterStageViewClass *klass)
"Framebuffer used as intermediate buffer",
COGL_TYPE_HANDLE,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS);
obj_props[PROP_SCALE] =
g_param_spec_int ("scale",
"View scale",
"The view scale",
1, G_MAXINT, 1,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS);
g_param_spec_float ("scale",
"View scale",
"The view scale",
0.5, G_MAXFLOAT, 1.0,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, PROP_LAST, obj_props);
}

View File

@ -61,7 +61,7 @@ void clutter_stage_view_blit_offscreen (ClutterStageView *view,
const cairo_rectangle_int_t *clip);
CLUTTER_AVAILABLE_IN_MUTTER
int clutter_stage_view_get_scale (ClutterStageView *view);
float clutter_stage_view_get_scale (ClutterStageView *view);
gboolean clutter_stage_view_is_dirty_viewport (ClutterStageView *view);

View File

@ -161,6 +161,7 @@ struct _ClutterStagePrivate
guint accept_focus : 1;
guint motion_events_enabled : 1;
guint has_custom_perspective : 1;
guint stage_was_relayout : 1;
};
enum
@ -961,6 +962,7 @@ _clutter_stage_process_queued_events (ClutterStage *stage)
ClutterEvent *next_event;
ClutterInputDevice *device;
ClutterInputDevice *next_device;
ClutterInputDeviceType device_type;
gboolean check_device = FALSE;
event = l->data;
@ -976,8 +978,16 @@ _clutter_stage_process_queued_events (ClutterStage *stage)
if (device != NULL && next_device != NULL)
check_device = TRUE;
/* Skip consecutive motion events coming from the same device */
if (priv->throttle_motion_events && next_event != NULL)
device_type = clutter_input_device_get_device_type (device);
/* Skip consecutive motion events coming from the same device,
* except those of tablet tools, since users of these events
* want no precision loss.
*/
if (priv->throttle_motion_events && next_event != NULL &&
device_type != CLUTTER_TABLET_DEVICE &&
device_type != CLUTTER_PEN_DEVICE &&
device_type != CLUTTER_ERASER_DEVICE)
{
if (event->type == CLUTTER_MOTION &&
(next_event->type == CLUTTER_MOTION ||
@ -1059,6 +1069,7 @@ _clutter_stage_maybe_relayout (ClutterActor *actor)
if (!CLUTTER_ACTOR_IN_RELAYOUT (stage))
{
priv->relayout_pending = FALSE;
priv->stage_was_relayout = TRUE;
CLUTTER_NOTE (ACTOR, "Recomputing layout");
@ -1129,6 +1140,58 @@ clutter_stage_do_redraw (ClutterStage *stage)
stage);
}
static GSList *
_clutter_stage_check_updated_pointers (ClutterStage *stage)
{
ClutterStagePrivate *priv = stage->priv;
ClutterDeviceManager *device_manager;
GSList *updating = NULL;
const GSList *devices;
cairo_rectangle_int_t clip;
ClutterPoint point;
gboolean has_clip;
has_clip = _clutter_stage_window_get_redraw_clip_bounds (priv->impl, &clip);
device_manager = clutter_device_manager_get_default ();
devices = clutter_device_manager_peek_devices (device_manager);
for (; devices != NULL; devices = devices->next)
{
ClutterInputDevice *dev = devices->data;
if (clutter_input_device_get_device_mode (dev) !=
CLUTTER_INPUT_MODE_MASTER)
continue;
switch (clutter_input_device_get_device_type (dev))
{
case CLUTTER_POINTER_DEVICE:
case CLUTTER_TABLET_DEVICE:
case CLUTTER_PEN_DEVICE:
case CLUTTER_ERASER_DEVICE:
case CLUTTER_CURSOR_DEVICE:
if (!clutter_input_device_get_coords (dev, NULL, &point))
continue;
if (!has_clip ||
(point.x >= clip.x && point.x < clip.x + clip.width &&
point.y >= clip.y && point.y < clip.y + clip.height))
updating = g_slist_prepend (updating, dev);
break;
default:
/* Any other devices don't need checking, either because they
* don't have x/y coordinates, or because they're implicitly
* grabbed on an actor by default as it's the case of
* touch(screens).
*/
break;
}
}
return updating;
}
/**
* _clutter_stage_do_update:
* @stage: A #ClutterStage
@ -1141,6 +1204,10 @@ gboolean
_clutter_stage_do_update (ClutterStage *stage)
{
ClutterStagePrivate *priv = stage->priv;
gboolean stage_was_relayout = priv->stage_was_relayout;
GSList *pointers = NULL;
priv->stage_was_relayout = FALSE;
/* if the stage is being destroyed, or if the destruction already
* happened and we don't have an StageWindow any more, then we
@ -1161,6 +1228,9 @@ _clutter_stage_do_update (ClutterStage *stage)
if (!priv->redraw_pending)
return FALSE;
if (stage_was_relayout)
pointers = _clutter_stage_check_updated_pointers (stage);
clutter_stage_maybe_finish_queue_redraws (stage);
clutter_stage_do_redraw (stage);
@ -1178,6 +1248,12 @@ _clutter_stage_do_update (ClutterStage *stage)
}
#endif /* CLUTTER_ENABLE_DEBUG */
while (pointers)
{
_clutter_input_device_update (pointers->data, NULL, TRUE);
pointers = g_slist_delete_link (pointers, pointers);
}
return TRUE;
}
@ -1369,9 +1445,9 @@ _clutter_stage_do_pick_on_view (ClutterStage *stage,
gint read_x;
gint read_y;
float fb_width, fb_height;
int fb_scale;
int viewport_offset_x;
int viewport_offset_y;
float fb_scale;
float viewport_offset_x;
float viewport_offset_y;
priv = stage->priv;
@ -1398,8 +1474,8 @@ _clutter_stage_do_pick_on_view (ClutterStage *stage,
if (G_LIKELY (!(clutter_pick_debug_flags & CLUTTER_DEBUG_DUMP_PICK_BUFFERS)))
{
CLUTTER_NOTE (PICK, "Pushing pick scissor clip x: %d, y: %d, 1x1",
dirty_x * fb_scale,
dirty_y * fb_scale);
(int) dirty_x * fb_scale,
(int) dirty_y * fb_scale);
cogl_framebuffer_push_scissor_clip (fb, dirty_x * fb_scale, dirty_y * fb_scale, 1, 1);
}
@ -3546,9 +3622,9 @@ _clutter_stage_maybe_setup_viewport (ClutterStage *stage,
{
cairo_rectangle_int_t view_layout;
ClutterPerspective perspective;
int fb_scale;
int viewport_offset_x;
int viewport_offset_y;
float fb_scale;
float viewport_offset_x;
float viewport_offset_y;
float z_2d;
CLUTTER_NOTE (PAINT,
@ -4644,6 +4720,7 @@ capture_view (ClutterStage *stage,
int stride;
CoglBitmap *bitmap;
cairo_rectangle_int_t view_layout;
float view_scale;
framebuffer = clutter_stage_view_get_framebuffer (view);
@ -4654,8 +4731,11 @@ capture_view (ClutterStage *stage,
clutter_stage_do_paint_view (stage, view, rect);
}
view_scale = clutter_stage_view_get_scale (view);
image = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
rect->width, rect->height);
rect->width * view_scale,
rect->height * view_scale);
cairo_surface_set_device_scale (image, view_scale, view_scale);
data = cairo_image_surface_get_data (image);
stride = cairo_image_surface_get_stride (image);
@ -4663,7 +4743,8 @@ capture_view (ClutterStage *stage,
backend = clutter_get_default_backend ();
context = clutter_backend_get_cogl_context (backend);
bitmap = cogl_bitmap_new_for_data (context,
rect->width, rect->height,
rect->width * view_scale,
rect->height * view_scale,
CLUTTER_CAIRO_FORMAT_ARGB32,
stride,
data);
@ -4671,8 +4752,8 @@ capture_view (ClutterStage *stage,
clutter_stage_view_get_layout (view, &view_layout);
cogl_framebuffer_read_pixels_into_bitmap (framebuffer,
rect->x - view_layout.x,
rect->y - view_layout.y,
(rect->x - view_layout.x) * view_scale,
(rect->y - view_layout.y) * view_scale,
COGL_READ_PIXELS_COLOR_BUFFER,
bitmap);

View File

@ -51,7 +51,9 @@
typedef struct _ClutterStageViewCoglPrivate
{
/* Stores a list of previous damaged areas in the stage coordinate space */
/*
* List of previous damaged areas in stage view framebuffer coordinate space.
*/
#define DAMAGE_HISTORY_MAX 16
#define DAMAGE_HISTORY(x) ((x) & (DAMAGE_HISTORY_MAX - 1))
cairo_rectangle_int_t damage_history[DAMAGE_HISTORY_MAX];
@ -435,13 +437,20 @@ fill_current_damage_history_and_step (ClutterStageView *view)
ClutterStageViewCoglPrivate *view_priv =
clutter_stage_view_cogl_get_instance_private (view_cogl);
cairo_rectangle_int_t view_rect;
cairo_rectangle_int_t *current_damage;
float fb_scale;
cairo_rectangle_int_t *current_fb_damage;
current_damage =
current_fb_damage =
&view_priv->damage_history[DAMAGE_HISTORY (view_priv->damage_index)];
clutter_stage_view_get_layout (view, &view_rect);
fb_scale = clutter_stage_view_get_scale (view);
*current_damage = view_rect;
*current_fb_damage = (cairo_rectangle_int_t) {
.x = 0,
.y = 0,
.width = view_rect.width * fb_scale,
.height = view_rect.height * fb_scale
};
view_priv->damage_index++;
}
@ -481,6 +490,40 @@ transform_swap_region_to_onscreen (ClutterStageView *view,
};
}
static void
calculate_scissor_region (cairo_rectangle_int_t *fb_clip_region,
int subpixel_compensation,
int fb_width,
int fb_height,
cairo_rectangle_int_t *out_scissor_rect)
{
int scissor_x;
int scissor_y;
int scissor_width;
int scissor_height;
scissor_x = fb_clip_region->x;
scissor_y = fb_clip_region->y;
scissor_width = fb_clip_region->width;
scissor_height = fb_clip_region->height;
if (fb_clip_region->x > 0)
scissor_x += subpixel_compensation;
if (fb_clip_region->y > 0)
scissor_y += subpixel_compensation;
if (fb_clip_region->x + fb_clip_region->width < fb_width)
scissor_width -= 2 * subpixel_compensation;
if (fb_clip_region->y + fb_clip_region->height < fb_height)
scissor_height -= 2 * subpixel_compensation;
*out_scissor_rect = (cairo_rectangle_int_t) {
.x = scissor_x,
.y = scissor_y,
.width = scissor_width,
.height = scissor_height
};
}
static gboolean
clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
ClutterStageView *view)
@ -501,13 +544,18 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
ClutterActor *wrapper;
cairo_rectangle_int_t redraw_clip;
cairo_rectangle_int_t swap_region;
cairo_rectangle_int_t clip_region;
cairo_rectangle_int_t fb_clip_region;
gboolean clip_region_empty;
int fb_scale;
float fb_scale;
int subpixel_compensation = 0;
int fb_width, fb_height;
wrapper = CLUTTER_ACTOR (stage_cogl->wrapper);
clutter_stage_view_get_layout (view, &view_rect);
fb_scale = clutter_stage_view_get_scale (view);
fb_width = cogl_framebuffer_get_width (fb);
fb_height = cogl_framebuffer_get_height (fb);
can_blit_sub_buffer =
cogl_is_onscreen (fb) &&
@ -542,11 +590,24 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
cogl_onscreen_get_frame_counter (COGL_ONSCREEN (fb)) > 3)
{
may_use_clipped_redraw = TRUE;
clip_region = redraw_clip;
if (fb_scale != floorf (fb_scale))
subpixel_compensation = ceilf (fb_scale);
fb_clip_region = (cairo_rectangle_int_t) {
.x = (floorf ((redraw_clip.x - view_rect.x) * fb_scale) -
subpixel_compensation),
.y = (floorf ((redraw_clip.y - view_rect.y) * fb_scale) -
subpixel_compensation),
.width = (ceilf (redraw_clip.width * fb_scale) +
(2 * subpixel_compensation)),
.height = (ceilf (redraw_clip.height * fb_scale) +
(2 * subpixel_compensation))
};
}
else
{
clip_region = (cairo_rectangle_int_t){ 0 };
fb_clip_region = (cairo_rectangle_int_t) { 0 };
}
if (may_use_clipped_redraw &&
@ -555,9 +616,7 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
else
use_clipped_redraw = FALSE;
clip_region_empty = may_use_clipped_redraw && clip_region.width == 0;
fb_scale = clutter_stage_view_get_scale (view);
clip_region_empty = may_use_clipped_redraw && fb_clip_region.width == 0;
swap_with_damage = FALSE;
if (has_buffer_age)
@ -565,34 +624,44 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
if (use_clipped_redraw && !clip_region_empty)
{
int age, i;
cairo_rectangle_int_t *current_damage =
cairo_rectangle_int_t *current_fb_damage =
&view_priv->damage_history[DAMAGE_HISTORY (view_priv->damage_index++)];
age = cogl_onscreen_get_buffer_age (COGL_ONSCREEN (fb));
if (valid_buffer_age (view_cogl, age))
{
*current_damage = clip_region;
cairo_rectangle_int_t damage_region;
*current_fb_damage = fb_clip_region;
for (i = 1; i <= age; i++)
{
cairo_rectangle_int_t *damage =
cairo_rectangle_int_t *fb_damage =
&view_priv->damage_history[DAMAGE_HISTORY (view_priv->damage_index - i - 1)];
_clutter_util_rectangle_union (&clip_region, damage, &clip_region);
_clutter_util_rectangle_union (&fb_clip_region,
fb_damage,
&fb_clip_region);
}
/* Update the bounding redraw clip state with the extra damage. */
damage_region = (cairo_rectangle_int_t) {
.x = view_rect.x + floorf (fb_clip_region.x / fb_scale),
.y = view_rect.y + floorf (fb_clip_region.y / fb_scale),
.width = ceilf (fb_clip_region.width / fb_scale),
.height = ceilf (fb_clip_region.height / fb_scale)
};
_clutter_util_rectangle_union (&stage_cogl->bounding_redraw_clip,
&clip_region,
&damage_region,
&stage_cogl->bounding_redraw_clip);
CLUTTER_NOTE (CLIPPING, "Reusing back buffer(age=%d) - repairing region: x=%d, y=%d, width=%d, height=%d\n",
age,
clip_region.x,
clip_region.y,
clip_region.width,
clip_region.height);
fb_clip_region.x,
fb_clip_region.y,
fb_clip_region.width,
fb_clip_region.height);
swap_with_damage = TRUE;
}
@ -600,7 +669,12 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
{
CLUTTER_NOTE (CLIPPING, "Invalid back buffer(age=%d): forcing full redraw\n", age);
use_clipped_redraw = FALSE;
*current_damage = view_rect;
*current_fb_damage = (cairo_rectangle_int_t) {
.x = 0,
.y = 0,
.width = view_rect.width * fb_scale,
.height = view_rect.height * fb_scale
};
}
}
else if (!use_clipped_redraw)
@ -616,26 +690,34 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
}
else if (use_clipped_redraw)
{
int scissor_x;
int scissor_y;
cairo_rectangle_int_t scissor_rect;
calculate_scissor_region (&fb_clip_region,
subpixel_compensation,
fb_width, fb_height,
&scissor_rect);
CLUTTER_NOTE (CLIPPING,
"Stage clip pushed: x=%d, y=%d, width=%d, height=%d\n",
clip_region.x,
clip_region.y,
clip_region.width,
clip_region.height);
scissor_rect.x,
scissor_rect.y,
scissor_rect.width,
scissor_rect.height);
stage_cogl->using_clipped_redraw = TRUE;
scissor_x = (clip_region.x - view_rect.x) * fb_scale;
scissor_y = (clip_region.y - view_rect.y) * fb_scale;
cogl_framebuffer_push_scissor_clip (fb,
scissor_x,
scissor_y,
clip_region.width * fb_scale,
clip_region.height * fb_scale);
paint_stage (stage_cogl, view, &clip_region);
scissor_rect.x,
scissor_rect.y,
scissor_rect.width,
scissor_rect.height);
paint_stage (stage_cogl, view,
&(cairo_rectangle_int_t) {
.x = view_rect.x + floorf ((fb_clip_region.x - 0) / fb_scale),
.y = view_rect.y + floorf ((fb_clip_region.y - 0) / fb_scale),
.width = ceilf ((fb_clip_region.width + 0) / fb_scale),
.height = ceilf ((fb_clip_region.height + 0) / fb_scale)
});
cogl_framebuffer_pop_clip (fb);
stage_cogl->using_clipped_redraw = FALSE;
@ -650,17 +732,25 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
may_use_clipped_redraw &&
!clip_region_empty)
{
int scissor_x;
int scissor_y;
cairo_rectangle_int_t scissor_rect;
calculate_scissor_region (&fb_clip_region,
subpixel_compensation,
fb_width, fb_height,
&scissor_rect);
scissor_x = (clip_region.x - view_rect.x) * fb_scale;;
scissor_y = (clip_region.y - view_rect.y) * fb_scale;
cogl_framebuffer_push_scissor_clip (fb,
scissor_x,
scissor_y,
clip_region.width * fb_scale,
clip_region.height * fb_scale);
paint_stage (stage_cogl, view, &clip_region);
scissor_rect.x,
scissor_rect.y,
scissor_rect.width,
scissor_rect.height);
paint_stage (stage_cogl, view,
&(cairo_rectangle_int_t) {
.x = view_rect.x + floorf (fb_clip_region.x / fb_scale),
.y = view_rect.y + floorf (fb_clip_region.y / fb_scale),
.width = ceilf (fb_clip_region.width / fb_scale),
.height = ceilf (fb_clip_region.height / fb_scale)
});
cogl_framebuffer_pop_clip (fb);
}
else
@ -723,12 +813,7 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
}
else if (use_clipped_redraw)
{
swap_region = (cairo_rectangle_int_t) {
.x = (clip_region.x - view_rect.x) * fb_scale,
.y = (clip_region.y - view_rect.y) * fb_scale,
.width = clip_region.width * fb_scale,
.height = clip_region.height * fb_scale,
};
swap_region = fb_clip_region;
g_assert (swap_region.width > 0);
do_swap_buffer = TRUE;
}
@ -810,9 +895,25 @@ clutter_stage_cogl_get_dirty_pixel (ClutterStageWindow *stage_window,
gboolean has_buffer_age =
cogl_is_onscreen (framebuffer) &&
cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_BUFFER_AGE);
cairo_rectangle_int_t *rect;
float fb_scale;
gboolean scale_is_fractional;
if (!has_buffer_age)
fb_scale = clutter_stage_view_get_scale (view);
if (fb_scale != floorf (fb_scale))
scale_is_fractional = TRUE;
else
scale_is_fractional = FALSE;
/*
* Buffer damage is tracked in the framebuffer coordinate space
* using the damage history. When fractional scaling is used, a
* coordinate on the stage might not correspond to the exact position of any
* physical pixel, which causes issues when painting using the pick mode.
*
* For now, always use the (0, 0) pixel for picking when using fractional
* framebuffer scaling.
*/
if (!has_buffer_age || scale_is_fractional)
{
*x = 0;
*y = 0;
@ -823,12 +924,13 @@ clutter_stage_cogl_get_dirty_pixel (ClutterStageWindow *stage_window,
ClutterStageViewCoglPrivate *view_priv =
clutter_stage_view_cogl_get_instance_private (view_cogl);
cairo_rectangle_int_t view_layout;
cairo_rectangle_int_t *fb_damage;
clutter_stage_view_get_layout (view, &view_layout);
rect = &view_priv->damage_history[DAMAGE_HISTORY (view_priv->damage_index - 1)];
*x = rect->x - view_layout.x;
*y = rect->y - view_layout.y;
fb_damage = &view_priv->damage_history[DAMAGE_HISTORY (view_priv->damage_index - 1)];
*x = fb_damage->x / fb_scale;
*y = fb_damage->y / fb_scale;
}
}

View File

@ -2602,6 +2602,21 @@ clutter_evdev_set_keyboard_layout_index (ClutterDeviceManager *evdev,
xkb_state_update_mask (state, depressed_mods, latched_mods, locked_mods, 0, 0, idx);
}
/**
* clutter_evdev_get_keyboard_layout_index: (skip)
*/
xkb_layout_index_t
clutter_evdev_get_keyboard_layout_index (ClutterDeviceManager *evdev)
{
ClutterDeviceManagerEvdev *manager_evdev;
struct xkb_state *state;
manager_evdev = CLUTTER_DEVICE_MANAGER_EVDEV (evdev);
state = manager_evdev->priv->main_seat->xkb;
return xkb_state_serialize_layout (state, XKB_STATE_LAYOUT_LOCKED);
}
/**
* clutter_evdev_set_keyboard_numlock: (skip)
* @evdev: the #ClutterDeviceManager created by the evdev backend

View File

@ -120,6 +120,9 @@ CLUTTER_AVAILABLE_IN_1_20
void clutter_evdev_set_keyboard_layout_index (ClutterDeviceManager *evdev,
xkb_layout_index_t idx);
CLUTTER_AVAILABLE_IN_MUTTER
xkb_layout_index_t clutter_evdev_get_keyboard_layout_index (ClutterDeviceManager *evdev);
CLUTTER_AVAILABLE_IN_1_26
void clutter_evdev_set_keyboard_numlock (ClutterDeviceManager *evdev,
gboolean numlock_state);

View File

@ -163,6 +163,9 @@ clutter_input_device_evdev_update_from_tool (ClutterInputDevice *device,
if (libinput_tablet_tool_has_slider (evdev_tool->tool))
_clutter_input_device_add_axis (device, CLUTTER_INPUT_AXIS_SLIDER, -1, 1, 0);
if (libinput_tablet_tool_has_wheel (evdev_tool->tool))
_clutter_input_device_add_axis (device, CLUTTER_INPUT_AXIS_WHEEL, -180, 180, 0);
g_object_thaw_notify (G_OBJECT (device));
}

View File

@ -66,6 +66,14 @@ static const char *clutter_input_axis_atom_names[] = {
#define N_AXIS_ATOMS G_N_ELEMENTS (clutter_input_axis_atom_names)
enum {
PAD_AXIS_FIRST = 3, /* First axes are always x/y/pressure, ignored in pads */
PAD_AXIS_STRIP1 = PAD_AXIS_FIRST,
PAD_AXIS_STRIP2,
PAD_AXIS_RING1,
PAD_AXIS_RING2,
};
static Atom clutter_input_axis_atoms[N_AXIS_ATOMS] = { 0, };
static void clutter_event_translator_iface_init (ClutterEventTranslatorIface *iface);
@ -359,6 +367,36 @@ get_device_node_path (ClutterBackendX11 *backend_x11,
return node_path;
}
static void
get_pad_features (XIDeviceInfo *info,
guint *n_rings,
guint *n_strips)
{
gint i, rings = 0, strips = 0;
for (i = PAD_AXIS_FIRST; i < info->num_classes; i++)
{
XIValuatorClassInfo *valuator = (XIValuatorClassInfo*) info->classes[i];
int axis = valuator->number;
if (valuator->type != XIValuatorClass)
continue;
if (valuator->max <= 1)
continue;
/* Ring/strip axes are fixed in pad devices as handled by the
* wacom driver. Match those to detect pad features.
*/
if (axis == PAD_AXIS_STRIP1 || axis == PAD_AXIS_STRIP2)
strips++;
else if (axis == PAD_AXIS_RING1 || axis == PAD_AXIS_RING2)
rings++;
}
*n_rings = rings;
*n_strips = strips;
}
static ClutterInputDevice *
create_device (ClutterDeviceManagerXI2 *manager_xi2,
ClutterBackendX11 *backend_x11,
@ -368,7 +406,7 @@ create_device (ClutterDeviceManagerXI2 *manager_xi2,
ClutterInputDevice *retval;
ClutterInputMode mode;
gboolean is_enabled;
guint num_touches = 0;
guint num_touches = 0, num_rings = 0, num_strips = 0;
gchar *vendor_id = NULL, *product_id = NULL, *node_path = NULL;
if (info->use == XIMasterKeyboard || info->use == XISlaveKeyboard)
@ -436,6 +474,12 @@ create_device (ClutterDeviceManagerXI2 *manager_xi2,
node_path = get_device_node_path (backend_x11, info);
}
if (source == CLUTTER_PAD_DEVICE)
{
is_enabled = TRUE;
get_pad_features (info, &num_rings, &num_strips);
}
retval = g_object_new (CLUTTER_TYPE_INPUT_DEVICE_XI2,
"name", info->name,
"id", info->deviceid,
@ -448,6 +492,8 @@ create_device (ClutterDeviceManagerXI2 *manager_xi2,
"vendor-id", vendor_id,
"product-id", product_id,
"device-node", node_path,
"n-rings", num_rings,
"n-strips", num_strips,
NULL);
translate_device_classes (backend_x11->xdpy, retval,
@ -847,6 +893,54 @@ translate_axes (ClutterInputDevice *device,
return retval;
}
static gboolean
translate_pad_axis (ClutterInputDevice *device,
XIValuatorState *valuators,
ClutterEventType *evtype,
guint *number,
gdouble *value)
{
double *values;
gint i;
values = valuators->values;
for (i = PAD_AXIS_FIRST; i < valuators->mask_len * 8; i++)
{
gdouble val;
guint axis_number = 0;
if (!XIMaskIsSet (valuators->mask, i))
continue;
val = *values++;
if (val <= 0)
continue;
_clutter_input_device_translate_axis (device, i, val, value);
if (i == PAD_AXIS_RING1 || i == PAD_AXIS_RING2)
{
*evtype = CLUTTER_PAD_RING;
(*value) *= 360.0;
}
else if (i == PAD_AXIS_STRIP1 || i == PAD_AXIS_STRIP2)
{
*evtype = CLUTTER_PAD_STRIP;
}
else
continue;
if (i == PAD_AXIS_STRIP2 || i == PAD_AXIS_RING2)
axis_number++;
*number = axis_number;
return TRUE;
}
return FALSE;
}
static void
translate_coords (ClutterStageX11 *stage_x11,
gdouble event_x,
@ -1025,6 +1119,54 @@ handle_property_event (ClutterDeviceManagerXI2 *manager_xi2,
}
}
static gboolean
translate_pad_event (ClutterEvent *event,
XIDeviceEvent *xev,
ClutterInputDevice *device)
{
gdouble value;
guint number;
if (!translate_pad_axis (device, &xev->valuators,
&event->any.type,
&number, &value))
return FALSE;
/* When touching a ring/strip a first XI_Motion event
* is generated. Use it to reset the pad state, so
* later events actually have a directionality.
*/
if (xev->evtype == XI_Motion)
value = -1;
if (event->any.type == CLUTTER_PAD_RING)
{
event->pad_ring.ring_number = number;
event->pad_ring.angle = value;
}
else
{
event->pad_strip.strip_number = number;
event->pad_strip.value = value;
}
event->any.time = xev->time;
clutter_event_set_device (event, device);
clutter_event_set_source_device (event, device);
CLUTTER_NOTE (EVENT,
"%s: win:0x%x, device:%d '%s', time:%d "
"(value:%f)",
event->any.type == CLUTTER_PAD_RING
? "pad ring "
: "pad strip",
(unsigned int) xev->event,
device->id,
device->device_name,
event->any.time, value);
return TRUE;
}
static ClutterTranslateReturn
clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
gpointer native,
@ -1206,15 +1348,23 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
XIAsyncDevice,
xev->time);
/* Ignore 4-7 buttons */
if (xev->detail >= 4 && xev->detail <= 7)
return CLUTTER_TRANSLATE_REMOVE;
event->any.stage = stage;
event->pad_button.type =
if (xev->detail >= 4 && xev->detail <= 7)
{
retval = CLUTTER_TRANSLATE_REMOVE;
if (xi_event->evtype == XI_ButtonPress &&
translate_pad_event (event, xev, source_device))
retval = CLUTTER_TRANSLATE_QUEUE;
break;
}
event->any.type =
(xi_event->evtype == XI_ButtonPress) ? CLUTTER_PAD_BUTTON_PRESS
: CLUTTER_PAD_BUTTON_RELEASE;
event->pad_button.time = xev->time;
event->pad_button.stage = stage;
event->any.time = xev->time;
/* The 4-7 button range is taken as non-existent on pad devices,
* let the buttons above that take over this range.
@ -1224,6 +1374,7 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
/* Pad buttons are 0-indexed */
event->pad_button.button = xev->detail - 1;
clutter_event_set_device (event, device);
clutter_event_set_source_device (event, source_device);
CLUTTER_NOTE (EVENT,
@ -1380,6 +1531,15 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
device = g_hash_table_lookup (manager_xi2->devices_by_id,
GINT_TO_POINTER (xev->deviceid));
if (clutter_input_device_get_device_type (source_device) == CLUTTER_PAD_DEVICE)
{
event->any.stage = stage;
if (translate_pad_event (event, xev, source_device))
retval = CLUTTER_TRANSLATE_QUEUE;
break;
}
/* Set the stage for core events coming out of nowhere (see bug #684509) */
if (clutter_input_device_get_device_mode (device) == CLUTTER_INPUT_MODE_MASTER &&
clutter_input_device_get_pointer_stage (device) == NULL &&

View File

@ -10,7 +10,6 @@ static const struct {
{ "Net/DndDragThreshold", "dnd-drag-threshold" },
{ "Gtk/FontName", "font-name" },
{ "Xft/Antialias", "font-antialias" },
{ "Xft/DPI", "font-dpi" },
{ "Xft/Hinting", "font-hinting" },
{ "Xft/HintStyle", "font-hint-style" },
{ "Xft/RGBA", "font-subpixel-order" },

View File

@ -110,7 +110,7 @@ LT_LIB_M
AC_HEADER_STDC
# required versions for dependencies
m4_define([glib_req_version], [2.44.0])
m4_define([glib_req_version], [2.53.2])
m4_define([cogl_req_version], [1.21.2])
m4_define([json_glib_req_version], [0.12.0])
m4_define([atk_req_version], [2.5.3])

View File

@ -407,8 +407,7 @@ test_scale_center (TestState *state)
g_assert (scale_x == 4.0);
g_assert (scale_y == 2.0);
g_assert (gravity == CLUTTER_GRAVITY_NONE);
assert_notifications (NOTIFY_SCALE_X | NOTIFY_SCALE_Y
| NOTIFY_SCALE_CENTER_X | NOTIFY_SCALE_CENTER_Y
assert_notifications (NOTIFY_SCALE_CENTER_X | NOTIFY_SCALE_CENTER_Y
| NOTIFY_SCALE_GRAVITY);
assert_coords (state, 100 + 10 - 10 * 4, 200 + 20 - 20 * 2,
100 + 10 + (RECT_WIDTH - 10) * 4,

View File

@ -1417,15 +1417,17 @@ _cogl_framebuffer_gl_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
&gl_intformat,
&gl_format,
&gl_type);
#if HAVE_COGL_GL
/* As we are reading pixels, we want to consider the bitmap according to
* its real pixel format, not the swizzled channels we pretend face to the
* pipeline.
*/
if ((format == COGL_PIXEL_FORMAT_BGRA_8888 ||
if ((ctx->driver == COGL_DRIVER_GL || ctx->driver == COGL_DRIVER_GL3) &&
(format == COGL_PIXEL_FORMAT_BGRA_8888 ||
format == COGL_PIXEL_FORMAT_BGRA_8888_PRE) &&
_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_TEXTURE_SWIZZLE))
gl_format = GL_BGRA;
#endif
/* NB: All offscreen rendering is done upside down so there is no need
* to flip in this case... */

View File

@ -2,14 +2,14 @@ AC_PREREQ(2.62)
m4_define([mutter_major_version], [3])
m4_define([mutter_minor_version], [25])
m4_define([mutter_micro_version], [1])
m4_define([mutter_micro_version], [91])
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])
m4_define([libmutter_api_version], [1])
AC_INIT([mutter], [mutter_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=mutter])
@ -72,7 +72,7 @@ AC_HEADER_STDC
PKG_PROG_PKG_CONFIG([0.21])
# Sets GLIB_GENMARSHAL and GLIB_MKENUMS
AM_PATH_GLIB_2_0([2.49.0])
AM_PATH_GLIB_2_0([2.53.2])
CANBERRA_GTK=libcanberra-gtk3
CANBERRA_GTK_VERSION=0.26
@ -275,7 +275,7 @@ AS_IF([test "$enable_egl_device" = "yes"], [
AC_DEFINE([HAVE_EGL_DEVICE],[1], [Defined if EGLDevice support is enabled])
])
MUTTER_WAYLAND_MODULES="wayland-server >= 1.6.90"
MUTTER_WAYLAND_MODULES="wayland-server >= 1.13.0"
AC_ARG_ENABLE(wayland,
AS_HELP_STRING([--disable-wayland], [disable mutter on wayland support]),,
@ -292,7 +292,7 @@ AS_IF([test "$have_wayland" = "yes"], [
AC_SUBST([WAYLAND_SCANNER])
AC_DEFINE([HAVE_WAYLAND],[1],[Define if you want to enable Wayland support])
PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.7],
PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.9],
[ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
])

View File

@ -18,7 +18,7 @@ gschema_in_files = \
gsettings_SCHEMAS = $(gschema_in_files:.xml.in=.xml)
%.gschema.xml: %.gschema.xml.in Makefile
$(AM_V_GEN) sed -e 's|@GETTEXT_DOMAIN[@]|$(GETTEXT_DOMAIN)|g' \
$(AM_V_GEN) sed -e 's|@GETTEXT_DOMAIN[@]|$(GETTEXT_PACKAGE)|g' \
$< > $@ || rm $@
@GSETTINGS_RULES@

View File

@ -1,6 +1,6 @@
<schemalist>
<schema id="org.gnome.mutter" path="/org/gnome/mutter/"
gettext-domain="@GETTEXT_DOMAIN">
gettext-domain="@GETTEXT_DOMAIN@">
<key name="overlay-key" type="s">
<default>'Super_L'</default>
@ -146,5 +146,15 @@
<summary>Cancel tab popup</summary>
</key>
<key name="switch-monitor" type="as">
<default><![CDATA[['<Super>p','XF86Display']]]></default>
<summary>Switch monitor configurations</summary>
</key>
<key name="rotate-monitor" type="as">
<default><![CDATA[['XF86RotateWindows']]]></default>
<summary>Rotates the built-in monitor configuration</summary>
</key>
</schema>
</schemalist>

View File

@ -49,5 +49,9 @@
<default><![CDATA[['<Primary><Alt>F12']]]></default>
<summary>Switch to VT 12</summary>
</key>
<key name="restore-shortcuts" type="as">
<default><![CDATA[['<Shift><Control>Escape']]]></default>
<summary>Re-enable shortcuts</summary>
</key>
</schema>
</schemalist>

View File

@ -13,18 +13,18 @@ src/compositor/meta-background.c
src/core/bell.c
src/core/core.c
src/core/display.c
src/core/errors.c
src/core/keybindings.c
src/core/main.c
src/core/meta-close-dialog-default.c
src/core/mutter.c
src/core/prefs.c
src/core/screen.c
src/core/util.c
src/core/window.c
src/ui/frames.c
src/ui/theme.c
src/wayland/meta-wayland-tablet-pad.c
src/x11/meta-x11-display.c
src/x11/meta-x11-errors.c
src/x11/session.c
src/x11/window-props.c
src/x11/xprops.c

411
po/ar.po
View File

@ -4,14 +4,15 @@
# Arafat Medini <lumina@silverpen.de>, 2003.
# Abdulaziz Al-Arfaj <alarfaj0@yahoo.com>, 2004.
# Djihed Afifi <djihed@gmail.com>, 2006.
# Khaled Hosny <khaledhosny@eglug.org>, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015.
# Khaled Hosny <khaledhosny@eglug.org>, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2017.
# Anas Afif Emad <anas.e87@gmail.com>, 2008.
msgid ""
msgstr ""
"Project-Id-Version: metacity.HEAD\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-03-23 21:38+0200\n"
"PO-Revision-Date: 2015-03-23 21:45+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-06-18 21:26+0200\n"
"PO-Revision-Date: 2017-06-18 21:27+0200\n"
"Last-Translator: Khaled Hosny <khaledhosny@eglug.org>\n"
"Language-Team: Arabic <doc@arabeyes.org>\n"
"Language: ar\n"
@ -20,524 +21,568 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
"X-Generator: Virtaal 0.7.1\n"
"X-Generator: Virtaal 1.0.0-beta1\n"
"X-Project-Style: gnome\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 "مَتَر"
#: ../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 "المغير الذي سيُستعمل لتمديد عمليات إدارة النوافذ "
#: ../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."
"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 ""
#: ../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 "
"the parent window."
msgstr ""
#: ../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 "
"area. Dropping windows on the top screen edge maximizes them completely."
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 "
"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 ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:9
#: data/org.gnome.mutter.gschema.xml.in:50
msgid "Workspaces only on primary"
msgstr ""
#: ../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 ""
#: ../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 "
"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 ""
#: ../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 "
"The amount of total draggable borders. If the themes 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 ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:21
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “scale-monitor-"
"framebuffer” — makes mutter default to layout logical monitors in a logical "
"pixel coordinate space, while scaling monitor framebuffers instead of window "
"content, to manage HiDPI monitors. Does not require a restart. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:151
msgid "Select window from tab popup"
msgstr ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:22
#: data/org.gnome.mutter.gschema.xml.in:156
msgid "Cancel tab popup"
msgstr ""
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:1
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
#, fuzzy
msgid "Switch to VT 1"
msgstr "انتقل إلى مساحة العمل 1"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:2
#: data/org.gnome.mutter.wayland.gschema.xml.in:10
#, fuzzy
msgid "Switch to VT 2"
msgstr "انتقل إلى مساحة العمل 2"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:3
#: data/org.gnome.mutter.wayland.gschema.xml.in:14
#, fuzzy
msgid "Switch to VT 3"
msgstr "انتقل إلى مساحة العمل 3"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:4
#: data/org.gnome.mutter.wayland.gschema.xml.in:18
#, fuzzy
msgid "Switch to VT 4"
msgstr "انتقل إلى مساحة العمل 4"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:5
#: data/org.gnome.mutter.wayland.gschema.xml.in:22
#, fuzzy
msgid "Switch to VT 5"
msgstr "انتقل إلى مساحة العمل 5"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:6
#: data/org.gnome.mutter.wayland.gschema.xml.in:26
#, fuzzy
msgid "Switch to VT 6"
msgstr "انتقل إلى مساحة العمل 6"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:7
#: data/org.gnome.mutter.wayland.gschema.xml.in:30
#, fuzzy
msgid "Switch to VT 7"
msgstr "انتقل إلى مساحة العمل 7"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
#: data/org.gnome.mutter.wayland.gschema.xml.in:34
#, fuzzy
msgid "Switch to VT 8"
msgstr "انتقل إلى مساحة العمل 8"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
#: data/org.gnome.mutter.wayland.gschema.xml.in:38
#, fuzzy
msgid "Switch to VT 9"
msgstr "انتقل إلى مساحة العمل 9"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
#: data/org.gnome.mutter.wayland.gschema.xml.in:42
#, fuzzy
msgid "Switch to VT 10"
msgstr "انتقل إلى مساحة العمل 10"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
#: data/org.gnome.mutter.wayland.gschema.xml.in:46
#, fuzzy
msgid "Switch to VT 11"
msgstr "انتقل إلى مساحة العمل 11"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
#: data/org.gnome.mutter.wayland.gschema.xml.in:50
#, fuzzy
msgid "Switch to VT 12"
msgstr "انتقل إلى مساحة العمل 12"
#: ../src/backends/meta-monitor-manager.c:364
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1866
#, c-format
msgid "Mode Switch (Group %d)"
msgstr ""
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1888
msgid "Switch monitor"
msgstr "غيّر الشاشة"
#: src/backends/meta-input-settings.c:1890
msgid "Show on-screen help"
msgstr ""
#: src/backends/meta-monitor-manager.c:879
msgid "Built-in display"
msgstr "شاشة مدمجة"
#: ../src/backends/meta-monitor-manager.c:391
#: src/backends/meta-monitor-manager.c:902
msgid "Unknown"
msgstr "غير معروفة"
#: ../src/backends/meta-monitor-manager.c:393
#: src/backends/meta-monitor-manager.c:904
msgid "Unknown Display"
msgstr "شاشة غير معروفة"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: ../src/backends/meta-monitor-manager.c:401
#: src/backends/meta-monitor-manager.c:912
#, 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
#, c-format
#: src/compositor/compositor.c:476
#, fuzzy, 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 "يعمل مدير مزج آخر على الشاشة %i والعرض \"%s\"."
#: ../src/core/bell.c:185
#: src/core/bell.c:194
msgid "Bell event"
msgstr "حدث جرس"
#: ../src/core/delete.c:127
#: src/core/display.c:608
#, fuzzy, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr "فشل فتح عرض نظام نوافذ إكس '%s'\n"
#: src/core/main.c:189
msgid "Disable connection to session manager"
msgstr "عطّل الاتصال بمدير الجلسة"
#: src/core/main.c:195
msgid "Replace the running window manager"
msgstr "استبدل بمدير النوافذ الذي يعمل"
#: src/core/main.c:201
msgid "Specify session management ID"
msgstr "حدّد رقم هويّة إدارة الجلسة"
#: src/core/main.c:206
msgid "X Display to use"
msgstr "معراض س الذي سيستعمل"
#: src/core/main.c:212
msgid "Initialize session from savefile"
msgstr "ابدأ الجلسة من ملف محفوظ"
#: src/core/main.c:218
msgid "Make X calls synchronous"
msgstr "اجعل نداءات س متزامنة"
#: src/core/main.c:225
msgid "Run as a wayland compositor"
msgstr ""
#: src/core/main.c:231
msgid "Run as a nested compositor"
msgstr ""
#: src/core/main.c:239
msgid "Run as a full display server, rather than nested"
msgstr ""
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "”‏%s“ لا يستجيب."
#: ../src/core/delete.c:129
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "لا يستجيب التطبيق"
#: ../src/core/delete.c:134
#: src/core/meta-close-dialog-default.c:154
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
msgid "_Wait"
msgstr "ا_نتظر"
#: ../src/core/delete.c:141
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "أ_جبر الإنهاء"
#: ../src/core/display.c:562
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "فشل فتح عرض نظام نوافذ إكس '%s'\n"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "ا_نتظر"
#: ../src/core/main.c:176
msgid "Disable connection to session manager"
msgstr "عطّل الاتصال بمدير الجلسة"
#: ../src/core/main.c:182
msgid "Replace the running window manager"
msgstr "استبدل بمدير النوافذ الذي يعمل"
#: ../src/core/main.c:188
msgid "Specify session management ID"
msgstr "حدّد رقم هويّة إدارة الجلسة"
#: ../src/core/main.c:193
msgid "X Display to use"
msgstr "معراض س الذي سيستعمل"
#: ../src/core/main.c:199
msgid "Initialize session from savefile"
msgstr "ابدأ الجلسة من ملف محفوظ"
#: ../src/core/main.c:205
msgid "Make X calls synchronous"
msgstr "اجعل نداءات س متزامنة"
#: ../src/core/main.c:212
msgid "Run as a wayland compositor"
msgstr ""
#: ../src/core/main.c:220
msgid "Run as a full display server, rather than nested"
msgstr ""
#: ../src/core/mutter.c:39
#, c-format
#: src/core/mutter.c:39
#, fuzzy, 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"
@ -547,46 +592,52 @@ 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 "ملحق مَتَر الذي سيُستخدم"
#: ../src/core/prefs.c:2004
#: src/core/prefs.c:1997
#, c-format
msgid "Workspace %d"
msgstr "مساحة العمل %d"
#: ../src/core/screen.c:525
#, c-format
#: src/core/screen.c:580
#, fuzzy, 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 ""
"الشاشة \"%s\" لها مدير نوافذ بالفعل، حاول استعمال خيار التبديل --replace "
"لتحُلّ محلّ مدير النوافذ الحالي."
#: ../src/core/screen.c:607
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
#: src/core/screen.c:665
#, fuzzy, c-format
msgid "Screen %d on display %s is invalid\n"
msgstr "الشاشة %d على العرض '%s' غير صحيحة\n"
#: ../src/core/util.c:118
#: src/core/util.c:120
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "جُمِّع مَتَر دون دعم للنمط المطنب\n"
#: ../src/x11/session.c:1815
#: src/wayland/meta-wayland-tablet-pad.c:563
#, c-format
msgid "Mode Switch: Mode %d"
msgstr ""
#: src/x11/session.c:1815
#, fuzzy
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 ""
"هذه النوافذ لا تدعم &quot;احفظ الضبط الحالي&quot; يجب إعادة تشغيلها يدويا "
"عند الولوج المرة القادمة."
#: ../src/x11/window-props.c:549
#: src/x11/window-props.c:559
#, c-format
msgid "%s (on %s)"
msgstr "%s (على %s)"

116
po/ca.po
View File

@ -13,16 +13,16 @@ msgstr ""
"Project-Id-Version: metacity 2.24\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-04-21 21:33+0000\n"
"PO-Revision-Date: 2016-03-13 14:45+0100\n"
"Last-Translator: Gil Forcada <gilforcada@guifi.net>\n"
"POT-Creation-Date: 2017-08-21 04:46+0000\n"
"PO-Revision-Date: 2017-08-25 13:23+0200\n"
"Last-Translator: Jordi Mas <jmas@softcatala.org>\n"
"Language-Team: Catalan <tradgnome@softcatala.org>\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bits\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Gtranslator 2.91.6\n"
"X-Generator: Poedit 2.0.1\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@ -105,10 +105,8 @@ msgid "Switch to previous window of an application"
msgstr "Canvia a la finestra anterior d'una aplicació"
#: data/50-mutter-navigation.xml:76
#, fuzzy
#| msgid "Switch system controls directly"
msgid "Switch system controls"
msgstr "Canvia immediatament entre els controls del sistema"
msgstr "Canvia els controls del sistema"
#: data/50-mutter-navigation.xml:81
msgid "Switch to previous system control"
@ -279,12 +277,6 @@ msgstr ""
"finestres"
#: data/org.gnome.mutter.gschema.xml.in:8
#, fuzzy
#| 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 "
@ -333,11 +325,6 @@ msgid "Workspaces are managed dynamically"
msgstr "Els espais de treball es gestionen dinàmicament"
#: data/org.gnome.mutter.gschema.xml.in:41
#, fuzzy
#| 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 theres a "
"static number of workspaces (determined by the num-workspaces key in org."
@ -376,11 +363,6 @@ msgid "Delay focus changes until the pointer stops moving"
msgstr "Retarda el canvi del focus fins que s'aturi el punter"
#: data/org.gnome.mutter.gschema.xml.in:69
#, fuzzy
#| 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 "
@ -395,10 +377,6 @@ msgid "Draggable border width"
msgstr "Amplada del contorn arrossegable"
#: data/org.gnome.mutter.gschema.xml.in:80
#, fuzzy
#| 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 themes visible borders are "
"not enough, invisible borders will be added to meet this value."
@ -435,7 +413,7 @@ msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr ""
msgstr "Habilita les funcionalitats experimentals"
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
@ -457,6 +435,14 @@ msgstr "Selecció de finestra entre les emergents d'una pestanya"
msgid "Cancel tab popup"
msgstr "Cancel·lació de les finestres emergents a les pestanyes"
#: data/org.gnome.mutter.gschema.xml.in:151
msgid "Switch monitor configurations"
msgstr "Canvia configuracions de monitor"
#: data/org.gnome.mutter.gschema.xml.in:156
msgid "Rotates the built-in monitor configuration"
msgstr "Gira la configuració del monitor integrada"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Canvia al terminal virtual 1"
@ -505,10 +491,14 @@ msgstr "Canvia al terminal virtual 11"
msgid "Switch to VT 12"
msgstr "Canvia al terminal virtual 12"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Torna a habilitar les dreceres"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1848
#: src/backends/meta-input-settings.c:2151
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Mode de commutació (grup %d)"
@ -516,37 +506,37 @@ msgstr "Mode de commutació (grup %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1870
#: src/backends/meta-input-settings.c:2174
msgid "Switch monitor"
msgstr "Commuta el monitor"
#: src/backends/meta-input-settings.c:1872
#: src/backends/meta-input-settings.c:2176
msgid "Show on-screen help"
msgstr "Mostra l'ajuda en pantalla"
#: src/backends/meta-monitor-manager.c:783
#: src/backends/meta-monitor-manager.c:903
msgid "Built-in display"
msgstr "Pantalla integrada"
#: src/backends/meta-monitor-manager.c:806
#: src/backends/meta-monitor-manager.c:926
msgid "Unknown"
msgstr "Desconeguda"
#: src/backends/meta-monitor-manager.c:808
#: src/backends/meta-monitor-manager.c:928
msgid "Unknown Display"
msgstr "Pantalla desconeguda"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:816
#: src/backends/meta-monitor-manager.c:936
#, 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:474
#: src/compositor/compositor.c:476
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@ -558,32 +548,6 @@ msgstr ""
msgid "Bell event"
msgstr "Esdeveniment de campana"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "«%s» no està responent."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "L'aplicació no està responent."
#: 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 ""
"Podeu esperar un moment perquè continuï o podeu forçar-ne la sortida "
"completa."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Força'n la sortida"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Espera"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
@ -631,6 +595,32 @@ msgstr "Funciona com a compositor imbricat"
msgid "Run as a full display server, rather than nested"
msgstr "Funciona com a servidor de pantalla completa, en comptes d'imbricat"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "«%s» no està responent."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "L'aplicació no està responent."
#: src/core/meta-close-dialog-default.c:154
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Podeu esperar un moment perquè continuï o podeu forçar-ne la sortida "
"completa."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Força'n la sortida"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Espera"
#: src/core/mutter.c:39
#, c-format
msgid ""

126
po/cs.po
View File

@ -13,10 +13,10 @@ msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-03-07 12:40+0000\n"
"PO-Revision-Date: 2017-03-09 07:51+0100\n"
"POT-Creation-Date: 2017-08-21 04:46+0000\n"
"PO-Revision-Date: 2017-08-22 18:29+0200\n"
"Last-Translator: Marek Černocký <marek@manet.cz>\n"
"Language-Team: čeština <gnome-cs-list@gnome.org>\n"
"Language-Team: čeština <gnome-cs-list@gnome.org>>\n"
"Language: cs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -361,9 +361,8 @@ msgid ""
"focus will not be changed immediately when entering a window, but only after "
"the pointer stops moving."
msgstr ""
"Je-li zapnuto a režim zaměření je buď „sloppy“ nebo „mouse“, pak se "
"zaměření nezmění hned, když vstoupíte do kona, ale až se přestane pohybovat "
"ukazatel."
"Je-li zapnuto a režim zaměření je buď „sloppy“ nebo „mouse“, pak se zaměření "
"nezmění hned, když vstoupíte do kona, ale až se přestane pohybovat ukazatel."
#: data/org.gnome.mutter.gschema.xml.in:79
msgid "Draggable border width"
@ -401,14 +400,48 @@ 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:120
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "Povolit experimentální funkce"
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “scale-monitor-framebuffer” — makes "
"mutter default to layout logical monitors in a logical pixel coordinate "
"space, while scaling monitor framebuffers instead of window content, to "
"manage HiDPI monitors. Does not require a restart."
msgstr ""
"Chcete-li povolit experimentální funkce, přidejte klíčové slovo funkce do "
"seznamu. Zda funkce vyžaduje restartování kompozitoru, závisí na dané "
"funkci. Ne u každé experimentální funkce je vyžadováno, aby byla stále "
"dostupná nebo konfigurovatelná. Neočekávejte, že by bylo v tomto nastavení "
"přidáno něco, co by do budoucna přineslo vylepšení. V současné době jsou "
"možná tato klíčová slova: • „scale-monitor-framebuffer“ zajistí, "
"aby byl mutter výchozí pro logické uspořádání monitorů v logickém "
"souřadnicovém prostoru pixelů, zatímco škáluje přímo v grafické vyrovnávací "
"paměti, namísto v obsahu oken, aby se postaral o správu montorů s HiDPI. "
"Nevyžaduje restart."
#: data/org.gnome.mutter.gschema.xml.in:141
msgid "Select window from tab popup"
msgstr "Vybrat okno z překryvné nabídky tabulátoru"
#: data/org.gnome.mutter.gschema.xml.in:125
#: data/org.gnome.mutter.gschema.xml.in:146
msgid "Cancel tab popup"
msgstr "Zrušit překryvné okno tabulátoru"
#: data/org.gnome.mutter.gschema.xml.in:151
msgid "Switch monitor configurations"
msgstr "Přepnout nastavení monitoru"
#: data/org.gnome.mutter.gschema.xml.in:156
msgid "Rotates the built-in monitor configuration"
msgstr "Postupně mění vestavěná nastavení monitoru"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Přepnout na VT 1"
@ -457,10 +490,14 @@ msgstr "Přepnout na VT 11"
msgid "Switch to VT 12"
msgstr "Přepnout na VT 12"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Znovu povolit klávesové zkratky"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1800
#: src/backends/meta-input-settings.c:2151
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Přepínač režimu (skupina %d)"
@ -468,37 +505,37 @@ 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:1822
#: src/backends/meta-input-settings.c:2174
msgid "Switch monitor"
msgstr "Přepnout monitor"
#: src/backends/meta-input-settings.c:1824
#: src/backends/meta-input-settings.c:2176
msgid "Show on-screen help"
msgstr "Zobrazit nápovědu na obrazovce"
#: src/backends/meta-monitor-manager.c:675
#: src/backends/meta-monitor-manager.c:903
msgid "Built-in display"
msgstr "Vestavěný displej"
#: src/backends/meta-monitor-manager.c:698
#: src/backends/meta-monitor-manager.c:926
msgid "Unknown"
msgstr "Neznámý"
#: src/backends/meta-monitor-manager.c:700
#: src/backends/meta-monitor-manager.c:928
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:708
#: src/backends/meta-monitor-manager.c:936
#, 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:474
#: src/compositor/compositor.c:476
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@ -508,32 +545,6 @@ msgstr "Jiný kompozitní správce již běží na obrazovce %i displeje „%s
msgid "Bell event"
msgstr "Událost zvonku"
#. 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
msgid "Application is not responding."
msgstr "Aplikace nereaguje."
#: 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 ""
"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 "_Force Quit"
msgstr "_Vynutit ukončení"
#: 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"
@ -575,6 +586,32 @@ msgstr "Spustit jako podkladový kompozitor"
msgid "Run as a full display server, rather than nested"
msgstr "Spustit jako plnohodnotný server displeje, nikoliv vnořeně"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "„%s“ nereaguje."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "Aplikace nereaguje."
#: src/core/meta-close-dialog-default.c:154
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Je možné chvíli počkat, aby aplikace mohla pokračovat, nebo si vynutit úplné "
"ukončení aplikace."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Vynutit ukončení"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Počkat"
#: src/core/mutter.c:39
#, c-format
msgid ""
@ -632,11 +669,10 @@ msgid ""
"These windows do not support “save current setup” and will have to be "
"restarted manually next time you log in."
msgstr ""
"Tato okna nepodporují „uložení aktuálního nastavení“ a po svém "
"příštím přihlášení je budete muset spustit ručně."
"Tato okna nepodporují „uložení aktuálního nastavení“ a po svém příštím "
"přihlášení je budete muset spustit ručně."
#: src/x11/window-props.c:559
#, c-format
msgid "%s (on %s)"
msgstr "%s (na %s)"

159
po/es.po
View File

@ -12,10 +12,10 @@
msgid ""
msgstr ""
"Project-Id-Version: mutter.master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"Report-Msgid-Bugs-To: https://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-17 11:38+0100\n"
"POT-Creation-Date: 2017-08-02 10:05+0000\n"
"PO-Revision-Date: 2017-08-03 09:59+0200\n"
"Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n"
"Language-Team: es <gnome-es-list@gnome.org>\n"
"Language: es\n"
@ -275,11 +275,6 @@ msgstr ""
"Modificador que usar para extender las operaciones de gestión sobre ventanas"
#: 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 "
@ -328,10 +323,6 @@ msgid "Workspaces are managed dynamically"
msgstr "Las áreas de trabajo se gestionan dinámicamente"
#: 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 theres a "
"static number of workspaces (determined by the num-workspaces key in org."
@ -370,10 +361,6 @@ 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: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 "
@ -388,9 +375,6 @@ msgid "Draggable border width"
msgstr "Anchura arrastrable del borde"
#: 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 themes visible borders are "
"not enough, invisible borders will be added to meet this value."
@ -425,14 +409,57 @@ 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:120
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "Activar las características experimentales"
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “scale-monitor-"
"framebuffer” — makes mutter default to layout logical monitors in a logical "
"pixel coordinate space, while scaling monitor framebuffers instead of window "
"content, to manage HiDPI monitors. Does not require a restart. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
msgstr ""
"Para activar las características experimentales, añada la palabra clave de "
"la característica a la lista. Depende de la característica que se deba "
"reiniciar o no el compositor. Cualquier característica experimental puede no "
"estar disponible o ser configurable. No espere que lo que se añada en este "
"escenario sirva como prueba futura. Las palabras clave actualmente "
"disponibles son: • \"monitor-config-manager\" - utiliza el nuevo sistema de "
"configuración del monitor, destinado a sustituir el antiguo. Esto permite "
"que las aplicaciones de configuración usen una API de configuración de nivel "
"superior, así como la capacidad de configurar el escalado de monitores "
"lógicos. • \"scale-monitor-framebuffer\" - convierte a mutter en ña manera "
"predeterminada de disponer monitores lógicos en un espacio lógico de "
"coordenadas de píxeles, al escalar framebuffers de monitores framebuffers en "
"lugar del contenido de ventana, para administrar monitores HiDPI. No "
"requiere un reinicio. También es necesario activar \"monitor-config-manager"
"\" para activar esta función."
#: data/org.gnome.mutter.gschema.xml.in:151
msgid "Select window from tab popup"
msgstr "Seleccionar ventana de la pestaña emergente"
#: data/org.gnome.mutter.gschema.xml.in:125
#: data/org.gnome.mutter.gschema.xml.in:156
msgid "Cancel tab popup"
msgstr "Cancelar pestaña emergente"
#: data/org.gnome.mutter.gschema.xml.in:161
msgid "Switch monitor configurations"
msgstr "Cambiar la configuración del monitor"
#: data/org.gnome.mutter.gschema.xml.in:166
msgid "Rotates the built-in monitor configuration"
msgstr "Rota la configuración del monitor empotrado"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Cambiar al VT 1"
@ -481,53 +508,53 @@ msgstr "Cambiar al VT 11"
msgid "Switch to VT 12"
msgstr "Cambiar al VT 12"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Volver a activar los atajos"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1759
#: src/backends/meta-input-settings.c:2118
#, 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
#: src/backends/meta-input-settings.c:2141
msgid "Switch monitor"
msgstr "Cambiar monitor"
#: src/backends/meta-input-settings.c:1783
#: src/backends/meta-input-settings.c:2143
msgid "Show on-screen help"
msgstr "Mostrar la ayuda en pantalla"
#: src/backends/meta-monitor-manager.c:675
#: src/backends/meta-monitor-manager.c:927
msgid "Built-in display"
msgstr "Pantalla integrada"
#: src/backends/meta-monitor-manager.c:698
#: src/backends/meta-monitor-manager.c:950
msgid "Unknown"
msgstr "Desconocida"
#: src/backends/meta-monitor-manager.c:700
#: src/backends/meta-monitor-manager.c:952
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:708
#: src/backends/meta-monitor-manager.c:960
#, 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:471
#: src/compositor/compositor.c:476
#, 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”."
msgstr ""
@ -538,35 +565,8 @@ msgstr ""
msgid "Bell event"
msgstr "Evento de campana"
#. 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
msgid "Application is not responding."
msgstr "La aplicación no está respondiendo."
#: 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 ""
"Puede elegir esperar un rato para ver si continua o forzar la aplicación "
"para cerrarla completamente."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Forzar la salida"
#: 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"
msgstr "Ocurrió un error al abrir la pantalla de X Window System «%s»\n"
@ -606,14 +606,34 @@ msgstr "Ejecutar como compositor anidado"
msgid "Run as a full display server, rather than nested"
msgstr "Ejecutar como servidor completo, en lugar de anidado"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "«%s» no está respondiendo."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "La aplicación no está respondiendo."
#: src/core/meta-close-dialog-default.c:154
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Puede elegir esperar un rato para ver si continua o forzar la aplicación "
"para cerrarla completamente."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Forzar la salida"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Esperar"
#: 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 © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
@ -643,9 +663,6 @@ msgstr "Área de trabajo %d"
#: 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."
@ -655,7 +672,6 @@ msgstr ""
#: 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 "La ventana %d en la pantalla «%s» no es válida\n"
@ -669,9 +685,6 @@ msgid "Mode Switch: Mode %d"
msgstr "Cambiar modo: modo %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."
msgid ""
"These windows do not support “save current setup” and will have to be "
"restarted manually next time you log in."

125
po/fr.po
View File

@ -17,10 +17,10 @@
msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"Report-Msgid-Bugs-To: https://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-17 21:09+0100\n"
"POT-Creation-Date: 2017-08-13 15:47+0000\n"
"PO-Revision-Date: 2017-08-15 09:16+0200\n"
"Last-Translator: Claude Paroz <claude@2xlibre.net>\n"
"Language-Team: GNOME French Team <gnomefr@traduc.org>\n"
"Language: fr\n"
@ -410,16 +410,59 @@ msgstr ""
"Si true (vrai), les nouvelles fenêtres seront toujours placées au centre de "
"l'écran actif du moniteur."
#: data/org.gnome.mutter.gschema.xml.in:120
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "Activer les fonctionnalités expérimentales"
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “scale-monitor-"
"framebuffer” — makes mutter default to layout logical monitors in a logical "
"pixel coordinate space, while scaling monitor framebuffers instead of window "
"content, to manage HiDPI monitors. Does not require a restart. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
msgstr ""
"Pour activer les fonctionnalités expérimentales, ajoutez le mot-clé de la "
"fonctionnalité dans la liste. Selon la fonctionnalité, il peut être nécessaire "
"de redémarrer le compositeur. Chaque fonctionnalité expérimentale peut "
"disparaître ou ne plus être configurable. N'attendez pas à ce que le contenu de "
"ce réglage soit stable dans le temps. Les mots-clés actuellement possibles "
"sont : • « monitor-config-manager » — utiliser le nouveau système de "
"configuration de moniteur qui remplacera l'ancien à terme. Cela active une "
"API de configuration de plus haut niveau exploitable par les applications de "
"configuration. Il permet aussi de configurer par échelle de moniteur logique. "
"• « scale-monitor-framebuffer » — demande à mutter d'utiliser par défaut une "
"disposition par moniteur logique dans un espace de coordonnées de pixels logique, "
"tout en mettant à l'échelle les « framebuffers » de moniteur au lieu des contenus "
"de fenêtre pour pouvoir gérer les moniteurs à haute densité. Cela ne nécessite "
"pas de redémarrage. L'activation de « monitor-config-manager » est requis pour "
"que cette fonctionnalité soit activée."
#: data/org.gnome.mutter.gschema.xml.in:151
msgid "Select window from tab popup"
msgstr ""
"Sélectionner la fenêtre dans la vue qui apparaît suite à un appui sur la "
"touche tab"
#: data/org.gnome.mutter.gschema.xml.in:125
#: data/org.gnome.mutter.gschema.xml.in:156
msgid "Cancel tab popup"
msgstr "Fermer la vue qui apparaît suite à un appui sur la touche tab"
#: data/org.gnome.mutter.gschema.xml.in:161
msgid "Switch monitor configurations"
msgstr "Changer de configuration de moniteur"
#: data/org.gnome.mutter.gschema.xml.in:166
msgid "Rotates the built-in monitor configuration"
msgstr "Passe à la prochaine configuration intégrée de moniteur"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Passer à l'émulateur de terminal 1"
@ -468,10 +511,14 @@ msgstr "Passer à l'émulateur de terminal 11"
msgid "Switch to VT 12"
msgstr "Passer à l'émulateur de terminal 12"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Réactiver les raccourcis"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1759
#: src/backends/meta-input-settings.c:2118
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Changement de mode (groupe %d)"
@ -479,37 +526,37 @@ 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:1781
#: src/backends/meta-input-settings.c:2141
msgid "Switch monitor"
msgstr "Changer de moniteur"
#: src/backends/meta-input-settings.c:1783
#: src/backends/meta-input-settings.c:2143
msgid "Show on-screen help"
msgstr "Afficher l'aide à l'écran"
#: src/backends/meta-monitor-manager.c:675
#: src/backends/meta-monitor-manager.c:927
msgid "Built-in display"
msgstr "Affichage intégré"
#: src/backends/meta-monitor-manager.c:698
#: src/backends/meta-monitor-manager.c:950
msgid "Unknown"
msgstr "Inconnu"
#: src/backends/meta-monitor-manager.c:700
#: src/backends/meta-monitor-manager.c:952
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:708
#: src/backends/meta-monitor-manager.c:960
#, 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:471
#: src/compositor/compositor.c:476
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@ -521,32 +568,6 @@ 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."
msgstr "« %s » ne répond pas."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "L'application ne répond pas."
#: 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 ""
"Vous pouvez patienter un instant pour continuer ou forcer l'application à "
"quitter définitivement."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Forcer à quitter"
#: 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"
@ -588,6 +609,32 @@ msgstr "Lancer comme un compositeur imbriqué"
msgid "Run as a full display server, rather than nested"
msgstr "Lancer comme un serveur d'affichage complet, plutôt qu'imbriqué"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "« %s » ne répond pas."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "L'application ne répond pas."
#: src/core/meta-close-dialog-default.c:154
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Vous pouvez patienter un instant pour continuer ou forcer l'application à "
"quitter définitivement."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Forcer à quitter"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Attendre"
#: src/core/mutter.c:39
#, c-format
msgid ""

112
po/fur.po
View File

@ -8,15 +8,15 @@ msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-04-21 21:33+0000\n"
"PO-Revision-Date: 2017-04-30 15:41+0200\n"
"POT-Creation-Date: 2017-07-22 09:45+0000\n"
"PO-Revision-Date: 2017-07-22 22:53+0200\n"
"Last-Translator: Fabio Tomat <f.t.public@gmail.com>\n"
"Language-Team: Friulian <fur@li.org>\n"
"Language: fur\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.12\n"
"X-Generator: Poedit 2.0.2\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@ -405,10 +405,14 @@ msgid ""
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “scale-monitor-framebuffer” — makes "
"mutter default to layout logical monitors in a logical pixel coordinate "
"space, while scaling monitor framebuffers instead of window content, to "
"manage HiDPI monitors. Does not require a restart."
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “scale-monitor-"
"framebuffer” — makes mutter default to layout logical monitors in a logical "
"pixel coordinate space, while scaling monitor framebuffers instead of window "
"content, to manage HiDPI monitors. Does not require a restart. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
msgstr ""
"Par abilitâ lis funzionalitâts sperimentâls, zonte la peraule clâf de "
"funzionalitât ae liste. Il fat che la funzionalitât e vedi bisugne di tornâ "
@ -416,19 +420,33 @@ msgstr ""
"funzionalitât sperimentâl no je necessarie che e sedi disponibile o "
"configurabile. No sta spietâti di zontâ alc in cheste impostazion e pensâ "
"che e duredi tal timp. Atualmentri lis peraulis clâf pussibilis a son: • "
"“scale-monitor-framebuffer” — al rint come predefinît par mutter la "
"disposizion dai visôrs logjics intun spazi logjic di coordenadis dai pixel, "
"intant i framebuffer dai visôrs par scjalâ, invezit dal contignût dal "
"barcon, a gjestissin i visôrs HiDPI. Nol covente tornâ a inviâ."
"“monitor-config-manager” — al dopre il gnûf sisteme di configurazion dal "
"visôr, fat par sostituî chel vecjo. Chest al abilite une API di nivel "
"superiôr che e pues jessi doprade di aplicazions di configurazion, cussì "
"come la capacitât di configurâ par scjale di monitor logjic. • “scale-"
"monitor-framebuffer” — al rint come predefinît par mutter la disposizion dai "
"visôrs logjics intun spazi logjic di coordenadis dai pixel, intant i "
"framebuffer dai visôrs par scjalâ, invezit dal contignût dal barcon, a "
"gjestissin i visôrs HiDPI. Nol covente tornâ a inviâ. In plui al è necessari "
"abilitâ “monitor-config-manager” par fâ in mût che cheste funzionalitât e "
"sedi abilitade."
#: data/org.gnome.mutter.gschema.xml.in:141
#: data/org.gnome.mutter.gschema.xml.in:151
msgid "Select window from tab popup"
msgstr "Selezione barcon dal tab popup"
#: data/org.gnome.mutter.gschema.xml.in:146
#: data/org.gnome.mutter.gschema.xml.in:156
msgid "Cancel tab popup"
msgstr "Anule tab popup"
#: data/org.gnome.mutter.gschema.xml.in:161
msgid "Switch monitor configurations"
msgstr "Cambie configurazions visôr"
#: data/org.gnome.mutter.gschema.xml.in:166
msgid "Rotates the built-in monitor configuration"
msgstr "Al volte la configurazion dal visôr integrât"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Passe al VT 1"
@ -480,7 +498,7 @@ msgstr "Passe al VT 12"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1848
#: src/backends/meta-input-settings.c:2118
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Cambie mût (Grup %d)"
@ -488,37 +506,37 @@ msgstr "Cambie mût (Grup %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1870
#: src/backends/meta-input-settings.c:2141
msgid "Switch monitor"
msgstr "Cambie visôr"
#: src/backends/meta-input-settings.c:1872
#: src/backends/meta-input-settings.c:2143
msgid "Show on-screen help"
msgstr "Mostre jutori a schermi"
#: src/backends/meta-monitor-manager.c:783
#: src/backends/meta-monitor-manager.c:925
msgid "Built-in display"
msgstr "Display integrât"
#: src/backends/meta-monitor-manager.c:806
#: src/backends/meta-monitor-manager.c:948
msgid "Unknown"
msgstr "No cognossût"
#: src/backends/meta-monitor-manager.c:808
#: src/backends/meta-monitor-manager.c:950
msgid "Unknown Display"
msgstr "Display no cognossût"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:816
#: src/backends/meta-monitor-manager.c:958
#, 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:474
#: src/compositor/compositor.c:476
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@ -530,32 +548,6 @@ msgstr ""
msgid "Bell event"
msgstr "Event cjampane"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "“%s” nol rispuint."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "La aplicazion no rispuint."
#: 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 ""
"Al è pussibil sielzi di spietâ un pôc lassant che la aplicazion e continui o "
"sfuarçâ la aplicazion par sierâle dal dut."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "Sfuarce _Jessude"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Spiete"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
@ -597,6 +589,32 @@ msgstr "Eseguìs come compositor nidiât"
msgid "Run as a full display server, rather than nested"
msgstr "Eseguìs come servidôr display complet, invezit che nidiât"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "“%s” nol rispuint."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "La aplicazion no rispuint."
#: src/core/meta-close-dialog-default.c:154
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Al è pussibil sielzi di spietâ un pôc lassant che la aplicazion e continui o "
"sfuarçâ la aplicazion par sierâle dal dut."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "Sfuarce _Jessude"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Spiete"
#: src/core/mutter.c:39
#, c-format
msgid ""

170
po/gl.po
View File

@ -10,22 +10,21 @@
# Fran Diéguez <frandieguez@gnome.org>, 2009, 2010, 2011, 2012.
# Leandro Regueiro <leandro.regueiro@gmail.com>, 2012.
# Fran Dieguez <frandieguez@gnome.org>, 2012, 2013, 2014, 2015, 2016, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: gl\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-02-28 06:20+0000\n"
"PO-Revision-Date: 2017-03-11 03:02+0100\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?product=mutter"
"&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-08-21 04:46+0000\n"
"PO-Revision-Date: 2017-08-23 12:21+0200\n"
"Last-Translator: Fran Dieguez <frandieguez@gnome.org>\n"
"Language-Team: Galician <gnome-l10n-gl@gnome.org>\n"
"Language-Team: Galician\n"
"Language: gl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Gtranslator 2.91.7\n"
"X-Generator: Virtaal 0.7.1\n"
"X-Project-Style: gnome\n"
#: data/50-mutter-navigation.xml:6
@ -278,11 +277,6 @@ msgstr ""
"Modificador que se vai usar para as accións modificadas de xestión de xanela"
#: 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 "
@ -328,10 +322,6 @@ msgid "Workspaces are managed dynamically"
msgstr "Os espazos de traballo xestiónanse dinamicamente"
#: 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 theres a "
"static number of workspaces (determined by the num-workspaces key in org."
@ -370,10 +360,6 @@ msgid "Delay focus changes until the pointer stops moving"
msgstr "Retrasar o cambio de enfoque até que o punteiro se deteña ao moverse"
#: 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 "
@ -388,9 +374,6 @@ msgid "Draggable border width"
msgstr "Anchura arrastrábel do bordo"
#: 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 themes visible borders are "
"not enough, invisible borders will be added to meet this value."
@ -423,14 +406,61 @@ msgstr ""
"Cando está verdadeiro, as novas xanelas sempre se porán no centro da "
"pantalla activa."
#: data/org.gnome.mutter.gschema.xml.in:120
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "Activar as características experimentais"
#: data/org.gnome.mutter.gschema.xml.in:108
#| msgid ""
#| "To enable experimental features, add the feature keyword to the list. "
#| "Whether the feature requires restarting the compositor depends on the "
#| "given feature. Any experimental feature is not required to still be "
#| "available, or configurable. Dont expect adding anything in this setting "
#| "to be future proof. Currently possible keywords: • “monitor-config-"
#| "manager” — use the new monitor configuration system, aimed to replace the "
#| "old one. This enables a higher level configuration API to be used by "
#| "configuration applications, as well as the ability to configure per "
#| "logical monitor scale. • “scale-monitor-framebuffer” — makes mutter "
#| "default to layout logical monitors in a logical pixel coordinate space, "
#| "while scaling monitor framebuffers instead of window content, to manage "
#| "HiDPI monitors. Does not require a restart. Also enabling “monitor-config-"
#| "manager” is required for this feature to be enabled."
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “scale-monitor-framebuffer” — makes "
"mutter default to layout logical monitors in a logical pixel coordinate "
"space, while scaling monitor framebuffers instead of window content, to "
"manage HiDPI monitors. Does not require a restart."
msgstr ""
"Para activar as características experimentais, engada a palabra chave da "
"característica á lista. Depende da característica que se deba reiniciar ou "
"non o compositor. Calquera característica experimental pode non estar "
"dispoñíbel ou ser configurábel. Non agarde que o que se engada neste "
"escenario sirva como proba futura. As palabras chave actualmente dispoñíbeis "
"son: “scale-monitor-framebuffer” — convirte a mutter na maneira "
"predeterminada de dispor monitores lóxicos nun espacio lóxico de coordenadas "
"de íxeles, a escalar framebuffers de monitores framebuffers no lugar do "
"contido de xnalea, para administrar monitores HiDPI. Non require un reinicio."
#: data/org.gnome.mutter.gschema.xml.in:141
msgid "Select window from tab popup"
msgstr "Seleccionar xanela da lapela emerxente"
#: data/org.gnome.mutter.gschema.xml.in:125
#: data/org.gnome.mutter.gschema.xml.in:146
msgid "Cancel tab popup"
msgstr "Cancelar lapela emerxente"
#: data/org.gnome.mutter.gschema.xml.in:151
msgid "Switch monitor configurations"
msgstr "Cambiar preferencias do monitor"
#: data/org.gnome.mutter.gschema.xml.in:156
msgid "Rotates the built-in monitor configuration"
msgstr "Rota a configuración do monitor embebido"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Cambiar á VT 1"
@ -479,53 +509,53 @@ msgstr "Cambiar á VT 11"
msgid "Switch to VT 12"
msgstr "Cambiar á VT 12"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Reactivar os atallos"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1800
#: src/backends/meta-input-settings.c:2151
#, c-format
#| msgid "Mode Switch: Mode %d"
msgid "Mode Switch (Group %d)"
msgstr "Modo conmutador (Grupo %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1822
#: src/backends/meta-input-settings.c:2174
msgid "Switch monitor"
msgstr "Cambiar monitor"
#: src/backends/meta-input-settings.c:1824
#: src/backends/meta-input-settings.c:2176
msgid "Show on-screen help"
msgstr "Mostrar axuda en pantalla"
#: src/backends/meta-monitor-manager.c:675
#: src/backends/meta-monitor-manager.c:903
msgid "Built-in display"
msgstr "Pantalla embebida"
#: src/backends/meta-monitor-manager.c:698
#: src/backends/meta-monitor-manager.c:926
msgid "Unknown"
msgstr "Descoñecido"
#: src/backends/meta-monitor-manager.c:700
#: src/backends/meta-monitor-manager.c:928
msgid "Unknown Display"
msgstr "Pantalla descoñecida"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:708
#: src/backends/meta-monitor-manager.c:936
#, 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:471
#: src/compositor/compositor.c:476
#, 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”."
msgstr ""
@ -536,35 +566,8 @@ msgstr ""
msgid "Bell event"
msgstr "Evento de campá"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "«%s» non está respondendo."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "O Aplicativo non está respondendo."
#: 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 ""
"Pode elixir esperar un momento para ver se continúa ou forzar ao aplicativo "
"a pechar completamente."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Forzar a saída"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "Espe_rar"
#: 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 "Produciuse un erro ao abrir a visualización do X Window System «%s»\n"
@ -604,14 +607,34 @@ msgstr "Executar como compositor anidado"
msgid "Run as a full display server, rather than nested"
msgstr "Executar como un servidor de pantalla completo, fronte a un aniñado"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "«%s» non está respondendo."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "O Aplicativo non está respondendo."
#: src/core/meta-close-dialog-default.c:154
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Pode elixir esperar un momento para ver se continúa ou forzar ao aplicativo "
"a pechar completamente."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Forzar a saída"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "Espe_rar"
#: 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 © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
@ -640,9 +663,6 @@ msgstr "Espazo de traballo %d"
#: 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."
@ -652,7 +672,6 @@ msgstr ""
#: 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 "A pantalla %d na visualización «%s» non é válida\n"
@ -666,9 +685,6 @@ msgid "Mode Switch: Mode %d"
msgstr "Modo conmutador: Modo %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."
msgid ""
"These windows do not support “save current setup” and will have to be "
"restarted manually next time you log in."

6442
po/hr.po

File diff suppressed because it is too large Load Diff

125
po/hu.po
View File

@ -12,15 +12,15 @@ msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-05-14 09:49+0000\n"
"PO-Revision-Date: 2017-05-14 21:36+0200\n"
"Last-Translator: Balázs Úr <urbalazs@gmail.com>\n"
"POT-Creation-Date: 2017-08-02 10:05+0000\n"
"PO-Revision-Date: 2017-08-09 08:51+0200\n"
"Last-Translator: Meskó Balázs <meskobalazs@fedoraproject.org>\n"
"Language-Team: Hungarian <gnome-hu-list at gnome dot org>\n"
"Language: hu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Lokalize 1.2\n"
"X-Generator: Poedit 2.0.3\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: data/50-mutter-navigation.xml:6
@ -409,30 +409,46 @@ msgid ""
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “scale-monitor-framebuffer” — makes "
"mutter default to layout logical monitors in a logical pixel coordinate "
"space, while scaling monitor framebuffers instead of window content, to "
"manage HiDPI monitors. Does not require a restart."
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “scale-monitor-"
"framebuffer” — makes mutter default to layout logical monitors in a logical "
"pixel coordinate space, while scaling monitor framebuffers instead of window "
"content, to manage HiDPI monitors. Does not require a restart. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
msgstr ""
"A kísérleti funkciók engedélyezéséhez adja hozzá a funkció kulcsszavát a "
"listához. A funkció a betűszedő újraindítását igényelheti az adott funkciótól "
"függően. Egyik kísérleti funkciónál sem szükséges, hogy továbbra is elérhető "
"vagy beállítható legyen. Ne várja el azt, hogy ha bármit hozzáad ehhez a "
"beállításhoz, akkor az a jövőben is elérhető lesz. Jelenleg lehetséges "
"kulcsszavak: • „scale-monitor-framebuffer” alapértelmezetté teszi a mutter "
"programot a logikai monitorok elrendezéséhez egy logikai "
"képpontkoordináta-térben, miközben átméretezi a monitor keretpufferét az "
"ablaktartalom helyett azért, hogy kezelje a HiDPI monitorokat. Nem igényel "
"újraindítást."
"listához. A funkció a betűszedő újraindítását igényelheti az adott "
"funkciótól függően. Egyik kísérleti funkciónál sem szükséges, hogy továbbra "
"is elérhető vagy beállítható legyen. Ne várja el azt, hogy ha bármit hozzáad "
"ehhez a beállításhoz, akkor az a jövőben is elérhető lesz. Jelenleg "
"lehetséges kulcsszavak: • „monitor-config-manager” az új monitor "
"konfigurációs rendszer használata, amely a régi leváltására készül. Ez egy "
"magasabb szintű konfigurációs API-t biztosít a beállító alkalmazásoknak, "
"valamint lehetővé teszi a logikai monitorok különálló méretezését. • „scale-"
"monitor-framebuffer” — alapértelmezetté teszi a mutter programot a logikai "
"monitorok elrendezéséhez egy logikai képpontkoordináta-térben, miközben "
"átméretezi a monitor keretpufferét az ablaktartalom helyett azért, hogy "
"kezelje a HiDPI monitorokat. Nem igényel újraindítást. Ezen funkció "
"bekapcsolásához a „monitor-config-manager” engedélyezése is szükséges."
#: data/org.gnome.mutter.gschema.xml.in:141
#: data/org.gnome.mutter.gschema.xml.in:151
msgid "Select window from tab popup"
msgstr "Ablakok kiválasztása tab billentyűre felugró ablakból"
#: data/org.gnome.mutter.gschema.xml.in:146
#: data/org.gnome.mutter.gschema.xml.in:156
msgid "Cancel tab popup"
msgstr "Tab felugró kikapcsolása"
#: data/org.gnome.mutter.gschema.xml.in:161
msgid "Switch monitor configurations"
msgstr "Monitorkonfiguráció átváltása"
#: data/org.gnome.mutter.gschema.xml.in:166
msgid "Rotates the built-in monitor configuration"
msgstr "Cserélgeti a beépített monitorkonfigurációkat"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Váltás az 1. VT-re"
@ -481,10 +497,14 @@ msgstr "Váltás a 11. VT-re"
msgid "Switch to VT 12"
msgstr "Váltás a 12. VT-re"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Gyorsbillentyűk újraengedélyezése"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1848
#: src/backends/meta-input-settings.c:2118
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Módkapcsoló (%d. csoport)"
@ -492,30 +512,30 @@ msgstr "Módkapcsoló (%d. csoport)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1870
#: src/backends/meta-input-settings.c:2141
msgid "Switch monitor"
msgstr "Monitorváltás"
#: src/backends/meta-input-settings.c:1872
#: src/backends/meta-input-settings.c:2143
msgid "Show on-screen help"
msgstr "Képernyősúgó megjelenítése"
#: src/backends/meta-monitor-manager.c:783
#: src/backends/meta-monitor-manager.c:927
msgid "Built-in display"
msgstr "Beépített kijelző"
#: src/backends/meta-monitor-manager.c:806
#: src/backends/meta-monitor-manager.c:950
msgid "Unknown"
msgstr "Ismeretlen"
#: src/backends/meta-monitor-manager.c:808
#: src/backends/meta-monitor-manager.c:952
msgid "Unknown Display"
msgstr "Ismeretlen kijelző"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:816
#: src/backends/meta-monitor-manager.c:960
#, c-format
msgid "%s %s"
msgstr "%s %s"
@ -534,32 +554,6 @@ msgstr ""
msgid "Bell event"
msgstr "Csengetés esemény"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "„%s” nem válaszol."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "Az alkalmazás nem válaszol."
#: 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 ""
"Várhat egy kicsit a folytatódására, vagy kikényszerítheti az alkalmazás "
"teljes kilépését."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Erőltetett kilépés"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "Vá_rakozás"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
@ -602,6 +596,32 @@ msgid "Run as a full display server, rather than nested"
msgstr ""
"Futtatás teljes megjelenítő kiszolgálóként az egymásba ágyazott helyett"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "„%s” nem válaszol."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "Az alkalmazás nem válaszol."
#: src/core/meta-close-dialog-default.c:154
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Várhat egy kicsit a folytatódására, vagy kikényszerítheti az alkalmazás "
"teljes kilépését."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Erőltetett kilépés"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "Vá_rakozás"
#: src/core/mutter.c:39
#, c-format
msgid ""
@ -665,4 +685,3 @@ msgstr ""
#, c-format
msgid "%s (on %s)"
msgstr "%s (ezen: %s)"

View File

@ -11,15 +11,15 @@ msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-04-21 21:33+0000\n"
"PO-Revision-Date: 2017-04-23 14:39+0700\n"
"POT-Creation-Date: 2017-08-21 04:46+0000\n"
"PO-Revision-Date: 2017-08-21 13:42+0700\n"
"Last-Translator: Kukuh Syafaat <syafaatkukuh@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.11\n"
"X-Generator: Poedit 2.0.3\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: data/50-mutter-navigation.xml:6
@ -417,11 +417,11 @@ msgstr ""
"daftar. Apakah fitur memerlukan nyala ulang kompositor tergantung pada fitur "
"yang diberikan. Setiap fitur eksperimental tidak diharuskan tetap tersedia, "
"atau dapat dikonfigurasi. Jangan berharap menambahkan apapun dalam "
"pengaturan ini sebagai bukti di masa depan. Saat ini kata kunci yang "
"mungkin: • \"scale-monitor-framebuffer\" — membuat mutter bawaan ke tata "
"letak monitor logikal dalam ruang koordinat pixel logikal, sementara skala "
"monitor framebuffer bukan konten jendela, untuk mengatur monitor HiDPI. "
"Tidak perlu nyala ulang."
"pengaturan ini kebal perubahan di masa depan. Saat ini kata kunci yang "
"mungkin: • scale-monitor-framebuffer — membuat bawaan mutter untuk tata "
"letak monitor logikal dalam ruang koordinat pixel logikal, sambil "
"menskalakan framebuffer monitor alih-alih konten jendela, untuk mengelola "
"monitor HiDPI. Tidak perlu mulai ulang."
#: data/org.gnome.mutter.gschema.xml.in:141
msgid "Select window from tab popup"
@ -431,6 +431,14 @@ msgstr "Pilih jendela dari popup tab"
msgid "Cancel tab popup"
msgstr "Batalkan popup tab"
#: data/org.gnome.mutter.gschema.xml.in:151
msgid "Switch monitor configurations"
msgstr "Tukar konfigurasi monitor bawaan"
#: data/org.gnome.mutter.gschema.xml.in:156
msgid "Rotates the built-in monitor configuration"
msgstr "Memutar konfigurasi monitor bawaan"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Bertukar ke VT 1"
@ -479,10 +487,14 @@ msgstr "Bertukar ke VT 11"
msgid "Switch to VT 12"
msgstr "Bertukar ke VT 12"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Aktifkan kembali pintasan"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1848
#: src/backends/meta-input-settings.c:2151
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Tukar Mode: (Grup %d)"
@ -490,37 +502,37 @@ 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:1870
#: src/backends/meta-input-settings.c:2174
msgid "Switch monitor"
msgstr "Berpindah monitor"
#: src/backends/meta-input-settings.c:1872
#: src/backends/meta-input-settings.c:2176
msgid "Show on-screen help"
msgstr "Tampilkan bantuan pada layar"
#: src/backends/meta-monitor-manager.c:783
#: src/backends/meta-monitor-manager.c:903
msgid "Built-in display"
msgstr "Tampilan bawaan"
#: src/backends/meta-monitor-manager.c:806
#: src/backends/meta-monitor-manager.c:926
msgid "Unknown"
msgstr "Tak Dikenal"
#: src/backends/meta-monitor-manager.c:808
#: src/backends/meta-monitor-manager.c:928
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:816
#: src/backends/meta-monitor-manager.c:936
#, 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:474
#: src/compositor/compositor.c:476
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@ -531,31 +543,6 @@ 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."
msgstr "\"%s\" tak merespon."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "Aplikasi tak merespon."
#: 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 ""
"Anda bisa memilih untuk menunggu sebentar atau memaksa aplikasi keluar."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Matikan Paksa"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Tunggu"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
@ -597,6 +584,31 @@ msgstr "Jalankan sebagai kompositor bersarang"
msgid "Run as a full display server, rather than nested"
msgstr "Jalankan sebagai server tampilan penuh, ketimbang tampilan bersarang"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "\"%s\" tak merespon."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "Aplikasi tak merespon."
#: src/core/meta-close-dialog-default.c:154
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Anda bisa memilih untuk menunggu sebentar atau memaksa aplikasi keluar."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Matikan Paksa"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Tunggu"
#: src/core/mutter.c:39
#, c-format
msgid ""

118
po/it.po
View File

@ -10,10 +10,10 @@
msgid ""
msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-02-16 15:52+0000\n"
"PO-Revision-Date: 2017-02-17 22:11+0100\n"
"POT-Creation-Date: 2017-08-21 04:46+0000\n"
"PO-Revision-Date: 2017-08-24 09:45+0200\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 2.0beta3\n"
"X-Generator: Poedit 1.8.12\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@ -410,14 +410,48 @@ msgstr ""
"Se impostata a VERO, le nuove finestre verranno sempre posizionate al centro "
"dello schermo attivo."
#: data/org.gnome.mutter.gschema.xml.in:120
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "Abilita funzionalità sperimentali"
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “scale-monitor-framebuffer” — makes "
"mutter default to layout logical monitors in a logical pixel coordinate "
"space, while scaling monitor framebuffers instead of window content, to "
"manage HiDPI monitors. Does not require a restart."
msgstr ""
"Per abilitare le funzionalità sperimentali, aggiungere la parola chiave di "
"tale funzionalità nella lista. Se la funzionalità desiderata richiede il "
"riavvio del compositor, dipende dalla funzionalità stessa. Una qualsiasi "
"funzionalità sperimentale non è richiesta, ma può essere disponibile e "
"configurabile. Le funzionalità offerte potrebbero rendere il sistema "
"instabile. I possibili valori sono: • \"scale-monitor-framebuffer\" — Fa in "
"modo che mutter disponga gli schermi logici secondo uno spazio logico di "
"coordinate pixel, applicando il ridimensionamento ai framebuffer invece che "
"al contenuto della finestra, per gestire schermi HiDPI (non richiede il "
"riavvio)."
#: data/org.gnome.mutter.gschema.xml.in:141
msgid "Select window from tab popup"
msgstr "Seleziona finestra dal tab popup"
#: data/org.gnome.mutter.gschema.xml.in:125
#: data/org.gnome.mutter.gschema.xml.in:146
msgid "Cancel tab popup"
msgstr "Annulla tab popup"
#: data/org.gnome.mutter.gschema.xml.in:151
msgid "Switch monitor configurations"
msgstr "Cambia le configurazioni del monitor"
#: data/org.gnome.mutter.gschema.xml.in:156
msgid "Rotates the built-in monitor configuration"
msgstr "Passa da una configurazione integrata all'altra del monitor"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Passa al VT 1"
@ -466,10 +500,14 @@ msgstr "Passa al VT 11"
msgid "Switch to VT 12"
msgstr "Passa al VT 12"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Riabilita scorciatoie"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1800
#: src/backends/meta-input-settings.c:2151
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Cambio modalità (gruppo %d)"
@ -477,37 +515,37 @@ 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
#: src/backends/meta-input-settings.c:2174
msgid "Switch monitor"
msgstr "Cambia monitor"
#: src/backends/meta-input-settings.c:1824
#: src/backends/meta-input-settings.c:2176
msgid "Show on-screen help"
msgstr "Mostra aiuto sullo schermo"
#: src/backends/meta-monitor-manager.c:675
#: src/backends/meta-monitor-manager.c:903
msgid "Built-in display"
msgstr "Display integrato"
#: src/backends/meta-monitor-manager.c:698
#: src/backends/meta-monitor-manager.c:926
msgid "Unknown"
msgstr "Sconosciuto"
#: src/backends/meta-monitor-manager.c:700
#: src/backends/meta-monitor-manager.c:928
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:708
#: src/backends/meta-monitor-manager.c:936
#, 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:471
#: src/compositor/compositor.c:476
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@ -519,32 +557,6 @@ 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."
msgstr "Nessuna risposta da %s."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "L'applicazione non risponde."
#: 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 ""
"È possibile scegliere di attendere un po' lasciando che l'applicazione "
"continui, oppure forzare la terminazione dell'applicazione."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Forza uscita"
#: 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"
@ -586,6 +598,32 @@ msgstr "Esegui come compositor annidato"
msgid "Run as a full display server, rather than nested"
msgstr "Esegui come display server invece che annidato"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "Nessuna risposta da %s."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "L'applicazione non risponde."
#: src/core/meta-close-dialog-default.c:154
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"È possibile scegliere di attendere un po' lasciando che l'applicazione "
"continui, oppure forzare la terminazione dell'applicazione."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Forza uscita"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Attendi"
#: src/core/mutter.c:39
#, c-format
msgid ""

203
po/kk.po
View File

@ -6,17 +6,17 @@
msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"Report-Msgid-Bugs-To: https://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-09 21:12+0500\n"
"POT-Creation-Date: 2017-07-19 09:20+0000\n"
"PO-Revision-Date: 2017-07-27 17:28+0500\n"
"Last-Translator: Baurzhan Muftakhidinov <baurthefirst@gmail.com>\n"
"Language-Team: Kazakh <kk@li.org>\n"
"Language: kk\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"
"X-Generator: Poedit 1.8.12\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@ -270,10 +270,10 @@ msgstr ""
#: 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 ""
#: data/org.gnome.mutter.gschema.xml.in:20
@ -306,7 +306,7 @@ msgstr "Жұмыс орындары динамикалы түрде басқар
#: 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 ""
@ -337,9 +337,9 @@ msgstr ""
#: 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 ""
#: data/org.gnome.mutter.gschema.xml.in:79
@ -348,7 +348,7 @@ msgstr ""
#: 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 ""
@ -372,14 +372,42 @@ msgid ""
"screen of the monitor."
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:120
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “scale-monitor-"
"framebuffer” — makes mutter default to layout logical monitors in a logical "
"pixel coordinate space, while scaling monitor framebuffers instead of window "
"content, to manage HiDPI monitors. Does not require a restart. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:151
msgid "Select window from tab popup"
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:125
#: data/org.gnome.mutter.gschema.xml.in:156
msgid "Cancel tab popup"
msgstr ""
#: data/org.gnome.mutter.gschema.xml.in:161
msgid "Switch monitor configurations"
msgstr "Монитор баптауларын ауыстыру"
#: data/org.gnome.mutter.gschema.xml.in:166
msgid "Rotates the built-in monitor configuration"
msgstr ""
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Бірінші виртуалды терминалына ауысу"
@ -428,57 +456,109 @@ msgstr "Он бірінші виртуалды терминалына ауысу
msgid "Switch to VT 12"
msgstr "Он екінші виртуалды терминалына ауысу"
#: 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:2118
#, c-format
msgid "Mode Switch (Group %d)"
msgstr ""
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:2141
msgid "Switch monitor"
msgstr "Мониторды ауыстыру"
#: src/backends/meta-input-settings.c:1709
#: src/backends/meta-input-settings.c:2143
msgid "Show on-screen help"
msgstr "Экрандағы көмекті көрсету"
#: src/backends/meta-monitor-manager.c:514
#: src/backends/meta-monitor-manager.c:925
msgid "Built-in display"
msgstr "Құрамындағы экран"
#: src/backends/meta-monitor-manager.c:537
#: src/backends/meta-monitor-manager.c:948
msgid "Unknown"
msgstr "Белгісіз"
#: src/backends/meta-monitor-manager.c:539
#: src/backends/meta-monitor-manager.c:950
msgid "Unknown Display"
msgstr "Белгісіз дисплей"
#. 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:958
#, 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:476
#, 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 ""
#: src/core/bell.c:194
msgid "Bell event"
msgstr ""
#: src/core/delete.c:127
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr ""
#: src/core/main.c:189
msgid "Disable connection to session manager"
msgstr "Сессиялар менеджеріне байланыстарды сөндіру"
#: src/core/main.c:195
msgid "Replace the running window manager"
msgstr ""
#: src/core/main.c:201
msgid "Specify session management ID"
msgstr "Сессия менеджментінің ID-ін көрсету"
#: src/core/main.c:206
msgid "X Display to use"
msgstr "Қолданылатын X дисплейі"
#: src/core/main.c:212
msgid "Initialize session from savefile"
msgstr ""
#: src/core/main.c:218
msgid "Make X calls synchronous"
msgstr "X сервер шақыруларын синхронды қылу"
#: src/core/main.c:225
msgid "Run as a wayland compositor"
msgstr ""
#: src/core/main.c:231
msgid "Run as a nested compositor"
msgstr ""
#: src/core/main.c:239
msgid "Run as a full display server, rather than nested"
msgstr ""
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "“%s” жауап бермейді."
#: src/core/delete.c:129
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "Қолданба жауап бермейді."
#: src/core/delete.c:134
#: src/core/meta-close-dialog-default.c:154
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
@ -486,60 +566,19 @@ msgstr ""
"Сіз қолданба өз жұмысын жалғастырғанды күтіп, немесе оны мәжбүрлетіп жаба "
"аласыз."
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Күту"
#: src/core/delete.c:141
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Мәжбүрлі шығу"
#: src/core/display.c:590
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr ""
#: src/core/main.c:182
msgid "Disable connection to session manager"
msgstr "Сессиялар менеджеріне байланыстарды сөндіру"
#: src/core/main.c:188
msgid "Replace the running window manager"
msgstr ""
#: src/core/main.c:194
msgid "Specify session management ID"
msgstr "Сессия менеджментінің ID-ін көрсету"
#: src/core/main.c:199
msgid "X Display to use"
msgstr "Қолданылатын X дисплейі"
#: src/core/main.c:205
msgid "Initialize session from savefile"
msgstr ""
#: src/core/main.c:211
msgid "Make X calls synchronous"
msgstr "X сервер шақыруларын синхронды қылу"
#: src/core/main.c:218
msgid "Run as a wayland compositor"
msgstr ""
#: 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/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Күту"
#: src/core/mutter.c:39
#, 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"
@ -558,34 +597,34 @@ msgstr ""
msgid "Workspace %d"
msgstr "Жұмыс орны %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 ""
#: 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 ""
#: src/core/util.c:120
msgid "Mutter was compiled without support for verbose mode\n"
msgstr ""
#: src/wayland/meta-wayland-tablet-pad.c:595
#: src/wayland/meta-wayland-tablet-pad.c:563
#, c-format
msgid "Mode Switch: Mode %d"
msgstr ""
#: 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 ""
#: src/x11/window-props.c:548
#: src/x11/window-props.c:559
#, c-format
msgid "%s (on %s)"
msgstr "%s (%s жерінде)"

129
po/lt.po
View File

@ -6,16 +6,16 @@
# Tomas Kuliavas <tokul@users.sourceforge.net>, 2003.
# Žygimantas Beručka <zygis@gnome.org>, 2004-2007.
# Gintautas Miliauskas <gintautas@miliauskas.lt>, 2007-2009, 2010.
# Aurimas Černius <aurisc4@gmail.com>, 2013, 2014, 2015, 2016.
# Aurimas Černius <aurisc4@gmail.com>, 2013, 2014, 2015, 2016, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: lt\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-03-02 18:41+0000\n"
"PO-Revision-Date: 2017-03-03 20:29+0200\n"
"Last-Translator: Moo\n"
"POT-Creation-Date: 2017-08-21 04:46+0000\n"
"PO-Revision-Date: 2017-08-22 23:17+0300\n"
"Last-Translator: Aurimas Černius <aurisc4@gmail.com>\n"
"Language-Team: Lietuvių <gnome-lt@lists.akl.lt>\n"
"Language: lt\n"
"MIME-Version: 1.0\n"
@ -23,7 +23,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n"
"%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Poedit 1.8.11\n"
"X-Generator: Gtranslator 2.91.7\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@ -401,14 +401,61 @@ msgstr ""
"Kai teigiama, nauji langai bus visada patalpinti aktyvaus monitoriaus ekrano "
"viduryje."
#: data/org.gnome.mutter.gschema.xml.in:120
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "Įjungti eksperimentines savybes"
#: data/org.gnome.mutter.gschema.xml.in:108
#| msgid ""
#| "To enable experimental features, add the feature keyword to the list. "
#| "Whether the feature requires restarting the compositor depends on the "
#| "given feature. Any experimental feature is not required to still be "
#| "available, or configurable. Dont expect adding anything in this setting "
#| "to be future proof. Currently possible keywords: • “monitor-config-"
#| "manager” — use the new monitor configuration system, aimed to replace the "
#| "old one. This enables a higher level configuration API to be used by "
#| "configuration applications, as well as the ability to configure per "
#| "logical monitor scale. • “scale-monitor-framebuffer” — makes mutter "
#| "default to layout logical monitors in a logical pixel coordinate space, "
#| "while scaling monitor framebuffers instead of window content, to manage "
#| "HiDPI monitors. Does not require a restart. Also enabling “monitor-config-"
#| "manager” is required for this feature to be enabled."
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “scale-monitor-framebuffer” — makes "
"mutter default to layout logical monitors in a logical pixel coordinate "
"space, while scaling monitor framebuffers instead of window content, to "
"manage HiDPI monitors. Does not require a restart."
msgstr ""
"Norėdami įjungti eksperimentines savybes, pridėkite į sąrašą raktinį žodį. "
"Ar savybė reikalauja kompozitoriaus paleidimo iš naujo priklauso nuo "
"konkrečios savybės. Nei viena eksperimentinė savybė privalo būti prieinama "
"ar konfigūruojama. Nesitikėkite, kad ką nors pridėjus į šį sąrašą, tai "
"išliks ir ateityje. Šiuo metu galimi raktažodžiai: • „scale-monitor-"
"framebuffer“ — mutter numatytai išdėsto loginius monitorius loginėje "
"pikselių koordinačių erdvėje, tuo pat ištempiant monitorių kadrų buferius "
"vietoje langų turinio, tokiu būdu valdant didelio tankio monitorius. "
"Nereikalauja paleisti iš naujo."
#: data/org.gnome.mutter.gschema.xml.in:141
msgid "Select window from tab popup"
msgstr "Pasirinkti langą iš tab iššokimo"
#: data/org.gnome.mutter.gschema.xml.in:125
#: data/org.gnome.mutter.gschema.xml.in:146
msgid "Cancel tab popup"
msgstr "Atšaukti tab iššokimą"
#: data/org.gnome.mutter.gschema.xml.in:151
msgid "Switch monitor configurations"
msgstr "Perjungti monitorių konfigūracijas"
#: data/org.gnome.mutter.gschema.xml.in:156
msgid "Rotates the built-in monitor configuration"
msgstr "Suka integruotas monitorių konfigūracijas"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Persijungti į VT 1"
@ -457,10 +504,14 @@ msgstr "Persijungti į VT 11"
msgid "Switch to VT 12"
msgstr "Persijungti į VT 12"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Iš naujo įjungti trumpinius"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1800
#: src/backends/meta-input-settings.c:2151
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Veiksenos perjungimas (Grupė %d)"
@ -468,37 +519,37 @@ msgstr "Veiksenos perjungimas (Grupė %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1822
#: src/backends/meta-input-settings.c:2174
msgid "Switch monitor"
msgstr "Perjungti monitorių"
#: src/backends/meta-input-settings.c:1824
#: src/backends/meta-input-settings.c:2176
msgid "Show on-screen help"
msgstr "Rodyti pagalbą ekrane"
#: src/backends/meta-monitor-manager.c:675
#: src/backends/meta-monitor-manager.c:903
msgid "Built-in display"
msgstr "Integruotas vaizduoklis"
#: src/backends/meta-monitor-manager.c:698
#: src/backends/meta-monitor-manager.c:926
msgid "Unknown"
msgstr "Nežinomas"
#: src/backends/meta-monitor-manager.c:700
#: src/backends/meta-monitor-manager.c:928
msgid "Unknown Display"
msgstr "Nežinomas vaizduoklis"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:708
#: src/backends/meta-monitor-manager.c:936
#, 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:471
#: src/compositor/compositor.c:476
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@ -508,30 +559,6 @@ msgstr "Kita kompozicijos tvarkytuvė jau veikia ekrane %i vaizduoklyje „%s“
msgid "Bell event"
msgstr "Skambučio įvykis"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "%s neatsiliepia į komandas."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "Programa neatsiliepia į komandas."
#: 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 "Galite šiek tiek palaukti arba priverstinai uždaryti programą."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Priverstinai išeiti"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Laukti"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
@ -573,6 +600,30 @@ msgstr "Vykdyti kaip įdėtinį kompozitorių"
msgid "Run as a full display server, rather than nested"
msgstr "Vykdyti kaip visą vaizduoklio serverį, o ne įdėtinį"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "%s neatsiliepia į komandas."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "Programa neatsiliepia į komandas."
#: src/core/meta-close-dialog-default.c:154
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr "Galite šiek tiek palaukti arba priverstinai uždaryti programą."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Priverstinai išeiti"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Laukti"
#: src/core/mutter.c:39
#, c-format
msgid ""

6165
po/ne.po

File diff suppressed because it is too large Load Diff

112
po/pl.po
View File

@ -12,10 +12,10 @@
msgid ""
msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"Report-Msgid-Bugs-To: https://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"
"POT-Creation-Date: 2017-08-21 04:46+0000\n"
"PO-Revision-Date: 2017-08-23 04:15+0200\n"
"Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n"
"Language-Team: Polish <community-poland@mozilla.org>\n"
"Language: pl\n"
@ -409,14 +409,46 @@ msgstr ""
"Jeśli wynosi wartość „true”, to nowe okna będą zawsze umieszczane na środku "
"aktywnego ekranu monitora."
#: data/org.gnome.mutter.gschema.xml.in:120
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "Funkcje eksperymentalne"
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “scale-monitor-framebuffer” — makes "
"mutter default to layout logical monitors in a logical pixel coordinate "
"space, while scaling monitor framebuffers instead of window content, to "
"manage HiDPI monitors. Does not require a restart."
msgstr ""
"Aby włączyć eksperymentalne funkcje, należy dodać słowo kluczowe funkcji do "
"tej listy. Niektóre funkcje wymagają ponownego uruchomienia menedżera okien. "
"Dostępność funkcji eksperymentalnych nie jest gwarantowana. W przyszłości "
"każda funkcja może zostać usunięta. Obecnie obsługiwane słowa kluczowe: • "
"„scale-monitor-framebuffer” — sprawia, że menedżer okien do zarządzania "
"monitorami o wysokiej rozdzielczości domyślnie układa logiczne monitory "
"w przestrzeni współrzędnych logicznych pikseli, jednocześnie skalując bufory "
"ramki monitorów zamiast zawartości okien. Nie wymaga ponownego uruchomienia."
#: data/org.gnome.mutter.gschema.xml.in:141
msgid "Select window from tab popup"
msgstr "Wybór okna z wyskakującego okna dla tabulacji"
#: data/org.gnome.mutter.gschema.xml.in:125
#: data/org.gnome.mutter.gschema.xml.in:146
msgid "Cancel tab popup"
msgstr "Anulowanie wyskakującego okna dla tabulacji"
#: data/org.gnome.mutter.gschema.xml.in:151
msgid "Switch monitor configurations"
msgstr "Przełączenie konfiguracji monitorów"
#: data/org.gnome.mutter.gschema.xml.in:156
msgid "Rotates the built-in monitor configuration"
msgstr "Obrócenie wbudowanego monitora"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Przełączenie na 1. konsolę wirtualną"
@ -465,10 +497,14 @@ msgstr "Przełączenie na 11. konsolę wirtualną"
msgid "Switch to VT 12"
msgstr "Przełączenie na 12. konsolę wirtualną"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Ponowne włączenie skrótów"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1800
#: src/backends/meta-input-settings.c:2151
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Przełącznik trybu (%d. grupa)"
@ -476,37 +512,37 @@ 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
#: src/backends/meta-input-settings.c:2174
msgid "Switch monitor"
msgstr "Przełączenie monitora"
#: src/backends/meta-input-settings.c:1824
#: src/backends/meta-input-settings.c:2176
msgid "Show on-screen help"
msgstr "Wyświetlenie pomocy na ekranie"
msgstr "Ekran pomocy"
#: src/backends/meta-monitor-manager.c:675
#: src/backends/meta-monitor-manager.c:903
msgid "Built-in display"
msgstr "Wbudowany ekran"
#: src/backends/meta-monitor-manager.c:698
#: src/backends/meta-monitor-manager.c:926
msgid "Unknown"
msgstr "Nieznany"
#: src/backends/meta-monitor-manager.c:700
#: src/backends/meta-monitor-manager.c:928
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:708
#: src/backends/meta-monitor-manager.c:936
#, 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:471
#: src/compositor/compositor.c:476
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@ -517,30 +553,6 @@ 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."
msgstr "Okno „%s” nie odpowiada."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "Program nie odpowiada."
#: 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 "Można poczekać chwilę dłużej lub wymusić zakończenie programu."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Zakończ"
#: 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"
@ -582,6 +594,30 @@ msgstr "Uruchamia jako osadzony menedżer składania"
msgid "Run as a full display server, rather than nested"
msgstr "Uruchamia jako pełny serwer wyświetlania zamiast osadzonego"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "Okno „%s” nie odpowiada."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "Program nie odpowiada."
#: src/core/meta-close-dialog-default.c:154
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr "Można poczekać chwilę dłużej lub wymusić zakończenie programu."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Zakończ"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Czekaj"
#: src/core/mutter.c:39
#, c-format
msgid ""

108
po/sk.po
View File

@ -14,8 +14,8 @@ msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-03-07 12:40+0000\n"
"PO-Revision-Date: 2017-03-12 10:28+0100\n"
"POT-Creation-Date: 2017-08-21 04:46+0000\n"
"PO-Revision-Date: 2017-08-23 19:50+0200\n"
"Last-Translator: Dušan Kazik <prescott66@gmail.com>\n"
"Language-Team: Slovak <gnome-sk-list@gnome.org>\n"
"Language: sk\n"
@ -23,7 +23,7 @@ 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.12\n"
"X-Generator: Poedit 2.0.3\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@ -477,16 +477,42 @@ msgstr ""
"Ak je nastavené na true, budú nové okná vždy umiestnené v strede aktívnej "
"obrazovky monitoru."
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "Povoliť experimentálne funkcie"
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “scale-monitor-framebuffer” — makes "
"mutter default to layout logical monitors in a logical pixel coordinate "
"space, while scaling monitor framebuffers instead of window content, to "
"manage HiDPI monitors. Does not require a restart."
msgstr ""
# summary
#: data/org.gnome.mutter.gschema.xml.in:120
#: data/org.gnome.mutter.gschema.xml.in:141
msgid "Select window from tab popup"
msgstr "Vybrať okno z rozbaľovacej ponuky tabulátora"
# summary
#: data/org.gnome.mutter.gschema.xml.in:125
#: data/org.gnome.mutter.gschema.xml.in:146
msgid "Cancel tab popup"
msgstr "Zrušit rozbaľovaciu ponuku tabulátora"
# PK: predpokladam ze to prepisane medzi tlacidlami
# description
#: data/org.gnome.mutter.gschema.xml.in:151
msgid "Switch monitor configurations"
msgstr "Prepnúť nastavenia monitorov"
#: data/org.gnome.mutter.gschema.xml.in:156
msgid "Rotates the built-in monitor configuration"
msgstr "Otočí nastavenie vstavaného monitora"
# description
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
@ -542,10 +568,14 @@ msgstr "Prepnúť na VT č. 11"
msgid "Switch to VT 12"
msgstr "Prepnúť na VT č. 12"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Znovu povoliť klávesové skratky"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1800
#: src/backends/meta-input-settings.c:2151
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Prepínač režimu (skupina č. %d)"
@ -555,37 +585,37 @@ msgstr "Prepí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:1822
#: src/backends/meta-input-settings.c:2174
msgid "Switch monitor"
msgstr "Prepnúť monitor"
#: src/backends/meta-input-settings.c:1824
#: src/backends/meta-input-settings.c:2176
msgid "Show on-screen help"
msgstr "Zobraziť pomocníka na obrazovke"
#: src/backends/meta-monitor-manager.c:675
#: src/backends/meta-monitor-manager.c:903
msgid "Built-in display"
msgstr "Vstavaný displej"
#: src/backends/meta-monitor-manager.c:698
#: src/backends/meta-monitor-manager.c:926
msgid "Unknown"
msgstr "Neznámy"
#: src/backends/meta-monitor-manager.c:700
#: src/backends/meta-monitor-manager.c:928
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:708
#: src/backends/meta-monitor-manager.c:936
#, 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:474
#: src/compositor/compositor.c:476
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display “%s”."
@ -596,32 +626,6 @@ msgstr ""
msgid "Bell event"
msgstr "Udalosť zvončeka"
# %s is a window title
#. 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
msgid "Application is not responding."
msgstr "Aplikácia neodpovedá."
#: 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 "_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:608
#, c-format
@ -671,6 +675,32 @@ msgstr "Spustí ako kompozitor s vnoreným režimom"
msgid "Run as a full display server, rather than nested"
msgstr "Spustí ako plnohodnotný zobrazovací server, namiesto vnoreného režimu"
# %s is a window title
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "„%s“ neodpovedá."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "Aplikácia neodpovedá."
#: src/core/meta-close-dialog-default.c:154
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/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Vynútiť ukončenie"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Počkať"
#: src/core/mutter.c:39
#, c-format
msgid ""

230
po/sl.po
View File

@ -9,19 +9,20 @@
msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-02-14 08:48+0100\n"
"PO-Revision-Date: 2017-02-14 08:48+0100\n"
"POT-Creation-Date: 2017-08-07 10:01+0200\n"
"PO-Revision-Date: 2017-08-07 10:02+0200\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.9\n"
"X-Generator: Poedit 2.0.1\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@ -274,15 +275,15 @@ msgstr "Spremenilnik, ki naj se uporabi za upravljanje oken"
#: 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 ""
"Ta vrednost določa \"prevleko\", ki združuje predogled okna in zaganjalnik "
"programa. Vrednost je zamišljena kot \"ključ oken\" na strojni opremi "
"računalnika. Pričakovano je, da je vrednost določena privzeto ali pa ni "
"določena."
"Ta vrednost določa »prekrivno plast«, ki združuje predogled okna in "
"zaganjalnik programa. Vrednost je zamišljena kot »ključ oken« na strojni "
"opremi računalnika. Pričakovano je, da je vrednost določena privzeto ali pa "
"ni določena."
#: data/org.gnome.mutter.gschema.xml.in:20
msgid "Attach modal dialogs"
@ -317,7 +318,7 @@ msgstr "Število delovnih površin je spremenljivo"
#: 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 ""
@ -355,12 +356,12 @@ msgstr "Zamakni spremembe žarišča, dokler se kazalnik še premika"
#: 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 ""
"Izbrana možnost omogoča, da se žarišče, v kolikor je izbran način \"sloppy\" "
"ali \"miška\", ne spremeni takoj ob izbiri okna. Žarišče se spremeni, ko se "
"Izbrana možnost omogoča, da se žarišče, v kolikor je izbran način »sloppy« "
"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:79
@ -369,11 +370,11 @@ msgstr "Prilagodljiva obroba pravokotnika"
#: 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 ""
"Delež skupne prilagodljive obrobe. V kolikor vidni robovi teme niso dovolj, "
"so dodane nevidne obrobe, za dodatno prilagajanje."
"so dodane nevidne obrobe za dodatno prilagajanje."
#: data/org.gnome.mutter.gschema.xml.in:89
msgid "Auto maximize nearly monitor sized windows"
@ -398,14 +399,53 @@ msgid ""
msgstr ""
"Izbrana možnost določa, da bo novo okno vedno v središču dejavnega zaslona."
#: data/org.gnome.mutter.gschema.xml.in:120
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "Omogoči preizkusne možnosti"
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “scale-monitor-"
"framebuffer” — makes mutter default to layout logical monitors in a logical "
"pixel coordinate space, while scaling monitor framebuffers instead of window "
"content, to manage HiDPI monitors. Does not require a restart. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
msgstr ""
"Za omogočanje preizkusnih možnosti, dodajte ključno besedo možnosti na "
"seznam. Ali zahteva možnost ponovni zagon sestavljalnika, je odvisno od "
"posamezne možnosti. Te možnosti niso zahtevane niti nastavljive. Trenutno so "
"na voljo ključne besede: • »monitor-config-manager« uporablja nov sistem "
"nastavitev, ki naj bi zamenjal obstoječega. Omogoča večjo nastavljivost API, "
"za uporabo pri prigramih za nastavitve lastnosti zaslona. • »scale-monitor-"
"framebuffer« določi privzeto rabo sistema mutter za logične zaslone v "
"logičnem točkovnem koordinatnem prostoru, pri čemer prilagaja predpomnilnik "
"in ne vsebine za upravljanje z zasloni HiDPI. Možnost ne zahteva ponovnega "
"zagona. Za omogočanje te možnosti, mora biti omogočena tudi možnost »monitor-"
"config-manager«."
#: data/org.gnome.mutter.gschema.xml.in:151
msgid "Select window from tab popup"
msgstr "Izbor okna iz pojavnega zavihka"
#: data/org.gnome.mutter.gschema.xml.in:125
#: data/org.gnome.mutter.gschema.xml.in:156
msgid "Cancel tab popup"
msgstr "Prekliči pojavni zavihek"
#: data/org.gnome.mutter.gschema.xml.in:161
msgid "Switch monitor configurations"
msgstr "Nastavitve nadzornika preklopa"
#: data/org.gnome.mutter.gschema.xml.in:166
msgid "Rotates the built-in monitor configuration"
msgstr "Zavrti vgrajene nastavitve zaslona"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Preklopi na VT 1"
@ -454,10 +494,14 @@ msgstr "Preklopi na VT 11"
msgid "Switch to VT 12"
msgstr "Preklopi na VT 12"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Ponovno omogoči tipkovne bližnjice"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1759
#: src/backends/meta-input-settings.c:2118
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Preklop načina (skupina %d)"
@ -465,59 +509,99 @@ 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
#: src/backends/meta-input-settings.c:2141
msgid "Switch monitor"
msgstr "Nadzornik preklopa"
#: src/backends/meta-input-settings.c:1783
#: src/backends/meta-input-settings.c:2143
msgid "Show on-screen help"
msgstr "Pokaži zaslonsko pomoč"
#: src/backends/meta-monitor-manager.c:675
#: src/backends/meta-monitor-manager.c:927
msgid "Built-in display"
msgstr "Vgrajen zaslon"
#: src/backends/meta-monitor-manager.c:698
#: src/backends/meta-monitor-manager.c:950
msgid "Unknown"
msgstr "Neznano"
#: src/backends/meta-monitor-manager.c:700
#: src/backends/meta-monitor-manager.c:952
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:708
#: src/backends/meta-monitor-manager.c:960
#, 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:471
#: src/compositor/compositor.c:476
#, 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 ""
"Drug upravljalnik sestavljanja je že zagnan na zaslonu %i prikaza \"%s\"."
"Drug upravljalnik sestavljanja je že zagnan na zaslonu %i prikaza »%s«."
#: src/core/bell.c:194
msgid "Bell event"
msgstr "Dogodek zvonjenja"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
msgstr "Odpiranje zaslona »%s« okenskega sistema X je spodletelo\n"
#: src/core/main.c:189
msgid "Disable connection to session manager"
msgstr "Onemogoči povezavo z upravljalnikom sej"
#: src/core/main.c:195
msgid "Replace the running window manager"
msgstr "Zamenjaj trenutni upravljalnik oken"
#: src/core/main.c:201
msgid "Specify session management ID"
msgstr "Navedite ID upravljanja seje"
#: src/core/main.c:206
msgid "X Display to use"
msgstr "Zaslon X za uporabo"
#: src/core/main.c:212
msgid "Initialize session from savefile"
msgstr "Začni sejo iz shranjene datoteke"
#: src/core/main.c:218
msgid "Make X calls synchronous"
msgstr "Uskladi klice X"
#: src/core/main.c:225
msgid "Run as a wayland compositor"
msgstr "Zaženi izbirnik wayland"
#: src/core/main.c:231
msgid "Run as a nested compositor"
msgstr "Zaženi kot gnezden vpisovalnik"
#: src/core/main.c:239
msgid "Run as a full display server, rather than nested"
msgstr "Zaženi kot polni strežnik zaslona in ne vstavljeno"
#. Translators: %s is a window title
#: src/core/delete.c:127
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "%s se ne odziva."
msgstr "Okno »%s« se ne odziva."
#: src/core/delete.c:129
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "Program se ne odziva."
#: src/core/delete.c:134
#: src/core/meta-close-dialog-default.c:154
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
@ -525,68 +609,26 @@ msgstr ""
"Lahko še malo počakate, če program morda spet začne delovati, ali pa vsilite "
"končanje delovanja."
#: src/core/delete.c:141
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Vsili konec"
#: src/core/delete.c:141
#: src/core/meta-close-dialog-default.c:161
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:187
msgid "Disable connection to session manager"
msgstr "Onemogoči povezavo z upravljalnikom sej"
#: src/core/main.c:193
msgid "Replace the running window manager"
msgstr "Zamenjaj trenutni upravljalnik oken"
#: src/core/main.c:199
msgid "Specify session management ID"
msgstr "Navedite ID upravljanja seje"
#: src/core/main.c:204
msgid "X Display to use"
msgstr "Zaslon X za uporabo"
#: src/core/main.c:210
msgid "Initialize session from savefile"
msgstr "Začni sejo iz shranjene datoteke"
#: src/core/main.c:216
msgid "Make X calls synchronous"
msgstr "Uskladi klice X"
#: src/core/main.c:223
msgid "Run as a wayland compositor"
msgstr "Zaženi izbirnik wayland"
#: src/core/main.c:229
msgid "Run as a nested compositor"
msgstr "Zaženi kot gnezden vpisovalnik"
#: 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
#, 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"
"Avtorske pravice pridržane (C) 2001-%d Havoc Pennington, Red Hat in drugi\n"
"To je prosta programska oprema; za pogoje kopiranja si poglejte izvorno "
"kodo.\n"
"To je prosta programska oprema; za pogoje kopiranja si oglejte dovoljenje.\n"
"Program je na voljo BREZ KAKRŠNIHKOLI ZAGOTOVIL.\n"
#: src/core/mutter.c:53
@ -606,16 +648,16 @@ msgstr "Delovna površina %d"
#: 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 ""
"Zaslon \"%s\" že ima določen upravljalnik oken; poskušajte uporabiti možnost "
"--replace za zamenjavo trenutnega upravljalnika zaslona."
"Zaslon »%s« že ima določen upravljalnik oken; poskušajte uporabiti možnost --"
"replace za zamenjavo trenutnega upravljalnika zaslona."
#: 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"
msgid "Screen %d on display %s is invalid\n"
msgstr "Zaslon %d na prikazu »%s« ni veljaven\n"
#: src/core/util.c:120
msgid "Mutter was compiled without support for verbose mode\n"
@ -630,11 +672,11 @@ msgstr "Način preklopa: način %d"
# G:2 K:6 O:0
#: 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 ""
"Ta okna ne podpirajo možnosti &quot;shranjevanja trenutnih nastavitev&quot;, "
"zato jih bo treba ob naslednji prijavi zagnati ročno."
"Ta okna ne podpirajo možnosti »shranjevanja trenutnih nastavitev«, zato jih "
"bo treba ob naslednji prijavi zagnati ročno."
#: src/x11/window-props.c:559
#, c-format

170
po/sr.po
View File

@ -9,12 +9,12 @@
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: 2017-02-16 01:44+0000\n"
"PO-Revision-Date: 2017-02-21 07:16+0200\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?product=mutter"
"&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-08-13 15:47+0000\n"
"PO-Revision-Date: 2017-08-15 20:40+0200\n"
"Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n"
"Language-Team: Serbian <(nothing)>\n"
"Language-Team: српски <gnome-sr@googlegroups.org>\n"
"Language: sr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -272,11 +272,6 @@ msgid "Modifier to use for extended window management operations"
msgstr "Тастер који се користи за проширене радње управника прозорима"
#: 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 "
@ -322,18 +317,14 @@ msgid "Workspaces are managed dynamically"
msgstr "Радним просторима се управља динамички"
#: 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 theres a "
"static number of workspaces (determined by the num-workspaces key in org."
"gnome.desktop.wm.preferences)."
msgstr ""
"Одређује да ли се радним просторима управља динамички или ће постојати "
"стални број радних простора (одређен бројем радних простора у "
"„org.gnome.desktop.wm.preferences“)."
"стални број радних простора (одређен бројем радних простора у „org.gnome."
"desktop.wm.preferences“)."
#: data/org.gnome.mutter.gschema.xml.in:50
msgid "Workspaces only on primary"
@ -364,10 +355,6 @@ msgid "Delay focus changes until the pointer stops moving"
msgstr "Застој првог плана се мења док се показивач не заустави"
#: 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 "
@ -382,9 +369,6 @@ msgid "Draggable border width"
msgstr "Ширина ивице за превлачење"
#: 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 themes visible borders are "
"not enough, invisible borders will be added to meet this value."
@ -416,14 +400,56 @@ msgstr ""
"Ако је изабрано, нови прозори ће увек бити постављени на средину радног "
"екрана монитора."
#: data/org.gnome.mutter.gschema.xml.in:120
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "Укључује експерименталне функције"
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “scale-monitor-"
"framebuffer” — makes mutter default to layout logical monitors in a logical "
"pixel coordinate space, while scaling monitor framebuffers instead of window "
"content, to manage HiDPI monitors. Does not require a restart. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
msgstr ""
"Да укључите експерименталне функције, додајте кључну реч функције на списак. "
"Да ли функција захтева поновно покретање састављача зависи од дате функције. "
"Није потребно да нека експериментална функција буде и даље доступна или "
"подесива. Немојте очекивати да додавање било чега у овом подешавању буде "
"будући доказ. Тренутно могуће кључне речи су: • „monitor-config-manager“ — "
"користи нови систем подешавања монитора, који треба да замени стари. Ово "
"омогућава да АПИ подешавања вишег нивоа буде коришћен програмима подешавања, "
"као и могућност подешавања скале монитора на нивоу логике. • „scale-monitor-"
"framebuffer“ — чини да матер пређе на распоред логичких монитора у логичком "
"координатном простору пиксела, док врши сразмеравање оквира монитора уместо "
"садржаја прозора, за управљање ХиДПИ мониторима. Не захтева поновно "
"покретање. Такође је потребно укључити „monitor-config-manager“ да би ова "
"функција била укључена."
#: data/org.gnome.mutter.gschema.xml.in:151
msgid "Select window from tab popup"
msgstr "Бира прозор из језичка искакања"
#: data/org.gnome.mutter.gschema.xml.in:125
#: data/org.gnome.mutter.gschema.xml.in:156
msgid "Cancel tab popup"
msgstr "Отказивање језичка искакања"
#: data/org.gnome.mutter.gschema.xml.in:161
#| msgid "Switch monitor"
msgid "Switch monitor configurations"
msgstr "Мења подешавања монитора"
#: data/org.gnome.mutter.gschema.xml.in:166
msgid "Rotates the built-in monitor configuration"
msgstr "Заокреће уграђена подешавања монитора"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Прелазак на ВТ 1"
@ -472,53 +498,53 @@ msgstr "Прелазак на ВТ 11"
msgid "Switch to VT 12"
msgstr "Прелазак на ВТ 12"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Поново укључивање пречица"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1759
#: src/backends/meta-input-settings.c:2118
#, c-format
#| msgid "Mode Switch: Mode %d"
msgid "Mode Switch (Group %d)"
msgstr "Режим прекидача (група %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1781
#: src/backends/meta-input-settings.c:2141
msgid "Switch monitor"
msgstr "Промени монитор"
#: src/backends/meta-input-settings.c:1783
#: src/backends/meta-input-settings.c:2143
msgid "Show on-screen help"
msgstr "Прикажи помоћ на екрану"
#: src/backends/meta-monitor-manager.c:675
#: src/backends/meta-monitor-manager.c:927
msgid "Built-in display"
msgstr "Уграђени дисплеј"
#: src/backends/meta-monitor-manager.c:698
#: src/backends/meta-monitor-manager.c:950
msgid "Unknown"
msgstr "Непознато"
#: src/backends/meta-monitor-manager.c:700
#: src/backends/meta-monitor-manager.c:952
msgid "Unknown Display"
msgstr "Непознат дисплеј"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:708
#: src/backends/meta-monitor-manager.c:960
#, 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:471
#: src/compositor/compositor.c:476
#, 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”."
msgstr ""
@ -528,35 +554,8 @@ msgstr ""
msgid "Bell event"
msgstr "Звонца"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "„%s“ не даје одзив."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "Програм не даје одзив."
#: 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
msgid "_Force Quit"
msgstr "_Приморај излаз"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Сачекај"
#: 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 "Нисам успео да отворим екран „%s“ Икс система прозора\n"
@ -596,14 +595,34 @@ msgstr "Ради као угнеждени саставник"
msgid "Run as a full display server, rather than nested"
msgstr "Ради као пуни сервер приказа, уместо као угнеждени"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "„%s“ не даје одзив."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "Програм не даје одзив."
#: src/core/meta-close-dialog-default.c:154
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Можете мало сачекати док се програм не сабере или приморати програм да "
"комплетно прекине са радом."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Приморај излаз"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Сачекај"
#: 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 © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
@ -632,19 +651,15 @@ msgstr "%d. радни простор"
#: 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."
msgstr ""
"Приказ „%s“ већ има управника прозора; пробајте да користите опцију "
"„--replace“ да замените тренутног управника прозора."
"Приказ „%s“ већ има управника прозора; пробајте да користите опцију „--"
"replace“ да замените тренутног управника прозора."
#: 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 "Приказ „%d“ на екрану „%s“ није исправан\n"
@ -658,9 +673,6 @@ 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."
msgid ""
"These windows do not support “save current setup” and will have to be "
"restarted manually next time you log in."

View File

@ -9,12 +9,12 @@
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: 2017-02-16 01:44+0000\n"
"PO-Revision-Date: 2017-02-21 07:16+0200\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?product=mutter"
"&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-08-13 15:47+0000\n"
"PO-Revision-Date: 2017-08-15 20:40+0200\n"
"Last-Translator: Miroslav Nikolić <miroslavnikolic@rocketmail.com>\n"
"Language-Team: Serbian <(nothing)>\n"
"Language-Team: srpski <gnome-sr@googlegroups.org>\n"
"Language: sr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -272,11 +272,6 @@ msgid "Modifier to use for extended window management operations"
msgstr "Taster koji se koristi za proširene radnje upravnika prozorima"
#: 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 "
@ -322,18 +317,14 @@ msgid "Workspaces are managed dynamically"
msgstr "Radnim prostorima se upravlja dinamički"
#: 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 theres a "
"static number of workspaces (determined by the num-workspaces key in org."
"gnome.desktop.wm.preferences)."
msgstr ""
"Određuje da li se radnim prostorima upravlja dinamički ili će postojati "
"stalni broj radnih prostora (određen brojem radnih prostora u "
"„org.gnome.desktop.wm.preferences“)."
"stalni broj radnih prostora (određen brojem radnih prostora u „org.gnome."
"desktop.wm.preferences“)."
#: data/org.gnome.mutter.gschema.xml.in:50
msgid "Workspaces only on primary"
@ -364,10 +355,6 @@ msgid "Delay focus changes until the pointer stops moving"
msgstr "Zastoj prvog plana se menja dok se pokazivač ne zaustavi"
#: 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 "
@ -382,9 +369,6 @@ msgid "Draggable border width"
msgstr "Širina ivice za prevlačenje"
#: 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 themes visible borders are "
"not enough, invisible borders will be added to meet this value."
@ -416,14 +400,56 @@ msgstr ""
"Ako je izabrano, novi prozori će uvek biti postavljeni na sredinu radnog "
"ekrana monitora."
#: data/org.gnome.mutter.gschema.xml.in:120
#: data/org.gnome.mutter.gschema.xml.in:107
msgid "Enable experimental features"
msgstr "Uključuje eksperimentalne funkcije"
#: data/org.gnome.mutter.gschema.xml.in:108
msgid ""
"To enable experimental features, add the feature keyword to the list. "
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “scale-monitor-"
"framebuffer” — makes mutter default to layout logical monitors in a logical "
"pixel coordinate space, while scaling monitor framebuffers instead of window "
"content, to manage HiDPI monitors. Does not require a restart. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
msgstr ""
"Da uključite eksperimentalne funkcije, dodajte ključnu reč funkcije na spisak. "
"Da li funkcija zahteva ponovno pokretanje sastavljača zavisi od date funkcije. "
"Nije potrebno da neka eksperimentalna funkcija bude i dalje dostupna ili "
"podesiva. Nemojte očekivati da dodavanje bilo čega u ovom podešavanju bude "
"budući dokaz. Trenutno moguće ključne reči su: • „monitor-config-manager“ — "
"koristi novi sistem podešavanja monitora, koji treba da zameni stari. Ovo "
"omogućava da API podešavanja višeg nivoa bude korišćen programima podešavanja, "
"kao i mogućnost podešavanja skale monitora na nivou logike. • „scale-monitor-"
"framebuffer“ — čini da mater pređe na raspored logičkih monitora u logičkom "
"koordinatnom prostoru piksela, dok vrši srazmeravanje okvira monitora umesto "
"sadržaja prozora, za upravljanje HiDPI monitorima. Ne zahteva ponovno "
"pokretanje. Takođe je potrebno uključiti „monitor-config-manager“ da bi ova "
"funkcija bila uključena."
#: data/org.gnome.mutter.gschema.xml.in:151
msgid "Select window from tab popup"
msgstr "Bira prozor iz jezička iskakanja"
#: data/org.gnome.mutter.gschema.xml.in:125
#: data/org.gnome.mutter.gschema.xml.in:156
msgid "Cancel tab popup"
msgstr "Otkazivanje jezička iskakanja"
#: data/org.gnome.mutter.gschema.xml.in:161
#| msgid "Switch monitor"
msgid "Switch monitor configurations"
msgstr "Menja podešavanja monitora"
#: data/org.gnome.mutter.gschema.xml.in:166
msgid "Rotates the built-in monitor configuration"
msgstr "Zaokreće ugrađena podešavanja monitora"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "Prelazak na VT 1"
@ -472,53 +498,53 @@ msgstr "Prelazak na VT 11"
msgid "Switch to VT 12"
msgstr "Prelazak na VT 12"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr "Ponovo uključivanje prečica"
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1759
#: src/backends/meta-input-settings.c:2118
#, c-format
#| msgid "Mode Switch: Mode %d"
msgid "Mode Switch (Group %d)"
msgstr "Režim prekidača (grupa %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1781
#: src/backends/meta-input-settings.c:2141
msgid "Switch monitor"
msgstr "Promeni monitor"
#: src/backends/meta-input-settings.c:1783
#: src/backends/meta-input-settings.c:2143
msgid "Show on-screen help"
msgstr "Prikaži pomoć na ekranu"
#: src/backends/meta-monitor-manager.c:675
#: src/backends/meta-monitor-manager.c:927
msgid "Built-in display"
msgstr "Ugrađeni displej"
#: src/backends/meta-monitor-manager.c:698
#: src/backends/meta-monitor-manager.c:950
msgid "Unknown"
msgstr "Nepoznato"
#: src/backends/meta-monitor-manager.c:700
#: src/backends/meta-monitor-manager.c:952
msgid "Unknown Display"
msgstr "Nepoznat displej"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:708
#: src/backends/meta-monitor-manager.c:960
#, 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:471
#: src/compositor/compositor.c:476
#, 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”."
msgstr ""
@ -528,35 +554,8 @@ msgstr ""
msgid "Bell event"
msgstr "Zvonca"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "„%s“ ne daje odziv."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "Program ne daje odziv."
#: 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 ""
"Možete malo sačekati dok se program ne sabere ili primorati program da "
"kompletno prekine sa radom."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Primoraj izlaz"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Sačekaj"
#: 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 "Nisam uspeo da otvorim ekran „%s“ Iks sistema prozora\n"
@ -596,14 +595,34 @@ msgstr "Radi kao ugneždeni sastavnik"
msgid "Run as a full display server, rather than nested"
msgstr "Radi kao puni server prikaza, umesto kao ugneždeni"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "„%s“ ne daje odziv."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "Program ne daje odziv."
#: src/core/meta-close-dialog-default.c:154
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Možete malo sačekati dok se program ne sabere ili primorati program da "
"kompletno prekine sa radom."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Primoraj izlaz"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Sačekaj"
#: 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 © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
@ -632,19 +651,15 @@ msgstr "%d. radni prostor"
#: 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."
msgstr ""
"Prikaz „%s“ već ima upravnika prozora; probajte da koristite opciju "
"„--replace“ da zamenite trenutnog upravnika prozora."
"Prikaz „%s“ već ima upravnika prozora; probajte da koristite opciju „--"
"replace“ da zamenite trenutnog upravnika prozora."
#: 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 "Prikaz „%d“ na ekranu „%s“ nije ispravan\n"
@ -658,9 +673,6 @@ msgid "Mode Switch: Mode %d"
msgstr "Režim prekidača: Režim %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."
msgid ""
"These windows do not support “save current setup” and will have to be "
"restarted manually next time you log in."

142
po/tr.po
View File

@ -6,25 +6,26 @@
# Baris Cicek <baris@teamforce.name.tr>, 2004, 2005, 2008, 2009.
# İlker DAĞLI <ilker@ilkerdagli.info>, 2011.
# Muhammed EKEN <gnome@m-eken.com>, 2011.
# Muhammet Kara <muhammetk@gmail.com>, 2011, 2012, 2014, 2015, 2016.
# Furkan Ahmet Kara <furkanahmetkara.fk@gmail.com>, 2017.
# Emin Tufan Çetin <etcetin@gmail.com>, 2017.
# Muhammet Kara <muhammetk@gmail.com>, 2011, 2012, 2014, 2015, 2016, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-05-11 12:29+0000\n"
"PO-Revision-Date: 2017-05-13 17:23+0300\n"
"Last-Translator: Emin Tufan Çetin <etcetin@gmail.com>\n"
"Language-Team: Türkçe <>\n"
"POT-Creation-Date: 2017-08-13 15:47+0000\n"
"PO-Revision-Date: 2017-08-13 18:55+0300\n"
"Last-Translator: Muhammet Kara <muhammetk@gmail.com>\n"
"Language-Team: Turkish <gnometurk@gnome.org>\n"
"Language: tr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Gtranslator 2.91.7\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-DamnedLies-Scope: partial\n"
"X-Generator: Gtranslator 2.91.7\n"
#: data/50-mutter-navigation.xml:6
msgid "Navigation"
@ -277,11 +278,6 @@ msgid "Modifier to use for extended window management operations"
msgstr "Genişletilmiş pencere yönetimi işlemleri için kullanılacak değiştirici"
#: 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 "
@ -366,10 +362,6 @@ msgid "Delay focus changes until the pointer stops moving"
msgstr "Odak değişikliklerini işaretçi hareketi durana kadar ertele"
#: 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 "
@ -426,29 +418,46 @@ msgid ""
"Whether the feature requires restarting the compositor depends on the given "
"feature. Any experimental feature is not required to still be available, or "
"configurable. Dont expect adding anything in this setting to be future "
"proof. Currently possible keywords: • “scale-monitor-framebuffer” — makes "
"mutter default to layout logical monitors in a logical pixel coordinate "
"space, while scaling monitor framebuffers instead of window content, to "
"manage HiDPI monitors. Does not require a restart."
"proof. Currently possible keywords: • “monitor-config-manager” — use the new "
"monitor configuration system, aimed to replace the old one. This enables a "
"higher level configuration API to be used by configuration applications, as "
"well as the ability to configure per logical monitor scale. • “scale-monitor-"
"framebuffer” — makes mutter default to layout logical monitors in a logical "
"pixel coordinate space, while scaling monitor framebuffers instead of window "
"content, to manage HiDPI monitors. Does not require a restart. Also enabling "
"“monitor-config-manager” is required for this feature to be enabled."
msgstr ""
"Deneysel özellikleri etkinleştirmek için özelliğin anahtar sözcüğünü listeye "
"ekleyin. Özelliğin yeniden başlatmayı gerektirip gerektirmeyeceği verilen "
"özelliğe bağlıdır. Hiçbir deneysel özellik hala kullanılabilir veya "
"yapılandırılabilir olmak zorunda değildir. Bu ayara eklenecek herhangi bir "
"şeyin gelecekte olabilecek değişikliklerden etkilenmeyeceğini düşünmeyin. Şu "
"anda kullanılabilir anahtar sözcükler: • “scale-monitor-framebuffer” — "
"mutterin HiDPI monitörleri yönetmesi için pencere içeriği yerine monitör "
"çerçeve arabelleğini ölçeklendirirken, mantıksal monitörleri mantıksal "
"piksel koordinat aralığına yerleştirmesini öntanımlı yapar."
"anda kullanılabilir anahtar sözcükler: • “monitor-config-manager” — "
"eskisinin yerini alması amaçlanan yeni monitör yapılandırma sistemini "
"kullan. Bu, yapılandırma uygulamaları tarafından kullanılmak üzere daha "
"ksek düzeyde bir yapılandırma API'sini etkinleştirir ve ayrıca mantıksal "
"monitör ölçeğinde yapılandırma yapmaya olanak tanır.• “scale-monitor-"
"framebuffer” — mutterin HiDPI monitörleri yönetmesi için pencere içeriği "
"yerine monitör çerçeve arabelleğini ölçeklendirirken, mantıksal monitörleri "
"mantıksal piksel koordinat aralığına yerleştirmesini öntanımlı yapar."
#: data/org.gnome.mutter.gschema.xml.in:141
#: data/org.gnome.mutter.gschema.xml.in:151
msgid "Select window from tab popup"
msgstr "Pencereyi, sekme açılır penceresinden seç"
#: data/org.gnome.mutter.gschema.xml.in:146
#: data/org.gnome.mutter.gschema.xml.in:156
msgid "Cancel tab popup"
msgstr "Sekmeyi yeni pencerede açmayı iptal et"
#: data/org.gnome.mutter.gschema.xml.in:161
msgid "Switch monitor configurations"
msgstr "Monitör yapılandırmaları arasında geçiş yap"
#: data/org.gnome.mutter.gschema.xml.in:166
#| msgid "Switch monitor configurations"
msgid "Rotates the built-in monitor configuration"
msgstr "Yerleşik monitör yapılandırmaları arasında geçiş yapar"
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
msgid "Switch to VT 1"
msgstr "VT 1e geç"
@ -497,10 +506,14 @@ msgstr "VT 11e geç"
msgid "Switch to VT 12"
msgstr "VT 12ye geç"
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
msgid "Re-enable shortcuts"
msgstr ""
#. TRANSLATORS: This string refers to a button that switches between
#. * different modes.
#.
#: src/backends/meta-input-settings.c:1848
#: src/backends/meta-input-settings.c:2118
#, c-format
msgid "Mode Switch (Group %d)"
msgstr "Kip anahtarı (Group %d)"
@ -508,30 +521,30 @@ msgstr "Kip anahtarı (Group %d)"
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
#. * mapping through the available outputs.
#.
#: src/backends/meta-input-settings.c:1870
#: src/backends/meta-input-settings.c:2141
msgid "Switch monitor"
msgstr "Monitör değiştir"
#: src/backends/meta-input-settings.c:1872
#: src/backends/meta-input-settings.c:2143
msgid "Show on-screen help"
msgstr "Ekranda yardımı göster"
#: src/backends/meta-monitor-manager.c:783
#: src/backends/meta-monitor-manager.c:927
msgid "Built-in display"
msgstr "Yerleşik ekran"
#: src/backends/meta-monitor-manager.c:806
#: src/backends/meta-monitor-manager.c:950
msgid "Unknown"
msgstr "Bilinmiyor"
#: src/backends/meta-monitor-manager.c:808
#: src/backends/meta-monitor-manager.c:952
msgid "Unknown Display"
msgstr "Bilinmeyen Ekran"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: src/backends/meta-monitor-manager.c:816
#: src/backends/meta-monitor-manager.c:960
#, c-format
msgid "%s %s"
msgstr "%s %s"
@ -540,44 +553,16 @@ msgstr "%s %s"
#. * we have no way to get it to exit
#: src/compositor/compositor.c:476
#, 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”."
msgstr ""
"“%2$s” monitöründeki %1$i ekranında zaten başka bir birleştirme yöneticisi çalışıyor."
"“%2$s” monitöründeki %1$i ekranında zaten başka bir birleştirme yöneticisi "
"çalışıyor."
#: src/core/bell.c:194
msgid "Bell event"
msgstr "Etkinlik zili"
#. Translators: %s is a window title
#: src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "“%s” yanıt vermiyor."
#: src/core/delete.c:129
msgid "Application is not responding."
msgstr "Uygulama cevap vermiyor"
#: 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 ""
"Uygulamanın devam etmesi için bir müddet bekleyi seçebilirsiniz ya da "
"uygulamanın tamamen çıkması için onu zorlayabilirsiniz."
#: src/core/delete.c:141
msgid "_Force Quit"
msgstr "_Sonlandır"
#: src/core/delete.c:141
msgid "_Wait"
msgstr "_Bekle"
#: src/core/display.c:608
#, c-format
msgid "Failed to open X Window System display “%s”\n"
@ -619,14 +604,34 @@ msgstr "Yuvalanmış dizgici olarak çalıştır"
msgid "Run as a full display server, rather than nested"
msgstr "İç içe değil tam ekran sunucusu olarak çalıştır"
#. Translators: %s is a window title
#: src/core/meta-close-dialog-default.c:147
#, c-format
msgid "“%s” is not responding."
msgstr "“%s” yanıt vermiyor."
#: src/core/meta-close-dialog-default.c:149
msgid "Application is not responding."
msgstr "Uygulama cevap vermiyor"
#: src/core/meta-close-dialog-default.c:154
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
"Uygulamanın devam etmesi için bir müddet bekleyi seçebilirsiniz ya da "
"uygulamanın tamamen çıkması için onu zorlayabilirsiniz."
#: src/core/meta-close-dialog-default.c:161
msgid "_Force Quit"
msgstr "_Sonlandır"
#: src/core/meta-close-dialog-default.c:161
msgid "_Wait"
msgstr "_Bekle"
#: 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 © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
@ -665,7 +670,6 @@ msgstr ""
#: 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 "“%2$s” monitöründeki %1$d ekranı geçersiz\n"

View File

@ -38,6 +38,8 @@ mutter_test_unit_tests_SOURCES = \
tests/meta-backend-test.h \
tests/meta-monitor-manager-test.c \
tests/meta-monitor-manager-test.h \
tests/monitor-config-migration-unit-tests.c \
tests/monitor-config-migration-unit-tests.h \
tests/monitor-store-unit-tests.c \
tests/monitor-store-unit-tests.h \
tests/monitor-test-utils.c \

View File

@ -71,6 +71,10 @@ mutter_built_sources += \
tablet-unstable-v2-server-protocol.h \
xdg-foreign-unstable-v1-protocol.c \
xdg-foreign-unstable-v1-server-protocol.h \
linux-dmabuf-unstable-v1-protocol.c \
linux-dmabuf-unstable-v1-server-protocol.h \
keyboard-shortcuts-inhibit-unstable-v1-protocol.c \
keyboard-shortcuts-inhibit-unstable-v1-server-protocol.h \
$(NULL)
endif
@ -82,6 +86,7 @@ wayland_protocols = \
libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
backends/meta-backend.c \
meta/meta-backend.h \
meta/meta-settings.h \
backends/meta-backend-private.h \
backends/meta-barrier.c \
backends/meta-barrier-private.h \
@ -104,10 +109,10 @@ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
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-migration.c \
backends/meta-monitor-config-migration.h \
backends/meta-monitor-config-store.c \
backends/meta-monitor-config-store.h \
backends/meta-monitor.c \
@ -117,8 +122,12 @@ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
backends/meta-monitor-manager-private.h \
backends/meta-monitor-manager-dummy.c \
backends/meta-monitor-manager-dummy.h \
backends/meta-orientation-manager.c \
backends/meta-orientation-manager.h \
backends/meta-pointer-constraint.c \
backends/meta-pointer-constraint.h \
backends/meta-settings.c \
backends/meta-settings-private.h \
backends/meta-stage.h \
backends/meta-stage.c \
backends/meta-renderer.c \
@ -226,6 +235,10 @@ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
meta/meta-close-dialog.h \
core/meta-close-dialog-default.c \
core/meta-close-dialog-default-private.h \
core/meta-inhibit-shortcuts-dialog.c \
meta/meta-inhibit-shortcuts-dialog.h \
core/meta-inhibit-shortcuts-dialog-default.c \
core/meta-inhibit-shortcuts-dialog-default-private.h \
core/delete.c \
core/display.c \
core/display-private.h \
@ -234,12 +247,13 @@ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
core/edge-resistance.h \
core/events.c \
core/events.h \
core/errors.c \
meta/errors.h \
core/frame.c \
core/frame.h \
core/meta-gesture-tracker.c \
core/meta-gesture-tracker-private.h \
core/meta-workspace-manager.c \
core/meta-workspace-manager-private.h \
meta/meta-workspace-manager.h \
core/keybindings.c \
core/keybindings-private.h \
core/main-private.h \
@ -248,9 +262,6 @@ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
core/place.h \
core/prefs.c \
meta/prefs.h \
core/screen.c \
core/screen-private.h \
meta/screen.h \
core/startup-notification.c \
core/startup-notification-private.h \
meta/types.h \
@ -277,6 +288,11 @@ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
ui/theme-private.h \
ui/ui.c \
x11/atomnames.h \
x11/meta-x11-display.c \
x11/meta-x11-display-private.h \
meta/meta-x11-display.h \
x11/meta-x11-errors.c \
meta/meta-x11-errors.h \
x11/events.c \
x11/events.h \
x11/group-private.h \
@ -312,6 +328,8 @@ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES += \
wayland/meta-xwayland-private.h \
wayland/meta-wayland-buffer.c \
wayland/meta-wayland-buffer.h \
wayland/meta-wayland-dma-buf.c \
wayland/meta-wayland-dma-buf.h \
wayland/meta-wayland-region.c \
wayland/meta-wayland-region.h \
wayland/meta-wayland-data-device.c \
@ -379,6 +397,10 @@ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES += \
wayland/meta-wayland-wl-shell.h \
wayland/meta-wayland-gtk-shell.c \
wayland/meta-wayland-gtk-shell.h \
wayland/meta-wayland-inhibit-shortcuts.c \
wayland/meta-wayland-inhibit-shortcuts.h \
wayland/meta-wayland-inhibit-shortcuts-dialog.c \
wayland/meta-wayland-inhibit-shortcuts-dialog.h \
$(NULL)
endif
@ -430,7 +452,6 @@ libmutterinclude_headers = \
meta/compositor-mutter.h \
meta/compositor.h \
meta/display.h \
meta/errors.h \
meta/group.h \
meta/keybindings.h \
meta/main.h \
@ -440,17 +461,21 @@ libmutterinclude_headers = \
meta/meta-background-image.h \
meta/meta-background-group.h \
meta/meta-close-dialog.h \
meta/meta-inhibit-shortcuts-dialog.h \
meta/meta-cursor-tracker.h \
meta/meta-dnd.h \
meta/meta-idle-monitor.h \
meta/meta-plugin.h \
meta/meta-monitor-manager.h \
meta/meta-settings.h \
meta/meta-shaped-texture.h \
meta/meta-shadow-factory.h \
meta/meta-window-actor.h \
meta/meta-window-shape.h \
meta/meta-workspace-manager.h \
meta/meta-x11-display.h \
meta/meta-x11-errors.h \
meta/prefs.h \
meta/screen.h \
meta/theme.h \
meta/types.h \
meta/util.h \
@ -574,7 +599,7 @@ stamp-meta-enum-types.h: $(libmutterinclude_headers) meta-enum-types.h.in
$(AM_V_GEN) ( cd $(srcdir) && \
$(GLIB_MKENUMS) \
--template meta-enum-types.h.in \
$(libmutterinclude_base_headers) ) >> xgen-teth && \
$(libmutterinclude_headers) ) > xgen-teth && \
(cmp -s xgen-teth meta/meta-enum-types.h || cp xgen-teth meta/meta-enum-types.h) && \
rm -f xgen-teth && \
echo timestamp > $(@F)
@ -583,7 +608,7 @@ meta-enum-types.c: stamp-meta-enum-types.h meta-enum-types.c.in
$(AM_V_GEN) ( cd $(srcdir) && \
$(GLIB_MKENUMS) \
--template meta-enum-types.c.in \
$(libmutterinclude_base_headers) ) >> xgen-tetc && \
$(libmutterinclude_headers) ) > xgen-tetc && \
cp xgen-tetc meta-enum-types.c && \
rm -f xgen-tetc
@ -640,3 +665,7 @@ endef
$(AM_V_GEN)$(WAYLAND_SCANNER) code $< $@
%-server-protocol.h : $(srcdir)/wayland/protocol/%.xml
$(AM_V_GEN)$(WAYLAND_SCANNER) server-header $< $@
keyboard-shortcuts-inhibit-unstable-v1-protocol.c : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml
$(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
keyboard-shortcuts-inhibit-unstable-v1-server-protocol.h : $(WAYLAND_PROTOCOLS_DATADIR)/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml
$(AM_V_GEN)$(WAYLAND_SCANNER) server-header < $< > $@

View File

@ -34,10 +34,12 @@
#include <meta/meta-idle-monitor.h>
#include "meta-cursor-renderer.h"
#include "meta-monitor-manager-private.h"
#include "meta-orientation-manager.h"
#include "meta-input-settings-private.h"
#include "backends/meta-egl.h"
#include "backends/meta-pointer-constraint.h"
#include "backends/meta-renderer.h"
#include "backends/meta-settings-private.h"
#include "core/util-private.h"
#define DEFAULT_XKB_RULES_FILE "evdev"
@ -59,6 +61,7 @@ struct _MetaBackendClass
MetaMonitorManager * (* create_monitor_manager) (MetaBackend *backend);
MetaCursorRenderer * (* create_cursor_renderer) (MetaBackend *backend);
MetaRenderer * (* create_renderer) (MetaBackend *backend);
MetaInputSettings * (* create_input_settings) (MetaBackend *backend);
gboolean (* grab_device) (MetaBackend *backend,
int device_id,
@ -80,6 +83,8 @@ struct _MetaBackendClass
struct xkb_keymap * (* get_keymap) (MetaBackend *backend);
xkb_layout_index_t (* get_keymap_layout_group) (MetaBackend *backend);
void (* lock_layout_group) (MetaBackend *backend,
guint idx);
@ -97,17 +102,8 @@ struct _MetaBackendClass
};
typedef enum _MetaExperimentalFeature
{
META_EXPERIMENTAL_FEATURE_NONE = 0,
META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER = (1 << 0),
META_EXPERIMENTAL_FEATURE_MONITOR_CONFIG_MANAGER = (1 << 1)
} MetaExperimentalFeature;
void meta_init_backend (GType backend_gtype);
void meta_backend_display_opened (MetaBackend *backend);
ClutterBackend * meta_backend_get_clutter_backend (MetaBackend *backend);
MetaIdleMonitor * meta_backend_get_idle_monitor (MetaBackend *backend,
@ -117,10 +113,12 @@ void meta_backend_foreach_device_monitor (MetaBackend *backend,
gpointer user_data);
MetaMonitorManager * meta_backend_get_monitor_manager (MetaBackend *backend);
MetaOrientationManager * meta_backend_get_orientation_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);
MetaSettings * meta_backend_get_settings (MetaBackend *backend);
gboolean meta_backend_grab_device (MetaBackend *backend,
int device_id,
@ -137,6 +135,8 @@ MetaLogicalMonitor * meta_backend_get_current_logical_monitor (MetaBackend *back
struct xkb_keymap * meta_backend_get_keymap (MetaBackend *backend);
xkb_layout_index_t meta_backend_get_keymap_layout_group (MetaBackend *backend);
void meta_backend_update_last_device (MetaBackend *backend,
int device_id);
@ -155,16 +155,6 @@ ClutterBackend * meta_backend_get_clutter_backend (MetaBackend *backend);
void meta_backend_monitors_changed (MetaBackend *backend);
gboolean meta_backend_is_experimental_feature_enabled (MetaBackend *backend,
MetaExperimentalFeature feature);
MetaExperimentalFeature meta_backend_get_experimental_features (MetaBackend *backend);
void meta_backend_override_experimental_features (MetaBackend *backend);
void meta_backend_enable_experimental_feature (MetaBackend *backend,
MetaExperimentalFeature feature);
gboolean meta_is_stage_views_enabled (void);
gboolean meta_is_stage_views_scaled (void);

View File

@ -43,15 +43,15 @@
#include "backends/meta-idle-monitor-private.h"
#include "backends/meta-logical-monitor.h"
#include "backends/meta-monitor-manager-dummy.h"
#include "ui/theme-private.h"
#include "backends/meta-settings-private.h"
#define META_IDLE_MONITOR_CORE_DEVICE 0
enum
{
KEYMAP_CHANGED,
KEYMAP_LAYOUT_GROUP_CHANGED,
LAST_DEVICE_CHANGED,
EXPERIMENTAL_FEATURES_CHANGED,
UI_SCALING_FACTOR_CHANGED,
N_SIGNALS
};
@ -78,15 +78,13 @@ meta_get_backend (void)
struct _MetaBackendPrivate
{
MetaMonitorManager *monitor_manager;
MetaOrientationManager *orientation_manager;
MetaCursorTracker *cursor_tracker;
MetaCursorRenderer *cursor_renderer;
MetaInputSettings *input_settings;
MetaRenderer *renderer;
MetaEgl *egl;
GSettings *mutter_settings;
MetaExperimentalFeature experimental_features;
gboolean experimental_features_overridden;
MetaSettings *settings;
ClutterBackend *clutter_backend;
ClutterActor *stage;
@ -99,8 +97,6 @@ struct _MetaBackendPrivate
MetaPointerConstraint *client_pointer_constraint;
MetaDnd *dnd;
int ui_scaling_factor;
};
typedef struct _MetaBackendPrivate MetaBackendPrivate;
@ -119,6 +115,7 @@ meta_backend_finalize (GObject *object)
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
g_clear_object (&priv->monitor_manager);
g_clear_object (&priv->orientation_manager);
g_clear_object (&priv->input_settings);
if (priv->device_update_idle_id)
@ -126,6 +123,8 @@ meta_backend_finalize (GObject *object)
g_hash_table_destroy (priv->device_monitors);
g_clear_object (&priv->settings);
G_OBJECT_CLASS (meta_backend_parent_class)->finalize (object);
}
@ -155,28 +154,10 @@ center_pointer (MetaBackend *backend)
primary->rect.y + primary->rect.height / 2);
}
static gboolean
meta_backend_update_ui_scaling_factor (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
int ui_scaling_factor;
ui_scaling_factor = meta_backend_get_ui_scaling_factor (backend);
if (ui_scaling_factor != priv->ui_scaling_factor)
{
priv->ui_scaling_factor = ui_scaling_factor;
return TRUE;
}
else
{
return FALSE;
}
}
void
meta_backend_monitors_changed (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
MetaMonitorManager *monitor_manager =
meta_backend_get_monitor_manager (backend);
ClutterDeviceManager *manager = clutter_device_manager_get_default ();
@ -194,8 +175,7 @@ meta_backend_monitors_changed (MetaBackend *backend)
center_pointer (backend);
}
if (meta_backend_update_ui_scaling_factor (backend))
meta_backend_notify_ui_scaling_factor_changed (backend);
meta_settings_update_ui_scaling_factor (priv->settings);
}
void
@ -245,6 +225,16 @@ destroy_device_monitor (MetaBackend *backend,
g_hash_table_remove (priv->device_monitors, &device_id);
}
static void
meta_backend_monitor_device (MetaBackend *backend,
ClutterInputDevice *device)
{
int device_id;
device_id = clutter_input_device_get_device_id (device);
create_device_monitor (backend, device_id);
}
static void
on_device_added (ClutterDeviceManager *device_manager,
ClutterInputDevice *device,
@ -352,10 +342,56 @@ create_monitor_manager (MetaBackend *backend)
return META_BACKEND_GET_CLASS (backend)->create_monitor_manager (backend);
}
static void
create_device_monitors (MetaBackend *backend,
ClutterDeviceManager *device_manager)
{
const GSList *devices;
const GSList *l;
create_device_monitor (backend, META_IDLE_MONITOR_CORE_DEVICE);
devices = clutter_device_manager_peek_devices (device_manager);
for (l = devices; l; l = l->next)
{
ClutterInputDevice *device = l->data;
meta_backend_monitor_device (backend, device);
}
}
static void
set_initial_pointer_visibility (MetaBackend *backend,
ClutterDeviceManager *device_manager)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
const GSList *devices;
const GSList *l;
gboolean has_touchscreen = FALSE;
devices = clutter_device_manager_peek_devices (device_manager);
for (l = devices; l; l = l->next)
{
ClutterInputDevice *device = l->data;
has_touchscreen |= device_is_slave_touchscreen (device);
}
meta_cursor_tracker_set_pointer_visible (priv->cursor_tracker,
!has_touchscreen);
}
static MetaInputSettings *
meta_backend_create_input_settings (MetaBackend *backend)
{
return META_BACKEND_GET_CLASS (backend)->create_input_settings (backend);
}
static void
meta_backend_real_post_init (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
ClutterDeviceManager *device_manager = clutter_device_manager_get_default ();
priv->stage = meta_stage_new ();
clutter_actor_realize (priv->stage);
@ -365,45 +401,22 @@ meta_backend_real_post_init (MetaBackend *backend)
meta_backend_sync_screen_size (backend);
meta_backend_update_ui_scaling_factor (backend);
priv->cursor_renderer = META_BACKEND_GET_CLASS (backend)->create_cursor_renderer (backend);
priv->device_monitors =
g_hash_table_new_full (g_int_hash, g_int_equal,
NULL, (GDestroyNotify) g_object_unref);
{
MetaCursorTracker *cursor_tracker;
ClutterDeviceManager *manager;
gboolean has_touchscreen = FALSE;
GSList *devices, *l;
create_device_monitors (backend, device_manager);
/* Create the core device monitor. */
create_device_monitor (backend, 0);
g_signal_connect_object (device_manager, "device-added",
G_CALLBACK (on_device_added), backend, 0);
g_signal_connect_object (device_manager, "device-removed",
G_CALLBACK (on_device_removed), backend, 0);
manager = clutter_device_manager_get_default ();
g_signal_connect_object (manager, "device-added",
G_CALLBACK (on_device_added), backend, 0);
g_signal_connect_object (manager, "device-removed",
G_CALLBACK (on_device_removed), backend, 0);
set_initial_pointer_visibility (backend, device_manager);
devices = clutter_device_manager_list_devices (manager);
for (l = devices; l != NULL; l = l->next)
{
ClutterInputDevice *device = l->data;
on_device_added (manager, device, backend);
has_touchscreen |= device_is_slave_touchscreen (device);
}
cursor_tracker = priv->cursor_tracker;
meta_cursor_tracker_set_pointer_visible (cursor_tracker, !has_touchscreen);
g_slist_free (devices);
}
priv->input_settings = meta_input_settings_create ();
priv->input_settings = meta_backend_create_input_settings (backend);
center_pointer (backend);
}
@ -449,105 +462,6 @@ meta_backend_real_get_relative_motion_deltas (MetaBackend *backend,
return FALSE;
}
static gboolean
experimental_features_handler (GVariant *features_variant,
gpointer *result,
gpointer data)
{
MetaBackend *backend = data;
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
GVariantIter features_iter;
char *feature;
MetaExperimentalFeature features = META_EXPERIMENTAL_FEATURE_NONE;
if (priv->experimental_features_overridden)
{
*result = GINT_TO_POINTER (FALSE);
return TRUE;
}
g_variant_iter_init (&features_iter, features_variant);
while (g_variant_iter_loop (&features_iter, "s", &feature))
{
/* So far no experimental features defined. */
if (g_str_equal (feature, "scale-monitor-framebuffer"))
features |= META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER;
else if (g_str_equal (feature, "monitor-config-manager"))
features |= META_EXPERIMENTAL_FEATURE_MONITOR_CONFIG_MANAGER;
else
g_info ("Unknown experimental feature '%s'\n", feature);
}
if (features != priv->experimental_features)
{
priv->experimental_features = features;
*result = GINT_TO_POINTER (TRUE);
}
else
{
*result = GINT_TO_POINTER (FALSE);
}
return TRUE;
}
static gboolean
update_experimental_features (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
return GPOINTER_TO_INT (g_settings_get_mapped (priv->mutter_settings,
"experimental-features",
experimental_features_handler,
backend));
}
static void
mutter_settings_changed (GSettings *settings,
gchar *key,
MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
MetaExperimentalFeature old_experimental_features;
gboolean changed;
if (!g_str_equal (key, "experimental-features"))
return;
old_experimental_features = priv->experimental_features;
changed = update_experimental_features (backend);
if (changed)
g_signal_emit (backend, signals[EXPERIMENTAL_FEATURES_CHANGED], 0,
(unsigned int) old_experimental_features);
}
gboolean
meta_backend_is_experimental_feature_enabled (MetaBackend *backend,
MetaExperimentalFeature feature)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
return !!(priv->experimental_features & feature);
}
void
meta_backend_override_experimental_features (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
priv->experimental_features = META_EXPERIMENTAL_FEATURE_NONE;
priv->experimental_features_overridden = TRUE;
}
void
meta_backend_enable_experimental_feature (MetaBackend *backend,
MetaExperimentalFeature feature)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
priv->experimental_features |= feature;
}
static void
meta_backend_class_init (MetaBackendClass *klass)
{
@ -584,20 +498,6 @@ meta_backend_class_init (MetaBackendClass *klass)
0,
NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_INT);
signals[EXPERIMENTAL_FEATURES_CHANGED] =
g_signal_new ("experimental-features-changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_UINT);
signals[UI_SCALING_FACTOR_CHANGED] =
g_signal_new ("ui-scaling-factor-changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
mutter_stage_views = g_getenv ("MUTTER_STAGE_VIEWS");
stage_views_disabled = g_strcmp0 (mutter_stage_views, "0") == 0;
@ -611,11 +511,7 @@ meta_backend_initable_init (GInitable *initable,
MetaBackend *backend = META_BACKEND (initable);
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
priv->mutter_settings = g_settings_new ("org.gnome.mutter");
g_signal_connect (priv->mutter_settings, "changed",
G_CALLBACK (mutter_settings_changed),
backend);
update_experimental_features (backend);
priv->settings = meta_settings_new (backend);
priv->egl = g_object_new (META_TYPE_EGL, NULL);
@ -632,6 +528,8 @@ meta_backend_initable_init (GInitable *initable,
priv->dnd = g_object_new (META_TYPE_DND, NULL);
priv->orientation_manager = g_object_new (META_TYPE_ORIENTATION_MANAGER, NULL);
return TRUE;
}
@ -650,7 +548,11 @@ meta_backend_init (MetaBackend *backend)
static void
meta_backend_post_init (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
META_BACKEND_GET_CLASS (backend)->post_init (backend);
meta_settings_post_init (priv->settings);
}
/**
@ -676,6 +578,17 @@ meta_backend_get_monitor_manager (MetaBackend *backend)
return priv->monitor_manager;
}
/**
* meta_backend_get_orientation_manager: (skip)
*/
MetaOrientationManager *
meta_backend_get_orientation_manager (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
return priv->orientation_manager;
}
MetaCursorTracker *
meta_backend_get_cursor_tracker (MetaBackend *backend)
{
@ -698,7 +611,8 @@ meta_backend_get_cursor_renderer (MetaBackend *backend)
/**
* meta_backend_get_renderer: (skip)
*/
MetaRenderer * meta_backend_get_renderer (MetaBackend *backend)
MetaRenderer *
meta_backend_get_renderer (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
@ -708,13 +622,25 @@ MetaRenderer * meta_backend_get_renderer (MetaBackend *backend)
/**
* meta_backend_get_egl: (skip)
*/
MetaEgl * meta_backend_get_egl (MetaBackend *backend)
MetaEgl *
meta_backend_get_egl (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
return priv->egl;
}
/**
* meta_backend_get_settings: (skip)
*/
MetaSettings *
meta_backend_get_settings (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
return priv->settings;
}
/**
* meta_backend_grab_device: (skip)
*/
@ -773,6 +699,12 @@ meta_backend_get_keymap (MetaBackend *backend)
return META_BACKEND_GET_CLASS (backend)->get_keymap (backend);
}
xkb_layout_index_t
meta_backend_get_keymap_layout_group (MetaBackend *backend)
{
return META_BACKEND_GET_CLASS (backend)->get_keymap_layout_group (backend);
}
void
meta_backend_lock_layout_group (MetaBackend *backend,
guint idx)
@ -1010,29 +942,6 @@ meta_clutter_init (void)
meta_backend_post_init (_backend);
}
static void
xft_dpi_changed (GtkSettings *settings,
GParamSpec *pspec,
MetaBackend *backend)
{
meta_backend_update_ui_scaling_factor (backend);
meta_backend_notify_ui_scaling_factor_changed (backend);
}
void
meta_backend_display_opened (MetaBackend *backend)
{
/*
* gdk-window-scaling-factor is not exported to gtk-settings
* because it is handled inside gdk, so we use gtk-xft-dpi instead
* which also changes when the scale factor changes.
*
* TODO: Don't rely on GtkSettings for this
*/
g_signal_connect (gtk_settings_get_default (), "notify::gtk-xft-dpi",
G_CALLBACK (xft_dpi_changed), backend);
}
gboolean
meta_is_stage_views_enabled (void)
{
@ -1095,46 +1004,3 @@ meta_backend_notify_keymap_layout_group_changed (MetaBackend *backend,
g_signal_emit (backend, signals[KEYMAP_LAYOUT_GROUP_CHANGED], 0,
locked_group);
}
static int
calculate_ui_scaling_factor (MetaBackend *backend)
{
MetaMonitorManager *monitor_manager =
meta_backend_get_monitor_manager (backend);
GList *logical_monitors;
GList *l;
int max_scale = 1;
logical_monitors =
meta_monitor_manager_get_logical_monitors (monitor_manager);
for (l = logical_monitors; l; l = l->next)
{
MetaLogicalMonitor *logical_monitor = l->data;
max_scale = MAX (logical_monitor->scale, max_scale);
}
return max_scale;
}
int
meta_backend_get_ui_scaling_factor (MetaBackend *backend)
{
if (meta_is_stage_views_scaled ())
{
return 1;
}
else
{
if (meta_is_monitor_config_manager_enabled ())
return calculate_ui_scaling_factor (backend);
else
return meta_theme_get_window_scaling_factor ();
}
}
void
meta_backend_notify_ui_scaling_factor_changed (MetaBackend *backend)
{
g_signal_emit (backend, signals[UI_SCALING_FACTOR_CHANGED], 0);
}

View File

@ -37,7 +37,8 @@
struct _MetaCursorRendererPrivate
{
int current_x, current_y;
float current_x;
float current_y;
MetaCursorSprite *displayed_cursor;
MetaOverlay *stage_overlay;
@ -69,7 +70,7 @@ queue_redraw (MetaCursorRenderer *renderer,
MetaBackend *backend = meta_get_backend ();
ClutterActor *stage = meta_backend_get_stage (backend);
CoglTexture *texture;
MetaRectangle rect = { 0 };
ClutterRect rect = { 0 };
if (cursor_sprite)
rect = meta_cursor_renderer_calculate_rect (renderer, cursor_sprite);
@ -159,7 +160,7 @@ meta_cursor_renderer_init (MetaCursorRenderer *renderer)
NULL);
}
MetaRectangle
ClutterRect
meta_cursor_renderer_calculate_rect (MetaCursorRenderer *renderer,
MetaCursorSprite *cursor_sprite)
{
@ -172,18 +173,22 @@ meta_cursor_renderer_calculate_rect (MetaCursorRenderer *renderer,
texture = meta_cursor_sprite_get_cogl_texture (cursor_sprite);
if (!texture)
return (MetaRectangle) { 0 };
return (ClutterRect) { 0 };
meta_cursor_sprite_get_hotspot (cursor_sprite, &hot_x, &hot_y);
texture_scale = meta_cursor_sprite_get_texture_scale (cursor_sprite);
width = cogl_texture_get_width (texture);
height = cogl_texture_get_height (texture);
return (MetaRectangle) {
.x = (int)roundf (priv->current_x - (hot_x * texture_scale)),
.y = (int)roundf (priv->current_y - (hot_y * texture_scale)),
.width = (int)roundf (width * texture_scale),
.height = (int)roundf (height * texture_scale),
return (ClutterRect) {
.origin = {
.x = priv->current_x - (hot_x * texture_scale),
.y = priv->current_y - (hot_y * texture_scale)
},
.size = {
.width = width * texture_scale,
.height = height * texture_scale
}
};
}
@ -197,8 +202,8 @@ update_cursor (MetaCursorRenderer *renderer,
if (cursor_sprite)
meta_cursor_sprite_prepare_at (cursor_sprite,
priv->current_x,
priv->current_y);
(int) priv->current_x,
(int) priv->current_y);
handled_by_backend =
META_CURSOR_RENDERER_GET_CLASS (renderer)->update_cursor (renderer,
@ -246,7 +251,8 @@ meta_cursor_renderer_force_update (MetaCursorRenderer *renderer)
void
meta_cursor_renderer_set_position (MetaCursorRenderer *renderer,
int x, int y)
float x,
float y)
{
MetaCursorRendererPrivate *priv = meta_cursor_renderer_get_instance_private (renderer);

View File

@ -31,7 +31,6 @@
#include <wayland-server.h>
#endif
#include <meta/screen.h>
#include "meta-cursor.h"
#define META_TYPE_CURSOR_RENDERER (meta_cursor_renderer_get_type ())
@ -60,13 +59,14 @@ void meta_cursor_renderer_set_cursor (MetaCursorRenderer *renderer,
MetaCursorSprite *cursor_sprite);
void meta_cursor_renderer_set_position (MetaCursorRenderer *renderer,
int x, int y);
float x,
float y);
void meta_cursor_renderer_force_update (MetaCursorRenderer *renderer);
MetaCursorSprite * meta_cursor_renderer_get_cursor (MetaCursorRenderer *renderer);
MetaRectangle meta_cursor_renderer_calculate_rect (MetaCursorRenderer *renderer,
MetaCursorSprite *cursor_sprite);
ClutterRect meta_cursor_renderer_calculate_rect (MetaCursorRenderer *renderer,
MetaCursorSprite *cursor_sprite);
#ifdef HAVE_WAYLAND
void meta_cursor_renderer_realize_cursor_from_wl_buffer (MetaCursorRenderer *renderer,

View File

@ -62,8 +62,8 @@ 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);
float new_x,
float new_y);
MetaCursorSprite * meta_cursor_tracker_get_displayed_cursor (MetaCursorTracker *tracker);

View File

@ -31,9 +31,10 @@
#include "meta-cursor-tracker-private.h"
#include <string.h>
#include <meta/meta-x11-display.h>
#include <meta/main.h>
#include <meta/util.h>
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include <cogl/cogl.h>
#include <clutter/clutter.h>
@ -43,6 +44,7 @@
#include <X11/extensions/Xfixes.h>
#include "meta-backend-private.h"
#include "x11/meta-x11-display-private.h"
G_DEFINE_TYPE (MetaCursorTracker, meta_cursor_tracker, G_TYPE_OBJECT);
@ -131,15 +133,15 @@ meta_cursor_tracker_class_init (MetaCursorTrackerClass *klass)
}
/**
* meta_cursor_tracker_get_for_screen:
* @screen: the #MetaScreen
* meta_cursor_tracker_get_for_display:
* @display: the #MetaDisplay
*
* Retrieves the cursor tracker object for @screen.
* Retrieves the cursor tracker object for @display.
*
* Returns: (transfer none):
*/
MetaCursorTracker *
meta_cursor_tracker_get_for_screen (MetaScreen *screen)
meta_cursor_tracker_get_for_display (MetaDisplay *display)
{
MetaBackend *backend = meta_get_backend ();
MetaCursorTracker *tracker = meta_backend_get_cursor_tracker (backend);
@ -165,13 +167,13 @@ gboolean
meta_cursor_tracker_handle_xevent (MetaCursorTracker *tracker,
XEvent *xevent)
{
MetaDisplay *display = meta_get_display ();
MetaX11Display *x11_display = meta_get_display ()->x11_display;
XFixesCursorNotifyEvent *notify_event;
if (meta_is_wayland_compositor ())
return FALSE;
if (xevent->xany.type != display->xfixes_event_base + XFixesCursorNotify)
if (xevent->xany.type != x11_display->xfixes_event_base + XFixesCursorNotify)
return FALSE;
notify_event = (XFixesCursorNotifyEvent *)xevent;
@ -188,6 +190,7 @@ static void
ensure_xfixes_cursor (MetaCursorTracker *tracker)
{
MetaDisplay *display = meta_get_display ();
Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
XFixesCursorImage *cursor_image;
CoglTexture2D *sprite;
guint8 *cursor_data;
@ -198,7 +201,7 @@ ensure_xfixes_cursor (MetaCursorTracker *tracker)
if (tracker->xfixes_cursor)
return;
cursor_image = XFixesGetCursorImage (display->xdisplay);
cursor_image = XFixesGetCursorImage (xdisplay);
if (!cursor_image)
return;
@ -350,8 +353,8 @@ meta_cursor_tracker_set_root_cursor (MetaCursorTracker *tracker,
void
meta_cursor_tracker_update_position (MetaCursorTracker *tracker,
int new_x,
int new_y)
float new_x,
float new_y)
{
MetaBackend *backend = meta_get_backend ();
MetaCursorRenderer *cursor_renderer =

View File

@ -23,10 +23,9 @@
#include "meta-cursor.h"
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "display-private.h"
#include "screen-private.h"
#include "meta-backend-private.h"
#include <string.h>

View File

@ -24,7 +24,7 @@
gboolean meta_dnd_handle_xdnd_event (MetaBackend *backend,
MetaCompositor *compositor,
MetaDisplay *display,
Display *xdisplay,
XEvent *xev);
#ifdef HAVE_WAYLAND

View File

@ -66,6 +66,9 @@ struct _MetaEgl
PFNEGLSTREAMCONSUMERACQUIREKHRPROC eglStreamConsumerAcquireKHR;
PFNEGLSTREAMCONSUMERACQUIREATTRIBNVPROC eglStreamConsumerAcquireAttribNV;
PFNEGLQUERYDMABUFFORMATSEXTPROC eglQueryDmaBufFormatsEXT;
PFNEGLQUERYDMABUFMODIFIERSEXTPROC eglQueryDmaBufModifiersEXT;
};
G_DEFINE_TYPE (MetaEgl, meta_egl, G_TYPE_OBJECT)
@ -711,22 +714,60 @@ meta_egl_stream_consumer_acquire (MetaEgl *egl,
return TRUE;
}
gboolean
meta_egl_query_dma_buf_formats (MetaEgl *egl,
EGLDisplay display,
EGLint max_formats,
EGLint *formats,
EGLint *num_formats,
GError **error)
{
if (!is_egl_proc_valid (egl->eglQueryDmaBufFormatsEXT, error))
return FALSE;
if (!egl->eglQueryDmaBufFormatsEXT (display, max_formats, formats,
num_formats))
{
set_egl_error (error);
return FALSE;
}
return TRUE;
}
gboolean
meta_egl_query_dma_buf_modifiers (MetaEgl *egl,
EGLDisplay display,
EGLint format,
EGLint max_modifiers,
EGLuint64KHR *modifiers,
EGLBoolean *external_only,
EGLint *num_modifiers,
GError **error)
{
if (!is_egl_proc_valid (egl->eglQueryDmaBufModifiersEXT, error))
return FALSE;
if (!egl->eglQueryDmaBufModifiersEXT (display, format, max_modifiers,
modifiers, external_only,
num_modifiers))
{
set_egl_error (error);
return FALSE;
}
return TRUE;
}
#define GET_EGL_PROC_ADDR(proc) \
egl->proc = (void *) eglGetProcAddress (#proc);
#define GET_EGL_PROC_ADDR_REQUIRED(proc) \
GET_EGL_PROC_ADDR(proc) \
if (!egl->proc) \
{ \
meta_fatal ("Failed to get proc address for '%s'\n", #proc); \
}
static void
meta_egl_constructed (GObject *object)
{
MetaEgl *egl = META_EGL (object);
GET_EGL_PROC_ADDR_REQUIRED (eglGetPlatformDisplayEXT);
GET_EGL_PROC_ADDR (eglGetPlatformDisplayEXT);
GET_EGL_PROC_ADDR (eglCreateImageKHR);
GET_EGL_PROC_ADDR (eglDestroyImageKHR);
@ -753,6 +794,9 @@ meta_egl_constructed (GObject *object)
GET_EGL_PROC_ADDR (eglStreamConsumerAcquireKHR);
GET_EGL_PROC_ADDR (eglStreamConsumerAcquireAttribNV);
GET_EGL_PROC_ADDR (eglQueryDmaBufFormatsEXT);
GET_EGL_PROC_ADDR (eglQueryDmaBufModifiersEXT);
}
#undef GET_EGL_PROC_ADDR

View File

@ -167,4 +167,20 @@ gboolean meta_egl_stream_consumer_gl_texture_external (MetaEgl *egl,
EGLStreamKHR stream,
GError **error);
gboolean meta_egl_query_dma_buf_formats (MetaEgl *egl,
EGLDisplay display,
EGLint max_formats,
EGLint *formats,
EGLint *num_formats,
GError **error);
gboolean meta_egl_query_dma_buf_modifiers (MetaEgl *egl,
EGLDisplay display,
EGLint format,
EGLint max_modifiers,
EGLuint64KHR *modifiers,
EGLBoolean *external_only,
EGLint *num_formats,
GError **error);
#endif /* META_EGL_H */

View File

@ -31,20 +31,9 @@
#include <libwacom/libwacom.h>
#endif
#define META_TYPE_INPUT_SETTINGS (meta_input_settings_get_type ())
#define META_INPUT_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_INPUT_SETTINGS, MetaInputSettings))
#define META_INPUT_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_INPUT_SETTINGS, MetaInputSettingsClass))
#define META_IS_INPUT_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_INPUT_SETTINGS))
#define META_IS_INPUT_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_INPUT_SETTINGS))
#define META_INPUT_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_INPUT_SETTINGS, MetaInputSettingsClass))
typedef struct _MetaInputSettings MetaInputSettings;
typedef struct _MetaInputSettingsClass MetaInputSettingsClass;
struct _MetaInputSettings
{
GObject parent_instance;
};
#define META_TYPE_INPUT_SETTINGS (meta_input_settings_get_type ())
G_DECLARE_DERIVABLE_TYPE (MetaInputSettings, meta_input_settings,
META, INPUT_SETTINGS, GObject)
struct _MetaInputSettingsClass
{
@ -65,6 +54,12 @@ struct _MetaInputSettingsClass
void (* set_tap_enabled) (MetaInputSettings *settings,
ClutterInputDevice *device,
gboolean enabled);
void (* set_tap_and_drag_enabled) (MetaInputSettings *settings,
ClutterInputDevice *device,
gboolean enabled);
void (* set_disable_while_typing) (MetaInputSettings *settings,
ClutterInputDevice *device,
gboolean enabled);
void (* set_invert_scroll) (MetaInputSettings *settings,
ClutterInputDevice *device,
gboolean inverted);
@ -117,15 +112,10 @@ 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;
MetaInputSettings * meta_input_settings_create (void);
GSettings * meta_input_settings_get_tablet_settings (MetaInputSettings *settings,
ClutterInputDevice *device);
MetaLogicalMonitor * meta_input_settings_get_tablet_logical_monitor (MetaInputSettings *settings,
@ -138,11 +128,12 @@ gboolean meta_input_settings_is_pad_button_grabbed (MetaIn
ClutterInputDevice *pad,
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);
gboolean meta_input_settings_handle_pad_event (MetaInputSettings *input_settings,
const ClutterEvent *event);
gchar * meta_input_settings_get_pad_action_label (MetaInputSettings *input_settings,
ClutterInputDevice *pad,
MetaPadActionType action,
guint number);
#ifdef HAVE_LIBWACOM
WacomDevice * meta_input_settings_get_tablet_wacom_device (MetaInputSettings *settings,

View File

@ -33,12 +33,6 @@
#include "meta-input-settings-private.h"
#include "backends/meta-logical-monitor.h"
#include "backends/meta-monitor.h"
#include "x11/meta-input-settings-x11.h"
#ifdef HAVE_NATIVE_BACKEND
#include "native/meta-backend-native.h"
#include "native/meta-input-settings-native.h"
#endif
#include <glib/gi18n-lib.h>
#include <meta/util.h>
@ -53,9 +47,11 @@ struct _DeviceMappingInfo
MetaInputSettings *input_settings;
ClutterInputDevice *device;
GSettings *settings;
guint changed_id;
#ifdef HAVE_LIBWACOM
WacomDevice *wacom_device;
#endif
guint *group_modes;
};
struct _MetaInputSettingsPrivate
@ -79,6 +75,14 @@ struct _MetaInputSettingsPrivate
#endif
GHashTable *two_finger_devices;
/* Pad ring/strip emission */
struct {
ClutterInputDevice *pad;
MetaPadActionType action;
guint number;
gdouble value;
} last_pad_action_info;
};
typedef void (*ConfigBoolFunc) (MetaInputSettings *input_settings,
@ -91,6 +95,14 @@ typedef void (*ConfigUintFunc) (MetaInputSettings *input_settings,
ClutterInputDevice *device,
guint value);
typedef enum {
META_PAD_DIRECTION_NONE = -1,
META_PAD_DIRECTION_UP = 0,
META_PAD_DIRECTION_DOWN,
META_PAD_DIRECTION_CW,
META_PAD_DIRECTION_CCW,
} MetaPadDirection;
G_DEFINE_TYPE_WITH_PRIVATE (MetaInputSettings, meta_input_settings, G_TYPE_OBJECT)
static GSList *
@ -448,6 +460,44 @@ update_device_natural_scroll (MetaInputSettings *input_settings,
}
}
static void
update_touchpad_disable_while_typing (MetaInputSettings *input_settings,
ClutterInputDevice *device)
{
GSettings *settings;
MetaInputSettingsClass *input_settings_class;
MetaInputSettingsPrivate *priv;
gboolean enabled;
const gchar *key = "disable-while-typing";
if (device &&
clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE)
return;
priv = meta_input_settings_get_instance_private (input_settings);
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
enabled = g_settings_get_boolean (priv->touchpad_settings, key);
if (device)
{
settings = get_settings_for_device_type (input_settings,
clutter_input_device_get_device_type (device));
if (!settings)
return;
settings_device_set_bool_setting (input_settings, device,
input_settings_class->set_disable_while_typing,
enabled);
}
else
{
settings_set_bool_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE,
input_settings_class->set_disable_while_typing,
enabled);
}
}
static void
update_touchpad_tap_enabled (MetaInputSettings *input_settings,
ClutterInputDevice *device)
@ -478,6 +528,36 @@ update_touchpad_tap_enabled (MetaInputSettings *input_settings,
}
}
static void
update_touchpad_tap_and_drag_enabled (MetaInputSettings *input_settings,
ClutterInputDevice *device)
{
MetaInputSettingsClass *input_settings_class;
MetaInputSettingsPrivate *priv;
gboolean enabled;
if (device &&
clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE)
return;
priv = meta_input_settings_get_instance_private (input_settings);
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
enabled = g_settings_get_boolean (priv->touchpad_settings, "tap-and-drag");
if (device)
{
settings_device_set_bool_setting (input_settings, device,
input_settings_class->set_tap_and_drag_enabled,
enabled);
}
else
{
settings_set_bool_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE,
input_settings_class->set_tap_and_drag_enabled,
enabled);
}
}
static void
update_touchpad_edge_scroll (MetaInputSettings *input_settings,
ClutterInputDevice *device)
@ -700,7 +780,7 @@ logical_monitor_has_monitor (MetaMonitorManager *monitor_manager,
GList *monitors;
GList *l;
monitors = meta_monitor_manager_get_monitors (monitor_manager);
monitors = meta_logical_monitor_get_monitors (logical_monitor);
for (l = monitors; l; l = l->next)
{
MetaMonitor *monitor = l->data;
@ -825,7 +905,7 @@ update_device_display (MetaInputSettings *input_settings,
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
/* If mapping is relative, the device can move on all displays */
if (clutter_input_device_get_device_type (device) != CLUTTER_TABLET_DEVICE ||
if (clutter_input_device_get_device_type (device) == CLUTTER_TOUCHSCREEN_DEVICE ||
clutter_input_device_get_mapping_mode (device) ==
CLUTTER_INPUT_DEVICE_MAPPING_ABSOLUTE)
logical_monitor = meta_input_settings_find_logical_monitor (input_settings,
@ -989,6 +1069,10 @@ meta_input_settings_changed_cb (GSettings *settings,
update_device_natural_scroll (input_settings, NULL);
else if (strcmp (key, "tap-to-click") == 0)
update_touchpad_tap_enabled (input_settings, NULL);
else if (strcmp (key, "tap-and_drag") == 0)
update_touchpad_tap_and_drag_enabled (input_settings, NULL);
else if (strcmp(key, "disable-while-typing") == 0)
update_touchpad_disable_while_typing (input_settings, NULL);
else if (strcmp (key, "send-events") == 0)
update_touchpad_send_events (input_settings, NULL);
else if (strcmp (key, "edge-scrolling-enabled") == 0)
@ -1035,10 +1119,15 @@ static void
apply_mappable_device_settings (MetaInputSettings *input_settings,
DeviceMappingInfo *info)
{
update_device_display (input_settings, info->settings, info->device);
ClutterInputDeviceType device_type;
if (clutter_input_device_get_device_type (info->device) == CLUTTER_TABLET_DEVICE ||
clutter_input_device_get_device_type (info->device) == CLUTTER_PAD_DEVICE)
update_device_display (input_settings, info->settings, info->device);
device_type = clutter_input_device_get_device_type (info->device);
if (device_type == CLUTTER_TABLET_DEVICE ||
device_type == CLUTTER_PEN_DEVICE ||
device_type == CLUTTER_ERASER_DEVICE ||
device_type == CLUTTER_PAD_DEVICE)
{
update_tablet_mapping (input_settings, info->settings, info->device);
update_tablet_area (input_settings, info->settings, info->device);
@ -1121,20 +1210,58 @@ lookup_tool_settings (ClutterInputDeviceTool *tool,
}
static GSettings *
lookup_pad_button_settings (ClutterInputDevice *device,
guint button)
lookup_pad_action_settings (ClutterInputDevice *device,
MetaPadActionType action,
guint number,
MetaPadDirection direction,
gint mode)
{
const gchar *vendor, *product;
const gchar *vendor, *product, *action_type, *detail_type = NULL;
GSettings *settings;
gchar *path;
GString *path;
gchar action_label;
vendor = clutter_input_device_get_vendor_id (device);
product = clutter_input_device_get_product_id (device);
path = g_strdup_printf ("/org/gnome/desktop/peripherals/tablets/%s:%s/button%c/",
vendor, product, 'A' + button);
action_label = 'A' + number;
switch (action)
{
case META_PAD_ACTION_BUTTON:
action_type = "button";
break;
case META_PAD_ACTION_RING:
g_assert (direction == META_PAD_DIRECTION_CW ||
direction == META_PAD_DIRECTION_CCW);
action_type = "ring";
detail_type = (direction == META_PAD_DIRECTION_CW) ? "cw" : "ccw";
break;
case META_PAD_ACTION_STRIP:
g_assert (direction == META_PAD_DIRECTION_UP ||
direction == META_PAD_DIRECTION_DOWN);
action_type = "strip";
detail_type = (direction == META_PAD_DIRECTION_UP) ? "up" : "down";
break;
default:
return NULL;
}
path = g_string_new (NULL);
g_string_append_printf (path, "/org/gnome/desktop/peripherals/tablets/%s:%s/%s%c",
vendor, product, action_type, action_label);
if (detail_type)
g_string_append_printf (path, "-%s", detail_type);
if (mode >= 0)
g_string_append_printf (path, "-mode-%d", mode);
g_string_append_c (path, '/');
settings = g_settings_new_with_path ("org.gnome.desktop.peripherals.tablet.pad-button",
path);
g_free (path);
path->str);
g_string_free (path, TRUE);
return settings;
}
@ -1163,7 +1290,9 @@ device_mapping_info_free (DeviceMappingInfo *info)
if (info->wacom_device)
libwacom_destroy (info->wacom_device);
#endif
g_signal_handler_disconnect (info->settings, info->changed_id);
g_object_unref (info->settings);
g_free (info->group_modes);
g_slice_free (DeviceMappingInfo, info);
}
@ -1207,8 +1336,15 @@ check_add_mappable_device (MetaInputSettings *input_settings,
}
#endif
g_signal_connect (settings, "changed",
G_CALLBACK (mapped_device_changed_cb), info);
if (clutter_input_device_get_device_type (device) == CLUTTER_PAD_DEVICE)
{
info->group_modes =
g_new0 (guint, clutter_input_device_get_n_mode_groups (device));
}
info->changed_id = g_signal_connect (settings, "changed",
G_CALLBACK (mapped_device_changed_cb),
info);
g_hash_table_insert (priv->mappable_devices, device, info);
@ -1234,6 +1370,8 @@ apply_device_settings (MetaInputSettings *input_settings,
update_touchpad_left_handed (input_settings, device);
update_touchpad_tap_enabled (input_settings, device);
update_touchpad_tap_and_drag_enabled (input_settings, device);
update_touchpad_disable_while_typing (input_settings, device);
update_touchpad_send_events (input_settings, device);
update_touchpad_two_finger_scroll (input_settings, device);
update_touchpad_edge_scroll (input_settings, device);
@ -1478,23 +1616,6 @@ meta_input_settings_init (MetaInputSettings *settings)
priv->two_finger_devices = g_hash_table_new (NULL, NULL);
}
MetaInputSettings *
meta_input_settings_create (void)
{
#ifdef HAVE_NATIVE_BACKEND
MetaBackend *backend;
backend = meta_get_backend ();
if (META_IS_BACKEND_NATIVE (backend))
return g_object_new (META_TYPE_INPUT_SETTINGS_NATIVE, NULL);
#endif
if (!meta_is_wayland_compositor ())
return g_object_new (META_TYPE_INPUT_SETTINGS_X11, NULL);
return NULL;
}
GSettings *
meta_input_settings_get_tablet_settings (MetaInputSettings *settings,
ClutterInputDevice *device)
@ -1563,7 +1684,8 @@ meta_input_settings_get_pad_button_action (MetaInputSettings *input_settings,
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (pad),
G_DESKTOP_PAD_BUTTON_ACTION_NONE);
settings = lookup_pad_button_settings (pad, button);
settings = lookup_pad_action_settings (pad, META_PAD_ACTION_BUTTON,
button, META_PAD_DIRECTION_NONE, -1);
action = g_settings_get_enum (settings, "action");
g_object_unref (settings);
@ -1619,7 +1741,7 @@ cycle_logical_monitors (MetaInputSettings *settings,
if (l->next)
*next_logical_monitor = l->next->data;
else
*next_logical_monitor = logical_monitors->data;
*next_logical_monitor = NULL;
}
return TRUE;
@ -1712,24 +1834,20 @@ emulate_modifiers (ClutterVirtualInputDevice *device,
static void
meta_input_settings_emulate_keybinding (MetaInputSettings *input_settings,
ClutterInputDevice *pad,
guint button,
const gchar *accel,
gboolean is_press)
{
MetaInputSettingsPrivate *priv;
ClutterKeyState state;
GSettings *settings;
guint key, mods;
gchar *accel;
if (!accel || !*accel)
return;
priv = meta_input_settings_get_instance_private (input_settings);
settings = lookup_pad_button_settings (pad, button);
accel = g_settings_get_string (settings, "keybinding");
g_object_unref (settings);
/* FIXME: This is appalling */
gtk_accelerator_parse (accel, &key, &mods);
g_free (accel);
if (!priv->virtual_pad_keyboard)
{
@ -1766,20 +1884,21 @@ meta_input_settings_is_pad_button_grabbed (MetaInputSettings *input_settings,
G_DESKTOP_PAD_BUTTON_ACTION_NONE);
}
gboolean
static gboolean
meta_input_settings_handle_pad_button (MetaInputSettings *input_settings,
ClutterInputDevice *pad,
const ClutterPadButtonEvent *event)
{
GDesktopPadButtonAction action;
ClutterInputDevice *pad;
gint button, group, mode;
gboolean is_press;
GSettings *settings;
gchar *accel;
g_return_val_if_fail (META_IS_INPUT_SETTINGS (input_settings), 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);
@ -1789,18 +1908,19 @@ meta_input_settings_handle_pad_button (MetaInputSettings *input_settin
{
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);
#ifdef HAVE_LIBWACOM
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);
info->group_modes[group] = mode;
}
action = meta_input_settings_get_pad_button_action (input_settings, pad, button);
@ -1816,8 +1936,12 @@ meta_input_settings_handle_pad_button (MetaInputSettings *input_settin
meta_display_request_pad_osd (meta_get_display (), pad, FALSE);
return TRUE;
case G_DESKTOP_PAD_BUTTON_ACTION_KEYBINDING:
meta_input_settings_emulate_keybinding (input_settings, pad,
button, is_press);
settings = lookup_pad_action_settings (pad, META_PAD_ACTION_BUTTON,
button, META_PAD_DIRECTION_NONE, -1);
accel = g_settings_get_string (settings, "keybinding");
meta_input_settings_emulate_keybinding (input_settings, accel, is_press);
g_object_unref (settings);
g_free (accel);
return TRUE;
case G_DESKTOP_PAD_BUTTON_ACTION_NONE:
default:
@ -1825,10 +1949,189 @@ meta_input_settings_handle_pad_button (MetaInputSettings *input_settin
}
}
gchar *
meta_input_settings_get_pad_button_action_label (MetaInputSettings *input_settings,
ClutterInputDevice *pad,
guint button)
static gboolean
meta_input_settings_handle_pad_action (MetaInputSettings *input_settings,
ClutterInputDevice *pad,
MetaPadActionType action,
guint number,
MetaPadDirection direction,
guint mode)
{
GSettings *settings;
gboolean handled = FALSE;
gchar *accel;
settings = lookup_pad_action_settings (pad, action, number, direction, mode);
accel = g_settings_get_string (settings, "keybinding");
if (accel && *accel)
{
meta_input_settings_emulate_keybinding (input_settings, accel, TRUE);
meta_input_settings_emulate_keybinding (input_settings, accel, FALSE);
handled = TRUE;
}
g_object_unref (settings);
g_free (accel);
return handled;
}
static gboolean
meta_input_settings_get_pad_action_direction (MetaInputSettings *input_settings,
const ClutterEvent *event,
MetaPadDirection *direction)
{
MetaInputSettingsPrivate *priv;
ClutterInputDevice *pad = clutter_event_get_device (event);
MetaPadActionType pad_action;
gboolean has_direction = FALSE;
MetaPadDirection inc_dir, dec_dir;
guint number;
gdouble value;
priv = meta_input_settings_get_instance_private (input_settings);
*direction = META_PAD_DIRECTION_NONE;
switch (event->type)
{
case CLUTTER_PAD_RING:
pad_action = META_PAD_ACTION_RING;
number = event->pad_ring.ring_number;
value = event->pad_ring.angle;
inc_dir = META_PAD_DIRECTION_CW;
dec_dir = META_PAD_DIRECTION_CCW;
break;
case CLUTTER_PAD_STRIP:
pad_action = META_PAD_ACTION_STRIP;
number = event->pad_strip.strip_number;
value = event->pad_strip.value;
inc_dir = META_PAD_DIRECTION_DOWN;
dec_dir = META_PAD_DIRECTION_UP;
break;
default:
return FALSE;
}
if (priv->last_pad_action_info.pad == pad &&
priv->last_pad_action_info.action == pad_action &&
priv->last_pad_action_info.number == number &&
value >= 0 && priv->last_pad_action_info.value >= 0)
{
*direction = (value - priv->last_pad_action_info.value) > 0 ?
inc_dir : dec_dir;
has_direction = TRUE;
}
priv->last_pad_action_info.pad = pad;
priv->last_pad_action_info.action = pad_action;
priv->last_pad_action_info.number = number;
priv->last_pad_action_info.value = value;
return has_direction;
}
gboolean
meta_input_settings_handle_pad_event (MetaInputSettings *input_settings,
const ClutterEvent *event)
{
ClutterInputDevice *pad;
MetaPadDirection direction = META_PAD_DIRECTION_NONE;
pad = clutter_event_get_source_device ((ClutterEvent *) event);
switch (event->type)
{
case CLUTTER_PAD_BUTTON_PRESS:
case CLUTTER_PAD_BUTTON_RELEASE:
return meta_input_settings_handle_pad_button (input_settings, pad,
&event->pad_button);
case CLUTTER_PAD_RING:
if (!meta_input_settings_get_pad_action_direction (input_settings,
event, &direction))
return FALSE;
return meta_input_settings_handle_pad_action (input_settings, pad,
META_PAD_ACTION_RING,
event->pad_ring.ring_number,
direction,
event->pad_ring.mode);
case CLUTTER_PAD_STRIP:
if (!meta_input_settings_get_pad_action_direction (input_settings,
event, &direction))
return FALSE;
return meta_input_settings_handle_pad_action (input_settings, pad,
META_PAD_ACTION_STRIP,
event->pad_strip.strip_number,
direction,
event->pad_strip.mode);
default:
return FALSE;
}
}
static gchar *
compose_directional_action_label (GSettings *direction1,
GSettings *direction2)
{
gchar *accel1, *accel2, *str = NULL;
accel1 = g_settings_get_string (direction1, "keybinding");
accel2 = g_settings_get_string (direction2, "keybinding");
if (accel1 && *accel1 && accel2 && *accel2)
str = g_strdup_printf ("%s / %s", accel1, accel2);
g_free (accel1);
g_free (accel2);
return str;
}
static gchar *
meta_input_settings_get_ring_label (MetaInputSettings *settings,
ClutterInputDevice *pad,
guint number,
guint mode)
{
GSettings *settings1, *settings2;
gchar *label;
/* We only allow keybinding actions with those */
settings1 = lookup_pad_action_settings (pad, META_PAD_ACTION_RING, number,
META_PAD_DIRECTION_CW, mode);
settings2 = lookup_pad_action_settings (pad, META_PAD_ACTION_RING, number,
META_PAD_DIRECTION_CCW, mode);
label = compose_directional_action_label (settings1, settings2);
g_object_unref (settings1);
g_object_unref (settings2);
return label;
}
static gchar *
meta_input_settings_get_strip_label (MetaInputSettings *settings,
ClutterInputDevice *pad,
guint number,
guint mode)
{
GSettings *settings1, *settings2;
gchar *label;
/* We only allow keybinding actions with those */
settings1 = lookup_pad_action_settings (pad, META_PAD_ACTION_STRIP, number,
META_PAD_DIRECTION_UP, mode);
settings2 = lookup_pad_action_settings (pad, META_PAD_ACTION_STRIP, number,
META_PAD_DIRECTION_DOWN, mode);
label = compose_directional_action_label (settings1, settings2);
g_object_unref (settings1);
g_object_unref (settings2);
return label;
}
static gchar *
meta_input_settings_get_button_label (MetaInputSettings *input_settings,
ClutterInputDevice *pad,
guint button)
{
GDesktopPadButtonAction action;
gint group;
@ -1857,7 +2160,8 @@ meta_input_settings_get_pad_button_action_label (MetaInputSettings *input_setti
GSettings *settings;
gchar *accel;
settings = lookup_pad_button_settings (pad, button);
settings = lookup_pad_action_settings (pad, META_PAD_ACTION_BUTTON,
button, META_PAD_DIRECTION_NONE, -1);
accel = g_settings_get_string (settings, "keybinding");
g_object_unref (settings);
@ -1875,3 +2179,55 @@ meta_input_settings_get_pad_button_action_label (MetaInputSettings *input_setti
return NULL;
}
}
static guint
get_current_pad_mode (MetaInputSettings *input_settings,
ClutterInputDevice *pad,
MetaPadActionType action_type,
guint number)
{
MetaInputSettingsPrivate *priv;
DeviceMappingInfo *info;
guint group = 0, n_groups;
priv = meta_input_settings_get_instance_private (input_settings);
info = g_hash_table_lookup (priv->mappable_devices, pad);
n_groups = clutter_input_device_get_n_mode_groups (pad);
if (!info->group_modes || n_groups == 0)
return 0;
if (action_type == META_PAD_ACTION_RING ||
action_type == META_PAD_ACTION_STRIP)
{
/* Assume features are evenly distributed in groups */
group = number % n_groups;
}
return info->group_modes[group];
}
gchar *
meta_input_settings_get_pad_action_label (MetaInputSettings *input_settings,
ClutterInputDevice *pad,
MetaPadActionType action_type,
guint number)
{
guint mode;
switch (action_type)
{
case META_PAD_ACTION_BUTTON:
return meta_input_settings_get_button_label (input_settings, pad, number);
case META_PAD_ACTION_RING:
mode = get_current_pad_mode (input_settings, pad, action_type, number);
return meta_input_settings_get_ring_label (input_settings, pad,
number, mode);
case META_PAD_ACTION_STRIP:
mode = get_current_pad_mode (input_settings, pad, action_type, number);
return meta_input_settings_get_strip_label (input_settings, pad,
number, mode);
}
return NULL;
}

View File

@ -107,21 +107,15 @@ MetaLogicalMonitor *
meta_logical_monitor_new_derived (MetaMonitorManager *monitor_manager,
MetaMonitor *monitor,
MetaRectangle *layout,
float scale,
int monitor_number)
{
MetaLogicalMonitor *logical_monitor;
MetaOutput *main_output;
MetaMonitorMode *monitor_mode;
int scale;
MetaMonitorTransform transform;
logical_monitor = g_object_new (META_TYPE_LOGICAL_MONITOR, NULL);
monitor_mode = meta_monitor_get_current_mode (monitor);
scale = meta_monitor_manager_calculate_monitor_mode_scale (monitor_manager,
monitor,
monitor_mode);
transform = derive_monitor_transform (monitor);
main_output = meta_monitor_get_main_output (monitor);
@ -181,12 +175,24 @@ meta_logical_monitor_make_primary (MetaLogicalMonitor *logical_monitor)
logical_monitor->is_primary = TRUE;
}
int
float
meta_logical_monitor_get_scale (MetaLogicalMonitor *logical_monitor)
{
return logical_monitor->scale;
}
MetaMonitorTransform
meta_logical_monitor_get_transform (MetaLogicalMonitor *logical_monitor)
{
return logical_monitor->transform;
}
MetaRectangle
meta_logical_monitor_get_layout (MetaLogicalMonitor *logical_monitor)
{
return logical_monitor->rect;
}
GList *
meta_logical_monitor_get_monitors (MetaLogicalMonitor *logical_monitor)
{
@ -204,34 +210,34 @@ meta_logical_monitor_class_init (MetaLogicalMonitorClass *klass)
}
gboolean
meta_logical_monitor_has_neighbor (MetaLogicalMonitor *logical_monitor,
MetaLogicalMonitor *neighbor,
MetaScreenDirection neighbor_direction)
meta_logical_monitor_has_neighbor (MetaLogicalMonitor *logical_monitor,
MetaLogicalMonitor *neighbor,
MetaDisplayDirection neighbor_direction)
{
switch (neighbor_direction)
{
case META_SCREEN_RIGHT:
case META_DISPLAY_RIGHT:
if (neighbor->rect.x == (logical_monitor->rect.x +
logical_monitor->rect.width) &&
meta_rectangle_vert_overlap (&neighbor->rect,
&logical_monitor->rect))
return TRUE;
break;
case META_SCREEN_LEFT:
case META_DISPLAY_LEFT:
if (logical_monitor->rect.x == (neighbor->rect.x +
neighbor->rect.width) &&
meta_rectangle_vert_overlap (&neighbor->rect,
&logical_monitor->rect))
return TRUE;
break;
case META_SCREEN_UP:
case META_DISPLAY_UP:
if (logical_monitor->rect.y == (neighbor->rect.y +
neighbor->rect.height) &&
meta_rectangle_horiz_overlap (&neighbor->rect,
&logical_monitor->rect))
return TRUE;
break;
case META_SCREEN_DOWN:
case META_DISPLAY_DOWN:
if (neighbor->rect.y == (logical_monitor->rect.y +
logical_monitor->rect.height) &&
meta_rectangle_horiz_overlap (&neighbor->rect,

View File

@ -40,7 +40,7 @@ struct _MetaLogicalMonitor
gboolean is_primary;
gboolean is_presentation; /* XXX: not yet used */
gboolean in_fullscreen;
int scale;
float scale;
MetaMonitorTransform transform;
/* The primary or first output for this monitor, 0 if we can't figure out.
@ -68,6 +68,7 @@ MetaLogicalMonitor * meta_logical_monitor_new (MetaMonitorManager *monitor
MetaLogicalMonitor * meta_logical_monitor_new_derived (MetaMonitorManager *monitor_manager,
MetaMonitor *monitor,
MetaRectangle *layout,
float scale,
int monitor_number);
void meta_logical_monitor_add_monitor (MetaLogicalMonitor *logical_monitor,
@ -77,12 +78,16 @@ 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);
float meta_logical_monitor_get_scale (MetaLogicalMonitor *logical_monitor);
MetaMonitorTransform meta_logical_monitor_get_transform (MetaLogicalMonitor *logical_monitor);
MetaRectangle meta_logical_monitor_get_layout (MetaLogicalMonitor *logical_monitor);
GList * meta_logical_monitor_get_monitors (MetaLogicalMonitor *logical_monitor);
gboolean meta_logical_monitor_has_neighbor (MetaLogicalMonitor *logical_monitor,
MetaLogicalMonitor *neighbor,
MetaScreenDirection neighbor_dir);
gboolean meta_logical_monitor_has_neighbor (MetaLogicalMonitor *logical_monitor,
MetaLogicalMonitor *neighbor,
MetaDisplayDirection neighbor_dir);
#endif /* META_LOGICAL_MONITOR_H */

View File

@ -23,10 +23,13 @@
#include "backends/meta-monitor-config-manager.h"
#include "backends/meta-monitor-config-migration.h"
#include "backends/meta-monitor-config-store.h"
#include "backends/meta-monitor-manager-private.h"
#include "core/boxes-private.h"
#define CONFIG_HISTORY_MAX_SIZE 3
struct _MetaMonitorConfigManager
{
GObject parent;
@ -36,7 +39,7 @@ struct _MetaMonitorConfigManager
MetaMonitorConfigStore *config_store;
MetaMonitorsConfig *current_config;
MetaMonitorsConfig *previous_config;
GQueue config_history;
};
G_DEFINE_TYPE (MetaMonitorConfigManager, meta_monitor_config_manager,
@ -45,6 +48,12 @@ G_DEFINE_TYPE (MetaMonitorConfigManager, meta_monitor_config_manager,
G_DEFINE_TYPE (MetaMonitorsConfig, meta_monitors_config,
G_TYPE_OBJECT)
static void
meta_crtc_info_free (MetaCrtcInfo *info);
static void
meta_output_info_free (MetaOutputInfo *info);
MetaMonitorConfigManager *
meta_monitor_config_manager_new (MetaMonitorManager *monitor_manager)
{
@ -355,10 +364,12 @@ create_key_for_current_state (MetaMonitorManager *monitor_manager)
MetaMonitorsConfig *
meta_monitor_config_manager_get_stored (MetaMonitorConfigManager *config_manager)
{
MetaMonitorManager *monitor_manager = config_manager->monitor_manager;
MetaMonitorsConfigKey *config_key;
MetaMonitorsConfig *config;
GError *error = NULL;
config_key = create_key_for_current_state (config_manager->monitor_manager);
config_key = create_key_for_current_state (monitor_manager);
if (!config_key)
return NULL;
@ -366,6 +377,22 @@ meta_monitor_config_manager_get_stored (MetaMonitorConfigManager *config_manager
config_key);
meta_monitors_config_key_free (config_key);
if (!config)
return NULL;
if (config->flags & META_MONITORS_CONFIG_FLAG_MIGRATED)
{
if (!meta_finish_monitors_config_migration (monitor_manager, config,
&error))
{
g_warning ("Failed to finish monitors config migration: %s",
error->message);
g_error_free (error);
meta_monitor_config_store_remove (config_manager->config_store, config);
return NULL;
}
}
return config;
}
@ -483,19 +510,26 @@ create_preferred_logical_monitor_config (MetaMonitorManager *monitor_ma
MetaMonitor *monitor,
int x,
int y,
MetaLogicalMonitorConfig *primary_logical_monitor_config,
MetaLogicalMonitorLayoutMode layout_mode)
{
MetaMonitorMode *mode;
int width, height;
int scale;
float scale;
MetaMonitorConfig *monitor_config;
MetaLogicalMonitorConfig *logical_monitor_config;
mode = meta_monitor_get_preferred_mode (monitor);
meta_monitor_mode_get_resolution (mode, &width, &height);
scale = meta_monitor_manager_calculate_monitor_mode_scale (monitor_manager,
monitor,
mode);
if ((meta_monitor_manager_get_capabilities (monitor_manager) &
META_MONITOR_MANAGER_CAPABILITY_GLOBAL_SCALE_REQUIRED) &&
primary_logical_monitor_config)
scale = primary_logical_monitor_config->scale;
else
scale = meta_monitor_manager_calculate_monitor_mode_scale (monitor_manager,
monitor,
mode);
switch (layout_mode)
{
@ -546,6 +580,7 @@ meta_monitor_config_manager_create_linear (MetaMonitorConfigManager *config_mana
create_preferred_logical_monitor_config (monitor_manager,
primary_monitor,
0, 0,
NULL,
layout_mode);
primary_logical_monitor_config->is_primary = TRUE;
logical_monitor_configs = g_list_append (NULL,
@ -569,6 +604,7 @@ meta_monitor_config_manager_create_linear (MetaMonitorConfigManager *config_mana
create_preferred_logical_monitor_config (monitor_manager,
monitor,
x, 0,
primary_logical_monitor_config,
layout_mode);
logical_monitor_configs = g_list_append (logical_monitor_configs,
logical_monitor_config);
@ -576,7 +612,8 @@ meta_monitor_config_manager_create_linear (MetaMonitorConfigManager *config_mana
x += logical_monitor_config->layout.width;
}
return meta_monitors_config_new (logical_monitor_configs, layout_mode);
return meta_monitors_config_new (logical_monitor_configs, layout_mode,
META_MONITORS_CONFIG_FLAG_NONE);
}
MetaMonitorsConfig *
@ -598,12 +635,14 @@ meta_monitor_config_manager_create_fallback (MetaMonitorConfigManager *config_ma
create_preferred_logical_monitor_config (monitor_manager,
primary_monitor,
0, 0,
NULL,
layout_mode);
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, layout_mode);
return meta_monitors_config_new (logical_monitor_configs, layout_mode,
META_MONITORS_CONFIG_FLAG_NONE);
}
MetaMonitorsConfig *
@ -615,6 +654,7 @@ meta_monitor_config_manager_create_suggested (MetaMonitorConfigManager *config_m
MetaLogicalMonitorLayoutMode layout_mode;
GList *logical_monitor_configs;
GList *region;
int x, y;
GList *monitors;
GList *l;
@ -622,16 +662,30 @@ meta_monitor_config_manager_create_suggested (MetaMonitorConfigManager *config_m
if (!primary_monitor)
return NULL;
if (!meta_monitor_get_suggested_position (primary_monitor, &x, &y))
return NULL;
layout_mode = meta_monitor_manager_get_default_layout_mode (monitor_manager);
logical_monitor_configs = NULL;
region = NULL;
primary_logical_monitor_config =
create_preferred_logical_monitor_config (monitor_manager,
primary_monitor,
x, y,
NULL,
layout_mode);
primary_logical_monitor_config->is_primary = TRUE;
logical_monitor_configs = g_list_append (NULL,
primary_logical_monitor_config);
region = g_list_prepend (NULL, &primary_logical_monitor_config->layout);
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 (monitor == primary_monitor)
continue;
if (!meta_monitor_get_suggested_position (monitor, &x, &y))
continue;
@ -640,6 +694,7 @@ meta_monitor_config_manager_create_suggested (MetaMonitorConfigManager *config_m
create_preferred_logical_monitor_config (monitor_manager,
monitor,
x, y,
primary_logical_monitor_config,
layout_mode);
logical_monitor_configs = g_list_append (logical_monitor_configs,
logical_monitor_config);
@ -655,9 +710,6 @@ meta_monitor_config_manager_create_suggested (MetaMonitorConfigManager *config_m
}
region = g_list_prepend (region, &logical_monitor_config->layout);
if (monitor == primary_monitor)
primary_logical_monitor_config = logical_monitor_config;
}
g_list_free (region);
@ -665,21 +717,288 @@ meta_monitor_config_manager_create_suggested (MetaMonitorConfigManager *config_m
if (!logical_monitor_configs)
return NULL;
if (!primary_logical_monitor_config)
primary_logical_monitor_config =
g_list_first (logical_monitor_configs)->data;
return meta_monitors_config_new (logical_monitor_configs, layout_mode,
META_MONITORS_CONFIG_FLAG_NONE);
}
static MetaMonitorsConfig *
create_for_builtin_display_rotation (MetaMonitorConfigManager *config_manager,
gboolean rotate,
MetaMonitorTransform transform)
{
MetaLogicalMonitorConfig *logical_monitor_config;
MetaLogicalMonitorConfig *current_logical_monitor_config;
MetaMonitorConfig *monitor_config;
MetaMonitorConfig *current_monitor_config;
if (!meta_monitor_manager_get_is_builtin_display_on (config_manager->monitor_manager))
return NULL;
if (!config_manager->current_config)
return NULL;
if (g_list_length (config_manager->current_config->logical_monitor_configs) != 1)
return NULL;
current_logical_monitor_config = config_manager->current_config->logical_monitor_configs->data;
if (rotate)
transform = (current_logical_monitor_config->transform + 1) % META_MONITOR_TRANSFORM_FLIPPED;
if (current_logical_monitor_config->transform == transform)
return NULL;
if (g_list_length (current_logical_monitor_config->monitor_configs) != 1)
return NULL;
current_monitor_config = current_logical_monitor_config->monitor_configs->data;
monitor_config = g_new0 (MetaMonitorConfig, 1);
*monitor_config = (MetaMonitorConfig) {
.monitor_spec = meta_monitor_spec_clone (current_monitor_config->monitor_spec),
.mode_spec = g_memdup (current_monitor_config->mode_spec, sizeof (MetaMonitorModeSpec)),
.enable_underscanning = current_monitor_config->enable_underscanning
};
logical_monitor_config = g_memdup (current_logical_monitor_config, sizeof (MetaLogicalMonitorConfig));
logical_monitor_config->monitor_configs = g_list_append (NULL, monitor_config);
logical_monitor_config->transform = transform;
return meta_monitors_config_new (g_list_append (NULL, logical_monitor_config),
config_manager->current_config->layout_mode,
META_MONITORS_CONFIG_FLAG_NONE);
}
MetaMonitorsConfig *
meta_monitor_config_manager_create_for_orientation (MetaMonitorConfigManager *config_manager,
MetaMonitorTransform transform)
{
return create_for_builtin_display_rotation (config_manager, FALSE, transform);
}
MetaMonitorsConfig *
meta_monitor_config_manager_create_for_rotate_monitor (MetaMonitorConfigManager *config_manager)
{
return create_for_builtin_display_rotation (config_manager, TRUE, META_MONITOR_TRANSFORM_NORMAL);
}
static MetaMonitorsConfig *
create_for_switch_config_all_mirror (MetaMonitorConfigManager *config_manager)
{
MetaMonitorManager *monitor_manager = config_manager->monitor_manager;
MetaLogicalMonitorLayoutMode layout_mode;
MetaLogicalMonitorConfig *logical_monitor_config = NULL;
GList *monitor_configs = NULL;
gint common_mode_w = 0, common_mode_h = 0;
float best_scale = 1.0;
MetaMonitor *monitor;
GList *modes;
GList *monitors;
GList *l;
monitors = meta_monitor_manager_get_monitors (monitor_manager);
monitor = monitors->data;
modes = meta_monitor_get_modes (monitor);
for (l = modes; l; l = l->next)
{
MetaMonitorMode *mode = l->data;
gboolean common_mode_size = TRUE;
gint mode_w, mode_h;
GList *ll;
meta_monitor_mode_get_resolution (mode, &mode_w, &mode_h);
for (ll = monitors->next; ll; ll = ll->next)
{
MetaMonitor *monitor_b = ll->data;
gboolean have_same_mode_size = FALSE;
GList *mm;
for (mm = meta_monitor_get_modes (monitor_b); mm; mm = mm->next)
{
MetaMonitorMode *mode_b = mm->data;
gint mode_b_w, mode_b_h;
meta_monitor_mode_get_resolution (mode_b, &mode_b_w, &mode_b_h);
if (mode_w == mode_b_w &&
mode_h == mode_b_h)
{
have_same_mode_size = TRUE;
break;
}
}
if (!have_same_mode_size)
{
common_mode_size = FALSE;
break;
}
}
if (common_mode_size &&
common_mode_w * common_mode_h < mode_w * mode_h)
{
common_mode_w = mode_w;
common_mode_h = mode_h;
}
}
if (common_mode_w == 0 || common_mode_h == 0)
return NULL;
for (l = monitors; l; l = l->next)
{
MetaMonitor *monitor = l->data;
MetaMonitorMode *mode = NULL;
GList *ll;
float scale;
for (ll = meta_monitor_get_modes (monitor); ll; ll = ll->next)
{
gint mode_w, mode_h;
mode = ll->data;
meta_monitor_mode_get_resolution (mode, &mode_w, &mode_h);
if (mode_w == common_mode_w && mode_h == common_mode_h)
break;
}
if (!mode)
continue;
scale = meta_monitor_manager_calculate_monitor_mode_scale (monitor_manager, monitor, mode);
best_scale = MAX (best_scale, scale);
monitor_configs = g_list_prepend (monitor_configs, create_monitor_config (monitor, mode));
}
logical_monitor_config = g_new0 (MetaLogicalMonitorConfig, 1);
*logical_monitor_config = (MetaLogicalMonitorConfig) {
.layout = (MetaRectangle) {
.x = 0,
.y = 0,
.width = common_mode_w,
.height = common_mode_h
},
.scale = best_scale,
.monitor_configs = monitor_configs
};
layout_mode = meta_monitor_manager_get_default_layout_mode (monitor_manager);
return meta_monitors_config_new (g_list_append (NULL, logical_monitor_config),
layout_mode,
META_MONITORS_CONFIG_FLAG_NONE);
}
static MetaMonitorsConfig *
create_for_switch_config_external (MetaMonitorConfigManager *config_manager)
{
MetaMonitorManager *monitor_manager = config_manager->monitor_manager;
GList *logical_monitor_configs = NULL;
int x = 0;
MetaLogicalMonitorLayoutMode layout_mode;
GList *monitors;
GList *l;
layout_mode = meta_monitor_manager_get_default_layout_mode (monitor_manager);
monitors = meta_monitor_manager_get_monitors (monitor_manager);
for (l = monitors; l; l = l->next)
{
MetaMonitor *monitor = l->data;
MetaLogicalMonitorConfig *logical_monitor_config;
if (meta_monitor_is_laptop_panel (monitor))
continue;
logical_monitor_config =
create_preferred_logical_monitor_config (monitor_manager,
monitor,
x, 0,
NULL,
layout_mode);
logical_monitor_configs = g_list_append (logical_monitor_configs,
logical_monitor_config);
if (x == 0)
logical_monitor_config->is_primary = TRUE;
x += logical_monitor_config->layout.width;
}
return meta_monitors_config_new (logical_monitor_configs, layout_mode,
META_MONITORS_CONFIG_FLAG_NONE);
}
static MetaMonitorsConfig *
create_for_switch_config_builtin (MetaMonitorConfigManager *config_manager)
{
MetaMonitorManager *monitor_manager = config_manager->monitor_manager;
MetaLogicalMonitorLayoutMode layout_mode;
GList *logical_monitor_configs;
MetaLogicalMonitorConfig *primary_logical_monitor_config;
MetaMonitor *monitor;
monitor = meta_monitor_manager_get_laptop_panel (monitor_manager);
if (!monitor)
return NULL;
layout_mode = meta_monitor_manager_get_default_layout_mode (monitor_manager);
primary_logical_monitor_config =
create_preferred_logical_monitor_config (monitor_manager,
monitor,
0, 0,
NULL,
layout_mode);
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, layout_mode);
return meta_monitors_config_new (logical_monitor_configs, layout_mode,
META_MONITORS_CONFIG_FLAG_NONE);
}
MetaMonitorsConfig *
meta_monitor_config_manager_create_for_switch_config (MetaMonitorConfigManager *config_manager,
MetaMonitorSwitchConfigType config_type)
{
MetaMonitorManager *monitor_manager = config_manager->monitor_manager;
if (!meta_monitor_manager_can_switch_config (monitor_manager))
return NULL;
switch (config_type)
{
case META_MONITOR_SWITCH_CONFIG_ALL_MIRROR:
return create_for_switch_config_all_mirror (config_manager);
case META_MONITOR_SWITCH_CONFIG_ALL_LINEAR:
return meta_monitor_config_manager_create_linear (config_manager);
case META_MONITOR_SWITCH_CONFIG_EXTERNAL:
return create_for_switch_config_external (config_manager);
case META_MONITOR_SWITCH_CONFIG_BUILTIN:
return create_for_switch_config_builtin (config_manager);
case META_MONITOR_SWITCH_CONFIG_UNKNOWN:
g_warn_if_reached ();
break;
}
return NULL;
}
void
meta_monitor_config_manager_set_current (MetaMonitorConfigManager *config_manager,
MetaMonitorsConfig *config)
{
g_set_object (&config_manager->previous_config,
config_manager->current_config);
if (config_manager->current_config)
{
g_queue_push_head (&config_manager->config_history,
g_object_ref (config_manager->current_config));
if (g_queue_get_length (&config_manager->config_history) >
CONFIG_HISTORY_MAX_SIZE)
g_object_unref (g_queue_pop_tail (&config_manager->config_history));
}
g_set_object (&config_manager->current_config, config);
}
@ -698,10 +1017,23 @@ meta_monitor_config_manager_get_current (MetaMonitorConfigManager *config_manage
return config_manager->current_config;
}
MetaMonitorsConfig *
meta_monitor_config_manager_pop_previous (MetaMonitorConfigManager *config_manager)
{
return g_queue_pop_head (&config_manager->config_history);
}
MetaMonitorsConfig *
meta_monitor_config_manager_get_previous (MetaMonitorConfigManager *config_manager)
{
return config_manager->previous_config;
return g_queue_peek_head (&config_manager->config_history);
}
void
meta_monitor_config_manager_clear_history (MetaMonitorConfigManager *config_manager)
{
g_queue_foreach (&config_manager->config_history, (GFunc) g_object_unref, NULL);
g_queue_clear (&config_manager->config_history);
}
static void
@ -711,7 +1043,7 @@ meta_monitor_config_manager_dispose (GObject *object)
META_MONITOR_CONFIG_MANAGER (object);
g_clear_object (&config_manager->current_config);
g_clear_object (&config_manager->previous_config);
meta_monitor_config_manager_clear_history (config_manager);
G_OBJECT_CLASS (meta_monitor_config_manager_parent_class)->dispose (object);
}
@ -719,6 +1051,7 @@ meta_monitor_config_manager_dispose (GObject *object)
static void
meta_monitor_config_manager_init (MetaMonitorConfigManager *config_manager)
{
g_queue_init (&config_manager->config_history);
}
static void
@ -835,7 +1168,8 @@ meta_monitors_config_key_equal (gconstpointer data_a,
MetaMonitorsConfig *
meta_monitors_config_new (GList *logical_monitor_configs,
MetaLogicalMonitorLayoutMode layout_mode)
MetaLogicalMonitorLayoutMode layout_mode,
MetaMonitorsConfigFlag flags)
{
MetaMonitorsConfig *config;
@ -843,6 +1177,7 @@ meta_monitors_config_new (GList *logical_monitor_configs,
config->logical_monitor_configs = logical_monitor_configs;
config->key = meta_monitors_config_key_new (logical_monitor_configs);
config->layout_mode = layout_mode;
config->flags = flags;
return config;
}
@ -870,6 +1205,19 @@ meta_monitors_config_class_init (MetaMonitorsConfigClass *klass)
object_class->finalize = meta_monitors_config_finalize;
}
static void
meta_crtc_info_free (MetaCrtcInfo *info)
{
g_ptr_array_free (info->outputs, TRUE);
g_slice_free (MetaCrtcInfo, info);
}
static void
meta_output_info_free (MetaOutputInfo *info)
{
g_slice_free (MetaOutputInfo, info);
}
gboolean
meta_verify_monitor_mode_spec (MetaMonitorModeSpec *monitor_mode_spec,
GError **error)
@ -926,20 +1274,13 @@ meta_verify_monitor_config (MetaMonitorConfig *monitor_config,
gboolean
meta_verify_logical_monitor_config (MetaLogicalMonitorConfig *logical_monitor_config,
MetaLogicalMonitorLayoutMode layout_mode,
MetaMonitorManager *monitor_manager,
GError **error)
{
GList *l;
int expected_mode_width = 0;
int expected_mode_height = 0;
if (logical_monitor_config->scale < 1)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Invalid logical monitor config scale %d",
logical_monitor_config->scale);
return FALSE;
}
if (logical_monitor_config->layout.x < 0 ||
logical_monitor_config->layout.y < 0)
{
@ -971,8 +1312,10 @@ meta_verify_logical_monitor_config (MetaLogicalMonitorConfig *logical_monitor
switch (layout_mode)
{
case META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL:
expected_mode_width *= logical_monitor_config->scale;
expected_mode_height *= logical_monitor_config->scale;
expected_mode_width = roundf (expected_mode_width *
logical_monitor_config->scale);
expected_mode_height = roundf (expected_mode_height *
logical_monitor_config->scale);
break;
case META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL:
break;
@ -1024,12 +1367,14 @@ has_adjecent_neighbour (MetaMonitorsConfig *config,
gboolean
meta_verify_monitors_config (MetaMonitorsConfig *config,
MetaMonitorManager *monitor_manager,
GError **error)
{
int min_x, min_y;
gboolean has_primary;
GList *region;
GList *l;
gboolean global_scale_required;
if (!config->logical_monitor_configs)
{
@ -1038,6 +1383,10 @@ meta_verify_monitors_config (MetaMonitorsConfig *config,
return FALSE;
}
global_scale_required =
!!(meta_monitor_manager_get_capabilities (monitor_manager) &
META_MONITOR_MANAGER_CAPABILITY_GLOBAL_SCALE_REQUIRED);
min_x = INT_MAX;
min_y = INT_MAX;
region = NULL;
@ -1046,6 +1395,21 @@ meta_verify_monitors_config (MetaMonitorsConfig *config,
{
MetaLogicalMonitorConfig *logical_monitor_config = l->data;
if (global_scale_required)
{
MetaLogicalMonitorConfig *prev_logical_monitor_config =
l->prev ? l->prev->data : NULL;
if (prev_logical_monitor_config &&
(prev_logical_monitor_config->scale !=
logical_monitor_config->scale))
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Logical monitor scales must be identical");
return FALSE;
}
}
if (meta_rectangle_overlaps_with_region (region,
&logical_monitor_config->layout))
{

View File

@ -41,7 +41,7 @@ typedef struct _MetaLogicalMonitorConfig
MetaRectangle layout;
GList *monitor_configs;
MetaMonitorTransform transform;
int scale;
float scale;
gboolean is_primary;
gboolean is_presentation;
} MetaLogicalMonitorConfig;
@ -51,6 +51,12 @@ typedef struct _MetaMonitorsConfigKey
GList *monitor_specs;
} MetaMonitorsConfigKey;
typedef enum _MetaMonitorsConfigFlag
{
META_MONITORS_CONFIG_FLAG_NONE = 0,
META_MONITORS_CONFIG_FLAG_MIGRATED = (1 << 0),
} MetaMonitorsConfigFlag;
struct _MetaMonitorsConfig
{
GObject parent;
@ -58,6 +64,8 @@ struct _MetaMonitorsConfig
MetaMonitorsConfigKey *key;
GList *logical_monitor_configs;
MetaMonitorsConfigFlag flags;
MetaLogicalMonitorLayoutMode layout_mode;
};
@ -83,17 +91,30 @@ MetaMonitorsConfig * meta_monitor_config_manager_create_fallback (MetaMonitorCon
MetaMonitorsConfig * meta_monitor_config_manager_create_suggested (MetaMonitorConfigManager *config_manager);
MetaMonitorsConfig * meta_monitor_config_manager_create_for_orientation (MetaMonitorConfigManager *config_manager,
MetaMonitorTransform transform);
MetaMonitorsConfig * meta_monitor_config_manager_create_for_rotate_monitor (MetaMonitorConfigManager *config_manager);
MetaMonitorsConfig * meta_monitor_config_manager_create_for_switch_config (MetaMonitorConfigManager *config_manager,
MetaMonitorSwitchConfigType config_type);
void meta_monitor_config_manager_set_current (MetaMonitorConfigManager *config_manager,
MetaMonitorsConfig *config);
MetaMonitorsConfig * meta_monitor_config_manager_get_current (MetaMonitorConfigManager *config_manager);
MetaMonitorsConfig * meta_monitor_config_manager_pop_previous (MetaMonitorConfigManager *config_manager);
MetaMonitorsConfig * meta_monitor_config_manager_get_previous (MetaMonitorConfigManager *config_manager);
void meta_monitor_config_manager_clear_history (MetaMonitorConfigManager *config_manager);
void meta_monitor_config_manager_save_current (MetaMonitorConfigManager *config_manager);
MetaMonitorsConfig * meta_monitors_config_new (GList *logical_monitor_configs,
MetaLogicalMonitorLayoutMode layout_mode);
MetaLogicalMonitorLayoutMode layout_mode,
MetaMonitorsConfigFlag flags);
unsigned int meta_monitors_config_key_hash (gconstpointer config_key);
@ -117,9 +138,11 @@ gboolean meta_verify_monitor_config (MetaMonitorConfig *monitor_config,
gboolean meta_verify_logical_monitor_config (MetaLogicalMonitorConfig *logical_monitor_config,
MetaLogicalMonitorLayoutMode layout_mode,
MetaMonitorManager *monitor_manager,
GError **error);
gboolean meta_verify_monitors_config (MetaMonitorsConfig *config,
MetaMonitorManager *monitor_manager,
GError **error);
#endif /* META_MONITOR_CONFIG_MANAGER_H */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,38 @@
/* -*- 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_MIGRATION_H
#define META_MONITOR_CONFIG_MIGRATION_H
#include "backends/meta-monitor-manager-private.h"
gboolean meta_migrate_old_monitors_config (MetaMonitorConfigStore *config_store,
GFile *in_file,
GError **error);
gboolean meta_migrate_old_user_monitors_config (MetaMonitorConfigStore *config_store,
GError **error);
gboolean meta_finish_monitors_config_migration (MetaMonitorManager *monitor_manager,
MetaMonitorsConfig *config,
GError **error);
#endif /* META_MONITOR_CONFIG_MIGRATION_H */

View File

@ -27,6 +27,7 @@
#include <string.h>
#include "backends/meta-monitor-config-manager.h"
#include "backends/meta-monitor-config-migration.h"
#define MONITORS_CONFIG_XML_FORMAT_VERSION 2
@ -53,6 +54,7 @@
* <width>1920</width>
* <height>1080</height>
* <rate>60.049972534179688</rate>
* <flag>interlace</flag>
* </mode>
* </monitor>
* <transform>
@ -108,14 +110,27 @@ struct _MetaMonitorConfigStore
GCancellable *save_cancellable;
GFile *user_file;
GFile *custom_file;
GFile *custom_read_file;
GFile *custom_write_file;
};
#define META_MONITOR_CONFIG_STORE_ERROR (meta_monitor_config_store_error_quark ())
static GQuark meta_monitor_config_store_error_quark (void);
enum
{
META_MONITOR_CONFIG_STORE_ERROR_NEEDS_MIGRATION
};
G_DEFINE_QUARK (meta-monitor-config-store-error-quark,
meta_monitor_config_store_error)
typedef enum
{
STATE_INITIAL,
STATE_MONITORS,
STATE_CONFIGURATION,
STATE_MIGRATED,
STATE_LOGICAL_MONITOR,
STATE_LOGICAL_MONITOR_X,
STATE_LOGICAL_MONITOR_Y,
@ -135,6 +150,7 @@ typedef enum
STATE_MONITOR_MODE_WIDTH,
STATE_MONITOR_MODE_HEIGHT,
STATE_MONITOR_MODE_RATE,
STATE_MONITOR_MODE_FLAG,
STATE_MONITOR_UNDERSCANNING
} ParserState;
@ -143,6 +159,7 @@ typedef struct
ParserState state;
MetaMonitorConfigStore *config_store;
gboolean current_was_migrated;
GList *current_logical_monitor_configs;
MetaMonitorSpec *current_monitor_spec;
gboolean current_transform_flipped;
@ -187,7 +204,14 @@ handle_start_element (GMarkupParseContext *context,
"Missing config file format version");
}
/* TODO: Handle converting version 1 configuration files. */
if (g_str_equal (version, "1"))
{
g_set_error_literal (error,
META_MONITOR_CONFIG_STORE_ERROR,
META_MONITOR_CONFIG_STORE_ERROR_NEEDS_MIGRATION,
"monitors.xml has the old format");
return;
}
if (!g_str_equal (version, QUOTE (MONITORS_CONFIG_XML_FORMAT_VERSION)))
{
@ -210,22 +234,40 @@ handle_start_element (GMarkupParseContext *context,
}
parser->state = STATE_CONFIGURATION;
parser->current_was_migrated = FALSE;
return;
}
case STATE_CONFIGURATION:
{
if (!g_str_equal (element_name, "logicalmonitor"))
if (g_str_equal (element_name, "logicalmonitor"))
{
parser->current_logical_monitor_config =
g_new0 (MetaLogicalMonitorConfig, 1);
parser->state = STATE_LOGICAL_MONITOR;
}
else if (g_str_equal (element_name, "migrated"))
{
parser->current_was_migrated = TRUE;
parser->state = STATE_MIGRATED;
}
else
{
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);
return;
}
parser->state = STATE_LOGICAL_MONITOR;
case STATE_MIGRATED:
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
"Unexpected element '%s'", element_name);
return;
}
@ -384,6 +426,10 @@ handle_start_element (GMarkupParseContext *context,
{
parser->state = STATE_MONITOR_MODE_RATE;
}
else if (g_str_equal (element_name, "flag"))
{
parser->state = STATE_MONITOR_MODE_FLAG;
}
else
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
@ -397,6 +443,7 @@ handle_start_element (GMarkupParseContext *context,
case STATE_MONITOR_MODE_WIDTH:
case STATE_MONITOR_MODE_HEIGHT:
case STATE_MONITOR_MODE_RATE:
case STATE_MONITOR_MODE_FLAG:
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
"Invalid mode sub element '%s'", element_name);
@ -453,8 +500,8 @@ derive_logical_monitor_layout (MetaLogicalMonitorConfig *logical_monitor_conf
switch (layout_mode)
{
case META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL:
width /= logical_monitor_config->scale;
height /= logical_monitor_config->scale;
width = roundf (width / logical_monitor_config->scale);
height = roundf (height / logical_monitor_config->scale);
break;
case META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL:
break;
@ -539,6 +586,7 @@ handle_end_element (GMarkupParseContext *context,
case STATE_MONITOR_MODE_WIDTH:
case STATE_MONITOR_MODE_HEIGHT:
case STATE_MONITOR_MODE_RATE:
case STATE_MONITOR_MODE_FLAG:
{
parser->state = STATE_MONITOR_MODE;
return;
@ -595,7 +643,9 @@ handle_end_element (GMarkupParseContext *context,
g_assert (g_str_equal (element_name, "logicalmonitor"));
if (logical_monitor_config->scale == 0)
if (parser->current_was_migrated)
logical_monitor_config->scale = -1;
else if (logical_monitor_config->scale == 0)
logical_monitor_config->scale = 1;
parser->current_logical_monitor_configs =
@ -607,17 +657,29 @@ handle_end_element (GMarkupParseContext *context,
return;
}
case STATE_MIGRATED:
{
g_assert (g_str_equal (element_name, "migrated"));
parser->state = STATE_CONFIGURATION;
return;
}
case STATE_CONFIGURATION:
{
MetaMonitorConfigStore *store = parser->config_store;
MetaMonitorsConfig *config;
GList *l;
MetaLogicalMonitorLayoutMode layout_mode;
MetaMonitorsConfigFlag config_flags = META_MONITORS_CONFIG_FLAG_NONE;
g_assert (g_str_equal (element_name, "configuration"));
layout_mode =
meta_monitor_manager_get_default_layout_mode (store->monitor_manager);
if (parser->current_was_migrated)
layout_mode = META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL;
else
layout_mode =
meta_monitor_manager_get_default_layout_mode (store->monitor_manager);
for (l = parser->current_logical_monitor_configs; l; l = l->next)
{
@ -630,17 +692,23 @@ handle_end_element (GMarkupParseContext *context,
if (!meta_verify_logical_monitor_config (logical_monitor_config,
layout_mode,
store->monitor_manager,
error))
return;
}
if (parser->current_was_migrated)
config_flags |= META_MONITORS_CONFIG_FLAG_MIGRATED;
config =
meta_monitors_config_new (parser->current_logical_monitor_configs,
layout_mode);
layout_mode,
config_flags);
parser->current_logical_monitor_configs = NULL;
if (!meta_verify_monitors_config (config, error))
if (!meta_verify_monitors_config (config, store->monitor_manager,
error))
{
g_object_unref (config);
return;
@ -775,6 +843,7 @@ handle_text (GMarkupParseContext *context,
case STATE_INITIAL:
case STATE_MONITORS:
case STATE_CONFIGURATION:
case STATE_MIGRATED:
case STATE_LOGICAL_MONITOR:
case STATE_MONITOR:
case STATE_MONITOR_SPEC:
@ -827,14 +896,14 @@ handle_text (GMarkupParseContext *context,
case STATE_LOGICAL_MONITOR_SCALE:
{
if (!read_int (text, text_len,
&parser->current_logical_monitor_config->scale, error))
if (!read_float (text, text_len,
&parser->current_logical_monitor_config->scale, error))
return;
if (parser->current_logical_monitor_config->scale <= 0)
if (parser->current_logical_monitor_config->scale <= 0.0)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Logical monitor scale '%d' invalid",
"Logical monitor scale '%g' invalid",
parser->current_logical_monitor_config->scale);
return;
}
@ -907,6 +976,22 @@ handle_text (GMarkupParseContext *context,
return;
}
case STATE_MONITOR_MODE_FLAG:
{
if (strncmp (text, "interlace", text_len) == 0)
{
parser->current_monitor_mode_spec->flags |=
META_CRTC_MODE_FLAG_INTERLACE;
}
else
{
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
"Invalid mode flag %.*s", (int) text_len, text);
}
return;
}
case STATE_MONITOR_UNDERSCANNING:
{
read_bool (text, text_len,
@ -1005,6 +1090,8 @@ append_monitors (GString *buffer,
monitor_config->mode_spec->height);
g_string_append_printf (buffer, " <rate>%s</rate>\n",
rate_str);
if (monitor_config->mode_spec->flags & META_CRTC_MODE_FLAG_INTERLACE)
g_string_append_printf (buffer, " <flag>interlace</flag>\n");
g_string_append (buffer, " </mode>\n");
if (monitor_config->enable_underscanning)
g_string_append (buffer, " <underscanning>yes</underscanning>\n");
@ -1066,15 +1153,21 @@ append_transform (GString *buffer,
static void
append_logical_monitor_xml (GString *buffer,
MetaMonitorsConfig *config,
MetaLogicalMonitorConfig *logical_monitor_config)
{
char scale_str[G_ASCII_DTOSTR_BUF_SIZE];
g_string_append (buffer, " <logicalmonitor>\n");
g_string_append_printf (buffer, " <x>%d</x>\n",
logical_monitor_config->layout.x);
g_string_append_printf (buffer, " <y>%d</y>\n",
logical_monitor_config->layout.y);
g_string_append_printf (buffer, " <scale>%d</scale>\n",
logical_monitor_config->scale);
g_ascii_dtostr (scale_str, G_ASCII_DTOSTR_BUF_SIZE,
logical_monitor_config->scale);
if ((config->flags & META_MONITORS_CONFIG_FLAG_MIGRATED) == 0)
g_string_append_printf (buffer, " <scale>%s</scale>\n",
scale_str);
if (logical_monitor_config->is_primary)
g_string_append (buffer, " <primary>yes</primary>\n");
if (logical_monitor_config->is_presentation)
@ -1102,11 +1195,14 @@ generate_config_xml (MetaMonitorConfigStore *config_store)
g_string_append (buffer, " <configuration>\n");
if (config->flags & META_MONITORS_CONFIG_FLAG_MIGRATED)
g_string_append (buffer, " <migrated/>\n");
for (l = config->logical_monitor_configs; l; l = l->next)
{
MetaLogicalMonitorConfig *logical_monitor_config = l->data;
append_logical_monitor_xml (buffer, logical_monitor_config);
append_logical_monitor_xml (buffer, config, logical_monitor_config);
}
g_string_append (buffer, " </configuration>\n");
@ -1172,6 +1268,31 @@ meta_monitor_config_store_save (MetaMonitorConfigStore *config_store)
.buffer = buffer
};
/*
* Custom write file is only ever used by the test suite, and the test suite
* will want to have be able to read back the content immediately, so for
* custom write files, do the content replacement synchronously.
*/
if (config_store->custom_write_file)
{
GError *error = NULL;
if (!g_file_replace_contents (config_store->custom_write_file,
buffer->str, buffer->len,
NULL,
FALSE,
G_FILE_CREATE_REPLACE_DESTINATION,
NULL,
NULL,
&error))
{
g_warning ("Saving monitor configuration failed: %s\n",
error->message);
g_error_free (error);
}
return;
}
g_file_replace_contents_async (config_store->user_file,
buffer->str, buffer->len,
NULL,
@ -1181,6 +1302,18 @@ meta_monitor_config_store_save (MetaMonitorConfigStore *config_store)
saved_cb, data);
}
static void
maybe_save_configs (MetaMonitorConfigStore *config_store)
{
/*
* If a custom file is used, it means we are run by the test suite. When this
* is done, avoid replacing the user configuration file with test data,
* except if a custom write file is set as well.
*/
if (!config_store->custom_read_file || config_store->custom_write_file)
meta_monitor_config_store_save (config_store);
}
void
meta_monitor_config_store_add (MetaMonitorConfigStore *config_store,
MetaMonitorsConfig *config)
@ -1188,21 +1321,33 @@ meta_monitor_config_store_add (MetaMonitorConfigStore *config_store,
g_hash_table_replace (config_store->configs,
config->key, g_object_ref (config));
if (!config_store->custom_file)
meta_monitor_config_store_save (config_store);
maybe_save_configs (config_store);
}
void
meta_monitor_config_store_remove (MetaMonitorConfigStore *config_store,
MetaMonitorsConfig *config)
{
g_hash_table_remove (config_store->configs, config->key);
maybe_save_configs (config_store);
}
gboolean
meta_monitor_config_store_set_custom (MetaMonitorConfigStore *config_store,
const char *path,
const char *read_path,
const char *write_path,
GError **error)
{
g_clear_object (&config_store->custom_file);
g_clear_object (&config_store->custom_read_file);
g_clear_object (&config_store->custom_write_file);
g_hash_table_remove_all (config_store->configs);
config_store->custom_file = g_file_new_for_path (path);
config_store->custom_read_file = g_file_new_for_path (read_path);
if (write_path)
config_store->custom_write_file = g_file_new_for_path (write_path);
return read_config_file (config_store, config_store->custom_file, error);
return read_config_file (config_store, config_store->custom_read_file, error);
}
int
@ -1211,6 +1356,12 @@ meta_monitor_config_store_get_config_count (MetaMonitorConfigStore *config_store
return (int) g_hash_table_size (config_store->configs);
}
MetaMonitorManager *
meta_monitor_config_store_get_monitor_manager (MetaMonitorConfigStore *config_store)
{
return config_store->monitor_manager;
}
MetaMonitorConfigStore *
meta_monitor_config_store_new (MetaMonitorManager *monitor_manager)
{
@ -1227,7 +1378,7 @@ meta_monitor_config_store_constructed (GObject *object)
GError *error = NULL;
user_file_path = g_build_filename (g_get_user_config_dir (),
"monitors-experimental.xml",
"monitors.xml",
NULL);
config_store->user_file = g_file_new_for_path (user_file_path);
@ -1235,9 +1386,23 @@ meta_monitor_config_store_constructed (GObject *object)
{
if (!read_config_file (config_store, config_store->user_file, &error))
{
g_warning ("Failed to read monitors config file '%s': %s",
user_file_path, error->message);
g_error_free (error);
if (error->domain == META_MONITOR_CONFIG_STORE_ERROR &&
error->code == META_MONITOR_CONFIG_STORE_ERROR_NEEDS_MIGRATION)
{
g_clear_error (&error);
if (!meta_migrate_old_user_monitors_config (config_store, &error))
{
g_warning ("Failed to migrate old monitors config file: %s",
error->message);
g_error_free (error);
}
}
else
{
g_warning ("Failed to read monitors config file '%s': %s",
user_file_path, error->message);
g_error_free (error);
}
}
}
@ -1252,7 +1417,8 @@ meta_monitor_config_store_dispose (GObject *object)
g_clear_pointer (&config_store->configs, g_hash_table_destroy);
g_clear_object (&config_store->user_file);
g_clear_object (&config_store->custom_file);
g_clear_object (&config_store->custom_read_file);
g_clear_object (&config_store->custom_write_file);
G_OBJECT_CLASS (meta_monitor_config_store_parent_class)->dispose (object);
}

View File

@ -38,10 +38,16 @@ MetaMonitorsConfig * meta_monitor_config_store_lookup (MetaMonitorConfigStore *c
void meta_monitor_config_store_add (MetaMonitorConfigStore *config_store,
MetaMonitorsConfig *config);
void meta_monitor_config_store_remove (MetaMonitorConfigStore *config_store,
MetaMonitorsConfig *config);
gboolean meta_monitor_config_store_set_custom (MetaMonitorConfigStore *config_store,
const char *path,
const char *read_path,
const char *write_path,
GError **error);
int meta_monitor_config_store_get_config_count (MetaMonitorConfigStore *config_store);
MetaMonitorManager * meta_monitor_config_store_get_monitor_manager (MetaMonitorConfigStore *config_store);
#endif /* META_MONITOR_CONFIG_STORE_H */

File diff suppressed because it is too large Load Diff

View File

@ -1,52 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2001 Havoc Pennington
* Copyright (C) 2003 Rob Adams
* Copyright (C) 2004-2006 Elijah Newren
* Copyright (C) 2013 Red Hat Inc.
*
* 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef META_MONITOR_CONFIG_H
#define META_MONITOR_CONFIG_H
#include "meta-monitor-manager-private.h"
#define META_TYPE_MONITOR_CONFIG (meta_monitor_config_get_type ())
G_DECLARE_FINAL_TYPE (MetaMonitorConfig, meta_monitor_config,
META, MONITOR_CONFIG, GObject)
MetaMonitorConfig *meta_monitor_config_new (MetaMonitorManager *manager);
gboolean meta_monitor_config_apply_stored (MetaMonitorConfig *config,
MetaMonitorManager *manager);
void meta_monitor_config_make_default (MetaMonitorConfig *config,
MetaMonitorManager *manager);
void meta_monitor_config_update_current (MetaMonitorConfig *config,
MetaMonitorManager *manager);
void meta_monitor_config_make_persistent (MetaMonitorConfig *config);
void meta_monitor_config_restore_previous (MetaMonitorConfig *config,
MetaMonitorManager *manager);
gboolean meta_monitor_config_get_is_builtin_display_on (MetaMonitorConfig *config);
void meta_monitor_config_lid_is_closed_changed (MetaMonitorConfig *self,
MetaMonitorManager *manager);
#endif /* META_MONITOR_CONFIG_H */

View File

@ -31,6 +31,7 @@
#include <meta/util.h>
#include "backends/meta-backend-private.h"
#include "backends/meta-monitor.h"
#include "backends/meta-monitor-config-manager.h"
#define ALL_TRANSFORMS ((1 << (META_MONITOR_TRANSFORM_FLIPPED_270 + 1)) - 1)
@ -40,11 +41,6 @@
#define MAX_CRTCS (MAX_MONITORS * 2)
#define MAX_MODES (MAX_MONITORS * 4)
static float supported_scales_dummy[] = {
1.0,
2.0
};
struct _MetaMonitorManagerDummy
{
MetaMonitorManager parent_instance;
@ -59,7 +55,7 @@ struct _MetaMonitorManagerDummyClass
typedef struct _MetaOutputDummy
{
int scale;
float scale;
} MetaOutputDummy;
G_DEFINE_TYPE (MetaMonitorManagerDummy, meta_monitor_manager_dummy, META_TYPE_MONITOR_MANAGER);
@ -74,7 +70,7 @@ static void
append_monitor (GArray *modes,
GArray *crtcs,
GArray *outputs,
int scale)
float scale)
{
MetaCrtcMode modes_decl[] = {
{
@ -246,7 +242,7 @@ static void
meta_monitor_manager_dummy_read_current (MetaMonitorManager *manager)
{
unsigned int num_monitors = 1;
int *monitor_scales = NULL;
float *monitor_scales = NULL;
const char *num_monitors_str;
const char *monitor_scales_str;
const char *tiled_monitors_str;
@ -298,9 +294,9 @@ meta_monitor_manager_dummy_read_current (MetaMonitorManager *manager)
}
}
monitor_scales = g_newa (int, num_monitors);
monitor_scales = g_newa (typeof (*monitor_scales), num_monitors);
for (i = 0; i < num_monitors; i++)
monitor_scales[i] = 1;
monitor_scales[i] = 1.0;
monitor_scales_str = getenv ("MUTTER_DEBUG_DUMMY_MONITOR_SCALES");
if (monitor_scales_str)
@ -313,11 +309,9 @@ meta_monitor_manager_dummy_read_current (MetaMonitorManager *manager)
"of monitors (defaults to 1).\n");
for (i = 0; i < num_monitors && scales_str_list[i]; i++)
{
int scale = g_ascii_strtoll (scales_str_list[i], NULL, 10);
if (scale == 1 || scale == 2)
monitor_scales[i] = scale;
else
meta_warning ("Invalid dummy monitor scale");
float scale = g_ascii_strtod (scales_str_list[i], NULL);
monitor_scales[i] = scale;
}
g_strfreev (scales_str_list);
}
@ -356,10 +350,15 @@ meta_monitor_manager_dummy_ensure_initial_config (MetaMonitorManager *manager)
config = meta_monitor_manager_ensure_configured (manager);
if (meta_is_monitor_config_manager_enabled ())
if (meta_is_stage_views_enabled ())
meta_monitor_manager_update_logical_state (manager, config);
else
meta_monitor_manager_update_logical_state_derived (manager);
{
MetaMonitorManagerDeriveFlag flags =
META_MONITOR_MANAGER_DERIVE_FLAG_NONE;
meta_monitor_manager_update_logical_state_derived (manager, flags);
}
}
static void
@ -540,38 +539,6 @@ meta_monitor_manager_dummy_apply_monitors_config (MetaMonitorManager *manag
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_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);
legacy_calculate_screen_size (manager);
meta_monitor_manager_rebuild_derived (manager);
}
static gboolean
meta_monitor_manager_dummy_is_transform_handled (MetaMonitorManager *manager,
MetaCrtc *crtc,
@ -582,7 +549,7 @@ meta_monitor_manager_dummy_is_transform_handled (MetaMonitorManager *manager,
return manager_dummy->is_transform_handled;
}
static int
static float
meta_monitor_manager_dummy_calculate_monitor_mode_scale (MetaMonitorManager *manager,
MetaMonitor *monitor,
MetaMonitorMode *monitor_mode)
@ -596,35 +563,53 @@ meta_monitor_manager_dummy_calculate_monitor_mode_scale (MetaMonitorManager *man
return output_dummy->scale;
}
static void
meta_monitor_manager_dummy_get_supported_scales (MetaMonitorManager *manager,
float **scales,
int *n_scales)
static float *
meta_monitor_manager_dummy_calculate_supported_scales (MetaMonitorManager *manager,
MetaLogicalMonitorLayoutMode layout_mode,
MetaMonitor *monitor,
MetaMonitorMode *monitor_mode,
int *n_supported_scales)
{
*scales = supported_scales_dummy;
*n_scales = G_N_ELEMENTS (supported_scales_dummy);
MetaMonitorScalesConstraint constraints =
META_MONITOR_SCALES_CONSTRAINT_NONE;
switch (layout_mode)
{
case META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL:
break;
case META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL:
constraints |= META_MONITOR_SCALES_CONSTRAINT_NO_FRAC;
break;
}
return meta_monitor_calculate_supported_scales (monitor, monitor_mode,
constraints,
n_supported_scales);
}
static gboolean
is_monitor_framebuffers_scaled (void)
{
MetaBackend *backend = meta_get_backend ();
MetaSettings *settings = meta_backend_get_settings (backend);
return meta_backend_is_experimental_feature_enabled (
backend,
return meta_settings_is_experimental_feature_enabled (
settings,
META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER);
}
static MetaMonitorManagerCapability
meta_monitor_manager_dummy_get_capabilities (MetaMonitorManager *manager)
{
MetaBackend *backend = meta_get_backend ();
MetaSettings *settings = meta_backend_get_settings (backend);
MetaMonitorManagerCapability capabilities =
META_MONITOR_MANAGER_CAPABILITY_NONE;
capabilities |= META_MONITOR_MANAGER_CAPABILITY_MIRRORING;
if (meta_backend_is_experimental_feature_enabled (
meta_get_backend (),
if (meta_settings_is_experimental_feature_enabled (
settings,
META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER))
capabilities |= META_MONITOR_MANAGER_CAPABILITY_LAYOUT_MODE;
@ -665,10 +650,9 @@ meta_monitor_manager_dummy_class_init (MetaMonitorManagerDummyClass *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;
manager_class->is_transform_handled = meta_monitor_manager_dummy_is_transform_handled;
manager_class->calculate_monitor_mode_scale = meta_monitor_manager_dummy_calculate_monitor_mode_scale;
manager_class->get_supported_scales = meta_monitor_manager_dummy_get_supported_scales;
manager_class->calculate_supported_scales = meta_monitor_manager_dummy_calculate_supported_scales;
manager_class->get_capabilities = meta_monitor_manager_dummy_get_capabilities;
manager_class->get_max_screen_size = meta_monitor_manager_dummy_get_max_screen_size;
manager_class->get_default_layout_mode = meta_monitor_manager_dummy_get_default_layout_mode;

View File

@ -40,7 +40,6 @@
#include <libupower-glib/upower.h>
#include "display-private.h"
#include <meta/screen.h>
#include "stack-tracker.h"
#include <meta/meta-monitor-manager.h>
@ -48,7 +47,6 @@
#include "meta-dbus-display-config.h"
#include "meta-cursor.h"
typedef struct _MetaMonitorConfig MetaMonitorConfig;
typedef struct _MetaMonitorConfigManager MetaMonitorConfigManager;
typedef struct _MetaMonitorConfigStore MetaMonitorConfigStore;
typedef struct _MetaMonitorsConfig MetaMonitorsConfig;
@ -72,7 +70,8 @@ typedef enum _MetaMonitorManagerCapability
{
META_MONITOR_MANAGER_CAPABILITY_NONE = 0,
META_MONITOR_MANAGER_CAPABILITY_MIRRORING = (1 << 0),
META_MONITOR_MANAGER_CAPABILITY_LAYOUT_MODE = (1 << 1)
META_MONITOR_MANAGER_CAPABILITY_LAYOUT_MODE = (1 << 1),
META_MONITOR_MANAGER_CAPABILITY_GLOBAL_SCALE_REQUIRED = (1 << 2)
} MetaMonitorManagerCapability;
/* Equivalent to the 'method' enum in org.gnome.Mutter.DisplayConfig */
@ -90,6 +89,12 @@ typedef enum _MetaLogicalMonitorLayoutMode
META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL = 2
} MetaLogicalMonitorLayoutMode;
typedef enum _MetaMonitorManagerDeriveFlag
{
META_MONITOR_MANAGER_DERIVE_FLAG_NONE = 0,
META_MONITOR_MANAGER_DERIVE_FLAG_CONFIGURED_SCALE = (1 << 0)
} MetaMonitorManagerDeriveFlag;
typedef enum
{
META_MONITOR_TRANSFORM_NORMAL,
@ -124,6 +129,28 @@ typedef enum
META_CONNECTOR_TYPE_DSI = 16,
} MetaConnectorType;
/* Same as KMS mode flags and X11 randr flags */
typedef enum
{
META_CRTC_MODE_FLAG_NONE = 0,
META_CRTC_MODE_FLAG_PHSYNC = (1 << 0),
META_CRTC_MODE_FLAG_NHSYNC = (1 << 1),
META_CRTC_MODE_FLAG_PVSYNC = (1 << 2),
META_CRTC_MODE_FLAG_NVSYNC = (1 << 3),
META_CRTC_MODE_FLAG_INTERLACE = (1 << 4),
META_CRTC_MODE_FLAG_DBLSCAN = (1 << 5),
META_CRTC_MODE_FLAG_CSYNC = (1 << 6),
META_CRTC_MODE_FLAG_PCSYNC = (1 << 7),
META_CRTC_MODE_FLAG_NCSYNC = (1 << 8),
META_CRTC_MODE_FLAG_HSKEW = (1 << 9),
META_CRTC_MODE_FLAG_BCAST = (1 << 10),
META_CRTC_MODE_FLAG_PIXMUX = (1 << 11),
META_CRTC_MODE_FLAG_DBLCLK = (1 << 12),
META_CRTC_MODE_FLAG_CLKDIV2 = (1 << 13),
META_CRTC_MODE_FLAG_MASK = 0x3fff
} MetaCrtcModeFlag;
struct _MetaTileInfo
{
guint32 group_id;
@ -224,7 +251,7 @@ struct _MetaCrtcMode
int width;
int height;
float refresh_rate;
guint32 flags;
MetaCrtcModeFlag flags;
gpointer driver_private;
GDestroyNotify driver_notify;
@ -232,11 +259,9 @@ struct _MetaCrtcMode
/*
* 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
* is handled by pointer. This is to accomodate the usage in MetaMonitorConfig
* A representation of a CRTC configuration, generated by
* MetaMonitorConfigManager.
*/
struct _MetaCrtcInfo
{
@ -250,7 +275,9 @@ struct _MetaCrtcInfo
/*
* MetaOutputInfo:
* this is the same as MetaCrtcInfo, but for outputs
*
* A representation of a connector configuration, generated by
* MetaMonitorConfigManager.
*/
struct _MetaOutputInfo
{
@ -260,12 +287,6 @@ struct _MetaOutputInfo
gboolean is_underscanning;
};
typedef enum _MetaMonitorConfigSystem
{
META_MONITOR_CONFIG_SYSTEM_LEGACY,
META_MONITOR_CONFIG_SYSTEM_MANAGER
} MetaMonitorConfigSystem;
#define META_TYPE_MONITOR_MANAGER (meta_monitor_manager_get_type ())
#define META_MONITOR_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_MONITOR_MANAGER, MetaMonitorManager))
#define META_MONITOR_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_MONITOR_MANAGER, MetaMonitorManagerClass))
@ -314,17 +335,16 @@ struct _MetaMonitorManager
int dbus_name_id;
MetaMonitorConfigSystem pending_persistent_system;
int persistent_timeout_id;
MetaMonitorConfig *legacy_config;
MetaMonitorConfigManager *config_manager;
GnomePnpIds *pnp_ids;
UpClient *up_client;
gulong experimental_features_changed_handler_id;
MetaMonitorSwitchConfigType current_switch_config;
};
struct _MetaMonitorManagerClass
@ -347,12 +367,6 @@ struct _MetaMonitorManagerClass
MetaMonitorsConfigMethod ,
GError **);
void (*apply_configuration) (MetaMonitorManager *,
MetaCrtcInfo **,
unsigned int ,
MetaOutputInfo **,
unsigned int);
void (*set_power_save_mode) (MetaMonitorManager *,
MetaPowerSave);
@ -383,13 +397,15 @@ struct _MetaMonitorManagerClass
MetaCrtc *,
MetaMonitorTransform);
int (*calculate_monitor_mode_scale) (MetaMonitorManager *,
MetaMonitor *,
MetaMonitorMode *);
float (*calculate_monitor_mode_scale) (MetaMonitorManager *,
MetaMonitor *,
MetaMonitorMode *);
void (*get_supported_scales) (MetaMonitorManager *,
float **,
int *);
float * (*calculate_supported_scales) (MetaMonitorManager *,
MetaLogicalMonitorLayoutMode ,
MetaMonitor *,
MetaMonitorMode *,
int *);
MetaMonitorManagerCapability (*get_capabilities) (MetaMonitorManager *);
@ -400,11 +416,10 @@ struct _MetaMonitorManagerClass
MetaLogicalMonitorLayoutMode (*get_default_layout_mode) (MetaMonitorManager *);
};
gboolean meta_is_monitor_config_manager_enabled (void);
void meta_monitor_manager_rebuild (MetaMonitorManager *manager,
MetaMonitorsConfig *config);
void meta_monitor_manager_rebuild_derived (MetaMonitorManager *manager);
void meta_monitor_manager_rebuild_derived (MetaMonitorManager *manager,
MetaMonitorManagerDeriveFlag flags);
int meta_monitor_manager_get_num_logical_monitors (MetaMonitorManager *manager);
@ -422,9 +437,9 @@ MetaLogicalMonitor *meta_monitor_manager_get_logical_monitor_at (MetaMonitorMana
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);
MetaLogicalMonitor *meta_monitor_manager_get_logical_monitor_neighbor (MetaMonitorManager *manager,
MetaLogicalMonitor *logical_monitor,
MetaDisplayDirection direction);
MetaMonitor * meta_monitor_manager_get_primary_monitor (MetaMonitorManager *manager);
@ -450,12 +465,6 @@ void meta_monitor_manager_get_screen_size (MetaMonitorManager *
int *width,
int *height);
void meta_monitor_manager_apply_configuration (MetaMonitorManager *manager,
MetaCrtcInfo **crtcs,
unsigned int n_crtcs,
MetaOutputInfo **outputs,
unsigned int n_outputs);
void meta_monitor_manager_confirm_configuration (MetaMonitorManager *manager,
gboolean ok);
@ -463,9 +472,6 @@ 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_output_info_free (MetaOutputInfo *info);
gboolean meta_monitor_manager_has_hotplug_mode_update (MetaMonitorManager *manager);
void meta_monitor_manager_read_current_state (MetaMonitorManager *manager);
void meta_monitor_manager_on_hotplug (MetaMonitorManager *manager);
@ -487,7 +493,8 @@ MetaMonitorsConfig * meta_monitor_manager_ensure_configured (MetaMonitorManager
void meta_monitor_manager_update_logical_state (MetaMonitorManager *manager,
MetaMonitorsConfig *config);
void meta_monitor_manager_update_logical_state_derived (MetaMonitorManager *manager);
void meta_monitor_manager_update_logical_state_derived (MetaMonitorManager *manager,
MetaMonitorManagerDeriveFlag flags);
gboolean meta_monitor_manager_is_lid_closed (MetaMonitorManager *manager);
@ -495,10 +502,25 @@ void meta_monitor_manager_lid_is_closed_changed (MetaMonitorManage
gboolean meta_monitor_manager_is_headless (MetaMonitorManager *manager);
int meta_monitor_manager_calculate_monitor_mode_scale (MetaMonitorManager *manager,
float meta_monitor_manager_calculate_monitor_mode_scale (MetaMonitorManager *manager,
MetaMonitor *monitor,
MetaMonitorMode *monitor_mode);
float * meta_monitor_manager_calculate_supported_scales (MetaMonitorManager *,
MetaLogicalMonitorLayoutMode ,
MetaMonitor *,
MetaMonitorMode *,
int *);
gboolean meta_monitor_manager_is_scale_supported (MetaMonitorManager *manager,
MetaLogicalMonitorLayoutMode layout_mode,
MetaMonitor *monitor,
MetaMonitorMode *monitor_mode,
float scale);
MetaMonitorManagerCapability
meta_monitor_manager_get_capabilities (MetaMonitorManager *manager);
gboolean meta_monitor_manager_get_max_screen_size (MetaMonitorManager *manager,
int *max_width,
int *max_height);
@ -506,6 +528,8 @@ gboolean meta_monitor_manager_get_max_screen_size (MetaMonitorManager
MetaLogicalMonitorLayoutMode
meta_monitor_manager_get_default_layout_mode (MetaMonitorManager *manager);
void meta_monitor_manager_rotate_monitor (MetaMonitorManager *manager);
void meta_monitor_manager_clear_output (MetaOutput *output);
void meta_monitor_manager_clear_mode (MetaCrtcMode *mode);
void meta_monitor_manager_clear_crtc (MetaCrtc *crtc);

File diff suppressed because it is too large Load Diff

View File

@ -25,9 +25,19 @@
#include "backends/meta-backend-private.h"
#include "backends/meta-monitor-manager-private.h"
#include "backends/meta-settings-private.h"
#define SCALE_FACTORS_PER_INTEGER 4
#define MINIMUM_SCALE_FACTOR 1.0f
#define MAXIMUM_SCALE_FACTOR 4.0f
#define MINIMUM_LOGICAL_WIDTH 800
#define MINIMUM_LOGICAL_HEIGHT 600
#define HANDLED_CRTC_MODE_FLAGS (META_CRTC_MODE_FLAG_INTERLACE)
typedef struct _MetaMonitorMode
{
char *id;
MetaMonitorModeSpec spec;
MetaMonitorCrtcMode *crtc_modes;
} MetaMonitorMode;
@ -41,8 +51,11 @@ typedef struct _MetaMonitorModeTiled
typedef struct _MetaMonitorPrivate
{
MetaMonitorManager *monitor_manager;
GList *outputs;
GList *modes;
GHashTable *mode_ids;
MetaMonitorMode *preferred_mode;
MetaMonitorMode *current_mode;
@ -76,6 +89,10 @@ struct _MetaMonitorTiled
uint32_t tile_group_id;
/* The tile (0, 0) output. */
MetaOutput *origin_output;
/* The output enabled even when a non-tiled mode is used. */
MetaOutput *main_output;
};
@ -142,7 +159,7 @@ meta_monitor_spec_free (MetaMonitorSpec *monitor_spec)
}
static void
meta_monitor_generate_id (MetaMonitor *monitor)
meta_monitor_generate_spec (MetaMonitor *monitor)
{
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
MetaOutput *output = meta_monitor_get_main_output (monitor);
@ -243,11 +260,10 @@ meta_monitor_get_current_resolution (MetaMonitor *monitor,
}
void
meta_monitor_derive_dimensions (MetaMonitor *monitor,
int *width,
int *height)
meta_monitor_derive_layout (MetaMonitor *monitor,
MetaRectangle *layout)
{
META_MONITOR_GET_CLASS (monitor)->derive_dimensions (monitor, width, height);
META_MONITOR_GET_CLASS (monitor)->derive_layout (monitor, layout);
}
void
@ -322,6 +338,7 @@ meta_monitor_finalize (GObject *object)
MetaMonitor *monitor = META_MONITOR (object);
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
g_hash_table_destroy (priv->mode_ids);
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);
@ -330,6 +347,9 @@ meta_monitor_finalize (GObject *object)
static void
meta_monitor_init (MetaMonitor *monitor)
{
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
priv->mode_ids = g_hash_table_new (g_str_hash, g_str_equal);
}
static void
@ -340,6 +360,39 @@ meta_monitor_class_init (MetaMonitorClass *klass)
object_class->finalize = meta_monitor_finalize;
}
static char *
generate_mode_id (MetaMonitorModeSpec *monitor_mode_spec)
{
gboolean is_interlaced;
char refresh_rate_str[G_ASCII_DTOSTR_BUF_SIZE];
is_interlaced = !!(monitor_mode_spec->flags & META_CRTC_MODE_FLAG_INTERLACE);
g_ascii_dtostr (refresh_rate_str, G_ASCII_DTOSTR_BUF_SIZE,
monitor_mode_spec->refresh_rate);
return g_strdup_printf ("%dx%d%s@%s",
monitor_mode_spec->width,
monitor_mode_spec->height,
is_interlaced ? "i" : "",
refresh_rate_str);
}
static gboolean
meta_monitor_add_mode (MetaMonitor *monitor,
MetaMonitorMode *monitor_mode)
{
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
if (g_hash_table_lookup (priv->mode_ids,
meta_monitor_mode_get_id (monitor_mode)))
return FALSE;
priv->modes = g_list_append (priv->modes, monitor_mode);
g_hash_table_insert (priv->mode_ids, monitor_mode->id, monitor_mode);
return TRUE;
}
static void
meta_monitor_normal_generate_modes (MetaMonitorNormal *monitor_normal)
{
@ -359,8 +412,10 @@ meta_monitor_normal_generate_modes (MetaMonitorNormal *monitor_normal)
mode->spec = (MetaMonitorModeSpec) {
.width = crtc_mode->width,
.height = crtc_mode->height,
.refresh_rate = crtc_mode->refresh_rate
.refresh_rate = crtc_mode->refresh_rate,
.flags = crtc_mode->flags & HANDLED_CRTC_MODE_FLAGS
},
mode->id = generate_mode_id (&mode->spec);
mode->crtc_modes = g_new (MetaMonitorCrtcMode, 1);
mode->crtc_modes[0] = (MetaMonitorCrtcMode) {
.output = output,
@ -372,12 +427,14 @@ meta_monitor_normal_generate_modes (MetaMonitorNormal *monitor_normal)
if (output->crtc && crtc_mode == output->crtc->current_mode)
monitor_priv->current_mode = mode;
monitor_priv->modes = g_list_append (monitor_priv->modes, mode);
if (!meta_monitor_add_mode (monitor, mode))
meta_monitor_mode_free (mode);
}
}
MetaMonitorNormal *
meta_monitor_normal_new (MetaOutput *output)
meta_monitor_normal_new (MetaMonitorManager *monitor_manager,
MetaOutput *output)
{
MetaMonitorNormal *monitor_normal;
MetaMonitor *monitor;
@ -387,11 +444,13 @@ meta_monitor_normal_new (MetaOutput *output)
monitor = META_MONITOR (monitor_normal);
monitor_priv = meta_monitor_get_instance_private (monitor);
monitor_priv->monitor_manager = monitor_manager;
monitor_priv->outputs = g_list_append (NULL, output);
monitor_priv->winsys_id = output->winsys_id;
meta_monitor_generate_spec (monitor);
meta_monitor_normal_generate_modes (monitor_normal);
meta_monitor_generate_id (monitor);
return monitor_normal;
}
@ -406,15 +465,35 @@ meta_monitor_normal_get_main_output (MetaMonitor *monitor)
}
static void
meta_monitor_normal_derive_dimensions (MetaMonitor *monitor,
int *width,
int *height)
meta_monitor_normal_derive_layout (MetaMonitor *monitor,
MetaRectangle *layout)
{
MetaOutput *output;
output = meta_monitor_get_main_output (monitor);
*width = output->crtc->rect.width;
*height = output->crtc->rect.height;
*layout = (MetaRectangle) {
.x = output->crtc->rect.x,
.y = output->crtc->rect.y,
.width = output->crtc->rect.width,
.height = output->crtc->rect.height
};
}
static gboolean
meta_monitor_normal_get_suggested_position (MetaMonitor *monitor,
int *x,
int *y)
{
MetaOutput *output;
output = meta_monitor_get_main_output (monitor);
if (output->suggested_x < 0 && output->suggested_y < 0)
return FALSE;
*x = output->suggested_x;
*y = output->suggested_y;
return TRUE;
}
static void
@ -440,8 +519,9 @@ 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->derive_dimensions = meta_monitor_normal_derive_dimensions;
monitor_class->derive_layout = meta_monitor_normal_derive_layout;
monitor_class->calculate_crtc_pos = meta_monitor_normal_calculate_crtc_pos;
monitor_class->get_suggested_position = meta_monitor_normal_get_suggested_position;
}
uint32_t
@ -455,16 +535,8 @@ 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;
return META_MONITOR_GET_CLASS (monitor)->get_suggested_position (monitor,
x, y);
}
static void
@ -483,7 +555,7 @@ add_tiled_monitor_outputs (MetaMonitorManager *monitor_manager,
continue;
g_warn_if_fail (output->subpixel_order ==
monitor_tiled->main_output->subpixel_order);
monitor_tiled->origin_output->subpixel_order);
monitor_priv->outputs = g_list_append (monitor_priv->outputs, output);
}
@ -603,41 +675,157 @@ is_monitor_mode_assigned (MetaMonitor *monitor,
return TRUE;
}
static gboolean
is_crtc_mode_tiled (MetaOutput *output,
MetaCrtcMode *crtc_mode)
{
return (crtc_mode->width == (int) output->tile_info.tile_w &&
crtc_mode->height == (int) output->tile_info.tile_h);
}
static MetaCrtcMode *
find_tiled_crtc_mode (MetaOutput *output,
MetaCrtcMode *reference_crtc_mode)
{
MetaCrtcMode *crtc_mode;
unsigned int i;
crtc_mode = output->preferred_mode;
if (is_crtc_mode_tiled (output, crtc_mode))
return crtc_mode;
for (i = 0; i < output->n_modes; i++)
{
crtc_mode = output->modes[i];
if (!is_crtc_mode_tiled (output, crtc_mode))
continue;
if (crtc_mode->refresh_rate != reference_crtc_mode->refresh_rate)
continue;
if (crtc_mode->flags != reference_crtc_mode->flags)
continue;
return crtc_mode;
}
return NULL;
}
static MetaMonitorMode *
create_tiled_monitor_mode (MetaMonitorTiled *monitor_tiled)
create_tiled_monitor_mode (MetaMonitorTiled *monitor_tiled,
MetaCrtcMode *reference_crtc_mode,
gboolean *out_is_preferred)
{
MetaMonitor *monitor = META_MONITOR (monitor_tiled);
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
MetaMonitorModeTiled *mode;
int width, height;
GList *l;
int i;
unsigned int i;
gboolean is_preferred = TRUE;
mode = g_new0 (MetaMonitorModeTiled, 1);
mode->is_tiled = TRUE;
meta_monitor_tiled_calculate_tiled_size (monitor,
&mode->parent.spec.width,
&mode->parent.spec.height);
meta_monitor_tiled_calculate_tiled_size (monitor, &width, &height);
mode->parent.spec = (MetaMonitorModeSpec) {
.width = width,
.height = height,
.refresh_rate = reference_crtc_mode->refresh_rate,
.flags = reference_crtc_mode->flags & HANDLED_CRTC_MODE_FLAGS
};
mode->parent.id = generate_mode_id (&mode->parent.spec);
mode->parent.crtc_modes = g_new0 (MetaMonitorCrtcMode,
g_list_length (monitor_priv->outputs));
for (l = monitor_priv->outputs, i = 0; l; l = l->next, i++)
{
MetaOutput *output = l->data;
MetaCrtcMode *preferred_crtc_mode = output->preferred_mode;
MetaCrtcMode *tiled_crtc_mode;
tiled_crtc_mode = find_tiled_crtc_mode (output, reference_crtc_mode);
if (!tiled_crtc_mode)
{
g_warning ("No tiled mode found on %s", output->name);
meta_monitor_mode_free ((MetaMonitorMode *) mode);
return NULL;
}
mode->parent.crtc_modes[i] = (MetaMonitorCrtcMode) {
.output = output,
.crtc_mode = preferred_crtc_mode
.crtc_mode = tiled_crtc_mode
};
g_warn_if_fail (mode->parent.spec.refresh_rate == 0.0f ||
(mode->parent.spec.refresh_rate ==
preferred_crtc_mode->refresh_rate));
mode->parent.spec.refresh_rate = preferred_crtc_mode->refresh_rate;
is_preferred = is_preferred && tiled_crtc_mode == output->preferred_mode;
}
return &mode->parent;
*out_is_preferred = is_preferred;
return (MetaMonitorMode *) mode;
}
static void
generate_tiled_monitor_modes (MetaMonitorTiled *monitor_tiled)
{
MetaMonitor *monitor = META_MONITOR (monitor_tiled);
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
MetaOutput *main_output;
GList *tiled_modes = NULL;
unsigned int i;
MetaMonitorMode *best_mode = NULL;
GList *l;
main_output = meta_monitor_get_main_output (META_MONITOR (monitor_tiled));
for (i = 0; i < main_output->n_modes; i++)
{
MetaCrtcMode *reference_crtc_mode = main_output->modes[i];
MetaMonitorMode *mode;
gboolean is_preferred;
if (!is_crtc_mode_tiled (main_output, reference_crtc_mode))
continue;
mode = create_tiled_monitor_mode (monitor_tiled, reference_crtc_mode,
&is_preferred);
if (!mode)
continue;
tiled_modes = g_list_append (tiled_modes, mode);
if (is_monitor_mode_assigned (monitor, mode))
monitor_priv->current_mode = mode;
if (is_preferred)
monitor_priv->preferred_mode = mode;
}
while ((l = tiled_modes))
{
MetaMonitorMode *mode = l->data;
tiled_modes = g_list_remove_link (tiled_modes, l);
if (!meta_monitor_add_mode (monitor, mode))
{
meta_monitor_mode_free (mode);
continue;
}
if (!monitor_priv->preferred_mode)
{
if (!best_mode ||
mode->spec.refresh_rate > best_mode->spec.refresh_rate)
best_mode = mode;
}
}
if (best_mode)
monitor_priv->preferred_mode = best_mode;
}
static MetaMonitorMode *
@ -652,12 +840,7 @@ create_untiled_monitor_mode (MetaMonitorTiled *monitor_tiled,
GList *l;
int i;
/*
* Assume modes with a resolution identical to the tile sizes are tiled
* modes.
*/
if (crtc_mode->width == (int) main_output->tile_info.tile_w &&
crtc_mode->height == (int) main_output->tile_info.tile_h)
if (is_crtc_mode_tiled (main_output, crtc_mode))
return NULL;
mode = g_new0 (MetaMonitorModeTiled, 1);
@ -666,10 +849,12 @@ create_untiled_monitor_mode (MetaMonitorTiled *monitor_tiled,
mode->parent.spec = (MetaMonitorModeSpec) {
.width = crtc_mode->width,
.height = crtc_mode->height,
.refresh_rate = crtc_mode->refresh_rate
.refresh_rate = crtc_mode->refresh_rate,
.flags = crtc_mode->flags & HANDLED_CRTC_MODE_FLAGS
};
mode->parent.id = generate_mode_id (&mode->parent.spec);
mode->parent.crtc_modes = g_new0 (MetaMonitorCrtcMode,
g_list_length (monitor_priv->outputs));
g_list_length (monitor_priv->outputs));
for (l = monitor_priv->outputs, i = 0; l; l = l->next, i++)
{
@ -694,42 +879,188 @@ create_untiled_monitor_mode (MetaMonitorTiled *monitor_tiled,
return &mode->parent;
}
static int
count_untiled_crtc_modes (MetaOutput *output)
{
int count;
unsigned int i;
count = 0;
for (i = 0; i < output->n_modes; i++)
{
MetaCrtcMode *crtc_mode = output->modes[i];
if (!is_crtc_mode_tiled (output, crtc_mode))
count++;
}
return count;
}
static MetaOutput *
find_untiled_output (MetaMonitorTiled *monitor_tiled)
{
MetaMonitor *monitor = META_MONITOR (monitor_tiled);
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
MetaOutput *best_output;
int best_untiled_crtc_mode_count;
GList *l;
best_output = monitor_tiled->origin_output;
best_untiled_crtc_mode_count =
count_untiled_crtc_modes (monitor_tiled->origin_output);
for (l = monitor_priv->outputs; l; l = l->next)
{
MetaOutput *output = l->data;
int untiled_crtc_mode_count;
if (output == monitor_tiled->origin_output)
continue;
untiled_crtc_mode_count = count_untiled_crtc_modes (output);
if (untiled_crtc_mode_count > best_untiled_crtc_mode_count)
{
best_untiled_crtc_mode_count = untiled_crtc_mode_count;
best_output = output;
}
}
return best_output;
}
static void
generate_untiled_monitor_modes (MetaMonitorTiled *monitor_tiled)
{
MetaMonitor *monitor = META_MONITOR (monitor_tiled);
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
MetaOutput *main_output;
unsigned int i;
main_output = meta_monitor_get_main_output (monitor);
for (i = 0; i < main_output->n_modes; i++)
{
MetaCrtcMode *crtc_mode = main_output->modes[i];
MetaMonitorMode *mode;
mode = create_untiled_monitor_mode (monitor_tiled,
main_output,
crtc_mode);
if (!mode)
continue;
if (!meta_monitor_add_mode (monitor, mode))
{
meta_monitor_mode_free (mode);
continue;
}
if (is_monitor_mode_assigned (monitor, mode))
{
g_assert (!monitor_priv->current_mode);
monitor_priv->current_mode = mode;
}
if (!monitor_priv->preferred_mode &&
crtc_mode == main_output->preferred_mode)
monitor_priv->preferred_mode = mode;
}
}
static MetaMonitorMode *
find_best_mode (MetaMonitor *monitor)
{
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
MetaMonitorMode *best_mode = NULL;
GList *l;
for (l = monitor_priv->modes; l; l = l->next)
{
MetaMonitorMode *mode = l->data;
int area, best_area;
if (!best_mode)
{
best_mode = mode;
continue;
}
area = mode->spec.width * mode->spec.height;
best_area = best_mode->spec.width * best_mode->spec.height;
if (area > best_area)
{
best_mode = mode;
continue;
}
if (mode->spec.refresh_rate > best_mode->spec.refresh_rate)
{
best_mode = mode;
continue;
}
}
return best_mode;
}
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;
MetaOutput *main_output;
unsigned int i;
mode = create_tiled_monitor_mode (monitor_tiled);
monitor_priv->modes = g_list_append (monitor_priv->modes, mode);
/*
* Tiled monitors may look a bit different from each other, depending on the
* monitor itself, the driver, etc.
*
* On some, the tiled modes will be the preferred CRTC modes, and running
* untiled is done by only enabling (0, 0) tile. In this case, things are
* pretty straight forward.
*
* Other times a monitor may have some bogus mode preferred on the main tile,
* and an untiled mode preferred on the non-main tile, and there seems to be
* no guarantee that the (0, 0) tile is the one that should drive the
* non-tiled mode.
*
* To handle both these cases, the following hueristics are implemented:
*
* 1) Find all the tiled CRTC modes of the (0, 0) tile, and create tiled
* monitor modes for all tiles based on these.
* 2) If there is any tiled monitor mode combination where all CRTC modes
* are the preferred ones, that one is marked as preferred.
* 3) If there is no preferred mode determined so far, assume the tiled
* monitor mode with the highest refresh rate is preferred.
* 4) Find the tile with highest number of untiled CRTC modes available,
* assume this is the one driving the monitor in untiled mode, and
* create monitor modes for all untiled CRTC modes of that tile. If
* there is still no preferred mode, set any untiled mode as preferred
* if the CRTC mode is marked as such.
* 5) If at this point there is still no preferred mode, just pick the one
* with the highest number of pixels and highest refresh rate.
*
* Note that this ignores the preference if the preference is a non-tiled
* mode. This seems to be the case on some systems, where the user tends to
* manually set up the tiled mode anyway.
*/
monitor_priv->preferred_mode = mode;
generate_tiled_monitor_modes (monitor_tiled);
if (is_monitor_mode_assigned (monitor, mode))
monitor_priv->current_mode = mode;
if (!monitor_priv->preferred_mode)
g_warning ("Tiled monitor on %s didn't have any tiled modes",
monitor_priv->spec->connector);
main_output = meta_monitor_get_main_output (monitor);
for (i = 0; i < main_output->n_modes; i++)
generate_untiled_monitor_modes (monitor_tiled);
if (!monitor_priv->preferred_mode)
{
MetaCrtcMode *crtc_mode = main_output->modes[i];
mode = create_untiled_monitor_mode (monitor_tiled,
main_output,
crtc_mode);
if (mode)
{
monitor_priv->modes = g_list_append (monitor_priv->modes, mode);
if (is_monitor_mode_assigned (monitor, mode))
{
g_assert (!monitor_priv->current_mode);
monitor_priv->current_mode = mode;
}
}
g_warning ("Tiled monitor on %s didn't have a valid preferred mode",
monitor_priv->spec->connector);
monitor_priv->preferred_mode = find_best_mode (monitor);
}
}
@ -745,17 +1076,22 @@ meta_monitor_tiled_new (MetaMonitorManager *monitor_manager,
monitor = META_MONITOR (monitor_tiled);
monitor_priv = meta_monitor_get_instance_private (monitor);
monitor_priv->monitor_manager = monitor_manager;
monitor_tiled->tile_group_id = output->tile_info.group_id;
monitor_priv->winsys_id = output->winsys_id;
monitor_tiled->main_output = output;
monitor_tiled->origin_output = output;
add_tiled_monitor_outputs (monitor_manager, monitor_tiled);
monitor_tiled->main_output = find_untiled_output (monitor_tiled);
meta_monitor_generate_spec (monitor);
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;
}
@ -769,9 +1105,8 @@ meta_monitor_tiled_get_main_output (MetaMonitor *monitor)
}
static void
meta_monitor_tiled_derive_dimensions (MetaMonitor *monitor,
int *out_width,
int *out_height)
meta_monitor_derived_derive_layout (MetaMonitor *monitor,
MetaRectangle *layout)
{
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
@ -795,8 +1130,20 @@ meta_monitor_tiled_derive_dimensions (MetaMonitor *monitor,
max_y = MAX (output->crtc->rect.y + output->crtc->rect.height, max_y);
}
*out_width = max_x - min_x;
*out_height = max_y - min_y;
*layout = (MetaRectangle) {
.x = min_x,
.y = min_y,
.width = max_x - min_x,
.height = max_y - min_y
};
}
static gboolean
meta_monitor_tiled_get_suggested_position (MetaMonitor *monitor,
int *x,
int *y)
{
return FALSE;
}
static void
@ -824,13 +1171,12 @@ meta_monitor_tiled_calculate_crtc_pos (MetaMonitor *monitor,
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);
MetaMonitor *monitor = META_MONITOR (object);
MetaMonitorPrivate *monitor_priv =
meta_monitor_get_instance_private (monitor);
meta_monitor_manager_tiled_monitor_removed (monitor_manager,
META_MONITOR (monitor_tiled));
meta_monitor_manager_tiled_monitor_removed (monitor_priv->monitor_manager,
monitor);
}
static void
@ -847,13 +1193,15 @@ meta_monitor_tiled_class_init (MetaMonitorTiledClass *klass)
object_class->finalize = meta_monitor_tiled_finalize;
monitor_class->get_main_output = meta_monitor_tiled_get_main_output;
monitor_class->derive_dimensions = meta_monitor_tiled_derive_dimensions;
monitor_class->derive_layout = meta_monitor_derived_derive_layout;
monitor_class->calculate_crtc_pos = meta_monitor_tiled_calculate_crtc_pos;
monitor_class->get_suggested_position = meta_monitor_tiled_get_suggested_position;
}
static void
meta_monitor_mode_free (MetaMonitorMode *monitor_mode)
{
g_free (monitor_mode->id);
g_free (monitor_mode->crtc_modes);
g_free (monitor_mode);
}
@ -877,6 +1225,15 @@ meta_monitor_get_logical_monitor (MetaMonitor *monitor)
return NULL;
}
MetaMonitorMode *
meta_monitor_get_mode_from_id (MetaMonitor *monitor,
const char *monitor_mode_id)
{
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
return g_hash_table_lookup (priv->mode_ids, monitor_mode_id);
}
static gboolean
meta_monitor_mode_spec_equals (MetaMonitorModeSpec *monitor_mode_spec,
MetaMonitorModeSpec *other_monitor_mode_spec)
@ -884,7 +1241,8 @@ meta_monitor_mode_spec_equals (MetaMonitorModeSpec *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));
other_monitor_mode_spec->refresh_rate) &&
monitor_mode_spec->flags == other_monitor_mode_spec->flags);
}
MetaMonitorMode *
@ -976,12 +1334,221 @@ meta_monitor_calculate_crtc_pos (MetaMonitor *monitor,
out_y);
}
/* The minimum resolution at which we turn on a window-scale of 2 */
#define HIDPI_LIMIT 192
/*
* The minimum screen height at which we turn on a window-scale of 2;
* below this there just isn't enough vertical real estate for GNOME
* apps to work, and it's better to just be tiny
*/
#define HIDPI_MIN_HEIGHT 1200
/* From http://en.wikipedia.org/wiki/4K_resolution#Resolutions_of_common_formats */
#define SMALLEST_4K_WIDTH 3656
static float
calculate_scale (MetaMonitor *monitor,
MetaMonitorMode *monitor_mode)
{
int resolution_width, resolution_height;
int width_mm, height_mm;
int scale;
scale = 1.0;
meta_monitor_mode_get_resolution (monitor_mode,
&resolution_width,
&resolution_height);
if (resolution_height < HIDPI_MIN_HEIGHT)
goto out;
/* 4K TV */
switch (meta_monitor_get_connector_type (monitor))
{
case META_CONNECTOR_TYPE_HDMIA:
case META_CONNECTOR_TYPE_HDMIB:
if (resolution_width < SMALLEST_4K_WIDTH)
goto out;
break;
default:
break;
}
meta_monitor_get_physical_dimensions (monitor, &width_mm, &height_mm);
/*
* Somebody encoded the aspect ratio (16/9 or 16/10) instead of the physical
* size.
*/
if ((width_mm == 160 && height_mm == 90) ||
(width_mm == 160 && height_mm == 100) ||
(width_mm == 16 && height_mm == 9) ||
(width_mm == 16 && height_mm == 10))
goto out;
if (width_mm > 0 && height_mm > 0)
{
double dpi_x, dpi_y;
dpi_x = (double) resolution_width / (width_mm / 25.4);
dpi_y = (double) resolution_height / (height_mm / 25.4);
/*
* We don't completely trust these values so both must be high, and never
* pick higher ratio than 2 automatically.
*/
if (dpi_x > HIDPI_LIMIT && dpi_y > HIDPI_LIMIT)
scale = 2.0;
}
out:
return scale;
}
float
meta_monitor_calculate_mode_scale (MetaMonitor *monitor,
MetaMonitorMode *monitor_mode)
{
MetaBackend *backend = meta_get_backend ();
MetaSettings *settings = meta_backend_get_settings (backend);
int global_scaling_factor;
if (meta_settings_get_global_scaling_factor (settings,
&global_scaling_factor))
return global_scaling_factor;
return calculate_scale (monitor, monitor_mode);
}
static float
get_closest_scale_factor_for_resolution (float width,
float height,
float scale,
float scale_step)
{
unsigned int i, j;
float scaled_h;
float scaled_w;
float best_scale;
int base_scaled_w;
gboolean limit_exceeded;
gboolean found_one;
best_scale = 0;
scaled_w = width / scale;
scaled_h = height / scale;
if (scale < MINIMUM_SCALE_FACTOR ||
scale > MAXIMUM_SCALE_FACTOR ||
floorf (scaled_w) < MINIMUM_LOGICAL_WIDTH ||
floorf (scaled_h) < MINIMUM_LOGICAL_HEIGHT)
goto out;
if (floorf (scaled_w) == scaled_w && floorf (scaled_h) == scaled_h)
return scale;
i = 0;
found_one = FALSE;
limit_exceeded = FALSE;
base_scaled_w = floorf (scaled_w);
do
{
for (j = 0; j < 2; j++)
{
float current_scale;
int offset = i * (j ? 1 : -1);
scaled_w = base_scaled_w + offset;
current_scale = width / scaled_w;
scaled_h = height / current_scale;
if (current_scale >= scale + scale_step ||
current_scale <= scale - scale_step ||
current_scale < MINIMUM_SCALE_FACTOR ||
current_scale > MAXIMUM_SCALE_FACTOR)
{
limit_exceeded = TRUE;
continue;
}
if (floorf (scaled_h) == scaled_h)
{
found_one = TRUE;
if (fabsf (current_scale - scale) < fabsf (best_scale - scale))
best_scale = current_scale;
}
}
i++;
}
while (!found_one && !limit_exceeded);
out:
return best_scale;
}
float *
meta_monitor_calculate_supported_scales (MetaMonitor *monitor,
MetaMonitorMode *monitor_mode,
MetaMonitorScalesConstraint constraints,
int *n_supported_scales)
{
unsigned int i, j;
int width, height;
float scale_steps;
GArray *supported_scales;
scale_steps = 1.0 / (float) SCALE_FACTORS_PER_INTEGER;
supported_scales = g_array_new (FALSE, FALSE, sizeof (float));
meta_monitor_mode_get_resolution (monitor_mode, &width, &height);
for (i = floorf (MINIMUM_SCALE_FACTOR);
i <= ceilf (MAXIMUM_SCALE_FACTOR);
i++)
{
for (j = 0; j < SCALE_FACTORS_PER_INTEGER; j++)
{
float scale;
float scale_value = i + j * scale_steps;
if ((constraints & META_MONITOR_SCALES_CONSTRAINT_NO_FRAC) &&
fmodf (scale_value, 1.0) != 0.0)
{
continue;
}
scale = get_closest_scale_factor_for_resolution (width,
height,
scale_value,
scale_steps);
if (scale > 0.0f)
g_array_append_val (supported_scales, scale);
}
}
*n_supported_scales = supported_scales->len;
return (float *) g_array_free (supported_scales, FALSE);
}
MetaMonitorModeSpec *
meta_monitor_mode_get_spec (MetaMonitorMode *monitor_mode)
{
return &monitor_mode->spec;
}
const char *
meta_monitor_mode_get_id (MetaMonitorMode *monitor_mode)
{
return monitor_mode->id;
}
void
meta_monitor_mode_get_resolution (MetaMonitorMode *monitor_mode,
int *width,
@ -997,6 +1564,12 @@ meta_monitor_mode_get_refresh_rate (MetaMonitorMode *monitor_mode)
return monitor_mode->spec.refresh_rate;
}
MetaCrtcModeFlag
meta_monitor_mode_get_flags (MetaMonitorMode *monitor_mode)
{
return monitor_mode->spec.flags;
}
gboolean
meta_monitor_mode_foreach_crtc (MetaMonitor *monitor,
MetaMonitorMode *mode,

View File

@ -39,6 +39,7 @@ typedef struct _MetaMonitorModeSpec
int width;
int height;
float refresh_rate;
MetaCrtcModeFlag flags;
} MetaMonitorModeSpec;
typedef struct _MetaMonitorCrtcMode
@ -53,6 +54,12 @@ typedef gboolean (* MetaMonitorModeFunc) (MetaMonitor *monitor,
gpointer user_data,
GError **error);
typedef enum _MetaMonitorScalesConstraint
{
META_MONITOR_SCALES_CONSTRAINT_NONE = 0,
META_MONITOR_SCALES_CONSTRAINT_NO_FRAC = (1 << 0),
} MetaMonitorScalesConstraint;
#define META_TYPE_MONITOR (meta_monitor_get_type ())
G_DECLARE_DERIVABLE_TYPE (MetaMonitor, meta_monitor, META, MONITOR, GObject)
@ -61,15 +68,17 @@ struct _MetaMonitorClass
GObjectClass parent_class;
MetaOutput * (* get_main_output) (MetaMonitor *monitor);
void (* derive_dimensions) (MetaMonitor *monitor,
int *width,
int *height);
void (* derive_layout) (MetaMonitor *monitor,
MetaRectangle *layout);
void (* calculate_crtc_pos) (MetaMonitor *monitor,
MetaMonitorMode *monitor_mode,
MetaOutput *output,
MetaMonitorTransform crtc_transform,
int *out_x,
int *out_y);
gboolean (* get_suggested_position) (MetaMonitor *monitor,
int *width,
int *height);
};
#define META_TYPE_MONITOR_NORMAL (meta_monitor_normal_get_type ())
@ -85,7 +94,8 @@ G_DECLARE_FINAL_TYPE (MetaMonitorTiled, meta_monitor_tiled,
MetaMonitorTiled * meta_monitor_tiled_new (MetaMonitorManager *monitor_manager,
MetaOutput *main_output);
MetaMonitorNormal * meta_monitor_normal_new (MetaOutput *output);
MetaMonitorNormal * meta_monitor_normal_new (MetaMonitorManager *monitor_manager,
MetaOutput *output);
MetaMonitorSpec * meta_monitor_get_spec (MetaMonitor *monitor);
@ -107,9 +117,8 @@ void meta_monitor_get_current_resolution (MetaMonitor *monitor,
int *width,
int *height);
void meta_monitor_derive_dimensions (MetaMonitor *monitor,
int *width,
int *height);
void meta_monitor_derive_layout (MetaMonitor *monitor,
MetaRectangle *layout);
void meta_monitor_get_physical_dimensions (MetaMonitor *monitor,
int *width_mm,
@ -135,6 +144,9 @@ gboolean meta_monitor_get_suggested_position (MetaMonitor *monitor,
MetaLogicalMonitor * meta_monitor_get_logical_monitor (MetaMonitor *monitor);
MetaMonitorMode * meta_monitor_get_mode_from_id (MetaMonitor *monitor,
const char *monitor_mode_id);
MetaMonitorMode * meta_monitor_get_mode_from_spec (MetaMonitor *monitor,
MetaMonitorModeSpec *monitor_mode_spec);
@ -156,6 +168,16 @@ void meta_monitor_calculate_crtc_pos (MetaMonitor *monitor,
int *out_x,
int *out_y);
float meta_monitor_calculate_mode_scale (MetaMonitor *monitor,
MetaMonitorMode *monitor_mode);
float * meta_monitor_calculate_supported_scales (MetaMonitor *monitor,
MetaMonitorMode *monitor_mode,
MetaMonitorScalesConstraint constraints,
int *n_supported_scales);
const char * meta_monitor_mode_get_id (MetaMonitorMode *monitor_mode);
MetaMonitorModeSpec * meta_monitor_mode_get_spec (MetaMonitorMode *monitor_mode);
void meta_monitor_mode_get_resolution (MetaMonitorMode *monitor_mode,
@ -164,6 +186,8 @@ void meta_monitor_mode_get_resolution (MetaMonitorMode *monitor_mode,
float meta_monitor_mode_get_refresh_rate (MetaMonitorMode *monitor_mode);
MetaCrtcModeFlag meta_monitor_mode_get_flags (MetaMonitorMode *monitor_mode);
gboolean meta_monitor_mode_foreach_crtc (MetaMonitor *monitor,
MetaMonitorMode *mode,
MetaMonitorModeFunc func,

View File

@ -0,0 +1,280 @@
/* -*- 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 <gio/gio.h>
#include "backends/meta-orientation-manager.h"
enum
{
ORIENTATION_CHANGED,
N_SIGNALS
};
static guint signals[N_SIGNALS];
struct _MetaOrientationManager
{
GObject parent_instance;
GCancellable *cancellable;
guint iio_watch_id;
GDBusProxy *iio_proxy;
MetaOrientation prev_orientation;
MetaOrientation curr_orientation;
GSettings *settings;
};
G_DEFINE_TYPE (MetaOrientationManager, meta_orientation_manager, G_TYPE_OBJECT)
#define CONF_SCHEMA "org.gnome.settings-daemon.peripherals.touchscreen"
#define ORIENTATION_LOCK_KEY "orientation-lock"
static MetaOrientation
orientation_from_string (const char *orientation)
{
if (g_strcmp0 (orientation, "normal") == 0)
return META_ORIENTATION_NORMAL;
if (g_strcmp0 (orientation, "bottom-up") == 0)
return META_ORIENTATION_BOTTOM_UP;
if (g_strcmp0 (orientation, "left-up") == 0)
return META_ORIENTATION_LEFT_UP;
if (g_strcmp0 (orientation, "right-up") == 0)
return META_ORIENTATION_RIGHT_UP;
return META_ORIENTATION_UNDEFINED;
}
static void
read_iio_proxy (MetaOrientationManager *self)
{
gboolean has_accel = FALSE;
GVariant *v;
self->curr_orientation = META_ORIENTATION_UNDEFINED;
if (!self->iio_proxy)
return;
v = g_dbus_proxy_get_cached_property (self->iio_proxy, "HasAccelerometer");
if (v)
{
has_accel = g_variant_get_boolean (v);
g_variant_unref (v);
}
if (has_accel)
{
v = g_dbus_proxy_get_cached_property (self->iio_proxy, "AccelerometerOrientation");
if (v)
{
self->curr_orientation = orientation_from_string (g_variant_get_string (v, NULL));
g_variant_unref (v);
}
}
}
static void
sync_state (MetaOrientationManager *self)
{
read_iio_proxy (self);
if (self->prev_orientation == self->curr_orientation)
return;
self->prev_orientation = self->curr_orientation;
if (self->curr_orientation == META_ORIENTATION_UNDEFINED)
return;
if (g_settings_get_boolean (self->settings, ORIENTATION_LOCK_KEY))
return;
g_signal_emit (self, signals[ORIENTATION_CHANGED], 0);
}
static void
orientation_lock_changed (GSettings *settings,
gchar *key,
gpointer user_data)
{
MetaOrientationManager *self = user_data;
sync_state (self);
}
static void
iio_properties_changed (GDBusProxy *proxy,
GVariant *changed_properties,
GStrv invalidated_properties,
gpointer user_data)
{
MetaOrientationManager *self = user_data;
sync_state (self);
}
static void
accelerometer_claimed (GObject *source,
GAsyncResult *res,
gpointer user_data)
{
MetaOrientationManager *self = user_data;
GVariant *v;
GError *error = NULL;
v = g_dbus_proxy_call_finish (G_DBUS_PROXY (source), res, &error);
if (!v)
{
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
g_warning ("Failed to claim accelerometer: %s", error->message);
g_error_free (error);
return;
}
g_variant_unref (v);
sync_state (self);
}
static void
iio_proxy_ready (GObject *source,
GAsyncResult *res,
gpointer user_data)
{
MetaOrientationManager *self = user_data;
GDBusProxy *proxy;
GError *error = NULL;
proxy = g_dbus_proxy_new_finish (res, &error);
if (!proxy)
{
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
g_warning ("Failed to obtain IIO DBus proxy: %s", error->message);
g_error_free (error);
return;
}
self->iio_proxy = proxy;
g_signal_connect_object (self->iio_proxy, "g-properties-changed",
G_CALLBACK (iio_properties_changed), self, 0);
g_dbus_proxy_call (self->iio_proxy,
"ClaimAccelerometer",
NULL,
G_DBUS_CALL_FLAGS_NONE,
-1,
self->cancellable,
accelerometer_claimed,
self);
}
static void
iio_sensor_appeared_cb (GDBusConnection *connection,
const gchar *name,
const gchar *name_owner,
gpointer user_data)
{
MetaOrientationManager *self = user_data;
self->cancellable = g_cancellable_new ();
g_dbus_proxy_new (connection,
G_DBUS_PROXY_FLAGS_NONE,
NULL,
"net.hadess.SensorProxy",
"/net/hadess/SensorProxy",
"net.hadess.SensorProxy",
self->cancellable,
iio_proxy_ready,
self);
}
static void
iio_sensor_vanished_cb (GDBusConnection *connection,
const gchar *name,
gpointer user_data)
{
MetaOrientationManager *self = user_data;
g_cancellable_cancel (self->cancellable);
g_clear_object (&self->cancellable);
g_clear_object (&self->iio_proxy);
sync_state (self);
}
static void
meta_orientation_manager_init (MetaOrientationManager *self)
{
self->iio_watch_id = g_bus_watch_name (G_BUS_TYPE_SYSTEM,
"net.hadess.SensorProxy",
G_BUS_NAME_WATCHER_FLAGS_NONE,
iio_sensor_appeared_cb,
iio_sensor_vanished_cb,
self,
NULL);
self->settings = g_settings_new (CONF_SCHEMA);
g_signal_connect_object (self->settings, "changed::"ORIENTATION_LOCK_KEY,
G_CALLBACK (orientation_lock_changed), self, 0);
sync_state (self);
}
static void
meta_orientation_manager_finalize (GObject *object)
{
MetaOrientationManager *self = META_ORIENTATION_MANAGER (object);
g_cancellable_cancel (self->cancellable);
g_clear_object (&self->cancellable);
g_bus_unwatch_name (self->iio_watch_id);
g_clear_object (&self->iio_proxy);
g_clear_object (&self->settings);
G_OBJECT_CLASS (meta_orientation_manager_parent_class)->finalize (object);
}
static void
meta_orientation_manager_class_init (MetaOrientationManagerClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
gobject_class->finalize = meta_orientation_manager_finalize;
signals[ORIENTATION_CHANGED] =
g_signal_new ("orientation-changed",
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
}
MetaOrientation
meta_orientation_manager_get_orientation (MetaOrientationManager *self)
{
return self->curr_orientation;
}

View File

@ -0,0 +1,40 @@
/* -*- 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_ORIENTATION_MANAGER_H
#define META_ORIENTATION_MANAGER_H
typedef enum
{
META_ORIENTATION_UNDEFINED,
META_ORIENTATION_NORMAL,
META_ORIENTATION_BOTTOM_UP,
META_ORIENTATION_LEFT_UP,
META_ORIENTATION_RIGHT_UP
} MetaOrientation;
#define META_TYPE_ORIENTATION_MANAGER (meta_orientation_manager_get_type ())
G_DECLARE_FINAL_TYPE (MetaOrientationManager, meta_orientation_manager,
META, ORIENTATION_MANAGER, GObject)
MetaOrientation meta_orientation_manager_get_orientation (MetaOrientationManager *self);
#endif /* META_ORIENTATION_MANAGER_H */

View File

@ -0,0 +1,59 @@
/* -*- 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_SETTINGS_PRIVATE_H
#define META_SETTINGS_PRIVATE_H
#include <glib-object.h>
#include "meta/meta-settings.h"
#include "meta/types.h"
typedef enum _MetaExperimentalFeature
{
META_EXPERIMENTAL_FEATURE_NONE = 0,
META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER = (1 << 0),
} MetaExperimentalFeature;
#define META_TYPE_SETTINGS (meta_settings_get_type ())
G_DECLARE_FINAL_TYPE (MetaSettings, meta_settings,
META, SETTINGS, GObject)
MetaSettings * meta_settings_new (MetaBackend *backend);
void meta_settings_post_init (MetaSettings *settings);
void meta_settings_update_ui_scaling_factor (MetaSettings *settings);
gboolean meta_settings_get_global_scaling_factor (MetaSettings *settings,
int *scaing_factor);
gboolean meta_settings_is_experimental_feature_enabled (MetaSettings *settings,
MetaExperimentalFeature feature);
MetaExperimentalFeature meta_settings_get_experimental_features (MetaSettings *settings);
void meta_settings_override_experimental_features (MetaSettings *settings);
void meta_settings_enable_experimental_feature (MetaSettings *settings,
MetaExperimentalFeature feature);
#endif /* META_SETTINGS_PRIVATE_H */

View File

@ -0,0 +1,396 @@
/* -*- 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-settings-private.h"
#include <gio/gio.h>
#include "backends/meta-backend-private.h"
#include "backends/meta-logical-monitor.h"
#include "backends/meta-monitor-manager-private.h"
#include "ui/theme-private.h"
enum
{
UI_SCALING_FACTOR_CHANGED,
GLOBAL_SCALING_FACTOR_CHANGED,
FONT_DPI_CHANGED,
EXPERIMENTAL_FEATURES_CHANGED,
N_SIGNALS
};
static guint signals[N_SIGNALS];
struct _MetaSettings
{
GObject parent;
MetaBackend *backend;
GSettings *interface_settings;
GSettings *mutter_settings;
int ui_scaling_factor;
int global_scaling_factor;
int font_dpi;
MetaExperimentalFeature experimental_features;
gboolean experimental_features_overridden;
};
G_DEFINE_TYPE (MetaSettings, meta_settings, G_TYPE_OBJECT)
static int
calculate_ui_scaling_factor (MetaSettings *settings)
{
MetaMonitorManager *monitor_manager =
meta_backend_get_monitor_manager (settings->backend);
GList *logical_monitors;
GList *l;
float max_scale = 1.0;
logical_monitors =
meta_monitor_manager_get_logical_monitors (monitor_manager);
for (l = logical_monitors; l; l = l->next)
{
MetaLogicalMonitor *logical_monitor = l->data;
max_scale = MAX (meta_logical_monitor_get_scale (logical_monitor),
max_scale);
}
g_warn_if_fail (fmodf (max_scale, 1.0) == 0.0);
return (int) max_scale;
}
static gboolean
update_ui_scaling_factor (MetaSettings *settings)
{
int ui_scaling_factor;
if (meta_is_stage_views_scaled ())
ui_scaling_factor = 1;
else
ui_scaling_factor = calculate_ui_scaling_factor (settings);
if (settings->ui_scaling_factor != ui_scaling_factor)
{
settings->ui_scaling_factor = ui_scaling_factor;
return TRUE;
}
else
{
return FALSE;
}
}
void
meta_settings_update_ui_scaling_factor (MetaSettings *settings)
{
if (update_ui_scaling_factor (settings))
g_signal_emit (settings, signals[UI_SCALING_FACTOR_CHANGED], 0);
}
int
meta_settings_get_ui_scaling_factor (MetaSettings *settings)
{
g_assert (settings->ui_scaling_factor != 0);
return settings->ui_scaling_factor;
}
static gboolean
update_global_scaling_factor (MetaSettings *settings)
{
int global_scaling_factor;
global_scaling_factor =
(int) g_settings_get_uint (settings->interface_settings,
"scaling-factor");
if (settings->global_scaling_factor != global_scaling_factor)
{
settings->global_scaling_factor = global_scaling_factor;
return TRUE;
}
else
{
return FALSE;
}
}
gboolean
meta_settings_get_global_scaling_factor (MetaSettings *settings,
int *out_scaling_factor)
{
if (settings->global_scaling_factor == 0)
return FALSE;
*out_scaling_factor = settings->global_scaling_factor;
return TRUE;
}
static gboolean
update_font_dpi (MetaSettings *settings)
{
double text_scaling_factor;
/* Number of logical pixels on an inch when unscaled */
const double dots_per_inch = 96;
/* Being based on Xft, API users expect the DPI to be 1/1024th of an inch. */
const double xft_factor = 1024;
int font_dpi;
text_scaling_factor = g_settings_get_double (settings->interface_settings,
"text-scaling-factor");
font_dpi = (int) (text_scaling_factor *
dots_per_inch *
xft_factor *
settings->ui_scaling_factor);
if (font_dpi != settings->font_dpi)
{
settings->font_dpi = font_dpi;
g_object_set (clutter_settings_get_default (),
"font-dpi", font_dpi,
NULL);
return TRUE;
}
else
{
return FALSE;
}
}
static void
meta_settings_update_font_dpi (MetaSettings *settings)
{
if (update_font_dpi (settings))
g_signal_emit (settings, signals[FONT_DPI_CHANGED], 0);
}
int
meta_settings_get_font_dpi (MetaSettings *settings)
{
g_assert (settings->font_dpi != 0);
return settings->font_dpi;
}
static void
interface_settings_changed (GSettings *interface_settings,
const char *key,
MetaSettings *settings)
{
if (g_str_equal (key, "scaling-factor"))
{
if (update_global_scaling_factor (settings))
g_signal_emit (settings, signals[GLOBAL_SCALING_FACTOR_CHANGED], 0);
}
else if (g_str_equal (key, "text-scaling-factor"))
{
meta_settings_update_font_dpi (settings);
}
}
gboolean
meta_settings_is_experimental_feature_enabled (MetaSettings *settings,
MetaExperimentalFeature feature)
{
return !!(settings->experimental_features & feature);
}
void
meta_settings_override_experimental_features (MetaSettings *settings)
{
settings->experimental_features = META_EXPERIMENTAL_FEATURE_NONE;
settings->experimental_features_overridden = TRUE;
}
void
meta_settings_enable_experimental_feature (MetaSettings *settings,
MetaExperimentalFeature feature)
{
g_assert (settings->experimental_features_overridden);
settings->experimental_features |= feature;
}
static gboolean
experimental_features_handler (GVariant *features_variant,
gpointer *result,
gpointer data)
{
MetaSettings *settings = data;
GVariantIter features_iter;
char *feature;
MetaExperimentalFeature features = META_EXPERIMENTAL_FEATURE_NONE;
if (settings->experimental_features_overridden)
{
*result = GINT_TO_POINTER (FALSE);
return TRUE;
}
g_variant_iter_init (&features_iter, features_variant);
while (g_variant_iter_loop (&features_iter, "s", &feature))
{
/* So far no experimental features defined. */
if (g_str_equal (feature, "scale-monitor-framebuffer"))
features |= META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER;
else
g_info ("Unknown experimental feature '%s'\n", feature);
}
if (features != settings->experimental_features)
{
settings->experimental_features = features;
*result = GINT_TO_POINTER (TRUE);
}
else
{
*result = GINT_TO_POINTER (FALSE);
}
return TRUE;
}
static gboolean
update_experimental_features (MetaSettings *settings)
{
return GPOINTER_TO_INT (g_settings_get_mapped (settings->mutter_settings,
"experimental-features",
experimental_features_handler,
settings));
}
static void
mutter_settings_changed (GSettings *mutter_settings,
gchar *key,
MetaSettings *settings)
{
MetaExperimentalFeature old_experimental_features;
if (!g_str_equal (key, "experimental-features"))
return;
old_experimental_features = settings->experimental_features;
if (update_experimental_features (settings))
g_signal_emit (settings, signals[EXPERIMENTAL_FEATURES_CHANGED], 0,
(unsigned int) old_experimental_features);
}
MetaSettings *
meta_settings_new (MetaBackend *backend)
{
MetaSettings *settings;
settings = g_object_new (META_TYPE_SETTINGS, NULL);
settings->backend = backend;
return settings;
}
static void
meta_settings_dispose (GObject *object)
{
MetaSettings *settings = META_SETTINGS (object);
g_clear_object (&settings->mutter_settings);
g_clear_object (&settings->interface_settings);
G_OBJECT_CLASS (meta_settings_parent_class)->dispose (object);
}
static void
meta_settings_init (MetaSettings *settings)
{
settings->interface_settings = g_settings_new ("org.gnome.desktop.interface");
g_signal_connect (settings->interface_settings, "changed",
G_CALLBACK (interface_settings_changed),
settings);
settings->mutter_settings = g_settings_new ("org.gnome.mutter");
g_signal_connect (settings->mutter_settings, "changed",
G_CALLBACK (mutter_settings_changed),
settings);
/* Chain up inter-dependent settings. */
g_signal_connect (settings, "global-scaling-factor-changed",
G_CALLBACK (meta_settings_update_ui_scaling_factor), NULL);
g_signal_connect (settings, "ui-scaling-factor-changed",
G_CALLBACK (meta_settings_update_font_dpi), NULL);
update_global_scaling_factor (settings);
update_experimental_features (settings);
}
void
meta_settings_post_init (MetaSettings *settings)
{
update_ui_scaling_factor (settings);
update_font_dpi (settings);
}
static void
meta_settings_class_init (MetaSettingsClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->dispose = meta_settings_dispose;
signals[UI_SCALING_FACTOR_CHANGED] =
g_signal_new ("ui-scaling-factor-changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
signals[GLOBAL_SCALING_FACTOR_CHANGED] =
g_signal_new ("global-scaling-factor-changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
signals[FONT_DPI_CHANGED] =
g_signal_new ("font-dpi-changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
signals[EXPERIMENTAL_FEATURES_CHANGED] =
g_signal_new ("experimental-features-changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_UINT);
}

View File

@ -36,8 +36,8 @@ struct _MetaOverlay {
CoglPipeline *pipeline;
CoglTexture *texture;
MetaRectangle current_rect;
MetaRectangle previous_rect;
ClutterRect current_rect;
ClutterRect previous_rect;
gboolean previous_is_valid;
};
@ -71,9 +71,9 @@ meta_overlay_free (MetaOverlay *overlay)
}
static void
meta_overlay_set (MetaOverlay *overlay,
CoglTexture *texture,
MetaRectangle *rect)
meta_overlay_set (MetaOverlay *overlay,
CoglTexture *texture,
ClutterRect *rect)
{
if (overlay->texture != texture)
{
@ -104,12 +104,12 @@ meta_overlay_paint (MetaOverlay *overlay)
cogl_framebuffer_draw_rectangle (cogl_get_draw_framebuffer (),
overlay->pipeline,
overlay->current_rect.x,
overlay->current_rect.y,
overlay->current_rect.x +
overlay->current_rect.width,
overlay->current_rect.y +
overlay->current_rect.height);
overlay->current_rect.origin.x,
overlay->current_rect.origin.y,
(overlay->current_rect.origin.x +
overlay->current_rect.size.width),
(overlay->current_rect.origin.y +
overlay->current_rect.size.height));
overlay->previous_rect = overlay->current_rect;
overlay->previous_is_valid = TRUE;
@ -204,10 +204,10 @@ queue_redraw_for_overlay (MetaStage *stage,
/* Clear the location the overlay was at before, if we need to. */
if (overlay->previous_is_valid)
{
clip.x = overlay->previous_rect.x;
clip.y = overlay->previous_rect.y;
clip.width = overlay->previous_rect.width;
clip.height = overlay->previous_rect.height;
clip.x = floorf (overlay->previous_rect.origin.x),
clip.y = floorf (overlay->previous_rect.origin.y),
clip.width = ceilf (overlay->previous_rect.size.width),
clip.height = ceilf (overlay->previous_rect.size.height),
clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stage), &clip);
overlay->previous_is_valid = FALSE;
}
@ -215,10 +215,10 @@ queue_redraw_for_overlay (MetaStage *stage,
/* Draw the overlay at the new position */
if (overlay->enabled)
{
clip.x = overlay->current_rect.x;
clip.y = overlay->current_rect.y;
clip.width = overlay->current_rect.width;
clip.height = overlay->current_rect.height;
clip.x = floorf (overlay->current_rect.origin.x),
clip.y = floorf (overlay->current_rect.origin.y),
clip.width = ceilf (overlay->current_rect.size.width),
clip.height = ceilf (overlay->current_rect.size.height),
clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stage), &clip);
}
}
@ -251,10 +251,10 @@ meta_stage_remove_cursor_overlay (MetaStage *stage,
}
void
meta_stage_update_cursor_overlay (MetaStage *stage,
MetaOverlay *overlay,
CoglTexture *texture,
MetaRectangle *rect)
meta_stage_update_cursor_overlay (MetaStage *stage,
MetaOverlay *overlay,
CoglTexture *texture,
ClutterRect *rect)
{
g_assert (meta_is_wayland_compositor () || texture == NULL);

View File

@ -56,10 +56,10 @@ MetaOverlay *meta_stage_create_cursor_overlay (MetaStage *stage);
void meta_stage_remove_cursor_overlay (MetaStage *stage,
MetaOverlay *overlay);
void meta_stage_update_cursor_overlay (MetaStage *stage,
MetaOverlay *overlay,
CoglTexture *texture,
MetaRectangle *rect);
void meta_stage_update_cursor_overlay (MetaStage *stage,
MetaOverlay *overlay,
CoglTexture *texture,
ClutterRect *rect);
void meta_stage_set_active (MetaStage *stage,
gboolean is_active);

View File

@ -45,6 +45,7 @@
#include "backends/meta-pointer-constraint.h"
#include "backends/meta-stage.h"
#include "backends/native/meta-clutter-backend-native.h"
#include "backends/native/meta-input-settings-native.h"
#include "backends/native/meta-renderer-native.h"
#include "backends/native/meta-stage-native.h"
@ -267,7 +268,7 @@ relative_motion_across_outputs (MetaMonitorManager *monitor_manager,
MetaLogicalMonitor *cur = current;
float x = cur_x, y = cur_y;
float dx = *dx_inout, dy = *dy_inout;
MetaScreenDirection direction = -1;
MetaDisplayDirection direction = -1;
while (cur)
{
@ -295,18 +296,18 @@ relative_motion_across_outputs (MetaMonitorManager *monitor_manager,
{ cur->rect.x + cur->rect.width, cur->rect.y + cur->rect.height }
};
if (direction != META_SCREEN_RIGHT &&
if (direction != META_DISPLAY_RIGHT &&
meta_line2_intersects_with (&motion, &left, &intersection))
direction = META_SCREEN_LEFT;
else if (direction != META_SCREEN_LEFT &&
direction = META_DISPLAY_LEFT;
else if (direction != META_DISPLAY_LEFT &&
meta_line2_intersects_with (&motion, &right, &intersection))
direction = META_SCREEN_RIGHT;
else if (direction != META_SCREEN_DOWN &&
direction = META_DISPLAY_RIGHT;
else if (direction != META_DISPLAY_DOWN &&
meta_line2_intersects_with (&motion, &top, &intersection))
direction = META_SCREEN_UP;
else if (direction != META_SCREEN_UP &&
direction = META_DISPLAY_UP;
else if (direction != META_DISPLAY_UP &&
meta_line2_intersects_with (&motion, &bottom, &intersection))
direction = META_SCREEN_DOWN;
direction = META_DISPLAY_DOWN;
else
{
/* We reached the dest logical monitor */
@ -340,6 +341,9 @@ relative_motion_filter (ClutterInputDevice *device,
MetaLogicalMonitor *logical_monitor, *dest_logical_monitor;
float new_dx, new_dy;
if (meta_is_stage_views_scaled ())
return;
logical_monitor = meta_monitor_manager_get_logical_monitor_at (monitor_manager,
x, y);
if (!logical_monitor)
@ -431,6 +435,12 @@ meta_backend_native_create_renderer (MetaBackend *backend)
return META_RENDERER (renderer_native);
}
static MetaInputSettings *
meta_backend_native_create_input_settings (MetaBackend *backend)
{
return g_object_new (META_TYPE_INPUT_SETTINGS_NATIVE, NULL);
}
static void
meta_backend_native_warp_pointer (MetaBackend *backend,
int x,
@ -497,11 +507,24 @@ meta_backend_native_get_keymap (MetaBackend *backend)
return clutter_evdev_get_keyboard_map (manager);
}
static xkb_layout_index_t
meta_backend_native_get_keymap_layout_group (MetaBackend *backend)
{
ClutterDeviceManager *manager = clutter_device_manager_get_default ();
return clutter_evdev_get_keyboard_layout_index (manager);
}
static void
meta_backend_native_lock_layout_group (MetaBackend *backend,
guint idx)
{
ClutterDeviceManager *manager = clutter_device_manager_get_default ();
xkb_layout_index_t old_idx;
old_idx = meta_backend_native_get_keymap_layout_group (backend);
if (old_idx == idx)
return;
clutter_evdev_set_keyboard_layout_index (manager, idx);
meta_backend_notify_keymap_layout_group_changed (backend, idx);
@ -561,6 +584,7 @@ meta_backend_native_class_init (MetaBackendNativeClass *klass)
backend_class->create_monitor_manager = meta_backend_native_create_monitor_manager;
backend_class->create_cursor_renderer = meta_backend_native_create_cursor_renderer;
backend_class->create_renderer = meta_backend_native_create_renderer;
backend_class->create_input_settings = meta_backend_native_create_input_settings;
backend_class->warp_pointer = meta_backend_native_warp_pointer;
@ -568,6 +592,7 @@ meta_backend_native_class_init (MetaBackendNativeClass *klass)
backend_class->set_keymap = meta_backend_native_set_keymap;
backend_class->get_keymap = meta_backend_native_get_keymap;
backend_class->get_keymap_layout_group = meta_backend_native_get_keymap_layout_group;
backend_class->lock_layout_group = meta_backend_native_lock_layout_group;
backend_class->get_relative_motion_deltas = meta_backend_native_get_relative_motion_deltas;
backend_class->update_screen_size = meta_backend_native_update_screen_size;
@ -657,11 +682,14 @@ meta_backend_native_pause (MetaBackendNative *native)
meta_backend_get_monitor_manager (backend);
MetaMonitorManagerKms *monitor_manager_kms =
META_MONITOR_MANAGER_KMS (monitor_manager);
MetaRendererNative *renderer_native =
META_RENDERER_NATIVE (meta_backend_get_renderer (backend));
clutter_evdev_release_devices ();
clutter_egl_freeze_master_clock ();
meta_monitor_manager_kms_pause (monitor_manager_kms);
meta_renderer_native_pause (renderer_native);
}
void meta_backend_native_resume (MetaBackendNative *native)

View File

@ -39,6 +39,7 @@
#include "backends/meta-monitor.h"
#include "backends/meta-monitor-manager-private.h"
#include "backends/native/meta-renderer-native.h"
#include "core/boxes-private.h"
#include "meta/boxes.h"
#ifndef DRM_CAP_CURSOR_WIDTH
@ -220,7 +221,7 @@ typedef struct
{
MetaCursorRendererNative *in_cursor_renderer_native;
MetaLogicalMonitor *in_logical_monitor;
MetaRectangle in_local_cursor_rect;
ClutterRect in_local_cursor_rect;
MetaCursorSprite *in_cursor_sprite;
gboolean out_painted;
@ -238,43 +239,50 @@ update_monitor_crtc_cursor (MetaMonitor *monitor,
data->in_cursor_renderer_native;
MetaCursorRendererNativePrivate *priv =
meta_cursor_renderer_native_get_instance_private (cursor_renderer_native);
MetaRectangle scaled_crtc_rect;
int scale;
ClutterRect scaled_crtc_rect;
float scale;
int crtc_x, crtc_y;
if (meta_is_stage_views_scaled ())
scale = meta_logical_monitor_get_scale (data->in_logical_monitor);
else
scale = 1;
scale = 1.0;
meta_monitor_calculate_crtc_pos (monitor, monitor_mode,
monitor_crtc_mode->output,
META_MONITOR_TRANSFORM_NORMAL,
&crtc_x, &crtc_y);
scaled_crtc_rect = (MetaRectangle) {
.x = crtc_x / scale,
.y = crtc_y / scale,
.width = monitor_crtc_mode->crtc_mode->width / scale,
.height = monitor_crtc_mode->crtc_mode->height / scale
scaled_crtc_rect = (ClutterRect) {
.origin = {
.x = crtc_x / scale,
.y = crtc_y / scale
},
.size = {
.width = monitor_crtc_mode->crtc_mode->width / scale,
.height = monitor_crtc_mode->crtc_mode->height / scale
},
};
if (priv->has_hw_cursor &&
meta_rectangle_overlap (&scaled_crtc_rect,
&data->in_local_cursor_rect))
clutter_rect_intersection (&scaled_crtc_rect,
&data->in_local_cursor_rect,
NULL))
{
int crtc_cursor_x, crtc_cursor_y;
float crtc_cursor_x, crtc_cursor_y;
set_crtc_cursor (data->in_cursor_renderer_native,
monitor_crtc_mode->output->crtc,
data->in_cursor_sprite);
crtc_cursor_x = (data->in_local_cursor_rect.x - scaled_crtc_rect.x) * scale;
crtc_cursor_y = (data->in_local_cursor_rect.y - scaled_crtc_rect.y) * scale;
crtc_cursor_x = (data->in_local_cursor_rect.origin.x -
scaled_crtc_rect.origin.x) * scale;
crtc_cursor_y = (data->in_local_cursor_rect.origin.y -
scaled_crtc_rect.origin.y) * scale;
drmModeMoveCursor (priv->drm_fd,
monitor_crtc_mode->output->crtc->crtc_id,
crtc_cursor_x,
crtc_cursor_y);
roundf (crtc_cursor_x),
roundf (crtc_cursor_y));
data->out_painted = data->out_painted || TRUE;
}
@ -298,13 +306,13 @@ update_hw_cursor (MetaCursorRendererNative *native,
meta_backend_get_monitor_manager (backend);
GList *logical_monitors;
GList *l;
MetaRectangle rect;
ClutterRect rect;
gboolean painted = FALSE;
if (cursor_sprite)
rect = meta_cursor_renderer_calculate_rect (renderer, cursor_sprite);
else
rect = (MetaRectangle) { 0 };
rect = (ClutterRect) { 0 };
logical_monitors =
meta_monitor_manager_get_logical_monitors (monitor_manager);
@ -318,11 +326,12 @@ update_hw_cursor (MetaCursorRendererNative *native,
data = (UpdateCrtcCursorData) {
.in_cursor_renderer_native = native,
.in_logical_monitor = logical_monitor,
.in_local_cursor_rect = (MetaRectangle) {
.x = rect.x - logical_monitor->rect.x,
.y = rect.y - logical_monitor->rect.y,
.width = rect.width,
.height = rect.height
.in_local_cursor_rect = (ClutterRect) {
.origin = {
.x = rect.origin.x - logical_monitor->rect.x,
.y = rect.origin.y - logical_monitor->rect.y
},
.size = rect.size
},
.in_cursor_sprite = cursor_sprite
};
@ -374,25 +383,37 @@ has_valid_cursor_sprite_gbm_bo (MetaCursorSprite *cursor_sprite)
}
static gboolean
cursor_over_transformed_crtc (MetaCursorRenderer *renderer,
MetaCursorSprite *cursor_sprite)
cursor_over_transformed_logical_monitor (MetaCursorRenderer *renderer,
MetaCursorSprite *cursor_sprite)
{
MetaMonitorManager *monitors;
MetaCrtc *crtcs;
unsigned int i, n_crtcs;
MetaRectangle rect;
MetaBackend *backend = meta_get_backend ();
MetaMonitorManager *monitor_manager =
meta_backend_get_monitor_manager (backend);
GList *logical_monitors;
GList *l;
ClutterRect cursor_rect;
monitors = meta_monitor_manager_get ();
meta_monitor_manager_get_resources (monitors, NULL, NULL,
&crtcs, &n_crtcs, NULL, NULL);
rect = meta_cursor_renderer_calculate_rect (renderer, cursor_sprite);
for (i = 0; i < n_crtcs; i++)
cursor_rect = meta_cursor_renderer_calculate_rect (renderer, cursor_sprite);
logical_monitors =
meta_monitor_manager_get_logical_monitors (monitor_manager);
for (l = logical_monitors; l; l = l->next)
{
if (!meta_rectangle_overlap (&rect, &crtcs[i].rect))
MetaLogicalMonitor *logical_monitor = l->data;
MetaRectangle logical_monitor_layout;
ClutterRect logical_monitor_rect;
MetaMonitorTransform transform;
logical_monitor_layout =
meta_logical_monitor_get_layout (logical_monitor);
logical_monitor_rect =
meta_rectangle_to_clutter_rect (&logical_monitor_layout);
if (!clutter_rect_intersection (&cursor_rect, &logical_monitor_rect,
NULL))
continue;
if (crtcs[i].transform != META_MONITOR_TRANSFORM_NORMAL)
transform = meta_logical_monitor_get_transform (logical_monitor);
if (transform != META_MONITOR_TRANSFORM_NORMAL)
return TRUE;
}
@ -413,7 +434,7 @@ can_draw_cursor_unscaled (MetaCursorRenderer *renderer,
{
MetaBackend *backend;
MetaMonitorManager *monitor_manager;
MetaRectangle cursor_rect;
ClutterRect cursor_rect;
GList *logical_monitors;
GList *l;
gboolean has_visible_crtc_sprite = FALSE;
@ -434,8 +455,12 @@ can_draw_cursor_unscaled (MetaCursorRenderer *renderer,
for (l = logical_monitors; l; l = l->next)
{
MetaLogicalMonitor *logical_monitor = l->data;
ClutterRect logical_monitor_rect =
meta_rectangle_to_clutter_rect (&logical_monitor->rect);
if (!meta_rectangle_overlap (&cursor_rect, &logical_monitor->rect))
if (!clutter_rect_intersection (&cursor_rect,
&logical_monitor_rect,
NULL))
continue;
if (calculate_cursor_crtc_sprite_scale (cursor_sprite,
@ -462,7 +487,7 @@ should_have_hw_cursor (MetaCursorRenderer *renderer,
if (!cursor_sprite)
return FALSE;
if (cursor_over_transformed_crtc (renderer, cursor_sprite))
if (cursor_over_transformed_logical_monitor (renderer, cursor_sprite))
return FALSE;
texture = meta_cursor_sprite_get_cogl_texture (cursor_sprite);

View File

@ -121,6 +121,43 @@ meta_input_settings_native_set_tap_enabled (MetaInputSettings *settings,
LIBINPUT_CONFIG_TAP_DISABLED);
}
static void
meta_input_settings_native_set_tap_and_drag_enabled (MetaInputSettings *settings,
ClutterInputDevice *device,
gboolean enabled)
{
struct libinput_device *libinput_device;
libinput_device = clutter_evdev_input_device_get_libinput_device (device);
if (!libinput_device)
return;
if (libinput_device_config_tap_get_finger_count (libinput_device) > 0)
libinput_device_config_tap_set_drag_enabled (libinput_device,
enabled ?
LIBINPUT_CONFIG_DRAG_ENABLED :
LIBINPUT_CONFIG_DRAG_DISABLED);
}
static void
meta_input_settings_native_set_disable_while_typing (MetaInputSettings *settings,
ClutterInputDevice *device,
gboolean enabled)
{
struct libinput_device *libinput_device;
libinput_device = clutter_evdev_input_device_get_libinput_device (device);
if (!libinput_device)
return;
if (libinput_device_config_dwt_is_available (libinput_device))
libinput_device_config_dwt_set_enabled (libinput_device,
enabled ?
LIBINPUT_CONFIG_DWT_ENABLED :
LIBINPUT_CONFIG_DWT_DISABLED);
}
static void
meta_input_settings_native_set_invert_scroll (MetaInputSettings *settings,
ClutterInputDevice *device,
@ -432,8 +469,18 @@ meta_input_settings_native_set_tablet_area (MetaInputSettings *settings,
gdouble padding_bottom)
{
struct libinput_device *libinput_device;
gfloat matrix[6] = { 1. - (padding_left + padding_right), 0., padding_left,
0., 1. - (padding_top + padding_bottom), padding_top };
gfloat scale_x;
gfloat scale_y;
gfloat offset_x;
gfloat offset_y;
scale_x = 1. / (1. - (padding_left + padding_right));
scale_y = 1. / (1. - (padding_top + padding_bottom));
offset_x = -padding_left * scale_x;
offset_y = -padding_top * scale_y;
gfloat matrix[6] = { scale_x, 0., offset_x,
0., scale_y, offset_y };
libinput_device = clutter_evdev_input_device_get_libinput_device (device);
if (!libinput_device ||
@ -501,12 +548,14 @@ meta_input_settings_native_class_init (MetaInputSettingsNativeClass *klass)
input_settings_class->set_speed = meta_input_settings_native_set_speed;
input_settings_class->set_left_handed = meta_input_settings_native_set_left_handed;
input_settings_class->set_tap_enabled = meta_input_settings_native_set_tap_enabled;
input_settings_class->set_tap_and_drag_enabled = meta_input_settings_native_set_tap_and_drag_enabled;
input_settings_class->set_invert_scroll = meta_input_settings_native_set_invert_scroll;
input_settings_class->set_edge_scroll = meta_input_settings_native_set_edge_scroll;
input_settings_class->set_two_finger_scroll = meta_input_settings_native_set_two_finger_scroll;
input_settings_class->set_scroll_button = meta_input_settings_native_set_scroll_button;
input_settings_class->set_click_method = meta_input_settings_native_set_click_method;
input_settings_class->set_keyboard_repeat = meta_input_settings_native_set_keyboard_repeat;
input_settings_class->set_disable_while_typing = meta_input_settings_native_set_disable_while_typing;
input_settings_class->set_tablet_mapping = meta_input_settings_native_set_tablet_mapping;
input_settings_class->set_tablet_keep_aspect = meta_input_settings_native_set_tablet_keep_aspect;

View File

@ -188,9 +188,22 @@ on_evdev_device_open (const char *path,
/* 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));
do
{
fd = open (path, flags);
}
while (fd < 0 && errno == EINTR);
if (fd < 0)
{
g_set_error (error,
G_FILE_ERROR,
g_file_error_from_errno (errno),
"Could not open /sys file: %s: %m", path);
return -1;
}
g_hash_table_add (self->sysfs_fds, GINT_TO_POINTER (fd));
return fd;
}

View File

@ -24,7 +24,6 @@
#include "config.h"
#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"
@ -42,7 +41,7 @@
#include <xf86drmMode.h>
#include <meta/main.h>
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include <gudev/gudev.h>
@ -52,11 +51,6 @@
#define ALL_TRANSFORMS_MASK ((1 << ALL_TRANSFORMS) - 1)
#define SYNC_TOLERANCE 0.01 /* 1 percent */
static float supported_scales_kms[] = {
1.0,
2.0
};
typedef struct
{
drmModeConnector *connector;
@ -115,8 +109,6 @@ struct _MetaMonitorManagerKms
GUdevClient *udev;
guint uevent_handler_id;
GSettings *desktop_settings;
gboolean page_flips_not_supported;
int max_buffer_width;
@ -1098,7 +1090,7 @@ init_outputs (MetaMonitorManager *manager,
MetaOutput *old_output;
old_output = find_output_by_id (old_outputs, n_old_outputs,
output->winsys_id);
connector->connector_id);
init_output (output, manager, connector, old_output);
n_actual_outputs++;
}
@ -1260,10 +1252,7 @@ meta_monitor_manager_kms_ensure_initial_config (MetaMonitorManager *manager)
config = meta_monitor_manager_ensure_configured (manager);
if (meta_is_monitor_config_manager_enabled ())
meta_monitor_manager_update_logical_state (manager, config);
else
meta_monitor_manager_update_logical_state_derived (manager);
meta_monitor_manager_update_logical_state (manager, config);
}
static void
@ -1469,37 +1458,6 @@ meta_monitor_manager_kms_apply_monitors_config (MetaMonitorManager *manager
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,
@ -1639,8 +1597,6 @@ meta_monitor_manager_kms_init (MetaMonitorManagerKms *manager_kms)
G_IO_IN | G_IO_ERR);
manager_kms->source->manager_kms = manager_kms;
g_source_attach (source, NULL);
manager_kms->desktop_settings = g_settings_new ("org.gnome.desktop.interface");
}
static void
@ -1832,113 +1788,50 @@ meta_monitor_manager_kms_is_transform_handled (MetaMonitorManager *manager,
return FALSE;
}
/* The minimum resolution at which we turn on a window-scale of 2 */
#define HIDPI_LIMIT 192
/* The minimum screen height at which we turn on a window-scale of 2;
* below this there just isn't enough vertical real estate for GNOME
* apps to work, and it's better to just be tiny */
#define HIDPI_MIN_HEIGHT 1200
/* From http://en.wikipedia.org/wiki/4K_resolution#Resolutions_of_common_formats */
#define SMALLEST_4K_WIDTH 3656
static int
compute_scale (MetaMonitor *monitor,
MetaMonitorMode *monitor_mode)
{
int resolution_width, resolution_height;
int width_mm, height_mm;
int scale;
scale = 1;
meta_monitor_mode_get_resolution (monitor_mode,
&resolution_width,
&resolution_height);
if (resolution_height < HIDPI_MIN_HEIGHT)
goto out;
/* 4K TV */
switch (meta_monitor_get_connector_type (monitor))
{
case META_CONNECTOR_TYPE_HDMIA:
case META_CONNECTOR_TYPE_HDMIB:
if (resolution_width >= SMALLEST_4K_WIDTH)
goto out;
break;
default:
break;
}
meta_monitor_get_physical_dimensions (monitor, &width_mm, &height_mm);
/*
* Somebody encoded the aspect ratio (16/9 or 16/10) instead of the physical
* size.
*/
if ((width_mm == 160 && height_mm == 90) ||
(width_mm == 160 && height_mm == 100) ||
(width_mm == 16 && height_mm == 9) ||
(width_mm == 16 && height_mm == 10))
goto out;
if (width_mm > 0 && height_mm > 0)
{
double dpi_x, dpi_y;
dpi_x = (double) resolution_width / (width_mm / 25.4);
dpi_y = (double) resolution_height / (height_mm / 25.4);
/*
* We don't completely trust these values so both must be high, and never
* pick higher ratio than 2 automatically.
*/
if (dpi_x > HIDPI_LIMIT && dpi_y > HIDPI_LIMIT)
scale = 2;
}
out:
return scale;
}
static int
static float
meta_monitor_manager_kms_calculate_monitor_mode_scale (MetaMonitorManager *manager,
MetaMonitor *monitor,
MetaMonitorMode *monitor_mode)
{
MetaMonitorManagerKms *manager_kms = META_MONITOR_MANAGER_KMS (manager);
int global_scale;
global_scale = g_settings_get_uint (manager_kms->desktop_settings,
"scaling-factor");
if (global_scale > 0)
return global_scale;
else
return compute_scale (monitor, monitor_mode);
return meta_monitor_calculate_mode_scale (monitor, monitor_mode);
}
static void
meta_monitor_manager_kms_get_supported_scales (MetaMonitorManager *manager,
float **scales,
int *n_scales)
static float *
meta_monitor_manager_kms_calculate_supported_scales (MetaMonitorManager *manager,
MetaLogicalMonitorLayoutMode layout_mode,
MetaMonitor *monitor,
MetaMonitorMode *monitor_mode,
int *n_supported_scales)
{
*scales = supported_scales_kms;
*n_scales = G_N_ELEMENTS (supported_scales_kms);
MetaMonitorScalesConstraint constraints =
META_MONITOR_SCALES_CONSTRAINT_NONE;
switch (layout_mode)
{
case META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL:
break;
case META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL:
constraints |= META_MONITOR_SCALES_CONSTRAINT_NO_FRAC;
break;
}
return meta_monitor_calculate_supported_scales (monitor, monitor_mode,
constraints,
n_supported_scales);
}
static MetaMonitorManagerCapability
meta_monitor_manager_kms_get_capabilities (MetaMonitorManager *manager)
{
MetaBackend *backend = meta_get_backend ();
MetaSettings *settings = meta_backend_get_settings (backend);
MetaRenderer *renderer = meta_backend_get_renderer (backend);
MetaRendererNative *renderer_native = META_RENDERER_NATIVE (renderer);
MetaMonitorManagerCapability capabilities =
META_MONITOR_MANAGER_CAPABILITY_NONE;
if (meta_backend_is_experimental_feature_enabled (
backend,
if (meta_settings_is_experimental_feature_enabled (
settings,
META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER))
capabilities |= META_MONITOR_MANAGER_CAPABILITY_LAYOUT_MODE;
@ -1975,11 +1868,14 @@ meta_monitor_manager_kms_get_max_screen_size (MetaMonitorManager *manager,
static MetaLogicalMonitorLayoutMode
meta_monitor_manager_kms_get_default_layout_mode (MetaMonitorManager *manager)
{
MetaBackend *backend = meta_get_backend ();
MetaSettings *settings = meta_backend_get_settings (backend);
if (!meta_is_stage_views_enabled ())
return META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL;
if (meta_backend_is_experimental_feature_enabled (
meta_get_backend (),
if (meta_settings_is_experimental_feature_enabled (
settings,
META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER))
return META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL;
else
@ -1992,7 +1888,6 @@ meta_monitor_manager_kms_dispose (GObject *object)
MetaMonitorManagerKms *manager_kms = META_MONITOR_MANAGER_KMS (object);
g_clear_object (&manager_kms->udev);
g_clear_object (&manager_kms->desktop_settings);
G_OBJECT_CLASS (meta_monitor_manager_kms_parent_class)->dispose (object);
}
@ -2021,13 +1916,12 @@ meta_monitor_manager_kms_class_init (MetaMonitorManagerKmsClass *klass)
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;
manager_class->set_crtc_gamma = meta_monitor_manager_kms_set_crtc_gamma;
manager_class->is_transform_handled = meta_monitor_manager_kms_is_transform_handled;
manager_class->calculate_monitor_mode_scale = meta_monitor_manager_kms_calculate_monitor_mode_scale;
manager_class->get_supported_scales = meta_monitor_manager_kms_get_supported_scales;
manager_class->calculate_supported_scales = meta_monitor_manager_kms_calculate_supported_scales;
manager_class->get_capabilities = meta_monitor_manager_kms_get_capabilities;
manager_class->get_max_screen_size = meta_monitor_manager_kms_get_max_screen_size;
manager_class->get_default_layout_mode = meta_monitor_manager_kms_get_default_layout_mode;

View File

@ -1707,7 +1707,7 @@ meta_renderer_native_create_view (MetaRenderer *renderer,
MetaMonitorTransform view_transform;
CoglOnscreen *onscreen = NULL;
CoglOffscreen *offscreen = NULL;
int scale;
float scale;
int width, height;
MetaRendererView *view;
GError *error = NULL;
@ -1715,9 +1715,9 @@ meta_renderer_native_create_view (MetaRenderer *renderer,
view_transform = calculate_view_transform (monitor_manager, logical_monitor);
if (meta_is_stage_views_scaled ())
scale = logical_monitor->scale;
scale = meta_logical_monitor_get_scale (logical_monitor);
else
scale = 1;
scale = 1.0;
width = logical_monitor->rect.width * scale;
height = logical_monitor->rect.height * scale;
@ -1786,6 +1786,24 @@ meta_renderer_native_get_frame_counter (MetaRendererNative *renderer_native)
return renderer_native->frame_counter;
}
void
meta_renderer_native_pause (MetaRendererNative *renderer_native)
{
GList *views;
GList *l;
views = meta_renderer_get_views (META_RENDERER (renderer_native));
for (l = views; l; l = l->next)
{
ClutterStageView *stage_view = l->data;
g_object_set (G_OBJECT (stage_view),
"framebuffer", NULL,
"offscreen", NULL,
NULL);
}
}
static void
meta_renderer_native_get_property (GObject *object,
guint prop_id,
@ -2070,16 +2088,23 @@ meta_renderer_native_initable_init (GInitable *initable,
GError *egl_device_error = NULL;
#endif
if (init_gbm (renderer_native, &gbm_error))
return TRUE;
#ifdef HAVE_EGL_DEVICE
/* Try to initialize the EGLDevice backend first. Whenever we use a
* non-NVIDIA GPU, the EGLDevice enumeration function won't find a match, and
* we'll fall back to GBM (which will always succeed as it has a software
* rendering fallback)
*/
if (init_egl_device (renderer_native, &egl_device_error))
return TRUE;
#endif
if (init_gbm (renderer_native, &gbm_error))
{
g_error_free (gbm_error);
#ifdef HAVE_EGL_DEVICE
g_error_free (egl_device_error);
#endif
return TRUE;
}
#endif
g_set_error (error, G_IO_ERROR,
G_IO_ERROR_FAILED,

View File

@ -71,4 +71,6 @@ void meta_renderer_native_finish_frame (MetaRendererNative *renderer_native);
int64_t meta_renderer_native_get_frame_counter (MetaRendererNative *renderer_native);
void meta_renderer_native_pause (MetaRendererNative *renderer_native);
#endif /* META_RENDERER_NATIVE_H */

View File

@ -28,6 +28,7 @@
#include "backends/meta-backend-private.h"
#include "backends/x11/meta-cursor-renderer-x11.h"
#include "backends/x11/meta-input-settings-x11.h"
#include "backends/x11/meta-monitor-manager-xrandr.h"
#include "backends/x11/cm/meta-renderer-x11-cm.h"
@ -108,6 +109,12 @@ meta_backend_x11_cm_create_cursor_renderer (MetaBackend *backend)
return g_object_new (META_TYPE_CURSOR_RENDERER_X11, NULL);
}
static MetaInputSettings *
meta_backend_x11_cm_create_input_settings (MetaBackend *backend)
{
return g_object_new (META_TYPE_INPUT_SETTINGS_X11, NULL);
}
static void
meta_backend_x11_cm_update_screen_size (MetaBackend *backend,
int width,
@ -390,6 +397,7 @@ meta_backend_x11_cm_class_init (MetaBackendX11CmClass *klass)
backend_class->create_renderer = meta_backend_x11_cm_create_renderer;
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->create_input_settings = meta_backend_x11_cm_create_input_settings;
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;

View File

@ -67,12 +67,21 @@ struct _MetaBackendX11Private
uint8_t xkb_error_base;
struct xkb_keymap *keymap;
xkb_layout_index_t keymap_layout_group;
MetaLogicalMonitor *cached_current_logical_monitor;
};
typedef struct _MetaBackendX11Private MetaBackendX11Private;
G_DEFINE_TYPE_WITH_PRIVATE (MetaBackendX11, meta_backend_x11, META_TYPE_BACKEND);
static GInitableIface *initable_parent_iface;
static void
initable_iface_init (GInitableIface *initable_iface);
G_DEFINE_TYPE_WITH_CODE (MetaBackendX11, meta_backend_x11, META_TYPE_BACKEND,
G_ADD_PRIVATE (MetaBackendX11)
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE,
initable_iface_init));
static void
handle_alarm_notify (MetaBackend *backend,
@ -101,7 +110,7 @@ translate_device_event (MetaBackendX11 *x11,
meta_backend_x11_translate_device_event (x11, device_event);
if (!device_event->send_event && device_event->time != CurrentTime)
if (!device_event->send_event && device_event->time != META_CURRENT_TIME)
{
if (device_event->time < priv->latest_evtime)
{
@ -257,7 +266,7 @@ handle_host_xevent (MetaBackend *backend,
if (meta_plugin_manager_xevent_filter (compositor->plugin_mgr, event))
bypass_clutter = TRUE;
if (meta_dnd_handle_xdnd_event (backend, compositor, display, event))
if (meta_dnd_handle_xdnd_event (backend, compositor, priv->xdisplay, event))
bypass_clutter = TRUE;
}
}
@ -280,6 +289,22 @@ handle_host_xevent (MetaBackend *backend,
case XkbMapNotify:
keymap_changed (backend);
break;
case XkbStateNotify:
if (xkb_ev->state.changed & XkbGroupLockMask)
{
int layout_group;
gboolean layout_group_changed;
layout_group = xkb_ev->state.locked_group;
layout_group_changed =
(int) priv->keymap_layout_group != layout_group;
priv->keymap_layout_group = layout_group;
if (layout_group_changed)
meta_backend_notify_keymap_layout_group_changed (backend,
layout_group);
}
break;
default:
break;
}
@ -392,8 +417,6 @@ meta_backend_x11_post_init (MetaBackend *backend)
int major, minor;
gboolean has_xi = FALSE;
priv->xdisplay = clutter_x11_get_default_display ();
priv->source = x_event_source_new (backend);
if (!XSyncQueryExtension (priv->xdisplay, &priv->xsync_event_base, &priv->xsync_error_base) ||
@ -418,7 +441,6 @@ meta_backend_x11_post_init (MetaBackend *backend)
if (!has_xi)
meta_fatal ("X server doesn't have the XInput extension, version 2.2 or newer\n");
priv->xcb = XGetXCBConnection (priv->xdisplay);
if (!xkb_x11_setup_xkb_extension (priv->xcb,
XKB_X11_MIN_MAJOR_XKB_VERSION,
XKB_X11_MIN_MINOR_XKB_VERSION,
@ -462,7 +484,7 @@ meta_backend_x11_grab_device (MetaBackend *backend,
XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits };
int ret;
if (timestamp != CurrentTime)
if (timestamp != META_CURRENT_TIME)
timestamp = MAX (timestamp, priv->latest_evtime);
XISetMask (mask.mask, XI_ButtonPress);
@ -562,6 +584,15 @@ meta_backend_x11_get_keymap (MetaBackend *backend)
return priv->keymap;
}
static xkb_layout_index_t
meta_backend_x11_get_keymap_layout_group (MetaBackend *backend)
{
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
return priv->keymap_layout_group;
}
static void
meta_backend_x11_set_numlock (MetaBackend *backend,
gboolean numlock_state)
@ -586,6 +617,68 @@ meta_backend_x11_get_xkb_event_base (MetaBackendX11 *x11)
return priv->xkb_event_base;
}
static void
init_xkb_state (MetaBackendX11 *x11)
{
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
struct xkb_keymap *keymap;
int32_t device_id;
struct xkb_state *state;
keymap = meta_backend_get_keymap (META_BACKEND (x11));
device_id = xkb_x11_get_core_keyboard_device_id (priv->xcb);
state = xkb_x11_state_new_from_device (keymap, priv->xcb, device_id);
priv->keymap_layout_group =
xkb_state_serialize_layout (state, XKB_STATE_LAYOUT_LOCKED);
xkb_state_unref (state);
}
static gboolean
meta_backend_x11_initable_init (GInitable *initable,
GCancellable *cancellable,
GError **error)
{
MetaBackendX11 *x11 = META_BACKEND_X11 (initable);
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
Display *xdisplay;
const char *xdisplay_name;
xdisplay_name = g_getenv ("DISPLAY");
if (!xdisplay_name)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Unable to open display, DISPLAY not set");
return FALSE;
}
xdisplay = XOpenDisplay (xdisplay_name);
if (!xdisplay)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Unable to open display '%s'", xdisplay_name);
return FALSE;
}
priv->xdisplay = xdisplay;
priv->xcb = XGetXCBConnection (priv->xdisplay);
clutter_x11_set_display (xdisplay);
init_xkb_state (x11);
return initable_parent_iface->init (initable, cancellable, error);
}
static void
initable_iface_init (GInitableIface *initable_iface)
{
initable_parent_iface = g_type_interface_peek_parent (initable_iface);
initable_iface->init = meta_backend_x11_initable_init;
}
static void
meta_backend_x11_class_init (MetaBackendX11Class *klass)
{
@ -599,6 +692,7 @@ meta_backend_x11_class_init (MetaBackendX11Class *klass)
backend_class->warp_pointer = meta_backend_x11_warp_pointer;
backend_class->get_current_logical_monitor = meta_backend_x11_get_current_logical_monitor;
backend_class->get_keymap = meta_backend_x11_get_keymap;
backend_class->get_keymap_layout_group = meta_backend_x11_get_keymap_layout_group;
backend_class->set_numlock = meta_backend_x11_set_numlock;
}

View File

@ -40,6 +40,7 @@
#include <meta/barrier.h>
#include "backends/x11/meta-barrier-x11.h"
#include "display-private.h"
#include "x11/meta-x11-display-private.h"
struct _MetaBarrierImplX11Private
{
@ -68,10 +69,11 @@ _meta_barrier_impl_x11_release (MetaBarrierImpl *impl,
MetaBarrierImplX11Private *priv =
meta_barrier_impl_x11_get_instance_private (self);
MetaDisplay *display = priv->barrier->priv->display;
Display *dpy = meta_x11_display_get_xdisplay (display->x11_display);
if (META_DISPLAY_HAS_XINPUT_23 (display))
if (META_X11_DISPLAY_HAS_XINPUT_23 (display->x11_display))
{
XIBarrierReleasePointer (display->xdisplay,
XIBarrierReleasePointer (dpy,
META_VIRTUAL_CORE_POINTER_ID,
priv->xbarrier, event->event_id);
}
@ -89,13 +91,13 @@ _meta_barrier_impl_x11_destroy (MetaBarrierImpl *impl)
if (display == NULL)
return;
dpy = display->xdisplay;
dpy = meta_x11_display_get_xdisplay (display->x11_display);
if (!meta_barrier_is_active (priv->barrier))
return;
XFixesDestroyPointerBarrier (dpy, priv->xbarrier);
g_hash_table_remove (display->xids, &priv->xbarrier);
g_hash_table_remove (display->x11_display->xids, &priv->xbarrier);
priv->xbarrier = 0;
}
@ -119,7 +121,7 @@ meta_barrier_impl_x11_new (MetaBarrier *barrier)
priv = meta_barrier_impl_x11_get_instance_private (self);
priv->barrier = barrier;
dpy = display->xdisplay;
dpy = meta_x11_display_get_xdisplay (display->x11_display);
root = DefaultRootWindow (dpy);
allowed_motion_dirs =
@ -132,7 +134,7 @@ meta_barrier_impl_x11_new (MetaBarrier *barrier)
allowed_motion_dirs,
0, NULL);
g_hash_table_insert (display->xids, &priv->xbarrier, barrier);
g_hash_table_insert (display->x11_display->xids, &priv->xbarrier, barrier);
return META_BARRIER_IMPL (self);
}
@ -172,8 +174,8 @@ meta_barrier_fire_xevent (MetaBarrier *barrier,
}
gboolean
meta_display_process_barrier_xevent (MetaDisplay *display,
XIEvent *event)
meta_x11_display_process_barrier_xevent (MetaX11Display *x11_display,
XIEvent *event)
{
MetaBarrier *barrier;
XIBarrierEvent *xev;
@ -191,7 +193,7 @@ meta_display_process_barrier_xevent (MetaDisplay *display,
}
xev = (XIBarrierEvent *) event;
barrier = g_hash_table_lookup (display->xids, &xev->barrier);
barrier = g_hash_table_lookup (x11_display->xids, &xev->barrier);
if (barrier != NULL)
{
meta_barrier_fire_xevent (barrier, xev);

View File

@ -35,7 +35,7 @@
#include <gudev/gudev.h>
#endif
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "backends/meta-logical-monitor.h"
typedef struct _MetaInputSettingsX11Private
@ -189,9 +189,14 @@ meta_input_settings_x11_set_left_handed (MetaInputSettings *settings,
ClutterInputDevice *device,
gboolean enabled)
{
ClutterInputDeviceType device_type;
guchar value;
if (clutter_input_device_get_device_type (device) == CLUTTER_TABLET_DEVICE)
device_type = clutter_input_device_get_device_type (device);
if (device_type == CLUTTER_TABLET_DEVICE ||
device_type == CLUTTER_PEN_DEVICE ||
device_type == CLUTTER_ERASER_DEVICE)
{
value = enabled ? 3 : 0;
change_property (device, "Wacom Rotation",
@ -205,6 +210,17 @@ meta_input_settings_x11_set_left_handed (MetaInputSettings *settings,
}
}
static void
meta_input_settings_x11_set_disable_while_typing (MetaInputSettings *settings,
ClutterInputDevice *device,
gboolean enabled)
{
guchar value = (enabled) ? 1 : 0;
change_property (device, "libinput Disable While Typing Enabled",
XA_INTEGER, 8, &value, 1);
}
static void
meta_input_settings_x11_set_tap_enabled (MetaInputSettings *settings,
ClutterInputDevice *device,
@ -216,6 +232,17 @@ meta_input_settings_x11_set_tap_enabled (MetaInputSettings *settings,
XA_INTEGER, 8, &value, 1);
}
static void
meta_input_settings_x11_set_tap_and_drag_enabled (MetaInputSettings *settings,
ClutterInputDevice *device,
gboolean enabled)
{
guchar value = (enabled) ? 1 : 0;
change_property (device, "libinput TappingDrag Enabled",
XA_INTEGER, 8, &value, 1);
}
static void
meta_input_settings_x11_set_invert_scroll (MetaInputSettings *settings,
ClutterInputDevice *device,
@ -520,7 +547,7 @@ meta_input_settings_x11_set_tablet_mapping (MetaInputSettings *settings,
return;
/* Grab the puke bucket! */
meta_error_trap_push (display);
meta_x11_error_trap_push (display->x11_display);
xdev = XOpenDevice (xdisplay, device_id);
if (xdev)
{
@ -530,15 +557,26 @@ meta_input_settings_x11_set_tablet_mapping (MetaInputSettings *settings,
XCloseDevice (xdisplay, xdev);
}
if (meta_error_trap_pop_with_return (display))
if (meta_x11_error_trap_pop_with_return (display->x11_display))
{
g_warning ("Could not set tablet mapping for %s",
clutter_input_device_get_device_name (device));
}
else
{
ClutterInputDeviceMapping dev_mapping;
dev_mapping = (mapping == G_DESKTOP_TABLET_MAPPING_ABSOLUTE) ?
CLUTTER_INPUT_DEVICE_MAPPING_ABSOLUTE :
CLUTTER_INPUT_DEVICE_MAPPING_RELATIVE;
clutter_input_device_set_mapping_mode (device, dev_mapping);
}
}
static gboolean
device_query_area (ClutterInputDevice *device,
gint *x,
gint *y,
gint *width,
gint *height)
{
@ -564,9 +602,15 @@ device_query_area (ClutterInputDevice *device,
if (valuator->type != XIValuatorClass)
continue;
if (valuator->label == abs_x)
*width = valuator->max - valuator->min;
{
*x = valuator->min;
*width = valuator->max - valuator->min;
}
else if (valuator->label == abs_y)
*height = valuator->max - valuator->min;
{
*y = valuator->min;
*height = valuator->max - valuator->min;
}
}
XIFreeDeviceInfo (info);
@ -590,15 +634,15 @@ meta_input_settings_x11_set_tablet_area (MetaInputSettings *settings,
gdouble padding_top,
gdouble padding_bottom)
{
gint32 width, height, area[4] = { 0 };
gint32 x, y, width, height, area[4] = { 0 };
if (!device_query_area (device, &width, &height))
if (!device_query_area (device, &x, &y, &width, &height))
return;
area[0] = width * padding_left;
area[1] = height * padding_top;
area[2] = width - (width * padding_right);
area[2] = height - (height * padding_bottom);
area[0] = (width * padding_left) + x;
area[1] = (height * padding_top) + y;
area[2] = width - (width * padding_right) + x;
area[3] = height - (height * padding_bottom) + y;
update_tablet_area (settings, device, area);
}
@ -608,9 +652,9 @@ meta_input_settings_x11_set_tablet_keep_aspect (MetaInputSettings *settings,
MetaLogicalMonitor *logical_monitor,
gboolean keep_aspect)
{
gint32 width, height, dev_width, dev_height, area[4] = { 0 };
gint32 width, height, dev_x, dev_y, dev_width, dev_height, area[4] = { 0 };
if (!device_query_area (device, &dev_width, &dev_height))
if (!device_query_area (device, &dev_x, &dev_y, &dev_width, &dev_height))
return;
if (keep_aspect)
@ -642,8 +686,10 @@ meta_input_settings_x11_set_tablet_keep_aspect (MetaInputSettings *settings,
dev_height = dev_width / aspect_ratio;
}
area[2] = dev_width;
area[3] = dev_height;
area[0] = dev_x;
area[1] = dev_y;
area[2] = dev_width + dev_x;
area[3] = dev_height + dev_y;
update_tablet_area (settings, device, area);
}
@ -698,7 +744,7 @@ meta_input_settings_x11_set_stylus_button_map (MetaInputSettings *setti
return;
/* Grab the puke bucket! */
meta_error_trap_push (display);
meta_x11_error_trap_push (display->x11_display);
xdev = XOpenDevice (xdisplay, device_id);
if (xdev)
{
@ -712,7 +758,7 @@ meta_input_settings_x11_set_stylus_button_map (MetaInputSettings *setti
XCloseDevice (xdisplay, xdev);
}
if (meta_error_trap_pop_with_return (display))
if (meta_x11_error_trap_pop_with_return (display->x11_display))
{
g_warning ("Could not set stylus button map for %s",
clutter_input_device_get_device_name (device));
@ -744,6 +790,8 @@ meta_input_settings_x11_class_init (MetaInputSettingsX11Class *klass)
input_settings_class->set_speed = meta_input_settings_x11_set_speed;
input_settings_class->set_left_handed = meta_input_settings_x11_set_left_handed;
input_settings_class->set_tap_enabled = meta_input_settings_x11_set_tap_enabled;
input_settings_class->set_tap_and_drag_enabled = meta_input_settings_x11_set_tap_and_drag_enabled;
input_settings_class->set_disable_while_typing = meta_input_settings_x11_set_disable_while_typing;
input_settings_class->set_invert_scroll = meta_input_settings_x11_set_invert_scroll;
input_settings_class->set_edge_scroll = meta_input_settings_x11_set_edge_scroll;
input_settings_class->set_two_finger_scroll = meta_input_settings_x11_set_two_finger_scroll;

View File

@ -33,15 +33,16 @@
#include <clutter/clutter.h>
#include <X11/Xatom.h>
#include <X11/Xlibint.h>
#include <X11/extensions/Xrandr.h>
#include <X11/extensions/dpms.h>
#include <X11/extensions/extutil.h>
#include <X11/Xlib-xcb.h>
#include <xcb/randr.h>
#include "meta-backend-x11.h"
#include <meta/main.h>
#include <meta/errors.h>
#include "meta-monitor-config.h"
#include <meta/meta-x11-errors.h>
#include "backends/meta-monitor-config-manager.h"
#include "backends/meta-logical-monitor.h"
@ -52,10 +53,6 @@
* for the reasoning */
#define DPI_FALLBACK 96.0
static float supported_scales_xrandr[] = {
1.0
};
struct _MetaMonitorManagerXrandr
{
MetaMonitorManager parent_instance;
@ -66,6 +63,8 @@ struct _MetaMonitorManagerXrandr
int rr_error_base;
gboolean has_randr15;
xcb_timestamp_t last_xrandr_set_timestamp;
#ifdef HAVE_XRANDR15
GHashTable *tiled_monitor_atoms;
#endif /* HAVE_XRANDR15 */
@ -355,7 +354,7 @@ output_get_backlight_limits_xrandr (MetaMonitorManagerXrandr *manager_xrandr,
{
Atom atom;
xcb_connection_t *xcb_conn;
g_autofree xcb_randr_query_output_property_reply_t *reply;
g_autofree xcb_randr_query_output_property_reply_t *reply = NULL;
atom = XInternAtom (manager_xrandr->xdisplay, "Backlight", False);
@ -655,63 +654,63 @@ output_get_connector_type (MetaMonitorManagerXrandr *manager_xrandr,
static void
output_get_modes (MetaMonitorManager *manager,
MetaOutput *meta_output,
XRROutputInfo *output)
MetaOutput *output,
XRROutputInfo *xrandr_output)
{
guint j, k;
guint n_actual_modes;
meta_output->modes = g_new0 (MetaCrtcMode *, output->nmode);
output->modes = g_new0 (MetaCrtcMode *, xrandr_output->nmode);
n_actual_modes = 0;
for (j = 0; j < (guint)output->nmode; j++)
for (j = 0; j < (guint)xrandr_output->nmode; j++)
{
for (k = 0; k < manager->n_modes; k++)
{
if (output->modes[j] == (XID)manager->modes[k].mode_id)
if (xrandr_output->modes[j] == (XID)manager->modes[k].mode_id)
{
meta_output->modes[n_actual_modes] = &manager->modes[k];
output->modes[n_actual_modes] = &manager->modes[k];
n_actual_modes += 1;
break;
}
}
}
meta_output->n_modes = n_actual_modes;
output->n_modes = n_actual_modes;
if (n_actual_modes > 0)
meta_output->preferred_mode = meta_output->modes[0];
output->preferred_mode = output->modes[0];
}
static void
output_get_crtcs (MetaMonitorManager *manager,
MetaOutput *meta_output,
XRROutputInfo *output)
MetaOutput *output,
XRROutputInfo *xrandr_output)
{
guint j, k;
guint n_actual_crtcs;
meta_output->possible_crtcs = g_new0 (MetaCrtc *, output->ncrtc);
output->possible_crtcs = g_new0 (MetaCrtc *, xrandr_output->ncrtc);
n_actual_crtcs = 0;
for (j = 0; j < (unsigned)output->ncrtc; j++)
for (j = 0; j < (unsigned) xrandr_output->ncrtc; j++)
{
for (k = 0; k < manager->n_crtcs; k++)
{
if ((XID)manager->crtcs[k].crtc_id == output->crtcs[j])
if ((XID) manager->crtcs[k].crtc_id == xrandr_output->crtcs[j])
{
meta_output->possible_crtcs[n_actual_crtcs] = &manager->crtcs[k];
output->possible_crtcs[n_actual_crtcs] = &manager->crtcs[k];
n_actual_crtcs += 1;
break;
}
}
}
meta_output->n_possible_crtcs = n_actual_crtcs;
output->n_possible_crtcs = n_actual_crtcs;
meta_output->crtc = NULL;
output->crtc = NULL;
for (j = 0; j < manager->n_crtcs; j++)
{
if ((XID)manager->crtcs[j].crtc_id == output->crtc)
if ((XID) manager->crtcs[j].crtc_id == xrandr_output->crtc)
{
meta_output->crtc = &manager->crtcs[j];
output->crtc = &manager->crtcs[j];
break;
}
}
@ -850,67 +849,73 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
n_actual_outputs = 0;
for (i = 0; i < (unsigned)resources->noutput; i++)
{
XRROutputInfo *output;
MetaOutput *meta_output;
XRROutputInfo *xrandr_output;
MetaOutput *output;
output = XRRGetOutputInfo (manager_xrandr->xdisplay, resources, resources->outputs[i]);
if (!output)
xrandr_output = XRRGetOutputInfo (manager_xrandr->xdisplay,
resources, resources->outputs[i]);
if (!xrandr_output)
continue;
meta_output = &manager->outputs[n_actual_outputs];
output = &manager->outputs[n_actual_outputs];
if (output->connection != RR_Disconnected)
if (xrandr_output->connection != RR_Disconnected)
{
GBytes *edid;
meta_output->winsys_id = resources->outputs[i];
meta_output->name = g_strdup (output->name);
output->winsys_id = resources->outputs[i];
output->name = g_strdup (xrandr_output->name);
edid = read_output_edid (manager_xrandr, meta_output->winsys_id);
meta_output_parse_edid (meta_output, edid);
edid = read_output_edid (manager_xrandr, output->winsys_id);
meta_output_parse_edid (output, edid);
g_bytes_unref (edid);
meta_output->width_mm = output->mm_width;
meta_output->height_mm = output->mm_height;
meta_output->subpixel_order = COGL_SUBPIXEL_ORDER_UNKNOWN;
meta_output->hotplug_mode_update = output_get_hotplug_mode_update (manager_xrandr, meta_output);
meta_output->suggested_x = output_get_suggested_x (manager_xrandr, meta_output);
meta_output->suggested_y = output_get_suggested_y (manager_xrandr, meta_output);
meta_output->connector_type = output_get_connector_type (manager_xrandr, meta_output);
output->width_mm = xrandr_output->mm_width;
output->height_mm = xrandr_output->mm_height;
output->subpixel_order = COGL_SUBPIXEL_ORDER_UNKNOWN;
output->hotplug_mode_update =
output_get_hotplug_mode_update (manager_xrandr, output);
output->suggested_x = output_get_suggested_x (manager_xrandr, output);
output->suggested_y = output_get_suggested_y (manager_xrandr, output);
output->connector_type = output_get_connector_type (manager_xrandr,
output);
output_get_tile_info (manager_xrandr, meta_output);
output_get_modes (manager, meta_output, output);
output_get_crtcs (manager, meta_output, output);
output_get_tile_info (manager_xrandr, output);
output_get_modes (manager, output, xrandr_output);
output_get_crtcs (manager, output, xrandr_output);
meta_output->n_possible_clones = output->nclone;
meta_output->possible_clones = g_new0 (MetaOutput *, meta_output->n_possible_clones);
output->n_possible_clones = xrandr_output->nclone;
output->possible_clones = g_new0 (MetaOutput *,
output->n_possible_clones);
/* We can build the list of clones now, because we don't have the list of outputs
yet, so temporarily set the pointers to the bare XIDs, and then we'll fix them
in a second pass
*/
for (j = 0; j < (unsigned)output->nclone; j++)
for (j = 0; j < (unsigned) xrandr_output->nclone; j++)
{
meta_output->possible_clones[j] = GINT_TO_POINTER (output->clones[j]);
output->possible_clones[j] =
GINT_TO_POINTER (xrandr_output->clones[j]);
}
meta_output->is_primary = ((XID)meta_output->winsys_id == primary_output);
meta_output->is_presentation = output_get_presentation_xrandr (manager_xrandr, meta_output);
meta_output->is_underscanning = output_get_underscanning_xrandr (manager_xrandr, meta_output);
meta_output->supports_underscanning = output_get_supports_underscanning_xrandr (manager_xrandr, meta_output);
output_get_backlight_limits_xrandr (manager_xrandr, meta_output);
output->is_primary = ((XID) output->winsys_id == primary_output);
output->is_presentation = output_get_presentation_xrandr (manager_xrandr, output);
output->is_underscanning = output_get_underscanning_xrandr (manager_xrandr, output);
output->supports_underscanning =
output_get_supports_underscanning_xrandr (manager_xrandr, output);
output_get_backlight_limits_xrandr (manager_xrandr, output);
if (!(meta_output->backlight_min == 0 && meta_output->backlight_max == 0))
meta_output->backlight = output_get_backlight_xrandr (manager_xrandr, meta_output);
if (!(output->backlight_min == 0 && output->backlight_max == 0))
output->backlight = output_get_backlight_xrandr (manager_xrandr, output);
else
meta_output->backlight = -1;
output->backlight = -1;
if (meta_output->n_modes == 0 || meta_output->n_possible_crtcs == 0)
meta_monitor_manager_clear_output (meta_output);
if (output->n_modes == 0 || output->n_possible_crtcs == 0)
meta_monitor_manager_clear_output (output);
else
n_actual_outputs++;
}
XRRFreeOutputInfo (output);
XRRFreeOutputInfo (xrandr_output);
}
manager->n_outputs = n_actual_outputs;
@ -921,19 +926,19 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
/* Now fix the clones */
for (i = 0; i < manager->n_outputs; i++)
{
MetaOutput *meta_output;
MetaOutput *output;
meta_output = &manager->outputs[i];
output = &manager->outputs[i];
for (j = 0; j < meta_output->n_possible_clones; j++)
for (j = 0; j < output->n_possible_clones; j++)
{
RROutput clone = GPOINTER_TO_INT (meta_output->possible_clones[j]);
RROutput clone = GPOINTER_TO_INT (output->possible_clones[j]);
for (k = 0; k < manager->n_outputs; k++)
{
if (clone == (XID)manager->outputs[k].winsys_id)
{
meta_output->possible_clones[j] = &manager->outputs[k];
output->possible_clones[j] = &manager->outputs[k];
break;
}
}
@ -978,27 +983,27 @@ meta_monitor_manager_xrandr_set_power_save_mode (MetaMonitorManager *manager,
DPMSSetTimeouts (manager_xrandr->xdisplay, 0, 0, 0);
}
static Rotation
static xcb_randr_rotation_t
meta_monitor_transform_to_xrandr (MetaMonitorTransform transform)
{
switch (transform)
{
case META_MONITOR_TRANSFORM_NORMAL:
return RR_Rotate_0;
return XCB_RANDR_ROTATION_ROTATE_0;
case META_MONITOR_TRANSFORM_90:
return RR_Rotate_90;
return XCB_RANDR_ROTATION_ROTATE_90;
case META_MONITOR_TRANSFORM_180:
return RR_Rotate_180;
return XCB_RANDR_ROTATION_ROTATE_180;
case META_MONITOR_TRANSFORM_270:
return RR_Rotate_270;
return XCB_RANDR_ROTATION_ROTATE_270;
case META_MONITOR_TRANSFORM_FLIPPED:
return RR_Reflect_X | RR_Rotate_0;
return XCB_RANDR_ROTATION_REFLECT_X | XCB_RANDR_ROTATION_ROTATE_0;
case META_MONITOR_TRANSFORM_FLIPPED_90:
return RR_Reflect_X | RR_Rotate_90;
return XCB_RANDR_ROTATION_REFLECT_X | XCB_RANDR_ROTATION_ROTATE_90;
case META_MONITOR_TRANSFORM_FLIPPED_180:
return RR_Reflect_X | RR_Rotate_180;
return XCB_RANDR_ROTATION_REFLECT_X | XCB_RANDR_ROTATION_ROTATE_180;
case META_MONITOR_TRANSFORM_FLIPPED_270:
return RR_Reflect_X | RR_Rotate_270;
return XCB_RANDR_ROTATION_REFLECT_X | XCB_RANDR_ROTATION_ROTATE_270;
}
g_assert_not_reached ();
@ -1067,8 +1072,180 @@ output_set_underscanning_xrandr (MetaMonitorManagerXrandr *manager_xrandr,
}
}
static gboolean
xrandr_set_crtc_config (MetaMonitorManagerXrandr *manager_xrandr,
gboolean save_timestamp,
xcb_randr_crtc_t crtc,
xcb_timestamp_t timestamp,
int x,
int y,
xcb_randr_mode_t mode,
xcb_randr_rotation_t rotation,
xcb_randr_output_t *outputs,
int n_outputs)
{
xcb_connection_t *xcb_conn;
xcb_timestamp_t config_timestamp;
xcb_randr_set_crtc_config_cookie_t cookie;
xcb_randr_set_crtc_config_reply_t *reply;
xcb_generic_error_t *xcb_error = NULL;
xcb_conn = XGetXCBConnection (manager_xrandr->xdisplay);
config_timestamp = manager_xrandr->resources->configTimestamp;
cookie = xcb_randr_set_crtc_config (xcb_conn,
crtc,
timestamp,
config_timestamp,
x, y,
mode,
rotation,
n_outputs,
outputs);
reply = xcb_randr_set_crtc_config_reply (xcb_conn,
cookie,
&xcb_error);
if (xcb_error || !reply)
{
free (xcb_error);
free (reply);
return FALSE;
}
if (save_timestamp)
manager_xrandr->last_xrandr_set_timestamp = reply->timestamp;
free (reply);
return TRUE;
}
static gboolean
is_crtc_assignment_changed (MetaCrtc *crtc,
MetaCrtcInfo **crtc_infos,
unsigned int n_crtc_infos)
{
unsigned int i;
for (i = 0; i < n_crtc_infos; i++)
{
MetaCrtcInfo *crtc_info = crtc_infos[i];
unsigned int j;
if (crtc_info->crtc != crtc)
continue;
if (crtc->current_mode != crtc_info->mode)
return TRUE;
if (crtc->rect.x != crtc_info->x)
return TRUE;
if (crtc->rect.y != crtc_info->y)
return TRUE;
if (crtc->transform != crtc_info->transform)
return TRUE;
for (j = 0; j < crtc_info->outputs->len; j++)
{
MetaOutput *output = ((MetaOutput**) crtc_info->outputs->pdata)[j];
if (output->crtc != crtc)
return TRUE;
}
return FALSE;
}
return crtc->current_mode != NULL;
}
static gboolean
is_output_assignment_changed (MetaOutput *output,
MetaCrtcInfo **crtc_infos,
unsigned int n_crtc_infos,
MetaOutputInfo **output_infos,
unsigned int n_output_infos)
{
gboolean output_is_found = FALSE;
unsigned int i;
for (i = 0; i < n_output_infos; i++)
{
MetaOutputInfo *output_info = output_infos[i];
if (output_info->output != output)
continue;
if (output->is_primary != output_info->is_primary)
return TRUE;
if (output->is_presentation != output_info->is_presentation)
return TRUE;
if (output->is_underscanning != output_info->is_underscanning)
return TRUE;
output_is_found = TRUE;
}
if (!output_is_found)
return output->crtc != NULL;
for (i = 0; i < n_crtc_infos; i++)
{
MetaCrtcInfo *crtc_info = crtc_infos[i];
unsigned int j;
for (j = 0; j < crtc_info->outputs->len; j++)
{
MetaOutput *crtc_info_output =
((MetaOutput**) crtc_info->outputs->pdata)[j];
if (crtc_info_output == output &&
crtc_info->crtc == output->crtc)
return FALSE;
}
}
return TRUE;
}
static gboolean
is_assignments_changed (MetaMonitorManager *manager,
MetaCrtcInfo **crtc_infos,
unsigned int n_crtc_infos,
MetaOutputInfo **output_infos,
unsigned int n_output_infos)
{
unsigned int i;
for (i = 0; i < manager->n_crtcs; i++)
{
MetaCrtc *crtc = &manager->crtcs[i];
if (is_crtc_assignment_changed (crtc, crtc_infos, n_crtc_infos))
return TRUE;
}
for (i = 0; i < manager->n_outputs; i++)
{
MetaOutput *output = &manager->outputs[i];
if (is_output_assignment_changed (output,
crtc_infos,
n_crtc_infos,
output_infos,
n_output_infos))
return TRUE;
}
return FALSE;
}
static void
apply_crtc_assignments (MetaMonitorManager *manager,
gboolean save_timestamp,
MetaCrtcInfo **crtcs,
unsigned int n_crtcs,
MetaOutputInfo **outputs,
@ -1117,14 +1294,13 @@ apply_crtc_assignments (MetaMonitorManager *manager,
crtc->rect.x + crtc->rect.width > width ||
crtc->rect.y + crtc->rect.height > height)
{
XRRSetCrtcConfig (manager_xrandr->xdisplay,
manager_xrandr->resources,
(XID)crtc->crtc_id,
CurrentTime,
0, 0,
None,
RR_Rotate_0,
NULL, 0);
xrandr_set_crtc_config (manager_xrandr,
save_timestamp,
(xcb_randr_crtc_t) crtc->crtc_id,
XCB_CURRENT_TIME,
0, 0, XCB_NONE,
XCB_RANDR_ROTATION_ROTATE_0,
NULL, 0);
crtc->rect.x = 0;
crtc->rect.y = 0;
@ -1147,14 +1323,13 @@ apply_crtc_assignments (MetaMonitorManager *manager,
if (crtc->current_mode == NULL)
continue;
XRRSetCrtcConfig (manager_xrandr->xdisplay,
manager_xrandr->resources,
(XID)crtc->crtc_id,
CurrentTime,
0, 0,
None,
RR_Rotate_0,
NULL, 0);
xrandr_set_crtc_config (manager_xrandr,
save_timestamp,
(xcb_randr_crtc_t) crtc->crtc_id,
XCB_CURRENT_TIME,
0, 0, XCB_NONE,
XCB_RANDR_ROTATION_ROTATE_0,
NULL, 0);
crtc->rect.x = 0;
crtc->rect.y = 0;
@ -1183,14 +1358,14 @@ apply_crtc_assignments (MetaMonitorManager *manager,
if (crtc_info->mode != NULL)
{
MetaCrtcMode *mode;
g_autofree XID *output_ids = NULL;
g_autofree xcb_randr_output_t *output_ids = NULL;
unsigned int j, n_output_ids;
Status ok;
xcb_randr_rotation_t rotation;
mode = crtc_info->mode;
n_output_ids = crtc_info->outputs->len;
output_ids = g_new (XID, n_output_ids);
output_ids = g_new (xcb_randr_output_t, n_output_ids);
for (j = 0; j < n_output_ids; j++)
{
@ -1204,16 +1379,15 @@ apply_crtc_assignments (MetaMonitorManager *manager,
output_ids[j] = output->winsys_id;
}
ok = XRRSetCrtcConfig (manager_xrandr->xdisplay,
manager_xrandr->resources,
(XID)crtc->crtc_id,
CurrentTime,
crtc_info->x, crtc_info->y,
(XID)mode->mode_id,
meta_monitor_transform_to_xrandr (crtc_info->transform),
output_ids, n_output_ids);
if (ok != Success)
rotation = meta_monitor_transform_to_xrandr (crtc_info->transform);
if (!xrandr_set_crtc_config (manager_xrandr,
save_timestamp,
(xcb_randr_crtc_t) crtc->crtc_id,
XCB_CURRENT_TIME,
crtc_info->x, crtc_info->y,
(xcb_randr_mode_t) mode->mode_id,
rotation,
output_ids, n_output_ids))
{
meta_warning ("Configuring CRTC %d with mode %d (%d x %d @ %f) at position %d, %d and transform %u failed\n",
(unsigned)(crtc->crtc_id), (unsigned)(mode->mode_id),
@ -1290,6 +1464,8 @@ apply_crtc_assignments (MetaMonitorManager *manager,
static void
meta_monitor_manager_xrandr_ensure_initial_config (MetaMonitorManager *manager)
{
MetaMonitorManagerDeriveFlag flags;
meta_monitor_manager_ensure_configured (manager);
/*
@ -1299,7 +1475,8 @@ meta_monitor_manager_xrandr_ensure_initial_config (MetaMonitorManager *manager)
*/
meta_monitor_manager_read_current_state (manager);
meta_monitor_manager_update_logical_state_derived (manager);
flags = META_MONITOR_MANAGER_DERIVE_FLAG_CONFIGURED_SCALE;
meta_monitor_manager_update_logical_state_derived (manager, flags);
}
static gboolean
@ -1313,7 +1490,10 @@ meta_monitor_manager_xrandr_apply_monitors_config (MetaMonitorManager *mana
if (!config)
{
meta_monitor_manager_rebuild_derived (manager);
MetaMonitorManagerDeriveFlag flags =
META_MONITOR_MANAGER_DERIVE_FLAG_NONE;
meta_monitor_manager_rebuild_derived (manager, flags);
return TRUE;
}
@ -1324,11 +1504,35 @@ meta_monitor_manager_xrandr_apply_monitors_config (MetaMonitorManager *mana
if (method != META_MONITORS_CONFIG_METHOD_VERIFY)
{
apply_crtc_assignments (manager,
(MetaCrtcInfo **) crtc_infos->pdata,
crtc_infos->len,
(MetaOutputInfo **) output_infos->pdata,
output_infos->len);
/*
* If the assignment has not changed, we won't get any notification about
* any new configuration from the X server; but we still need to update
* our own configuration, as something not applicable in Xrandr might
* have changed locally, such as the logical monitors scale. This means we
* must check that our new assignment actually changes anything, otherwise
* just update the logical state.
*/
if (is_assignments_changed (manager,
(MetaCrtcInfo **) crtc_infos->pdata,
crtc_infos->len,
(MetaOutputInfo **) output_infos->pdata,
output_infos->len))
{
apply_crtc_assignments (manager,
TRUE,
(MetaCrtcInfo **) crtc_infos->pdata,
crtc_infos->len,
(MetaOutputInfo **) output_infos->pdata,
output_infos->len);
}
else
{
MetaMonitorManagerDeriveFlag flags;
flags = (META_MONITOR_MANAGER_DERIVE_FLAG_NONE |
META_MONITOR_MANAGER_DERIVE_FLAG_CONFIGURED_SCALE);
meta_monitor_manager_rebuild_derived (manager, flags);
}
}
g_ptr_array_free (crtc_infos, TRUE);
@ -1337,16 +1541,6 @@ meta_monitor_manager_xrandr_apply_monitors_config (MetaMonitorManager *mana
return TRUE;
}
static void
meta_monitor_manager_xrandr_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);
}
static void
meta_monitor_manager_xrandr_change_backlight (MetaMonitorManager *manager,
MetaOutput *output,
@ -1580,33 +1774,39 @@ meta_monitor_manager_xrandr_is_transform_handled (MetaMonitorManager *manager,
MetaCrtc *crtc,
MetaMonitorTransform transform)
{
g_warn_if_fail (crtc->all_transforms & transform);
g_warn_if_fail ((crtc->all_transforms & transform) == transform);
return TRUE;
}
static int
static float
meta_monitor_manager_xrandr_calculate_monitor_mode_scale (MetaMonitorManager *manager,
MetaMonitor *monitor,
MetaMonitorMode *monitor_mode)
{
/* X11 does not support anything other than scale 1. */
return 1;
return meta_monitor_calculate_mode_scale (monitor, monitor_mode);
}
static void
meta_monitor_manager_xrandr_get_supported_scales (MetaMonitorManager *manager,
float **scales,
int *n_scales)
static float *
meta_monitor_manager_xrandr_calculate_supported_scales (MetaMonitorManager *manager,
MetaLogicalMonitorLayoutMode layout_mode,
MetaMonitor *monitor,
MetaMonitorMode *monitor_mode,
int *n_supported_scales)
{
*scales = supported_scales_xrandr;
*n_scales = G_N_ELEMENTS (supported_scales_xrandr);
MetaMonitorScalesConstraint constraints;
constraints = META_MONITOR_SCALES_CONSTRAINT_NO_FRAC;
return meta_monitor_calculate_supported_scales (monitor, monitor_mode,
constraints,
n_supported_scales);
}
static MetaMonitorManagerCapability
meta_monitor_manager_xrandr_get_capabilities (MetaMonitorManager *manager)
{
return META_MONITOR_MANAGER_CAPABILITY_MIRRORING;
return (META_MONITOR_MANAGER_CAPABILITY_MIRRORING |
META_MONITOR_MANAGER_CAPABILITY_GLOBAL_SCALE_REQUIRED);
}
static gboolean
@ -1626,11 +1826,7 @@ meta_monitor_manager_xrandr_get_max_screen_size (MetaMonitorManager *manager,
static MetaLogicalMonitorLayoutMode
meta_monitor_manager_xrandr_get_default_layout_mode (MetaMonitorManager *manager)
{
/*
* Under X11, we still use the 'logical' layout mode, but it is
* eqivalent to 'physical' as the scale is always 1.
*/
return META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL;
return META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL;
}
static void
@ -1699,7 +1895,6 @@ meta_monitor_manager_xrandr_class_init (MetaMonitorManagerXrandrClass *klass)
manager_class->read_edid = meta_monitor_manager_xrandr_read_edid;
manager_class->ensure_initial_config = meta_monitor_manager_xrandr_ensure_initial_config;
manager_class->apply_monitors_config = meta_monitor_manager_xrandr_apply_monitors_config;
manager_class->apply_configuration = meta_monitor_manager_xrandr_apply_configuration;
manager_class->set_power_save_mode = meta_monitor_manager_xrandr_set_power_save_mode;
manager_class->change_backlight = meta_monitor_manager_xrandr_change_backlight;
manager_class->get_crtc_gamma = meta_monitor_manager_xrandr_get_crtc_gamma;
@ -1710,7 +1905,7 @@ meta_monitor_manager_xrandr_class_init (MetaMonitorManagerXrandrClass *klass)
#endif
manager_class->is_transform_handled = meta_monitor_manager_xrandr_is_transform_handled;
manager_class->calculate_monitor_mode_scale = meta_monitor_manager_xrandr_calculate_monitor_mode_scale;
manager_class->get_supported_scales = meta_monitor_manager_xrandr_get_supported_scales;
manager_class->calculate_supported_scales = meta_monitor_manager_xrandr_calculate_supported_scales;
manager_class->get_capabilities = meta_monitor_manager_xrandr_get_capabilities;
manager_class->get_max_screen_size = meta_monitor_manager_xrandr_get_max_screen_size;
manager_class->get_default_layout_mode = meta_monitor_manager_xrandr_get_default_layout_mode;
@ -1724,7 +1919,8 @@ meta_monitor_manager_xrandr_handle_xevent (MetaMonitorManagerXrandr *manager_xra
XEvent *event)
{
MetaMonitorManager *manager = META_MONITOR_MANAGER (manager_xrandr);
gboolean hotplug;
gboolean is_hotplug;
gboolean is_our_configuration;
if ((event->type - manager_xrandr->rr_event_base) != RRScreenChangeNotify)
return FALSE;
@ -1733,16 +1929,24 @@ meta_monitor_manager_xrandr_handle_xevent (MetaMonitorManagerXrandr *manager_xra
meta_monitor_manager_read_current_state (manager);
hotplug = manager_xrandr->resources->timestamp < manager_xrandr->resources->configTimestamp;
if (hotplug)
is_hotplug = (manager_xrandr->resources->timestamp <
manager_xrandr->resources->configTimestamp);
is_our_configuration = (manager_xrandr->resources->timestamp ==
manager_xrandr->last_xrandr_set_timestamp);
if (is_hotplug)
{
/* This is a hotplug event, so go ahead and build a new configuration. */
meta_monitor_manager_on_hotplug (manager);
}
else
{
/* Something else changed -- tell the world about it. */
meta_monitor_manager_rebuild_derived (manager);
MetaMonitorManagerDeriveFlag flags =
META_MONITOR_MANAGER_DERIVE_FLAG_NONE;
if (is_our_configuration)
flags |= META_MONITOR_MANAGER_DERIVE_FLAG_CONFIGURED_SCALE;
meta_monitor_manager_rebuild_derived (manager, flags);
}
return TRUE;

View File

@ -25,17 +25,9 @@
#include "meta-monitor-manager-private.h"
#define META_TYPE_MONITOR_MANAGER_XRANDR (meta_monitor_manager_xrandr_get_type ())
#define META_MONITOR_MANAGER_XRANDR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_MONITOR_MANAGER_XRANDR, MetaMonitorManagerXrandr))
#define META_MONITOR_MANAGER_XRANDR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_MONITOR_MANAGER_XRANDR, MetaMonitorManagerXrandrClass))
#define META_IS_MONITOR_MANAGER_XRANDR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_MONITOR_MANAGER_XRANDR))
#define META_IS_MONITOR_MANAGER_XRANDR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_MONITOR_MANAGER_XRANDR))
#define META_MONITOR_MANAGER_XRANDR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_MONITOR_MANAGER_XRANDR, MetaMonitorManagerXrandrClass))
typedef struct _MetaMonitorManagerXrandrClass MetaMonitorManagerXrandrClass;
typedef struct _MetaMonitorManagerXrandr MetaMonitorManagerXrandr;
GType meta_monitor_manager_xrandr_get_type (void);
#define META_TYPE_MONITOR_MANAGER_XRANDR (meta_monitor_manager_xrandr_get_type ())
G_DECLARE_FINAL_TYPE (MetaMonitorManagerXrandr, meta_monitor_manager_xrandr,
META, MONITOR_MANAGER_XRANDR, MetaMonitorManager)
gboolean meta_monitor_manager_xrandr_handle_xevent (MetaMonitorManagerXrandr *manager,
XEvent *event);

View File

@ -49,6 +49,12 @@ meta_backend_x11_nested_create_cursor_renderer (MetaBackend *backend)
return g_object_new (META_TYPE_CURSOR_RENDERER_X11_NESTED, NULL);
}
static MetaInputSettings *
meta_backend_x11_nested_create_input_settings (MetaBackend *backend)
{
return NULL;
}
static void
meta_backend_x11_nested_update_screen_size (MetaBackend *backend,
int width,
@ -177,6 +183,7 @@ meta_backend_x11_nested_class_init (MetaBackendX11NestedClass *klass)
backend_class->create_renderer = meta_backend_x11_nested_create_renderer;
backend_class->create_monitor_manager = meta_backend_x11_nested_create_monitor_manager;
backend_class->create_cursor_renderer = meta_backend_x11_nested_create_cursor_renderer;
backend_class->create_input_settings = meta_backend_x11_nested_create_input_settings;
backend_class->update_screen_size = meta_backend_x11_nested_update_screen_size;
backend_class->select_stage_events = meta_backend_x11_nested_select_stage_events;
backend_class->lock_layout_group = meta_backend_x11_nested_lock_layout_group;

View File

@ -173,7 +173,7 @@ meta_renderer_x11_nested_create_view (MetaRenderer *renderer,
ClutterBackend *clutter_backend = meta_backend_get_clutter_backend (backend);
CoglContext *cogl_context = clutter_backend_get_cogl_context (clutter_backend);
MetaMonitorTransform view_transform;
int view_scale;
float view_scale;
int width, height;
CoglOffscreen *fake_onscreen;
CoglOffscreen *offscreen;
@ -183,7 +183,7 @@ meta_renderer_x11_nested_create_view (MetaRenderer *renderer,
if (meta_is_stage_views_scaled ())
view_scale = logical_monitor->scale;
else
view_scale = 1;
view_scale = 1.0;
if (meta_monitor_transform_is_rotated (view_transform))
{

View File

@ -65,4 +65,7 @@ void meta_compositor_flash_window (MetaCompositor *compositor,
MetaCloseDialog * meta_compositor_create_close_dialog (MetaCompositor *compositor,
MetaWindow *window);
MetaInhibitShortcutsDialog * meta_compositor_create_inhibit_shortcuts_dialog (MetaCompositor *compositor,
MetaWindow *window);
#endif /* META_COMPOSITOR_PRIVATE_H */

View File

@ -42,8 +42,8 @@
* There's two containers in the stage that are used to place window actors, here
* are listed in the order in which they are painted:
*
* - window group, accessible with meta_get_window_group_for_screen()
* - top window group, accessible with meta_get_top_window_group_for_screen()
* - window group, accessible with meta_get_window_group_for_display()
* - top window group, accessible with meta_get_top_window_group_for_display()
*
* Mutter will place actors representing windows in the window group, except for
* override-redirect windows (ie. popups and menus) which will be placed in the
@ -55,8 +55,7 @@
#include <clutter/x11/clutter-x11.h>
#include "core.h"
#include <meta/screen.h>
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include <meta/window.h>
#include "compositor-private.h"
#include <meta/compositor-mutter.h>
@ -80,6 +79,8 @@
#include "backends/x11/meta-backend-x11.h"
#include "clutter/clutter-mutter.h"
#include "x11/meta-x11-display-private.h"
#ifdef HAVE_WAYLAND
#include "wayland/meta-wayland-private.h"
#endif
@ -149,78 +150,78 @@ process_damage (MetaCompositor *compositor,
/* compat helper */
static MetaCompositor *
get_compositor_for_screen (MetaScreen *screen)
get_compositor_for_display (MetaDisplay *display)
{
return screen->display->compositor;
return display->compositor;
}
/**
* meta_get_stage_for_screen:
* @screen: a #MetaScreen
* meta_get_stage_for_display:
* @display: a #MetaDisplay
*
* Returns: (transfer none): The #ClutterStage for the screen
* Returns: (transfer none): The #ClutterStage for the display
*/
ClutterActor *
meta_get_stage_for_screen (MetaScreen *screen)
meta_get_stage_for_display (MetaDisplay *display)
{
MetaCompositor *compositor = get_compositor_for_screen (screen);
MetaCompositor *compositor = get_compositor_for_display (display);
return compositor->stage;
}
/**
* meta_get_window_group_for_screen:
* @screen: a #MetaScreen
* meta_get_window_group_for_display:
* @display: a #MetaDisplay
*
* Returns: (transfer none): The window group corresponding to @screen
* Returns: (transfer none): The window group corresponding to @display
*/
ClutterActor *
meta_get_window_group_for_screen (MetaScreen *screen)
meta_get_window_group_for_display (MetaDisplay *display)
{
MetaCompositor *compositor = get_compositor_for_screen (screen);
MetaCompositor *compositor = get_compositor_for_display (display);
return compositor->window_group;
}
/**
* meta_get_top_window_group_for_screen:
* @screen: a #MetaScreen
* meta_get_top_window_group_for_display:
* @display: a #MetaDisplay
*
* Returns: (transfer none): The top window group corresponding to @screen
* Returns: (transfer none): The top window group corresponding to @display
*/
ClutterActor *
meta_get_top_window_group_for_screen (MetaScreen *screen)
meta_get_top_window_group_for_display (MetaDisplay *display)
{
MetaCompositor *compositor = get_compositor_for_screen (screen);
MetaCompositor *compositor = get_compositor_for_display (display);
return compositor->top_window_group;
}
/**
* meta_get_feedback_group_for_screen:
* @screen: a #MetaScreen
* meta_get_feedback_group_for_display:
* @display: a #MetaDisplay
*
* Returns: (transfer none): The feedback group corresponding to @screen
* Returns: (transfer none): The feedback group corresponding to @display
*/
ClutterActor *
meta_get_feedback_group_for_screen (MetaScreen *screen)
meta_get_feedback_group_for_display (MetaDisplay *display)
{
MetaCompositor *compositor = get_compositor_for_screen (screen);
MetaCompositor *compositor = get_compositor_for_display (display);
return compositor->feedback_group;
}
/**
* meta_get_window_actors:
* @screen: a #MetaScreen
* @display: a #MetaDisplay
*
* Returns: (transfer none) (element-type Clutter.Actor): The set of #MetaWindowActor on @screen
* Returns: (transfer none) (element-type Clutter.Actor): The set of #MetaWindowActor on @display
*/
GList *
meta_get_window_actors (MetaScreen *screen)
meta_get_window_actors (MetaDisplay *display)
{
MetaCompositor *compositor = get_compositor_for_screen (screen);
MetaCompositor *compositor = get_compositor_for_display (display);
return compositor->windows;
}
void
meta_set_stage_input_region (MetaScreen *screen,
meta_set_stage_input_region (MetaDisplay *display,
XserverRegion region)
{
/* As a wayland compositor we can simply ignore all this trickery
@ -230,9 +231,8 @@ meta_set_stage_input_region (MetaScreen *screen,
*/
if (!meta_is_wayland_compositor ())
{
MetaDisplay *display = screen->display;
MetaCompositor *compositor = display->compositor;
Display *xdpy = meta_display_get_xdisplay (display);
Display *xdpy = meta_x11_display_get_xdisplay (display->x11_display);
Window xstage = clutter_x11_get_stage_window (CLUTTER_STAGE (compositor->stage));
XFixesSetWindowShapeRegion (xdpy, xstage, ShapeInput, 0, 0, region);
@ -247,7 +247,7 @@ meta_set_stage_input_region (MetaScreen *screen,
}
void
meta_empty_stage_input_region (MetaScreen *screen)
meta_empty_stage_input_region (MetaDisplay *display)
{
/* Using a static region here is a bit hacky, but Metacity never opens more than
* one XDisplay, so it works fine. */
@ -255,22 +255,21 @@ meta_empty_stage_input_region (MetaScreen *screen)
if (region == None)
{
MetaDisplay *display = meta_screen_get_display (screen);
Display *xdpy = meta_display_get_xdisplay (display);
Display *xdpy = meta_x11_display_get_xdisplay (display->x11_display);
region = XFixesCreateRegion (xdpy, NULL, 0);
}
meta_set_stage_input_region (screen, region);
meta_set_stage_input_region (display, region);
}
void
meta_focus_stage_window (MetaScreen *screen,
guint32 timestamp)
meta_focus_stage_window (MetaDisplay *display,
guint32 timestamp)
{
ClutterStage *stage;
Window window;
stage = CLUTTER_STAGE (meta_get_stage_for_screen (screen));
stage = CLUTTER_STAGE (meta_get_stage_for_display (display));
if (!stage)
return;
@ -279,14 +278,13 @@ meta_focus_stage_window (MetaScreen *screen,
if (window == None)
return;
meta_display_set_input_focus_xwindow (screen->display,
screen,
window,
timestamp);
meta_x11_display_set_input_focus_xwindow (display->x11_display,
window,
timestamp);
}
gboolean
meta_stage_is_focused (MetaScreen *screen)
meta_stage_is_focused (MetaDisplay *display)
{
ClutterStage *stage;
Window window;
@ -294,7 +292,7 @@ meta_stage_is_focused (MetaScreen *screen)
if (meta_is_wayland_compositor ())
return TRUE;
stage = CLUTTER_STAGE (meta_get_stage_for_screen (screen));
stage = CLUTTER_STAGE (meta_get_stage_for_display (display));
if (!stage)
return FALSE;
@ -303,7 +301,7 @@ meta_stage_is_focused (MetaScreen *screen)
if (window == None)
return FALSE;
return (screen->display->focus_xwindow == window);
return (display->x11_display->focus_xwindow == window);
}
static gboolean
@ -364,11 +362,14 @@ meta_begin_modal_for_plugin (MetaCompositor *compositor,
if (is_modal (display) || display->grab_op != META_GRAB_OP_NONE)
return FALSE;
/* XXX: why is this needed? */
XIUngrabDevice (display->xdisplay,
META_VIRTUAL_CORE_POINTER_ID,
timestamp);
XSync (display->xdisplay, False);
if (display->x11_display)
{
/* XXX: why is this needed? */
XIUngrabDevice (display->x11_display->xdisplay,
META_VIRTUAL_CORE_POINTER_ID,
timestamp);
XSync (display->x11_display->xdisplay, False);
}
if (!grab_devices (options, timestamp))
return FALSE;
@ -380,7 +381,7 @@ meta_begin_modal_for_plugin (MetaCompositor *compositor,
display->grab_have_keyboard = TRUE;
g_signal_emit_by_name (display, "grab-op-begin",
meta_plugin_get_screen (plugin),
meta_plugin_get_display (plugin),
display->grab_window, display->grab_op);
if (meta_is_wayland_compositor ())
@ -407,7 +408,7 @@ meta_end_modal_for_plugin (MetaCompositor *compositor,
g_return_if_fail (is_modal (display));
g_signal_emit_by_name (display, "grab-op-end",
meta_plugin_get_screen (plugin),
meta_plugin_get_display (plugin),
display->grab_window, display->grab_op);
display->grab_op = META_GRAB_OP_NONE;
@ -440,14 +441,13 @@ after_stage_paint (ClutterStage *stage,
}
static void
redirect_windows (MetaScreen *screen)
redirect_windows (MetaX11Display *x11_display)
{
MetaDisplay *display = meta_screen_get_display (screen);
Display *xdisplay = meta_display_get_xdisplay (display);
Window xroot = meta_screen_get_xroot (screen);
int screen_number = meta_screen_get_screen_number (screen);
guint n_retries;
guint max_retries;
Display *xdisplay = meta_x11_display_get_xdisplay (x11_display);
Window xroot = meta_x11_display_get_xroot (x11_display);
int screen_number = meta_x11_display_get_screen_number (x11_display);
guint n_retries;
guint max_retries;
if (meta_get_replace_current_wm ())
max_retries = 5;
@ -462,11 +462,11 @@ redirect_windows (MetaScreen *screen)
*/
while (TRUE)
{
meta_error_trap_push (display);
meta_x11_error_trap_push (x11_display);
XCompositeRedirectSubwindows (xdisplay, xroot, CompositeRedirectManual);
XSync (xdisplay, FALSE);
if (!meta_error_trap_pop_with_return (display))
if (!meta_x11_error_trap_pop_with_return (x11_display))
break;
if (n_retries == max_retries)
@ -474,7 +474,7 @@ redirect_windows (MetaScreen *screen)
/* This probably means that a non-WM compositor like xcompmgr is running;
* we have no way to get it to exit */
meta_fatal (_("Another compositing manager is already running on screen %i on display “%s”."),
screen_number, display->name);
screen_number, x11_display->name);
}
n_retries++;
@ -486,11 +486,14 @@ void
meta_compositor_manage (MetaCompositor *compositor)
{
MetaDisplay *display = compositor->display;
Display *xdisplay = display->xdisplay;
MetaScreen *screen = display->screen;
Display *xdisplay = NULL;
MetaBackend *backend = meta_get_backend ();
meta_screen_set_cm_selection (display->screen);
if (display->x11_display)
{
xdisplay = display->x11_display->xdisplay;
meta_x11_display_set_cm_selection (display->x11_display);
}
compositor->stage = meta_backend_get_stage (backend);
@ -511,9 +514,9 @@ meta_compositor_manage (MetaCompositor *compositor)
clutter_stage_set_sync_delay (CLUTTER_STAGE (compositor->stage), META_SYNC_DELAY);
compositor->window_group = meta_window_group_new (screen);
compositor->top_window_group = meta_window_group_new (screen);
compositor->feedback_group = meta_window_group_new (screen);
compositor->window_group = meta_window_group_new (display);
compositor->top_window_group = meta_window_group_new (display);
compositor->feedback_group = meta_window_group_new (display);
clutter_actor_add_child (compositor->stage, compositor->window_group);
clutter_actor_add_child (compositor->stage, compositor->top_window_group);
@ -530,13 +533,13 @@ meta_compositor_manage (MetaCompositor *compositor)
{
Window xwin;
compositor->output = screen->composite_overlay_window;
compositor->output = display->x11_display->composite_overlay_window;
xwin = meta_backend_x11_get_xwindow (META_BACKEND_X11 (backend));
XReparentWindow (xdisplay, xwin, compositor->output, 0, 0);
meta_empty_stage_input_region (screen);
meta_empty_stage_input_region (display);
/* Make sure there isn't any left-over output shape on the
* overlay window by setting the whole screen to be an
@ -556,7 +559,8 @@ meta_compositor_manage (MetaCompositor *compositor)
compositor->have_x11_sync_object = meta_sync_ring_init (xdisplay);
}
redirect_windows (display->screen);
if (display->x11_display)
redirect_windows (display->x11_display);
compositor->plugin_mgr = meta_plugin_manager_new (compositor);
}
@ -566,9 +570,9 @@ meta_compositor_unmanage (MetaCompositor *compositor)
{
if (!meta_is_wayland_compositor ())
{
MetaDisplay *display = compositor->display;
Display *xdisplay = meta_display_get_xdisplay (display);
Window xroot = display->screen->xroot;
MetaX11Display *display = compositor->display->x11_display;
Display *xdisplay = display->xdisplay;
Window xroot = display->xroot;
/* This is the most important part of cleanup - we have to do this
* before giving up the window manager selection or the next
@ -593,7 +597,7 @@ meta_shape_cow_for_window (MetaCompositor *compositor,
MetaWindow *window)
{
MetaDisplay *display = compositor->display;
Display *xdisplay = meta_display_get_xdisplay (display);
Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
if (window == NULL)
XFixesSetWindowShapeRegion (xdisplay, compositor->output, ShapeBounding, 0, 0, None);
@ -611,7 +615,7 @@ meta_shape_cow_for_window (MetaCompositor *compositor,
window_bounds.width = rect.width;
window_bounds.height = rect.height;
meta_screen_get_size (display->screen, &width, &height);
meta_display_get_size (display, &width, &height);
screen_rect.x = 0;
screen_rect.y = 0;
screen_rect.width = width;
@ -654,12 +658,12 @@ meta_compositor_add_window (MetaCompositor *compositor,
{
MetaDisplay *display = compositor->display;
meta_error_trap_push (display);
meta_x11_error_trap_push (display->x11_display);
meta_window_actor_new (window);
sync_actor_stacking (compositor);
meta_error_trap_pop (display);
meta_x11_error_trap_pop (display->x11_display);
}
void
@ -739,8 +743,10 @@ meta_compositor_process_event (MetaCompositor *compositor,
XEvent *event,
MetaWindow *window)
{
MetaX11Display *x11_display = compositor->display->x11_display;
if (!meta_is_wayland_compositor () &&
event->type == meta_display_get_damage_event_base (compositor->display) + XDamageNotify)
event->type == meta_x11_display_get_damage_event_base (x11_display) + XDamageNotify)
{
/* Core code doesn't handle damage events, so we need to extract the MetaWindow
* ourselves
@ -748,7 +754,7 @@ meta_compositor_process_event (MetaCompositor *compositor,
if (window == NULL)
{
Window xwin = ((XDamageNotifyEvent *) event)->drawable;
window = meta_display_lookup_x_window (compositor->display, xwin);
window = meta_x11_display_lookup_x_window (x11_display, xwin);
}
if (window)
@ -1109,7 +1115,7 @@ meta_pre_paint_func (gpointer data)
if (compositor->have_x11_sync_object)
compositor->have_x11_sync_object = meta_sync_ring_insert_wait ();
else
XSync (compositor->display->xdisplay, False);
XSync (compositor->display->x11_display->xdisplay, False);
}
return TRUE;
@ -1204,44 +1210,44 @@ meta_compositor_new (MetaDisplay *display)
/**
* meta_get_overlay_window: (skip)
* @screen: a #MetaScreen
* @display: a #MetaDisplay
*
*/
Window
meta_get_overlay_window (MetaScreen *screen)
meta_get_overlay_window (MetaDisplay *display)
{
MetaCompositor *compositor = get_compositor_for_screen (screen);
MetaCompositor *compositor = get_compositor_for_display (display);
return compositor->output;
}
/**
* meta_disable_unredirect_for_screen:
* @screen: a #MetaScreen
* meta_disable_unredirect_for_display:
* @display: a #MetaDisplay
*
* Disables unredirection, can be usefull in situations where having
* unredirected windows is undesireable like when recording a video.
*
*/
void
meta_disable_unredirect_for_screen (MetaScreen *screen)
meta_disable_unredirect_for_display (MetaDisplay *display)
{
MetaCompositor *compositor = get_compositor_for_screen (screen);
MetaCompositor *compositor = get_compositor_for_display (display);
compositor->disable_unredirect_count++;
}
/**
* meta_enable_unredirect_for_screen:
* @screen: a #MetaScreen
* meta_enable_unredirect_for_display:
* @display: a #MetaDisplay
*
* Enables unredirection which reduces the overhead for apps like games.
*
*/
void
meta_enable_unredirect_for_screen (MetaScreen *screen)
meta_enable_unredirect_for_display (MetaDisplay *display)
{
MetaCompositor *compositor = get_compositor_for_screen (screen);
MetaCompositor *compositor = get_compositor_for_display (display);
if (compositor->disable_unredirect_count == 0)
g_warning ("Called enable_unredirect_for_screen while unredirection is enabled.");
g_warning ("Called enable_unredirect_for_display while unredirection is enabled.");
if (compositor->disable_unredirect_count > 0)
compositor->disable_unredirect_count--;
}
@ -1258,15 +1264,15 @@ flash_out_completed (ClutterTimeline *timeline,
}
void
meta_compositor_flash_screen (MetaCompositor *compositor,
MetaScreen *screen)
meta_compositor_flash_display (MetaCompositor *compositor,
MetaDisplay *display)
{
ClutterActor *stage;
ClutterActor *flash;
ClutterTransition *transition;
gfloat width, height;
stage = meta_get_stage_for_screen (screen);
stage = meta_get_stage_for_display (display);
clutter_actor_get_size (stage, &width, &height);
flash = clutter_actor_new ();
@ -1422,3 +1428,11 @@ meta_compositor_create_close_dialog (MetaCompositor *compositor,
return meta_plugin_manager_create_close_dialog (compositor->plugin_mgr,
window);
}
MetaInhibitShortcutsDialog *
meta_compositor_create_inhibit_shortcuts_dialog (MetaCompositor *compositor,
MetaWindow *window)
{
return meta_plugin_manager_create_inhibit_shortcuts_dialog (compositor->plugin_mgr,
window);
}

View File

@ -3,7 +3,6 @@
#ifndef META_BACKGROUND_ACTOR_PRIVATE_H
#define META_BACKGROUND_ACTOR_PRIVATE_H
#include <meta/screen.h>
#include <meta/meta-background-actor.h>
cairo_region_t *meta_background_actor_get_clip_region (MetaBackgroundActor *self);

View File

@ -78,14 +78,15 @@
#include "cogl-utils.h"
#include "clutter-utils.h"
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "meta-background-actor-private.h"
#include "meta-background-private.h"
#include "meta-cullable.h"
#include "meta/display.h"
enum
{
PROP_META_SCREEN = 1,
PROP_META_DISPLAY = 1,
PROP_MONITOR,
PROP_BACKGROUND,
PROP_VIGNETTE,
@ -127,7 +128,7 @@ typedef enum {
struct _MetaBackgroundActorPrivate
{
MetaScreen *screen;
MetaDisplay *display;
int monitor;
MetaBackground *background;
@ -186,7 +187,9 @@ get_preferred_size (MetaBackgroundActor *self,
MetaBackgroundActorPrivate *priv = META_BACKGROUND_ACTOR (self)->priv;
MetaRectangle monitor_geometry;
meta_screen_get_monitor_geometry (priv->screen, priv->monitor, &monitor_geometry);
meta_display_get_monitor_geometry (priv->display,
priv->monitor,
&monitor_geometry);
if (width != NULL)
*width = monitor_geometry.width;
@ -311,6 +314,8 @@ setup_pipeline (MetaBackgroundActor *self,
cogl_pipeline_set_layer_texture (priv->pipeline, 0, texture);
cogl_pipeline_set_layer_wrap_mode (priv->pipeline, 0, wrap_mode);
priv->changed &= ~CHANGED_BACKGROUND;
}
if ((priv->changed & CHANGED_VIGNETTE_PARAMETERS) != 0)
@ -319,6 +324,8 @@ setup_pipeline (MetaBackgroundActor *self,
cogl_pipeline_get_uniform_location (priv->pipeline,
"vignette_sharpness"),
priv->vignette_sharpness);
priv->changed &= ~CHANGED_VIGNETTE_PARAMETERS;
}
if (priv->vignette)
@ -474,8 +481,8 @@ meta_background_actor_set_property (GObject *object,
switch (prop_id)
{
case PROP_META_SCREEN:
priv->screen = g_value_get_object (value);
case PROP_META_DISPLAY:
priv->display = g_value_get_object (value);
break;
case PROP_MONITOR:
priv->monitor = g_value_get_int (value);
@ -517,8 +524,8 @@ meta_background_actor_get_property (GObject *object,
switch (prop_id)
{
case PROP_META_SCREEN:
g_value_set_object (value, priv->screen);
case PROP_META_DISPLAY:
g_value_set_object (value, priv->display);
break;
case PROP_MONITOR:
g_value_set_int (value, priv->monitor);
@ -559,14 +566,14 @@ meta_background_actor_class_init (MetaBackgroundActorClass *klass)
actor_class->get_paint_volume = meta_background_actor_get_paint_volume;
actor_class->paint = meta_background_actor_paint;
param_spec = g_param_spec_object ("meta-screen",
"MetaScreen",
"MetaScreen",
META_TYPE_SCREEN,
param_spec = g_param_spec_object ("meta-display",
"MetaDisplay",
"MetaDisplay",
META_TYPE_DISPLAY,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property (object_class,
PROP_META_SCREEN,
PROP_META_DISPLAY,
param_spec);
param_spec = g_param_spec_int ("monitor",
@ -643,13 +650,13 @@ meta_background_actor_init (MetaBackgroundActor *self)
* Return value: the newly created background actor
*/
ClutterActor *
meta_background_actor_new (MetaScreen *screen,
int monitor)
meta_background_actor_new (MetaDisplay *display,
int monitor)
{
MetaBackgroundActor *self;
self = g_object_new (META_TYPE_BACKGROUND_ACTOR,
"meta-screen", screen,
"meta-display", display,
"monitor", monitor,
NULL);

View File

@ -155,7 +155,7 @@ file_loaded (GObject *source_object,
CoglError *catch_error = NULL;
GTask *task;
CoglTexture *texture;
GdkPixbuf *pixbuf;
GdkPixbuf *pixbuf, *rotated;
int width, height, row_stride;
guchar *pixels;
gboolean has_alpha;
@ -173,6 +173,13 @@ file_loaded (GObject *source_object,
goto out;
}
rotated = gdk_pixbuf_apply_embedded_orientation (pixbuf);
if (rotated != NULL)
{
g_object_unref (pixbuf);
pixbuf = rotated;
}
width = gdk_pixbuf_get_width (pixbuf);
height = gdk_pixbuf_get_height (pixbuf);
row_stride = gdk_pixbuf_get_rowstride (pixbuf);

View File

@ -17,9 +17,11 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include <meta/display.h>
#include <meta/util.h>
#include <meta/meta-background.h>
#include <meta/meta-background-image.h>
#include <meta/meta-monitor-manager.h>
#include "meta-background-private.h"
#include "cogl-utils.h"
@ -44,7 +46,7 @@ struct _MetaBackgroundMonitor
struct _MetaBackgroundPrivate
{
MetaScreen *screen;
MetaDisplay *display;
MetaBackgroundMonitor *monitors;
int n_monitors;
@ -68,7 +70,7 @@ struct _MetaBackgroundPrivate
enum
{
PROP_META_SCREEN = 1,
PROP_META_DISPLAY = 1,
PROP_MONITOR,
};
@ -128,8 +130,7 @@ free_wallpaper_texture (MetaBackground *self)
}
static void
on_monitors_changed (MetaScreen *screen,
MetaBackground *self)
on_monitors_changed (MetaBackground *self)
{
MetaBackgroundPrivate *priv = self->priv;
@ -138,11 +139,11 @@ on_monitors_changed (MetaScreen *screen,
priv->monitors = NULL;
priv->n_monitors = 0;
if (priv->screen)
if (priv->display)
{
int i;
priv->n_monitors = meta_screen_get_n_monitors (screen);
priv->n_monitors = meta_display_get_n_monitors (priv->display);
priv->monitors = g_new0 (MetaBackgroundMonitor, priv->n_monitors);
for (i = 0; i < priv->n_monitors; i++)
@ -151,27 +152,14 @@ on_monitors_changed (MetaScreen *screen,
}
static void
set_screen (MetaBackground *self,
MetaScreen *screen)
set_display (MetaBackground *self,
MetaDisplay *display)
{
MetaBackgroundPrivate *priv = self->priv;
if (priv->screen != NULL)
{
g_signal_handlers_disconnect_by_func (priv->screen,
(gpointer)on_monitors_changed,
self);
}
priv->display = display;
priv->screen = screen;
if (priv->screen != NULL)
{
g_signal_connect (priv->screen, "monitors-changed",
G_CALLBACK (on_monitors_changed), self);
}
on_monitors_changed (priv->screen, self);
on_monitors_changed (self);
}
static void
@ -182,8 +170,8 @@ meta_background_set_property (GObject *object,
{
switch (prop_id)
{
case PROP_META_SCREEN:
set_screen (META_BACKGROUND (object), g_value_get_object (value));
case PROP_META_DISPLAY:
set_display (META_BACKGROUND (object), g_value_get_object (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@ -201,8 +189,8 @@ meta_background_get_property (GObject *object,
switch (prop_id)
{
case PROP_META_SCREEN:
g_value_set_object (value, priv->screen);
case PROP_META_DISPLAY:
g_value_set_object (value, priv->display);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@ -304,7 +292,7 @@ meta_background_dispose (GObject *object)
set_file (self, &priv->file1, &priv->background_image1, NULL);
set_file (self, &priv->file2, &priv->background_image2, NULL);
set_screen (self, NULL);
set_display (self, NULL);
G_OBJECT_CLASS (meta_background_parent_class)->dispose (object);
}
@ -322,11 +310,15 @@ meta_background_constructed (GObject *object)
{
MetaBackground *self = META_BACKGROUND (object);
MetaBackgroundPrivate *priv = self->priv;
MetaMonitorManager *monitor_manager = meta_monitor_manager_get ();
G_OBJECT_CLASS (meta_background_parent_class)->constructed (object);
g_signal_connect_object (meta_screen_get_display (priv->screen), "gl-video-memory-purged",
g_signal_connect_object (priv->display, "gl-video-memory-purged",
G_CALLBACK (mark_changed), object, G_CONNECT_SWAPPED);
g_signal_connect_object (monitor_manager, "monitors-changed",
G_CALLBACK (on_monitors_changed), self, G_CONNECT_SWAPPED);
}
static void
@ -351,14 +343,14 @@ meta_background_class_init (MetaBackgroundClass *klass)
NULL, NULL, NULL,
G_TYPE_NONE, 0);
param_spec = g_param_spec_object ("meta-screen",
"MetaScreen",
"MetaScreen",
META_TYPE_SCREEN,
param_spec = g_param_spec_object ("meta-display",
"MetaDisplay",
"MetaDisplay",
META_TYPE_DISPLAY,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property (object_class,
PROP_META_SCREEN,
PROP_META_DISPLAY,
param_spec);
}
@ -407,7 +399,7 @@ get_texture_area (MetaBackground *self,
set_texture_area_from_monitor_area (monitor_rect, texture_area);
break;
case G_DESKTOP_BACKGROUND_STYLE_WALLPAPER:
meta_screen_get_size (priv->screen, &screen_width, &screen_height);
meta_display_get_size (priv->display, &screen_width, &screen_height);
/* Start off by centering a tile in the middle of the
* total screen area.
@ -476,7 +468,7 @@ get_texture_area (MetaBackground *self,
/* paint region is the union of all monitors, with the origin
* of the region set to align with monitor associated with the background.
*/
meta_screen_get_size (priv->screen, &screen_width, &screen_height);
meta_display_get_size (priv->display, &screen_width, &screen_height);
/* unclipped texture area is whole screen */
image_area.width = screen_width;
@ -750,7 +742,9 @@ meta_background_get_texture (MetaBackground *self,
monitor = &priv->monitors[monitor_index];
meta_screen_get_monitor_geometry (priv->screen, monitor_index, &geometry);
meta_display_get_monitor_geometry (priv->display,
monitor_index,
&geometry);
monitor_area.x = geometry.x;
monitor_area.y = geometry.y;
monitor_area.width = geometry.width;
@ -879,10 +873,10 @@ meta_background_get_texture (MetaBackground *self,
}
MetaBackground *
meta_background_new (MetaScreen *screen)
meta_background_new (MetaDisplay *display)
{
return g_object_new (META_TYPE_BACKGROUND,
"meta-screen", screen,
"meta-display", display,
NULL);
}

View File

@ -27,6 +27,7 @@
#include "core/display-private.h"
#include "backends/meta-dnd-private.h"
#include "meta/meta-dnd.h"
#include "x11/meta-x11-display-private.h"
struct _MetaDndClass
{
@ -139,7 +140,7 @@ meta_dnd_notify_dnd_leave (MetaDnd *dnd)
gboolean
meta_dnd_handle_xdnd_event (MetaBackend *backend,
MetaCompositor *compositor,
MetaDisplay *display,
Display *xdisplay,
XEvent *xev)
{
MetaDnd *dnd = meta_backend_get_dnd (backend);
@ -152,23 +153,23 @@ meta_dnd_handle_xdnd_event (MetaBackend *backend,
xev->xany.window != clutter_x11_get_stage_window (CLUTTER_STAGE (compositor->stage)))
return FALSE;
if (xev->xclient.message_type == gdk_x11_get_xatom_by_name ("XdndPosition"))
if (xev->xclient.message_type == XInternAtom (xdisplay, "XdndPosition", TRUE))
{
XEvent xevent;
Window src = xev->xclient.data.l[0];
memset (&xevent, 0, sizeof(xevent));
xevent.xany.type = ClientMessage;
xevent.xany.display = display->xdisplay;
xevent.xany.display = xdisplay;
xevent.xclient.window = src;
xevent.xclient.message_type = gdk_x11_get_xatom_by_name ("XdndStatus");
xevent.xclient.message_type = XInternAtom (xdisplay, "XdndStatus", TRUE);
xevent.xclient.format = 32;
xevent.xclient.data.l[0] = output_window;
/* flags: bit 0: will we accept the drop? bit 1: do we want more position messages */
xevent.xclient.data.l[1] = 2;
xevent.xclient.data.l[4] = None;
XSendEvent (display->xdisplay, src, False, 0, &xevent);
XSendEvent (xdisplay, src, False, 0, &xevent);
meta_dnd_notify_dnd_position_change (dnd,
(int)(xev->xclient.data.l[2] >> 16),
@ -176,13 +177,13 @@ meta_dnd_handle_xdnd_event (MetaBackend *backend,
return TRUE;
}
else if (xev->xclient.message_type == gdk_x11_get_xatom_by_name ("XdndLeave"))
else if (xev->xclient.message_type == XInternAtom (xdisplay, "XdndLeave", TRUE))
{
meta_dnd_notify_dnd_leave (dnd);
return TRUE;
}
else if (xev->xclient.message_type == gdk_x11_get_xatom_by_name ("XdndEnter"))
else if (xev->xclient.message_type == XInternAtom (xdisplay, "XdndEnter", TRUE))
{
meta_dnd_notify_dnd_enter (dnd);

View File

@ -23,11 +23,12 @@
#include "compositor-private.h"
#include "meta-plugin-manager.h"
#include <meta/prefs.h>
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include <meta/workspace.h>
#include "meta-module.h"
#include "window-private.h"
#include "meta-close-dialog-default-private.h"
#include "meta-inhibit-shortcuts-dialog-default-private.h"
#include <string.h>
#include <stdlib.h>
@ -390,3 +391,16 @@ meta_plugin_manager_create_close_dialog (MetaPluginManager *plugin_mgr,
return meta_close_dialog_default_new (window);
}
MetaInhibitShortcutsDialog *
meta_plugin_manager_create_inhibit_shortcuts_dialog (MetaPluginManager *plugin_mgr,
MetaWindow *window)
{
MetaPlugin *plugin = plugin_mgr->plugin;
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
if (klass->create_inhibit_shortcuts_dialog)
return klass->create_inhibit_shortcuts_dialog (plugin, window);
return meta_inhibit_shortcuts_dialog_default_new (window);
}

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