Compare commits

..

203 Commits

Author SHA1 Message Date
Florian Müllner
d5d95b2834 Bump version to 3.17.3
Update NEWS.
2015-07-02 13:51:22 +02:00
Cosimo Cecchi
659b8ed471 monitor-manager-xrandr: don't set underscan property when not supported
We should not be setting random output properties like this.
Use the function we just introduced to only set the underscan flag when
it's actually supported.
2015-07-01 18:22:48 -07:00
Cosimo Cecchi
94bce5a00f monitor-manager: add a property to discover if underscan is supported
So that clients such as the control center can decide to hide an
underscanning checkbutton when the output does not support it.

Support in the KMS / native backend to come later...
2015-07-01 18:20:57 -07:00
Jasper St. Pierre
91b7dedf36 Remove the ability to grab resize unmaximize
This is an extremely niche feature, and conflicts with the rest of our
interface being consistent about not allowing resizing while tiled or
maximized.
2015-07-01 16:27:19 -07:00
Jasper St. Pierre
aa1c819941 theme: Fix C++-ism 2015-07-01 16:26:51 -07:00
Pedro Albuquerque
be7e994abd Updated Portuguese translation 2015-07-01 21:59:38 +00:00
Florian Müllner
6c05eb583e stack: Don't try to focus hidden windows
A window may be hidden even if not minimized itself, for instance
when an ancestor is minimized. As meta_window_focus() will refuse
to actually focus the window in that case, don't pick it in the first
place.

https://bugzilla.gnome.org/show_bug.cgi?id=751715
2015-06-30 15:06:56 +02:00
Jonas Ådahl
5547c98f97 wayland: Make MetaWaylandDataSource ownership protocol specific
Firstly, this patch makes MetawaylandDataSource a GObject. This is in
order to easier track its lifetime without adding destroy signals etc. It
also makes the vfunc table GObject class functions instead while at it,
as well as moves protocol specific part of the source into their own
implementations.

An important part of this patch is the change of ownership. Prior to this
patch, MetaWaylandDataDevice would kind of own the source, but for
Wayland sources it would remove it if the corresponding wl_resource was
destroyed. For XWayland clients it would own it completely, and only
remove it if the source was replaced.

This patch changes so that the protocol implementation owns the source.
For Wayland sources, the wl_resource owns the source, and the
MetaWaylandDataDevice sets a weak reference (so in other words, no
semantical changes really). For XWayland sources, the source is owned by
the selection bridge, and not removed until replaced or if the client
goes away.

Given the changes in ownership, data offers may now properly track the
lifetime of a source it represents. Prior to this patch, if an offer with
an XWayland source would loose its source, it wouldn't get notified and
have an invalid pointer it would potentally crash on. For Wayland
sources, an offer would have a weak reference and clean itself up if the
source went away. This patch changes so the behavior is consistent,
meaning a weak reference is added to the source GObject so that the offer
can behave correctly both for Wayland sources and XWayland sources.

https://bugzilla.gnome.org/show_bug.cgi?id=750680
2015-06-30 11:23:40 +08:00
Carlos Garnacho
ea4979e182 data-device: Protect against destroyed dnd-focus clients
When a possible drag dest client crashes during DnD, it may happen
we receive first the destroy notification for the data_device, and
later the notification for the focus surface. When this happens we
unset the drag_focus_data_device first, and later on
meta_wayland_drag_grab_set_focus(grab, NULL) we assume it still
exists when sending the leave event, leading to mutter crashing
right after.

So, as we don't receive any ordering guarantees about resource
destruction, just prepare the meta_wayland_drag_grab_set_focus()
paths for this.
2015-06-29 18:38:50 +02:00
Jasper St. Pierre
8da5761ffc x11/xrandr: Use xcb to set properties on outputs
It seems that fglrx sometimes gives us absolute junk when requesting the
outputs, and if we don't trap errors, we'll just crash when trying to
configure a junk output. Use xcb so errors simply get ignored.
2015-06-28 13:25:49 -07:00
Jasper St. Pierre
aea71fbd01 group: Select for property notifies on group leaders 2015-06-27 00:53:22 -07:00
Peter Hutterer
b55f792302 input-settings-x11: don't create non-existing atoms
If the atom doesn't exist it won't exist on the device either so we can
shortcut the property retrieval/modification. Creating atoms by name but not
doing anything with them also confuses kcm_touchpad

https://bugzilla.redhat.com/show_bug.cgi?id=1199825

https://bugzilla.gnome.org/show_bug.cgi?id=751471
2015-06-26 21:52:45 -07:00
Jasper Lievisse Adriaanse
dd060d78ce prevent duplicate declaration of MetaUIFrame
fixes bug 747326
2015-06-26 21:40:44 -07:00
Jasper Lievisse Adriaanse
3fe281ada9 Prevent redefinition of MetaKeyCombo
Fixes bug 747326
2015-06-26 21:40:44 -07:00
Jasper St. Pierre
f041b35b9b xprops: Fix STRING types as well 2015-06-26 13:51:45 -07:00
Jasper St. Pierre
afa58746ea configure: Remove some old cruft 2015-06-24 16:52:41 -07:00
Jasper St. Pierre
6dbec6f81b xprops: More Xlib / long cleanliness with Motif WM hints
Fixes some CSD windows sometimes getting frames when they totes
shouldn't.
2015-06-24 14:34:48 -07:00
Jasper St. Pierre
2cbaa6660c backend-x11: Fix our awful hack for crossing events, too
For enter / leave events, which we use in the UI code, we need to make
sure that these coordinates are root-relative as well, otherwise the
cursor when entering frames might be incorrect.
2015-06-24 10:35:38 -07:00
Jasper St. Pierre
d74b0d5be8 window: Clear the frame borders before calculating the unfullscreen rect
Going from fullscreen to unfullscreen involves a frame border size, so
in order to properly interpret the saved rect size, we need to make sure
that the frame borders are fully up to date.
2015-06-23 17:05:27 -07:00
Ting-Wei Lan
6b82f61dba build: Fix non-wayland build
This fixes error introduced in 09120132ef.

https://bugzilla.gnome.org/show_bug.cgi?id=750552
2015-06-23 16:37:40 -07:00
Jasper St. Pierre
4c6866741d surface-actor-x11: Make sure to set a size when unredirected
When we're unredirected, we don't have a pixmap, and thus our allocation
becomes 0x0. So when events come in, they pass right through our actor,
going to the one underneath in the stack.

Fix this by having a fallback size on the shaped texture actor when
we're unredirected, causing it to always have a valid allocation.

This fixes clicking on stuff in sloppy / mouse mode focus.
2015-06-23 16:30:29 -07:00
Jasper St. Pierre
84baf4e181 shaped-texture: Clean up some internals
These are internal vfuncs, they don't need prechecks.
2015-06-23 16:18:38 -07:00
Jasper St. Pierre
3962f1d982 xprops: Apply the same Xlib / 64-bit hygiene to atom lists 2015-06-23 15:37:58 -07:00
Jasper St. Pierre
414be07a69 xprops: Remove unused synchronous property getters
No reason to keep these around..
2015-06-23 15:37:23 -07:00
Jasper St. Pierre
7f3ada7831 xprops: Some more cardinal-related hygiene 2015-06-23 15:32:07 -07:00
Jasper St. Pierre
12771a555a theme: Make sure to clear the entirety of buttons properly
In commit cc5def1, buttons were changed from GdkRectangles to
MetaButtonSpace units, but the corresponding memset hack was not.

This means that the clickable portion of the unshade rectangle
was always set to uninitalized memory. The effects of this were
random, but in cases where the moon is aligned just right, the
rectangle would graze over the borders, and so it would take priority
over other borders and show a pointer cursor instead of a resize
cursor.
2015-06-23 15:27:52 -07:00
Jasper St. Pierre
92d6a69153 xprops: Fix more gulong / 64-bit fallout from the xcb port 2015-06-23 15:09:32 -07:00
Jasper St. Pierre
734402e14d xprops: Cut off UTF-8 strings at n_items characters
There can be junk after here on some X servers.
2015-06-23 11:53:30 -07:00
Jasper St. Pierre
5d360a9bce xprops: Make sure that properties that failed to fetch are ignored 2015-06-23 11:52:49 -07:00
Jasper St. Pierre
f8cf5e373c mutter-Xatomtype: Fix the sizes of these structs
Since we're using xcb now, not Xlib, it doesn't have the stupid silly
thing where it copies all 32-bit data to 64-bit data to match the
long-y-ness of it.
2015-06-23 11:46:29 -07:00
Christian Kirbach
8df3fa4e67 Updated German translation 2015-06-20 08:10:09 +00:00
Jonas Ådahl
bbf2b4e60e xprops: Don't pass ULONG_MAX as a uint32_t parameter
It seems the largest possible value is to be passed, so actually pass
that instead. Note that even though the name of the xcb_get_property
parameter is called 'long_length' its actually a uint32_t.

https://bugzilla.gnome.org/show_bug.cgi?id=751136
2015-06-18 11:38:00 +08:00
Jonas Ådahl
bb4dcd62ec MetaWaylandDataDevice: Propagate the unsetting of a selection
If a client unsets a selection (calls set_selection with the offer
NULL), this should cause the compositor not to continue sending the
previously set offer.

https://bugzilla.gnome.org/show_bug.cgi?id=750007
2015-06-18 11:15:18 +08:00
Jasper St. Pierre
2345b9c6ad xprops: Fix syntax error 2015-06-17 18:19:53 -07:00
Jasper St. Pierre
af7cc87bfa xprops: More XFree => g_free compatibility 2015-06-17 18:18:43 -07:00
Jasper St. Pierre
af3b599cbb xprops: Remove cvtINT32toInt
These are awful compatibility hacks for systems without native 64-bit
support. We can trash these now.
2015-06-17 18:18:03 -07:00
Jasper St. Pierre
0e73ceb4bd x11: Remove async-getprop
xcb can do this for us now.
2015-06-17 18:08:11 -07:00
Carlos Garnacho
82a7060cdb x11: Fix touch events on nested wayland
If we're running as a nested compositor, we must not attempt to
passive grab on the root window, and we should be setting the
touch event mask on the stage window.

https://bugzilla.gnome.org/show_bug.cgi?id=751036
2015-06-16 20:39:46 +02:00
Carlos Garnacho
09120132ef core: Refrain from showing wayland windows when we don't have a buffer yet
The "calc showing" operation is queued in a few places alongside MetaWindow
creation, we should be ignoring these until there is a buffer to show.

https://bugzilla.gnome.org/show_bug.cgi?id=750552
2015-06-16 20:35:25 +02:00
Carlos Garnacho
cdac4d0e92 wayland: Ensure we queue a "calc showing" operation after we get a buffer
This will ensure the window is made visible, now that we're going to ignore
all previous petitions until we get a buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=750552
2015-06-16 20:35:00 +02:00
Jasper St. Pierre
6aead0c67c backend-x11: Use a mode switch to determine whether we're nested or not
The "meta_is_wayland_compositor" checks were getting a bit difficult to read.
2015-06-16 08:13:13 -07:00
Olivier Fourdan
d593a61b39 wayland: do not generate motion events
Mutter generates a motion event for every button and scroll events,
which confuses Xwayland apps that rely on XMotionEvents for various
purposes, e.g. it fools rxvt jumpy mouse detection code.

Remove the call to notify_motion() from the button and scroll event
handlers to avoid these spurious motion events.

https://bugzilla.gnome.org/show_bug.cgi?id=748705
2015-06-12 11:14:21 -04:00
Jasper St. Pierre
9747277b7e Revert "input-settings-x11: Use xcb to change input settings"
This reverts commit 989f9630a4.

xcb is not smart enough to properly submit requests for
XIChangeProperty. Let's revert this until we can fix xcb.
2015-06-12 00:49:39 -04:00
Jasper St. Pierre
989f9630a4 input-settings-x11: Use xcb to change input settings
This way, we won't be hit with BadValue errors if we set it to a value
outside the X device's range. This can happen for touchpads without
two-finger scrolling, for instance.
2015-06-11 21:13:21 -04:00
Jonas Ådahl
daa15d94fd xdg-shell: Popups should be placed relative to the parent surface
According to the xdg-shell protocol specification the (x, y) coordinates
passed when creating a popup surface is relative to top left corner of
the parent surface, but prior to this patch, if the parent surface was
a xdg_surface, it'd position it relative to top left corner of the
window geometry of that xdg_surface.

https://bugzilla.gnome.org/show_bug.cgi?id=749716
2015-06-10 11:08:12 +08:00
Marek Černocký
999b99a077 Updated Czech translation 2015-06-05 10:05:44 +02:00
Marek Černocký
fd0b366a96 Updated Czech translation 2015-06-05 09:52:03 +02:00
Thomas Hellstrom
320e2d452f mutter/wayland: Add some missing output names
Sync with the drm_mode.h include file.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>

https://bugzilla.gnome.org/show_bug.cgi?id=750363
2015-06-03 13:28:19 -07:00
Thomas Hellstrom
4d5dd01b7d mutter/wayland: Improved preferred mode selection for the native backend
Instead of selecting the first drm mode as the preferred mode, select the
first drm mode marked as preferred. If there are no modes marked as
preferred, revert to the old behaviour and select the first mode.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>

https://bugzilla.gnome.org/show_bug.cgi?id=750363
2015-06-03 13:28:19 -07:00
Thomas Hellstrom
103c88bd72 mutter/wayland: Have the native backend read drm layout properties
Read the drm layout properties suggested_X, suggested_Y and
hotplug_mode_update and transfer them to the meta layer.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>

https://bugzilla.gnome.org/show_bug.cgi?id=750363
2015-06-03 13:28:19 -07:00
Jonas Ådahl
64cf87cfe1 MetaWaylandSurface: Create the window when creating wl_shell_surface
Some clients will do things like set_toplevel before committing the
buffer, so we need to have a window to manipulate before that.

https://bugzilla.gnome.org/show_bug.cgi?id=750256
2015-06-02 10:28:09 +08:00
Dave Airlie
9f65edd4f5 backend/x11: add support for setting randr 1.5 monitors
This interface allows us to propogate back the constructed
monitors to randr using the randr 1.5 protocol. Apps
should pick it up from there.
2015-06-01 09:38:13 -07:00
Dave Airlie
ea2496c80a monitors: construct tiled monitors info
The monitors info structure is created from the tiled outputs
and this is used as the central storage for info about a monitor
as opposed to the output state.

It appears at least the EDID mm w/h is for the whole monitor and
not per tile.
2015-06-01 09:38:13 -07:00
Dave Airlie
0c30ceddbe monitors: add tiled support to the linear config
This makes sure when we generate a linear config, that
tiles get placed in the correct position relative to each other.
2015-06-01 09:38:13 -07:00
Dave Airlie
5c9846c53a monitors: change find_primary to return an index
This will make it easier to add tiling support.
2015-06-01 09:38:13 -07:00
Dave Airlie
2a8563ab23 monitors: adds expose tile info as a property over dbus interface
This just adds 8 uint32s as a property to the dbus protocol.

This will be used by gnome-desktop to get the tile info.
2015-06-01 09:38:13 -07:00
Dave Airlie
6a77d9722a backend: add output tile info retrieval.
this just adds backend support for retrieving the tile
information from X11 (randr 1.5) and native backends.

It stores the tiling information into the output struct.
2015-06-01 09:38:13 -07:00
Dave Airlie
ef296031cb backends/x11: add a flag to denote randr 1.5 is in use.
If the server reports randr 1.5, just cache the information
for later patches to use.
2015-06-01 09:38:13 -07:00
Dave Airlie
e2d6028924 wayland: use monitors info for outputs instead of kms outputs
Wayland shouldn't use KMS outputs, it should use the monitor
infos to show its outputs, this will make tiled monitors work
with wayland.
2015-06-01 09:38:13 -07:00
Jasper St. Pierre
4d80a4cc31 Use more g_autofoo throughout mutter 2015-05-29 17:18:35 -07:00
Carlos Garnacho
4a968c3b4e xwayland: Implement X11-to-wayland DnD
When DnD is started from an X11 client, mutter now sets up an special
grab that 1) Ensures the drag source keeps receiving events, and 2)
Moves an internal X Window over wayland clients as soon as the pointer
enters over these.

That window will act as the X-side peer for the currently focused
wayland client, and will transform XdndEnter/Position/Leave/Drop
messages into wayland actions. If DnD happens between X11 clients,
the window will be moved away and unmapped, to let these operate as
usual.

https://bugzilla.gnome.org/show_bug.cgi?id=738312
2015-05-29 11:27:53 +02:00
Carlos Garnacho
ccb7833e99 xwayland: Implement wayland-to-X11 DnD
X11 client windows now hook a X11-specific MetaWaylandDragDestFuncs
that converts these into Xdnd* messages, and an additional selection
bridge has been added to take care of XdndSelection, and the data
transfers done through it.

https://bugzilla.gnome.org/show_bug.cgi?id=738312
2015-05-29 11:27:53 +02:00
Carlos Garnacho
b449ba942a xwayland: Refactor XFixesSelectionNotifyEvent handler
Prepare it for more selection atoms (i.e. XdndSelection) to come.

https://bugzilla.gnome.org/show_bug.cgi?id=738312
2015-05-29 11:27:53 +02:00
Carlos Garnacho
f53eea2c1c wayland: Refactor DnD target functions into MetaWaylandDragDestFuncs
This will be useful in order to interact with drag dest surfaces in
its windowing-specific ways, although everything defaults to the
wayland vfuncs.

https://bugzilla.gnome.org/show_bug.cgi?id=738312
2015-05-29 11:27:52 +02:00
Rui Matos
b62db404ee backends/native: Reset idle time when resuming from suspend
https://bugzilla.gnome.org/show_bug.cgi?id=749994
2015-05-28 13:47:08 +02:00
Rui Matos
90a28e7b1c native/meta-launcher: Reset idle time when our session becomes active
https://bugzilla.gnome.org/show_bug.cgi?id=749994
2015-05-28 13:47:08 +02:00
Florian Müllner
8d51a9db5b Bump version to 3.17.2
Update NEWS.
2015-05-27 10:28:44 +02:00
Rui Matos
b39c00f344 window: Fix meta_window_set_alive() not working if first ping fails
window->is_alive isn't initialized explicitly so it defaults to FALSE
meaning that if the first ping fails we'd short circuit and not show
the delete dialog as we should.

We could initialize the variable to TRUE but in fact we don't even
need the variable at all since our dialog management is enough to
manage all the state we need, i.e. we're only interested in knowing
whether we're already displaying a delete dialog.

This does change our behavior here since previously we wouldn't
display the dialog again if the next ping failed after the dialog is
dismissed but this was arguably a bug too since in that case there
wouldn't be a way to kill the window after waiting for a while and the
window kept being unresponsive.

https://bugzilla.gnome.org/show_bug.cgi?id=749711
2015-05-22 16:53:42 +02:00
Rui Matos
83ce71c3bf backend-native: Reset idle time on lid open events
This makes gnome-settings-daemon turn on the backlight and
gnome-shell's screen shield animate.

Note that on X sessions, gnome-settings-daemon uses the same upower
property to force an innocuous key event into the X server so that the
idle time gets reset since Xorg doesn't do this itself on lid events.

https://bugzilla.gnome.org/show_bug.cgi?id=749076
2015-05-22 16:53:42 +02:00
Rui Matos
f9d869a3dd backend-native: Remove unused variable
https://bugzilla.gnome.org/show_bug.cgi?id=749076
2015-05-22 16:43:44 +02:00
Carlos Garnacho
0b0ce4193f xwayland: Ensure we've got an owner when setting the X selection owner
Otherwise we may end up claiming the X selection when there's no wayland
selection owner.
2015-05-18 20:59:07 +02:00
Carlos Garnacho
719d8bd0c7 xwayland: remove unused struct field 2015-05-18 20:58:57 +02:00
Carlos Garnacho
4fc1811c15 wayland: Add X11/wayland selection interoperation
This piece of code hooks in both wl_data_device and the relevant X
selection events, an X11 Window is set up so it can act as the clipboard
owner when any wayland client owns the selection, reacting to
SelectionRequest events, and returning the data from the wayland client
FD to any X11 requestor through X properties.

In the opposite direction, SelectionNotify messages are received,
which results in the property contents being converted then written
into the wayland requestor's FD.

This code also takes care of the handling incremental transfers through
the INCR property type, reading/writing data chunk by chunk.

https://bugzilla.gnome.org/show_bug.cgi?id=738312
2015-05-15 17:43:53 +02:00
Carlos Garnacho
4b5f5abb4f wayland: refactor MetaWaylandDataSource
Expose it partly (in internal headers anyway), and pass a vtable for the
data source functions, the wayland vfuncs just delegate operations on the
wl_data_source resource. The resource has been also made optional, although
it'll be present on all data sources from wayland clients.

The ownership/lifetime of the DnD data source has also changed a bit,
belonging now to the MetaWaylandDataDevice like the selection one does, as
we can't guarantee how long it will be needed after the grab is finished,
it will be left inert and replaced the next time DnD is started at worst.

This allows the creation of custom/proxy data sources, which will turn out
useful for X11 selection interoperation.

https://bugzilla.gnome.org/show_bug.cgi?id=738312
2015-05-15 17:43:46 +02:00
Jasper St. Pierre
95ad52ba58 xrandr: Fix copy/paste typo in connector type heuristics 2015-05-12 18:17:16 -07:00
Rui Matos
dac30a222e input-settings-x11: Honor default value for click method setting
Now that xf86-input-libinput exposes default values we can honor the
gsettings value.

https://bugzilla.gnome.org/show_bug.cgi?id=746290
2015-05-08 17:44:59 +02:00
Rui Matos
7d1b593fbd input-settings-x11: Factor out a get_property() helper
We'll need to get the value of some properties. Fail if the number of
items returned is less than we expect and warn if it exceeds it so
that we can easily find out if items are added to a property later and
fix it.
2015-05-08 17:44:57 +02:00
Carlos Garnacho
d6a7559750 wayland: Fix c&p typo in wl_listener notify callback
The corresponding wl_notify field for destroy_data_device_icon()
is drag_grab->drag_icon_listener, otherwise we're fetching a pointer
that's slightly off where we want.
2015-05-01 18:50:06 +02:00
Florian Müllner
cff5ef0ec2 Bump version to 3.17.1
Update NEWS.
2015-04-30 17:35:43 +02:00
Rui Matos
d478d8f143 core/events: Invalidate monitor cache when we're a wayland compositor
When running as an X11 compositor we do this for every event we see on
the X event stream. As a wayland compositor we don't go through that
code path but since we see all events we can easily do this on motion
events.

In fact, we don't even need this caching when we're a wayland
compositor since we can always find where the pointer is without a
round trip but we're sharing the current monitor logic with the X
path so let's keep it as is for now.

https://bugzilla.gnome.org/show_bug.cgi?id=748478
2015-04-30 14:01:23 +02:00
Rui Matos
7eca43cec9 monitor-manager-kms: Avoid a couple of potential crashes
The drm API can return NULL and we could end up using uninitialized
memory if the driver private struct isn't cleared.
2015-04-28 18:00:45 +02:00
Rui Matos
9060190555 monitor-manager-kms: Read crtc props after determining the crtc ID
Otherwise we can't read the properties.
2015-04-28 18:00:44 +02:00
Jasper St. Pierre
0de3869656 core: Remove unused function 2015-04-27 18:14:15 -07:00
Jasper St. Pierre
9f13033f15 window-wayland.[ch] => meta-window-wayland.[ch]
This finishes off the meta- prefix for wayland/.
2015-04-27 18:09:16 -07:00
Jasper St. Pierre
48bf807430 monitor-manager-kms: Add support for underscan 2015-04-27 17:58:38 -07:00
Jasper St. Pierre
c68e43a97f monitor-manager-xrandr: Set the underscan border properties, too 2015-04-27 17:23:56 -07:00
Tomeu Vizoso
cc53d48fa8 MonitorManager: Add support for overscan compensation
Some DRM drivers have added a consistent set of properties that
allow compensating for the overscan that some TVs do, without the
user being able to disable.
2015-04-27 17:17:15 -07:00
Jasper St. Pierre
ca6e799b97 Move atomnames.h to x11/
This should *not* be part of the public API.
2015-04-27 16:36:56 -07:00
Jasper St. Pierre
0f8e387dc0 monitor-config: Allow loading from a system file 2015-04-27 16:31:11 -07:00
Rui Matos
d62c595e51 events: Ignore some event types when reseting idle time
These events don't result from actual hardware events so we shouldn't
use them to reset idle time.

https://bugzilla.gnome.org/show_bug.cgi?id=748541
2015-04-27 19:44:58 +02:00
Jasper St. Pierre
dd3cf94744 Properly implement wl_shell_surface's poor surface commit semantics 2015-04-25 11:19:25 -07:00
Ray Strode
eb56e0a3d7 xwayland: plug some leaks in stop function
This commit makes sure the lockfile and display
name are freed in meta_xwayland_stop.

https://bugzilla.gnome.org/show_bug.cgi?id=748380
2015-04-23 13:51:11 -04:00
Ray Strode
8937c32cd5 xwayland: rename lockfile to lock_file
The missing underscore is inconsistent with the
coding style of the surrounding code.

https://bugzilla.gnome.org/show_bug.cgi?id=748380
2015-04-23 13:51:11 -04:00
Ray Strode
a8a5da768a xwayland: don't unlink lock file twice in stop function
The stop function currently manually constructs the lock
filename from the display number and also calls unlink
on the same, already known lock filename from the manager
struct.

This commit gets rid fo the manual construction in favor
of the saved lock filename.

https://bugzilla.gnome.org/show_bug.cgi?id=748380
2015-04-23 13:51:11 -04:00
Ray Strode
33bfcf56ce xwayland: free lockfile in start function on error
Right now we just leak the lockfile.

https://bugzilla.gnome.org/show_bug.cgi?id=748380
2015-04-23 13:51:11 -04:00
Ray Strode
40cccb58a5 xwayland: use out label for cleanup in start function
The start function has a few exit paths that need to
perform clean up of the lock file.

This commit consolidates those exit paths at the end
using an out label and gotos.

https://bugzilla.gnome.org/show_bug.cgi?id=748380
2015-04-23 13:51:11 -04:00
Jonas Ådahl
eb6c70137b wayland: Add and implement set/unset_modal for the gtk_surface interface
Add set_modal ond unset_modal to the gtk_surface interface. When a
surface is modal, the compositor can treat it differently from non-modal
dialogs, for example attach it to the parent window if any. There is
currently no changes to input device focus; it is up to the client to
ignore events to the parent surface that is wanted.

This bumps the gtk_shell version to 2.

https://bugzilla.gnome.org/show_bug.cgi?id=745720
2015-04-23 16:02:37 +08:00
Jonas Ådahl
df3b412a25 wayland: Kill clients who try to bind an incompatible gtk_shell version
gtk_shell is not backward compatible, and clients binding to it should
check whether the advertised version is the same as the client supports.

https://bugzilla.gnome.org/show_bug.cgi?id=745720
2015-04-23 16:02:37 +08:00
Jonas Ådahl
cfba0a5dfc wayland: Sync protocol/gtk-shell.xml from GTK+
Had added a new capability enum value.

https://bugzilla.gnome.org/show_bug.cgi?id=745720
2015-04-23 16:02:37 +08:00
Ondrej Holy
3561b46fc6 backends/x11: Fix set_scroll_button
There is copy&pasted code in set_scroll_button, which is apparently
wrong, because it is trying to set scroll method instead of the scroll
button...

https://bugzilla.gnome.org/show_bug.cgi?id=747967
2015-04-17 10:50:33 +02:00
Carlos Garnacho
8dfb88b669 backend: Apply the right settings to the right input devices
Since 8769b3d55, the checks performed on which update_* function was
called for each device got quite more lax, leading to failed asserts
on code that assumed the previous behavior.

Change update_[mouse|touchpad|trackball]_* to bail out early if the
device received has not the right type, and remove the asserts.

https://bugzilla.gnome.org/show_bug.cgi?id=747886
2015-04-15 13:33:12 +02:00
Florian Müllner
2e3086e2aa screen: Add public method to get neighboring monitor
The existing private get_monitor_neighbor() function returns a
MetaMonitorInfo, which is private as well. Add a public wrapper
that returns a monitor index instead, as we do for other public
monitor-related methods.

https://bugzilla.gnome.org/show_bug.cgi?id=633994
2015-04-14 23:13:19 +02:00
Florian Müllner
f424056fea Bump version to 3.16.1
Update NEWS.
2015-04-14 22:38:41 +02:00
Rui Matos
cfb7297cf1 input-settings: Silence a glib critical
The scroll-wheel-emulation-button key is 'i' in the schema but it also
specifies a minimum range of 0 so using get_int() and casting is safe.
2015-04-14 18:27:52 +02:00
Rui Matos
8769b3d554 input-settings: Ensure that we always apply the same set of settings
This makes the hotplug and coldplug paths the same so that we don't
miss out on any setting.

https://bugzilla.gnome.org/show_bug.cgi?id=747434
2015-04-14 16:20:15 +02:00
Jasper St. Pierre
f8b82c376c cursor-tracker: Emit cursor-changed when XFixes tells us about it
Otherwise, we won't update the cursor in the magnifier / screen recorder
under X11.
2015-04-13 16:58:27 -07:00
Jonas Ådahl
868e1427a8 wayland: Rework synchronized state application semantics
When a parent of a subsurface gets it state applied (either by a
wl_surface.commit, wl_subsurface.set_desync or a recursive
wl_surface.commit on a parent surface), the pending position state
of the subsurface should be applied. If the subsurface is in effective
synchronized mode (i.e. if its in explicit synchronized mode or any of
its parent surfaces is a subsurface in explicit synchronized mode), the
cached state should also be applied at this point, including its
subsurface children, recursively.

https://bugzilla.gnome.org/show_bug.cgi?id=743617
2015-04-10 09:15:12 +08:00
Rui Matos
4aa74af694 wayland-keyboard: Disconnect from backend signals on release
Otherwise we'll access freed memory in the handlers.

The wayland keyboard is released when the seat loses the keyboard
capability which happens when leaving the VT so if there are keymap
changes while switched away from the VT we would crash.

https://bugzilla.gnome.org/show_bug.cgi?id=747263
2015-04-02 23:21:22 +02:00
Jasper St. Pierre
f3fecd478d frame: Always use the client window's visual for our frame
Since the frame is the window that's redirected, there's no reason for
it to match the root window. There *is*, however, a big incentive to
match the window's visual, since not doing so might trigger automatic
redirection.

On a specific platform, we construct a depth-32 root window, and stick a
depth-24 child window inside it. The frame ends up being created
depth-32, not depth-24, so we get automatic redirection.
2015-04-01 15:02:20 -07:00
Ray Strode
a5d1f67c34 wayland: try 50 times to create lock file again for login screen
since commit 8c16ac47c1, we started
creating the login screen on display 1024 instead of display 0.

This defeats this logic in try_display:

    display++;
    /* If display is above 50, then something's wrong. Just
     * abort in this case. */
    if (display > 50)

In practice it doesn't matter much since we only have one login
screen in most setups, but we should still fix the bug.

This commit introduces a separate counter to keep try of 50 tries,
rather than assuming "display number == number of tries".

https://bugzilla.gnome.org/show_bug.cgi?id=746545
2015-04-01 10:30:24 -04:00
Jasper St. Pierre
102fa0e373 xwayland: Don't leak the launcher 2015-03-31 11:47:34 -07:00
Jonas Ådahl
dbca3337b2 wayland: Fix damage of infinite regions
To avoid integer overflow when scaling "infinite" regions (0, 0)
(INT32_MAX, INT32_MAX), intersect with the surface rect before scaling,
instead of intersecting with the buffer rect afterwards.

https://bugzilla.gnome.org/show_bug.cgi?id=746510
2015-03-31 15:09:13 +08:00
Rui Matos
939f7ce781 meta-stage: To change the stage state we need to set the event type
https://bugzilla.gnome.org/show_bug.cgi?id=746670
2015-03-30 13:42:56 -04:00
Carlos Garnacho
c6e6ed87c5 backends: Center pointer on primary monitor on startup
This seems nicer/tidier than the current X11 (center on the span of all
monitors) or native (so close to the activities corner it's hard not
to trigger it) platform behaviors.

This code also takes over the native-specific pointer warping that
happens when the pointer was over a removed output.

https://bugzilla.gnome.org/show_bug.cgi?id=746896
2015-03-30 14:00:31 +02:00
Carlos Garnacho
8188cddcf7 backends: Add meta_monitor_manager_get_monitor_at_point()
This function returns the monitor_info index corresponding to the given
coordinates, or -1 if none is found at that point. The native backend
has been changed in places where it could make use of this function.

https://bugzilla.gnome.org/show_bug.cgi?id=746896
2015-03-30 14:00:31 +02:00
Ray Strode
9f17c05a15 wayland: manually activate/deactivate stage when taking/dropping grab
clutter currently never emits activated or deactivated signals on
the stage object when using the EGL backend. Since the stage never
gets activated, accessibility tools, like orca, don't work.

This commit makes mutter take on the responsibility, by tracking
when the stage gains/loses focus, and then synthesizing stage
CLUTTER_STAGE_STATE_ACTIVATED state events.

A limitation of this approach is that clutter's own notion of
the stage activeness won't reflect mutter's notion of the
stage activeness.  This isn't a problem, in practice, and can
be addressed in the medium-term after making changes to
clutter.

https://bugzilla.gnome.org/show_bug.cgi?id=746670
2015-03-28 11:20:48 -04:00
Calvin Walton
c3455b01af Include libXrender as a dependency, link it to libmutter
Mutter uses a function from libXrender (XRenderFindStandardFormat in
src/x11/iconcache.c), but doesn't link to libXrender. This causes
link issues on systems using the gold linker, particularly with
-Wl,--as-needed.

Since mutter is using a function from libXrender, adding 'xrender'
as a dependency seems appropriate, and fixes the issue.

https://bugzilla.gnome.org/show_bug.cgi?id=746692
2015-03-28 13:42:54 +01:00
Jasper St. Pierre
d4e8d97e58 xwayland: Port to GSubprocess 2015-03-27 13:58:56 -07:00
Jasper St. Pierre
a86368dcb1 xwayland: Prevent some boolean confusion
The original code in Weston that this was ported from returned an errno,
not a boolean, so we were inadvertently returning TRUE here during an
error path. Fix that up.
2015-03-27 13:58:56 -07:00
Giovanni Campagna
a13f906ed1 prefs: connect to changed:: before reading the value of a setting
Otherwise glib might skip registering to change notifications

https://bugzilla.gnome.org/show_bug.cgi?id=746509
2015-03-27 13:15:30 -07:00
Ondrej Holy
f9e91bf007 backends/native: Fix scroll method enums
The enums are swapped currently, because for edge scroll is enabled two finger
scroll and similary for two finger scroll is enabled edge scroll, what is
apparently wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=746870
2015-03-27 13:08:11 +01:00
Rui Matos
7c5fe42835 meta-background: Add a function to refresh all background instances
We need to reload the FBOs under some circumstances, this adds a way
to easily do so.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2015-03-25 11:48:32 +01:00
Marek Černocký
e76decbcf2 Updated Czech translation 2015-03-25 08:45:07 +01:00
Jonas Ådahl
aac5a5dcaf MetaMonitorManager: Fix comment
https://bugzilla.gnome.org/show_bug.cgi?id=744932
2015-03-25 12:30:11 +08:00
Khaled Hosny
9b3186f8a5 Update Arabic translation 2015-03-23 21:46:18 +02:00
Florian Müllner
4917e367d5 Bump version to 3.16.0
Update NEWS.
2015-03-23 18:49:57 +01:00
Muhammet Kara
955c3c7c71 Updated Turkish translation 2015-03-22 13:58:51 +00:00
Ask H. Larsen
8821162aef Updated Danish translation 2015-03-21 16:30:19 +01:00
Inaki Larranaga Murgoitio
0356f7afb3 Updated Basque language 2015-03-21 15:53:08 +01:00
Andika Triwidada
ba6fa54fdd Updated Indonesian translation 2015-03-21 12:06:37 +00:00
Jiri Grönroos
b2d4ecab30 Finnish translation update 2015-03-20 17:46:28 +02:00
Kjartan Maraas
882a222d5c Updated Norwegian bokmål translation. 2015-03-19 21:24:23 +01:00
Jonas Ådahl
7b79c44608 wayland: Don't skip notifying about initial maximized size
When a client wants to start initialized it my set the maximized state
before having attached any buffers. Before we'd not notify the client of
the new expected size if the previous size was 0x0 as it would normally
mean we'd resize to 1x1, but since this is not always the case, only
avoid notifying the client if the previous size was 0x0 and the result
is 1x1.

https://bugzilla.gnome.org/show_bug.cgi?id=745303
2015-03-17 13:51:11 -04:00
Florian Müllner
580483d516 Bump version to 3.15.92
Update NEWS.
2015-03-17 17:43:33 +01:00
Florian Müllner
57c1078ee7 theme: Scale window decorations on HiDPI displays
As we opt out of GTK+/Clutter's HiDPI handling, we need to apply the
window scaling factor manually to decorations, both the geometry and
when drawing.

https://bugzilla.gnome.org/show_bug.cgi?id=744354
2015-03-17 17:09:48 +01:00
Carlos Garnacho
3a2920d4bc backends/x11: Implement set_click_method configuration option
https://bugzilla.gnome.org/show_bug.cgi?id=746290
2015-03-16 18:05:51 +01:00
Carlos Garnacho
ad13fa3bb3 backends/native: Implement set_click_method configuration option
https://bugzilla.gnome.org/show_bug.cgi?id=746290
2015-03-16 18:05:51 +01:00
Carlos Garnacho
9b50119d31 backend: Add set_click_method MetaInputSettings vfunc
This will configure the libinput_config_click_method for touchpads.

https://bugzilla.gnome.org/show_bug.cgi?id=746290
2015-03-16 18:05:51 +01:00
Carlos Garnacho
3ff6316562 wayland: Protect against unordered destruction of surface resources
If the wl_surface resource happens to be destroyed before any other
role resource, the destructor for the latter will attempt to
access/modify random memory.

Fix this by ensuring the associated resources are destroyed on the
wl_surface destructor, this will free all associated memory and
remove the resources ahead of their imminent destruction.

https://bugzilla.gnome.org/show_bug.cgi?id=745734
2015-03-16 18:02:43 +01:00
Rui Matos
43058a3698 monitor-manager-kms: Tell cogl to ignore CRTCs when DPMS isn't ON
Otherwise cogl will try to page flip and fail.

https://bugzilla.gnome.org/show_bug.cgi?id=746098
2015-03-16 16:32:56 +01:00
Ray Strode
8c16ac47c1 wayland: don't let the login screen steal :0
In 3.16, GDM keeps a login screen running on vt1.
This login screen starts an Xwayland instance.
Since it's the first X server to start, it gets
the prized :0 display number.

This commit works around that problem, for now,
by having GDM's display number start at 1024.

https://bugzilla.gnome.org/show_bug.cgi?id=746295
2015-03-16 11:08:45 -04:00
Matej Urbančič
6880cae3fb Updated Slovenian translation 2015-03-15 14:41:22 +01:00
Jasper St. Pierre
4fc684b2ed window: Don't use C++-style comments 2015-03-14 16:03:44 -07:00
Carlos Garnacho
d63b9a1797 core: Unset all input events on the GDK connection
With all input events being handled through clutter, this only confuses
things, and most nominally, coerces touch events through places we didn't
intend to, like the window frame.

This makes again all touch events only handled in the passive grab on X11,
while the rest stays pointer (emulated) only.

https://bugzilla.gnome.org/show_bug.cgi?id=745335
2015-03-14 16:03:44 -07:00
A S Alam
72bd934604 Translation pa updated for Gnome 2015-03-13 21:31:48 -05:00
Samir Ribic
ed70e99b7b Updated Bosnian translation 2015-03-13 20:58:08 +00:00
Jasper St. Pierre
6d72b7c017 ui: Remove device events from X11 mask
These interfere with our touch handling.
2015-03-13 13:28:33 -07:00
Jasper St. Pierre
656fe49dbe ui: Fix undefined variable warning
gcc is super smart and notices that we don't have a default case here.
2015-03-13 13:28:33 -07:00
Carlos Garnacho
3471ef3441 backend: Update cursor visibility based on device availability
On startup, the cursor is kept hidden if there's any touchscreen available.
If the device that was last interacted is removed, we check on available
pointing devices though, so we don't possibly hide the pointer if there are
further mice/touchpads/etc.

Devices being added don't update cursor visibility, we wait for the user
interacting with those instead.

https://bugzilla.gnome.org/show_bug.cgi?id=712775
2015-03-13 21:04:01 +01:00
Carlos Garnacho
af9d8f1931 backends/x11: Call meta_backend_update_last_device() from XI_DeviceChanged
On X11, calling this function on meta_display_handle_events() will not catch
mouse events happening over clients, so poke directly in the backend for
XI_DeviceChanged events, which mutter will get on device switches.

The code has been slightly refactored so we deal with XIEvents at a single
handle_input_event() function.

https://bugzilla.gnome.org/show_bug.cgi?id=712775
2015-03-13 21:01:11 +01:00
Carlos Garnacho
a30ca3e62f core: Update cursor visibility on display events
https://bugzilla.gnome.org/show_bug.cgi?id=712775
2015-03-13 21:01:11 +01:00
Carlos Garnacho
9e3bac0237 backend: Add meta_backend_update_last_device()
This function can be used to trigger changes depending on the device type
that is currently emitting the events. So far, it is used to switch cursor
visibility on/off on touchscreen interaction.

A "last-device-updated" signal has also been added, in order allow hooking
other behavior changes (eg. OSK) when the last device changes.

https://bugzilla.gnome.org/show_bug.cgi?id=712775
2015-03-13 21:01:11 +01:00
Florian Müllner
67a30b7a89 window-x11: Fix height computation of shaded windows
Since commit 6e06648f7, we start out with the invisible frame parts
only, and then add the unconstrained rect's height (which consists of
the visible parts of both frame and client window) *unless* the window
is shaded. While we indeed don't want to add the client height in that
case, we need to explicitly include the visible frame parts now.

https://bugzilla.gnome.org/show_bug.cgi?id=746145
2015-03-13 14:08:12 +01:00
Carlos Garnacho
68ba45bcb2 Revert "x11: Cut some slack to clients doing slow draws/resizes"
As per https://bugzilla.gnome.org/show_bug.cgi?id=740424#c12

This reverts commit 94c3c8f412.
2015-03-12 18:41:57 +01:00
Florian Müllner
6bacbac656 theme: Stop clipping titlebar buttons
There is no good reason to do so, besides a nice way to check whether
a particular button is enabled. However there are legitimate reasons
for overdrawing like box-shadows or outlines, so remove the clip.
2015-03-11 15:26:06 +01:00
Jordi Mas
87e52b18c2 Update to Catalan translation 2015-03-10 17:34:14 -04:00
Alexander Shopov
637cc9269d Updated Bulgarian translation 2015-03-10 09:51:37 +02:00
Trần Ngọc Quân
fcdd1944a4 Updated Vietnamese translation
Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
2015-03-10 13:28:39 +07:00
Marek Chalupa
5636784604 native: make sure the pointer is in the visible area after init
The initial pointer position is set by clutter. At the moment it
is the point 16x16 on the screen. But this point is not always
in the visible area on monitors (the monotors can be arranged in
many different ways).

https://bugzilla.gnome.org/show_bug.cgi?id=745752
2015-03-09 14:26:34 +01:00
Rui Matos
9a3b178da1 backend-native: Ensure the pointer is visible on monitors-changed
Otherwise the pointer might be "lost" outside the visible area. Note
that the constraining code only ensures the pointer doesn't leave the
visible area but if the pointer is already outside because the rug was
pulled under it then it doesn't do anything.

https://bugzilla.gnome.org/show_bug.cgi?id=745121
2015-03-09 14:26:17 +01:00
Baurzhan Muftakhidinov
a1488005b6 Updated Kazakh translation 2015-03-09 10:43:25 +00:00
Jasper St. Pierre
cca68b31b1 frames: Refactor out another inner switch 2015-03-08 20:38:30 -07:00
Jasper St. Pierre
85452aff4f frames: Refactor control handling with a switch statement 2015-03-08 20:38:30 -07:00
Jasper St. Pierre
d9d83abae2 frames: Refactor frame button click handling code a title bit 2015-03-08 20:38:30 -07:00
Jasper St. Pierre
0bc6cb2aeb window: Remove the legacy get_outer_rect
It's unused in gnome-shell, and we don't care about compatibility in the
API. Don't expose it.
2015-03-08 20:38:30 -07:00
Daniel Korostil
d628cce058 Updated Ukrainian translation 2015-03-08 14:33:54 +02:00
Changwoo Ryu
b646e25fee Updated Korean translation 2015-03-08 03:44:44 +09:00
Carlos Garnacho
94c3c8f412 x11: Cut some slack to clients doing slow draws/resizes
The timer to blacklist the window from frame sync is set at the time of
issuing the sync request, but not removed until the client replies to
the most recent wait serial.

This means that if the client is slowly catching up, the timeout would
fire up regardless of the client slowly updating the alarm to older
values.

Fix this by ensuring the timeout is reset everytime the sync request
counter is updated, to acknowledge the client is not irresponsive,
just slow.

https://bugzilla.gnome.org/show_bug.cgi?id=740424
2015-03-05 17:07:32 +01:00
Carlos Garnacho
d3988c04d6 wayland: Destroy pending frame callbacks when destroying a surface
MetaWaylandFrameCallback has been added a surface field, which is then
checked when destroying the surfaces. This prevents unintended callbacks
to run after a surface has been destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=745163
2015-03-05 17:07:32 +01:00
Milo Casagrande
dd0cb55997 Updated Italian translation 2015-03-05 08:18:19 +00:00
Piotr Drąg
aef27647a0 Updated Polish translation 2015-03-05 00:24:35 +01:00
Florian Müllner
18f958d06d Bump version to 3.15.91
Update NEWS.
2015-03-04 21:00:48 +01:00
Florian Müllner
3efbb96119 build: Drop deprecated autogen.sh variables 2015-03-04 21:00:48 +01:00
Horst3180
e5d97666af Add style classes to the titlebuttons
https://bugzilla.gnome.org/show_bug.cgi?id=745108
2015-03-04 20:58:27 +01:00
Мирослав Николић
83d7e932d6 Updated Serbian translation 2015-03-04 19:50:02 +01:00
Alban Browaeys
f858f66fe0 MetaBackgroundActor: glsl: do not mix int and float.
Implicit conversion from int to float is not supported by
GLSL ES.

Fixes:
(gnome-shell:8954): Cogl-WARNING **: Shader compilation failed:
1:2: P0004: High precision not supported, instead compiling high precision as medium precision
4:17: S0001: Type mismatch in arithmetic operation between 'int' and 'float'
when one trigger the overview mode on Mali 400 r1p1 GPU.

https://bugzilla.gnome.org/show_bug.cgi?id=745442
2015-03-03 22:09:35 +01:00
Jonas Ådahl
fffb863f37 wayland: Sync surface actor state when changing main monitor
In order to switch to the correct surface actor scale given the monitor
the surface is on, without relying on the client committing a new state
given some other side effect, sync the surface actor state when the main
monitor associated with the corresponding window changed.

https://bugzilla.gnome.org/show_bug.cgi?id=744933
2015-03-03 14:53:15 -05:00
Jonas Ådahl
adf7c0e730 wayland: Fix surface damage region scales
Use the correct scale when processing damage from the client.

https://bugzilla.gnome.org/show_bug.cgi?id=744933
2015-03-03 14:53:15 -05:00
Jonas Ådahl
bbcee174ce wayland: Make the surface actor set its own state
Since the surface actor knows more about how it draws itself, instead of
pushing texture state (buffer and scale), input region and opaque region
from MetaWaylandSurface after having transformed into what the surface
actor expects, make the surface actor set its own state given what state
the Wayland surface is in.

https://bugzilla.gnome.org/show_bug.cgi?id=744933
2015-03-03 14:53:15 -05:00
Rui Matos
9c6e6ea381 monitor-manager-kms: Fix a crash getting a crtc-less output's scale
https://bugzilla.gnome.org/show_bug.cgi?id=745476
2015-03-02 18:48:56 +01:00
Rui Matos
db9645fcb3 monitor-manager-kms: Cope with non-existent connectors and encoders
DRM objects like connectors and encoders might change at any time, in
particular they might become invalid between drmModeGetResources() and
getting the actual objects in which case they'll be NULL. Be defensive
against that.

Note that, if this happens, we should get another udev event soon
which will cause us to update our state.

https://bugzilla.gnome.org/show_bug.cgi?id=745476
2015-03-02 18:48:55 +01:00
Rui Matos
6af48d75a4 monitor-manager-kms: Don't store a list of encoders
It's not needed outside of read_current() and current_encoder is
totally unused.

https://bugzilla.gnome.org/show_bug.cgi?id=745476
2015-03-02 18:48:53 +01:00
Marek Chalupa
6234f7d1db native: fix pointer constraining
fix copy-paste mistake in computing bottom constrain.
Also save few instructions by moving setting of
always-the-same value off loop.

https://bugzilla.gnome.org/show_bug.cgi?id=727337
2015-03-02 16:00:49 +01:00
Jonas Ådahl
301a65e05a backends/dummy: Set scale of dummy output
To make the nested compositor mode work again after "backends/native:
Calculate the output scale in here", set the scale when creating the
dummy output.

https://bugzilla.gnome.org/show_bug.cgi?id=745401
2015-03-02 10:58:16 +08:00
Anders Jonsson
376d4911b6 Updated Swedish translation 2015-03-01 20:23:22 +00:00
Fran Dieguez
0559d2c19f Updated Galician translations 2015-02-28 22:43:03 +01:00
Aurimas Černius
54e482bc7b Updated Lithuanian translation 2015-02-28 21:34:27 +02:00
Rafael Ferreira
37c3b79551 Updated Brazilian Portuguese translation 2015-02-26 20:39:43 +00:00
Jasper St. Pierre
78d8525699 backends/native: Calculate the output scale in here
It makes more sense as a backend thing, not a frontend thing.
2015-02-26 00:13:28 -08:00
Jasper St. Pierre
23c00688b4 launcher: Fix a gcc warning
self could be returned uninitialized.
2015-02-26 00:13:16 -08:00
Rui Matos
438410c22c window-wayland: Set transient and window type on manage() for popups
Doing this on manage() allows the common MetaWindow initialization to
do the right thing for popups like setting skip_taskbar and
skip_pager.

In particular this avoids gnome-shell's app tracker to create a new
ShellApp instance for every popup.

https://bugzilla.gnome.org/show_bug.cgi?id=745118
2015-02-25 18:25:42 +01:00
Rui Matos
59f348eb11 wayland-surface: Keep a reference to a popup's parent surface
This will allows us to access the parent while constructing the
MetaWindow.

https://bugzilla.gnome.org/show_bug.cgi?id=745118
2015-02-25 18:25:42 +01:00
Ray Strode
cbad65f657 native: don't leak logind session proxy
It's currently getting leaked in error paths

https://bugzilla.gnome.org/show_bug.cgi?id=745141
2015-02-25 10:56:50 -05:00
Yosef Or Boczko
1e8e107dd9 Updated Hebrew translation 2015-02-24 19:34:21 +02:00
Stas Solovey
8631bf2bbb Updated Russian translation 2015-02-24 09:28:43 +00:00
Claude Paroz
b9b41c20a6 Updated French translation 2015-02-24 10:08:21 +01:00
Daniel Mustieles
2d3deccd8e Updated Spanish translation 2015-02-23 19:15:50 +01:00
Balázs Úr
68289a5d61 Updated Hungarian translation 2015-02-22 19:53:28 +00:00
Jasper St. Pierre
adccbc9b7b wayland-outputs: Respect the scaling-factor override
This allows someone to explicitly set a scaling factor that overrides
the computed scale for all outputs.
2015-02-22 11:09:27 -08:00
Jasper St. Pierre
94b111cf6c wayland-outputs: Use the wrappers for post_event 2015-02-22 11:09:27 -08:00
Dušan Kazik
7303955618 Updated Slovak translation 2015-02-22 10:11:54 +00:00
Efstathios Iosifidis
5e8bb9cc9d Updated Greek translation 2015-02-21 13:43:57 +00:00
Chao-Hsiung Liao
accfdf7936 Updated Chinese (Taiwan) translation 2015-02-21 11:10:37 +00:00
122 changed files with 17777 additions and 28157 deletions

106
NEWS
View File

@@ -1,3 +1,109 @@
3.17.3
======
* Add X11/wayland clipboard interaction [Carlos; #738312]
* Support VM monitor layout hints on wayland [Thomas; #750363]
* Misc. bug fixes [Rui, Jonas, Olivier, Carlos, Ting-Wei, Peter, Florian;
#749994, #750256, #749716, #748705, #750552, #751036, #750007, #751136,
#750552, #751471, #751715, #750680]
Contributors:
Jonas Ådahl, Dave Airlie, Cosimo Cecchi, Olivier Fourdan, Carlos Garnacho,
Thomas Hellstrom, Peter Hutterer, Ting-Wei Lan, Jasper Lievisse Adriaanse,
Rui Matos, Florian Müllner, Jasper St. Pierre
Translations:
Marek Černocký [cs], Christian Kirbach [de], Pedro Albuquerque [pt]
3.17.2
======
* Honor default value for click method setting [Rui; #746290]
* Add X11/wayland clipboard interoperation [Carlos; #738312]
* Misc. bug fixes [Rui; #749076, #749711]
Contributors:
Carlos Garnacho, Rui Matos, Jasper St. Pierre
3.17.1
======
* Add public method to get neighboring monitor [Florian; #633994]
* Apply the right settings to the right input devices [Carlos; #747886]
* Fix scroll button setting [Ondrej; #747967]
* Add support for modal hint on wayland [Jonas; #745720]
* Don't reset idle time for non-hardware events [Rui; #748541]
* Misc. bug fixes [Ray, Rui; #748380, #748478]
Contributors:
Jonas Ådahl, Carlos Garnacho, Ondrej Holy, Rui Matos, Florian Müllner,
Jasper St. Pierre, Ray Strode, Tomeu Vizoso
3.16.1
======
* Add function to refresh all background instances [Rui; #739178]
* Fix swapped scroll methods on wayland [Ondrej; #746870]
* Manually activate stage to fix accessibility on wayland [Ray, Rui; #746670]
* Center pointer on primary monitor on startup [Carlos; #746896]
* wayland: Reword synchronized state application semantics [Jonas; #743617]
* Ensure input settings are applied on startup [Rui; #747434]
* Misc. bug fixes [Jonas, Giovanni, Calvin, Ray, Rui; #744932, #746509, #746692,
#746510, #746545, #747263]
Contributors:
Jonas Ådahl, Giovanni Campagna, Carlos Garnacho, Ondrej Holy, Rui Matos,
Jasper St. Pierre, Ray Strode, Calvin Walton
Translations:
Khaled Hosny [ar], Marek Černocký [cs]
3.16.0
======
* wayland: Don't skip notifying about initial maximized state [Jonas; #745303]
Contributors:
Jonas Ådahl
Translations:
Kjartan Maraas [nb], Jiri Grönroos [fi], Andika Triwidada [id],
Inaki Larranaga Murgoitio [eu], Ask H. Larsen [da], Muhammet Kara [tr]
3.15.92
=======
* Ensure pointer visibility on monitor changes [Rui, Marek; #745121, #745752]
* Fix geometry of shaded windows [Florian; #746145]
* Take over cursor visibility handling from gsd [Carlos; #712775]
* Fix touch interaction on window decorations [Carlos; #745335]
* Add options for libinput_config_click_method [Carlos; #746290]
* Scale window decorations on HiDPI displays [Florian; #744354]
* Misc. bug fixes [Carlos, Ray, Rui; #745163, #746295, #746098, #745734]
Contributors:
Marek Chalupa, Carlos Garnacho, Rui Matos, Florian Müllner,
Jasper St. Pierre, Ray Strode
Translations:
Piotr Drąg [pl], Milo Casagrande [it], Changwoo Ryu [ko],
Daniel Korostil [uk], Baurzhan Muftakhidinov [kk], Trần Ngọc Quân [vi],
Alexander Shopov [bg], Jordi Mas [ca], Samir Ribic [bs], A S Alam [pa],
Matej Urbančič [sl]
3.15.91
=======
* wayland: Fix nested compositor mode [Jonas; #745401]
* wayland: Fix pointer constraining [Marek; #727337]
* wayland: Fix input region on HiDPI [Jonas; #744933]
* Allow themes to style buttons differently based on function [Horst; #745108]
* Misc. bug fixes and cleanups [Ray, Rui, Alban; #745141, #745118, #745476,
#745442]
Contributors:
Jonas Ådahl, Alban Browaeys, Marek Chalupa, Horst, Rui Matos,
Jasper St. Pierre, Ray Strode
Translations:
Chao-Hsiung Liao [zh_TW], Efstathios Iosifidis [el], Dušan Kazik [sk],
Balázs Úr [hu], Daniel Mustieles [es], Claude Paroz [fr], Stas Solovey [ru],
Yosef Or Boczko [he], Rafael Ferreira [pt_BR], Aurimas Černius [lt],
Fran Dieguez [gl], Anders Jonsson [sv], Мирослав Николић [sr, sr@latin]
3.15.90
=======
* Initialize MetaOutput even when we can't get the EDID [Rui; #743412]

View File

@@ -4,7 +4,6 @@
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
PKG_NAME="mutter"
REQUIRED_AUTOMAKE_VERSION=1.11
(test -f $srcdir/configure.ac \
@@ -19,4 +18,4 @@ which gnome-autogen.sh || {
echo "your distribution's package manager)."
exit 1
}
USE_GNOME2_MACROS=1 USE_COMMON_DOC_BUILD=yes . gnome-autogen.sh
. gnome-autogen.sh

View File

@@ -1,8 +1,8 @@
AC_PREREQ(2.62)
m4_define([mutter_major_version], [3])
m4_define([mutter_minor_version], [15])
m4_define([mutter_micro_version], [90])
m4_define([mutter_minor_version], [17])
m4_define([mutter_micro_version], [3])
m4_define([mutter_version],
[mutter_major_version.mutter_minor_version.mutter_micro_version])
@@ -52,19 +52,6 @@ PKG_PROG_PKG_CONFIG([0.21])
# Sets GLIB_GENMARSHAL and GLIB_MKENUMS
AM_PATH_GLIB_2_0()
#### Integer sizes
AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(void *)
AC_CHECK_SIZEOF(long long)
AC_CHECK_SIZEOF(__int64)
## byte order
AC_C_BIGENDIAN
CANBERRA_GTK=libcanberra-gtk3
CANBERRA_GTK_VERSION=0.26
@@ -75,7 +62,7 @@ MUTTER_PC_MODULES="
gio-unix-2.0 >= 2.35.1
pango >= 1.2.0
cairo >= 1.10.0
gsettings-desktop-schemas >= 3.15.4
gsettings-desktop-schemas >= 3.15.92
$CLUTTER_PACKAGE >= 1.21.3
cogl-1.0 >= 1.17.1
upower-glib >= 0.99.0
@@ -90,6 +77,7 @@ MUTTER_PC_MODULES="
xkeyboard-config
xkbcommon >= 0.4.3
xkbcommon-x11
xrender
x11-xcb
xcb-randr
"
@@ -283,6 +271,8 @@ AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration,
if test "x$found_randr" = "xyes"; then
AC_DEFINE(HAVE_RANDR, , [Have the Xrandr extension library])
PKG_CHECK_EXISTS([xrandr >= 1.5.0],
AC_DEFINE([HAVE_XRANDR15],[1],[Define if you have support for XRandR 1.5 or greater]))
fi
MUTTER_LIBS="$MUTTER_LIBS $RANDR_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lm"

View File

@@ -549,7 +549,6 @@ meta_window_is_skip_taskbar
meta_window_get_rect
meta_window_get_buffer_rect
meta_window_get_frame_rect
meta_window_get_outer_rect
meta_window_client_rect_to_frame_rect
meta_window_frame_rect_to_client_rect
meta_window_get_screen

2348
po/ar.po

File diff suppressed because it is too large Load Diff

766
po/bg.po
View File

@@ -1,9 +1,9 @@
# Bulgarian translation of mutter po-file.
# Copyright (C) 2002, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
# Copyright (C) 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
# Copyright (C) 2014 Free Software Foundation, Inc.
# Copyright (C) 2014, 2015 Free Software Foundation, Inc.
# Alexander Shopov <ash@kambanaria.org>, 2002, 2006, 2007, 2009, 2010.
# Alexander Shopov <ash@kambanaria.org>, 2011, 2012, 2013, 2014.
# Alexander Shopov <ash@kambanaria.org>, 2011, 2012, 2013, 2014, 2015.
# Vladimir Petkov <kaladan@gmail.com>, 2004.
# Rostislav Raykov <zbrox@i-space.org>, 2004.
# Yavor Doganov <yavor@gnu.org>, 2008.
@@ -12,8 +12,8 @@ msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-09-25 06:27+0300\n"
"PO-Revision-Date: 2014-09-25 06:27+0300\n"
"POT-Creation-Date: 2015-03-10 09:51+0200\n"
"PO-Revision-Date: 2015-03-10 09:51+0200\n"
"Last-Translator: Alexander Shopov <ash@kambanaria.org>\n"
"Language-Team: Bulgarian <dict@fsa-bg.org>\n"
"Language: bg\n"
@@ -437,29 +437,49 @@ msgstr "Превключване към виртуална графична ко
msgid "Switch to VT 7"
msgstr "Превключване към виртуална графична конзола 7"
#: ../src/backends/meta-monitor-manager.c:412
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
msgid "Switch to VT 8"
msgstr "Превключване към виртуална графична конзола 8"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
msgid "Switch to VT 9"
msgstr "Превключване към виртуална графична конзола 9"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
msgid "Switch to VT 10"
msgstr "Превключване към виртуална графична конзола 10"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
msgid "Switch to VT 11"
msgstr "Превключване към виртуална графична конзола 11"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
msgid "Switch to VT 12"
msgstr "Превключване към виртуална графична конзола 12"
#: ../src/backends/meta-monitor-manager.c:364
msgid "Built-in display"
msgstr "Вграден екран"
#: ../src/backends/meta-monitor-manager.c:437
#: ../src/backends/meta-monitor-manager.c:391
msgid "Unknown"
msgstr "Непознат"
#: ../src/backends/meta-monitor-manager.c:439
#: ../src/backends/meta-monitor-manager.c:393
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:447
#: ../src/backends/meta-monitor-manager.c:401
#, 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:443
#: ../src/compositor/compositor.c:456
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display \"%s"
@@ -495,7 +515,7 @@ msgstr "Из_чакване"
msgid "_Force Quit"
msgstr "_Принудително спиране"
#: ../src/core/display.c:547
#: ../src/core/display.c:562
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "Неуспешно отваряне на дисплея на X Window „%s“\n"
@@ -534,19 +554,6 @@ msgstr "Wayland да е мениджър за наслагване"
msgid "Run as a full display server, rather than nested"
msgstr "Изпълнение като самостоятелен, а не вграден сървър за изобразяване"
#: ../src/core/main.c:451
#, c-format
msgid "Failed to scan themes directory: %s\n"
msgstr "Неуспешно сканиране на папката с темите: %s\n"
#: ../src/core/main.c:467
#, c-format
msgid ""
"Could not find a theme! Be sure %s exists and contains the usual themes.\n"
msgstr ""
"Не е открита тема! Проверете дали папката „%s“ съществува и съдържа "
"обичайните теми.\n"
#: ../src/core/mutter.c:39
#, c-format
msgid ""
@@ -571,718 +578,29 @@ msgstr "Отпечатване на версията на програмата"
msgid "Mutter plugin to use"
msgstr "Приставка, която да се ползва"
#: ../src/core/prefs.c:2065
#: ../src/core/prefs.c:2004
#, c-format
msgid "Workspace %d"
msgstr "Работен плот %d"
#: ../src/core/screen.c:543
#: ../src/core/screen.c:525
#, c-format
msgid ""
"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"
msgstr "Екранът %d на дисплей „%s“ е невалиден\n"
#: ../src/core/screen.c:559
#, c-format
msgid ""
"Screen %d on display \"%s\" already has a window manager; try using the --"
"replace option to replace the current window manager.\n"
msgstr ""
"Екранът %d на дисплей „%s“ вече има мениджър на прозорци; пробвайте да го "
"замените с опцията --replace.\n"
#: ../src/core/screen.c:652
#, c-format
msgid "Screen %d on display \"%s\" already has a window manager\n"
msgstr "Екран %d на дисплей „%s“ вече има мениджър за прозорци\n"
#: ../src/core/util.c:118
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter е компилиран без поддръжка на подробен режим\n"
#. Translators: This represents the size of a window. The first number is
#. * the width of the window and the second is the height.
#.
#: ../src/ui/resizepopup.c:134
#, c-format
msgid "%d x %d"
msgstr "%d×%d"
#: ../src/ui/theme.c:233
msgid "top"
msgstr "горния"
#: ../src/ui/theme.c:235
msgid "bottom"
msgstr "долния"
#: ../src/ui/theme.c:237
msgid "left"
msgstr "левия"
#: ../src/ui/theme.c:239
msgid "right"
msgstr "десния"
#: ../src/ui/theme.c:267
#, c-format
msgid "frame geometry does not specify \"%s\" dimension"
msgstr "геометрията на рамката не указва %s размер"
#: ../src/ui/theme.c:286
#, c-format
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
msgstr "геометрията на рамката не указва %s размер на %s ръб"
#: ../src/ui/theme.c:323
#, c-format
msgid "Button aspect ratio %g is not reasonable"
msgstr "Отношението на размерите на бутона %g е неподходящо"
#: ../src/ui/theme.c:335
#, c-format
msgid "Frame geometry does not specify size of buttons"
msgstr "Геометрията на рамката не указва размера на бутоните"
#: ../src/ui/theme.c:1061
#, c-format
msgid "Gradients should have at least two colors"
msgstr "Преливките трябва да имат поне два цвята"
#: ../src/ui/theme.c:1211
#, c-format
msgid ""
"GTK custom color specification must have color name and fallback in "
"parentheses, e.g. gtk:custom(foo,bar); could not parse \"%s\""
msgstr ""
"Цветовата спецификация на GTK трябва да съдържа в скоби име на основен и "
"резервен цвят: напр. gtk:custom(foo,bar). Неуспешен анализ на „%s“"
#: ../src/ui/theme.c:1227
#, c-format
msgid ""
"Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-"
"_ are valid"
msgstr ""
"Неправилен знак „%c“ в параметъра за име на цвят (color_name) на gtk:custom. "
"Позволени са само A-Za-z0-9-_."
#: ../src/ui/theme.c:1241
#, c-format
msgid ""
"Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not "
"fit the format"
msgstr ""
"Форматът на Gtk:custom е „gtk:custom(основен_цвят,резервен_цвят)“, „%s“ не "
"съответства на формата"
#: ../src/ui/theme.c:1286
#, c-format
msgid ""
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
"where NORMAL is the state; could not parse \"%s\""
msgstr ""
"Цветовата спецификация на GTK трябва да указва състоянието в квадратни "
"скоби, напр. gtk:fg[NORMAL], където NORMAL е състоянието. Неуспешен анализ "
"на „%s“"
#: ../src/ui/theme.c:1300
#, c-format
msgid ""
"GTK color specification must have a close bracket after the state, e.g. gtk:"
"fg[NORMAL] where NORMAL is the state; could not parse \"%s\""
msgstr ""
"Цветовата спецификация на GTK трябва да съдържа квадратна скоба след "
"състоянието, напр. gtk:fg[NORMAL], където NORMAL е състоянието. Неуспешен "
"анализ на „%s“"
#: ../src/ui/theme.c:1311
#, c-format
msgid "Did not understand state \"%s\" in color specification"
msgstr "Неуспешен анализ на състоянието „%s“ в цветовата спецификация"
#: ../src/ui/theme.c:1324
#, c-format
msgid "Did not understand color component \"%s\" in color specification"
msgstr "Неуспешен анализ на цветови компонент „%s“ в цветовата спецификация"
#: ../src/ui/theme.c:1352
#, c-format
msgid ""
"Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the "
"format"
msgstr ""
"Форматът на смесването е „blend/bg_color/fg_color/alpha“, „%s“ не се "
"подчинява на форма̀та"
#: ../src/ui/theme.c:1363
#, c-format
msgid "Could not parse alpha value \"%s\" in blended color"
msgstr "Неуспешен анализ на алфа стойността „%s“ в смесения цвят"
#: ../src/ui/theme.c:1373
#, c-format
msgid "Alpha value \"%s\" in blended color is not between 0.0 and 1.0"
msgstr "Алфа стойността „%s“ в смесения цвят не е между 0.0 и 1.0"
#: ../src/ui/theme.c:1419
#, c-format
msgid ""
"Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format"
msgstr ""
"Форматът на навиването е един от „shade“/„base_color“/„factor“, „%s“ не "
"съответства на формата"
#: ../src/ui/theme.c:1430
#, c-format
msgid "Could not parse shade factor \"%s\" in shaded color"
msgstr "Неуспешен анализа на фактора на навиването „%s“ в цвета за навиване"
#: ../src/ui/theme.c:1440
#, c-format
msgid "Shade factor \"%s\" in shaded color is negative"
msgstr "Факторът на навиване „%s“ в цвета за сянката е отрицателен"
#: ../src/ui/theme.c:1469
#, c-format
msgid "Could not parse color \"%s\""
msgstr "Неуспешен анализ на цвета „%s“"
#: ../src/ui/theme.c:1778
#, c-format
msgid "Coordinate expression contains character '%s' which is not allowed"
msgstr "Изразът за координати съдържа символа „%s“, който не е позволен"
#: ../src/ui/theme.c:1805
#, c-format
msgid ""
"Coordinate expression contains floating point number '%s' which could not be "
"parsed"
msgstr ""
"Изразът за координати съдържа числото с плаваща запетая „%s“, което не може "
"да бъде анализирано"
#: ../src/ui/theme.c:1819
#, c-format
msgid "Coordinate expression contains integer '%s' which could not be parsed"
msgstr ""
"Изразът за координати съдържа цялото число „%s“, което не може да бъде "
"анализирано"
#: ../src/ui/theme.c:1940
#, c-format
msgid ""
"Coordinate expression contained unknown operator at the start of this text: "
"\"%s\""
msgstr ""
"Изразът за координати съдържа непознат оператор в началото на този текст: "
"„%s“"
#: ../src/ui/theme.c:1997
#, c-format
msgid "Coordinate expression was empty or not understood"
msgstr "Изразът за координати бе празен или не бе разбран"
#: ../src/ui/theme.c:2110 ../src/ui/theme.c:2120 ../src/ui/theme.c:2154
#, c-format
msgid "Coordinate expression results in division by zero"
msgstr "Изразът за координати дава деление на нула"
#: ../src/ui/theme.c:2162
#, c-format
msgid ""
"Coordinate expression tries to use mod operator on a floating-point number"
msgstr ""
"Изразът за координати използва оператора mod върху число с плаваща запетая"
#: ../src/ui/theme.c:2218
#, c-format
msgid ""
"Coordinate expression has an operator \"%s\" where an operand was expected"
msgstr ""
"Изразът за координати използва оператора „%s“ на място, където се очаква "
"операнд"
#: ../src/ui/theme.c:2227
#, c-format
msgid "Coordinate expression had an operand where an operator was expected"
msgstr ""
"Изразът за координати използва оператор на място, където се очаква операнд"
#: ../src/ui/theme.c:2235
#, c-format
msgid "Coordinate expression ended with an operator instead of an operand"
msgstr "Изразът за координати завършва с оператор вместо с операнд"
#: ../src/ui/theme.c:2245
#, c-format
msgid ""
"Coordinate expression has operator \"%c\" following operator \"%c\" with no "
"operand in between"
msgstr ""
"Изразът за координати използва оператора „%c“ след „%c“ без да има операнд "
"между тях"
#: ../src/ui/theme.c:2396 ../src/ui/theme.c:2441
#, c-format
msgid "Coordinate expression had unknown variable or constant \"%s\""
msgstr ""
"Изразът за координати използва непознатата променлива или константа „%s“"
#: ../src/ui/theme.c:2495
#, c-format
msgid "Coordinate expression parser overflowed its buffer."
msgstr "Анализаторът на изрази за координати препълни буфера си."
#: ../src/ui/theme.c:2524
#, c-format
msgid "Coordinate expression had a close parenthesis with no open parenthesis"
msgstr "В израза за координати има затваряща скоба без съответна отваряща"
#: ../src/ui/theme.c:2588
#, c-format
msgid "Coordinate expression had an open parenthesis with no close parenthesis"
msgstr "В израза за координати има отваряща скоба без съответна затваряща"
#: ../src/ui/theme.c:2599
#, c-format
msgid "Coordinate expression doesn't seem to have any operators or operands"
msgstr "Изразът за координати не съдържа нито оператори, нито операнди"
#: ../src/ui/theme.c:2812 ../src/ui/theme.c:2832 ../src/ui/theme.c:2852
#, c-format
msgid "Theme contained an expression that resulted in an error: %s\n"
msgstr "Темата съдържа израз, който даде грешка: %s\n"
#: ../src/ui/theme.c:4455
#, c-format
msgid ""
"<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be "
"specified for this frame style"
msgstr ""
"За този стил на рамката трябва да се укаже <button function=\"%s\" state=\"%s"
"\" draw_ops=\"нещо си\"/>"
#: ../src/ui/theme.c:4970 ../src/ui/theme.c:4995
#, c-format
msgid ""
"Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
msgstr ""
"Липсва <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"нещо си\"/>"
#: ../src/ui/theme.c:5041
#, c-format
msgid "Failed to load theme \"%s\": %s\n"
msgstr "Неуспешно зареждане на темата „%s“: %s\n"
#: ../src/ui/theme.c:5177 ../src/ui/theme.c:5184 ../src/ui/theme.c:5191
#: ../src/ui/theme.c:5198 ../src/ui/theme.c:5205
#, c-format
msgid "No <%s> set for theme \"%s\""
msgstr "Не е даден елементът <%s> за темата „%s“"
#: ../src/ui/theme.c:5213
#, c-format
msgid ""
"No frame style set for window type \"%s\" in theme \"%s\", add a <window "
"type=\"%s\" style_set=\"whatever\"/> element"
msgstr ""
"Няма указан стил на рамката за „%s“ прозорците в тема „%s“. Добавете елемент "
"<window type=\"%s\" style_set=\"нещо си\"/>"
#: ../src/ui/theme.c:5620 ../src/ui/theme.c:5682 ../src/ui/theme.c:5745
#, c-format
msgid ""
"User-defined constants must begin with a capital letter; \"%s\" does not"
msgstr ""
"Константите определени от потребителя трябва да започват с главна буква, а "
"„%s“ не започва така"
#: ../src/ui/theme.c:5628 ../src/ui/theme.c:5690 ../src/ui/theme.c:5753
#, c-format
msgid "Constant \"%s\" has already been defined"
msgstr "Константата „%s“ вече е дефинирана"
#. Translators: This means that an attribute which should have been found
#. * on an XML element was not in fact found.
#.
#: ../src/ui/theme-parser.c:234
#, c-format
msgid "No \"%s\" attribute on element <%s>"
msgstr "Елементът <%s> няма атрибут „%s“"
#: ../src/ui/theme-parser.c:263 ../src/ui/theme-parser.c:281
#, c-format
msgid "Line %d character %d: %s"
msgstr "Ред %d, знак %d: %s"
#: ../src/ui/theme-parser.c:481
#, c-format
msgid "Attribute \"%s\" repeated twice on the same <%s> element"
msgstr "Атрибутът „%s“ се повтаря два пъти в един елемент <%s>"
#: ../src/ui/theme-parser.c:505 ../src/ui/theme-parser.c:554
#, c-format
msgid "Attribute \"%s\" is invalid on <%s> element in this context"
msgstr "Атрибутът „%s“ е невалиден за елемента <%s> в този контекст"
#: ../src/ui/theme-parser.c:596
#, c-format
msgid "Could not parse \"%s\" as an integer"
msgstr "„%s“ не може да се анализира като цяло число"
#: ../src/ui/theme-parser.c:605 ../src/ui/theme-parser.c:660
#, c-format
msgid "Did not understand trailing characters \"%s\" in string \"%s\""
msgstr "Крайните символи „%s“ в низа „%s“ са неразбираеми"
#: ../src/ui/theme-parser.c:615
#, c-format
msgid "Integer %ld must be positive"
msgstr "Цялото число %ld трябва да е положително"
#: ../src/ui/theme-parser.c:623
#, c-format
msgid "Integer %ld is too large, current max is %d"
msgstr "Цялото число %ld е прекалено голямо, максимумът е %d"
#: ../src/ui/theme-parser.c:651 ../src/ui/theme-parser.c:767
#, c-format
msgid "Could not parse \"%s\" as a floating point number"
msgstr "„%s“ не може да се интерпретира като число с плаваща запетая"
#: ../src/ui/theme-parser.c:682 ../src/ui/theme-parser.c:710
#, c-format
msgid "Boolean values must be \"true\" or \"false\" not \"%s\""
msgstr ""
"Булевите стойности са или „true“ (истина), или „false“ (лъжа). Не са „%s“"
#: ../src/ui/theme-parser.c:737
#, c-format
msgid "Angle must be between 0.0 and 360.0, was %g\n"
msgstr "Ъгълът трябва да е между 0.0 и 360.0, а е %g\n"
#: ../src/ui/theme-parser.c:800
#, c-format
msgid "Alpha must be between 0.0 (invisible) and 1.0 (fully opaque), was %g\n"
msgstr ""
"Алфа трябва да е между 0.0 (пълна прозрачност) и 1.0 (пълна непрозрачност), "
"а е %g\n"
#: ../src/ui/theme-parser.c:865
#, c-format
msgid ""
"Invalid title scale \"%s\" (must be one of xx-small,x-small,small,medium,"
"large,x-large,xx-large)\n"
msgstr ""
"Невалидно увеличение на заглавието „%s“ (трябва да е едно от „xx-small“ (най-"
"малко), „x-small“ (много малко), „small“ (малко), „medium“ (средно), "
"„large“ (голямо), „x-large“ (много голямо), „xx-large“ (най-голямо))\n"
#: ../src/ui/theme-parser.c:1021 ../src/ui/theme-parser.c:1084
#: ../src/ui/theme-parser.c:1118 ../src/ui/theme-parser.c:1221
#, c-format
msgid "<%s> name \"%s\" used a second time"
msgstr "Името „%2$s“ на <%1$s> е използвано втори път"
#: ../src/ui/theme-parser.c:1033 ../src/ui/theme-parser.c:1130
#: ../src/ui/theme-parser.c:1233
#, c-format
msgid "<%s> parent \"%s\" has not been defined"
msgstr "Родителят „%2$s“ на <%1$s> не е дефиниран"
#: ../src/ui/theme-parser.c:1143
#, c-format
msgid "<%s> geometry \"%s\" has not been defined"
msgstr "Геометрията „%2$s“ на <%1$s> не е дефинирана"
#: ../src/ui/theme-parser.c:1156
#, c-format
msgid "<%s> must specify either a geometry or a parent that has a geometry"
msgstr "<%s> трябва да указва или геометрия, или родител с геометрия"
#: ../src/ui/theme-parser.c:1198
msgid "You must specify a background for an alpha value to be meaningful"
msgstr "За да бъде алфа стойността валидна, трябва да е указан фон"
#: ../src/ui/theme-parser.c:1266
#, c-format
msgid "Unknown type \"%s\" on <%s> element"
msgstr "Непознат вид „%s“ на елемента <%s>"
#: ../src/ui/theme-parser.c:1277
#, c-format
msgid "Unknown style_set \"%s\" on <%s> element"
msgstr "Непознат style_set „%s“ на елемента <%s>"
#: ../src/ui/theme-parser.c:1285
#, c-format
msgid "Window type \"%s\" has already been assigned a style set"
msgstr "Видът прозорци „%s“ вече има установен вид на стила"
#: ../src/ui/theme-parser.c:1315 ../src/ui/theme-parser.c:1379
#: ../src/ui/theme-parser.c:1605 ../src/ui/theme-parser.c:2840
#: ../src/ui/theme-parser.c:2886 ../src/ui/theme-parser.c:3036
#: ../src/ui/theme-parser.c:3272 ../src/ui/theme-parser.c:3310
#: ../src/ui/theme-parser.c:3348 ../src/ui/theme-parser.c:3386
#, c-format
msgid "Element <%s> is not allowed below <%s>"
msgstr "Елементът <%s> не е позволен под <%s>"
#: ../src/ui/theme-parser.c:1429 ../src/ui/theme-parser.c:1443
#: ../src/ui/theme-parser.c:1488
msgid ""
"Cannot specify both \"button_width\"/\"button_height\" and \"aspect_ratio\" "
"for buttons"
msgstr ""
"Не може да се указват едновременно и двата размера („button_width“, "
"„button_height“ — височина и широчина на бутоните), и съотношението на "
"размерите им — „aspect_ratio“"
#: ../src/ui/theme-parser.c:1452
#, c-format
msgid "Distance \"%s\" is unknown"
msgstr "Разстоянието „%s“ е неизвестно"
#: ../src/ui/theme-parser.c:1497
#, c-format
msgid "Aspect ratio \"%s\" is unknown"
msgstr "Пропорцията „%s“ е неизвестна"
#: ../src/ui/theme-parser.c:1559
#, c-format
msgid "Border \"%s\" is unknown"
msgstr "Границата „%s“ е непозната"
#: ../src/ui/theme-parser.c:1870
#, c-format
msgid "No \"start_angle\" or \"from\" attribute on element <%s>"
msgstr "Елементът <%s> няма атрибут „start_angle“ или „from“"
#: ../src/ui/theme-parser.c:1877
#, c-format
msgid "No \"extent_angle\" or \"to\" attribute on element <%s>"
msgstr "Елементът <%s> няма атрибут „extent_angle“ или „to“"
#: ../src/ui/theme-parser.c:2117
#, c-format
msgid "Did not understand value \"%s\" for type of gradient"
msgstr "Стойността „%s“ не може да се анализира като вид градиент"
#: ../src/ui/theme-parser.c:2195 ../src/ui/theme-parser.c:2570
#, c-format
msgid "Did not understand fill type \"%s\" for <%s> element"
msgstr "Непознато запълване „%s“ за елемента <%s>"
#: ../src/ui/theme-parser.c:2362 ../src/ui/theme-parser.c:2445
#: ../src/ui/theme-parser.c:2508
#, c-format
msgid "Did not understand state \"%s\" for <%s> element"
msgstr "Неуспешен анализ на състоянието „%s“ на елемента <%s>"
#: ../src/ui/theme-parser.c:2372 ../src/ui/theme-parser.c:2455
#, c-format
msgid "Did not understand shadow \"%s\" for <%s> element"
msgstr "Неуспешен анализ на сянката „%s“ на елемента <%s>"
#: ../src/ui/theme-parser.c:2382
#, c-format
msgid "Did not understand arrow \"%s\" for <%s> element"
msgstr "Неуспешен анализ на стрелката „%s“ на елемента <%s>"
#: ../src/ui/theme-parser.c:2696 ../src/ui/theme-parser.c:2792
#, c-format
msgid "No <draw_ops> called \"%s\" has been defined"
msgstr "Няма дефинирани <draw_ops> с име „%s“"
#: ../src/ui/theme-parser.c:2708 ../src/ui/theme-parser.c:2804
#, c-format
msgid "Including draw_ops \"%s\" here would create a circular reference"
msgstr "Включването на draw_ops „%s“ тук би предизвикало циклична зависимост"
#: ../src/ui/theme-parser.c:2919
#, c-format
msgid "Unknown position \"%s\" for frame piece"
msgstr "Непозната позиция „%s“ за елемент на рамката"
#: ../src/ui/theme-parser.c:2927
#, c-format
msgid "Frame style already has a piece at position %s"
msgstr "Стилът на рамката вече има елемент на позицията %s"
#: ../src/ui/theme-parser.c:2944 ../src/ui/theme-parser.c:3021
#, c-format
msgid "No <draw_ops> with the name \"%s\" has been defined"
msgstr "Няма дефиниран <draw_ops> с името „%s“"
#: ../src/ui/theme-parser.c:2974
#, c-format
msgid "Unknown function \"%s\" for button"
msgstr "Непозната функция „%s“ за бутона"
#: ../src/ui/theme-parser.c:2984
#, c-format
msgid "Button function \"%s\" does not exist in this version (%d, need %d)"
msgstr ""
"Функцията на бутона „%s“ не съществува в тази версия (%d, а трябва да е %d)"
#: ../src/ui/theme-parser.c:2996
#, c-format
msgid "Unknown state \"%s\" for button"
msgstr "Непознато състояние „%s“ за бутона"
#: ../src/ui/theme-parser.c:3004
#, c-format
msgid "Frame style already has a button for function %s state %s"
msgstr "Стилът на рамката има бутон за функция %s, състояние %s"
#: ../src/ui/theme-parser.c:3075
#, c-format
msgid "\"%s\" is not a valid value for focus attribute"
msgstr "„%s“ не е валидна стойност за атрибута фокус"
#: ../src/ui/theme-parser.c:3084
#, c-format
msgid "\"%s\" is not a valid value for state attribute"
msgstr "„%s“ не е валидна стойност за атрибута състояние"
#: ../src/ui/theme-parser.c:3094
#, c-format
msgid "A style called \"%s\" has not been defined"
msgstr "Не е дефиниран стил на име „%s“"
#: ../src/ui/theme-parser.c:3115 ../src/ui/theme-parser.c:3138
#, c-format
msgid "\"%s\" is not a valid value for resize attribute"
msgstr "„%s“ не е валидна стойност за атрибута оразмеряване"
#: ../src/ui/theme-parser.c:3149
#, c-format
msgid ""
"Should not have \"resize\" attribute on <%s> element for maximized/shaded "
"states"
msgstr ""
"Елементът <%s> не трябва да има атрибут „resize“ за състоянията максимизиран/"
"засенчен"
#: ../src/ui/theme-parser.c:3163
#, c-format
msgid ""
"Should not have \"resize\" attribute on <%s> element for maximized states"
msgstr ""
"Елементът <%s> не трябва да има атрибут „resize“ за състоянието максимизиран"
#: ../src/ui/theme-parser.c:3177 ../src/ui/theme-parser.c:3221
#, c-format
msgid "Style has already been specified for state %s resize %s focus %s"
msgstr "Вече е указан стил за състояние %s, оразмеряване %s, фокус %s"
#: ../src/ui/theme-parser.c:3188 ../src/ui/theme-parser.c:3199
#: ../src/ui/theme-parser.c:3210 ../src/ui/theme-parser.c:3232
#: ../src/ui/theme-parser.c:3243 ../src/ui/theme-parser.c:3254
#, c-format
msgid "Style has already been specified for state %s focus %s"
msgstr "Вече е указан стил за състояние %s, фокус %s"
#: ../src/ui/theme-parser.c:3293
msgid ""
"Can't have a two draw_ops for a <piece> element (theme specified a draw_ops "
"attribute and also a <draw_ops> element, or specified two elements)"
msgstr ""
"Не може да има два draw_ops за елемент <piece> (темата е указала атрибут "
"draw_ops и елемент <draw_ops> или два елемента)"
#: ../src/ui/theme-parser.c:3331
msgid ""
"Can't have a two draw_ops for a <button> element (theme specified a draw_ops "
"attribute and also a <draw_ops> element, or specified two elements)"
msgstr ""
"Не може да има два draw_ops за елемент <button> (темата е указала атрибут "
"draw_ops и елемент <draw_ops> или два елемента)"
#: ../src/ui/theme-parser.c:3369
msgid ""
"Can't have a two draw_ops for a <menu_icon> element (theme specified a "
"draw_ops attribute and also a <draw_ops> element, or specified two elements)"
msgstr ""
"Не може да има два draw_ops за елемент <menu_icon> (темата е указала атрибут "
"draw_ops и елемент <draw_ops> или два елемента)"
#: ../src/ui/theme-parser.c:3433
#, c-format
msgid "Bad version specification '%s'"
msgstr "Неправилна версия „%s“"
#: ../src/ui/theme-parser.c:3506
msgid ""
"\"version\" attribute cannot be used in metacity-theme-1.xml or metacity-"
"theme-2.xml"
msgstr ""
"Атрибутът „version“ (версия) не може да се използва в in metacity-theme-1."
"xml или metacity-theme-2.xml"
#: ../src/ui/theme-parser.c:3529
#, c-format
msgid "Theme requires version %s but latest supported theme version is %d.%d"
msgstr "Темата изисква версия %s, но най-високата поддържана версия е %d.%d"
#: ../src/ui/theme-parser.c:3561
#, c-format
msgid "Outermost element in theme must be <metacity_theme> not <%s>"
msgstr "Най-външният елемент в темата трябва да е <metacity_theme>, а не <%s>"
#: ../src/ui/theme-parser.c:3581
#, c-format
msgid ""
"Element <%s> is not allowed inside a name/author/date/description element"
msgstr "Елементът <%s> не е разрешен в елементите name/author/date/description"
#: ../src/ui/theme-parser.c:3586
#, c-format
msgid "Element <%s> is not allowed inside a <constant> element"
msgstr "Елементът <%s> не е позволен в <constant> елемент"
#: ../src/ui/theme-parser.c:3598
#, c-format
msgid ""
"Element <%s> is not allowed inside a distance/border/aspect_ratio element"
msgstr "Елементът <%s> не е позволен в елемент distance/border/aspect_ratio"
#: ../src/ui/theme-parser.c:3620
#, c-format
msgid "Element <%s> is not allowed inside a draw operation element"
msgstr "Елементът <%s> не е позволен в елемент с операция за чертане"
#: ../src/ui/theme-parser.c:3630 ../src/ui/theme-parser.c:3660
#: ../src/ui/theme-parser.c:3665 ../src/ui/theme-parser.c:3670
#, c-format
msgid "Element <%s> is not allowed inside a <%s> element"
msgstr "Елементът <%s> не е позволен в елемент <%s>"
#: ../src/ui/theme-parser.c:3898
msgid "No draw_ops provided for frame piece"
msgstr "Няма draw_ops за детайл от рамката"
#: ../src/ui/theme-parser.c:3913
msgid "No draw_ops provided for button"
msgstr "Няма draw_ops за бутон"
#: ../src/ui/theme-parser.c:3967
#, c-format
msgid "No text is allowed inside element <%s>"
msgstr "Не е позволен текст в елемента <%s>"
#: ../src/ui/theme-parser.c:4025 ../src/ui/theme-parser.c:4037
#: ../src/ui/theme-parser.c:4049 ../src/ui/theme-parser.c:4061
#: ../src/ui/theme-parser.c:4073
#, c-format
msgid "<%s> specified twice for this theme"
msgstr "<%s> е указан два пъти за тази тема"
#: ../src/ui/theme-parser.c:4335
#, c-format
msgid "Failed to find a valid file for theme %s\n"
msgstr "Не е намерен валиден файл за темата %s\n"
#: ../src/x11/session.c:1815
msgid ""
"These windows do not support &quot;save current setup&quot; and will have to "
@@ -1291,7 +609,7 @@ msgstr ""
"Тези прозорци не поддържат операцията по записване на текущото състояние и "
"ще трябва да се стартират ръчно при следващото ви влизане."
#: ../src/x11/window-props.c:558
#: ../src/x11/window-props.c:549
#, c-format
msgid "%s (on %s)"
msgstr "%s (от %s)"

3787
po/bs.po

File diff suppressed because it is too large Load Diff

1258
po/ca.po

File diff suppressed because it is too large Load Diff

102
po/cs.po
View File

@@ -12,7 +12,7 @@ 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: 2015-01-06 22:57+0000\n"
"POT-Creation-Date: 2015-03-24 23:25+0000\n"
"PO-Revision-Date: 2014-09-22 15:01+0200\n"
"Last-Translator: Petr Kovar <pknbe@volny.cz>\n"
"Language-Team: Czech <gnome-cs-list@gnome.org>\n"
@@ -30,91 +30,91 @@ msgstr "Navigace"
#: ../data/50-mutter-navigation.xml.in.h:2
msgid "Move window to workspace 1"
msgstr "Přesunout okno na plochu 1"
msgstr "Přesunout okno na pracovní plochu 1"
#: ../data/50-mutter-navigation.xml.in.h:3
msgid "Move window to workspace 2"
msgstr "Přesunout okno na plochu 2"
msgstr "Přesunout okno na pracovní plochu 2"
#: ../data/50-mutter-navigation.xml.in.h:4
msgid "Move window to workspace 3"
msgstr "Přesunout okno na plochu 3"
msgstr "Přesunout okno na pracovní plochu 3"
#: ../data/50-mutter-navigation.xml.in.h:5
msgid "Move window to workspace 4"
msgstr "Přesunout okno na plochu 4"
msgstr "Přesunout okno na pracovní plochu 4"
#: ../data/50-mutter-navigation.xml.in.h:6
msgid "Move window to last workspace"
msgstr "Přesunout okno na poslední plochu"
msgstr "Přesunout okno na poslední pracovní plochu"
#: ../data/50-mutter-navigation.xml.in.h:7
msgid "Move window one workspace to the left"
msgstr "Přesunout okno o plochu doleva"
msgstr "Přesunout okno o jednu pracovní plochu doleva"
#: ../data/50-mutter-navigation.xml.in.h:8
msgid "Move window one workspace to the right"
msgstr "Přesunout okno o plochu doprava"
msgstr "Přesunout okno o jednu pracovní plochu doprava"
#: ../data/50-mutter-navigation.xml.in.h:9
msgid "Move window one workspace up"
msgstr "Přesunout okno o plochu nahoru"
msgstr "Přesunout okno o jednu pracovní plochu nahoru"
#: ../data/50-mutter-navigation.xml.in.h:10
msgid "Move window one workspace down"
msgstr "Přesunout okno o plochu dolů"
msgstr "Přesunout okno o jednu pracovní plochu dolů"
#: ../data/50-mutter-navigation.xml.in.h:11
msgid "Move window one monitor to the left"
msgstr "Přesunout okno o monitor doleva"
msgstr "Přesunout okno o jeden monitor doleva"
#: ../data/50-mutter-navigation.xml.in.h:12
msgid "Move window one monitor to the right"
msgstr "Přesunout okno o monitor doprava"
msgstr "Přesunout okno o jeden monitor doprava"
#: ../data/50-mutter-navigation.xml.in.h:13
msgid "Move window one monitor up"
msgstr "Přesunout okno o monitor nahoru"
msgstr "Přesunout okno o jeden monitor nahoru"
#: ../data/50-mutter-navigation.xml.in.h:14
msgid "Move window one monitor down"
msgstr "Přesunout okno o monitor dolů"
msgstr "Přesunout okno o jeden monitor dolů"
#: ../data/50-mutter-navigation.xml.in.h:15
msgid "Switch applications"
msgstr "Přepnout mezi aplikacemi"
msgstr "Přepnout do jiné aplikace"
#: ../data/50-mutter-navigation.xml.in.h:16
msgid "Switch to previous application"
msgstr "Přepnout na předchozí aplikaci"
msgstr "Přepnout do předchozí aplikaci"
#: ../data/50-mutter-navigation.xml.in.h:17
msgid "Switch windows"
msgstr "Přepnout mezi okny"
msgstr "Přepnout do jiného okna"
#: ../data/50-mutter-navigation.xml.in.h:18
msgid "Switch to previous window"
msgstr "Přepnout na předchozí okno"
msgstr "Přepnout do minulého okna"
#: ../data/50-mutter-navigation.xml.in.h:19
msgid "Switch windows of an application"
msgstr "Přepnout mezi okny aplikace"
msgstr "Přepnout do jiného okna aplikace"
#: ../data/50-mutter-navigation.xml.in.h:20
msgid "Switch to previous window of an application"
msgstr "Přepnout na předchozí okno aplikace"
msgstr "Přepnout do předchozího okna aplikace"
#: ../data/50-mutter-navigation.xml.in.h:21
msgid "Switch system controls"
msgstr "Přepnout mezi systémovými ovládacími prvky"
msgstr "Přepnout na systémový ovládací prvek"
#: ../data/50-mutter-navigation.xml.in.h:22
msgid "Switch to previous system control"
msgstr "Přepnout na předchozí systémové ovládací prvky"
msgstr "Přepnout na minulý systémový ovládací prvek"
#: ../data/50-mutter-navigation.xml.in.h:23
msgid "Switch windows directly"
msgstr "Přepnout přímo mezi okny"
msgstr "Přepnout do minulého okna"
#: ../data/50-mutter-navigation.xml.in.h:24
msgid "Switch directly to previous window"
@@ -122,15 +122,15 @@ msgstr "Přepnout přímo na předchozí okno"
#: ../data/50-mutter-navigation.xml.in.h:25
msgid "Switch windows of an app directly"
msgstr "Přepnout přímo mezi okny aplikace"
msgstr "Přepnout do jiného okna aplikace"
#: ../data/50-mutter-navigation.xml.in.h:26
msgid "Switch directly to previous window of an app"
msgstr "Přepnout přímo na předchozí okno aplikace"
msgstr "Přepnout do předchozího okna aplikace"
#: ../data/50-mutter-navigation.xml.in.h:27
msgid "Switch system controls directly"
msgstr "Přepnout přímo mezi systémovými ovládacími prvky"
msgstr "Přepnout na minulý systémový ovládací prvek"
#: ../data/50-mutter-navigation.xml.in.h:28
msgid "Switch directly to previous system control"
@@ -198,7 +198,7 @@ msgstr "Aktivovat nabídku okna"
#: ../data/50-mutter-windows.xml.in.h:3
msgid "Toggle fullscreen mode"
msgstr "Přepnout režim na celou obrazovku"
msgstr "Přepnout režim celé obrazovky"
#: ../data/50-mutter-windows.xml.in.h:4
msgid "Toggle maximization state"
@@ -210,7 +210,7 @@ msgstr "Maximalizovat okno"
#: ../data/50-mutter-windows.xml.in.h:6
msgid "Restore window"
msgstr "Obnovit okno"
msgstr "Obnovit velikost okna"
#: ../data/50-mutter-windows.xml.in.h:7
msgid "Toggle shaded state"
@@ -234,20 +234,20 @@ msgstr "Změnit velikost okna"
#: ../data/50-mutter-windows.xml.in.h:12
msgid "Toggle window on all workspaces or one"
msgstr "Přepnout výskyt okna na všech plochách nebo jen na jedné"
msgstr "Přepnout okno na všechny/jednu pracovní plochu"
#: ../data/50-mutter-windows.xml.in.h:13
msgid "Raise window if covered, otherwise lower it"
msgstr ""
"Přenést okno do popředí, pokud je zakryté, jinak jej odsunout do pozadí"
"Když je okno zakryté vynést jej do popředí, jinak odsunout do pozadí"
#: ../data/50-mutter-windows.xml.in.h:14
msgid "Raise window above other windows"
msgstr "Přenést okno do popředí nad ostatní okna"
msgstr "Vynést okno do popředí nad ostatní okna"
#: ../data/50-mutter-windows.xml.in.h:15
msgid "Lower window below other windows"
msgstr "Odsunout okno do pozadí pod ostatní okna"
msgstr "Odsunout okno do pozadí za ostatní okna"
#: ../data/50-mutter-windows.xml.in.h:16
msgid "Maximize window vertically"
@@ -259,11 +259,11 @@ msgstr "Maximalizovat okno vodorovně"
#: ../data/50-mutter-windows.xml.in.h:18
msgid "View split on left"
msgstr "Zobrazit rozdělení nalevo"
msgstr "Rozdělit okno přes levou půlku obrazovky"
#: ../data/50-mutter-windows.xml.in.h:19
msgid "View split on right"
msgstr "Zobrazit rozdělení napravo"
msgstr "Rozdělit okno přes pravou půlku obrazovky"
#: ../data/mutter.desktop.in.h:1
msgid "Mutter"
@@ -437,22 +437,42 @@ msgstr "Přepnout na VT 6"
msgid "Switch to VT 7"
msgstr "Přepnout na VT 7"
#: ../src/backends/meta-monitor-manager.c:351
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
msgid "Switch to VT 8"
msgstr "Přepnout na VT 8"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
msgid "Switch to VT 9"
msgstr "Přepnout na VT 9"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
msgid "Switch to VT 10"
msgstr "Přepnout na VT 10"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
msgid "Switch to VT 11"
msgstr "Přepnout na VT 11"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
msgid "Switch to VT 12"
msgstr "Přepnout na VT 12"
#: ../src/backends/meta-monitor-manager.c:364
msgid "Built-in display"
msgstr "Vestavěný displej"
#: ../src/backends/meta-monitor-manager.c:378
#: ../src/backends/meta-monitor-manager.c:391
msgid "Unknown"
msgstr "Neznámý"
#: ../src/backends/meta-monitor-manager.c:380
#: ../src/backends/meta-monitor-manager.c:393
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:388
#: ../src/backends/meta-monitor-manager.c:401
#, c-format
msgid "%s %s"
msgstr "%s %s"
@@ -495,7 +515,7 @@ msgstr "_Počkat"
msgid "_Force Quit"
msgstr "_Vynutit ukončení"
#: ../src/core/display.c:561
#: ../src/core/display.c:562
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "Nelze otevřít displej X Window System „%s“\n"
@@ -556,7 +576,7 @@ msgstr "Vypíše verzi"
msgid "Mutter plugin to use"
msgstr "Zásuvný modul Mutter, který se má použít"
#: ../src/core/prefs.c:2015
#: ../src/core/prefs.c:2004
#, c-format
msgid "Workspace %d"
msgstr "Plocha %d"
@@ -587,7 +607,7 @@ msgstr ""
"Tato okna nepodporují &quot;ukládání aktuálního nastavení&quot; a po vašem "
"příštím přihlášení je budete muset spustit ručně."
#: ../src/x11/window-props.c:558
#: ../src/x11/window-props.c:549
#, c-format
msgid "%s (on %s)"
msgstr "%s (na %s)"

1224
po/da.po

File diff suppressed because it is too large Load Diff

1283
po/de.po

File diff suppressed because it is too large Load Diff

1321
po/el.po

File diff suppressed because it is too large Load Diff

View File

@@ -14,8 +14,8 @@ msgstr ""
"Project-Id-Version: mutter.master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2015-01-11 22:56+0000\n"
"PO-Revision-Date: 2015-01-12 12:14+0100\n"
"POT-Creation-Date: 2015-02-23 11:10+0000\n"
"PO-Revision-Date: 2015-02-23 19:07+0100\n"
"Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n"
"Language-Team: Español; Castellano <gnome-es-list@gnome.org>\n"
"Language: \n"
@@ -444,22 +444,47 @@ msgstr "Cambiar al VT 6"
msgid "Switch to VT 7"
msgstr "Cambiar al VT 7"
#: ../src/backends/meta-monitor-manager.c:351
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
#| msgid "Switch to VT 1"
msgid "Switch to VT 8"
msgstr "Cambiar al VT 8"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
#| msgid "Switch to VT 1"
msgid "Switch to VT 9"
msgstr "Cambiar al VT 9"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
#| msgid "Switch to VT 1"
msgid "Switch to VT 10"
msgstr "Cambiar al VT 10"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
#| msgid "Switch to VT 1"
msgid "Switch to VT 11"
msgstr "Cambiar al VT 11"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
#| msgid "Switch to VT 1"
msgid "Switch to VT 12"
msgstr "Cambiar al VT 12"
#: ../src/backends/meta-monitor-manager.c:364
msgid "Built-in display"
msgstr "Pantalla integrada"
#: ../src/backends/meta-monitor-manager.c:378
#: ../src/backends/meta-monitor-manager.c:391
msgid "Unknown"
msgstr "Desconocida"
#: ../src/backends/meta-monitor-manager.c:380
#: ../src/backends/meta-monitor-manager.c:393
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:388
#: ../src/backends/meta-monitor-manager.c:401
#, c-format
msgid "%s %s"
msgstr "%s %s"
@@ -504,7 +529,7 @@ msgstr "_Esperar"
msgid "_Force Quit"
msgstr "_Forzar la salida"
#: ../src/core/display.c:561
#: ../src/core/display.c:562
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "Ocurrió un error al abrir la pantalla de X Window System «%s»\n"
@@ -571,9 +596,6 @@ msgstr "Área de trabajo %d"
#: ../src/core/screen.c:525
#, c-format
#| msgid ""
#| "Screen %d on display \"%s\" already has a window manager; try using the --"
#| "replace option to replace the current window manager.\n"
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
"to replace the current window manager."
@@ -598,7 +620,7 @@ msgstr ""
"Estas ventanas no soportan «guardar la configuración actual» y tendrán que "
"reiniciarse manualmente la próxima vez que inicie una sesión."
#: ../src/x11/window-props.c:558
#: ../src/x11/window-props.c:549
#, c-format
msgid "%s (on %s)"
msgstr "%s (on %s)"

View File

@@ -11,8 +11,8 @@ msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2015-01-08 18:46+0100\n"
"PO-Revision-Date: 2015-01-08 18:47+0100\n"
"POT-Creation-Date: 2015-03-21 15:50+0100\n"
"PO-Revision-Date: 2015-03-21 15:51+0100\n"
"Last-Translator: Iñaki Larrañaga Murgoitio <dooteo@zundan.com>\n"
"Language-Team: Basque <librezale@librezale.org>\n"
"Language: eu\n"
@@ -435,22 +435,42 @@ msgstr "Aldatu 6. TBra"
msgid "Switch to VT 7"
msgstr "Aldatu 7. TBra"
#: ../src/backends/meta-monitor-manager.c:351
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
msgid "Switch to VT 8"
msgstr "Aldatu 8. TBra"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
msgid "Switch to VT 9"
msgstr "Aldatu 9. TBra"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
msgid "Switch to VT 10"
msgstr "Aldatu 10. TBra"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
msgid "Switch to VT 11"
msgstr "Aldatu 11. TBra"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
msgid "Switch to VT 12"
msgstr "Aldatu 12. TBra"
#: ../src/backends/meta-monitor-manager.c:364
msgid "Built-in display"
msgstr "Bertako pantaila"
#: ../src/backends/meta-monitor-manager.c:378
#: ../src/backends/meta-monitor-manager.c:391
msgid "Unknown"
msgstr "Ezezaguna"
#: ../src/backends/meta-monitor-manager.c:380
#: ../src/backends/meta-monitor-manager.c:393
msgid "Unknown Display"
msgstr "Pantaila ezezaguna"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: ../src/backends/meta-monitor-manager.c:388
#: ../src/backends/meta-monitor-manager.c:401
#, c-format
msgid "%s %s"
msgstr "%s %s"
@@ -495,7 +515,7 @@ msgstr "_Itxaron"
msgid "_Force Quit"
msgstr "_Behartu ixtera"
#: ../src/core/display.c:561
#: ../src/core/display.c:562
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "Huts egin du X Window sistemaren '%s' pantaila irekitzean\n"
@@ -566,8 +586,8 @@ msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
"to replace the current window manager."
msgstr ""
"'%s' pantailak badu leiho-kudeatzailea; erabili --replace aukera "
"uneko leiho-kudeatzailea ordezteko."
"'%s' pantailak badu leiho-kudeatzailea; erabili --replace aukera uneko leiho-"
"kudeatzailea ordezteko."
#: ../src/core/screen.c:607
#, c-format
@@ -586,7 +606,7 @@ msgstr ""
"Leiho hauek ez dute onartzen &quot;gorde uneko konfigurazioa&quot; eta eskuz "
"berrabiarazi beharko dituzu hurrengo saioa hasten duzunean."
#: ../src/x11/window-props.c:558
#: ../src/x11/window-props.c:549
#, c-format
msgid "%s (on %s)"
msgstr "%s (%s)"

1248
po/fi.po

File diff suppressed because it is too large Load Diff

818
po/fr.po
View File

@@ -1,5 +1,5 @@
# French translation of mutter.
# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# Copyright (C) 2002-2015 Free Software Foundation, Inc.
# This file is distributed under the same license as the metacity package.
#
# Christophe Fergeau <teuf@users.sourceforge.net>, 2002.
@@ -11,17 +11,16 @@
# Cyprien Le Pannérer <cyplp@free.fr>, 2006.
# Robert-André Mauchin <zebob.m@gmail.com>, 2007.
# Stéphane Raimbault <stephane.raimbault@gmail.com>, 2007.
# Claude Paroz <claude@2xlibre.net>, 2008-2014.
# Claude Paroz <claude@2xlibre.net>, 2008-2015.
# Bruno Brouard <annoa.b@gmail.com>, 2011-12.
#
msgid ""
msgstr ""
"Project-Id-Version: mutter masterReport-Msgid-Bugs-To: http://bugzilla.gnome."
"org/enter_bug.cgi?product=mutter&component=general\n"
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2014-08-29 21:52+0000\n"
"PO-Revision-Date: 2014-08-30 11:59+0200\n"
"POT-Creation-Date: 2015-02-23 23:11+0000\n"
"PO-Revision-Date: 2015-02-24 10:08+0100\n"
"Last-Translator: Claude Paroz <claude@2xlibre.net>\n"
"Language-Team: GNOME French Team <gnomefr@traduc.org>\n"
"Language: fr\n"
@@ -408,8 +407,8 @@ msgid ""
"When true, the new windows will always be put in the center of the active "
"screen of the monitor."
msgstr ""
"Si true (vrai), les nouvelles fenêtres seront toujours placées au centre "
"de l'écran actif du moniteur."
"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.h:21
msgid "Select window from tab popup"
@@ -449,29 +448,49 @@ msgstr "Passer à l'émulateur de terminal 6"
msgid "Switch to VT 7"
msgstr "Passer à l'émulateur de terminal 7"
#: ../src/backends/meta-monitor-manager.c:412
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
msgid "Switch to VT 8"
msgstr "Passer à l'émulateur de terminal 8"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
msgid "Switch to VT 9"
msgstr "Passer à l'émulateur de terminal 9"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
msgid "Switch to VT 10"
msgstr "Passer à l'émulateur de terminal 10"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
msgid "Switch to VT 11"
msgstr "Passer à l'émulateur de terminal 11"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
msgid "Switch to VT 12"
msgstr "Passer à l'émulateur de terminal 12"
#: ../src/backends/meta-monitor-manager.c:364
msgid "Built-in display"
msgstr "Affichage intégré"
#: ../src/backends/meta-monitor-manager.c:437
#: ../src/backends/meta-monitor-manager.c:391
msgid "Unknown"
msgstr "Inconnu"
#: ../src/backends/meta-monitor-manager.c:439
#: ../src/backends/meta-monitor-manager.c:393
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:447
#: ../src/backends/meta-monitor-manager.c:401
#, 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:443
#: ../src/compositor/compositor.c:456
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display \"%s"
@@ -480,10 +499,6 @@ msgstr ""
"Un autre gestionnaire de composition est déjà lancé sur l'écran %i de "
"l'affichage « %s »."
#: ../src/compositor/meta-background.c:1044
msgid "background texture could not be created from file"
msgstr "la texture d'arrière-plan n'a pas pu être créée depuis le fichier"
#: ../src/core/bell.c:185
msgid "Bell event"
msgstr "Évènement sonore"
@@ -513,7 +528,7 @@ msgstr "_Attendre"
msgid "_Force Quit"
msgstr "_Forcer à quitter"
#: ../src/core/display.c:547
#: ../src/core/display.c:562
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "Impossible d'ouvrir l'affichage « %s » du système X Window\n"
@@ -550,19 +565,6 @@ msgstr "Lancer comme un compositeur wayland"
msgid "Run as a full display server, rather than nested"
msgstr "Lancer comme un serveur d'affichage complet, plutôt qu'imbriqué"
#: ../src/core/main.c:459
#, c-format
msgid "Failed to scan themes directory: %s\n"
msgstr "Le parcours du répertoire de thèmes a échoué : %s\n"
#: ../src/core/main.c:475
#, c-format
msgid ""
"Could not find a theme! Be sure %s exists and contains the usual themes.\n"
msgstr ""
"Impossible de trouver un thème ! Assurez-vous que %s existe et contient les "
"thèmes habituels.\n"
#: ../src/core/mutter.c:39
#, c-format
msgid ""
@@ -587,759 +589,29 @@ msgstr "Afficher la version"
msgid "Mutter plugin to use"
msgstr "Greffon de Mutter à utiliser"
#: ../src/core/prefs.c:2101
#: ../src/core/prefs.c:2004
#, c-format
msgid "Workspace %d"
msgstr "Espace de travail %d"
#: ../src/core/screen.c:548
#: ../src/core/screen.c:525
#, c-format
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
"to replace the current window manager."
msgstr ""
"L'affichage « %s » a déjà un gestionnaire de fenêtres ; essayez d'utiliser "
"l'option --replace pour remplacer le gestionnaire de fenêtres actuel."
#: ../src/core/screen.c:607
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgstr "L'écran %d sur l'affichage « %s » n'est pas valide\n"
#: ../src/core/screen.c:564
#, c-format
msgid ""
"Screen %d on display \"%s\" already has a window manager; try using the --"
"replace option to replace the current window manager.\n"
msgstr ""
"L'écran %d sur l'affichage « %s » a déjà un gestionnaire de fenêtres ; "
"essayez d'utiliser l'option --replace pour remplacer le gestionnaire de "
"fenêtres actuel.\n"
#: ../src/core/screen.c:657
#, c-format
msgid "Screen %d on display \"%s\" already has a window manager\n"
msgstr "L'écran %d sur l'affichage « %s » a déjà un gestionnaire de fenêtres\n"
#: ../src/core/util.c:118
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter a été compilé sans la prise en charge du mode bavard\n"
#. Translators: This represents the size of a window. The first number is
#. * the width of the window and the second is the height.
#.
#: ../src/ui/resizepopup.c:134
#, c-format
msgid "%d x %d"
msgstr "%d x %d"
#: ../src/ui/theme.c:233
msgid "top"
msgstr "haut"
#: ../src/ui/theme.c:235
msgid "bottom"
msgstr "bas"
#: ../src/ui/theme.c:237
msgid "left"
msgstr "gauche"
#: ../src/ui/theme.c:239
msgid "right"
msgstr "droite"
#: ../src/ui/theme.c:267
#, c-format
msgid "frame geometry does not specify \"%s\" dimension"
msgstr "la géométrie du cadre n'indique pas la dimension « %s »"
#: ../src/ui/theme.c:286
#, c-format
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
msgstr ""
"la géométrie du cadre n'indique pas la dimension « %s » pour la bordure "
"« %s »"
#: ../src/ui/theme.c:323
#, c-format
msgid "Button aspect ratio %g is not reasonable"
msgstr "La proportion du bouton %g n'est pas raisonnable"
#: ../src/ui/theme.c:335
#, c-format
msgid "Frame geometry does not specify size of buttons"
msgstr "La géométrie du cadre n'indique pas la taille des boutons"
#: ../src/ui/theme.c:1061
#, c-format
msgid "Gradients should have at least two colors"
msgstr "Les dégradés doivent comporter au moins deux couleurs"
#: ../src/ui/theme.c:1211
#, c-format
msgid ""
"GTK custom color specification must have color name and fallback in "
"parentheses, e.g. gtk:custom(foo,bar); could not parse \"%s\""
msgstr ""
"Une spécification de couleur personnalisée GTK doit comporter un nom de "
"couleur et un substitut entre parenthèses, par ex. gtk:custom(foo,bar) ; "
"impossible d'analyser « %s »"
#: ../src/ui/theme.c:1227
#, c-format
msgid ""
"Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-"
"_ are valid"
msgstr ""
"Caractère « %c » non valide dans le paramètre color_name de gtk:custom, "
"seuls A-Za-z0-9-_ sont acceptés"
#: ../src/ui/theme.c:1241
#, c-format
msgid ""
"Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not "
"fit the format"
msgstr ""
"Le format de gtk:custom est « gtk:custom(nom_couleur,substitut) », « %s » ne "
"correspond pas à ce format"
#: ../src/ui/theme.c:1286
#, c-format
msgid ""
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
"where NORMAL is the state; could not parse \"%s\""
msgstr ""
"La spécification de couleur GTK doit présenter l'état entre crochets, p. ex. "
"gtk:fg[NORMAL] où NORMAL est l'état ; impossible d'analyser « %s »"
#: ../src/ui/theme.c:1300
#, c-format
msgid ""
"GTK color specification must have a close bracket after the state, e.g. gtk:"
"fg[NORMAL] where NORMAL is the state; could not parse \"%s\""
msgstr ""
"La spécification de couleur GTK doit comporter un crochet de fermeture après "
"l'état, p. ex. gtk:fg[NORMAL] où NORMAL est l'état ; impossible d'analyser "
"« %s »"
#: ../src/ui/theme.c:1311
#, c-format
msgid "Did not understand state \"%s\" in color specification"
msgstr ""
"Impossible de comprendre l'état « %s » dans la spécification de couleur"
#: ../src/ui/theme.c:1324
#, c-format
msgid "Did not understand color component \"%s\" in color specification"
msgstr ""
"Impossible de comprendre le composant de couleur « %s » dans la "
"spécification de couleur"
#: ../src/ui/theme.c:1352
#, c-format
msgid ""
"Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the "
"format"
msgstr ""
"Le format de mélange est « blend/bg_color/fg_color/alpha », « %s » ne "
"correspond pas à ce format ."
#: ../src/ui/theme.c:1363
#, c-format
msgid "Could not parse alpha value \"%s\" in blended color"
msgstr "Impossible d'analyser la valeur alpha « %s » en couleur mélangée"
#: ../src/ui/theme.c:1373
#, c-format
msgid "Alpha value \"%s\" in blended color is not between 0.0 and 1.0"
msgstr ""
"La valeur alpha « %s » en couleur mélangée n'est pas comprise entre 0,0 et "
"1,0"
#: ../src/ui/theme.c:1419
#, c-format
msgid ""
"Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format"
msgstr ""
"Le format d'ombre est « shade/base_color/factor », « %s » ne correspond pas "
"au format"
#: ../src/ui/theme.c:1430
#, c-format
msgid "Could not parse shade factor \"%s\" in shaded color"
msgstr "Impossible d'analyser le facteur d'ombre « %s » en couleur ombrée"
#: ../src/ui/theme.c:1440
#, c-format
msgid "Shade factor \"%s\" in shaded color is negative"
msgstr "Le facteur d'ombre « %s » en couleur ombrée est négatif"
#: ../src/ui/theme.c:1469
#, c-format
msgid "Could not parse color \"%s\""
msgstr "Impossible d'analyser la couleur « %s »"
#: ../src/ui/theme.c:1778
#, c-format
msgid "Coordinate expression contains character '%s' which is not allowed"
msgstr ""
"L'expression de la coordonnée contient le caractère « %s » qui n'est pas "
"autorisé"
#: ../src/ui/theme.c:1805
#, c-format
msgid ""
"Coordinate expression contains floating point number '%s' which could not be "
"parsed"
msgstr ""
"L'expression de la coordonnée contient la valeur en virgule flottante « %s » "
"qui ne peut pas être analysée"
#: ../src/ui/theme.c:1819
#, c-format
msgid "Coordinate expression contains integer '%s' which could not be parsed"
msgstr ""
"L'expression de la coordonnée contient l'entier « %s » qui n'a pas pu être "
"analysé"
#: ../src/ui/theme.c:1940
#, c-format
msgid ""
"Coordinate expression contained unknown operator at the start of this text: "
"\"%s\""
msgstr ""
"L'expression de la coordonnée contenait un opérateur inconnu au début de ce "
"texte : « %s »"
#: ../src/ui/theme.c:1997
#, c-format
msgid "Coordinate expression was empty or not understood"
msgstr "L'expression de la coordonnée était vide ou incomprise"
#: ../src/ui/theme.c:2110 ../src/ui/theme.c:2120 ../src/ui/theme.c:2154
#, c-format
msgid "Coordinate expression results in division by zero"
msgstr "L'expression de la coordonnée entraîne une division par zéro"
#: ../src/ui/theme.c:2162
#, c-format
msgid ""
"Coordinate expression tries to use mod operator on a floating-point number"
msgstr ""
"L'expression de la coordonnée tente d'utiliser l'opérateur mod sur une "
"valeur en virgule flottante"
#: ../src/ui/theme.c:2218
#, c-format
msgid ""
"Coordinate expression has an operator \"%s\" where an operand was expected"
msgstr ""
"L'expression de la coordonnée a un opérateur « %s » là où un opérande était "
"attendu"
#: ../src/ui/theme.c:2227
#, c-format
msgid "Coordinate expression had an operand where an operator was expected"
msgstr ""
"L'expression de la coordonnée a un opérande là où un opérateur était attendu"
#: ../src/ui/theme.c:2235
#, c-format
msgid "Coordinate expression ended with an operator instead of an operand"
msgstr ""
"L'expression de la coordonnée était terminée par un opérateur au lieu d'un "
"opérande"
#: ../src/ui/theme.c:2245
#, c-format
msgid ""
"Coordinate expression has operator \"%c\" following operator \"%c\" with no "
"operand in between"
msgstr ""
"L'expression de la coordonnée a un opérateur « %c » suivant l'opérateur "
"« %c » sans opérande entre eux"
#: ../src/ui/theme.c:2396 ../src/ui/theme.c:2441
#, c-format
msgid "Coordinate expression had unknown variable or constant \"%s\""
msgstr ""
"L'expression de la coordonnée possède une variable ou constante inconnue "
"« %s »"
#: ../src/ui/theme.c:2495
#, c-format
msgid "Coordinate expression parser overflowed its buffer."
msgstr ""
"L'analyseur d'expression de coordonnées a dépassé la capacité de son tampon."
#: ../src/ui/theme.c:2524
#, c-format
msgid "Coordinate expression had a close parenthesis with no open parenthesis"
msgstr ""
"L'expression de la coordonnée comporte une parenthèse de fermeture, mais pas "
"de parenthèse d'ouverture"
#: ../src/ui/theme.c:2588
#, c-format
msgid "Coordinate expression had an open parenthesis with no close parenthesis"
msgstr ""
"L'expression de la coordonnée comporte une parenthèse d'ouverture, mais pas "
"de parenthèse de fermeture"
#: ../src/ui/theme.c:2599
#, c-format
msgid "Coordinate expression doesn't seem to have any operators or operands"
msgstr ""
"L'expression de la coordonnée ne semble pas comprendre d'opérateur ni "
"d'opérande"
#: ../src/ui/theme.c:2812 ../src/ui/theme.c:2832 ../src/ui/theme.c:2852
#, c-format
msgid "Theme contained an expression that resulted in an error: %s\n"
msgstr "Le thème contient une expression qui a entraîné une erreur : %s\n"
#: ../src/ui/theme.c:4455
#, c-format
msgid ""
"<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be "
"specified for this frame style"
msgstr ""
"<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> doit être "
"indiqué pour ce style de cadre"
#: ../src/ui/theme.c:4970 ../src/ui/theme.c:4995
#, c-format
msgid ""
"Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
msgstr ""
"<frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/> manquant"
#: ../src/ui/theme.c:5041
#, c-format
msgid "Failed to load theme \"%s\": %s\n"
msgstr "Impossible de charger le thème « %s » : %s\n"
#: ../src/ui/theme.c:5177 ../src/ui/theme.c:5184 ../src/ui/theme.c:5191
#: ../src/ui/theme.c:5198 ../src/ui/theme.c:5205
#, c-format
msgid "No <%s> set for theme \"%s\""
msgstr "Aucun <%s> défini pour le thème « %s »"
#: ../src/ui/theme.c:5213
#, c-format
msgid ""
"No frame style set for window type \"%s\" in theme \"%s\", add a <window "
"type=\"%s\" style_set=\"whatever\"/> element"
msgstr ""
"Aucun style de cadre défini pour le type de fenêtre « %s » dans le thème "
"« %s », ajoutez un élément <window type=\"%s\" style_set=\"whatever\"/>"
#: ../src/ui/theme.c:5620 ../src/ui/theme.c:5682 ../src/ui/theme.c:5745
#, c-format
msgid ""
"User-defined constants must begin with a capital letter; \"%s\" does not"
msgstr ""
"Les constantes définies par l'utilisateur doivent commencer par une "
"majuscule ; « %s » commence par une minuscule"
#: ../src/ui/theme.c:5628 ../src/ui/theme.c:5690 ../src/ui/theme.c:5753
#, c-format
msgid "Constant \"%s\" has already been defined"
msgstr "La constante « %s » a déjà été définie"
#. Translators: This means that an attribute which should have been found
#. * on an XML element was not in fact found.
#.
#: ../src/ui/theme-parser.c:234
#, c-format
msgid "No \"%s\" attribute on element <%s>"
msgstr "Aucun attribut « %s » sur l'élément <%s>"
#: ../src/ui/theme-parser.c:263 ../src/ui/theme-parser.c:281
#, c-format
msgid "Line %d character %d: %s"
msgstr "Ligne %d caractère %d: %s"
#: ../src/ui/theme-parser.c:481
#, c-format
msgid "Attribute \"%s\" repeated twice on the same <%s> element"
msgstr "Attribut « %s » répété deux fois sur le même élément <%s>"
#: ../src/ui/theme-parser.c:505 ../src/ui/theme-parser.c:554
#, c-format
msgid "Attribute \"%s\" is invalid on <%s> element in this context"
msgstr "Attribut « %s » non valide sur l'élément <%s> dans ce contexte"
#: ../src/ui/theme-parser.c:596
#, c-format
msgid "Could not parse \"%s\" as an integer"
msgstr "Impossible d'analyser « %s » en tant qu'entier"
#: ../src/ui/theme-parser.c:605 ../src/ui/theme-parser.c:660
#, c-format
msgid "Did not understand trailing characters \"%s\" in string \"%s\""
msgstr "Caractères de fin « %s » non compris dans la chaîne « %s »"
#: ../src/ui/theme-parser.c:615
#, c-format
msgid "Integer %ld must be positive"
msgstr "L'entier %ld doit être positif"
#: ../src/ui/theme-parser.c:623
#, c-format
msgid "Integer %ld is too large, current max is %d"
msgstr "L'entier %ld est trop élevé, le max. actuel est %d"
#: ../src/ui/theme-parser.c:651 ../src/ui/theme-parser.c:767
#, c-format
msgid "Could not parse \"%s\" as a floating point number"
msgstr "Impossible d'analyser « %s » en tant que valeur en virgule flottante"
#: ../src/ui/theme-parser.c:682 ../src/ui/theme-parser.c:710
#, c-format
msgid "Boolean values must be \"true\" or \"false\" not \"%s\""
msgstr ""
"Les valeurs booléennes doivent être « true » ou « false » et non « %s »"
#: ../src/ui/theme-parser.c:737
#, c-format
msgid "Angle must be between 0.0 and 360.0, was %g\n"
msgstr "L'angle doit être compris entre 0,0 et 360,0. Il était de %g\n"
#: ../src/ui/theme-parser.c:800
#, c-format
msgid "Alpha must be between 0.0 (invisible) and 1.0 (fully opaque), was %g\n"
msgstr ""
"La valeur alpha doit être comprise entre 0,0 (invisible) et 1,0 (entièrement "
"opaque). Elle était de %g\n"
#: ../src/ui/theme-parser.c:865
#, c-format
msgid ""
"Invalid title scale \"%s\" (must be one of xx-small,x-small,small,medium,"
"large,x-large,xx-large)\n"
msgstr ""
"Échelle de titre non valide « %s » (elle doit avoir l'une des valeurs "
"suivantes : xx-small, x-small, small, medium,large, x-large, xx-large)\n"
#: ../src/ui/theme-parser.c:1021 ../src/ui/theme-parser.c:1084
#: ../src/ui/theme-parser.c:1118 ../src/ui/theme-parser.c:1221
#, c-format
msgid "<%s> name \"%s\" used a second time"
msgstr "<%s> - nom « %s » utilisé une deuxième fois"
#: ../src/ui/theme-parser.c:1033 ../src/ui/theme-parser.c:1130
#: ../src/ui/theme-parser.c:1233
#, c-format
msgid "<%s> parent \"%s\" has not been defined"
msgstr "<%s> - parent « %s » non défini"
#: ../src/ui/theme-parser.c:1143
#, c-format
msgid "<%s> geometry \"%s\" has not been defined"
msgstr "<%s> - géométrie « %s » non définie"
#: ../src/ui/theme-parser.c:1156
#, c-format
msgid "<%s> must specify either a geometry or a parent that has a geometry"
msgstr "<%s> doit indiquer une géométrie ou un parent qui en possède une"
#: ../src/ui/theme-parser.c:1198
msgid "You must specify a background for an alpha value to be meaningful"
msgstr ""
"Vous devez indiquer un arrière-plan pour qu'une valeur alpha ait du sens."
#: ../src/ui/theme-parser.c:1266
#, c-format
msgid "Unknown type \"%s\" on <%s> element"
msgstr "Type inconnu « %s » sur l'élément <%s>"
#: ../src/ui/theme-parser.c:1277
#, c-format
msgid "Unknown style_set \"%s\" on <%s> element"
msgstr "style_set inconnu « %s » sur l'élément <%s>"
#: ../src/ui/theme-parser.c:1285
#, c-format
msgid "Window type \"%s\" has already been assigned a style set"
msgstr "Le type de fenêtre « %s » s'est déjà vu attribuer un jeu de styles"
#: ../src/ui/theme-parser.c:1315 ../src/ui/theme-parser.c:1379
#: ../src/ui/theme-parser.c:1605 ../src/ui/theme-parser.c:2840
#: ../src/ui/theme-parser.c:2886 ../src/ui/theme-parser.c:3036
#: ../src/ui/theme-parser.c:3272 ../src/ui/theme-parser.c:3310
#: ../src/ui/theme-parser.c:3348 ../src/ui/theme-parser.c:3386
#, c-format
msgid "Element <%s> is not allowed below <%s>"
msgstr "L'élément <%s> n'est pas autorisé sous <%s>"
#: ../src/ui/theme-parser.c:1429 ../src/ui/theme-parser.c:1443
#: ../src/ui/theme-parser.c:1488
msgid ""
"Cannot specify both \"button_width\"/\"button_height\" and \"aspect_ratio\" "
"for buttons"
msgstr ""
"Impossible d'indiquer à la fois « button_width » / "
 button_height » (largeur/hauteur) et « aspect_ratio » (proportion) pour "
"les boutons"
#: ../src/ui/theme-parser.c:1452
#, c-format
msgid "Distance \"%s\" is unknown"
msgstr "Distance « %s » inconnue"
#: ../src/ui/theme-parser.c:1497
#, c-format
msgid "Aspect ratio \"%s\" is unknown"
msgstr "Proportion « %s » inconnue"
#: ../src/ui/theme-parser.c:1559
#, c-format
msgid "Border \"%s\" is unknown"
msgstr "Bordure « %s » inconnue"
#: ../src/ui/theme-parser.c:1870
#, c-format
msgid "No \"start_angle\" or \"from\" attribute on element <%s>"
msgstr ""
"Aucun attribut « start_angle » (« début d'angle ») ou « from » (« depuis ») "
"sur l'élément <%s>"
#: ../src/ui/theme-parser.c:1877
#, c-format
msgid "No \"extent_angle\" or \"to\" attribute on element <%s>"
msgstr ""
"Aucun attribut « extent_angle » (« extension d'angle ») ou « to » (« vers ») "
"sur l'élément <%s>"
#: ../src/ui/theme-parser.c:2117
#, c-format
msgid "Did not understand value \"%s\" for type of gradient"
msgstr "Impossible de comprendre la valeur « %s » pour le type de dégradé"
#: ../src/ui/theme-parser.c:2195 ../src/ui/theme-parser.c:2570
#, c-format
msgid "Did not understand fill type \"%s\" for <%s> element"
msgstr ""
"Impossible de comprendre le type de remplissage « %s » pour l'élément <%s>"
#: ../src/ui/theme-parser.c:2362 ../src/ui/theme-parser.c:2445
#: ../src/ui/theme-parser.c:2508
#, c-format
msgid "Did not understand state \"%s\" for <%s> element"
msgstr "Impossible de comprendre l'état « %s » pour l'élément <%s>"
#: ../src/ui/theme-parser.c:2372 ../src/ui/theme-parser.c:2455
#, c-format
msgid "Did not understand shadow \"%s\" for <%s> element"
msgstr "Impossible de comprendre l'ombre « %s » pour l'élément <%s>"
#: ../src/ui/theme-parser.c:2382
#, c-format
msgid "Did not understand arrow \"%s\" for <%s> element"
msgstr "Impossible de comprendre la flèche « %s » pour l'élément <%s>"
#: ../src/ui/theme-parser.c:2696 ../src/ui/theme-parser.c:2792
#, c-format
msgid "No <draw_ops> called \"%s\" has been defined"
msgstr "Aucun <draw_ops> appelé « %s » n'a été défini"
#: ../src/ui/theme-parser.c:2708 ../src/ui/theme-parser.c:2804
#, c-format
msgid "Including draw_ops \"%s\" here would create a circular reference"
msgstr "L'inclusion du draw_ops « %s » ici créerait une référence circulaire"
#: ../src/ui/theme-parser.c:2919
#, c-format
msgid "Unknown position \"%s\" for frame piece"
msgstr "Position inconnue « %s » de la pièce du cadre"
#: ../src/ui/theme-parser.c:2927
#, c-format
msgid "Frame style already has a piece at position %s"
msgstr "Le style de cadre a déjà une pièce à la position %s"
#: ../src/ui/theme-parser.c:2944 ../src/ui/theme-parser.c:3021
#, c-format
msgid "No <draw_ops> with the name \"%s\" has been defined"
msgstr "Aucun <draw_ops> avec le nom « %s » n'a été défini"
#: ../src/ui/theme-parser.c:2974
#, c-format
msgid "Unknown function \"%s\" for button"
msgstr "Fonction inconnue « %s » pour le bouton"
#: ../src/ui/theme-parser.c:2984
#, c-format
msgid "Button function \"%s\" does not exist in this version (%d, need %d)"
msgstr ""
"La fonction « %s » du bouton n'existe pas dans la version (%d, a besoin de "
"%d)"
#: ../src/ui/theme-parser.c:2996
#, c-format
msgid "Unknown state \"%s\" for button"
msgstr "État inconnu « %s » pour le bouton"
#: ../src/ui/theme-parser.c:3004
#, c-format
msgid "Frame style already has a button for function %s state %s"
msgstr "Le style de cadre a déjà un bouton pour la fonction %s, état %s"
#: ../src/ui/theme-parser.c:3075
#, c-format
msgid "\"%s\" is not a valid value for focus attribute"
msgstr "« %s » n'est pas une valeur valide pour l'attribut de focus"
#: ../src/ui/theme-parser.c:3084
#, c-format
msgid "\"%s\" is not a valid value for state attribute"
msgstr "« %s » n'est pas une valeur valide pour l'attribut d'état"
#: ../src/ui/theme-parser.c:3094
#, c-format
msgid "A style called \"%s\" has not been defined"
msgstr "Aucun style appelé « %s » n'a été défini"
#: ../src/ui/theme-parser.c:3115 ../src/ui/theme-parser.c:3138
#, c-format
msgid "\"%s\" is not a valid value for resize attribute"
msgstr ""
"« %s » n'est pas une valeur valide pour l'attribut de redimensionnement"
#: ../src/ui/theme-parser.c:3149
#, c-format
msgid ""
"Should not have \"resize\" attribute on <%s> element for maximized/shaded "
"states"
msgstr ""
"L'attribut « resize » (« redimensionnement ») ne devrait pas figurer sur "
"l'élément <%s> pour les états maximisé/réduit dans la barre de titre"
#: ../src/ui/theme-parser.c:3163
#, c-format
msgid ""
"Should not have \"resize\" attribute on <%s> element for maximized states"
msgstr ""
"L'attribut « resize » (« redimensionnement ») ne devrait pas figurer sur "
"l'élément <%s> pour l'état maximisé"
#: ../src/ui/theme-parser.c:3177 ../src/ui/theme-parser.c:3221
#, c-format
msgid "Style has already been specified for state %s resize %s focus %s"
msgstr ""
"Le style a déjà été indiqué pour l'état %s, redimensionnement %s, focus %s"
#: ../src/ui/theme-parser.c:3188 ../src/ui/theme-parser.c:3199
#: ../src/ui/theme-parser.c:3210 ../src/ui/theme-parser.c:3232
#: ../src/ui/theme-parser.c:3243 ../src/ui/theme-parser.c:3254
#, c-format
msgid "Style has already been specified for state %s focus %s"
msgstr "Le style a déjà été indiqué pour l'état %s, focus %s"
#: ../src/ui/theme-parser.c:3293
msgid ""
"Can't have a two draw_ops for a <piece> element (theme specified a draw_ops "
"attribute and also a <draw_ops> element, or specified two elements)"
msgstr ""
"Impossible d'avoir deux attributs draw_ops pour un élément <piece> (le thème "
"indiquait un attribut draw_ops et un élément <draw_ops> ou deux éléments)"
#: ../src/ui/theme-parser.c:3331
msgid ""
"Can't have a two draw_ops for a <button> element (theme specified a draw_ops "
"attribute and also a <draw_ops> element, or specified two elements)"
msgstr ""
"Impossible d'avoir deux attributs draw_ops pour un élément <button> (le "
"thème indiquait un attribut draw_ops et un élément <draw_ops> ou deux "
"éléments)"
#: ../src/ui/theme-parser.c:3369
msgid ""
"Can't have a two draw_ops for a <menu_icon> element (theme specified a "
"draw_ops attribute and also a <draw_ops> element, or specified two elements)"
msgstr ""
"Impossible d'avoir deux attributs draw_ops pour un élément <menu_icon> (le "
"thème indiquait un attribut draw_ops et un élément <draw_ops> ou deux "
"éléments)"
#: ../src/ui/theme-parser.c:3433
#, c-format
msgid "Bad version specification '%s'"
msgstr "Mauvaise spécification de version « %s »"
#: ../src/ui/theme-parser.c:3506
msgid ""
"\"version\" attribute cannot be used in metacity-theme-1.xml or metacity-"
"theme-2.xml"
msgstr ""
"L'attribut « version » ne peut pas être utilisé dans metacity-theme-1.xml or "
"metacity-theme-2.xml"
#: ../src/ui/theme-parser.c:3529
#, c-format
msgid "Theme requires version %s but latest supported theme version is %d.%d"
msgstr ""
"Le thème nécessite la version %s mais la version de thème la plus récente "
"prise en charge est %d.%d"
#: ../src/ui/theme-parser.c:3561
#, c-format
msgid "Outermost element in theme must be <metacity_theme> not <%s>"
msgstr ""
"L'élément le plus extérieur dans le thème doit être <metacity_theme> et non <"
"%s>"
#: ../src/ui/theme-parser.c:3581
#, c-format
msgid ""
"Element <%s> is not allowed inside a name/author/date/description element"
msgstr ""
"L'élément <%s> n'est pas autorisé dans un élément name/author/date/"
"description"
#: ../src/ui/theme-parser.c:3586
#, c-format
msgid "Element <%s> is not allowed inside a <constant> element"
msgstr "L'élément <%s> n'est pas autorisé dans un élément <constant>"
#: ../src/ui/theme-parser.c:3598
#, c-format
msgid ""
"Element <%s> is not allowed inside a distance/border/aspect_ratio element"
msgstr ""
"L'élément <%s> n'est pas autorisé dans un élément distance/border/"
"aspect_ratio"
#: ../src/ui/theme-parser.c:3620
#, c-format
msgid "Element <%s> is not allowed inside a draw operation element"
msgstr ""
"L'élément <%s> n'est pas autorisé dans un élément d'opération de dessin"
#: ../src/ui/theme-parser.c:3630 ../src/ui/theme-parser.c:3660
#: ../src/ui/theme-parser.c:3665 ../src/ui/theme-parser.c:3670
#, c-format
msgid "Element <%s> is not allowed inside a <%s> element"
msgstr "L'élément <%s> n'est pas autorisé dans un élément <%s>"
#: ../src/ui/theme-parser.c:3898
msgid "No draw_ops provided for frame piece"
msgstr "Aucun attribut draw_ops fourni pour la pièce du cadre"
#: ../src/ui/theme-parser.c:3913
msgid "No draw_ops provided for button"
msgstr "Aucun attribut draw_ops fourni pour le bouton"
#: ../src/ui/theme-parser.c:3967
#, c-format
msgid "No text is allowed inside element <%s>"
msgstr "Aucun texte autorisé dans l'élément <%s>"
#: ../src/ui/theme-parser.c:4025 ../src/ui/theme-parser.c:4037
#: ../src/ui/theme-parser.c:4049 ../src/ui/theme-parser.c:4061
#: ../src/ui/theme-parser.c:4073
#, c-format
msgid "<%s> specified twice for this theme"
msgstr "<%s> indiqué deux fois pour ce thème"
#: ../src/ui/theme-parser.c:4335
#, c-format
msgid "Failed to find a valid file for theme %s\n"
msgstr "Impossible de trouver un fichier valide pour le thème %s\n"
#: ../src/x11/session.c:1815
msgid ""
"These windows do not support &quot;save current setup&quot; and will have to "
@@ -1349,7 +621,7 @@ msgstr ""
"configuration actuelle » et devront être redémarrées manuellement à la "
"prochaine connexion."
#: ../src/x11/window-props.c:515
#: ../src/x11/window-props.c:549
#, c-format
msgid "%s (on %s)"
msgstr "%s (sur %s)"

View File

@@ -10,20 +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.
#
msgid ""
msgstr ""
"Project-Id-Version: gl\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-01-13 00:23+0100\n"
"PO-Revision-Date: 2015-01-13 00:24+0200\n"
"POT-Creation-Date: 2015-02-28 22:43+0100\n"
"PO-Revision-Date: 2015-02-28 22:42+0100\n"
"Last-Translator: Fran Dieguez <frandieguez@gnome.org>\n"
"Language-Team: 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: Virtaal 0.7.1\n"
"X-Generator: Gtranslator 2.91.6\n"
#: ../data/50-mutter-navigation.xml.in.h:1
msgid "Navigation"
@@ -440,22 +441,42 @@ msgstr "Cambiar á VT 6"
msgid "Switch to VT 7"
msgstr "Cambiar á VT 7"
#: ../src/backends/meta-monitor-manager.c:351
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
msgid "Switch to VT 8"
msgstr "Cambiar á VT 8"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
msgid "Switch to VT 9"
msgstr "Cambiar á VT 9"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
msgid "Switch to VT 10"
msgstr "Cambiar á VT 10"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
msgid "Switch to VT 11"
msgstr "Cambiar á VT 11"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
msgid "Switch to VT 12"
msgstr "Cambiar á VT 12"
#: ../src/backends/meta-monitor-manager.c:364
msgid "Built-in display"
msgstr "Pantalla embebida"
#: ../src/backends/meta-monitor-manager.c:378
#: ../src/backends/meta-monitor-manager.c:391
msgid "Unknown"
msgstr "Descoñecido"
#: ../src/backends/meta-monitor-manager.c:380
#: ../src/backends/meta-monitor-manager.c:393
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:388
#: ../src/backends/meta-monitor-manager.c:401
#, c-format
msgid "%s %s"
msgstr "%s %s"
@@ -500,7 +521,7 @@ msgstr "Espe_rar"
msgid "_Force Quit"
msgstr "_Forzar a saída"
#: ../src/core/display.c:561
#: ../src/core/display.c:562
#, c-format
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"
@@ -591,7 +612,7 @@ msgstr ""
"Estas xanelas non soportan &quot;save current setup&quot; e terán que "
"reiniciarse manualmente a próxima vez que inicie a sesión."
#: ../src/x11/window-props.c:558
#: ../src/x11/window-props.c:549
#, c-format
msgid "%s (on %s)"
msgstr "%s (en %s)"

View File

@@ -10,8 +10,8 @@ msgid ""
msgstr ""
"Project-Id-Version: metacity.HEAD.he\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-01-26 22:19+0200\n"
"PO-Revision-Date: 2015-01-26 22:20+0200\n"
"POT-Creation-Date: 2015-02-24 19:33+0200\n"
"PO-Revision-Date: 2015-02-24 19:34+0200\n"
"Last-Translator: Yosef Or Boczko <yoseforb@gmail.com>\n"
"Language-Team: עברית <>\n"
"Language: he\n"
@@ -433,6 +433,26 @@ msgstr "מעבר ל־VT 6"
msgid "Switch to VT 7"
msgstr "מעבר ל־VT 7"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
msgid "Switch to VT 8"
msgstr "מעבר ל־VT 8"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
msgid "Switch to VT 9"
msgstr "מעבר ל־VT 9"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
msgid "Switch to VT 10"
msgstr "מעבר ל־VT 10"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
msgid "Switch to VT 11"
msgstr "מעבר ל־VT 11"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
msgid "Switch to VT 12"
msgstr "מעבר ל־VT 12"
#: ../src/backends/meta-monitor-manager.c:364
msgid "Built-in display"
msgstr "תצוגה מובנית"
@@ -580,7 +600,7 @@ msgstr ""
"חלונות אלו אינם תומכים ב&quot;שמירת ההגדרות הנוכחיות&quot;, ויהיה צורך "
"באתחול ידני בכניסה הבאה שלך."
#: ../src/x11/window-props.c:558
#: ../src/x11/window-props.c:549
#, c-format
msgid "%s (on %s)"
msgstr "%s (מעל %s)"

1225
po/hu.po

File diff suppressed because it is too large Load Diff

764
po/id.po
View File

@@ -5,21 +5,21 @@
# Mohammad DAMT <mdamt@bisnisweb.com>, 2003-2005.
# Ahmad Riza H Nst <rizahnst@eriagempita.co.id>, 2006.
# Dirgita <dirgitadevina@yahoo.co.id>, 2011, 2012, 2014.
# Andika Triwidada <andika@gmail.com>, 2011, 2012, 2013, 2014.
# Andika Triwidada <andika@gmail.com>, 2011-2015.
msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2014-09-01 21:52+0000\n"
"PO-Revision-Date: 2014-09-03 20:56+0700\n"
"POT-Creation-Date: 2015-03-21 11:13+0000\n"
"PO-Revision-Date: 2015-03-21 19:04+0700\n"
"Last-Translator: Andika Triwidada <andika@gmail.com>\n"
"Language-Team: Indonesian <gnome-l10n-id@googlegroups.com>\n"
"Language: id\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.6.9\n"
"X-Generator: Poedit 1.7.1\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../data/50-mutter-navigation.xml.in.h:1
@@ -434,29 +434,49 @@ msgstr "Pindah ke VT 6"
msgid "Switch to VT 7"
msgstr "Pindah ke VT 7"
#: ../src/backends/meta-monitor-manager.c:412
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
msgid "Switch to VT 8"
msgstr "Pindah ke VT 8"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
msgid "Switch to VT 9"
msgstr "Pindah ke VT 9"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
msgid "Switch to VT 10"
msgstr "Pindah ke VT 10"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
msgid "Switch to VT 11"
msgstr "Pindah ke VT 11"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
msgid "Switch to VT 12"
msgstr "Pindah ke VT 12"
#: ../src/backends/meta-monitor-manager.c:364
msgid "Built-in display"
msgstr "Tampilan bawaan"
#: ../src/backends/meta-monitor-manager.c:437
#: ../src/backends/meta-monitor-manager.c:391
msgid "Unknown"
msgstr "Tak Dikenal"
#: ../src/backends/meta-monitor-manager.c:439
#: ../src/backends/meta-monitor-manager.c:393
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:447
#: ../src/backends/meta-monitor-manager.c:401
#, 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:443
#: ../src/compositor/compositor.c:456
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display \"%s"
@@ -464,10 +484,6 @@ msgid ""
msgstr ""
"Manajer komposit lain telah berjalan pada layar %i pada tampilan \"%s\"."
#: ../src/compositor/meta-background.c:1044
msgid "background texture could not be created from file"
msgstr "tekstur latar tak bisa dibuat dari berkas"
#: ../src/core/bell.c:185
msgid "Bell event"
msgstr "Bel peristiwa"
@@ -496,7 +512,7 @@ msgstr "_Tunggu"
msgid "_Force Quit"
msgstr "_Matikan Paksa"
#: ../src/core/display.c:547
#: ../src/core/display.c:562
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "Gagal membuka tampilan X Window System '%s'\n"
@@ -533,17 +549,6 @@ msgstr "Jalankan sebagai kompositor wayland"
msgid "Run as a full display server, rather than nested"
msgstr "Jalankan sebagai server tampilan penuh, ketimbang tampilan bersarang"
#: ../src/core/main.c:459
#, c-format
msgid "Failed to scan themes directory: %s\n"
msgstr "Gagal memeriksa direktori tema: %s\n"
#: ../src/core/main.c:475
#, c-format
msgid ""
"Could not find a theme! Be sure %s exists and contains the usual themes.\n"
msgstr "Tak menemukan tema! Pastikan %s ada dan berisi tema yang biasa.\n"
#: ../src/core/mutter.c:39
#, c-format
msgid ""
@@ -568,714 +573,29 @@ msgstr "Cetak versi"
msgid "Mutter plugin to use"
msgstr "Pengaya Mutter yang dipakai"
#: ../src/core/prefs.c:2101
#: ../src/core/prefs.c:2004
#, c-format
msgid "Workspace %d"
msgstr "Area kerja %d"
#: ../src/core/screen.c:548
#: ../src/core/screen.c:525
#, c-format
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
"to replace the current window manager."
msgstr ""
"Tampilan \"%s\" sudah memiliki manajer jendela; cobalah gunakan pilihan --"
"replace untuk mengganti manajer jendela saat ini."
#: ../src/core/screen.c:607
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgstr "Layar %d pada tampilan '%s' tidak benar\n"
#: ../src/core/screen.c:564
#, c-format
msgid ""
"Screen %d on display \"%s\" already has a window manager; try using the --"
"replace option to replace the current window manager.\n"
msgstr ""
"Layar %d pada tampilan \"%s\" sudah memiliki pengatur jendela. Cobalah "
"gunakan pilihan --replace untuk mengganti pengatur jendela yang aktif.\n"
#: ../src/core/screen.c:657
#, c-format
msgid "Screen %d on display \"%s\" already has a window manager\n"
msgstr "Layar %d pada tampilan \"%s\" sudah ada pengatur jendelanya\n"
#: ../src/core/util.c:118
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Muter dikompilasi tanpa dukungan mode riuh\n"
#. Translators: This represents the size of a window. The first number is
#. * the width of the window and the second is the height.
#.
#: ../src/ui/resizepopup.c:134
#, c-format
msgid "%d x %d"
msgstr "%d x %d"
#: ../src/ui/theme.c:233
msgid "top"
msgstr "atas"
#: ../src/ui/theme.c:235
msgid "bottom"
msgstr "bawah"
#: ../src/ui/theme.c:237
msgid "left"
msgstr "kiri"
#: ../src/ui/theme.c:239
msgid "right"
msgstr "kanan"
#: ../src/ui/theme.c:267
#, c-format
msgid "frame geometry does not specify \"%s\" dimension"
msgstr "ukuran frame tidak menyebutkan dimensi \"%s\""
#: ../src/ui/theme.c:286
#, c-format
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
msgstr "ukuran frame tidak menyebutkan dimensi \"%s\" untuk batas \"%s\""
#: ../src/ui/theme.c:323
#, c-format
msgid "Button aspect ratio %g is not reasonable"
msgstr "Aspek rasio tombol %g tidak wajar"
#: ../src/ui/theme.c:335
#, c-format
msgid "Frame geometry does not specify size of buttons"
msgstr "Ukuran frame tidak menyebutkan ukuran tombol"
#: ../src/ui/theme.c:1061
#, c-format
msgid "Gradients should have at least two colors"
msgstr "Gradien harus paling tidak ada dua warna"
#: ../src/ui/theme.c:1211
#, c-format
msgid ""
"GTK custom color specification must have color name and fallback in "
"parentheses, e.g. gtk:custom(foo,bar); could not parse \"%s\""
msgstr ""
"Spesifikasi warna ubahan GTK mesti memiliki nama warna dan cadangan dalam "
"kurung, mis. gtk:custom(foo,bar); tak bisa mengurai \"%s\""
#: ../src/ui/theme.c:1227
#, c-format
msgid ""
"Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-"
"_ are valid"
msgstr ""
"Karakter tak valid '%c' dalam parameter color_name dari gtk:custom, hanya A-"
"Za-z0-9-_ yang valid"
#: ../src/ui/theme.c:1241
#, c-format
msgid ""
"Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not "
"fit the format"
msgstr ""
"Format Gtk:custom adalah \"gtk:custom(color_name,fallback)\", \"%s\" tak "
"memenuhi format"
#: ../src/ui/theme.c:1286
#, c-format
msgid ""
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
"where NORMAL is the state; could not parse \"%s\""
msgstr ""
"Spesifikasi warna GTK harus memiliki kondisi pada kurung, misal gtk:"
"fg[NORMAL] dengan NORMAL adalah jenis kondisinya, tidak dapat membaca \"%s\""
#: ../src/ui/theme.c:1300
#, c-format
msgid ""
"GTK color specification must have a close bracket after the state, e.g. gtk:"
"fg[NORMAL] where NORMAL is the state; could not parse \"%s\""
msgstr ""
"Spesifikasi warna GTK harus memiliki kurung tutup pada kondisinya, misal gtk:"
"fg[NORMAL] dengan NORMAL adalah jenis kondisinya, tidak dapat membaca \"%s\""
#: ../src/ui/theme.c:1311
#, c-format
msgid "Did not understand state \"%s\" in color specification"
msgstr "Kondisi \"%s\" tidak benar pada spesifikasi warna"
#: ../src/ui/theme.c:1324
#, c-format
msgid "Did not understand color component \"%s\" in color specification"
msgstr "Komponen warna \"%s\" tidak benar pada spesifikasi warna"
#: ../src/ui/theme.c:1352
#, c-format
msgid ""
"Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the "
"format"
msgstr ""
"Format pencampuran adalah \"blend/bg_color/fg_color/alpha\", \"%s\" bukan "
"ditulis dalam format yang benar"
#: ../src/ui/theme.c:1363
#, c-format
msgid "Could not parse alpha value \"%s\" in blended color"
msgstr "Tak dapat membaca nilai alpha \"%s\" pada pencampuran warna"
#: ../src/ui/theme.c:1373
#, c-format
msgid "Alpha value \"%s\" in blended color is not between 0.0 and 1.0"
msgstr ""
"Nilai alpha \"%s\" pada warna yang dicampur tidak ada dalam rentang 0.0 dan "
"1.0"
#: ../src/ui/theme.c:1419
#, c-format
msgid ""
"Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format"
msgstr ""
"Format bayangan adalah \"shade/base_color/factor\", \"%s\" ditulis dalam "
"format yang keliru"
#: ../src/ui/theme.c:1430
#, c-format
msgid "Could not parse shade factor \"%s\" in shaded color"
msgstr "Tak dapat membaca faktor bayangan \"%s\" pada warna berbayang"
#: ../src/ui/theme.c:1440
#, c-format
msgid "Shade factor \"%s\" in shaded color is negative"
msgstr "Faktor bayangan \"%s\" pada warna berbayang bernilai negatif"
#: ../src/ui/theme.c:1469
#, c-format
msgid "Could not parse color \"%s\""
msgstr "Tak dapat membaca warna \"%s\""
#: ../src/ui/theme.c:1778
#, c-format
msgid "Coordinate expression contains character '%s' which is not allowed"
msgstr "Ekspresi koordinat berisi karakter '%s' yang tidak diperbolehkan"
#: ../src/ui/theme.c:1805
#, c-format
msgid ""
"Coordinate expression contains floating point number '%s' which could not be "
"parsed"
msgstr ""
"Ekspresi koordinat berisi angka floating point '%s' yang tidak dapat dibaca"
#: ../src/ui/theme.c:1819
#, c-format
msgid "Coordinate expression contains integer '%s' which could not be parsed"
msgstr "Ekspresi koordinat berisi integer '%s' yang tidak dapat dibaca"
#: ../src/ui/theme.c:1940
#, c-format
msgid ""
"Coordinate expression contained unknown operator at the start of this text: "
"\"%s\""
msgstr ""
"Ekspresi koordinat berisi operator tak dikenal pada awal teks berikut: \"%s\""
#: ../src/ui/theme.c:1997
#, c-format
msgid "Coordinate expression was empty or not understood"
msgstr "Ekspresi koordinat kosong atau tidak dapat dimengerti"
#: ../src/ui/theme.c:2110 ../src/ui/theme.c:2120 ../src/ui/theme.c:2154
#, c-format
msgid "Coordinate expression results in division by zero"
msgstr "Ekspresi koordinat menghasilkan pembagian dengan nol"
#: ../src/ui/theme.c:2162
#, c-format
msgid ""
"Coordinate expression tries to use mod operator on a floating-point number"
msgstr "Ekspresi koordinat menggunakan operator mod pada angka bilangan nyata"
#: ../src/ui/theme.c:2218
#, c-format
msgid ""
"Coordinate expression has an operator \"%s\" where an operand was expected"
msgstr "Ekspresi koordinat menggunakan operator \"%s\" tanpa adanya operan"
#: ../src/ui/theme.c:2227
#, c-format
msgid "Coordinate expression had an operand where an operator was expected"
msgstr "Ekspresi koordinat menggunakan operand tanpa operator"
#: ../src/ui/theme.c:2235
#, c-format
msgid "Coordinate expression ended with an operator instead of an operand"
msgstr ""
"Ekspresi koordinat diakhiri dengan operator, seharusnya diakhiri dengan "
"operand"
#: ../src/ui/theme.c:2245
#, c-format
msgid ""
"Coordinate expression has operator \"%c\" following operator \"%c\" with no "
"operand in between"
msgstr ""
"Ekspresi koordinat memiliki operator \"%c\" diikuti operator \"%c\" tanpa "
"adanya operand di antarany"
#: ../src/ui/theme.c:2396 ../src/ui/theme.c:2441
#, c-format
msgid "Coordinate expression had unknown variable or constant \"%s\""
msgstr ""
"Ada variabel atau konstanta \"%s\" tidak diketahui pada ekspresi koordinat"
#: ../src/ui/theme.c:2495
#, c-format
msgid "Coordinate expression parser overflowed its buffer."
msgstr "Ekspresi koordinat melampaui batasannya."
#: ../src/ui/theme.c:2524
#, c-format
msgid "Coordinate expression had a close parenthesis with no open parenthesis"
msgstr "Terdapat kurung tutup tanpa kurung buka pada ekspresi koordinat"
#: ../src/ui/theme.c:2588
#, c-format
msgid "Coordinate expression had an open parenthesis with no close parenthesis"
msgstr "Terdapat kurung buka tanpa kurung tutup pada ekspresi koordinat"
#: ../src/ui/theme.c:2599
#, c-format
msgid "Coordinate expression doesn't seem to have any operators or operands"
msgstr "Ekspresi koordinat sepertinya tidak memiliki operator atau operan"
#: ../src/ui/theme.c:2812 ../src/ui/theme.c:2832 ../src/ui/theme.c:2852
#, c-format
msgid "Theme contained an expression that resulted in an error: %s\n"
msgstr "Tema mengandung ekspresi yang menghasilkan galat: %s\n"
#: ../src/ui/theme.c:4455
#, c-format
msgid ""
"<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be "
"specified for this frame style"
msgstr ""
"<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> tidak "
"disebutkan pada gaya frame ini"
#: ../src/ui/theme.c:4970 ../src/ui/theme.c:4995
#, c-format
msgid ""
"Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
msgstr ""
"<frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/> tidak ada"
#: ../src/ui/theme.c:5041
#, c-format
msgid "Failed to load theme \"%s\": %s\n"
msgstr "Gagal membuka tema \"%s\": %s\n"
#: ../src/ui/theme.c:5177 ../src/ui/theme.c:5184 ../src/ui/theme.c:5191
#: ../src/ui/theme.c:5198 ../src/ui/theme.c:5205
#, c-format
msgid "No <%s> set for theme \"%s\""
msgstr "Tak ada <%s> yang ditentukan untuk tema \"%s\""
#: ../src/ui/theme.c:5213
#, c-format
msgid ""
"No frame style set for window type \"%s\" in theme \"%s\", add a <window "
"type=\"%s\" style_set=\"whatever\"/> element"
msgstr ""
"Tak ada gaya frame untuk tipe window \"%s\" pada tema \"%s\". Tambah dulu "
"elemen <window type=\"%s\" style_set=\"whatever\"/>"
#: ../src/ui/theme.c:5620 ../src/ui/theme.c:5682 ../src/ui/theme.c:5745
#, c-format
msgid ""
"User-defined constants must begin with a capital letter; \"%s\" does not"
msgstr ""
"Konstanta buatan pengguna harus dimulai dengan huruf besar: \"%s\" tidak"
#: ../src/ui/theme.c:5628 ../src/ui/theme.c:5690 ../src/ui/theme.c:5753
#, c-format
msgid "Constant \"%s\" has already been defined"
msgstr "Konstanta \"%s\" telah didefinisikan sebelumnya"
#. Translators: This means that an attribute which should have been found
#. * on an XML element was not in fact found.
#.
#: ../src/ui/theme-parser.c:234
#, c-format
msgid "No \"%s\" attribute on element <%s>"
msgstr "Tak ada atribut \"%s\" pada elemen <%s>"
#: ../src/ui/theme-parser.c:263 ../src/ui/theme-parser.c:281
#, c-format
msgid "Line %d character %d: %s"
msgstr "Baris %d karakter %d: %s"
#: ../src/ui/theme-parser.c:481
#, c-format
msgid "Attribute \"%s\" repeated twice on the same <%s> element"
msgstr "Atribut \"%s\" diulangi dua kali pada elemen <%s> yang sama"
#: ../src/ui/theme-parser.c:505 ../src/ui/theme-parser.c:554
#, c-format
msgid "Attribute \"%s\" is invalid on <%s> element in this context"
msgstr "Atribut \"%s\" tidak diperkenankan pada elemen <%s> pada konteks ini"
#: ../src/ui/theme-parser.c:596
#, c-format
msgid "Could not parse \"%s\" as an integer"
msgstr "Tak dapat menguraikan \"%s\" sebagai integer"
#: ../src/ui/theme-parser.c:605 ../src/ui/theme-parser.c:660
#, c-format
msgid "Did not understand trailing characters \"%s\" in string \"%s\""
msgstr "Tak mengerti karakter \"%s\" kenapa ada dibuntut string \"%s\""
#: ../src/ui/theme-parser.c:615
#, c-format
msgid "Integer %ld must be positive"
msgstr "Integer %ld harus bernilai positif"
#: ../src/ui/theme-parser.c:623
#, c-format
msgid "Integer %ld is too large, current max is %d"
msgstr "Integer %ld terlalu besar, maksimal %d"
#: ../src/ui/theme-parser.c:651 ../src/ui/theme-parser.c:767
#, c-format
msgid "Could not parse \"%s\" as a floating point number"
msgstr "Tak dapat membaca \"%s\" sebagai angka floating point"
#: ../src/ui/theme-parser.c:682 ../src/ui/theme-parser.c:710
#, c-format
msgid "Boolean values must be \"true\" or \"false\" not \"%s\""
msgstr "Nilai boolean harus \"true\" atau \"false\" dan bukannya \"%s\""
#: ../src/ui/theme-parser.c:737
#, c-format
msgid "Angle must be between 0.0 and 360.0, was %g\n"
msgstr "Sudut harus ada dalam rentang 0.0 dan 360.0, dalam berkas didapat %g\n"
#: ../src/ui/theme-parser.c:800
#, c-format
msgid "Alpha must be between 0.0 (invisible) and 1.0 (fully opaque), was %g\n"
msgstr ""
"Alpha harus ada dalam rentang 0.0 (tidak kelihatan) dan 1.0 (nampak semua, "
"dalam berkas didapat %g\n"
#: ../src/ui/theme-parser.c:865
#, c-format
msgid ""
"Invalid title scale \"%s\" (must be one of xx-small,x-small,small,medium,"
"large,x-large,xx-large)\n"
msgstr ""
"Skala judul \"%s\" tidak benar (harusnya bernilai xx-small, x-small, small, "
"medium, large, x-large, xx-large)\n"
#: ../src/ui/theme-parser.c:1021 ../src/ui/theme-parser.c:1084
#: ../src/ui/theme-parser.c:1118 ../src/ui/theme-parser.c:1221
#, c-format
msgid "<%s> name \"%s\" used a second time"
msgstr "Nama <%s> \"%s\" digunakan kedua kali"
#: ../src/ui/theme-parser.c:1033 ../src/ui/theme-parser.c:1130
#: ../src/ui/theme-parser.c:1233
#, c-format
msgid "<%s> parent \"%s\" has not been defined"
msgstr "Induk <%s> \"%s\" belum didefinisikan"
#: ../src/ui/theme-parser.c:1143
#, c-format
msgid "<%s> geometry \"%s\" has not been defined"
msgstr "Geometri <%s> \"%s\" belum didefinisikan"
#: ../src/ui/theme-parser.c:1156
#, c-format
msgid "<%s> must specify either a geometry or a parent that has a geometry"
msgstr "<%s> harus menentukan geometri atau induk yang ada geometrinya"
#: ../src/ui/theme-parser.c:1198
msgid "You must specify a background for an alpha value to be meaningful"
msgstr ""
"Anda mesti menyatakan suatu latar belakang bagi nilai alfa agar berarti"
#: ../src/ui/theme-parser.c:1266
#, c-format
msgid "Unknown type \"%s\" on <%s> element"
msgstr "Tipe \"%s\" tidak dikenal pada elemen <%s>"
#: ../src/ui/theme-parser.c:1277
#, c-format
msgid "Unknown style_set \"%s\" on <%s> element"
msgstr "style_set \"%s\" tidak dikenali pada elemen <%s>"
#: ../src/ui/theme-parser.c:1285
#, c-format
msgid "Window type \"%s\" has already been assigned a style set"
msgstr "Tipe jendela \"%s\" sudah memiliki set gaya"
#: ../src/ui/theme-parser.c:1315 ../src/ui/theme-parser.c:1379
#: ../src/ui/theme-parser.c:1605 ../src/ui/theme-parser.c:2840
#: ../src/ui/theme-parser.c:2886 ../src/ui/theme-parser.c:3036
#: ../src/ui/theme-parser.c:3272 ../src/ui/theme-parser.c:3310
#: ../src/ui/theme-parser.c:3348 ../src/ui/theme-parser.c:3386
#, c-format
msgid "Element <%s> is not allowed below <%s>"
msgstr "Elemen <%s> tidak diperkenankan ada di bawah <%s>"
#: ../src/ui/theme-parser.c:1429 ../src/ui/theme-parser.c:1443
#: ../src/ui/theme-parser.c:1488
msgid ""
"Cannot specify both \"button_width\"/\"button_height\" and \"aspect_ratio\" "
"for buttons"
msgstr ""
"Tak dapat menyatakan \"button_width\"/\"button_height\" dan \"aspect_ratio\" "
"sekaligus untuk tombol"
#: ../src/ui/theme-parser.c:1452
#, c-format
msgid "Distance \"%s\" is unknown"
msgstr "Jarak \"%s\" tidak dikenal"
#: ../src/ui/theme-parser.c:1497
#, c-format
msgid "Aspect ratio \"%s\" is unknown"
msgstr "Rasio aspek \"%s\" tidak dikenal"
#: ../src/ui/theme-parser.c:1559
#, c-format
msgid "Border \"%s\" is unknown"
msgstr "Batas \"%s\" tidak dikenal"
#: ../src/ui/theme-parser.c:1870
#, c-format
msgid "No \"start_angle\" or \"from\" attribute on element <%s>"
msgstr "Tak ada atribut \"start_angle\" atau \"from\" pada elemen <%s>"
#: ../src/ui/theme-parser.c:1877
#, c-format
msgid "No \"extent_angle\" or \"to\" attribute on element <%s>"
msgstr "Tak ada atribut \"extent_angle\" atau \"to\" pada elemen <%s>"
#: ../src/ui/theme-parser.c:2117
#, c-format
msgid "Did not understand value \"%s\" for type of gradient"
msgstr "Nilai \"%s\" bukan nilai yang sah untuk tipe gradien"
#: ../src/ui/theme-parser.c:2195 ../src/ui/theme-parser.c:2570
#, c-format
msgid "Did not understand fill type \"%s\" for <%s> element"
msgstr "Tipe isian \"%s\" tidak dikenal untuk elemen <%s>"
#: ../src/ui/theme-parser.c:2362 ../src/ui/theme-parser.c:2445
#: ../src/ui/theme-parser.c:2508
#, c-format
msgid "Did not understand state \"%s\" for <%s> element"
msgstr "Kondisi \"%s\" tidak dikenal untuk elemen <%s>"
#: ../src/ui/theme-parser.c:2372 ../src/ui/theme-parser.c:2455
#, c-format
msgid "Did not understand shadow \"%s\" for <%s> element"
msgstr "Bayangan \"%s\" tidak dikenal untuk elemen <%s>"
#: ../src/ui/theme-parser.c:2382
#, c-format
msgid "Did not understand arrow \"%s\" for <%s> element"
msgstr "Panah \"%s\" tidak dikenal untuk elemen <%s>"
#: ../src/ui/theme-parser.c:2696 ../src/ui/theme-parser.c:2792
#, c-format
msgid "No <draw_ops> called \"%s\" has been defined"
msgstr "Tak ada <draw_ops> bernama \"%s\" yang telah didefinisikan"
#: ../src/ui/theme-parser.c:2708 ../src/ui/theme-parser.c:2804
#, c-format
msgid "Including draw_ops \"%s\" here would create a circular reference"
msgstr ""
"Menyertakan draw_ops \"%s\" di sini akan membuat referensi tak berujung"
#: ../src/ui/theme-parser.c:2919
#, c-format
msgid "Unknown position \"%s\" for frame piece"
msgstr "Posisi \"%s\" tidak dikenal untuk bagian frame"
#: ../src/ui/theme-parser.c:2927
#, c-format
msgid "Frame style already has a piece at position %s"
msgstr "Gaya frame sudah memiliki bagian pada posisi %s"
#: ../src/ui/theme-parser.c:2944 ../src/ui/theme-parser.c:3021
#, c-format
msgid "No <draw_ops> with the name \"%s\" has been defined"
msgstr "Tak ada <draw_ops> dengan nama \"%s\" yang didefinisikan"
#: ../src/ui/theme-parser.c:2974
#, c-format
msgid "Unknown function \"%s\" for button"
msgstr "Fungsi \"%s\" tidak dikenal untuk tombol"
#: ../src/ui/theme-parser.c:2984
#, c-format
msgid "Button function \"%s\" does not exist in this version (%d, need %d)"
msgstr ""
"Tombol fungsi \"%s\" tidak tersedia untuk versi ini (%d, memerlukan %d)"
#: ../src/ui/theme-parser.c:2996
#, c-format
msgid "Unknown state \"%s\" for button"
msgstr "Kondisi \"%s\" tidak dikenal untuk tombol"
#: ../src/ui/theme-parser.c:3004
#, c-format
msgid "Frame style already has a button for function %s state %s"
msgstr "Gaya bingkai sudah memiliki tombol untuk fungsi %s kondisi %s"
#: ../src/ui/theme-parser.c:3075
#, c-format
msgid "\"%s\" is not a valid value for focus attribute"
msgstr "\"%s\" bukan nilai yang benar untuk atribut focus"
#: ../src/ui/theme-parser.c:3084
#, c-format
msgid "\"%s\" is not a valid value for state attribute"
msgstr "\"%s\" bukan nilai yang benar untuk atribut state"
#: ../src/ui/theme-parser.c:3094
#, c-format
msgid "A style called \"%s\" has not been defined"
msgstr "Gaya bernama \"%s\" belum didefinisikan"
#: ../src/ui/theme-parser.c:3115 ../src/ui/theme-parser.c:3138
#, c-format
msgid "\"%s\" is not a valid value for resize attribute"
msgstr "\"%s\" bukan nilai yang benar untuk atribut resize"
#: ../src/ui/theme-parser.c:3149
#, c-format
msgid ""
"Should not have \"resize\" attribute on <%s> element for maximized/shaded "
"states"
msgstr ""
"Atribut \"resize\" tidak boleh ada pada elemen <%s> untuk kondisi ukuran "
"window maksimum/tergulung"
#: ../src/ui/theme-parser.c:3163
#, c-format
msgid ""
"Should not have \"resize\" attribute on <%s> element for maximized states"
msgstr ""
"Atribut \"resize\" tidak boleh ada pada elemen <%s> untuk kondisi ukuran "
"jendela maksimal"
#: ../src/ui/theme-parser.c:3177 ../src/ui/theme-parser.c:3221
#, c-format
msgid "Style has already been specified for state %s resize %s focus %s"
msgstr "Gaya sudah menjelaskan kondisi %s resize %s focus %s"
#: ../src/ui/theme-parser.c:3188 ../src/ui/theme-parser.c:3199
#: ../src/ui/theme-parser.c:3210 ../src/ui/theme-parser.c:3232
#: ../src/ui/theme-parser.c:3243 ../src/ui/theme-parser.c:3254
#, c-format
msgid "Style has already been specified for state %s focus %s"
msgstr "Gaya sudah menjelaskan kondisi %s focus %s"
#: ../src/ui/theme-parser.c:3293
msgid ""
"Can't have a two draw_ops for a <piece> element (theme specified a draw_ops "
"attribute and also a <draw_ops> element, or specified two elements)"
msgstr ""
"Tak boleh ada dua draw_ops untuk elemen <piece> (tema menyebutkan atribut "
"draw_ops dan juga elemen <draw_ops> atau meyebutkan dua elemen tersebut "
#: ../src/ui/theme-parser.c:3331
msgid ""
"Can't have a two draw_ops for a <button> element (theme specified a draw_ops "
"attribute and also a <draw_ops> element, or specified two elements)"
msgstr ""
"Tak boleh ada dua draw_ops untuk elemen <button> (tema menyebutkan atribut "
"draw_ops dan juga elemen <draw_ops> atau meyebutkan dua elemen tersebut "
#: ../src/ui/theme-parser.c:3369
msgid ""
"Can't have a two draw_ops for a <menu_icon> element (theme specified a "
"draw_ops attribute and also a <draw_ops> element, or specified two elements)"
msgstr ""
"Tak boleh ada dua draw_ops untuk elemen <menu_icon> (tema menyebutkan "
"atribut draw_ops dan juga elemen <draw_ops> atau meyebutkan dua elemen "
"tersebut "
#: ../src/ui/theme-parser.c:3433
#, c-format
msgid "Bad version specification '%s'"
msgstr "Spesifikasi versi '%s' jelek"
#: ../src/ui/theme-parser.c:3506
msgid ""
"\"version\" attribute cannot be used in metacity-theme-1.xml or metacity-"
"theme-2.xml"
msgstr ""
"Atribut \"version\" tidak dapat dipakai dalam metacity-theme-1.xml atau "
"metacity-theme-2.xml"
#: ../src/ui/theme-parser.c:3529
#, c-format
msgid "Theme requires version %s but latest supported theme version is %d.%d"
msgstr "Tema memerlukan versi %s tetapi versi yang didukung adalah %d.%d"
#: ../src/ui/theme-parser.c:3561
#, c-format
msgid "Outermost element in theme must be <metacity_theme> not <%s>"
msgstr "Elemen tema paling luar haruslah <metacity_theme> dan bukan <%s>"
#: ../src/ui/theme-parser.c:3581
#, c-format
msgid ""
"Element <%s> is not allowed inside a name/author/date/description element"
msgstr ""
"Elemen <%s> tidak diperbolehkan berada elemen name/author/date/description"
#: ../src/ui/theme-parser.c:3586
#, c-format
msgid "Element <%s> is not allowed inside a <constant> element"
msgstr "Elemen <%s> tidak boleh ada dalam elemen <constat>"
#: ../src/ui/theme-parser.c:3598
#, c-format
msgid ""
"Element <%s> is not allowed inside a distance/border/aspect_ratio element"
msgstr ""
"Elemen <%s> tidak boleh ada di dalam elemen distance/border/aspec_ratio"
#: ../src/ui/theme-parser.c:3620
#, c-format
msgid "Element <%s> is not allowed inside a draw operation element"
msgstr "Elemen <%s> tidak boleh ada di dalam elemen operasi gambar"
#: ../src/ui/theme-parser.c:3630 ../src/ui/theme-parser.c:3660
#: ../src/ui/theme-parser.c:3665 ../src/ui/theme-parser.c:3670
#, c-format
msgid "Element <%s> is not allowed inside a <%s> element"
msgstr "Elemen <%s> tidak boleh ada di dalam elemen <%s>"
#: ../src/ui/theme-parser.c:3898
msgid "No draw_ops provided for frame piece"
msgstr "Tak ada draw_ops yang disediakan untuk bagian frame"
#: ../src/ui/theme-parser.c:3913
msgid "No draw_ops provided for button"
msgstr "Tak ada draw_ops yang disediakan untuk tombol"
#: ../src/ui/theme-parser.c:3967
#, c-format
msgid "No text is allowed inside element <%s>"
msgstr "Tak boleh ada teks di dalam elemen <%s>"
#: ../src/ui/theme-parser.c:4025 ../src/ui/theme-parser.c:4037
#: ../src/ui/theme-parser.c:4049 ../src/ui/theme-parser.c:4061
#: ../src/ui/theme-parser.c:4073
#, c-format
msgid "<%s> specified twice for this theme"
msgstr "<%s> disebutkan dua kali pada tema ini"
#: ../src/ui/theme-parser.c:4335
#, c-format
msgid "Failed to find a valid file for theme %s\n"
msgstr "Gagal menemukan berkas yang sah untuk tema %s\n"
#: ../src/x11/session.c:1815
msgid ""
"These windows do not support &quot;save current setup&quot; and will have to "
@@ -1284,7 +604,7 @@ msgstr ""
"Jendela ini tidak bisa &quot;menyimpan setelan aktif saat ini&quot; dan bila "
"log masuk kali lain Anda harus menjalankannya ulang."
#: ../src/x11/window-props.c:515
#: ../src/x11/window-props.c:549
#, c-format
msgid "%s (on %s)"
msgstr "%s (pada %s)"

1070
po/it.po

File diff suppressed because it is too large Load Diff

1619
po/kk.po

File diff suppressed because it is too large Load Diff

1214
po/ko.po

File diff suppressed because it is too large Load Diff

1268
po/lt.po

File diff suppressed because it is too large Load Diff

1137
po/nb.po

File diff suppressed because it is too large Load Diff

1225
po/pa.po

File diff suppressed because it is too large Load Diff

795
po/pl.po
View File

@@ -9,14 +9,14 @@
# Marek Stępień <marcoos@aviary.pl>, 2007.
# Wadim Dziedzic <wdziedzic@aviary.pl>, 2007.
# Tomasz Dominikowski <dominikowski@gmail.com>, 2008-2009.
# Piotr Drąg <piotrdrag@gmail.com>, 2010-2014.
# Aviary.pl <gnomepl@aviary.pl>, 2007-2014.
# Piotr Drąg <piotrdrag@gmail.com>, 2010-2015.
# Aviary.pl <gnomepl@aviary.pl>, 2007-2015.
msgid ""
msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-09-03 15:55+0200\n"
"PO-Revision-Date: 2014-09-03 15:58+0200\n"
"POT-Creation-Date: 2015-03-05 00:23+0100\n"
"PO-Revision-Date: 2015-03-05 00:24+0100\n"
"Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n"
"Language-Team: Polish <gnomepl@aviary.pl>\n"
"Language: pl\n"
@@ -448,29 +448,49 @@ msgstr "Przełączenie na 6. konsolę wirtualną"
msgid "Switch to VT 7"
msgstr "Przełączenie na 7. konsolę wirtualną"
#: ../src/backends/meta-monitor-manager.c:412
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
msgid "Switch to VT 8"
msgstr "Przełączenie na 8. konsolę wirtualną"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
msgid "Switch to VT 9"
msgstr "Przełączenie na 9. konsolę wirtualną"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
msgid "Switch to VT 10"
msgstr "Przełączenie na 10. konsolę wirtualną"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
msgid "Switch to VT 11"
msgstr "Przełączenie na 11. konsolę wirtualną"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
msgid "Switch to VT 12"
msgstr "Przełączenie na 12. konsolę wirtualną"
#: ../src/backends/meta-monitor-manager.c:364
msgid "Built-in display"
msgstr "Wbudowany ekran"
#: ../src/backends/meta-monitor-manager.c:437
#: ../src/backends/meta-monitor-manager.c:391
msgid "Unknown"
msgstr "Nieznany"
#: ../src/backends/meta-monitor-manager.c:439
#: ../src/backends/meta-monitor-manager.c:393
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:447
#: ../src/backends/meta-monitor-manager.c:401
#, 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:443
#: ../src/compositor/compositor.c:456
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display \"%s"
@@ -478,10 +498,6 @@ msgid ""
msgstr ""
"Inny menedżer składania jest już uruchomiony na podekranie %i ekranu \"%s\"."
#: ../src/compositor/meta-background.c:1044
msgid "background texture could not be created from file"
msgstr "nie można utworzyć tekstury tła z pliku"
#: ../src/core/bell.c:185
msgid "Bell event"
msgstr "Zdarzenie sygnału dźwiękowego"
@@ -509,7 +525,7 @@ msgstr "_Czekaj"
msgid "_Force Quit"
msgstr "_Zakończ"
#: ../src/core/display.c:547
#: ../src/core/display.c:562
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr ""
@@ -547,19 +563,6 @@ msgstr "Uruchamia jako menedżer składania Wayland"
msgid "Run as a full display server, rather than nested"
msgstr "Uruchamia pełny serwer wyświetlania zamiast osadzonego"
#: ../src/core/main.c:459
#, c-format
msgid "Failed to scan themes directory: %s\n"
msgstr "Przejrzenie katalogu z motywami się nie powiodło: %s\n"
#: ../src/core/main.c:475
#, c-format
msgid ""
"Could not find a theme! Be sure %s exists and contains the usual themes.\n"
msgstr ""
"Nie można odnaleźć żadnego motywu. Proszę sprawdzić, czy katalog %s istnieje "
"i zawiera standardowe motywy.\n"
#: ../src/core/mutter.c:39
#, c-format
msgid ""
@@ -584,749 +587,39 @@ msgstr "Wyświetla wersję"
msgid "Mutter plugin to use"
msgstr "Używana wtyczka programu Mutter"
#: ../src/core/prefs.c:2101
#: ../src/core/prefs.c:2004
#, c-format
msgid "Workspace %d"
msgstr "Obszar roboczy %d"
#: ../src/core/screen.c:548
#: ../src/core/screen.c:525
#, c-format
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
"to replace the current window manager."
msgstr ""
"Na ekranie \"%s\" działa już menedżer okien. Aby zastąpić działającego "
"menedżera okien, proszę spróbować użyć opcji --replace."
#: ../src/core/screen.c:607
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgstr "Podekran %d ekranu \"%s\" jest nieprawidłowy\n"
#: ../src/core/screen.c:564
#, c-format
msgid ""
"Screen %d on display \"%s\" already has a window manager; try using the --"
"replace option to replace the current window manager.\n"
msgstr ""
"Na podekranie %d ekranu \"%s\" działa już menedżer okien. Aby zastąpić "
"działającego menedżera okien, proszę spróbować użyć opcji --replace.\n"
#: ../src/core/screen.c:657
#, c-format
msgid "Screen %d on display \"%s\" already has a window manager\n"
msgstr "Na podekranie %d ekranu \"%s\" działa już menedżer okien\n"
#: ../src/core/util.c:118
msgid "Mutter was compiled without support for verbose mode\n"
msgstr ""
"Program Mutter został skompilowany bez obsługi trybu z obszerną informacją\n"
#. Translators: This represents the size of a window. The first number is
#. * the width of the window and the second is the height.
#.
#: ../src/ui/resizepopup.c:134
#, c-format
msgid "%d x %d"
msgstr "%d x %d"
#: ../src/ui/theme.c:233
msgid "top"
msgstr "góra"
#: ../src/ui/theme.c:235
msgid "bottom"
msgstr "dół"
#: ../src/ui/theme.c:237
msgid "left"
msgstr "lewa"
#: ../src/ui/theme.c:239
msgid "right"
msgstr "prawa"
#: ../src/ui/theme.c:267
#, c-format
msgid "frame geometry does not specify \"%s\" dimension"
msgstr "Rozmiar ramki nie określa wymiaru \"%s\""
#: ../src/ui/theme.c:286
#, c-format
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
msgstr "Rozmiar ramki nie określa wymiaru \"%s\" dla krawędzi \"%s\""
#: ../src/ui/theme.c:323
#, c-format
msgid "Button aspect ratio %g is not reasonable"
msgstr ""
"Współczynnik proporcji przycisku %g nie mieści się w rozsądnych granicach"
#: ../src/ui/theme.c:335
#, c-format
msgid "Frame geometry does not specify size of buttons"
msgstr "Rozmiar ramki nie określa liczby przycisków"
#: ../src/ui/theme.c:1061
#, c-format
msgid "Gradients should have at least two colors"
msgstr "Gradienty powinny się składać co najmniej z dwóch kolorów"
#: ../src/ui/theme.c:1211
#, c-format
msgid ""
"GTK custom color specification must have color name and fallback in "
"parentheses, e.g. gtk:custom(foo,bar); could not parse \"%s\""
msgstr ""
"Własna specyfikacja koloru biblioteki GTK+ musi posiadać nazwę koloru i "
"kolor zastępczy w nawiasach, np. gtk:custom(foo,bar); nie można przetworzyć "
"\"%s\""
#: ../src/ui/theme.c:1227
#, c-format
msgid ""
"Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-"
"_ are valid"
msgstr ""
"Nieprawidłowy znak \"%c\" w parametrze nazwa_koloru opcji gtk:custom, tylko "
"znaki A-Za-z0-9-_ są prawidłowe"
#: ../src/ui/theme.c:1241
#, c-format
msgid ""
"Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not "
"fit the format"
msgstr ""
"Formatem Gtk:custom jest \"gtk:custom(nazwa_koloru,kolor_zastępczy)\", \"%s"
"\" nie pasuje do formatu"
#: ../src/ui/theme.c:1286
#, c-format
msgid ""
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
"where NORMAL is the state; could not parse \"%s\""
msgstr ""
"Specyfikacja koloru biblioteki GTK+ musi zawierać stan w nawiasach "
"kwadratowych, np. gtk:fg[NORMAL], gdzie NORMAL jest nazwą stanu; nie można "
"przetworzyć \"%s\""
#: ../src/ui/theme.c:1300
#, c-format
msgid ""
"GTK color specification must have a close bracket after the state, e.g. gtk:"
"fg[NORMAL] where NORMAL is the state; could not parse \"%s\""
msgstr ""
"Specyfikacja koloru biblioteki GTK+ musi po nazwie stanu zawierać zamykający "
"nawias kwadratowy, np. gtk:fg[NORMAL], gdzie NORMAL jest nazwą stanu; nie "
"można przetworzyć \"%s\""
#: ../src/ui/theme.c:1311
#, c-format
msgid "Did not understand state \"%s\" in color specification"
msgstr "Niezrozumiały stan \"%s\" w specyfikacji koloru"
#: ../src/ui/theme.c:1324
#, c-format
msgid "Did not understand color component \"%s\" in color specification"
msgstr "Niezrozumiała definicja koloru \"%s\" w specyfikacji koloru"
#: ../src/ui/theme.c:1352
#, c-format
msgid ""
"Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the "
"format"
msgstr ""
"Formatem przenikania jest \"blend/bg_color/fg_color/alpha\", \"%s\" nie "
"pasuje do formatu"
#: ../src/ui/theme.c:1363
#, c-format
msgid "Could not parse alpha value \"%s\" in blended color"
msgstr "Nie można przetworzyć wartości alfa \"%s\" w przenikającym kolorze"
#: ../src/ui/theme.c:1373
#, c-format
msgid "Alpha value \"%s\" in blended color is not between 0.0 and 1.0"
msgstr ""
"Wartość alfa \"%s\" w przenikającym kolorze nie zawiera się pomiędzy 0,0 i "
"1,0"
#: ../src/ui/theme.c:1419
#, c-format
msgid ""
"Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format"
msgstr ""
"Formatem przenikania jest \"shade/base_color/factor\", \"%s\" nie pasuje do "
"formatu"
#: ../src/ui/theme.c:1430
#, c-format
msgid "Could not parse shade factor \"%s\" in shaded color"
msgstr ""
"Nie można przetworzyć współczynnika przenikania \"%s\" w przenikającym "
"kolorze"
#: ../src/ui/theme.c:1440
#, c-format
msgid "Shade factor \"%s\" in shaded color is negative"
msgstr "Współczynnik przenikania \"%s\" w przenikającym kolorze jest ujemny"
#: ../src/ui/theme.c:1469
#, c-format
msgid "Could not parse color \"%s\""
msgstr "Nie można przetworzyć koloru \"%s\""
#: ../src/ui/theme.c:1778
#, c-format
msgid "Coordinate expression contains character '%s' which is not allowed"
msgstr "Wyrażenie określające współrzędne zawiera niedozwolony znak \"%s\""
#: ../src/ui/theme.c:1805
#, c-format
msgid ""
"Coordinate expression contains floating point number '%s' which could not be "
"parsed"
msgstr ""
"Wyrażenie określające współrzędne zawiera liczbę zmiennoprzecinkową \"%s\", "
"której nie można przetworzyć"
#: ../src/ui/theme.c:1819
#, c-format
msgid "Coordinate expression contains integer '%s' which could not be parsed"
msgstr ""
"Wyrażenie określające współrzędne zawiera liczbę całkowitą \"%s\", której "
"nie można przetworzyć"
#: ../src/ui/theme.c:1940
#, c-format
msgid ""
"Coordinate expression contained unknown operator at the start of this text: "
"\"%s\""
msgstr ""
"Wyrażenie określające współrzędne zawiera nieznany operator na początku "
"tekstu: \"%s\""
#: ../src/ui/theme.c:1997
#, c-format
msgid "Coordinate expression was empty or not understood"
msgstr ""
"Wyrażenie określające współrzędne jest puste lub nie można go rozpoznać"
#: ../src/ui/theme.c:2110 ../src/ui/theme.c:2120 ../src/ui/theme.c:2154
#, c-format
msgid "Coordinate expression results in division by zero"
msgstr "Wyrażenie opisujące położenie zawiera dzielenie przez zero"
#: ../src/ui/theme.c:2162
#, c-format
msgid ""
"Coordinate expression tries to use mod operator on a floating-point number"
msgstr ""
"Wyrażenie opisujące położenie używa operatora dzielenia modulo z liczbą "
"zmiennoprzecinkową"
#: ../src/ui/theme.c:2218
#, c-format
msgid ""
"Coordinate expression has an operator \"%s\" where an operand was expected"
msgstr ""
"Wyrażenie opisujące położenie zawiera operator \"%s\" w miejscu, w którym "
"oczekiwano operandu"
#: ../src/ui/theme.c:2227
#, c-format
msgid "Coordinate expression had an operand where an operator was expected"
msgstr ""
"Wyrażenie opisujące położenie zawiera operand w miejscu, w którym oczekiwano "
"operatora"
#: ../src/ui/theme.c:2235
#, c-format
msgid "Coordinate expression ended with an operator instead of an operand"
msgstr "Wyrażenie opisujące położenie kończy się operatorem zamiast operandem"
#: ../src/ui/theme.c:2245
#, c-format
msgid ""
"Coordinate expression has operator \"%c\" following operator \"%c\" with no "
"operand in between"
msgstr ""
"Wyrażenie opisujące położenie zawiera operator \"%c\" bezpośrednio po "
"operatorze \"%c\" bez rozdzielającego ich operandu"
#: ../src/ui/theme.c:2396 ../src/ui/theme.c:2441
#, c-format
msgid "Coordinate expression had unknown variable or constant \"%s\""
msgstr ""
"Wyrażenie opisujące położenie zawiera nieznaną zmienną lub stałą \"%s\""
#: ../src/ui/theme.c:2495
#, c-format
msgid "Coordinate expression parser overflowed its buffer."
msgstr "Parser wyrażeń określających współrzędne przepełnił swój bufor."
#: ../src/ui/theme.c:2524
#, c-format
msgid "Coordinate expression had a close parenthesis with no open parenthesis"
msgstr ""
"Wyrażenie opisujące położenie zawiera nawias zamykający bez odpowiadającego "
"mu nawiasu otwierającego"
#: ../src/ui/theme.c:2588
#, c-format
msgid "Coordinate expression had an open parenthesis with no close parenthesis"
msgstr ""
"Wyrażenie opisujące położenie zawiera nawias otwierający bez odpowiadającego "
"mu nawiasu zamykającego"
#: ../src/ui/theme.c:2599
#, c-format
msgid "Coordinate expression doesn't seem to have any operators or operands"
msgstr ""
"Wyrażenie opisujące położenie nie zawiera żadnych operatorów ani operandów"
#: ../src/ui/theme.c:2812 ../src/ui/theme.c:2832 ../src/ui/theme.c:2852
#, c-format
msgid "Theme contained an expression that resulted in an error: %s\n"
msgstr "Motyw zawiera wyrażenie, przy którego obliczaniu wystąpił błąd: %s\n"
#: ../src/ui/theme.c:4455
#, c-format
msgid ""
"<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be "
"specified for this frame style"
msgstr ""
"Przy tym stylu ramki należy podać <button function=\"%s\" state=\"%s\" "
"draw_ops=\"cokolwiek\"/>"
#: ../src/ui/theme.c:4970 ../src/ui/theme.c:4995
#, c-format
msgid ""
"Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
msgstr ""
"Brak <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"cokolwiek\"/>"
#: ../src/ui/theme.c:5041
#, c-format
msgid "Failed to load theme \"%s\": %s\n"
msgstr "Wczytanie motywu \"%s\" się nie powiodło: %s\n"
#: ../src/ui/theme.c:5177 ../src/ui/theme.c:5184 ../src/ui/theme.c:5191
#: ../src/ui/theme.c:5198 ../src/ui/theme.c:5205
#, c-format
msgid "No <%s> set for theme \"%s\""
msgstr "Nie określono elementu <%s> dla motywu \"%s\""
#: ../src/ui/theme.c:5213
#, c-format
msgid ""
"No frame style set for window type \"%s\" in theme \"%s\", add a <window "
"type=\"%s\" style_set=\"whatever\"/> element"
msgstr ""
"Przy typie okna \"%s\" w motywie \"%s\" nie ustawiono stylu ramki. Należy "
"dodać element <window type=\"%s\" style_set=\"cokolwiek\"/>"
#: ../src/ui/theme.c:5620 ../src/ui/theme.c:5682 ../src/ui/theme.c:5745
#, c-format
msgid ""
"User-defined constants must begin with a capital letter; \"%s\" does not"
msgstr ""
"Stałe definiowane przez użytkownika powinny rozpoczynać się wielką literą, "
"natomiast \"%s\" nie spełnia tego warunku"
#: ../src/ui/theme.c:5628 ../src/ui/theme.c:5690 ../src/ui/theme.c:5753
#, c-format
msgid "Constant \"%s\" has already been defined"
msgstr "Stała \"%s\" została już określona"
#. Translators: This means that an attribute which should have been found
#. * on an XML element was not in fact found.
#.
#: ../src/ui/theme-parser.c:234
#, c-format
msgid "No \"%s\" attribute on element <%s>"
msgstr "Brak atrybutu \"%s\" w elemencie <%s>"
#: ../src/ui/theme-parser.c:263 ../src/ui/theme-parser.c:281
#, c-format
msgid "Line %d character %d: %s"
msgstr "Wiersz %d, znak %d: %s"
#: ../src/ui/theme-parser.c:481
#, c-format
msgid "Attribute \"%s\" repeated twice on the same <%s> element"
msgstr "Atrybut \"%s\" wystąpił dwukrotnie wewnątrz jednego elementu <%s>"
#: ../src/ui/theme-parser.c:505 ../src/ui/theme-parser.c:554
#, c-format
msgid "Attribute \"%s\" is invalid on <%s> element in this context"
msgstr ""
"Atrybut \"%s\" jest nieprawidłowy wewnątrz elementu <%s> w tym kontekście"
#: ../src/ui/theme-parser.c:596
#, c-format
msgid "Could not parse \"%s\" as an integer"
msgstr "Nie można przetworzyć \"%s\" jako liczby całkowitej"
#: ../src/ui/theme-parser.c:605 ../src/ui/theme-parser.c:660
#, c-format
msgid "Did not understand trailing characters \"%s\" in string \"%s\""
msgstr "Nie można rozpoznać końcowych znaków \"%s\" w napisie \"%s\""
#: ../src/ui/theme-parser.c:615
#, c-format
msgid "Integer %ld must be positive"
msgstr "Liczba całkowita %ld musi być dodatnia"
#: ../src/ui/theme-parser.c:623
#, c-format
msgid "Integer %ld is too large, current max is %d"
msgstr "Liczba całkowita %ld jest za duża, obecne maksimum to %d"
#: ../src/ui/theme-parser.c:651 ../src/ui/theme-parser.c:767
#, c-format
msgid "Could not parse \"%s\" as a floating point number"
msgstr "Napis \"%s\" nie jest zapisem liczby zmiennoprzecinkowej"
#: ../src/ui/theme-parser.c:682 ../src/ui/theme-parser.c:710
#, c-format
msgid "Boolean values must be \"true\" or \"false\" not \"%s\""
msgstr "Wartościami logicznymi są \"true\" i \"false\", a nie \"%s\""
#: ../src/ui/theme-parser.c:737
#, c-format
msgid "Angle must be between 0.0 and 360.0, was %g\n"
msgstr "Wartość kąta musi się mieścić pomiędzy 0,0 i 360,0, odczytano %g\n"
#: ../src/ui/theme-parser.c:800
#, c-format
msgid "Alpha must be between 0.0 (invisible) and 1.0 (fully opaque), was %g\n"
msgstr ""
"Wartość alfa musi się mieścić pomiędzy 0,0 (niewidoczne) i 1,0 (w pełni "
"nieprzezroczyste), odczytano %g\n"
#: ../src/ui/theme-parser.c:865
#, c-format
msgid ""
"Invalid title scale \"%s\" (must be one of xx-small,x-small,small,medium,"
"large,x-large,xx-large)\n"
msgstr ""
"Nieprawidłowy rozmiar tytułu \"%s\" (musi on być jedną z wartości: xx-small, "
"x-small, small, medium, large, x-large, xx-large)\n"
#: ../src/ui/theme-parser.c:1021 ../src/ui/theme-parser.c:1084
#: ../src/ui/theme-parser.c:1118 ../src/ui/theme-parser.c:1221
#, c-format
msgid "<%s> name \"%s\" used a second time"
msgstr "<%s>: użyto nazwy \"%s\" po raz drugi"
#: ../src/ui/theme-parser.c:1033 ../src/ui/theme-parser.c:1130
#: ../src/ui/theme-parser.c:1233
#, c-format
msgid "<%s> parent \"%s\" has not been defined"
msgstr "<%s>: nie określono elementu nadrzędnego o nazwie \"%s\""
#: ../src/ui/theme-parser.c:1143
#, c-format
msgid "<%s> geometry \"%s\" has not been defined"
msgstr "<%s>: nie określono geometrii o nazwie \"%s\""
#: ../src/ui/theme-parser.c:1156
#, c-format
msgid "<%s> must specify either a geometry or a parent that has a geometry"
msgstr "<%s> musi albo określać geometrię, albo element nadrzędny z geometrią"
#: ../src/ui/theme-parser.c:1198
msgid "You must specify a background for an alpha value to be meaningful"
msgstr "Aby wartość alfa miała sens, należy określić tło"
#: ../src/ui/theme-parser.c:1266
#, c-format
msgid "Unknown type \"%s\" on <%s> element"
msgstr "Nieznany typ \"%s\" wewnątrz elementu <%s>"
#: ../src/ui/theme-parser.c:1277
#, c-format
msgid "Unknown style_set \"%s\" on <%s> element"
msgstr "Nieznana wartość atrybutu \"style_set\" (%s) wewnątrz elementu <%s>"
#: ../src/ui/theme-parser.c:1285
#, c-format
msgid "Window type \"%s\" has already been assigned a style set"
msgstr "Z typem okna \"%s\" powiązano już zbiór stylów"
#: ../src/ui/theme-parser.c:1315 ../src/ui/theme-parser.c:1379
#: ../src/ui/theme-parser.c:1605 ../src/ui/theme-parser.c:2840
#: ../src/ui/theme-parser.c:2886 ../src/ui/theme-parser.c:3036
#: ../src/ui/theme-parser.c:3272 ../src/ui/theme-parser.c:3310
#: ../src/ui/theme-parser.c:3348 ../src/ui/theme-parser.c:3386
#, c-format
msgid "Element <%s> is not allowed below <%s>"
msgstr "Element <%s> nie jest dopuszczalny poniżej <%s>"
#: ../src/ui/theme-parser.c:1429 ../src/ui/theme-parser.c:1443
#: ../src/ui/theme-parser.c:1488
msgid ""
"Cannot specify both \"button_width\"/\"button_height\" and \"aspect_ratio\" "
"for buttons"
msgstr ""
"Nie można jednocześnie określać dla przycisku jego szerokości i wysokości "
"oraz współczynnika proporcji"
#: ../src/ui/theme-parser.c:1452
#, c-format
msgid "Distance \"%s\" is unknown"
msgstr "Odległość \"%s\" jest nieznana"
#: ../src/ui/theme-parser.c:1497
#, c-format
msgid "Aspect ratio \"%s\" is unknown"
msgstr "Współczynnik proporcji \"%s\" jest nieznany"
#: ../src/ui/theme-parser.c:1559
#, c-format
msgid "Border \"%s\" is unknown"
msgstr "Krawędź \"%s\" jest nieznana"
#: ../src/ui/theme-parser.c:1870
#, c-format
msgid "No \"start_angle\" or \"from\" attribute on element <%s>"
msgstr "Brak atrybutu \"start_angle\" wewnątrz elementu <%s>"
#: ../src/ui/theme-parser.c:1877
#, c-format
msgid "No \"extent_angle\" or \"to\" attribute on element <%s>"
msgstr "Brak atrybutu \"extent_angle\" wewnątrz elementu <%s>"
#: ../src/ui/theme-parser.c:2117
#, c-format
msgid "Did not understand value \"%s\" for type of gradient"
msgstr "Niezrozumiała wartość \"%s\" typu gradientu"
#: ../src/ui/theme-parser.c:2195 ../src/ui/theme-parser.c:2570
#, c-format
msgid "Did not understand fill type \"%s\" for <%s> element"
msgstr "Niezrozumiały typ wypełnienia \"%s\" elementu <%s>"
#: ../src/ui/theme-parser.c:2362 ../src/ui/theme-parser.c:2445
#: ../src/ui/theme-parser.c:2508
#, c-format
msgid "Did not understand state \"%s\" for <%s> element"
msgstr "Niezrozumiały stan \"%s\" (atrybut \"state\") elementu <%s>"
#: ../src/ui/theme-parser.c:2372 ../src/ui/theme-parser.c:2455
#, c-format
msgid "Did not understand shadow \"%s\" for <%s> element"
msgstr "Niezrozumiały cień \"%s\" (atrybut \"shadow\") elementu <%s>"
#: ../src/ui/theme-parser.c:2382
#, c-format
msgid "Did not understand arrow \"%s\" for <%s> element"
msgstr "Niezrozumiała strzałka \"%s\" (atrybut \"arrow\") elementu <%s>"
#: ../src/ui/theme-parser.c:2696 ../src/ui/theme-parser.c:2792
#, c-format
msgid "No <draw_ops> called \"%s\" has been defined"
msgstr "Nie określono elementu <draw_ops> o nazwie \"%s\""
#: ../src/ui/theme-parser.c:2708 ../src/ui/theme-parser.c:2804
#, c-format
msgid "Including draw_ops \"%s\" here would create a circular reference"
msgstr ""
"Włączenie tutaj elementu \"draw_ops\" o nazwie \"%s\" spowodowałoby "
"zapętlone odwołanie"
#: ../src/ui/theme-parser.c:2919
#, c-format
msgid "Unknown position \"%s\" for frame piece"
msgstr "Nieznane położenie \"%s\" elementu ramki"
#: ../src/ui/theme-parser.c:2927
#, c-format
msgid "Frame style already has a piece at position %s"
msgstr "Styl ramki zawiera już element o położeniu %s"
#: ../src/ui/theme-parser.c:2944 ../src/ui/theme-parser.c:3021
#, c-format
msgid "No <draw_ops> with the name \"%s\" has been defined"
msgstr "Nie określono elementu <draw_ops> o nazwie \"%s\""
#: ../src/ui/theme-parser.c:2974
#, c-format
msgid "Unknown function \"%s\" for button"
msgstr "Nieznana funkcja \"%s\" powiązana z przyciskiem"
#: ../src/ui/theme-parser.c:2984
#, c-format
msgid "Button function \"%s\" does not exist in this version (%d, need %d)"
msgstr "Funkcja \"%s\" przycisku nie istnieje w tej wersji (%d, wymaga %d)"
#: ../src/ui/theme-parser.c:2996
#, c-format
msgid "Unknown state \"%s\" for button"
msgstr "Nieznany stan \"%s\" powiązany z przyciskiem"
#: ../src/ui/theme-parser.c:3004
#, c-format
msgid "Frame style already has a button for function %s state %s"
msgstr ""
"Dla stylu ramki określono już przycisk, związany z funkcją %s i stanem %s"
#: ../src/ui/theme-parser.c:3075
#, c-format
msgid "\"%s\" is not a valid value for focus attribute"
msgstr "\"%s\" nie jest prawidłową wartością atrybutu \"focus\""
#: ../src/ui/theme-parser.c:3084
#, c-format
msgid "\"%s\" is not a valid value for state attribute"
msgstr "\"%s\" nie jest prawidłową wartością atrybutu \"state\""
#: ../src/ui/theme-parser.c:3094
#, c-format
msgid "A style called \"%s\" has not been defined"
msgstr "Nie określono stylu o nazwie \"%s\""
#: ../src/ui/theme-parser.c:3115 ../src/ui/theme-parser.c:3138
#, c-format
msgid "\"%s\" is not a valid value for resize attribute"
msgstr "\"%s\" nie jest prawidłową wartością atrybutu \"resize\""
#: ../src/ui/theme-parser.c:3149
#, c-format
msgid ""
"Should not have \"resize\" attribute on <%s> element for maximized/shaded "
"states"
msgstr ""
"Element <%s> nie powinien zawierać atrybutu \"resize\" przy stanie "
"zmaksymalizowanym lub zwiniętym"
#: ../src/ui/theme-parser.c:3163
#, c-format
msgid ""
"Should not have \"resize\" attribute on <%s> element for maximized states"
msgstr ""
"Element <%s> nie powinien zawierać atrybutu \"resize\" przy stanie "
"zmaksymalizowanym"
#: ../src/ui/theme-parser.c:3177 ../src/ui/theme-parser.c:3221
#, c-format
msgid "Style has already been specified for state %s resize %s focus %s"
msgstr "Określono już styl dla stanu %s, rozmiaru %s i uaktywnienia %s"
#: ../src/ui/theme-parser.c:3188 ../src/ui/theme-parser.c:3199
#: ../src/ui/theme-parser.c:3210 ../src/ui/theme-parser.c:3232
#: ../src/ui/theme-parser.c:3243 ../src/ui/theme-parser.c:3254
#, c-format
msgid "Style has already been specified for state %s focus %s"
msgstr "Określono już styl dla stanu %s i uaktywnienia %s"
#: ../src/ui/theme-parser.c:3293
msgid ""
"Can't have a two draw_ops for a <piece> element (theme specified a draw_ops "
"attribute and also a <draw_ops> element, or specified two elements)"
msgstr ""
"Element <piece> nie może zawierać dwóch \"draw_ops\" (motyw zawiera atrybut "
"\"draw_ops\" i element <draw_ops> lub dwa elementy)"
#: ../src/ui/theme-parser.c:3331
msgid ""
"Can't have a two draw_ops for a <button> element (theme specified a draw_ops "
"attribute and also a <draw_ops> element, or specified two elements)"
msgstr ""
"Element <button> nie może zawierać dwóch \"draw_ops\" (motyw zawiera atrybut "
"\"draw_ops\" i element <draw_ops> lub dwa elementy)"
#: ../src/ui/theme-parser.c:3369
msgid ""
"Can't have a two draw_ops for a <menu_icon> element (theme specified a "
"draw_ops attribute and also a <draw_ops> element, or specified two elements)"
msgstr ""
"Element <menu_icon> nie może zawierać dwóch \"draw_ops\" (motyw zawiera "
"atrybut \"draw_ops\" i element <draw_ops> lub dwa elementy)"
#: ../src/ui/theme-parser.c:3433
#, c-format
msgid "Bad version specification '%s'"
msgstr "Błędne określenie wersji \"%s\""
#: ../src/ui/theme-parser.c:3506
msgid ""
"\"version\" attribute cannot be used in metacity-theme-1.xml or metacity-"
"theme-2.xml"
msgstr ""
"Atrybut \"version\" nie może być używany w plikach metacity-theme-1.xml lub "
"metacity-theme-2.xml"
#: ../src/ui/theme-parser.c:3529
#, c-format
msgid "Theme requires version %s but latest supported theme version is %d.%d"
msgstr ""
"Motyw wymaga wersji %s, ale najnowsza obsługiwana wersja motywów to %d.%d"
#: ../src/ui/theme-parser.c:3561
#, c-format
msgid "Outermost element in theme must be <metacity_theme> not <%s>"
msgstr "Głównym elementem motywu musi być <metacity_theme>, nie <%s>"
#: ../src/ui/theme-parser.c:3581
#, c-format
msgid ""
"Element <%s> is not allowed inside a name/author/date/description element"
msgstr ""
"Element <%s> nie jest dopuszczalny wewnątrz elementu name/author/date/"
"description"
#: ../src/ui/theme-parser.c:3586
#, c-format
msgid "Element <%s> is not allowed inside a <constant> element"
msgstr "Element <%s> nie jest dopuszczalny wewnątrz elementu <constant>"
#: ../src/ui/theme-parser.c:3598
#, c-format
msgid ""
"Element <%s> is not allowed inside a distance/border/aspect_ratio element"
msgstr ""
"Element <%s> nie jest dopuszczalny wewnątrz elementu distance/border/"
"aspect_ratio"
#: ../src/ui/theme-parser.c:3620
#, c-format
msgid "Element <%s> is not allowed inside a draw operation element"
msgstr ""
"Element <%s> nie jest dopuszczalny wewnątrz elementu działania rysowania"
#: ../src/ui/theme-parser.c:3630 ../src/ui/theme-parser.c:3660
#: ../src/ui/theme-parser.c:3665 ../src/ui/theme-parser.c:3670
#, c-format
msgid "Element <%s> is not allowed inside a <%s> element"
msgstr "Element <%s> nie jest dopuszczalny wewnątrz elementu <%s>"
#: ../src/ui/theme-parser.c:3898
msgid "No draw_ops provided for frame piece"
msgstr "Brak elementu \"draw_ops\" powiązanego z elementem ramki"
#: ../src/ui/theme-parser.c:3913
msgid "No draw_ops provided for button"
msgstr "Brak elementu \"draw_ops\" powiązanego z przyciskiem"
#: ../src/ui/theme-parser.c:3967
#, c-format
msgid "No text is allowed inside element <%s>"
msgstr "Wewnątrz elementu <%s> nie jest dopuszczalny tekst"
#: ../src/ui/theme-parser.c:4025 ../src/ui/theme-parser.c:4037
#: ../src/ui/theme-parser.c:4049 ../src/ui/theme-parser.c:4061
#: ../src/ui/theme-parser.c:4073
#, c-format
msgid "<%s> specified twice for this theme"
msgstr "<%s> określono dwukrotnie dla tego motywu"
#: ../src/ui/theme-parser.c:4335
#, c-format
msgid "Failed to find a valid file for theme %s\n"
msgstr "Odnalezienie prawidłowego pliku dla motywu %s się nie powiodło\n"
#: ../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."
msgstr ""
"Te okna nie obsługują opcji zapisu aktualnego stanu (\"save current setup"
"\"), więc przy następnym zalogowaniu będą musiały zostać uruchomione ręcznie."
"Te okna nie obsługują opcji zapisu obecnego stanu (\"save current setup\"), "
"więc przy następnym zalogowaniu będą musiały zostać uruchomione ręcznie."
#: ../src/x11/window-props.c:515
#: ../src/x11/window-props.c:549
#, c-format
msgid "%s (on %s)"
msgstr "%s (na %s)"

2516
po/pt.po

File diff suppressed because it is too large Load Diff

View File

@@ -21,8 +21,8 @@ msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2015-01-08 22:56+0000\n"
"PO-Revision-Date: 2015-01-08 23:54-0300\n"
"POT-Creation-Date: 2015-02-26 11:24+0000\n"
"PO-Revision-Date: 2015-02-26 17:36-0300\n"
"Last-Translator: Rafael Ferreira <rafael.f.f1@gmail.com>\n"
"Language-Team: Brazilian Portuguese <gnome-pt_br-list@gnome.org>\n"
"Language: pt_BR\n"
@@ -30,7 +30,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Poedit 1.7.1\n"
"X-Generator: Poedit 1.7.4\n"
#: ../data/50-mutter-navigation.xml.in.h:1
msgid "Navigation"
@@ -452,22 +452,42 @@ msgstr "Trocar para o VT 6"
msgid "Switch to VT 7"
msgstr "Trocar para o VT 7"
#: ../src/backends/meta-monitor-manager.c:351
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
msgid "Switch to VT 8"
msgstr "Trocar para o VT 8"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
msgid "Switch to VT 9"
msgstr "Trocar para o VT 9"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
msgid "Switch to VT 10"
msgstr "Trocar para o VT 10"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
msgid "Switch to VT 11"
msgstr "Trocar para o VT 11"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
msgid "Switch to VT 12"
msgstr "Trocar para o VT 12"
#: ../src/backends/meta-monitor-manager.c:364
msgid "Built-in display"
msgstr "Tela embutida"
#: ../src/backends/meta-monitor-manager.c:378
#: ../src/backends/meta-monitor-manager.c:391
msgid "Unknown"
msgstr "Desconhecido"
#: ../src/backends/meta-monitor-manager.c:380
#: ../src/backends/meta-monitor-manager.c:393
msgid "Unknown Display"
msgstr "Monitor desconhecido"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: ../src/backends/meta-monitor-manager.c:388
#: ../src/backends/meta-monitor-manager.c:401
#, c-format
msgid "%s %s"
msgstr "%s de %s"
@@ -511,7 +531,7 @@ msgstr "_Esperar"
msgid "_Force Quit"
msgstr "_Forçar sair"
#: ../src/core/display.c:561
#: ../src/core/display.c:562
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "Falha ao abrir a exibição \"%s\" do sistema de janelas X\n"
@@ -604,7 +624,7 @@ msgstr ""
"atual&quot; e precisarão ser reiniciadas manualmente quando você reiniciar a "
"sessão."
#: ../src/x11/window-props.c:558
#: ../src/x11/window-props.c:549
#, c-format
msgid "%s (on %s)"
msgstr "%s (em %s)"

View File

@@ -7,18 +7,18 @@
# Andrew w. Nosenko <awn@bcs.zp.ua>, 2003.
# Leonid Kanter <leon@asplinux.ru>, 2004, 2005, 2006.
# Yuri Kozlov <yuray@komyakino.ru>, 2011.
# Ivan Komaritsyn <vantu5z@mail.ru>, 2015.
# Yuri Myasoedov <ymyasoedov@yandex.ru>, 2012-2014, 2015.
# Ivan Komaritsyn <vantu5z@mail.ru>, 2015.
#
msgid ""
msgstr ""
"Project-Id-Version: metacity ru\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2015-02-13 23:49+0000\n"
"PO-Revision-Date: 2015-02-14 17:12+0300\n"
"Last-Translator: Yuri Myasoedov <ymyasoedov@yandex.ru>\n"
"Language-Team: русский <gnome-cyr@gnome.org>\n"
"POT-Creation-Date: 2015-02-19 23:11+0000\n"
"PO-Revision-Date: 2015-02-20 13:59+0300\n"
"Last-Translator: Ivan Komaritsyn <vantu5z@mail.ru>\n"
"Language-Team: Русский <gnome-cyr@gnome.org>\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -440,6 +440,31 @@ msgstr "Переключиться на виртуальный терминал
msgid "Switch to VT 7"
msgstr "Переключиться на виртуальный терминал 7"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
#| msgid "Switch to VT 1"
msgid "Switch to VT 8"
msgstr "Переключиться на виртуальный терминал 8"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
#| msgid "Switch to VT 1"
msgid "Switch to VT 9"
msgstr "Переключиться на виртуальный терминал 9"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
#| msgid "Switch to VT 1"
msgid "Switch to VT 10"
msgstr "Переключиться на виртуальный терминал 10"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
#| msgid "Switch to VT 1"
msgid "Switch to VT 11"
msgstr "Переключиться на виртуальный терминал 11"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
#| msgid "Switch to VT 1"
msgid "Switch to VT 12"
msgstr "Переключиться на виртуальный терминал 12"
#: ../src/backends/meta-monitor-manager.c:364
msgid "Built-in display"
msgstr "Встроенный дисплей"

View File

@@ -14,8 +14,8 @@ msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2015-02-18 11:12+0000\n"
"PO-Revision-Date: 2015-02-18 16:54+0100\n"
"POT-Creation-Date: 2015-02-21 23:27+0000\n"
"PO-Revision-Date: 2015-02-22 11:11+0100\n"
"Last-Translator: Dušan Kazik <prescott66@gmail.com>\n"
"Language-Team: Slovak <gnome-sk-list@gnome.org>\n"
"Language: sk\n"
@@ -522,6 +522,26 @@ msgstr "Prepnúť na VT č. 6"
msgid "Switch to VT 7"
msgstr "Prepnúť na VT č. 7"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
msgid "Switch to VT 8"
msgstr "Prepnúť na VT č. 8"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
msgid "Switch to VT 9"
msgstr "Prepnúť na VT č. 9"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
msgid "Switch to VT 10"
msgstr "Prepnúť na VT č. 10"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
msgid "Switch to VT 11"
msgstr "Prepnúť na VT č. 11"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
msgid "Switch to VT 12"
msgstr "Prepnúť na VT č. 12"
#: ../src/backends/meta-monitor-manager.c:364
msgid "Built-in display"
msgstr "Vstavaný displej"

View File

@@ -11,8 +11,8 @@ msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2015-02-15 11:07+0000\n"
"PO-Revision-Date: 2015-02-15 20:57+0100\n"
"POT-Creation-Date: 2015-03-15 11:07+0000\n"
"PO-Revision-Date: 2015-03-15 14:36+0100\n"
"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
"Language: sl_SI\n"
@@ -435,6 +435,26 @@ msgstr "Preklopi na VT 6"
msgid "Switch to VT 7"
msgstr "Preklopi na VT 7"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
msgid "Switch to VT 8"
msgstr "Preklopi na VT 8"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
msgid "Switch to VT 9"
msgstr "Preklopi na VT 9"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
msgid "Switch to VT 10"
msgstr "Preklopi na VT 10"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
msgid "Switch to VT 11"
msgstr "Preklopi na VT 11"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
msgid "Switch to VT 12"
msgstr "Preklopi na VT 12"
#: ../src/backends/meta-monitor-manager.c:364
msgid "Built-in display"
msgstr "Vgrajen zaslon"

1252
po/sr.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1566
po/sv.po

File diff suppressed because it is too large Load Diff

1347
po/tr.po

File diff suppressed because it is too large Load Diff

2478
po/uk.po

File diff suppressed because it is too large Load Diff

1256
po/vi.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -41,9 +41,6 @@ endif
# Some random test programs for bits of the code
testboxes_SOURCES = core/testboxes.c
testasyncgetprop_SOURCES = x11/testasyncgetprop.c
noinst_PROGRAMS+=testboxes testasyncgetprop
testboxes_LDADD = $(MUTTER_LIBS) libmutter.la
testasyncgetprop_LDADD = $(MUTTER_LIBS) libmutter.la
noinst_PROGRAMS += testboxes

View File

@@ -210,10 +210,7 @@ libmutter_la_SOURCES = \
meta/theme.h \
ui/theme-private.h \
ui/ui.c \
x11/iconcache.c \
x11/iconcache.h \
x11/async-getprop.c \
x11/async-getprop.h \
x11/atomnames.h \
x11/events.c \
x11/events.h \
x11/group-private.h \
@@ -221,6 +218,8 @@ libmutter_la_SOURCES = \
x11/group-props.h \
x11/group.c \
meta/group.h \
x11/iconcache.c \
x11/iconcache.h \
x11/session.c \
x11/session.h \
x11/window-props.c \
@@ -242,6 +241,8 @@ libmutter_la_SOURCES += \
wayland/meta-wayland-private.h \
wayland/meta-xwayland.c \
wayland/meta-xwayland.h \
wayland/meta-xwayland-selection.c \
wayland/meta-xwayland-selection-private.h \
wayland/meta-xwayland-private.h \
wayland/meta-wayland-buffer.c \
wayland/meta-wayland-buffer.h \
@@ -249,6 +250,7 @@ libmutter_la_SOURCES += \
wayland/meta-wayland-region.h \
wayland/meta-wayland-data-device.c \
wayland/meta-wayland-data-device.h \
wayland/meta-wayland-data-device-private.h \
wayland/meta-wayland-keyboard.c \
wayland/meta-wayland-keyboard.h \
wayland/meta-wayland-pointer.c \
@@ -265,8 +267,8 @@ libmutter_la_SOURCES += \
wayland/meta-wayland-versions.h \
wayland/meta-wayland-outputs.c \
wayland/meta-wayland-outputs.h \
wayland/window-wayland.c \
wayland/window-wayland.h \
wayland/meta-window-wayland.c \
wayland/meta-window-wayland.h \
$(NULL)
endif
@@ -338,16 +340,10 @@ libmutterinclude_base_headers = \
$(libmutterinclude_headers) \
$(libmutterinclude_built_headers)
# Excluded from scanning for introspection but installed
# atomnames.h: macros cause problems for scanning process
libmutterinclude_extra_headers = \
meta/atomnames.h
libmutterincludedir = $(includedir)/mutter/meta
libmutterinclude_HEADERS = \
$(libmutterinclude_headers) \
$(libmutterinclude_extra_headers)
$(libmutterinclude_headers)
nodist_libmutterinclude_HEADERS = \
$(libmutterinclude_built_headers)

View File

@@ -50,6 +50,7 @@ struct _MetaBackend
GObject parent;
GHashTable *device_monitors;
gint current_device_id;
};
struct _MetaBackendClass
@@ -106,4 +107,7 @@ void meta_backend_warp_pointer (MetaBackend *backend,
struct xkb_keymap * meta_backend_get_keymap (MetaBackend *backend);
void meta_backend_update_last_device (MetaBackend *backend,
int device_id);
#endif /* META_BACKEND_PRIVATE_H */

View File

@@ -29,6 +29,7 @@
#include "meta-input-settings-private.h"
#include "backends/x11/meta-backend-x11.h"
#include "meta-cursor-tracker-private.h"
#include "meta-stage.h"
#ifdef HAVE_NATIVE_BACKEND
@@ -91,12 +92,37 @@ meta_backend_sync_screen_size (MetaBackend *backend)
META_BACKEND_GET_CLASS (backend)->update_screen_size (backend, width, height);
}
static void
center_pointer (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
MetaMonitorInfo *monitors, *primary;
guint n_monitors;
monitors = meta_monitor_manager_get_monitor_infos (priv->monitor_manager, &n_monitors);
primary = &monitors[meta_monitor_manager_get_primary_index (priv->monitor_manager)];
meta_backend_warp_pointer (backend,
primary->rect.x + primary->rect.width / 2,
primary->rect.y + primary->rect.height / 2);
}
static void
on_monitors_changed (MetaMonitorManager *monitors,
gpointer user_data)
{
MetaBackend *backend = META_BACKEND (user_data);
ClutterDeviceManager *manager = clutter_device_manager_get_default ();
ClutterInputDevice *device = clutter_device_manager_get_core_device (manager, CLUTTER_POINTER_DEVICE);
ClutterPoint point;
meta_backend_sync_screen_size (backend);
if (clutter_input_device_get_coords (device, NULL, &point))
{
/* If we're outside all monitors, warp the pointer back inside */
if (meta_monitor_manager_get_monitor_at_point (monitors, point.x, point.y) < 0)
center_pointer (backend);
}
}
static MetaIdleMonitor *
@@ -136,6 +162,55 @@ on_device_added (ClutterDeviceManager *device_manager,
create_device_monitor (backend, device_id);
}
static inline gboolean
device_is_slave_touchscreen (ClutterInputDevice *device)
{
return (clutter_input_device_get_device_mode (device) != CLUTTER_INPUT_MODE_MASTER &&
clutter_input_device_get_device_type (device) == CLUTTER_TOUCHSCREEN_DEVICE);
}
static inline gboolean
check_has_pointing_device (ClutterDeviceManager *manager)
{
const GSList *devices;
devices = clutter_device_manager_peek_devices (manager);
for (; devices; devices = devices->next)
{
ClutterInputDevice *device = devices->data;
if (clutter_input_device_get_device_mode (device) == CLUTTER_INPUT_MODE_MASTER)
continue;
if (clutter_input_device_get_device_type (device) == CLUTTER_TOUCHSCREEN_DEVICE ||
clutter_input_device_get_device_type (device) == CLUTTER_KEYBOARD_DEVICE)
continue;
return TRUE;
}
return FALSE;
}
static inline gboolean
check_has_slave_touchscreen (ClutterDeviceManager *manager)
{
const GSList *devices;
devices = clutter_device_manager_peek_devices (manager);
for (; devices; devices = devices->next)
{
ClutterInputDevice *device = devices->data;
if (clutter_input_device_get_device_mode (device) != CLUTTER_INPUT_MODE_MASTER &&
clutter_input_device_get_device_type (device) == CLUTTER_TOUCHSCREEN_DEVICE)
return TRUE;
}
return FALSE;
}
static void
on_device_removed (ClutterDeviceManager *device_manager,
ClutterInputDevice *device,
@@ -145,6 +220,32 @@ on_device_removed (ClutterDeviceManager *device_manager,
int device_id = clutter_input_device_get_device_id (device);
destroy_device_monitor (backend, device_id);
/* If the device the user last interacted goes away, check again pointer
* visibility.
*/
if (backend->current_device_id == device_id)
{
MetaCursorTracker *cursor_tracker = meta_cursor_tracker_get_for_screen (NULL);
gboolean has_touchscreen, has_pointing_device;
ClutterInputDeviceType device_type;
device_type = clutter_input_device_get_device_type (device);
has_touchscreen = check_has_slave_touchscreen (device_manager);
if (device_type == CLUTTER_TOUCHSCREEN_DEVICE && has_touchscreen)
{
/* There's more touchscreens left, keep the pointer hidden */
meta_cursor_tracker_set_pointer_visible (cursor_tracker, FALSE);
}
else if (device_type != CLUTTER_KEYBOARD_DEVICE)
{
has_pointing_device = check_has_pointing_device (device_manager);
meta_cursor_tracker_set_pointer_visible (cursor_tracker,
has_pointing_device &&
!has_touchscreen);
}
}
}
static MetaMonitorManager *
@@ -177,7 +278,9 @@ meta_backend_real_post_init (MetaBackend *backend)
NULL, (GDestroyNotify) g_object_unref);
{
MetaCursorTracker *cursor_tracker;
ClutterDeviceManager *manager;
gboolean has_touchscreen = FALSE;
GSList *devices, *l;
/* Create the core device monitor. */
@@ -195,12 +298,18 @@ meta_backend_real_post_init (MetaBackend *backend)
{
ClutterInputDevice *device = l->data;
on_device_added (manager, device, backend);
has_touchscreen |= device_is_slave_touchscreen (device);
}
cursor_tracker = meta_cursor_tracker_get_for_screen (NULL);
meta_cursor_tracker_set_pointer_visible (cursor_tracker, !has_touchscreen);
g_slist_free (devices);
}
priv->input_settings = meta_input_settings_create ();
center_pointer (backend);
}
static MetaCursorRenderer *
@@ -268,6 +377,12 @@ meta_backend_class_init (MetaBackendClass *klass)
0,
NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_UINT);
g_signal_new ("last-device-changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 1, G_TYPE_INT);
}
static void
@@ -388,6 +503,45 @@ meta_backend_get_stage (MetaBackend *backend)
return priv->stage;
}
void
meta_backend_update_last_device (MetaBackend *backend,
int device_id)
{
ClutterInputDeviceType device_type;
MetaCursorTracker *cursor_tracker;
ClutterDeviceManager *manager;
ClutterInputDevice *device;
if (backend->current_device_id == device_id)
return;
manager = clutter_device_manager_get_default ();
device = clutter_device_manager_get_device (manager, device_id);
if (!device ||
clutter_input_device_get_device_mode (device) == CLUTTER_INPUT_MODE_MASTER)
return;
device_type = clutter_input_device_get_device_type (device);
cursor_tracker = meta_cursor_tracker_get_for_screen (NULL);
backend->current_device_id = device_id;
g_signal_emit_by_name (backend, "last-device-changed", device_id);
if (device_type == CLUTTER_KEYBOARD_DEVICE)
return;
switch (device_type)
{
case CLUTTER_TOUCHSCREEN_DEVICE:
meta_cursor_tracker_set_pointer_visible (cursor_tracker, FALSE);
break;
default:
meta_cursor_tracker_set_pointer_visible (cursor_tracker, TRUE);
break;
}
}
static GType
get_backend_type (void)
{

View File

@@ -185,6 +185,7 @@ meta_cursor_tracker_handle_xevent (MetaCursorTracker *tracker,
return FALSE;
g_clear_pointer (&tracker->xfixes_cursor, meta_cursor_reference_unref);
g_signal_emit (tracker, signals[CURSOR_CHANGED], 0);
return TRUE;
}

View File

@@ -70,6 +70,10 @@ struct _MetaInputSettingsClass
ClutterInputDevice *device,
guint button);
void (* set_click_method) (MetaInputSettings *settings,
ClutterInputDevice *device,
GDesktopTouchpadClickMethod mode);
void (* set_keyboard_repeat) (MetaInputSettings *settings,
gboolean repeat,
guint delay,

View File

@@ -209,6 +209,10 @@ update_touchpad_left_handed (MetaInputSettings *input_settings,
MetaInputSettingsPrivate *priv;
gboolean enabled = FALSE;
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);
handedness = g_settings_get_enum (priv->touchpad_settings, "left-handed");
@@ -230,7 +234,6 @@ update_touchpad_left_handed (MetaInputSettings *input_settings,
if (device)
{
g_assert (clutter_input_device_get_device_type (device) == CLUTTER_TOUCHPAD_DEVICE);
settings_device_set_bool_setting (input_settings, device,
input_settings_class->set_left_handed,
enabled);
@@ -251,13 +254,16 @@ update_mouse_left_handed (MetaInputSettings *input_settings,
MetaInputSettingsPrivate *priv;
gboolean enabled;
if (device &&
clutter_input_device_get_device_type (device) != CLUTTER_POINTER_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->mouse_settings, "left-handed");
if (device)
{
g_assert (clutter_input_device_get_device_type (device) == CLUTTER_POINTER_DEVICE);
settings_device_set_bool_setting (input_settings, device,
input_settings_class->set_left_handed,
enabled);
@@ -279,51 +285,82 @@ update_mouse_left_handed (MetaInputSettings *input_settings,
}
}
static GSettings *
get_settings_for_device_type (MetaInputSettings *input_settings,
ClutterInputDeviceType type)
{
MetaInputSettingsPrivate *priv;
priv = meta_input_settings_get_instance_private (input_settings);
switch (type)
{
case CLUTTER_POINTER_DEVICE:
return priv->mouse_settings;
case CLUTTER_TOUCHPAD_DEVICE:
return priv->touchpad_settings;
default:
return NULL;
}
}
static void
update_device_speed (MetaInputSettings *input_settings,
GSettings *settings,
ClutterInputDevice *device,
ClutterInputDeviceType type)
ClutterInputDevice *device)
{
MetaInputSettingsClass *input_settings_class;
gdouble speed;
GSettings *settings;
ConfigDoubleFunc func;
const gchar *key = "speed";
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
speed = g_settings_get_double (settings, "speed");
func = META_INPUT_SETTINGS_GET_CLASS (input_settings)->set_speed;
if (device)
settings_device_set_double_setting (input_settings, device,
input_settings_class->set_speed,
speed);
{
settings = get_settings_for_device_type (input_settings,
clutter_input_device_get_device_type (device));
if (!settings)
return;
settings_device_set_double_setting (input_settings, device, func,
g_settings_get_double (settings, key));
}
else
settings_set_double_setting (input_settings, type,
input_settings_class->set_speed,
speed);
{
settings = get_settings_for_device_type (input_settings, CLUTTER_POINTER_DEVICE);
settings_set_double_setting (input_settings, CLUTTER_POINTER_DEVICE, func,
g_settings_get_double (settings, key));
settings = get_settings_for_device_type (input_settings, CLUTTER_TOUCHPAD_DEVICE);
settings_set_double_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE, func,
g_settings_get_double (settings, key));
}
}
static void
update_device_natural_scroll (MetaInputSettings *input_settings,
GSettings *settings,
ClutterInputDevice *device,
ClutterInputDeviceType type)
ClutterInputDevice *device)
{
MetaInputSettingsClass *input_settings_class;
gboolean enabled;
GSettings *settings;
ConfigBoolFunc func;
const gchar *key = "natural-scroll";
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
enabled = g_settings_get_boolean (settings, "natural-scroll");
func = META_INPUT_SETTINGS_GET_CLASS (input_settings)->set_invert_scroll;
if (device)
{
settings_device_set_bool_setting (input_settings, device,
input_settings_class->set_invert_scroll,
enabled);
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, func,
g_settings_get_boolean (settings, key));
}
else
{
settings_set_bool_setting (input_settings, type,
input_settings_class->set_invert_scroll,
enabled);
settings = get_settings_for_device_type (input_settings, CLUTTER_POINTER_DEVICE);
settings_set_bool_setting (input_settings, CLUTTER_POINTER_DEVICE, func,
g_settings_get_boolean (settings, key));
settings = get_settings_for_device_type (input_settings, CLUTTER_TOUCHPAD_DEVICE);
settings_set_bool_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE, func,
g_settings_get_boolean (settings, key));
}
}
@@ -335,6 +372,10 @@ update_touchpad_tap_enabled (MetaInputSettings *input_settings,
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-to-click");
@@ -361,6 +402,10 @@ update_touchpad_scroll_method (MetaInputSettings *input_settings,
GDesktopTouchpadScrollMethod method;
MetaInputSettingsPrivate *priv;
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);
method = g_settings_get_enum (priv->touchpad_settings, "scroll-method");
@@ -379,6 +424,36 @@ update_touchpad_scroll_method (MetaInputSettings *input_settings,
}
}
static void
update_touchpad_click_method (MetaInputSettings *input_settings,
ClutterInputDevice *device)
{
MetaInputSettingsClass *input_settings_class;
GDesktopTouchpadScrollMethod method;
MetaInputSettingsPrivate *priv;
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);
method = g_settings_get_enum (priv->touchpad_settings, "click-method");
if (device)
{
settings_device_set_uint_setting (input_settings, device,
input_settings_class->set_click_method,
method);
}
else
{
settings_set_uint_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE,
(ConfigUintFunc) input_settings_class->set_click_method,
method);
}
}
static void
update_touchpad_send_events (MetaInputSettings *input_settings,
ClutterInputDevice *device)
@@ -387,6 +462,10 @@ update_touchpad_send_events (MetaInputSettings *input_settings,
MetaInputSettingsPrivate *priv;
GDesktopDeviceSendEvents mode;
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);
mode = g_settings_get_enum (priv->touchpad_settings, "send-events");
@@ -429,11 +508,16 @@ update_trackball_scroll_button (MetaInputSettings *input_settings,
MetaInputSettingsPrivate *priv;
guint button;
if (device && !device_is_trackball (device))
return;
priv = meta_input_settings_get_instance_private (input_settings);
input_settings_class = META_INPUT_SETTINGS_GET_CLASS (input_settings);
button = g_settings_get_uint (priv->trackball_settings, "scroll-wheel-emulation-button");
/* This key is 'i' in the schema but it also specifies a minimum
* range of 0 so the cast here is safe. */
button = (guint) g_settings_get_int (priv->trackball_settings, "scroll-wheel-emulation-button");
if (device && device_is_trackball (device))
if (device)
{
input_settings_class->set_scroll_button (input_settings, device, button);
}
@@ -547,28 +631,26 @@ meta_input_settings_changed_cb (GSettings *settings,
if (strcmp (key, "left-handed") == 0)
update_mouse_left_handed (input_settings, NULL);
else if (strcmp (key, "speed") == 0)
update_device_speed (input_settings, settings, NULL,
CLUTTER_POINTER_DEVICE);
update_device_speed (input_settings, NULL);
else if (strcmp (key, "natural-scroll") == 0)
update_device_natural_scroll (input_settings, settings,
NULL, CLUTTER_POINTER_DEVICE);
update_device_natural_scroll (input_settings, NULL);
}
else if (settings == priv->touchpad_settings)
{
if (strcmp (key, "left-handed") == 0)
update_touchpad_left_handed (input_settings, NULL);
else if (strcmp (key, "speed") == 0)
update_device_speed (input_settings, settings, NULL,
CLUTTER_TOUCHPAD_DEVICE);
update_device_speed (input_settings, NULL);
else if (strcmp (key, "natural-scroll") == 0)
update_device_natural_scroll (input_settings, settings,
NULL, CLUTTER_TOUCHPAD_DEVICE);
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, "send-events") == 0)
update_touchpad_send_events (input_settings, NULL);
else if (strcmp (key, "scroll-method") == 0)
update_touchpad_scroll_method (input_settings, NULL);
else if (strcmp (key, "click-method") == 0)
update_touchpad_click_method (input_settings, NULL);
}
else if (settings == priv->trackball_settings)
{
@@ -678,44 +760,35 @@ check_add_mappable_device (MetaInputSettings *input_settings,
return TRUE;
}
static void
apply_device_settings (MetaInputSettings *input_settings,
ClutterInputDevice *device)
{
update_mouse_left_handed (input_settings, device);
update_device_speed (input_settings, device);
update_device_natural_scroll (input_settings, device);
update_touchpad_left_handed (input_settings, device);
update_device_speed (input_settings, device);
update_device_natural_scroll (input_settings, device);
update_touchpad_tap_enabled (input_settings, device);
update_touchpad_send_events (input_settings, device);
update_touchpad_scroll_method (input_settings, device);
update_touchpad_click_method (input_settings, device);
update_trackball_scroll_button (input_settings, device);
}
static void
meta_input_settings_device_added (ClutterDeviceManager *device_manager,
ClutterInputDevice *device,
MetaInputSettings *input_settings)
{
ClutterInputDeviceType type;
MetaInputSettingsPrivate *priv;
if (clutter_input_device_get_device_mode (device) == CLUTTER_INPUT_MODE_MASTER)
return;
priv = meta_input_settings_get_instance_private (input_settings);
type = clutter_input_device_get_device_type (device);
if (type == CLUTTER_POINTER_DEVICE)
{
update_mouse_left_handed (input_settings, device);
update_device_speed (input_settings, priv->mouse_settings, device, type);
if (device_is_trackball (device))
update_trackball_scroll_button (input_settings, device);
}
else if (type == CLUTTER_TOUCHPAD_DEVICE)
{
update_touchpad_left_handed (input_settings, device);
update_touchpad_tap_enabled (input_settings, device);
update_touchpad_scroll_method (input_settings, device);
update_touchpad_send_events (input_settings, device);
update_device_speed (input_settings, priv->touchpad_settings,
device, type);
update_device_natural_scroll (input_settings, priv->touchpad_settings,
device, type);
}
else
{
check_add_mappable_device (input_settings, device);
}
apply_device_settings (input_settings, device);
check_add_mappable_device (input_settings, device);
}
static void
@@ -753,25 +826,9 @@ static void
meta_input_settings_constructed (GObject *object)
{
MetaInputSettings *input_settings = META_INPUT_SETTINGS (object);
MetaInputSettingsPrivate *priv;
priv = meta_input_settings_get_instance_private (input_settings);
update_mouse_left_handed (input_settings, NULL);
update_touchpad_left_handed (input_settings, NULL);
update_touchpad_tap_enabled (input_settings, NULL);
update_touchpad_send_events (input_settings, NULL);
update_device_natural_scroll (input_settings, priv->touchpad_settings,
NULL, CLUTTER_TOUCHPAD_DEVICE);
update_device_speed (input_settings, priv->touchpad_settings, NULL,
CLUTTER_TOUCHPAD_DEVICE);
update_device_speed (input_settings, priv->mouse_settings, NULL,
CLUTTER_POINTER_DEVICE);
apply_device_settings (input_settings, NULL);
update_keyboard_repeat (input_settings);
check_mappable_devices (input_settings);
}

View File

@@ -65,6 +65,7 @@ typedef struct {
gboolean is_primary;
gboolean is_presentation;
gboolean is_underscanning;
} MetaOutputConfig;
typedef struct {
@@ -82,7 +83,8 @@ struct _MetaMonitorConfig {
gboolean current_is_for_laptop_lid;
MetaConfiguration *previous;
GFile *file;
GFile *user_file;
GFile *system_file;
GCancellable *save_cancellable;
UpClient *up_client;
@@ -238,6 +240,7 @@ meta_monitor_config_init (MetaMonitorConfig *self)
{
const char *filename;
char *path;
const char * const *system_dirs;
self->configs = g_hash_table_new_full (config_hash, config_equal, NULL, (GDestroyNotify) config_unref);
@@ -246,9 +249,17 @@ meta_monitor_config_init (MetaMonitorConfig *self)
filename = "monitors.xml";
path = g_build_filename (g_get_user_config_dir (), filename, NULL);
self->file = g_file_new_for_path (path);
self->user_file = g_file_new_for_path (path);
g_free (path);
for (system_dirs = g_get_system_config_dirs (); !self->system_file && *system_dirs; system_dirs++)
{
path = g_build_filename (*system_dirs, filename, NULL);
if (g_file_test (path, G_FILE_TEST_EXISTS))
self->system_file = g_file_new_for_path (path);
g_free (path);
}
self->up_client = up_client_new ();
self->lid_is_closed = up_client_get_lid_is_closed (self->up_client);
@@ -393,7 +404,8 @@ handle_start_element (GMarkupParseContext *context,
strcmp (element_name, "reflect_x") == 0 ||
strcmp (element_name, "reflect_y") == 0 ||
strcmp (element_name, "primary") == 0 ||
strcmp (element_name, "presentation") == 0) && parser->unknown_count == 0)
strcmp (element_name, "presentation") == 0 ||
strcmp (element_name, "underscanning") == 0) && parser->unknown_count == 0)
{
parser->state = STATE_OUTPUT_FIELD;
@@ -700,6 +712,8 @@ handle_text (GMarkupParseContext *context,
parser->output.is_primary = read_bool (text, text_len, error);
else if (strcmp (parser->output_field, "presentation") == 0)
parser->output.is_presentation = read_bool (text, text_len, error);
else if (strcmp (parser->output_field, "underscanning") == 0)
parser->output.is_underscanning = read_bool (text, text_len, error);
else
g_assert_not_reached ();
return;
@@ -717,8 +731,8 @@ static const GMarkupParser config_parser = {
.text = handle_text,
};
static void
meta_monitor_config_load (MetaMonitorConfig *self)
static gboolean
load_config_file (MetaMonitorConfig *self, GFile *file)
{
char *contents;
gsize size;
@@ -736,14 +750,12 @@ meta_monitor_config_load (MetaMonitorConfig *self)
*/
error = NULL;
ok = g_file_load_contents (self->file, NULL, &contents, &size, NULL, &error);
ok = g_file_load_contents (file, NULL, &contents, &size, NULL, &error);
if (!ok)
{
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
meta_warning ("Failed to load stored monitor configuration: %s\n", error->message);
g_error_free (error);
return;
return FALSE;
}
memset (&parser, 0, sizeof (ConfigParser));
@@ -772,6 +784,17 @@ meta_monitor_config_load (MetaMonitorConfig *self)
g_markup_parse_context_free (context);
g_free (contents);
return ok;
}
static void
meta_monitor_config_load (MetaMonitorConfig *self)
{
if (self->user_file && load_config_file (self, self->user_file))
return;
if (self->system_file && load_config_file (self, self->system_file))
return;
}
MetaMonitorConfig *
@@ -863,14 +886,14 @@ apply_configuration (MetaMonitorConfig *self,
MetaConfiguration *config,
MetaMonitorManager *manager)
{
GPtrArray *crtcs, *outputs;
gboolean ret = FALSE;
g_autoptr(GPtrArray) crtcs = NULL;
g_autoptr(GPtrArray) outputs = NULL;
crtcs = g_ptr_array_new_full (config->n_outputs, (GDestroyNotify)meta_crtc_info_free);
outputs = g_ptr_array_new_full (config->n_outputs, (GDestroyNotify)meta_output_info_free);
if (!meta_monitor_config_assign_crtcs (config, manager, crtcs, outputs))
goto out;
return FALSE;
meta_monitor_manager_apply_configuration (manager,
(MetaCRTCInfo**)crtcs->pdata, crtcs->len,
@@ -882,12 +905,7 @@ apply_configuration (MetaMonitorConfig *self,
* inside turn_off_laptop_display / apply_configuration_with_lid */
self->current_is_for_laptop_lid = FALSE;
ret = TRUE;
out:
g_ptr_array_unref (crtcs);
g_ptr_array_unref (outputs);
return ret;
return TRUE;
}
static gboolean
@@ -1056,12 +1074,12 @@ meta_monitor_config_apply_stored (MetaMonitorConfig *self,
* which are internal monitors), or failing that, the one with the
* best resolution
*/
static MetaOutput *
static int
find_primary_output (MetaOutput *outputs,
unsigned n_outputs)
{
unsigned i;
MetaOutput *best;
int best;
int best_width, best_height;
g_assert (n_outputs >= 1);
@@ -1069,23 +1087,23 @@ find_primary_output (MetaOutput *outputs,
for (i = 0; i < n_outputs; i++)
{
if (outputs[i].is_primary)
return &outputs[i];
return i;
}
for (i = 0; i < n_outputs; i++)
{
if (output_is_laptop (&outputs[i]))
return &outputs[i];
return i;
}
best = NULL;
best = -1;
best_width = 0; best_height = 0;
for (i = 0; i < n_outputs; i++)
{
if (outputs[i].preferred_mode->width * outputs[i].preferred_mode->height >
best_width * best_height)
{
best = &outputs[i];
best = i;
best_width = outputs[i].preferred_mode->width;
best_height = outputs[i].preferred_mode->height;
}
@@ -1123,7 +1141,7 @@ make_suggested_config (MetaMonitorConfig *self,
MetaConfiguration *config)
{
unsigned int i;
MetaOutput *primary;
int primary;
GList *region = NULL;
g_return_val_if_fail (config != NULL, FALSE);
@@ -1131,7 +1149,7 @@ make_suggested_config (MetaMonitorConfig *self,
for (i = 0; i < n_outputs; i++)
{
gboolean is_primary = (&outputs[i] == primary);
gboolean is_primary = ((int)i == primary);
if (outputs[i].suggested_x < 0 || outputs[i].suggested_y < 0)
return FALSE;
@@ -1158,6 +1176,81 @@ make_suggested_config (MetaMonitorConfig *self,
return TRUE;
}
static void
config_one_untiled_output (MetaOutput *outputs,
MetaConfiguration *config,
int idx, gboolean is_primary,
int *x, unsigned long *output_configured_bitmap)
{
MetaOutput *output = &outputs[idx];
if (*output_configured_bitmap & (1 << idx))
return;
init_config_from_preferred_mode (&config->outputs[idx], output);
config->outputs[idx].is_primary = is_primary;
config->outputs[idx].rect.x = *x;
*x += config->outputs[idx].rect.width;
*output_configured_bitmap |= (1 << idx);
}
static void
config_one_tiled_group (MetaOutput *outputs,
MetaConfiguration *config,
int base_idx, gboolean is_primary,
int n_outputs,
int *x, unsigned long *output_configured_bitmap)
{
guint32 num_h_tile, num_v_tile, ht, vt;
int j;
int cur_x, cur_y, addx = 0;
if (*output_configured_bitmap & (1 << base_idx))
return;
if (outputs[base_idx].tile_info.group_id == 0)
return;
cur_x = cur_y = 0;
num_h_tile = outputs[base_idx].tile_info.max_h_tiles;
num_v_tile = outputs[base_idx].tile_info.max_v_tiles;
/* iterate over horizontal tiles */
cur_x = *x;
for (ht = 0; ht < num_h_tile; ht++)
{
cur_y = 0;
addx = 0;
for (vt = 0; vt < num_v_tile; vt++)
{
for (j = 0; j < n_outputs; j++)
{
if (outputs[j].tile_info.group_id != outputs[base_idx].tile_info.group_id)
continue;
if (outputs[j].tile_info.loc_h_tile != ht ||
outputs[j].tile_info.loc_v_tile != vt)
continue;
if (ht == 0 && vt == 0 && is_primary)
config->outputs[j].is_primary = TRUE;
init_config_from_preferred_mode (&config->outputs[j], &outputs[j]);
config->outputs[j].rect.x = cur_x;
config->outputs[j].rect.y = cur_y;
*output_configured_bitmap |= (1 << j);
cur_y += outputs[j].tile_info.tile_h;
if (vt == 0)
addx += outputs[j].tile_info.tile_w;
}
}
cur_x += addx;
}
*x = cur_x;
}
static void
make_linear_config (MetaMonitorConfig *self,
MetaOutput *outputs,
@@ -1166,31 +1259,41 @@ make_linear_config (MetaMonitorConfig *self,
int max_height,
MetaConfiguration *config)
{
MetaOutput *primary;
unsigned long output_configured_bitmap = 0;
unsigned i;
int x;
int primary;
g_return_if_fail (config != NULL);
primary = find_primary_output (outputs, n_outputs);
x = primary->preferred_mode->width;
x = 0;
/* set the primary up first at 0 */
if (outputs[primary].tile_info.group_id)
{
config_one_tiled_group (outputs, config, primary, TRUE, n_outputs,
&x, &output_configured_bitmap);
}
else
{
config_one_untiled_output (outputs, config, primary, TRUE,
&x, &output_configured_bitmap);
}
/* then add other tiled monitors */
for (i = 0; i < n_outputs; i++)
{
gboolean is_primary = (&outputs[i] == primary);
config_one_tiled_group (outputs, config, i, FALSE, n_outputs,
&x, &output_configured_bitmap);
}
init_config_from_preferred_mode (&config->outputs[i], &outputs[i]);
config->outputs[i].is_primary = is_primary;
/* then add remaining monitors */
for (i = 0; i < n_outputs; i++)
{
config_one_untiled_output (outputs, config, i, FALSE,
&x, &output_configured_bitmap);
if (is_primary)
{
config->outputs[i].rect.x = 0;
}
else
{
config->outputs[i].rect.x = x;
x += config->outputs[i].rect.width;
}
}
}
@@ -1314,7 +1417,7 @@ ensure_at_least_one_output (MetaMonitorConfig *self,
unsigned n_outputs)
{
MetaConfiguration *config;
MetaOutput *primary;
int primary;
unsigned i;
/* Check that we have at least one active output */
@@ -1332,7 +1435,7 @@ ensure_at_least_one_output (MetaMonitorConfig *self,
for (i = 0; i < n_outputs; i++)
{
gboolean is_primary = (&outputs[i] == primary);
gboolean is_primary = ((int)i == primary);
if (is_primary)
{
@@ -1408,6 +1511,7 @@ init_config_from_output (MetaOutputConfig *config,
config->transform = output->crtc->transform;
config->is_primary = output->is_primary;
config->is_presentation = output->is_presentation;
config->is_underscanning = output->is_underscanning;
}
void
@@ -1598,7 +1702,8 @@ meta_monitor_config_save (MetaMonitorConfig *self)
" <reflect_x>%s</reflect_x>\n"
" <reflect_y>no</reflect_y>\n"
" <primary>%s</primary>\n"
" <presentation>%s</presentation>\n",
" <presentation>%s</presentation>\n"
" <underscanning>%s</underscanning>\n",
output->rect.width,
output->rect.height,
refresh_rate,
@@ -1607,7 +1712,8 @@ meta_monitor_config_save (MetaMonitorConfig *self)
rotation_map[output->transform & 0x3],
output->transform >= META_MONITOR_TRANSFORM_FLIPPED ? "yes" : "no",
output->is_primary ? "yes" : "no",
output->is_presentation ? "yes" : "no");
output->is_presentation ? "yes" : "no",
output->is_underscanning ? "yes" : "no");
}
g_string_append (buffer, " </output>\n");
@@ -1622,7 +1728,7 @@ meta_monitor_config_save (MetaMonitorConfig *self)
closure->config = g_object_ref (self);
closure->buffer = buffer;
g_file_replace_contents_async (self->file,
g_file_replace_contents_async (self->user_file,
buffer->str, buffer->len,
NULL, /* etag */
TRUE,
@@ -1814,7 +1920,6 @@ real_assign_crtcs (CrtcAssignment *assignment,
MetaOutputKey *output_key;
MetaOutputConfig *output_config;
unsigned int i;
gboolean success;
if (output_num == assignment->config->n_outputs)
return TRUE;
@@ -1831,8 +1936,6 @@ real_assign_crtcs (CrtcAssignment *assignment,
&crtcs, &n_crtcs,
&outputs, &n_outputs);
success = FALSE;
for (i = 0; i < n_crtcs; i++)
{
MetaCRTC *crtc = &crtcs[i];
@@ -1879,10 +1982,7 @@ real_assign_crtcs (CrtcAssignment *assignment,
output))
{
if (real_assign_crtcs (assignment, output_num + 1))
{
success = TRUE;
goto out;
}
return TRUE;
crtc_assignment_unassign (assignment, crtc, output);
}
@@ -1891,8 +1991,7 @@ real_assign_crtcs (CrtcAssignment *assignment,
}
}
out:
return success;
return FALSE;
}
static gboolean
@@ -1941,6 +2040,7 @@ meta_monitor_config_assign_crtcs (MetaConfiguration *config,
&config->keys[i]);
output_info->is_primary = output_config->is_primary;
output_info->is_presentation = output_config->is_presentation;
output_info->is_underscanning = output_config->is_underscanning;
g_ptr_array_add (outputs, output_info);
}

View File

@@ -96,6 +96,7 @@ meta_monitor_manager_dummy_read_current (MetaMonitorManager *manager)
manager->outputs[0].backlight_min = 0;
manager->outputs[0].backlight_max = 0;
manager->outputs[0].connector_type = META_CONNECTOR_TYPE_LVDS;
manager->outputs[0].scale = 1;
}
static void

View File

@@ -56,6 +56,7 @@ typedef struct _MetaMonitorMode MetaMonitorMode;
typedef struct _MetaMonitorInfo MetaMonitorInfo;
typedef struct _MetaCRTCInfo MetaCRTCInfo;
typedef struct _MetaOutputInfo MetaOutputInfo;
typedef struct _MetaTileInfo MetaTileInfo;
typedef enum {
META_MONITOR_TRANSFORM_NORMAL,
@@ -89,6 +90,17 @@ typedef enum {
META_CONNECTOR_TYPE_DSI = 16,
} MetaConnectorType;
struct _MetaTileInfo {
guint32 group_id;
guint32 flags;
guint32 max_h_tiles;
guint32 max_v_tiles;
guint32 loc_h_tile;
guint32 loc_v_tile;
guint32 tile_w;
guint32 tile_h;
};
struct _MetaOutput
{
/* The CRTC driving this output, NULL if the output is not enabled */
@@ -132,6 +144,8 @@ struct _MetaOutput
*/
gboolean is_primary;
gboolean is_presentation;
gboolean is_underscanning;
gboolean supports_underscanning;
gpointer driver_private;
GDestroyNotify driver_notify;
@@ -140,6 +154,8 @@ struct _MetaOutput
gboolean hotplug_mode_update;
gint suggested_x;
gint suggested_y;
MetaTileInfo tile_info;
};
struct _MetaCRTC
@@ -159,6 +175,9 @@ struct _MetaCRTC
gboolean is_dirty;
MetaCursorReference *cursor;
gpointer driver_private;
GDestroyNotify driver_notify;
};
struct _MetaMonitorMode
@@ -175,6 +194,7 @@ struct _MetaMonitorMode
GDestroyNotify driver_notify;
};
#define META_MAX_OUTPUTS_PER_MONITOR 4
/**
* MetaMonitorInfo:
*
@@ -190,6 +210,10 @@ struct _MetaMonitorInfo
int number;
int xinerama_index;
MetaRectangle rect;
/* for tiled monitors these are calculated, from untiled just copied */
float refresh_rate;
int width_mm;
int height_mm;
gboolean is_primary;
gboolean is_presentation; /* XXX: not yet used */
gboolean in_fullscreen;
@@ -203,6 +227,12 @@ struct _MetaMonitorInfo
the primary one).
*/
glong winsys_id;
guint32 tile_group_id;
int monitor_winsys_xid;
int n_outputs;
MetaOutput *outputs[META_MAX_OUTPUTS_PER_MONITOR];
};
/*
@@ -224,12 +254,13 @@ struct _MetaCRTCInfo {
/*
* MetaOutputInfo:
* this is the same as MetaOutputInfo, but for CRTCs
* this is the same as MetaCRTCInfo, but for outputs
*/
struct _MetaOutputInfo {
MetaOutput *output;
gboolean is_primary;
gboolean is_presentation;
gboolean is_underscanning;
};
#define META_TYPE_MONITOR_MANAGER (meta_monitor_manager_get_type ())
@@ -319,6 +350,13 @@ struct _MetaMonitorManagerClass
unsigned short *,
unsigned short *,
unsigned short *);
void (*add_monitor) (MetaMonitorManager *,
MetaMonitorInfo *);
void (*delete_monitor) (MetaMonitorManager *,
int monitor_winsys_xid);
};
void meta_monitor_manager_rebuild_derived (MetaMonitorManager *manager);
@@ -370,6 +408,10 @@ gboolean meta_monitor_manager_get_monitor_matrix (MetaMonitorManager *
MetaOutput *output,
gfloat matrix[6]);
gint meta_monitor_manager_get_monitor_at_point (MetaMonitorManager *manager,
gfloat x,
gfloat y);
/* Returns true if transform causes width and height to be inverted
This is true for the odd transforms in the enum */
static inline gboolean

View File

@@ -71,6 +71,98 @@ meta_monitor_manager_init (MetaMonitorManager *manager)
{
}
/*
* rules for constructing a tiled monitor
* 1. find a tile_group_id
* 2. iterate over all outputs for that tile group id
* 3. see if output has a crtc and if it is configured for the tile size
* 4. calculate the total tile size
* 5. set tile finished size
* 6. check for more tile_group_id
*/
static void
construct_tile_monitor (MetaMonitorManager *manager,
GArray *monitor_infos,
guint32 tile_group_id)
{
MetaMonitorInfo info;
unsigned i;
for (i = 0; i < monitor_infos->len; i++)
{
MetaMonitorInfo *pinfo = &g_array_index (monitor_infos, MetaMonitorInfo, i);
if (pinfo->tile_group_id == tile_group_id)
return;
}
/* didn't find it */
info.number = monitor_infos->len;
info.tile_group_id = tile_group_id;
info.is_presentation = FALSE;
info.refresh_rate = 0.0;
info.width_mm = 0;
info.height_mm = 0;
info.is_primary = FALSE;
info.rect.x = INT_MAX;
info.rect.y = INT_MAX;
info.rect.width = 0;
info.rect.height = 0;
info.winsys_id = 0;
info.n_outputs = 0;
info.monitor_winsys_xid = 0;
for (i = 0; i < manager->n_outputs; i++)
{
MetaOutput *output = &manager->outputs[i];
if (!output->tile_info.group_id)
continue;
if (output->tile_info.group_id != tile_group_id)
continue;
if (!output->crtc)
continue;
if (output->crtc->rect.width != (int)output->tile_info.tile_w ||
output->crtc->rect.height != (int)output->tile_info.tile_h)
continue;
if (output->tile_info.loc_h_tile == 0 && output->tile_info.loc_v_tile == 0)
{
info.refresh_rate = output->crtc->current_mode->refresh_rate;
info.width_mm = output->width_mm;
info.height_mm = output->height_mm;
info.winsys_id = output->winsys_id;
}
/* hack */
if (output->crtc->rect.x < info.rect.x)
info.rect.x = output->crtc->rect.x;
if (output->crtc->rect.y < info.rect.y)
info.rect.y = output->crtc->rect.y;
if (output->tile_info.loc_h_tile == 0)
info.rect.height += output->tile_info.tile_h;
if (output->tile_info.loc_v_tile == 0)
info.rect.width += output->tile_info.tile_w;
if (info.n_outputs > META_MAX_OUTPUTS_PER_MONITOR)
continue;
info.outputs[info.n_outputs++] = output;
}
/* if we don't have a winsys id, i.e. we haven't found tile 0,0
don't try and add this to the monitor infos */
if (!info.winsys_id)
return;
g_array_append_val (monitor_infos, info);
}
/*
* make_logical_config:
*
@@ -81,6 +173,7 @@ meta_monitor_manager_init (MetaMonitorManager *manager)
static void
make_logical_config (MetaMonitorManager *manager)
{
MetaMonitorManagerClass *manager_class = META_MONITOR_MANAGER_GET_CLASS (manager);
GArray *monitor_infos;
unsigned int i, j;
@@ -91,6 +184,15 @@ make_logical_config (MetaMonitorManager *manager)
for each of them, unless they reference a rectangle that
is already there.
*/
/* for tiling we need to work out how many tiled outputs there are */
for (i = 0; i < manager->n_outputs; i++)
{
MetaOutput *output = &manager->outputs[i];
if (output->tile_info.group_id)
construct_tile_monitor (manager, monitor_infos, output->tile_info.group_id);
}
for (i = 0; i < manager->n_crtcs; i++)
{
MetaCRTC *crtc = &manager->crtcs[i];
@@ -102,8 +204,8 @@ make_logical_config (MetaMonitorManager *manager)
for (j = 0; j < monitor_infos->len; j++)
{
MetaMonitorInfo *info = &g_array_index (monitor_infos, MetaMonitorInfo, j);
if (meta_rectangle_equal (&crtc->rect,
&info->rect))
if (meta_rectangle_contains_rect (&info->rect,
&crtc->rect))
{
crtc->logical_monitor = info;
break;
@@ -115,7 +217,9 @@ make_logical_config (MetaMonitorManager *manager)
MetaMonitorInfo info;
info.number = monitor_infos->len;
info.tile_group_id = 0;
info.rect = crtc->rect;
info.refresh_rate = crtc->current_mode->refresh_rate;
info.is_primary = FALSE;
/* This starts true because we want
is_presentation only if all outputs are
@@ -125,7 +229,8 @@ make_logical_config (MetaMonitorManager *manager)
info.is_presentation = TRUE;
info.in_fullscreen = -1;
info.winsys_id = 0;
info.n_outputs = 0;
info.monitor_winsys_xid = 0;
g_array_append_val (monitor_infos, info);
crtc->logical_monitor = &g_array_index (monitor_infos, MetaMonitorInfo,
@@ -147,6 +252,9 @@ make_logical_config (MetaMonitorManager *manager)
if (output->crtc == NULL)
continue;
if (output->tile_info.group_id)
continue;
/* We must have a logical monitor on every CRTC at this point */
g_assert (output->crtc->logical_monitor != NULL);
@@ -155,6 +263,12 @@ make_logical_config (MetaMonitorManager *manager)
info->is_primary = info->is_primary || output->is_primary;
info->is_presentation = info->is_presentation && output->is_presentation;
info->width_mm = output->width_mm;
info->height_mm = output->height_mm;
info->outputs[0] = output;
info->n_outputs = 1;
if (output->is_primary || info->winsys_id == 0)
info->winsys_id = output->winsys_id;
@@ -164,6 +278,10 @@ make_logical_config (MetaMonitorManager *manager)
manager->n_monitor_infos = monitor_infos->len;
manager->monitor_infos = (void*)g_array_free (monitor_infos, FALSE);
if (manager_class->add_monitor)
for (i = 0; i < manager->n_monitor_infos; i++)
manager_class->add_monitor (manager, &manager->monitor_infos[i]);
}
static void
@@ -264,6 +382,21 @@ meta_monitor_manager_free_mode_array (MetaMonitorMode *old_modes,
g_free (old_modes);
}
static void
meta_monitor_manager_free_crtc_array (MetaCRTC *old_crtcs,
int n_old_crtcs)
{
int i;
for (i = 0; i < n_old_crtcs; i++)
{
if (old_crtcs[i].driver_notify)
old_crtcs[i].driver_notify (&old_crtcs[i]);
}
g_free (old_crtcs);
}
static void
meta_monitor_manager_finalize (GObject *object)
{
@@ -271,8 +404,8 @@ meta_monitor_manager_finalize (GObject *object)
meta_monitor_manager_free_output_array (manager->outputs, manager->n_outputs);
meta_monitor_manager_free_mode_array (manager->modes, manager->n_modes);
meta_monitor_manager_free_crtc_array (manager->crtcs, manager->n_crtcs);
g_free (manager->monitor_infos);
g_free (manager->crtcs);
G_OBJECT_CLASS (meta_monitor_manager_parent_class)->finalize (object);
}
@@ -353,16 +486,14 @@ static char *
make_display_name (MetaMonitorManager *manager,
MetaOutput *output)
{
char *inches = NULL;
char *vendor_name = NULL;
char *ret;
g_autofree char *inches = NULL;
g_autofree char *vendor_name = NULL;
switch (output->connector_type)
{
case META_CONNECTOR_TYPE_LVDS:
case META_CONNECTOR_TYPE_eDP:
ret = g_strdup (_("Built-in display"));
goto out;
return g_strdup (_("Built-in display"));
default:
break;
}
@@ -398,18 +529,12 @@ make_display_name (MetaMonitorManager *manager,
/* TRANSLATORS: this is a monitor vendor name, followed by a
* size in inches, like 'Dell 15"'
*/
ret = g_strdup_printf (_("%s %s"), vendor_name, inches);
return g_strdup_printf (_("%s %s"), vendor_name, inches);
}
else
{
ret = g_strdup (vendor_name);
return g_strdup (vendor_name);
}
out:
g_free (inches);
g_free (vendor_name);
return ret;
}
static const char *
@@ -520,6 +645,10 @@ meta_monitor_manager_handle_get_resources (MetaDBusDisplayConfig *skeleton,
g_variant_new_boolean (output->is_presentation));
g_variant_builder_add (&properties, "{sv}", "connector-type",
g_variant_new_string (get_connector_type_name (output->connector_type)));
g_variant_builder_add (&properties, "{sv}", "underscanning",
g_variant_new_boolean (output->is_underscanning));
g_variant_builder_add (&properties, "{sv}", "supports-underscanning",
g_variant_new_boolean (output->supports_underscanning));
edid_file = manager_class->get_edid_file (manager, output);
if (edid_file)
@@ -540,6 +669,20 @@ meta_monitor_manager_handle_get_resources (MetaDBusDisplayConfig *skeleton,
}
}
if (output->tile_info.group_id)
{
g_variant_builder_add (&properties, "{sv}", "tile",
g_variant_new ("(uuuuuuuu)",
output->tile_info.group_id,
output->tile_info.flags,
output->tile_info.max_h_tiles,
output->tile_info.max_v_tiles,
output->tile_info.loc_h_tile,
output->tile_info.loc_v_tile,
output->tile_info.tile_w,
output->tile_info.tile_h));
}
g_variant_builder_add (&output_builder, "(uxiausauaua{sv})",
i, /* ID */
(gint64)output->winsys_id,
@@ -808,7 +951,7 @@ meta_monitor_manager_handle_apply_configuration (MetaDBusDisplayConfig *skeleto
while (g_variant_iter_loop (&output_iter, "(u@a{sv})", &output_index, &properties))
{
MetaOutputInfo *output_info;
gboolean primary, presentation;
gboolean primary, presentation, underscanning;
if (output_index >= manager->n_outputs)
{
@@ -827,6 +970,9 @@ meta_monitor_manager_handle_apply_configuration (MetaDBusDisplayConfig *skeleto
if (g_variant_lookup (properties, "presentation", "b", &presentation))
output_info->is_presentation = presentation;
if (g_variant_lookup (properties, "underscanning", "b", &underscanning))
output_info->is_underscanning = underscanning;
g_ptr_array_add (output_infos, output_info);
}
@@ -1194,37 +1340,58 @@ meta_monitor_manager_read_current_config (MetaMonitorManager *manager)
MetaOutput *old_outputs;
MetaCRTC *old_crtcs;
MetaMonitorMode *old_modes;
unsigned int n_old_outputs, n_old_modes;
unsigned int n_old_outputs, n_old_crtcs, n_old_modes;
/* Some implementations of read_current use the existing information
* we have available, so don't free the old configuration until after
* read_current finishes. */
old_outputs = manager->outputs;
n_old_outputs = manager->n_outputs;
old_crtcs = manager->crtcs;
n_old_crtcs = manager->n_crtcs;
old_modes = manager->modes;
n_old_modes = manager->n_modes;
old_crtcs = manager->crtcs;
manager->serial++;
META_MONITOR_MANAGER_GET_CLASS (manager)->read_current (manager);
meta_monitor_manager_free_output_array (old_outputs, n_old_outputs);
meta_monitor_manager_free_mode_array (old_modes, n_old_modes);
g_free (old_crtcs);
meta_monitor_manager_free_crtc_array (old_crtcs, n_old_crtcs);
}
void
meta_monitor_manager_rebuild_derived (MetaMonitorManager *manager)
{
MetaMonitorManagerClass *manager_class = META_MONITOR_MANAGER_GET_CLASS (manager);
MetaMonitorInfo *old_monitor_infos;
unsigned old_n_monitor_infos;
unsigned i, j;
old_monitor_infos = manager->monitor_infos;
old_n_monitor_infos = manager->n_monitor_infos;
if (manager->in_init)
return;
make_logical_config (manager);
if (manager_class->delete_monitor)
{
for (i = 0; i < old_n_monitor_infos; i++)
{
gboolean delete_mon = TRUE;
for (j = 0; j < manager->n_monitor_infos; j++)
{
if (manager->monitor_infos[j].monitor_winsys_xid == old_monitor_infos[i].monitor_winsys_xid)
{
delete_mon = FALSE;
break;
}
}
if (delete_mon)
manager_class->delete_monitor (manager, old_monitor_infos[i].monitor_winsys_xid);
}
}
g_signal_emit_by_name (manager, "monitors-changed");
g_free (old_monitor_infos);
@@ -1368,3 +1535,27 @@ meta_monitor_manager_get_monitor_for_output (MetaMonitorManager *manager,
return -1;
}
gint
meta_monitor_manager_get_monitor_at_point (MetaMonitorManager *manager,
gfloat x,
gfloat y)
{
unsigned int i;
for (i = 0; i < manager->n_monitor_infos; i++)
{
MetaMonitorInfo *monitor = &manager->monitor_infos[i];
int left, right, top, bottom;
left = monitor->rect.x;
right = left + monitor->rect.width;
top = monitor->rect.y;
bottom = top + monitor->rect.height;
if ((x >= left) && (x < right) && (y >= top) && (y < bottom))
return i;
}
return -1;
}

View File

@@ -41,6 +41,7 @@ typedef struct {
struct _MetaStagePrivate {
MetaOverlay cursor_overlay;
gboolean is_active;
};
typedef struct _MetaStagePrivate MetaStagePrivate;
@@ -126,15 +127,41 @@ meta_stage_paint (ClutterActor *actor)
meta_overlay_paint (&priv->cursor_overlay);
}
static void
meta_stage_activate (ClutterStage *actor)
{
MetaStage *stage = META_STAGE (actor);
MetaStagePrivate *priv = meta_stage_get_instance_private (stage);
CLUTTER_STAGE_CLASS (meta_stage_parent_class)->activate (actor);
priv->is_active = TRUE;
}
static void
meta_stage_deactivate (ClutterStage *actor)
{
MetaStage *stage = META_STAGE (actor);
MetaStagePrivate *priv = meta_stage_get_instance_private (stage);
CLUTTER_STAGE_CLASS (meta_stage_parent_class)->deactivate (actor);
priv->is_active = FALSE;
}
static void
meta_stage_class_init (MetaStageClass *klass)
{
ClutterStageClass *stage_class = (ClutterStageClass *) klass;
ClutterActorClass *actor_class = (ClutterActorClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
object_class->finalize = meta_stage_finalize;
actor_class->paint = meta_stage_paint;
stage_class->activate = meta_stage_activate;
stage_class->deactivate = meta_stage_deactivate;
}
static void
@@ -195,3 +222,43 @@ meta_stage_set_cursor (MetaStage *stage,
meta_overlay_set (&priv->cursor_overlay, texture, rect);
queue_redraw_for_overlay (stage, &priv->cursor_overlay);
}
void
meta_stage_set_active (MetaStage *stage,
gboolean is_active)
{
MetaStagePrivate *priv = meta_stage_get_instance_private (stage);
ClutterEvent event = { 0 };
/* Used by the native backend to inform accessibility technologies
* about when the stage loses and gains input focus.
*
* For the X11 backend, clutter transparently takes care of this
* for us.
*/
if (priv->is_active == is_active)
return;
event.type = CLUTTER_STAGE_STATE;
clutter_event_set_stage (&event, CLUTTER_STAGE (stage));
event.stage_state.changed_mask = CLUTTER_STAGE_STATE_ACTIVATED;
if (is_active)
event.stage_state.new_state = CLUTTER_STAGE_STATE_ACTIVATED;
/* Emitting this StageState event will result in the stage getting
* activated or deactivated (with the activated or deactivated signal
* getting emitted from the stage)
*
* FIXME: This won't update ClutterStage's own notion of its
* activeness. For that we would need to somehow trigger a
* _clutter_stage_update_state call, which will probably
* require new API in clutter. In practice, nothing relies
* on the ClutterStage's own notion of activeness when using
* the EGL backend.
*
* See http://bugzilla.gnome.org/746670
*/
clutter_stage_event (CLUTTER_STAGE (stage), &event);
}

View File

@@ -54,6 +54,9 @@ ClutterActor *meta_stage_new (void);
void meta_stage_set_cursor (MetaStage *stage,
CoglTexture *texture,
MetaRectangle *rect);
void meta_stage_set_active (MetaStage *stage,
gboolean is_active);
G_END_DECLS
#endif /* META_STAGE_H */

View File

@@ -29,6 +29,7 @@
#include <meta/main.h>
#include <clutter/evdev/clutter-evdev.h>
#include <libupower-glib/upower.h>
#include "meta-barrier-native.h"
#include "meta-idle-monitor-native.h"
@@ -39,10 +40,11 @@
struct _MetaBackendNativePrivate
{
MetaLauncher *launcher;
MetaBarrierManagerNative *barrier_manager;
GSettings *keyboard_settings;
UpClient *up_client;
guint sleep_signal_id;
GCancellable *cancellable;
GDBusConnection *system_bus;
};
typedef struct _MetaBackendNativePrivate MetaBackendNativePrivate;
@@ -56,9 +58,69 @@ meta_backend_native_finalize (GObject *object)
meta_launcher_free (priv->launcher);
g_object_unref (priv->up_client);
if (priv->sleep_signal_id)
g_dbus_connection_signal_unsubscribe (priv->system_bus, priv->sleep_signal_id);
g_cancellable_cancel (priv->cancellable);
g_clear_object (&priv->cancellable);
g_clear_object (&priv->system_bus);
G_OBJECT_CLASS (meta_backend_native_parent_class)->finalize (object);
}
static void
prepare_for_sleep_cb (GDBusConnection *connection,
const gchar *sender_name,
const gchar *object_path,
const gchar *interface_name,
const gchar *signal_name,
GVariant *parameters,
gpointer user_data)
{
gboolean suspending;
g_variant_get (parameters, "(b)", &suspending);
if (suspending)
return;
meta_idle_monitor_native_reset_idletime (meta_idle_monitor_get_core ());
}
static void
system_bus_gotten_cb (GObject *object,
GAsyncResult *res,
gpointer user_data)
{
MetaBackendNativePrivate *priv;
GDBusConnection *bus;
bus = g_bus_get_finish (res, NULL);
if (!bus)
return;
priv = meta_backend_native_get_instance_private (META_BACKEND_NATIVE (user_data));
priv->system_bus = bus;
priv->sleep_signal_id = g_dbus_connection_signal_subscribe (priv->system_bus,
"org.freedesktop.login1",
"org.freedesktop.login1.Manager",
"PrepareForSleep",
"/org/freedesktop/login1",
NULL,
G_DBUS_SIGNAL_FLAGS_NONE,
prepare_for_sleep_cb,
NULL,
NULL);
}
static void
lid_is_closed_changed_cb (UpClient *client,
GParamSpec *pspec,
gpointer user_data)
{
if (up_client_get_lid_is_closed (client))
return;
meta_idle_monitor_native_reset_idletime (meta_idle_monitor_get_core ());
}
static void
constrain_to_barriers (ClutterInputDevice *device,
guint32 time,
@@ -84,31 +146,6 @@ constrain_to_barriers (ClutterInputDevice *device,
*
*/
static gboolean
check_all_screen_monitors(MetaMonitorInfo *monitors,
unsigned n_monitors,
float x,
float y)
{
unsigned int i;
for (i = 0; i < n_monitors; i++)
{
MetaMonitorInfo *monitor = &monitors[i];
int left, right, top, bottom;
left = monitor->rect.x;
right = left + monitor->rect.width;
top = monitor->rect.y;
bottom = left + monitor->rect.height;
if ((x >= left) && (x < right) && (y >= top) && (y < bottom))
return TRUE;
}
return FALSE;
}
static void
constrain_all_screen_monitors (ClutterInputDevice *device,
MetaMonitorInfo *monitors,
@@ -118,25 +155,25 @@ constrain_all_screen_monitors (ClutterInputDevice *device,
{
ClutterPoint current;
unsigned int i;
float cx, cy;
clutter_input_device_get_coords (device, NULL, &current);
cx = current.x;
cy = current.y;
/* if we're trying to escape, clamp to the CRTC we're coming from */
for (i = 0; i < n_monitors; i++)
{
MetaMonitorInfo *monitor = &monitors[i];
int left, right, top, bottom;
float nx, ny;
left = monitor->rect.x;
right = left + monitor->rect.width;
top = monitor->rect.y;
bottom = left + monitor->rect.height;
bottom = top + monitor->rect.height;
nx = current.x;
ny = current.y;
if ((nx >= left) && (nx < right) && (ny >= top) && (ny < bottom))
if ((cx >= left) && (cx < right) && (cy >= top) && (cy < bottom))
{
if (*x < left)
*x = left;
@@ -162,7 +199,6 @@ pointer_constrain_callback (ClutterInputDevice *device,
MetaMonitorManager *monitor_manager;
MetaMonitorInfo *monitors;
unsigned int n_monitors;
gboolean ret;
/* Constrain to barriers */
constrain_to_barriers (device, time, new_x, new_y);
@@ -171,8 +207,7 @@ pointer_constrain_callback (ClutterInputDevice *device,
monitors = meta_monitor_manager_get_monitor_infos (monitor_manager, &n_monitors);
/* if we're moving inside a monitor, we're fine */
ret = check_all_screen_monitors(monitors, n_monitors, *new_x, *new_y);
if (ret == TRUE)
if (meta_monitor_manager_get_monitor_at_point (monitor_manager, *new_x, *new_y) >= 0)
return;
/* if we're trying to escape, clamp to the CRTC we're coming from */
@@ -297,6 +332,16 @@ meta_backend_native_init (MetaBackendNative *native)
priv->launcher = meta_launcher_new ();
priv->barrier_manager = meta_barrier_manager_native_new ();
priv->up_client = up_client_new ();
g_signal_connect (priv->up_client, "notify::lid-is-closed",
G_CALLBACK (lid_is_closed_changed_cb), NULL);
priv->cancellable = g_cancellable_new ();
g_bus_get (G_BUS_TYPE_SYSTEM,
priv->cancellable,
system_bus_gotten_cb,
native);
}
gboolean

View File

@@ -139,6 +139,20 @@ device_set_scroll_method (struct libinput_device *libinput_device,
return (method & supported) != 0;
}
static gboolean
device_set_click_method (struct libinput_device *libinput_device,
enum libinput_config_click_method method)
{
enum libinput_config_click_method supported;
supported = libinput_device_config_click_get_methods (libinput_device);
if (method & supported)
libinput_device_config_click_set_method (libinput_device, method);
return (method & supported) != 0;
}
static void
meta_input_settings_native_set_scroll_method (MetaInputSettings *settings,
ClutterInputDevice *device,
@@ -155,10 +169,10 @@ meta_input_settings_native_set_scroll_method (MetaInputSettings *sett
scroll_method = LIBINPUT_CONFIG_SCROLL_NO_SCROLL;
break;
case G_DESKTOP_TOUCHPAD_SCROLL_METHOD_EDGE_SCROLLING:
scroll_method = LIBINPUT_CONFIG_SCROLL_2FG;
scroll_method = LIBINPUT_CONFIG_SCROLL_EDGE;
break;
case G_DESKTOP_TOUCHPAD_SCROLL_METHOD_TWO_FINGER_SCROLLING:
scroll_method = LIBINPUT_CONFIG_SCROLL_EDGE;
scroll_method = LIBINPUT_CONFIG_SCROLL_2FG;
break;
default:
g_assert_not_reached ();
@@ -184,6 +198,38 @@ meta_input_settings_native_set_scroll_button (MetaInputSettings *settings,
libinput_device_config_scroll_set_button (libinput_device, button);
}
static void
meta_input_settings_native_set_click_method (MetaInputSettings *settings,
ClutterInputDevice *device,
GDesktopTouchpadClickMethod mode)
{
enum libinput_config_click_method click_method = 0;
struct libinput_device *libinput_device;
libinput_device = clutter_evdev_input_device_get_libinput_device (device);
switch (mode)
{
case G_DESKTOP_TOUCHPAD_CLICK_METHOD_DEFAULT:
click_method = libinput_device_config_click_get_default_method (libinput_device);
break;
case G_DESKTOP_TOUCHPAD_CLICK_METHOD_NONE:
click_method = LIBINPUT_CONFIG_CLICK_METHOD_NONE;
break;
case G_DESKTOP_TOUCHPAD_CLICK_METHOD_AREAS:
click_method = LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS;
break;
case G_DESKTOP_TOUCHPAD_CLICK_METHOD_FINGERS:
click_method = LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER;
break;
default:
g_assert_not_reached ();
return;
}
device_set_click_method (libinput_device, click_method);
}
static void
meta_input_settings_native_set_keyboard_repeat (MetaInputSettings *settings,
gboolean enabled,
@@ -208,6 +254,7 @@ meta_input_settings_native_class_init (MetaInputSettingsNativeClass *klass)
input_settings_class->set_invert_scroll = meta_input_settings_native_set_invert_scroll;
input_settings_class->set_scroll_method = meta_input_settings_native_set_scroll_method;
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;
}

View File

@@ -43,6 +43,7 @@
#include "backends/meta-backend-private.h"
#include "meta-cursor-renderer-native.h"
#include "meta-idle-monitor-native.h"
struct _MetaLauncher
{
@@ -110,6 +111,7 @@ session_unpause (void)
clutter_actor_queue_redraw (stage);
meta_cursor_renderer_native_force_update (META_CURSOR_RENDERER_NATIVE (renderer));
meta_idle_monitor_native_reset_idletime (meta_idle_monitor_get_core ());
}
}
@@ -128,9 +130,8 @@ take_device (Login1Session *session_proxy,
GCancellable *cancellable,
GError **error)
{
gboolean ret = FALSE;
GVariant *fd_variant = NULL;
GUnixFDList *fd_list = NULL;
g_autoptr (GVariant) fd_variant = NULL;
g_autoptr (GUnixFDList) fd_list = NULL;
int fd = -1;
if (!login1_session_call_take_device_sync (session_proxy,
@@ -142,21 +143,14 @@ take_device (Login1Session *session_proxy,
&fd_list,
cancellable,
error))
goto out;
return FALSE;
fd = g_unix_fd_list_get (fd_list, g_variant_get_handle (fd_variant), error);
if (fd == -1)
goto out;
return FALSE;
*out_fd = fd;
ret = TRUE;
out:
if (fd_variant)
g_variant_unref (fd_variant);
if (fd_list)
g_object_unref (fd_list);
return ret;
return TRUE;
}
static gboolean
@@ -164,22 +158,16 @@ get_device_info_from_path (const char *path,
int *out_major,
int *out_minor)
{
gboolean ret = FALSE;
int r;
struct stat st;
r = stat (path, &st);
if (r < 0)
goto out;
if (!S_ISCHR (st.st_mode))
goto out;
if (r < 0 || !S_ISCHR (st.st_mode))
return FALSE;
*out_major = major (st.st_rdev);
*out_minor = minor (st.st_rdev);
ret = TRUE;
out:
return ret;
return TRUE;
}
static gboolean
@@ -187,22 +175,16 @@ get_device_info_from_fd (int fd,
int *out_major,
int *out_minor)
{
gboolean ret = FALSE;
int r;
struct stat st;
r = fstat (fd, &st);
if (r < 0)
goto out;
if (!S_ISCHR (st.st_mode))
goto out;
if (r < 0 || !S_ISCHR (st.st_mode))
return FALSE;
*out_major = major (st.st_rdev);
*out_minor = minor (st.st_rdev);
ret = TRUE;
out:
return ret;
return TRUE;
}
static int
@@ -307,7 +289,7 @@ get_kms_fd (Login1Session *session_proxy,
MetaLauncher *
meta_launcher_new (void)
{
MetaLauncher *self;
MetaLauncher *self = NULL;
Login1Session *session_proxy;
GError *error = NULL;
int kms_fd;
@@ -317,14 +299,14 @@ meta_launcher_new (void)
{
g_warning ("Could not take control: %s", error->message);
g_error_free (error);
return NULL;
goto out;
}
if (!get_kms_fd (session_proxy, &kms_fd))
return NULL;
goto out;
self = g_slice_new0 (MetaLauncher);
self->session_proxy = session_proxy;
self->session_proxy = g_object_ref (session_proxy);
self->seat_proxy = get_seat_proxy (NULL);
self->session_active = TRUE;
@@ -336,6 +318,9 @@ meta_launcher_new (void)
g_signal_connect (self->session_proxy, "notify::active", G_CALLBACK (on_active_changed), self);
out:
g_object_unref (session_proxy);
return self;
}

View File

@@ -55,8 +55,19 @@ typedef struct {
uint32_t dpms_prop_id;
uint32_t edid_blob_id;
uint32_t tile_blob_id;
int suggested_x;
int suggested_y;
uint32_t hotplug_mode_update;
} MetaOutputKms;
typedef struct {
uint32_t underscan_prop_id;
uint32_t underscan_hborder_prop_id;
uint32_t underscan_vborder_prop_id;
} MetaCRTCKms;
struct _MetaMonitorManagerKms
{
MetaMonitorManager parent_instance;
@@ -66,12 +77,9 @@ struct _MetaMonitorManagerKms
drmModeConnector **connectors;
unsigned int n_connectors;
drmModeEncoder **encoders;
unsigned int n_encoders;
drmModeEncoder *current_encoder;
GUdevClient *udev;
GSettings *desktop_settings;
};
struct _MetaMonitorManagerKmsClass
@@ -86,12 +94,9 @@ free_resources (MetaMonitorManagerKms *manager_kms)
{
unsigned i;
for (i = 0; i < manager_kms->n_encoders; i++)
drmModeFreeEncoder (manager_kms->encoders[i]);
for (i = 0; i < manager_kms->n_connectors; i++)
drmModeFreeConnector (manager_kms->connectors[i]);
g_free (manager_kms->encoders);
g_free (manager_kms->connectors);
}
@@ -110,7 +115,7 @@ make_output_name (drmModeConnector *connector)
static const char * const connector_type_names[] = {
"unknown", "VGA", "DVII", "DVID", "DVID", "Composite",
"SVIDEO", "LVDS", "Component", "9PinDIN", "DisplayPort",
"HDMIA", "HDMIB", "TV", "eDP"
"HDMIA", "HDMIB", "TV", "eDP", "Virtual", "DSI"
};
const char *connector_type_name;
@@ -143,6 +148,12 @@ meta_monitor_mode_destroy_notify (MetaMonitorMode *output)
g_slice_free (drmModeModeInfo, output->driver_private);
}
static void
meta_crtc_destroy_notify (MetaCRTC *crtc)
{
g_free (crtc->driver_private);
}
static gboolean
drm_mode_equal (gconstpointer one,
gconstpointer two)
@@ -187,24 +198,67 @@ drm_mode_hash (gconstpointer ptr)
}
static void
find_properties (MetaMonitorManagerKms *manager_kms,
MetaOutputKms *output_kms)
find_connector_properties (MetaMonitorManagerKms *manager_kms,
MetaOutputKms *output_kms)
{
drmModePropertyPtr prop;
int i;
output_kms->hotplug_mode_update = 0;
output_kms->suggested_x = -1;
output_kms->suggested_y = -1;
for (i = 0; i < output_kms->connector->count_props; i++)
{
prop = drmModeGetProperty (manager_kms->fd, output_kms->connector->props[i]);
drmModePropertyPtr prop = drmModeGetProperty (manager_kms->fd, output_kms->connector->props[i]);
if (!prop)
continue;
if ((prop->flags & DRM_MODE_PROP_ENUM) &&
strcmp(prop->name, "DPMS") == 0)
if ((prop->flags & DRM_MODE_PROP_ENUM) && strcmp (prop->name, "DPMS") == 0)
output_kms->dpms_prop_id = prop->prop_id;
else if ((prop->flags & DRM_MODE_PROP_BLOB) &&
strcmp (prop->name, "EDID") == 0)
else if ((prop->flags & DRM_MODE_PROP_BLOB) && strcmp (prop->name, "EDID") == 0)
output_kms->edid_blob_id = output_kms->connector->prop_values[i];
else if ((prop->flags & DRM_MODE_PROP_BLOB) &&
strcmp (prop->name, "TILE") == 0)
output_kms->tile_blob_id = output_kms->connector->prop_values[i];
else if ((prop->flags & DRM_MODE_PROP_RANGE) &&
strcmp (prop->name, "suggested X") == 0)
output_kms->suggested_x = output_kms->connector->prop_values[i];
else if ((prop->flags & DRM_MODE_PROP_RANGE) &&
strcmp (prop->name, "suggested Y") == 0)
output_kms->suggested_y = output_kms->connector->prop_values[i];
else if ((prop->flags & DRM_MODE_PROP_RANGE) &&
strcmp (prop->name, "hotplug_mode_update") == 0)
output_kms->hotplug_mode_update = output_kms->connector->prop_values[i];
drmModeFreeProperty (prop);
}
}
static void
find_crtc_properties (MetaMonitorManagerKms *manager_kms,
MetaCRTC *meta_crtc)
{
MetaCRTCKms *crtc_kms;
drmModeObjectPropertiesPtr props;
size_t i;
crtc_kms = meta_crtc->driver_private;
props = drmModeObjectGetProperties (manager_kms->fd, meta_crtc->crtc_id, DRM_MODE_OBJECT_CRTC);
if (!props)
return;
for (i = 0; i < props->count_props; i++)
{
drmModePropertyPtr prop = drmModeGetProperty (manager_kms->fd, props->props[i]);
if (!prop)
continue;
if ((prop->flags & DRM_MODE_PROP_ENUM) && strcmp (prop->name, "underscan") == 0)
crtc_kms->underscan_prop_id = prop->prop_id;
else if ((prop->flags & DRM_MODE_PROP_RANGE) && strcmp (prop->name, "underscan hborder") == 0)
crtc_kms->underscan_hborder_prop_id = prop->prop_id;
else if ((prop->flags & DRM_MODE_PROP_RANGE) && strcmp (prop->name, "underscan vborder") == 0)
crtc_kms->underscan_vborder_prop_id = prop->prop_id;
drmModeFreeProperty (prop);
}
@@ -239,6 +293,47 @@ read_output_edid (MetaMonitorManagerKms *manager_kms,
}
}
static gboolean
output_get_tile_info (MetaMonitorManagerKms *manager_kms,
MetaOutput *output)
{
MetaOutputKms *output_kms = output->driver_private;
drmModePropertyBlobPtr tile_blob = NULL;
int ret;
if (output_kms->tile_blob_id == 0)
return FALSE;
tile_blob = drmModeGetPropertyBlob (manager_kms->fd, output_kms->tile_blob_id);
if (!tile_blob)
{
meta_warning ("Failed to read TILE of output %s: %s\n", output->name, strerror(errno));
return FALSE;
}
if (tile_blob->length > 0)
{
ret = sscanf ((char *)tile_blob->data, "%d:%d:%d:%d:%d:%d:%d:%d",
&output->tile_info.group_id,
&output->tile_info.flags,
&output->tile_info.max_h_tiles,
&output->tile_info.max_v_tiles,
&output->tile_info.loc_h_tile,
&output->tile_info.loc_v_tile,
&output->tile_info.tile_w,
&output->tile_info.tile_h);
if (ret != 8)
return FALSE;
return TRUE;
}
else
{
drmModeFreePropertyBlob (tile_blob);
return FALSE;
}
}
static MetaMonitorMode *
find_meta_mode (MetaMonitorManager *manager,
const drmModeModeInfo *drm_mode)
@@ -269,11 +364,77 @@ find_output_by_id (MetaOutput *outputs,
return NULL;
}
/* 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
/* Based on code from gnome-settings-daemon */
static int
compute_scale (MetaOutput *output)
{
int scale = 1;
if (!output->crtc)
goto out;
/* Scaling makes no sense */
if (output->crtc->rect.width < HIDPI_MIN_HEIGHT)
goto out;
/* 4K TV */
if (output->name != NULL && strstr(output->name, "HDMI") != NULL &&
output->crtc->rect.width >= SMALLEST_4K_WIDTH)
goto out;
/* Somebody encoded the aspect ratio (16/9 or 16/10)
* instead of the physical size */
if ((output->width_mm == 160 && output->height_mm == 90) ||
(output->width_mm == 160 && output->height_mm == 100) ||
(output->width_mm == 16 && output->height_mm == 9) ||
(output->width_mm == 16 && output->height_mm == 10))
goto out;
if (output->width_mm > 0 && output->height_mm > 0)
{
double dpi_x, dpi_y;
dpi_x = (double)output->crtc->rect.width / (output->width_mm / 25.4);
dpi_y = (double)output->crtc->rect.height / (output->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
get_output_scale (MetaMonitorManager *manager,
MetaOutput *output)
{
MetaMonitorManagerKms *manager_kms = META_MONITOR_MANAGER_KMS (manager);
int scale = g_settings_get_uint (manager_kms->desktop_settings, "scaling-factor");
if (scale > 0)
return scale;
else
return compute_scale (output);
}
static void
meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
{
MetaMonitorManagerKms *manager_kms = META_MONITOR_MANAGER_KMS (manager);
drmModeRes *resources;
drmModeEncoder **encoders;
GHashTable *modes;
GHashTableIter iter;
drmModeModeInfo *mode;
@@ -309,7 +470,7 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
connector = drmModeGetConnector (manager_kms->fd, resources->connectors[i]);
manager_kms->connectors[i] = connector;
if (connector->connection == DRM_MODE_CONNECTED)
if (connector && connector->connection == DRM_MODE_CONNECTED)
{
/* Collect all modes for this connector */
for (j = 0; j < (unsigned)connector->count_modes; j++)
@@ -317,13 +478,9 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
}
}
manager_kms->n_encoders = resources->count_encoders;
manager_kms->encoders = g_new (drmModeEncoder *, manager_kms->n_encoders);
for (i = 0; i < manager_kms->n_encoders; i++)
{
manager_kms->encoders[i] = drmModeGetEncoder (manager_kms->fd,
resources->encoders[i]);
}
encoders = g_new (drmModeEncoder *, resources->count_encoders);
for (i = 0; i < (unsigned)resources->count_encoders; i++)
encoders[i] = drmModeGetEncoder (manager_kms->fd, resources->encoders[i]);
manager->n_modes = g_hash_table_size (modes);
manager->modes = g_new0 (MetaMonitorMode, manager->n_modes);
@@ -386,6 +543,10 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
height = MAX (height, meta_crtc->rect.y + meta_crtc->rect.height);
}
meta_crtc->driver_private = g_new0 (MetaCRTCKms, 1);
meta_crtc->driver_notify = (GDestroyNotify) meta_crtc_destroy_notify;
find_crtc_properties (manager_kms, meta_crtc);
drmModeFreeCrtc (crtc);
}
@@ -407,7 +568,7 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
connector = manager_kms->connectors[i];
meta_output = &manager->outputs[n_actual_outputs];
if (connector->connection == DRM_MODE_CONNECTED)
if (connector && connector->connection == DRM_MODE_CONNECTED)
{
meta_output->driver_private = output_kms = g_slice_new0 (MetaOutputKms);
meta_output->driver_notify = (GDestroyNotify)meta_output_destroy_notify;
@@ -416,8 +577,6 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
meta_output->name = make_output_name (connector);
meta_output->width_mm = connector->mmWidth;
meta_output->height_mm = connector->mmHeight;
meta_output->suggested_x = -1;
meta_output->suggested_y = -1;
switch (connector->subpixel)
{
@@ -442,11 +601,17 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
break;
}
meta_output->preferred_mode = NULL;
meta_output->n_modes = connector->count_modes;
meta_output->modes = g_new0 (MetaMonitorMode *, meta_output->n_modes);
for (j = 0; j < meta_output->n_modes; j++)
for (j = 0; j < meta_output->n_modes; j++) {
meta_output->modes[j] = find_meta_mode (manager, &connector->modes[j]);
meta_output->preferred_mode = meta_output->modes[0];
if (connector->modes[j].type & DRM_MODE_TYPE_PREFERRED)
meta_output->preferred_mode = meta_output->modes[j];
}
if (!meta_output->preferred_mode)
meta_output->preferred_mode = meta_output->modes[0];
output_kms->connector = connector;
output_kms->n_encoders = connector->count_encoders;
@@ -456,6 +621,8 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
for (j = 0; j < output_kms->n_encoders; j++)
{
output_kms->encoders[j] = drmModeGetEncoder (manager_kms->fd, connector->encoders[j]);
if (!output_kms->encoders[j])
continue;
/* We only list CRTCs as supported if they are supported by all encoders
for this connectors.
@@ -509,8 +676,11 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
meta_output->is_presentation = FALSE;
}
find_properties (manager_kms, output_kms);
find_connector_properties (manager_kms, output_kms);
meta_output->suggested_x = output_kms->suggested_x;
meta_output->suggested_y = output_kms->suggested_y;
meta_output->hotplug_mode_update = output_kms->hotplug_mode_update;
edid = read_output_edid (manager_kms, meta_output);
meta_output_parse_edid (meta_output, edid);
g_bytes_unref (edid);
@@ -518,6 +688,10 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
/* MetaConnectorType matches DRM's connector types */
meta_output->connector_type = (MetaConnectorType) connector->connector_type;
meta_output->scale = get_output_scale (manager, meta_output);
output_get_tile_info (manager_kms, meta_output);
/* FIXME: backlight is a very driver specific thing unfortunately,
every DDX does its own thing, and the dumb KMS API does not include it.
@@ -559,9 +733,10 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
for (j = 0; j < output_kms->n_encoders; j++)
{
for (k = 0; k < manager_kms->n_encoders; k++)
for (k = 0; k < (unsigned)resources->count_encoders; k++)
{
if (output_kms->encoders[j]->encoder_id == manager_kms->encoders[k]->encoder_id)
if (output_kms->encoders[j] && encoders[k] &&
output_kms->encoders[j]->encoder_id == encoders[k]->encoder_id)
{
output_kms->encoder_mask |= (1 << k);
break;
@@ -608,6 +783,10 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
}
}
for (i = 0; i < (unsigned)resources->count_encoders; i++)
drmModeFreeEncoder (encoders[i]);
g_free (encoders);
drmModeFreeResources (resources);
}
@@ -625,6 +804,9 @@ meta_monitor_manager_kms_set_power_save_mode (MetaMonitorManager *manager,
MetaPowerSave mode)
{
MetaMonitorManagerKms *manager_kms = META_MONITOR_MANAGER_KMS (manager);
ClutterBackend *backend;
CoglContext *cogl_context;
CoglDisplay *cogl_display;
uint64_t state;
unsigned i;
@@ -655,14 +837,23 @@ meta_monitor_manager_kms_set_power_save_mode (MetaMonitorManager *manager,
if (output_kms->dpms_prop_id != 0)
{
int ok = drmModeConnectorSetProperty(manager_kms->fd, meta_output->winsys_id,
output_kms->dpms_prop_id, state);
int ok = drmModeObjectSetProperty (manager_kms->fd, meta_output->winsys_id,
DRM_MODE_OBJECT_CONNECTOR,
output_kms->dpms_prop_id, state);
if (ok < 0)
meta_warning ("Failed to set power save mode for output %s: %s\n",
meta_output->name, strerror (errno));
}
}
backend = clutter_get_default_backend ();
cogl_context = clutter_backend_get_cogl_context (backend);
cogl_display = cogl_context_get_display (cogl_context);
for (i = 0; i < manager->n_crtcs; i++)
cogl_kms_display_set_ignore_crtc (cogl_display, manager->crtcs[i].crtc_id,
mode != META_POWER_SAVE_ON);
}
static void
@@ -672,6 +863,48 @@ crtc_free (CoglKmsCrtc *crtc)
g_slice_free (CoglKmsCrtc, crtc);
}
static void
set_underscan (MetaMonitorManagerKms *manager_kms,
MetaOutput *output)
{
if (!output->crtc)
return;
MetaCRTC *crtc = output->crtc;
MetaCRTCKms *crtc_kms = crtc->driver_private;
if (!crtc_kms->underscan_prop_id)
return;
if (output->is_underscanning)
{
drmModeObjectSetProperty (manager_kms->fd, crtc->crtc_id,
DRM_MODE_OBJECT_CRTC,
crtc_kms->underscan_prop_id, (uint64_t) 1);
if (crtc_kms->underscan_hborder_prop_id)
{
uint64_t value = crtc->current_mode->width * 0.05;
drmModeObjectSetProperty (manager_kms->fd, crtc->crtc_id,
DRM_MODE_OBJECT_CRTC,
crtc_kms->underscan_hborder_prop_id, value);
}
if (crtc_kms->underscan_vborder_prop_id)
{
uint64_t value = crtc->current_mode->height * 0.05;
drmModeObjectSetProperty (manager_kms->fd, crtc->crtc_id,
DRM_MODE_OBJECT_CRTC,
crtc_kms->underscan_vborder_prop_id, value);
}
}
else
{
drmModeObjectSetProperty (manager_kms->fd, crtc->crtc_id,
DRM_MODE_OBJECT_CRTC,
crtc_kms->underscan_prop_id, (uint64_t) 0);
}
}
static void
meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager,
MetaCRTCInfo **crtcs,
@@ -679,6 +912,7 @@ meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager,
MetaOutputInfo **outputs,
unsigned int n_outputs)
{
MetaMonitorManagerKms *manager_kms = META_MONITOR_MANAGER_KMS (manager);
ClutterBackend *backend;
CoglContext *cogl_context;
CoglDisplay *cogl_display;
@@ -824,6 +1058,9 @@ meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager,
output->is_primary = output_info->is_primary;
output->is_presentation = output_info->is_presentation;
output->is_underscanning = output_info->is_underscanning;
set_underscan (manager_kms, output);
}
/* Disable outputs not mentioned in the list */
@@ -919,6 +1156,8 @@ meta_monitor_manager_kms_init (MetaMonitorManagerKms *manager_kms)
manager_kms->udev = g_udev_client_new (subsystems);
g_signal_connect (manager_kms->udev, "uevent",
G_CALLBACK (on_uevent), manager_kms);
manager_kms->desktop_settings = g_settings_new ("org.gnome.desktop.interface");
}
static void
@@ -927,6 +1166,7 @@ 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);
}

View File

@@ -46,6 +46,14 @@
#include "display-private.h"
#include "compositor/compositor-private.h"
typedef enum {
/* We're a traditional CM running under the host. */
META_BACKEND_X11_MODE_COMPOSITOR,
/* We're a nested X11 client */
META_BACKEND_X11_MODE_NESTED,
} MetaBackendX11Mode;
struct _MetaBackendX11Private
{
/* The host X11 display */
@@ -53,6 +61,8 @@ struct _MetaBackendX11Private
xcb_connection_t *xcb;
GSource *source;
MetaBackendX11Mode mode;
int xsync_event_base;
int xsync_error_base;
@@ -102,7 +112,7 @@ translate_device_event (MetaBackendX11 *x11,
/* This codepath should only ever trigger as an X11 compositor,
* and never under nested, as under nested all backend events
* should be reported with respect to the stage window. */
g_assert (!meta_is_wayland_compositor ());
g_assert (priv->mode == META_BACKEND_X11_MODE_COMPOSITOR);
device_event->event = stage_window;
@@ -133,6 +143,8 @@ static void
translate_crossing_event (MetaBackendX11 *x11,
XIEnterEvent *enter_event)
{
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
/* Throw out weird events generated by grabs. */
if (enter_event->mode == XINotifyGrab ||
enter_event->mode == XINotifyUngrab)
@@ -141,7 +153,33 @@ translate_crossing_event (MetaBackendX11 *x11,
return;
}
enter_event->event = meta_backend_x11_get_xwindow (x11);
Window stage_window = meta_backend_x11_get_xwindow (x11);
if (enter_event->event != stage_window)
{
/* See above for the rationale for this... */
g_assert (priv->mode == META_BACKEND_X11_MODE_COMPOSITOR);
enter_event->event = meta_backend_x11_get_xwindow (x11);
enter_event->event_x = enter_event->root_x;
enter_event->event_y = enter_event->root_y;
}
}
static void
handle_device_change (MetaBackendX11 *x11,
XIEvent *event)
{
XIDeviceChangedEvent *device_changed;
if (event->evtype != XI_DeviceChanged)
return;
device_changed = (XIDeviceChangedEvent *) event;
if (device_changed->reason != XISlaveSwitch)
return;
meta_backend_update_last_device (META_BACKEND (x11),
device_changed->sourceid);
}
/* Clutter makes the assumption that there is only one X window
@@ -155,7 +193,32 @@ translate_crossing_event (MetaBackendX11 *x11,
*/
static void
maybe_spoof_event_as_stage_event (MetaBackendX11 *x11,
XEvent *event)
XIEvent *input_event)
{
switch (input_event->evtype)
{
case XI_Motion:
case XI_ButtonPress:
case XI_ButtonRelease:
case XI_KeyPress:
case XI_KeyRelease:
case XI_TouchBegin:
case XI_TouchUpdate:
case XI_TouchEnd:
translate_device_event (x11, (XIDeviceEvent *) input_event);
break;
case XI_Enter:
case XI_Leave:
translate_crossing_event (x11, (XIEnterEvent *) input_event);
break;
default:
break;
}
}
static void
handle_input_event (MetaBackendX11 *x11,
XEvent *event)
{
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
@@ -164,25 +227,10 @@ maybe_spoof_event_as_stage_event (MetaBackendX11 *x11,
{
XIEvent *input_event = (XIEvent *) event->xcookie.data;
switch (input_event->evtype)
{
case XI_Motion:
case XI_ButtonPress:
case XI_ButtonRelease:
case XI_KeyPress:
case XI_KeyRelease:
case XI_TouchBegin:
case XI_TouchUpdate:
case XI_TouchEnd:
translate_device_event (x11, (XIDeviceEvent *) input_event);
break;
case XI_Enter:
case XI_Leave:
translate_crossing_event (x11, (XIEnterEvent *) input_event);
break;
default:
break;
}
if (input_event->evtype == XI_DeviceChanged)
handle_device_change (x11, input_event);
else
maybe_spoof_event_as_stage_event (x11, input_event);
}
}
@@ -251,7 +299,7 @@ handle_host_xevent (MetaBackend *backend,
if (!bypass_clutter)
{
maybe_spoof_event_as_stage_event (x11, event);
handle_input_event (x11, event);
clutter_x11_handle_event (event);
}
@@ -402,7 +450,9 @@ meta_backend_x11_post_init (MetaBackend *backend)
meta_fatal ("X server doesn't have the XInput extension, version 2.2 or newer\n");
}
take_touch_grab (backend);
/* We only take the passive touch grab if we are a X11 compositor */
if (priv->mode == META_BACKEND_X11_MODE_COMPOSITOR)
take_touch_grab (backend);
priv->xcb = XGetXCBConnection (priv->xdisplay);
if (!xkb_x11_setup_xkb_extension (priv->xcb,
@@ -433,13 +483,18 @@ meta_backend_x11_create_idle_monitor (MetaBackend *backend,
static MetaMonitorManager *
meta_backend_x11_create_monitor_manager (MetaBackend *backend)
{
/* If we're a Wayland compositor using the X11 backend,
* we're a nested configuration, so return the dummy
* monitor setup. */
if (meta_is_wayland_compositor ())
return g_object_new (META_TYPE_MONITOR_MANAGER_DUMMY, NULL);
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
return g_object_new (META_TYPE_MONITOR_MANAGER_XRANDR, NULL);
switch (priv->mode)
{
case META_BACKEND_X11_MODE_COMPOSITOR:
return g_object_new (META_TYPE_MONITOR_MANAGER_XRANDR, NULL);
case META_BACKEND_X11_MODE_NESTED:
return g_object_new (META_TYPE_MONITOR_MANAGER_DUMMY, NULL);
default:
g_assert_not_reached ();
}
}
static MetaCursorRenderer *
@@ -693,7 +748,10 @@ static void
meta_backend_x11_update_screen_size (MetaBackend *backend,
int width, int height)
{
if (meta_is_wayland_compositor ())
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
if (priv->mode == META_BACKEND_X11_MODE_NESTED)
{
/* For a nested wayland session, we want to go through Clutter to update the
* toplevel window size, rather than doing it directly.
@@ -727,9 +785,21 @@ meta_backend_x11_select_stage_events (MetaBackend *backend)
XISetMask (mask.mask, XI_FocusIn);
XISetMask (mask.mask, XI_FocusOut);
XISetMask (mask.mask, XI_Motion);
XIClearMask (mask.mask, XI_TouchBegin);
XIClearMask (mask.mask, XI_TouchEnd);
XIClearMask (mask.mask, XI_TouchUpdate);
if (priv->mode == META_BACKEND_X11_MODE_NESTED)
{
/* When we're an X11 compositor, we can't take these events or else
* replaying events from our passive root window grab will cause
* them to come back to us.
*
* When we're a nested application, we want to behave like any other
* application, so select these events like normal apps do.
*/
XISetMask (mask.mask, XI_TouchBegin);
XISetMask (mask.mask, XI_TouchEnd);
XISetMask (mask.mask, XI_TouchUpdate);
}
XISelectEvents (priv->xdisplay, xwin, &mask, 1);
}
@@ -755,8 +825,15 @@ meta_backend_x11_class_init (MetaBackendX11Class *klass)
static void
meta_backend_x11_init (MetaBackendX11 *x11)
{
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
/* We do X11 event retrieval ourselves */
clutter_x11_disable_event_retrieval ();
if (meta_is_wayland_compositor ())
priv->mode = META_BACKEND_X11_MODE_NESTED;
else
priv->mode = META_BACKEND_X11_MODE_COMPOSITOR;
}
Display *

View File

@@ -26,6 +26,7 @@
#include "meta-backend-x11.h"
#include "meta-input-settings-x11.h"
#include <string.h>
#include <gdk/gdkx.h>
#include <X11/Xatom.h>
#include <X11/extensions/XInput2.h>
@@ -35,6 +36,41 @@
G_DEFINE_TYPE (MetaInputSettingsX11, meta_input_settings_x11, META_TYPE_INPUT_SETTINGS)
static void *
get_property (ClutterInputDevice *device,
const gchar *property,
Atom type,
int format,
gulong nitems)
{
MetaBackend *backend = meta_get_backend ();
Display *xdisplay = meta_backend_x11_get_xdisplay (META_BACKEND_X11 (backend));
gulong nitems_ret, bytes_after_ret;
int rc, device_id, format_ret;
Atom property_atom, type_ret;
guchar *data_ret = NULL;
property_atom = XInternAtom (xdisplay, property, True);
if (!property_atom)
return NULL;
device_id = clutter_input_device_get_device_id (device);
rc = XIGetProperty (xdisplay, device_id, property_atom,
0, 10, False, type, &type_ret, &format_ret,
&nitems_ret, &bytes_after_ret, &data_ret);
if (rc == Success && type_ret == type && format_ret == format && nitems_ret >= nitems)
{
if (nitems_ret > nitems)
g_warning ("Property '%s' for device '%s' returned %lu items, expected %lu",
property, clutter_input_device_get_device_name (device), nitems_ret, nitems);
return data_ret;
}
meta_XFree (data_ret);
return NULL;
}
static void
change_property (ClutterInputDevice *device,
const gchar *property,
@@ -45,23 +81,23 @@ change_property (ClutterInputDevice *device,
{
MetaBackend *backend = meta_get_backend ();
Display *xdisplay = meta_backend_x11_get_xdisplay (META_BACKEND_X11 (backend));
gulong nitems_ret, bytes_after_ret;
int rc, device_id, format_ret;
Atom property_atom, type_ret;
int device_id;
Atom property_atom;
guchar *data_ret;
property_atom = XInternAtom (xdisplay, property, False);
property_atom = XInternAtom (xdisplay, property, True);
if (!property_atom)
return;
device_id = clutter_input_device_get_device_id (device);
rc = XIGetProperty (xdisplay, device_id, property_atom,
0, 0, False, type, &type_ret, &format_ret,
&nitems_ret, &bytes_after_ret, &data_ret);
data_ret = get_property (device, property, type, format, nitems);
if (!data_ret)
return;
XIChangeProperty (xdisplay, device_id, property_atom, type,
format, XIPropModeReplace, data, nitems);
meta_XFree (data_ret);
if (rc == Success && type_ret == type && format_ret == format)
XIChangeProperty (xdisplay, device_id, property_atom, type,
format, XIPropModeReplace, data, nitems);
}
static void
@@ -180,10 +216,45 @@ meta_input_settings_x11_set_scroll_button (MetaInputSettings *settings,
ClutterInputDevice *device,
guint button)
{
change_property (device, "libinput Scroll Method Enabled",
change_property (device, "libinput Button Scrolling Button",
XA_INTEGER, 32, &button, 1);
}
static void
meta_input_settings_x11_set_click_method (MetaInputSettings *settings,
ClutterInputDevice *device,
GDesktopTouchpadClickMethod mode)
{
guchar values[2] = { 0 }; /* buttonareas, clickfinger */
guchar *defaults;
switch (mode)
{
case G_DESKTOP_TOUCHPAD_CLICK_METHOD_DEFAULT:
defaults = get_property (device, "libinput Click Method Enabled Default",
XA_INTEGER, 8, 2);
if (!defaults)
break;
memcpy (values, defaults, 2);
meta_XFree (defaults);
break;
case G_DESKTOP_TOUCHPAD_CLICK_METHOD_NONE:
break;
case G_DESKTOP_TOUCHPAD_CLICK_METHOD_AREAS:
values[0] = 1;
break;
case G_DESKTOP_TOUCHPAD_CLICK_METHOD_FINGERS:
values[1] = 1;
break;
default:
g_assert_not_reached ();
return;
}
change_property (device, "libinput Click Method Enabled",
XA_INTEGER, 8, &values, 2);
}
static void
meta_input_settings_x11_set_keyboard_repeat (MetaInputSettings *settings,
gboolean enabled,
@@ -217,6 +288,7 @@ meta_input_settings_x11_class_init (MetaInputSettingsX11Class *klass)
input_settings_class->set_invert_scroll = meta_input_settings_x11_set_invert_scroll;
input_settings_class->set_scroll_method = meta_input_settings_x11_set_scroll_method;
input_settings_class->set_scroll_button = meta_input_settings_x11_set_scroll_button;
input_settings_class->set_click_method = meta_input_settings_x11_set_click_method;
input_settings_class->set_keyboard_repeat = meta_input_settings_x11_set_keyboard_repeat;
}

View File

@@ -58,6 +58,7 @@ struct _MetaMonitorManagerXrandr
XRRScreenResources *resources;
int rr_event_base;
int rr_error_base;
gboolean has_randr15;
};
struct _MetaMonitorManagerXrandrClass
@@ -194,11 +195,10 @@ static gboolean
output_get_boolean_property (MetaMonitorManagerXrandr *manager_xrandr,
MetaOutput *output, const char *propname)
{
gboolean value = FALSE;
Atom atom, actual_type;
int actual_format;
unsigned long nitems, bytes_after;
unsigned char *buffer;
g_autofree unsigned char *buffer = NULL;
atom = XInternAtom (manager_xrandr->xdisplay, propname, False);
XRRGetOutputProperty (manager_xrandr->xdisplay,
@@ -209,13 +209,9 @@ output_get_boolean_property (MetaMonitorManagerXrandr *manager_xrandr,
&nitems, &bytes_after, &buffer);
if (actual_type != XA_CARDINAL || actual_format != 32 || nitems < 1)
goto out;
return FALSE;
value = ((int*)buffer)[0];
out:
XFree (buffer);
return value;
return ((int*)buffer)[0];
}
static gboolean
@@ -225,6 +221,76 @@ output_get_presentation_xrandr (MetaMonitorManagerXrandr *manager_xrandr,
return output_get_boolean_property (manager_xrandr, output, "_MUTTER_PRESENTATION_OUTPUT");
}
static gboolean
output_get_underscanning_xrandr (MetaMonitorManagerXrandr *manager_xrandr,
MetaOutput *output)
{
Atom atom, actual_type;
int actual_format;
unsigned long nitems, bytes_after;
g_autofree unsigned char *buffer = NULL;
g_autofree char *str = NULL;
atom = XInternAtom (manager_xrandr->xdisplay, "underscan", False);
XRRGetOutputProperty (manager_xrandr->xdisplay,
(XID)output->winsys_id,
atom,
0, G_MAXLONG, False, False, XA_ATOM,
&actual_type, &actual_format,
&nitems, &bytes_after, &buffer);
if (actual_type != XA_ATOM || actual_format != 32 || nitems < 1)
return FALSE;
str = XGetAtomName (manager_xrandr->xdisplay, *(Atom *)buffer);
return (strcmp (str, "on") == 0);
}
static gboolean
output_get_supports_underscanning_xrandr (MetaMonitorManagerXrandr *manager_xrandr,
MetaOutput *output)
{
Atom atom, actual_type;
int actual_format, i;
unsigned long nitems, bytes_after;
g_autofree unsigned char *buffer = NULL;
XRRPropertyInfo *property_info;
Atom *values;
gboolean supports_underscanning = FALSE;
atom = XInternAtom (manager_xrandr->xdisplay, "underscan", False);
XRRGetOutputProperty (manager_xrandr->xdisplay,
(XID)output->winsys_id,
atom,
0, G_MAXLONG, False, False, XA_ATOM,
&actual_type, &actual_format,
&nitems, &bytes_after, &buffer);
if (actual_type != XA_ATOM || actual_format != 32 || nitems < 1)
return FALSE;
property_info = XRRQueryOutputProperty (manager_xrandr->xdisplay,
(XID) output->winsys_id,
atom);
values = (Atom *) property_info->values;
for (i = 0; i < property_info->num_values; i++)
{
/* The output supports underscanning if "on" is a valid value
* for the underscan property.
*/
char *name = XGetAtomName (manager_xrandr->xdisplay, values[i]);
if (strcmp (name, "on") == 0)
supports_underscanning = TRUE;
XFree (name);
}
XFree (property_info);
return supports_underscanning;
}
static int
normalize_backlight (MetaOutput *output,
int hw_value)
@@ -241,7 +307,7 @@ output_get_backlight_xrandr (MetaMonitorManagerXrandr *manager_xrandr,
Atom atom, actual_type;
int actual_format;
unsigned long nitems, bytes_after;
unsigned char *buffer;
g_autofree unsigned char *buffer = NULL;
atom = XInternAtom (manager_xrandr->xdisplay, "Backlight", False);
XRRGetOutputProperty (manager_xrandr->xdisplay,
@@ -252,12 +318,9 @@ output_get_backlight_xrandr (MetaMonitorManagerXrandr *manager_xrandr,
&nitems, &bytes_after, &buffer);
if (actual_type != XA_INTEGER || actual_format != 32 || nitems < 1)
goto out;
return FALSE;
value = ((int*)buffer)[0];
out:
XFree (buffer);
if (value > 0)
return normalize_backlight (output, value);
else
@@ -270,7 +333,7 @@ output_get_backlight_limits_xrandr (MetaMonitorManagerXrandr *manager_xrandr,
{
Atom atom;
xcb_connection_t *xcb_conn;
xcb_randr_query_output_property_reply_t *reply;
g_autofree xcb_randr_query_output_property_reply_t *reply;
atom = XInternAtom (manager_xrandr->xdisplay, "Backlight", False);
@@ -288,15 +351,12 @@ output_get_backlight_limits_xrandr (MetaMonitorManagerXrandr *manager_xrandr,
if (!reply->range || reply->length != 2)
{
meta_verbose ("backlight %s was not range\n", output->name);
goto out;
return;
}
int32_t *values = xcb_randr_query_output_property_valid_values (reply);
output->backlight_min = values[0];
output->backlight_max = values[1];
out:
free (reply);
}
static int
@@ -376,6 +436,42 @@ read_output_edid (MetaMonitorManagerXrandr *manager_xrandr,
return NULL;
}
static void
output_get_tile_info (MetaMonitorManagerXrandr *manager_xrandr,
MetaOutput *output)
{
Atom tile_atom;
unsigned char *prop;
unsigned long nitems, bytes_after;
int actual_format;
Atom actual_type;
if (manager_xrandr->has_randr15 == FALSE)
return;
tile_atom = XInternAtom (manager_xrandr->xdisplay, "TILE", FALSE);
XRRGetOutputProperty (manager_xrandr->xdisplay,
output->winsys_id,
tile_atom, 0, 100, False,
False, AnyPropertyType,
&actual_type, &actual_format,
&nitems, &bytes_after, &prop);
if (actual_type == XA_INTEGER && actual_format == 32 && nitems == 8)
{
long *values = (long *)prop;
output->tile_info.group_id = values[0];
output->tile_info.flags = values[1];
output->tile_info.max_h_tiles = values[2];
output->tile_info.max_v_tiles = values[3];
output->tile_info.loc_h_tile = values[4];
output->tile_info.loc_v_tile = values[5];
output->tile_info.tile_w = values[6];
output->tile_info.tile_h = values[7];
}
XFree (prop);
}
static gboolean
output_get_hotplug_mode_update (MetaMonitorManagerXrandr *manager_xrandr,
MetaOutput *output)
@@ -447,11 +543,10 @@ static MetaConnectorType
output_get_connector_type_from_prop (MetaMonitorManagerXrandr *manager_xrandr,
MetaOutput *output)
{
MetaConnectorType ret = META_CONNECTOR_TYPE_Unknown;
Atom atom, actual_type, connector_type_atom;
int actual_format;
unsigned long nitems, bytes_after;
unsigned char *buffer;
g_autofree unsigned char *buffer = NULL;
atom = XInternAtom (manager_xrandr->xdisplay, "ConnectorType", False);
XRRGetOutputProperty (manager_xrandr->xdisplay,
@@ -462,14 +557,10 @@ output_get_connector_type_from_prop (MetaMonitorManagerXrandr *manager_xrandr,
&nitems, &bytes_after, &buffer);
if (actual_type != XA_ATOM || actual_format != 32 || nitems < 1)
goto out;
return META_CONNECTOR_TYPE_Unknown;
connector_type_atom = ((Atom *) buffer)[0];
ret = connector_type_from_atom (manager_xrandr, connector_type_atom);
out:
meta_XFree (buffer);
return ret;
return connector_type_from_atom (manager_xrandr, connector_type_atom);
}
static MetaConnectorType
@@ -506,7 +597,7 @@ output_get_connector_type_from_name (MetaMonitorManagerXrandr *manager_xrandr,
if (g_str_has_prefix (name, "Virtual"))
return META_CONNECTOR_TYPE_VIRTUAL;
if (g_str_has_prefix (name, "Composite"))
return META_CONNECTOR_TYPE_VGA;
return META_CONNECTOR_TYPE_Composite;
if (g_str_has_prefix (name, "S-video"))
return META_CONNECTOR_TYPE_SVIDEO;
if (g_str_has_prefix (name, "TV"))
@@ -704,6 +795,7 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
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_get_tile_info (manager_xrandr, meta_output);
meta_output->n_modes = output->nmode;
meta_output->modes = g_new0 (MetaMonitorMode *, meta_output->n_modes);
for (j = 0; j < meta_output->n_modes; j++)
@@ -756,6 +848,8 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
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);
if (!(meta_output->backlight_min == 0 && meta_output->backlight_max == 0))
@@ -869,11 +963,58 @@ output_set_presentation_xrandr (MetaMonitorManagerXrandr *manager_xrandr,
int value = presentation;
atom = XInternAtom (manager_xrandr->xdisplay, "_MUTTER_PRESENTATION_OUTPUT", False);
XRRChangeOutputProperty (manager_xrandr->xdisplay,
(XID)output->winsys_id,
atom,
XA_CARDINAL, 32, PropModeReplace,
(unsigned char*) &value, 1);
xcb_randr_change_output_property (XGetXCBConnection (manager_xrandr->xdisplay),
(XID)output->winsys_id,
atom, XCB_ATOM_CARDINAL, 32,
XCB_PROP_MODE_REPLACE,
1, &value);
}
static void
output_set_underscanning_xrandr (MetaMonitorManagerXrandr *manager_xrandr,
MetaOutput *output,
gboolean underscanning)
{
Atom prop, valueatom;
const char *value;
prop = XInternAtom (manager_xrandr->xdisplay, "underscan", False);
value = underscanning ? "on" : "off";
valueatom = XInternAtom (manager_xrandr->xdisplay, value, False);
xcb_randr_change_output_property (XGetXCBConnection (manager_xrandr->xdisplay),
(XID)output->winsys_id,
prop, XCB_ATOM_ATOM, 32,
XCB_PROP_MODE_REPLACE,
1, &valueatom);
/* Configure the border at the same time. Currently, we use a
* 5% of the width/height of the mode. In the future, we should
* make the border configurable. */
if (underscanning)
{
uint32_t border_value;
prop = XInternAtom (manager_xrandr->xdisplay, "underscan hborder", False);
border_value = output->crtc->current_mode->width * 0.05;
xcb_randr_change_output_property (XGetXCBConnection (manager_xrandr->xdisplay),
(XID)output->winsys_id,
prop, XCB_ATOM_INTEGER, 32,
XCB_PROP_MODE_REPLACE,
1, &border_value);
prop = XInternAtom (manager_xrandr->xdisplay, "underscan vborder", False);
border_value = output->crtc->current_mode->height * 0.05;
xcb_randr_change_output_property (XGetXCBConnection (manager_xrandr->xdisplay),
(XID)output->winsys_id,
prop, XCB_ATOM_INTEGER, 32,
XCB_PROP_MODE_REPLACE,
1, &border_value);
}
}
static void
@@ -992,7 +1133,7 @@ meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager,
if (crtc_info->mode != NULL)
{
MetaMonitorMode *mode;
XID *outputs;
g_autofree XID *outputs = NULL;
unsigned int j, n_outputs;
int width, height;
Status ok;
@@ -1029,7 +1170,7 @@ meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager,
(unsigned)(crtc->crtc_id), (unsigned)(mode->mode_id),
mode->width, mode->height, (float)mode->refresh_rate,
crtc_info->x, crtc_info->y, crtc_info->transform);
goto next;
continue;
}
if (meta_monitor_transform_is_rotated (crtc_info->transform))
@@ -1049,9 +1190,6 @@ meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager,
crtc->rect.height = height;
crtc->current_mode = mode;
crtc->transform = crtc_info->transform;
next:
g_free (outputs);
}
}
@@ -1071,8 +1209,14 @@ meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager,
output_info->output,
output_info->is_presentation);
if (output_get_supports_underscanning_xrandr (manager_xrandr, output_info->output))
output_set_underscanning_xrandr (manager_xrandr,
output_info->output,
output_info->is_underscanning);
output->is_primary = output_info->is_primary;
output->is_presentation = output_info->is_presentation;
output->is_underscanning = output_info->is_underscanning;
}
/* Disable outputs not mentioned in the list */
@@ -1106,11 +1250,12 @@ meta_monitor_manager_xrandr_change_backlight (MetaMonitorManager *manager,
hw_value = round ((double)value / 100.0 * output->backlight_max + output->backlight_min);
atom = XInternAtom (manager_xrandr->xdisplay, "Backlight", False);
XRRChangeOutputProperty (manager_xrandr->xdisplay,
(XID)output->winsys_id,
atom,
XA_INTEGER, 32, PropModeReplace,
(unsigned char *) &hw_value, 1);
xcb_randr_change_output_property (XGetXCBConnection (manager_xrandr->xdisplay),
(XID)output->winsys_id,
atom, XCB_ATOM_INTEGER, 32,
XCB_PROP_MODE_REPLACE,
1, &hw_value);
/* We're not selecting for property notifies, so update the value immediately */
output->backlight = normalize_backlight (output, hw_value);
@@ -1158,6 +1303,88 @@ meta_monitor_manager_xrandr_set_crtc_gamma (MetaMonitorManager *manager,
XRRFreeGamma (gamma);
}
#ifdef HAVE_XRANDR15
static void
meta_monitor_manager_xrandr_add_monitor(MetaMonitorManager *manager,
MetaMonitorInfo *monitor)
{
MetaMonitorManagerXrandr *manager_xrandr = META_MONITOR_MANAGER_XRANDR (manager);
XRRMonitorInfo *m;
int o;
Atom name;
char name_buf[40];
if (manager_xrandr->has_randr15 == FALSE)
return;
if (monitor->n_outputs <= 1)
return;
if (monitor->outputs[0]->product)
snprintf (name_buf, 40, "%s-%d", monitor->outputs[0]->product, monitor->outputs[0]->tile_info.group_id);
else
snprintf (name_buf, 40, "Tiled-%d", monitor->outputs[0]->tile_info.group_id);
name = XInternAtom (manager_xrandr->xdisplay, name_buf, False);
monitor->monitor_winsys_xid = name;
m = XRRAllocateMonitor (manager_xrandr->xdisplay, monitor->n_outputs);
if (!m)
return;
m->name = name;
m->primary = monitor->is_primary;
m->automatic = True;
for (o = 0; o < monitor->n_outputs; o++) {
MetaOutput *output = monitor->outputs[o];
m->outputs[o] = output->winsys_id;
}
XRRSetMonitor (manager_xrandr->xdisplay,
DefaultRootWindow (manager_xrandr->xdisplay),
m);
XRRFreeMonitors (m);
}
static void
meta_monitor_manager_xrandr_delete_monitor(MetaMonitorManager *manager,
int monitor_winsys_xid)
{
MetaMonitorManagerXrandr *manager_xrandr = META_MONITOR_MANAGER_XRANDR (manager);
if (manager_xrandr->has_randr15 == FALSE)
return;
XRRDeleteMonitor (manager_xrandr->xdisplay,
DefaultRootWindow (manager_xrandr->xdisplay),
monitor_winsys_xid);
}
static void
meta_monitor_manager_xrandr_init_monitors(MetaMonitorManagerXrandr *manager_xrandr)
{
XRRMonitorInfo *m;
int n, i;
if (manager_xrandr->has_randr15 == FALSE)
return;
/* delete any tiled monitors setup, as mutter will want to recreate
things in its image */
m = XRRGetMonitors (manager_xrandr->xdisplay,
DefaultRootWindow (manager_xrandr->xdisplay),
FALSE, &n);
if (n == -1)
return;
for (i = 0; i < n; i++)
{
if (m[i].noutput > 1)
XRRDeleteMonitor (manager_xrandr->xdisplay,
DefaultRootWindow (manager_xrandr->xdisplay),
m[i].name);
}
XRRFreeMonitors (m);
}
#endif
static void
meta_monitor_manager_xrandr_init (MetaMonitorManagerXrandr *manager_xrandr)
{
@@ -1173,6 +1400,7 @@ meta_monitor_manager_xrandr_init (MetaMonitorManagerXrandr *manager_xrandr)
}
else
{
int major_version, minor_version;
/* We only use ScreenChangeNotify, but GDK uses the others,
and we don't want to step on its toes */
XRRSelectInput (manager_xrandr->xdisplay,
@@ -1180,6 +1408,17 @@ meta_monitor_manager_xrandr_init (MetaMonitorManagerXrandr *manager_xrandr)
RRScreenChangeNotifyMask
| RRCrtcChangeNotifyMask
| RROutputPropertyNotifyMask);
manager_xrandr->has_randr15 = FALSE;
XRRQueryVersion (manager_xrandr->xdisplay, &major_version,
&minor_version);
#ifdef HAVE_XRANDR15
if (major_version > 1 ||
(major_version == 1 &&
minor_version >= 5))
manager_xrandr->has_randr15 = TRUE;
meta_monitor_manager_xrandr_init_monitors (manager_xrandr);
#endif
}
}
@@ -1210,6 +1449,10 @@ meta_monitor_manager_xrandr_class_init (MetaMonitorManagerXrandrClass *klass)
manager_class->change_backlight = meta_monitor_manager_xrandr_change_backlight;
manager_class->get_crtc_gamma = meta_monitor_manager_xrandr_get_crtc_gamma;
manager_class->set_crtc_gamma = meta_monitor_manager_xrandr_set_crtc_gamma;
#ifdef HAVE_XRANDR15
manager_class->add_monitor = meta_monitor_manager_xrandr_add_monitor;
manager_class->delete_monitor = meta_monitor_manager_xrandr_delete_monitor;
#endif
}
gboolean

View File

@@ -115,7 +115,7 @@ typedef enum {
#define FRAGMENT_SHADER_CODE \
"float t = 2.0 * length(position);\n" \
"t = min(t, 1.0);\n" \
"float pixel_brightness = 1 - t * vignette_sharpness;\n" \
"float pixel_brightness = 1.0 - t * vignette_sharpness;\n" \
"cogl_color_out.rgb = cogl_color_out.rgb * pixel_brightness;\n" \
typedef struct _MetaBackgroundLayer MetaBackgroundLayer;

View File

@@ -71,6 +71,8 @@ enum
G_DEFINE_TYPE (MetaBackground, meta_background, G_TYPE_OBJECT)
static GSList *all_backgrounds = NULL;
static void
free_fbos (MetaBackground *self)
{
@@ -305,6 +307,8 @@ meta_background_dispose (GObject *object)
static void
meta_background_finalize (GObject *object)
{
all_backgrounds = g_slist_remove (all_backgrounds, object);
G_OBJECT_CLASS (meta_background_parent_class)->finalize (object);
}
@@ -347,6 +351,7 @@ meta_background_init (MetaBackground *self)
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
META_TYPE_BACKGROUND,
MetaBackgroundPrivate);
all_backgrounds = g_slist_prepend (all_backgrounds, self);
}
static void
@@ -913,3 +918,12 @@ meta_background_set_blend (MetaBackground *self,
free_wallpaper_texture (self);
mark_changed (self);
}
void
meta_background_refresh_all (void)
{
GSList *l;
for (l = all_backgrounds; l; l = l->next)
mark_changed (l->data);
}

View File

@@ -32,6 +32,9 @@
ClutterActor *meta_shaped_texture_new (void);
void meta_shaped_texture_set_texture (MetaShapedTexture *stex,
CoglTexture *texture);
void meta_shaped_texture_set_fallback_size (MetaShapedTexture *stex,
guint fallback_width,
guint fallback_height);
gboolean meta_shaped_texture_is_obscured (MetaShapedTexture *self);
#endif

View File

@@ -86,6 +86,7 @@ struct _MetaShapedTexturePrivate
cairo_region_t *unobscured_region;
guint tex_width, tex_height;
guint fallback_width, fallback_height;
guint create_mipmaps : 1;
};
@@ -136,7 +137,20 @@ set_unobscured_region (MetaShapedTexture *self,
g_clear_pointer (&priv->unobscured_region, (GDestroyNotify) cairo_region_destroy);
if (unobscured_region)
{
cairo_rectangle_int_t bounds = { 0, 0, priv->tex_width, priv->tex_height };
guint width, height;
if (priv->texture)
{
width = priv->tex_width;
height = priv->tex_height;
}
else
{
width = priv->fallback_width;
height = priv->fallback_height;
}
cairo_rectangle_int_t bounds = { 0, 0, width, height };
priv->unobscured_region = cairo_region_copy (unobscured_region);
cairo_region_intersect_rectangle (priv->unobscured_region, &bounds);
}
@@ -498,17 +512,18 @@ meta_shaped_texture_get_preferred_width (ClutterActor *self,
gfloat *min_width_p,
gfloat *natural_width_p)
{
MetaShapedTexturePrivate *priv;
MetaShapedTexturePrivate *priv = META_SHAPED_TEXTURE (self)->priv;
guint width;
g_return_if_fail (META_IS_SHAPED_TEXTURE (self));
priv = META_SHAPED_TEXTURE (self)->priv;
if (priv->texture)
width = priv->tex_width;
else
width = priv->fallback_width;
if (min_width_p)
*min_width_p = priv->tex_width;
*min_width_p = width;
if (natural_width_p)
*natural_width_p = priv->tex_width;
*natural_width_p = width;
}
static void
@@ -517,17 +532,18 @@ meta_shaped_texture_get_preferred_height (ClutterActor *self,
gfloat *min_height_p,
gfloat *natural_height_p)
{
MetaShapedTexturePrivate *priv;
MetaShapedTexturePrivate *priv = META_SHAPED_TEXTURE (self)->priv;
guint height;
g_return_if_fail (META_IS_SHAPED_TEXTURE (self));
priv = META_SHAPED_TEXTURE (self)->priv;
if (priv->texture)
height = priv->tex_height;
else
height = priv->fallback_height;
if (min_height_p)
*min_height_p = priv->tex_height;
*min_height_p = height;
if (natural_height_p)
*natural_height_p = priv->tex_height;
*natural_height_p = height;
}
static cairo_region_t *
@@ -860,6 +876,17 @@ meta_shaped_texture_get_image (MetaShapedTexture *stex,
return surface;
}
void
meta_shaped_texture_set_fallback_size (MetaShapedTexture *self,
guint fallback_width,
guint fallback_height)
{
MetaShapedTexturePrivate *priv = self->priv;
priv->fallback_width = fallback_width;
priv->fallback_height = fallback_height;
}
static void
meta_shaped_texture_cull_out (MetaCullable *cullable,
cairo_region_t *unobscured_region,

View File

@@ -31,6 +31,8 @@
#include "wayland/meta-wayland-private.h"
#include "compositor/region-utils.h"
struct _MetaSurfaceActorWaylandPrivate
{
MetaWaylandSurface *surface;
@@ -126,12 +128,68 @@ meta_surface_actor_wayland_get_scale (MetaSurfaceActorWayland *actor)
}
void
meta_surface_actor_wayland_scale_texture (MetaSurfaceActorWayland *actor)
meta_surface_actor_wayland_sync_state (MetaSurfaceActorWayland *self)
{
MetaShapedTexture *stex = meta_surface_actor_get_texture (META_SURFACE_ACTOR (actor));
double output_scale = meta_surface_actor_wayland_get_scale (actor);
MetaWaylandSurface *surface = meta_surface_actor_wayland_get_surface (self);
MetaShapedTexture *stex =
meta_surface_actor_get_texture (META_SURFACE_ACTOR (self));
double texture_scale;
clutter_actor_set_scale (CLUTTER_ACTOR (stex), output_scale, output_scale);
/* Given the surface's window type and what output the surface actor has the
* largest region, scale the actor with the determined scale. */
texture_scale = meta_surface_actor_wayland_get_scale (self);
/* Actor scale. */
clutter_actor_set_scale (CLUTTER_ACTOR (stex), texture_scale, texture_scale);
/* Input region */
if (surface->input_region)
{
cairo_region_t *scaled_input_region;
int region_scale;
/* The input region from the Wayland surface is in the Wayland surface
* coordinate space, while the surface actor input region is in the
* physical pixel coordinate space. */
region_scale = (int)(surface->scale * texture_scale);
scaled_input_region = meta_region_scale (surface->input_region,
region_scale);
meta_surface_actor_set_input_region (META_SURFACE_ACTOR (self),
scaled_input_region);
cairo_region_destroy (scaled_input_region);
}
/* Opaque region */
if (surface->opaque_region)
{
cairo_region_t *scaled_opaque_region;
/* The opaque region from the Wayland surface is in Wayland surface
* coordinate space, while the surface actor opaque region is in the
* same coordinate space as the unscaled buffer texture. */
scaled_opaque_region = meta_region_scale (surface->opaque_region,
surface->scale);
meta_surface_actor_set_opaque_region (META_SURFACE_ACTOR (self),
scaled_opaque_region);
cairo_region_destroy (scaled_opaque_region);
}
}
void
meta_surface_actor_wayland_sync_state_recursive (MetaSurfaceActorWayland *self)
{
MetaWaylandSurface *surface = meta_surface_actor_wayland_get_surface (self);
GList *iter;
meta_surface_actor_wayland_sync_state (self);
for (iter = surface->subsurfaces; iter != NULL; iter = iter->next)
{
MetaWaylandSurface *subsurf = iter->data;
meta_surface_actor_wayland_sync_state_recursive (
META_SURFACE_ACTOR_WAYLAND (subsurf->surface_actor));
}
}
static MetaWindow *

View File

@@ -63,7 +63,10 @@ void meta_surface_actor_wayland_set_texture (MetaSurfaceActorWayland *self,
double meta_surface_actor_wayland_get_scale (MetaSurfaceActorWayland *actor);
void meta_surface_actor_wayland_scale_texture (MetaSurfaceActorWayland *actor);
void meta_surface_actor_wayland_sync_state (MetaSurfaceActorWayland *self);
void meta_surface_actor_wayland_sync_state_recursive (MetaSurfaceActorWayland *self);
G_END_DECLS
#endif /* __META_SURFACE_ACTOR_WAYLAND_H__ */

View File

@@ -416,6 +416,7 @@ meta_surface_actor_x11_set_size (MetaSurfaceActorX11 *self,
int width, int height)
{
MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
MetaShapedTexture *stex = meta_surface_actor_get_texture (META_SURFACE_ACTOR (self));
if (priv->last_width == width &&
priv->last_height == height)
@@ -424,4 +425,5 @@ meta_surface_actor_x11_set_size (MetaSurfaceActorX11 *self,
priv->size_changed = TRUE;
priv->last_width = width;
priv->last_height = height;
meta_shaped_texture_set_fallback_size (stex, width, height);
}

View File

@@ -172,6 +172,35 @@ meta_region_iterator_next (MetaRegionIterator *iter)
}
}
cairo_region_t *
meta_region_scale (cairo_region_t *region, int scale)
{
int n_rects, i;
cairo_rectangle_int_t *rects;
cairo_region_t *scaled_region;
if (scale == 1)
return cairo_region_copy (region);
n_rects = cairo_region_num_rectangles (region);
rects = g_malloc (sizeof(cairo_rectangle_int_t) * n_rects);
for (i = 0; i < n_rects; i++)
{
cairo_region_get_rectangle (region, i, &rects[i]);
rects[i].x *= scale;
rects[i].y *= scale;
rects[i].width *= scale;
rects[i].height *= scale;
}
scaled_region = cairo_region_create_rectangles (rects, n_rects);
g_free (rects);
return scaled_region;
}
static void
add_expanded_rect (MetaRegionBuilder *builder,
int x,

View File

@@ -92,6 +92,8 @@ void meta_region_iterator_init (MetaRegionIterator *iter,
gboolean meta_region_iterator_at_end (MetaRegionIterator *iter);
void meta_region_iterator_next (MetaRegionIterator *iter);
cairo_region_t *meta_region_scale (cairo_region_t *region, int scale);
cairo_region_t *meta_make_border_region (cairo_region_t *region,
int x_amount,
int y_amount,

View File

@@ -217,19 +217,6 @@ meta_core_show_window_menu_for_rect (Display *xdisplay,
meta_window_show_menu_for_rect (window, menu, rect);
}
const char*
meta_core_get_workspace_name_with_index (Display *xdisplay,
Window xroot,
int index)
{
MetaDisplay *display;
MetaWorkspace *workspace;
display = meta_display_for_x_display (xdisplay);
workspace = meta_screen_get_workspace_by_index (display->screen, index);
return workspace ? meta_workspace_get_name (workspace) : NULL;
}
gboolean
meta_core_begin_grab_op (Display *xdisplay,
Window frame_xwindow,

View File

@@ -47,9 +47,6 @@ void meta_core_change_workspace (Display *xdisplay,
int meta_core_get_frame_workspace (Display *xdisplay,
Window frame_xwindow);
const char* meta_core_get_workspace_name_with_index (Display *xdisplay,
Window xroot,
int index);
void meta_core_show_window_menu (Display *xdisplay,
Window frame_xwindow,

View File

@@ -160,12 +160,7 @@ void
meta_window_set_alive (MetaWindow *window,
gboolean is_alive)
{
if (window->is_alive == is_alive)
return;
window->is_alive = is_alive;
if (window->is_alive)
if (is_alive)
kill_delete_dialog (window);
else
show_delete_dialog (window, CurrentTime);

View File

@@ -121,7 +121,7 @@ struct _MetaDisplay
* class is constructed.
*/
#define item(x) Atom atom_##x;
#include <meta/atomnames.h>
#include <x11/atomnames.h>
#undef item
/* The window and serial of the most recent FocusIn event. */
@@ -217,9 +217,6 @@ struct _MetaDisplay
guint grab_have_pointer : 1;
guint grab_have_keyboard : 1;
guint grab_frame_action : 1;
/* During a resize operation, the directions in which we've broken
* out of the initial maximization state */
guint grab_resize_unmaximize : 2; /* MetaMaximizeFlags */
MetaRectangle grab_initial_window_pos;
int grab_initial_x, grab_initial_y; /* These are only relevant for */
gboolean grab_threshold_movement_reached; /* raise_on_click == FALSE. */

View File

@@ -52,6 +52,7 @@
#include <meta/meta-backend.h>
#include "backends/native/meta-backend-native.h"
#include "backends/x11/meta-backend-x11.h"
#include "backends/meta-stage.h"
#include <clutter/x11/clutter-x11.h>
#ifdef HAVE_RANDR
@@ -548,7 +549,7 @@ meta_display_open (void)
/* A list of all atom names, so that we can intern them in one go. */
char *atom_names[] = {
#define item(x) #x,
#include <meta/atomnames.h>
#include <x11/atomnames.h>
#undef item
};
Atom atoms[G_N_ELEMENTS(atom_names)];
@@ -609,7 +610,7 @@ meta_display_open (void)
{
int i = 0;
#define item(x) display->atom_##x = atoms[i++];
#include <meta/atomnames.h>
#include <x11/atomnames.h>
#undef item
}
@@ -1411,6 +1412,8 @@ meta_display_sync_wayland_input_focus (MetaDisplay *display)
#ifdef HAVE_WAYLAND
MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
MetaWindow *focus_window = NULL;
MetaBackend *backend = meta_get_backend ();
MetaStage *stage = META_STAGE (meta_backend_get_stage (backend));
if (!meta_display_windows_are_interactable (display))
focus_window = NULL;
@@ -1421,6 +1424,7 @@ meta_display_sync_wayland_input_focus (MetaDisplay *display)
else
meta_topic (META_DEBUG_FOCUS, "Focus change has no effect, because there is no matching wayland surface");
meta_stage_set_active (stage, focus_window == NULL);
meta_wayland_compositor_set_input_focus (compositor, focus_window);
meta_wayland_seat_repick (compositor->seat);
@@ -1918,7 +1922,6 @@ meta_display_begin_grab_op (MetaDisplay *display,
display->grab_last_moveresize_time.tv_usec = 0;
display->grab_last_user_action_was_snap = FALSE;
display->grab_frame_action = frame_action;
display->grab_resize_unmaximize = 0;
meta_display_update_cursor (display);

View File

@@ -93,6 +93,15 @@ handle_idletime_for_event (const ClutterEvent *event)
if (device == NULL)
return;
if (event->any.flags & CLUTTER_EVENT_FLAG_SYNTHETIC ||
event->type == CLUTTER_ENTER ||
event->type == CLUTTER_LEAVE ||
event->type == CLUTTER_STAGE_STATE ||
event->type == CLUTTER_DESTROY_NOTIFY ||
event->type == CLUTTER_CLIENT_MESSAGE ||
event->type == CLUTTER_DELETE)
return;
device_id = clutter_input_device_get_device_id (device);
core_monitor = meta_idle_monitor_get_core ();
@@ -161,6 +170,7 @@ meta_display_handle_event (MetaDisplay *display,
G_GNUC_UNUSED gboolean bypass_wayland = FALSE;
MetaGestureTracker *tracker;
ClutterEventSequence *sequence;
ClutterInputDevice *source;
sequence = clutter_event_get_event_sequence (event);
@@ -179,10 +189,19 @@ meta_display_handle_event (MetaDisplay *display,
}
#endif
source = clutter_event_get_source_device (event);
if (source)
{
meta_backend_update_last_device (meta_get_backend (),
clutter_input_device_get_device_id (source));
}
if (meta_is_wayland_compositor () && event->type == CLUTTER_MOTION)
{
MetaCursorTracker *tracker = meta_cursor_tracker_get_for_screen (NULL);
meta_cursor_tracker_update_position (tracker, event->motion.x, event->motion.y);
display->monitor_cache_invalidated = TRUE;
}
handle_idletime_for_event (event);

View File

@@ -37,7 +37,6 @@ meta_window_ensure_frame (MetaWindow *window)
{
MetaFrame *frame;
XSetWindowAttributes attrs;
Visual *visual;
gulong create_serial;
if (window->frame)
@@ -58,37 +57,14 @@ meta_window_ensure_frame (MetaWindow *window)
frame->is_flashing = FALSE;
frame->borders_cached = FALSE;
meta_verbose ("Framing window %s: visual %s default, depth %d default depth %d\n",
window->desc,
XVisualIDFromVisual (window->xvisual) ==
XVisualIDFromVisual (window->screen->default_xvisual) ?
"is" : "is not",
window->depth, window->screen->default_depth);
meta_verbose ("Frame geometry %d,%d %dx%d\n",
frame->rect.x, frame->rect.y,
frame->rect.width, frame->rect.height);
/* Default depth/visual handles clients with weird visuals; they can
* always be children of the root depth/visual obviously, but
* e.g. DRI games can't be children of a parent that has the same
* visual as the client. NULL means default visual.
*
* We look for an ARGB visual if we can find one, otherwise use
* the default of NULL.
*/
/* Special case for depth 32 windows (assumed to be ARGB),
* we use the window's visual. Otherwise we just use the system visual.
*/
if (window->depth == 32)
visual = window->xvisual;
else
visual = NULL;
frame->ui_frame = meta_ui_create_frame (window->screen->ui,
window->display->xdisplay,
frame->window,
visual,
window->xvisual,
frame->rect.x,
frame->rect.y,
frame->rect.width,
@@ -155,6 +131,9 @@ meta_window_ensure_frame (MetaWindow *window)
unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = { 0 };
XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits };
XISelectEvents (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
frame->xwindow, &mask, 1);
XISetMask (mask.mask, XI_ButtonPress);
XISetMask (mask.mask, XI_ButtonRelease);
XISetMask (mask.mask, XI_Motion);

View File

@@ -30,6 +30,7 @@
#include <gio/gio.h>
#include <meta/keybindings.h>
#include <xkbcommon/xkbcommon.h>
#include "meta-accel-parse.h"
typedef struct _MetaKeyHandler MetaKeyHandler;
struct _MetaKeyHandler
@@ -53,7 +54,6 @@ typedef struct _MetaResolvedKeyCombo {
* @keycode: keycode
* @modifiers: modifiers
*/
typedef struct _MetaKeyCombo MetaKeyCombo;
struct _MetaKeyCombo
{
unsigned int keysym;

View File

@@ -176,7 +176,6 @@ static gboolean
accelerator_parse (const gchar *accelerator,
MetaKeyCombo *combo)
{
gboolean error = FALSE;
guint keyval, keycode;
MetaVirtualModifier mods;
gint len;
@@ -186,10 +185,7 @@ accelerator_parse (const gchar *accelerator,
combo->modifiers = 0;
if (accelerator == NULL)
{
error = TRUE;
goto out;
}
return FALSE;
keyval = 0;
keycode = 0;
@@ -310,10 +306,7 @@ accelerator_parse (const gchar *accelerator,
g_free (with_xf86);
if (keyval == XKB_KEY_NoSymbol)
{
error = TRUE;
goto out;
}
return FALSE;
}
}
@@ -322,14 +315,10 @@ accelerator_parse (const gchar *accelerator,
}
}
out:
if (error)
return FALSE;
out:
combo->keysym = keyval;
combo->keycode = keycode;
combo->modifiers = mods;
return TRUE;
}

View File

@@ -2113,12 +2113,6 @@ meta_prefs_add_keybinding (const char *name,
pref->combos = NULL;
pref->builtin = (flags & META_KEY_BINDING_BUILTIN) != 0;
strokes = g_settings_get_strv (settings, name);
update_binding (pref, strokes);
g_strfreev (strokes);
g_hash_table_insert (key_bindings, g_strdup (name), pref);
if (pref->builtin)
{
if (g_object_get_data (G_OBJECT (settings), "changed-signal") == NULL)
@@ -2140,6 +2134,12 @@ meta_prefs_add_keybinding (const char *name,
queue_changed (META_PREF_KEYBINDINGS);
}
strokes = g_settings_get_strv (settings, name);
update_binding (pref, strokes);
g_strfreev (strokes);
g_hash_table_insert (key_bindings, g_strdup (name), pref);
return TRUE;
}

View File

@@ -41,14 +41,6 @@
typedef void (* MetaScreenWindowFunc) (MetaWindow *window,
gpointer user_data);
typedef enum
{
META_SCREEN_UP,
META_SCREEN_DOWN,
META_SCREEN_LEFT,
META_SCREEN_RIGHT
} MetaScreenDirection;
#define META_WIREFRAME_XOR_LINE_WIDTH 2
struct _MetaScreen

View File

@@ -294,7 +294,7 @@ set_supported_hint (MetaScreen *screen)
Atom atoms[] = {
#define EWMH_ATOMS_ONLY
#define item(x) screen->display->atom_##x,
#include <meta/atomnames.h>
#include <x11/atomnames.h>
#undef item
#undef EWMH_ATOMS_ONLY
@@ -750,7 +750,7 @@ void
meta_screen_init_workspaces (MetaScreen *screen)
{
MetaWorkspace *current_workspace;
gulong current_workspace_index = 0;
uint32_t current_workspace_index = 0;
guint32 timestamp;
g_return_if_fail (META_IS_SCREEN (screen));
@@ -1166,7 +1166,7 @@ update_num_workspaces (MetaScreen *screen,
if (meta_prefs_get_dynamic_workspaces ())
{
int n_items;
gulong *list;
uint32_t *list;
n_items = 0;
list = NULL;
@@ -1490,6 +1490,16 @@ meta_screen_get_monitor_neighbor (MetaScreen *screen,
return NULL;
}
int
meta_screen_get_monitor_neighbor_index (MetaScreen *screen,
int which_monitor,
MetaScreenDirection direction)
{
const MetaMonitorInfo *monitor;
monitor = meta_screen_get_monitor_neighbor (screen, which_monitor, direction);
return monitor ? monitor->number : -1;
}
void
meta_screen_get_natural_monitor_list (MetaScreen *screen,
int** monitors_list,
@@ -1745,7 +1755,7 @@ meta_screen_get_monitor_geometry (MetaScreen *screen,
void
meta_screen_update_workspace_layout (MetaScreen *screen)
{
gulong *list;
uint32_t *list;
int n_items;
if (screen->workspace_layout_overridden)

View File

@@ -1273,16 +1273,13 @@ get_default_focus_window (MetaStack *stack,
if (window->unmaps_pending > 0)
continue;
if (window->minimized)
continue;
if (window->unmanaging)
continue;
if (!(window->input || window->take_focus))
continue;
if (workspace != NULL && !meta_window_located_on_workspace (window, workspace))
if (!meta_window_should_be_showing (window))
continue;
if (must_be_at_point && !window_contains_point (window, root_x, root_y))

View File

@@ -434,7 +434,6 @@ struct _MetaWindow
/* Managed by delete.c */
int dialog_pid;
guint is_alive : 1;
/* maintained by group.c */
MetaGroup *group;
@@ -482,6 +481,8 @@ struct _MetaWindowClass
gboolean (*update_icon) (MetaWindow *window,
cairo_surface_t **icon,
cairo_surface_t **mini_icon);
void (*main_monitor_changed) (MetaWindow *window,
const MetaMonitorInfo *old);
};
/* These differ from window->has_foo_func in that they consider

View File

@@ -57,7 +57,8 @@
#include "x11/xprops.h"
#ifdef HAVE_WAYLAND
#include "wayland/window-wayland.h"
#include "wayland/meta-window-wayland.h"
#include "wayland/meta-wayland-surface.h"
#include "wayland/meta-wayland-private.h"
#endif
@@ -71,9 +72,10 @@
static int destroying_windows_disallowed = 0;
// Each window has a "stamp" which is a non-recycled 64-bit ID. They
// start after the end of the XID space so that, for stacking
// we can keep a guint64 that represents one or the other
/* Each window has a "stamp" which is a non-recycled 64-bit ID. They
* start after the end of the XID space so that, for stacking
* we can keep a guint64 that represents one or the other
*/
static guint64 next_window_stamp = G_GUINT64_CONSTANT(0x100000000);
static void invalidate_work_areas (MetaWindow *window);
@@ -722,6 +724,12 @@ meta_window_should_attach_to_parent (MetaWindow *window)
static gboolean
client_window_should_be_mapped (MetaWindow *window)
{
#ifdef HAVE_WAYLAND
if (window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND &&
!window->surface->buffer)
return FALSE;
#endif
return !window->shaded;
}
@@ -761,6 +769,20 @@ meta_window_update_desc (MetaWindow *window)
window->desc = g_strdup_printf ("0x%lx", window->xwindow);
}
static void
meta_window_main_monitor_changed (MetaWindow *window,
const MetaMonitorInfo *old)
{
META_WINDOW_GET_CLASS (window)->main_monitor_changed (window, old);
if (old)
g_signal_emit_by_name (window->screen, "window-left-monitor",
old->number, window);
if (window->monitor)
g_signal_emit_by_name (window->screen, "window-entered-monitor",
window->monitor->number, window);
}
MetaWindow *
_meta_window_shared_new (MetaDisplay *display,
MetaScreen *screen,
@@ -1128,7 +1150,7 @@ _meta_window_shared_new (MetaDisplay *display,
meta_window_update_struts (window);
}
g_signal_emit_by_name (window->screen, "window-entered-monitor", window->monitor->number, window);
meta_window_main_monitor_changed (window, NULL);
/* Must add window to stack before doing move/resize, since the
* window might have fullscreen size (i.e. should have been
@@ -1369,9 +1391,10 @@ meta_window_unmanage (MetaWindow *window,
if (window->monitor)
{
g_signal_emit_by_name (window->screen, "window-left-monitor",
window->monitor->number, window);
const MetaMonitorInfo *old = window->monitor;
window->monitor = NULL;
meta_window_main_monitor_changed (window, old);
}
if (!window->override_redirect)
@@ -1517,6 +1540,12 @@ meta_window_showing_on_its_workspace (MetaWindow *window)
gboolean
meta_window_should_be_showing (MetaWindow *window)
{
#ifdef HAVE_WAYLAND
if (window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND &&
!window->surface->buffer)
return FALSE;
#endif
/* Windows should be showing if they're located on the
* active workspace and they're showing on their own workspace. */
return (meta_window_located_on_workspace (window, window->screen->active_workspace) &&
@@ -2949,11 +2978,9 @@ unmaximize_window_before_freeing (MetaWindow *window)
}
}
static void
meta_window_unmaximize_internal (MetaWindow *window,
MetaMaximizeFlags directions,
MetaRectangle *desired_rect,
int gravity)
void
meta_window_unmaximize (MetaWindow *window,
MetaMaximizeFlags directions)
{
gboolean unmaximize_horizontally, unmaximize_vertically;
MetaRectangle new_rect;
@@ -2974,6 +3001,7 @@ meta_window_unmaximize_internal (MetaWindow *window,
if ((unmaximize_horizontally && window->maximized_horizontally) ||
(unmaximize_vertically && window->maximized_vertically))
{
MetaRectangle *desired_rect;
MetaRectangle target_rect;
MetaRectangle work_area;
MetaRectangle old_rect;
@@ -2999,6 +3027,8 @@ meta_window_unmaximize_internal (MetaWindow *window,
*/
meta_window_frame_size_changed (window);
desired_rect = &window->saved_rect;
/* Unmaximize to the saved_rect position in the direction(s)
* being unmaximized.
*/
@@ -3045,7 +3075,7 @@ meta_window_unmaximize_internal (MetaWindow *window,
meta_window_move_resize_internal (window,
META_MOVE_RESIZE_MOVE_ACTION | META_MOVE_RESIZE_RESIZE_ACTION | META_MOVE_RESIZE_STATE_CHANGED,
gravity,
NorthWestGravity,
target_rect);
meta_window_get_frame_rect (window, &new_rect);
@@ -3079,37 +3109,6 @@ meta_window_unmaximize_internal (MetaWindow *window,
g_object_thaw_notify (G_OBJECT (window));
}
void
meta_window_unmaximize (MetaWindow *window,
MetaMaximizeFlags directions)
{
meta_window_unmaximize_internal (window, directions, &window->saved_rect,
NorthWestGravity);
}
/* Like meta_window_unmaximize(), but instead of unmaximizing to the
* saved position, we give the new desired size, and the gravity that
* determines the positioning relationship between the area occupied
* maximized and the new are. The arguments are similar to
* meta_window_resize_with_gravity().
* Unlike meta_window_unmaximize(), tiling is not restored for windows
* with a tile mode other than META_TILE_NONE.
*/
static void
meta_window_unmaximize_with_gravity (MetaWindow *window,
MetaMaximizeFlags directions,
int new_width,
int new_height,
int gravity)
{
MetaRectangle desired_rect;
desired_rect.width = new_width;
desired_rect.height = new_height;
meta_window_unmaximize_internal (window, directions, &desired_rect, gravity);
}
void
meta_window_make_above (MetaWindow *window)
{
@@ -3212,6 +3211,8 @@ meta_window_unmake_fullscreen (MetaWindow *window)
window->fullscreen = FALSE;
target_rect = window->saved_rect;
meta_window_frame_size_changed (window);
/* Window's size hints may have changed while maximized, making
* saved_rect invalid. #329152
*/
@@ -3568,9 +3569,7 @@ meta_window_update_monitor (MetaWindow *window,
window->screen->active_workspace != window->workspace)
meta_window_change_workspace (window, window->screen->active_workspace);
if (old)
g_signal_emit_by_name (window->screen, "window-left-monitor", old->number, window);
g_signal_emit_by_name (window->screen, "window-entered-monitor", window->monitor->number, window);
meta_window_main_monitor_changed (window, old);
/* If we're changing monitors, we need to update the has_maximize_func flag,
* as the working area has changed. */
@@ -4122,25 +4121,6 @@ meta_window_get_frame_rect (const MetaWindow *window,
*rect = window->rect;
}
/**
* meta_window_get_outer_rect:
* @window: a #MetaWindow
* @rect: (out): pointer to an allocated #MetaRectangle
*
* Gets the rectangle that bounds @window that is what the user thinks of
* as the edge of the window. This doesn't include any extra reactive
* area that we or the client adds to the window, or any area that the
* client adds to draw a client-side shadow.
*
* Deprecated: 3.12: Use meta_window_get_frame_rect() instead.
*/
void
meta_window_get_outer_rect (const MetaWindow *window,
MetaRectangle *rect)
{
meta_window_get_frame_rect (window, rect);
}
/**
* meta_window_get_client_area_rect:
* @window: a #MetaWindow
@@ -5733,81 +5713,6 @@ update_move (MetaWindow *window,
meta_window_move_frame (window, TRUE, new_x, new_y);
}
/* When resizing a maximized window by using alt-middle-drag (resizing
* with the grips or the menu for a maximized window is not enabled),
* the user can "break" out of the maximized state. This checks for
* that possibility. During such a break-out resize the user can also
* return to the previous maximization state by resizing back to near
* the original size.
*/
static MetaMaximizeFlags
check_resize_unmaximize(MetaWindow *window,
int dx,
int dy)
{
int threshold;
MetaMaximizeFlags new_unmaximize;
#define DRAG_THRESHOLD_TO_RESIZE_THRESHOLD_FACTOR 3
threshold = meta_prefs_get_drag_threshold () *
DRAG_THRESHOLD_TO_RESIZE_THRESHOLD_FACTOR;
new_unmaximize = 0;
if (window->maximized_horizontally ||
window->tile_mode != META_TILE_NONE ||
(window->display->grab_resize_unmaximize & META_MAXIMIZE_HORIZONTAL) != 0)
{
int x_amount;
/* We allow breaking out of maximization in either direction, to make
* the window larger than the monitor as well as smaller than the
* monitor. If we wanted to only allow resizing smaller than the
* monitor, we'd use - dx for NE/E/SE and dx for SW/W/NW.
*/
if ((window->display->grab_op & (META_GRAB_OP_WINDOW_DIR_WEST | META_GRAB_OP_WINDOW_DIR_EAST)) != 0)
x_amount = dx < 0 ? - dx : dx;
else
x_amount = 0;
if (x_amount > threshold)
new_unmaximize |= META_MAXIMIZE_HORIZONTAL;
}
if (window->maximized_vertically ||
(window->display->grab_resize_unmaximize & META_MAXIMIZE_VERTICAL) != 0)
{
int y_amount;
if ((window->display->grab_op & (META_GRAB_OP_WINDOW_DIR_NORTH | META_GRAB_OP_WINDOW_DIR_SOUTH)) != 0)
y_amount = dy < 0 ? - dy : dy;
else
y_amount = 0;
if (y_amount > threshold)
new_unmaximize |= META_MAXIMIZE_VERTICAL;
}
/* Metacity doesn't have a full user interface for only horizontally or
* vertically maximized, so while only unmaximizing in the direction drags
* has some advantages, it will also confuse the user. So, we always
* unmaximize both ways if possible.
*/
if (new_unmaximize != 0)
{
new_unmaximize = 0;
if (window->maximized_horizontally ||
(window->display->grab_resize_unmaximize & META_MAXIMIZE_HORIZONTAL) != 0)
new_unmaximize |= META_MAXIMIZE_HORIZONTAL;
if (window->maximized_vertically ||
(window->display->grab_resize_unmaximize & META_MAXIMIZE_VERTICAL) != 0)
new_unmaximize |= META_MAXIMIZE_VERTICAL;
}
return new_unmaximize;
}
static gboolean
update_resize_timeout (gpointer data)
{
@@ -5832,7 +5737,6 @@ update_resize (MetaWindow *window,
int gravity;
MetaRectangle old;
double remaining = 0;
MetaMaximizeFlags new_unmaximize;
window->display->grab_latest_motion_x = x;
window->display->grab_latest_motion_y = y;
@@ -5879,8 +5783,6 @@ update_resize (MetaWindow *window,
meta_window_update_keyboard_resize (window, TRUE);
}
new_unmaximize = check_resize_unmaximize (window, dx, dy);
if (window->display->grab_op & META_GRAB_OP_WINDOW_DIR_EAST)
new_w += dx;
else if (window->display->grab_op & META_GRAB_OP_WINDOW_DIR_WEST)
@@ -5949,29 +5851,7 @@ update_resize (MetaWindow *window,
snap,
FALSE);
if (new_unmaximize == window->display->grab_resize_unmaximize)
{
meta_window_resize_frame_with_gravity (window, TRUE, new_w, new_h, gravity);
}
else
{
if ((new_unmaximize & ~window->display->grab_resize_unmaximize) != 0)
{
meta_window_unmaximize_with_gravity (window,
(new_unmaximize & ~window->display->grab_resize_unmaximize),
new_w, new_h, gravity);
}
if ((window->display->grab_resize_unmaximize & ~new_unmaximize))
{
MetaRectangle saved_rect = window->saved_rect;
meta_window_maximize (window,
(window->display->grab_resize_unmaximize & ~new_unmaximize));
window->saved_rect = saved_rect;
}
}
window->display->grab_resize_unmaximize = new_unmaximize;
meta_window_resize_frame_with_gravity (window, TRUE, new_w, new_h, gravity);
/* Store the latest resize time, if we actually resized. */
if (window->rect.width != old.width || window->rect.height != old.height)

View File

@@ -57,6 +57,8 @@ struct _MetaBackground
MetaBackgroundPrivate *priv;
};
void meta_background_refresh_all (void);
GType meta_background_get_type (void);
MetaBackground *meta_background_new (MetaScreen *screen);

View File

@@ -66,6 +66,21 @@ int meta_screen_get_active_workspace_index (MetaScreen *screen);
MetaWorkspace * meta_screen_get_active_workspace (MetaScreen *screen);
/**
* MetaScreenDirection:
* @META_SCREEN_UP: up
* @META_SCREEN_DOWN: down
* @META_SCREEN_LEFT: left
* @META_SCREEN_RIGHT: right
*/
typedef enum
{
META_SCREEN_UP,
META_SCREEN_DOWN,
META_SCREEN_LEFT,
META_SCREEN_RIGHT
} MetaScreenDirection;
int meta_screen_get_n_monitors (MetaScreen *screen);
int meta_screen_get_primary_monitor (MetaScreen *screen);
int meta_screen_get_current_monitor (MetaScreen *screen);
@@ -82,6 +97,10 @@ gboolean meta_screen_get_monitor_in_fullscreen (MetaScreen *screen,
int meta_screen_get_monitor_index_for_rect (MetaScreen *screen,
MetaRectangle *rect);
int meta_screen_get_monitor_neighbor_index (MetaScreen *screen,
int which_monitor,
MetaScreenDirection dir);
void meta_screen_focus_default_window (MetaScreen *screen,
guint32 timestamp);

View File

@@ -111,7 +111,6 @@ gboolean meta_window_is_skip_taskbar (MetaWindow *window);
void meta_window_get_buffer_rect (const MetaWindow *window, MetaRectangle *rect);
void meta_window_get_frame_rect (const MetaWindow *window, MetaRectangle *rect);
void meta_window_get_outer_rect (const MetaWindow *window, MetaRectangle *rect) G_GNUC_DEPRECATED;
void meta_window_client_rect_to_frame_rect (MetaWindow *window,
MetaRectangle *client_rect,

View File

@@ -931,6 +931,133 @@ meta_frames_retry_grab_op (MetaFrames *frames,
frames->grab_y);
}
static MetaGrabOp
grab_op_from_resize_control (MetaFrameControl control)
{
switch (control)
{
case META_FRAME_CONTROL_RESIZE_SE:
return META_GRAB_OP_RESIZING_SE;
case META_FRAME_CONTROL_RESIZE_S:
return META_GRAB_OP_RESIZING_S;
case META_FRAME_CONTROL_RESIZE_SW:
return META_GRAB_OP_RESIZING_SW;
case META_FRAME_CONTROL_RESIZE_NE:
return META_GRAB_OP_RESIZING_NE;
case META_FRAME_CONTROL_RESIZE_N:
return META_GRAB_OP_RESIZING_N;
case META_FRAME_CONTROL_RESIZE_NW:
return META_GRAB_OP_RESIZING_NW;
case META_FRAME_CONTROL_RESIZE_E:
return META_GRAB_OP_RESIZING_E;
case META_FRAME_CONTROL_RESIZE_W:
return META_GRAB_OP_RESIZING_W;
default:
g_assert_not_reached ();
}
}
static gboolean
meta_frame_left_click_event (MetaUIFrame *frame,
ClutterButtonEvent *event)
{
Display *display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
MetaFrameControl control = get_control (frame, event->x, event->y);
switch (control)
{
case META_FRAME_CONTROL_MAXIMIZE:
case META_FRAME_CONTROL_UNMAXIMIZE:
case META_FRAME_CONTROL_MINIMIZE:
case META_FRAME_CONTROL_DELETE:
case META_FRAME_CONTROL_SHADE:
case META_FRAME_CONTROL_UNSHADE:
case META_FRAME_CONTROL_ABOVE:
case META_FRAME_CONTROL_UNABOVE:
case META_FRAME_CONTROL_STICK:
case META_FRAME_CONTROL_UNSTICK:
case META_FRAME_CONTROL_MENU:
case META_FRAME_CONTROL_APPMENU:
frame->grab_button = event->button;
frame->button_state = META_BUTTON_STATE_PRESSED;
frame->prelit_control = control;
redraw_control (frame, control);
if (control == META_FRAME_CONTROL_MENU ||
control == META_FRAME_CONTROL_APPMENU)
{
MetaFrameGeometry fgeom;
GdkRectangle *rect;
MetaRectangle root_rect;
MetaWindowMenuType menu;
int win_x, win_y;
meta_ui_frame_calc_geometry (frame, &fgeom);
rect = control_rect (control, &fgeom);
gdk_window_get_position (frame->window, &win_x, &win_y);
root_rect.x = win_x + rect->x;
root_rect.y = win_y + rect->y;
root_rect.width = rect->width;
root_rect.height = rect->height;
menu = control == META_FRAME_CONTROL_MENU ? META_WINDOW_MENU_WM
: META_WINDOW_MENU_APP;
/* if the compositor takes a grab for showing the menu, we will
* get a LeaveNotify event we want to ignore, to keep the pressed
* button state while the menu is open
*/
frame->maybe_ignore_leave_notify = TRUE;
meta_core_show_window_menu_for_rect (display,
frame->xwindow,
menu,
&root_rect,
event->time);
}
else
{
meta_frames_try_grab_op (frame, META_GRAB_OP_FRAME_BUTTON,
event->x, event->y,
event->time);
}
return TRUE;
case META_FRAME_CONTROL_RESIZE_SE:
case META_FRAME_CONTROL_RESIZE_S:
case META_FRAME_CONTROL_RESIZE_SW:
case META_FRAME_CONTROL_RESIZE_NE:
case META_FRAME_CONTROL_RESIZE_N:
case META_FRAME_CONTROL_RESIZE_NW:
case META_FRAME_CONTROL_RESIZE_E:
case META_FRAME_CONTROL_RESIZE_W:
meta_frames_try_grab_op (frame,
grab_op_from_resize_control (control),
event->x, event->y,
event->time);
return TRUE;
case META_FRAME_CONTROL_TITLE:
{
MetaFrameFlags flags = meta_frame_get_flags (frame->meta_window->frame);
if (flags & META_FRAME_ALLOWS_MOVE)
{
meta_frames_try_grab_op (frame,
META_GRAB_OP_MOVING,
event->x, event->y,
event->time);
}
}
return TRUE;
default:
g_assert_not_reached ();
}
}
static gboolean
handle_button_press_event (MetaUIFrame *frame,
ClutterButtonEvent *event)
@@ -974,138 +1101,17 @@ handle_button_press_event (MetaUIFrame *frame,
frame->grab_button = event->button;
if (event->button == 1 &&
(control == META_FRAME_CONTROL_MAXIMIZE ||
control == META_FRAME_CONTROL_UNMAXIMIZE ||
control == META_FRAME_CONTROL_MINIMIZE ||
control == META_FRAME_CONTROL_DELETE ||
control == META_FRAME_CONTROL_SHADE ||
control == META_FRAME_CONTROL_UNSHADE ||
control == META_FRAME_CONTROL_ABOVE ||
control == META_FRAME_CONTROL_UNABOVE ||
control == META_FRAME_CONTROL_STICK ||
control == META_FRAME_CONTROL_UNSTICK ||
control == META_FRAME_CONTROL_MENU ||
control == META_FRAME_CONTROL_APPMENU))
{
frame->grab_button = event->button;
frame->button_state = META_BUTTON_STATE_PRESSED;
frame->prelit_control = control;
redraw_control (frame, control);
if (control == META_FRAME_CONTROL_MENU ||
control == META_FRAME_CONTROL_APPMENU)
{
MetaFrameGeometry fgeom;
GdkRectangle *rect;
MetaRectangle root_rect;
MetaWindowMenuType menu;
int win_x, win_y;
meta_ui_frame_calc_geometry (frame, &fgeom);
rect = control_rect (control, &fgeom);
gdk_window_get_position (frame->window, &win_x, &win_y);
root_rect.x = win_x + rect->x;
root_rect.y = win_y + rect->y;
root_rect.width = rect->width;
root_rect.height = rect->height;
menu = control == META_FRAME_CONTROL_MENU ? META_WINDOW_MENU_WM
: META_WINDOW_MENU_APP;
/* if the compositor takes a grab for showing the menu, we will
* get a LeaveNotify event we want to ignore, to keep the pressed
* button state while the menu is open
*/
frame->maybe_ignore_leave_notify = TRUE;
meta_core_show_window_menu_for_rect (display,
frame->xwindow,
menu,
&root_rect,
event->time);
}
else
{
meta_frames_try_grab_op (frame, META_GRAB_OP_FRAME_BUTTON,
event->x, event->y,
event->time);
}
}
else if (event->button == 1 &&
(control == META_FRAME_CONTROL_RESIZE_SE ||
control == META_FRAME_CONTROL_RESIZE_S ||
control == META_FRAME_CONTROL_RESIZE_SW ||
control == META_FRAME_CONTROL_RESIZE_NE ||
control == META_FRAME_CONTROL_RESIZE_N ||
control == META_FRAME_CONTROL_RESIZE_NW ||
control == META_FRAME_CONTROL_RESIZE_E ||
control == META_FRAME_CONTROL_RESIZE_W))
{
MetaGrabOp op;
op = META_GRAB_OP_NONE;
switch (control)
{
case META_FRAME_CONTROL_RESIZE_SE:
op = META_GRAB_OP_RESIZING_SE;
break;
case META_FRAME_CONTROL_RESIZE_S:
op = META_GRAB_OP_RESIZING_S;
break;
case META_FRAME_CONTROL_RESIZE_SW:
op = META_GRAB_OP_RESIZING_SW;
break;
case META_FRAME_CONTROL_RESIZE_NE:
op = META_GRAB_OP_RESIZING_NE;
break;
case META_FRAME_CONTROL_RESIZE_N:
op = META_GRAB_OP_RESIZING_N;
break;
case META_FRAME_CONTROL_RESIZE_NW:
op = META_GRAB_OP_RESIZING_NW;
break;
case META_FRAME_CONTROL_RESIZE_E:
op = META_GRAB_OP_RESIZING_E;
break;
case META_FRAME_CONTROL_RESIZE_W:
op = META_GRAB_OP_RESIZING_W;
break;
default:
g_assert_not_reached ();
break;
}
meta_frames_try_grab_op (frame, op,
event->x, event->y,
event->time);
}
else if (control == META_FRAME_CONTROL_TITLE &&
event->button == 1)
{
MetaFrameFlags flags = meta_frame_get_flags (frame->meta_window->frame);
if (flags & META_FRAME_ALLOWS_MOVE)
{
meta_frames_try_grab_op (frame,
META_GRAB_OP_MOVING,
event->x, event->y,
event->time);
}
}
else if (event->button == 2)
switch (event->button)
{
case 1:
return meta_frame_left_click_event (frame, event);
case 2:
return meta_frame_middle_click_event (frame, event);
}
else if (event->button == 3)
{
case 3:
return meta_frame_right_click_event (frame, event);
default:
return FALSE;
}
return TRUE;
}
static gboolean
@@ -1383,6 +1389,7 @@ meta_ui_frame_get_mask (MetaUIFrame *frame,
MetaFrameBorders borders;
MetaFrameFlags flags;
MetaRectangle frame_rect;
int scale = meta_theme_get_window_scaling_factor ();
meta_window_get_frame_rect (frame->meta_window, &frame_rect);
@@ -1390,9 +1397,13 @@ meta_ui_frame_get_mask (MetaUIFrame *frame,
meta_style_info_set_flags (frame->style_info, flags);
meta_ui_frame_get_borders (frame, &borders);
/* See comment in meta_frame_layout_draw_with_style() for details on HiDPI handling */
cairo_scale (cr, scale, scale);
gtk_render_background (frame->style_info->styles[META_STYLE_ELEMENT_FRAME], cr,
borders.invisible.left, borders.invisible.top,
frame_rect.width, frame_rect.height);
borders.invisible.left / scale,
borders.invisible.top / scale,
frame_rect.width / scale, frame_rect.height / scale);
}
/* XXX -- this is disgusting. Find a better approach here.

View File

@@ -27,6 +27,7 @@
#include <meta/common.h>
#include <meta/types.h>
#include "theme-private.h"
#include "ui.h"
typedef enum
{
@@ -69,8 +70,6 @@ typedef enum
typedef struct _MetaFrames MetaFrames;
typedef struct _MetaFramesClass MetaFramesClass;
typedef struct _MetaUIFrame MetaUIFrame;
struct _MetaUIFrame
{
MetaFrames *frames;

View File

@@ -115,7 +115,7 @@ struct _MetaFrameGeometry
/* used for a memset hack */
#define ADDRESS_OF_BUTTON_RECTS(fgeom) (((char*)(fgeom)) + G_STRUCT_OFFSET (MetaFrameGeometry, close_rect))
#define LENGTH_OF_BUTTON_RECTS (G_STRUCT_OFFSET (MetaFrameGeometry, unstick_rect) + sizeof (GdkRectangle) - G_STRUCT_OFFSET (MetaFrameGeometry, close_rect))
#define LENGTH_OF_BUTTON_RECTS (G_STRUCT_OFFSET (MetaFrameGeometry, unstick_rect) + sizeof (MetaButtonSpace) - G_STRUCT_OFFSET (MetaFrameGeometry, close_rect))
/* The button rects (if changed adjust memset hack) */
MetaButtonSpace close_rect;
@@ -276,5 +276,6 @@ void meta_theme_calc_geometry (MetaTheme *theme,
int meta_pango_font_desc_get_text_height (const PangoFontDescription *font_desc,
PangoContext *context);
int meta_theme_get_window_scaling_factor (void);
#endif /* META_THEME_PRIVATE_H */

View File

@@ -30,6 +30,8 @@
#define DEBUG_FILL_STRUCT(s) memset ((s), 0xef, sizeof (*(s)))
static void scale_border (GtkBorder *border, double factor);
static MetaFrameLayout *
meta_frame_layout_new (void)
{
@@ -65,6 +67,7 @@ meta_frame_layout_get_borders (const MetaFrameLayout *layout,
MetaFrameBorders *borders)
{
int buttons_height, content_height, draggable_borders;
int scale = meta_theme_get_window_scaling_factor ();
meta_frame_borders_clear (borders);
@@ -110,6 +113,26 @@ meta_frame_layout_get_borders (const MetaFrameLayout *layout,
borders->total.right = borders->invisible.right + borders->visible.right;
borders->total.bottom = borders->invisible.bottom + borders->visible.bottom;
borders->total.top = borders->invisible.top + borders->visible.top;
/* Scale geometry for HiDPI, see comment in meta_frame_layout_draw_with_style() */
scale_border (&borders->visible, scale);
scale_border (&borders->invisible, scale);
scale_border (&borders->total, scale);
}
int
meta_theme_get_window_scaling_factor (void)
{
GdkScreen *screen;
GValue value = G_VALUE_INIT;
g_value_init (&value, G_TYPE_INT);
screen = gdk_screen_get_default ();
if (gdk_screen_get_setting (screen, "gdk-window-scaling-factor", &value))
return g_value_get_int (&value);
else
return 1;
}
void
@@ -117,8 +140,8 @@ meta_frame_layout_apply_scale (const MetaFrameLayout *layout,
PangoFontDescription *font_desc)
{
int size = pango_font_description_get_size (font_desc);
pango_font_description_set_size (font_desc,
MAX (size * layout->title_scale, 1));
double scale = layout->title_scale / meta_theme_get_window_scaling_factor ();
pango_font_description_set_size (font_desc, MAX (size * scale, 1));
}
static MetaButtonSpace*
@@ -306,6 +329,7 @@ meta_frame_layout_calc_geometry (MetaFrameLayout *layout,
int content_width, content_height;
int button_width, button_height;
int min_size_for_rounding;
int scale = meta_theme_get_window_scaling_factor ();
/* the left/right rects in order; the max # of rects
* is the number of button functions
@@ -325,11 +349,12 @@ meta_frame_layout_calc_geometry (MetaFrameLayout *layout,
fgeom->borders = borders;
/* Scale geometry for HiDPI, see comment in meta_frame_layout_draw_with_style() */
fgeom->content_border = layout->frame_border;
fgeom->content_border.left += layout->titlebar_border.left;
fgeom->content_border.right += layout->titlebar_border.right;
fgeom->content_border.top += layout->titlebar_border.top;
fgeom->content_border.bottom += layout->titlebar_border.bottom;
fgeom->content_border.left += layout->titlebar_border.left * scale;
fgeom->content_border.right += layout->titlebar_border.right * scale;
fgeom->content_border.top += layout->titlebar_border.top * scale;
fgeom->content_border.bottom += layout->titlebar_border.bottom * scale;
width = client_width + borders.total.left + borders.total.right;
@@ -349,6 +374,8 @@ meta_frame_layout_calc_geometry (MetaFrameLayout *layout,
layout->button_border.left + layout->button_border.right;
button_height = layout->icon_size +
layout->button_border.top + layout->button_border.bottom;
button_width *= scale;
button_height *= scale;
/* FIXME all this code sort of pretends that duplicate buttons
* with the same function are allowed, but that breaks the
@@ -408,11 +435,11 @@ meta_frame_layout_calc_geometry (MetaFrameLayout *layout,
space_used_by_buttons += button_width * n_left;
space_used_by_buttons += (button_width * 0.75) * n_left_spacers;
space_used_by_buttons += layout->titlebar_spacing * MAX (n_left - 1, 0);
space_used_by_buttons += layout->titlebar_spacing * scale * MAX (n_left - 1, 0);
space_used_by_buttons += button_width * n_right;
space_used_by_buttons += (button_width * 0.75) * n_right_spacers;
space_used_by_buttons += layout->titlebar_spacing * MAX (n_right - 1, 0);
space_used_by_buttons += layout->titlebar_spacing * scale * MAX (n_right - 1, 0);
if (space_used_by_buttons <= content_width)
break; /* Everything fits, bail out */
@@ -564,7 +591,7 @@ meta_frame_layout_calc_geometry (MetaFrameLayout *layout,
x = rect->visible.x + rect->visible.width;
if (i < n_left - 1)
x += layout->titlebar_spacing;
x += layout->titlebar_spacing * scale;
if (left_buttons_has_spacer[i])
x += (button_width * 0.75);
}
@@ -587,7 +614,7 @@ meta_frame_layout_calc_geometry (MetaFrameLayout *layout,
if (flags & META_FRAME_SHADED)
min_size_for_rounding = 0;
else
min_size_for_rounding = 5;
min_size_for_rounding = 5 * scale;
fgeom->top_left_corner_rounded_radius = 0;
fgeom->top_right_corner_rounded_radius = 0;
@@ -595,14 +622,14 @@ meta_frame_layout_calc_geometry (MetaFrameLayout *layout,
fgeom->bottom_right_corner_rounded_radius = 0;
if (borders.visible.top + borders.visible.left >= min_size_for_rounding)
fgeom->top_left_corner_rounded_radius = layout->top_left_corner_rounded_radius;
fgeom->top_left_corner_rounded_radius = layout->top_left_corner_rounded_radius * scale;
if (borders.visible.top + borders.visible.right >= min_size_for_rounding)
fgeom->top_right_corner_rounded_radius = layout->top_right_corner_rounded_radius;
fgeom->top_right_corner_rounded_radius = layout->top_right_corner_rounded_radius * scale;
if (borders.visible.bottom + borders.visible.left >= min_size_for_rounding)
fgeom->bottom_left_corner_rounded_radius = layout->bottom_left_corner_rounded_radius;
fgeom->bottom_left_corner_rounded_radius = layout->bottom_left_corner_rounded_radius * scale;
if (borders.visible.bottom + borders.visible.right >= min_size_for_rounding)
fgeom->bottom_right_corner_rounded_radius = layout->bottom_right_corner_rounded_radius;
fgeom->bottom_right_corner_rounded_radius = layout->bottom_right_corner_rounded_radius * scale;
}
static void
@@ -656,12 +683,29 @@ get_button_rect (MetaButtonType type,
*rect = fgeom->appmenu_rect.visible;
break;
default:
case META_BUTTON_TYPE_LAST:
g_assert_not_reached ();
break;
}
}
static const char *
get_class_from_button_type (MetaButtonType type)
{
switch (type)
{
case META_BUTTON_TYPE_CLOSE:
return "close";
case META_BUTTON_TYPE_MAXIMIZE:
return "maximize";
case META_BUTTON_TYPE_MINIMIZE:
return "minimize";
default:
return NULL;
}
}
static void
meta_frame_layout_draw_with_style (MetaFrameLayout *layout,
MetaStyleInfo *style_info,
@@ -679,13 +723,27 @@ meta_frame_layout_draw_with_style (MetaFrameLayout *layout,
GdkRectangle titlebar_rect;
GdkRectangle button_rect;
const MetaFrameBorders *borders;
int scale = meta_theme_get_window_scaling_factor ();
/* We opt out of GTK+/Clutter's HiDPI handling, so we have to do the scaling
* ourselves; the nitty-gritty is a bit confusing, so here is an overview:
* - the values in MetaFrameLayout are always as they appear in the theme,
* i.e. unscaled
* - calculated values (borders, MetaFrameGeometry) include the scale - as
* the geometry is comprised of scaled decorations and the client size
* which we must not scale, we don't have another option
* - for drawing, we scale the canvas to have GTK+ render elements (borders,
* radii, ...) at the correct scale - as a result, we have to "unscale"
* the geometry again to not apply the scaling twice
*/
cairo_scale (cr, scale, scale);
borders = &fgeom->borders;
visible_rect.x = borders->invisible.left;
visible_rect.y = borders->invisible.top;
visible_rect.width = fgeom->width - borders->invisible.left - borders->invisible.right;
visible_rect.height = fgeom->height - borders->invisible.top - borders->invisible.bottom;
visible_rect.x = borders->invisible.left / scale;
visible_rect.y = borders->invisible.top / scale;
visible_rect.width = (fgeom->width - borders->invisible.left - borders->invisible.right) / scale;
visible_rect.height = (fgeom->height - borders->invisible.top - borders->invisible.bottom) / scale;
meta_style_info_set_flags (style_info, flags);
@@ -700,7 +758,7 @@ meta_frame_layout_draw_with_style (MetaFrameLayout *layout,
titlebar_rect.x = visible_rect.x;
titlebar_rect.y = visible_rect.y;
titlebar_rect.width = visible_rect.width;
titlebar_rect.height = borders->visible.top;
titlebar_rect.height = borders->visible.top / scale;
style = style_info->styles[META_STYLE_ELEMENT_TITLEBAR];
gtk_render_background (style, cr,
@@ -718,7 +776,7 @@ meta_frame_layout_draw_with_style (MetaFrameLayout *layout,
pango_layout_set_width (title_layout, -1);
pango_layout_get_pixel_extents (title_layout, NULL, &logical);
text_width = MIN(fgeom->title_rect.width, logical.width);
text_width = MIN(fgeom->title_rect.width / scale, logical.width);
if (text_width < logical.width)
pango_layout_set_width (title_layout, PANGO_SCALE * text_width);
@@ -727,10 +785,10 @@ meta_frame_layout_draw_with_style (MetaFrameLayout *layout,
x = titlebar_rect.x + (titlebar_rect.width - text_width) / 2;
y = titlebar_rect.y + (titlebar_rect.height - logical.height) / 2;
if (x < fgeom->title_rect.x)
x = fgeom->title_rect.x;
else if (x + text_width > fgeom->title_rect.x + fgeom->title_rect.width)
x = fgeom->title_rect.x + fgeom->title_rect.width - text_width;
if (x < fgeom->title_rect.x / scale)
x = fgeom->title_rect.x / scale;
else if (x + text_width > (fgeom->title_rect.x + fgeom->title_rect.width) / scale)
x = (fgeom->title_rect.x + fgeom->title_rect.width) / scale - text_width;
style = style_info->styles[META_STYLE_ELEMENT_TITLE];
gtk_render_layout (style, cr, x, y, title_layout);
@@ -740,8 +798,17 @@ meta_frame_layout_draw_with_style (MetaFrameLayout *layout,
state = gtk_style_context_get_state (style);
for (button_type = META_BUTTON_TYPE_CLOSE; button_type < META_BUTTON_TYPE_LAST; button_type++)
{
const char *button_class = get_class_from_button_type (button_type);
if (button_class)
gtk_style_context_add_class (style, button_class);
get_button_rect (button_type, fgeom, &button_rect);
button_rect.x /= scale;
button_rect.y /= scale;
button_rect.width /= scale;
button_rect.height /= scale;
if (button_states[button_type] == META_BUTTON_STATE_PRELIGHT)
gtk_style_context_set_state (style, state | GTK_STATE_PRELIGHT);
else if (button_states[button_type] == META_BUTTON_STATE_PRESSED)
@@ -750,10 +817,8 @@ meta_frame_layout_draw_with_style (MetaFrameLayout *layout,
gtk_style_context_set_state (style, state);
cairo_save (cr);
gdk_cairo_rectangle (cr, &button_rect);
cairo_clip (cr);
if (gdk_cairo_get_clip_rectangle (cr, NULL))
if (button_rect.width > 0 && button_rect.height > 0)
{
cairo_surface_t *surface = NULL;
const char *icon_name = NULL;
@@ -796,9 +861,10 @@ meta_frame_layout_draw_with_style (MetaFrameLayout *layout,
GtkIconInfo *info;
GdkPixbuf *pixbuf;
info = gtk_icon_theme_lookup_icon (theme, icon_name, layout->icon_size, 0);
info = gtk_icon_theme_lookup_icon_for_scale (theme, icon_name,
layout->icon_size, scale, 0);
pixbuf = gtk_icon_info_load_symbolic_for_context (info, style, NULL, NULL);
surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, 1, NULL);
surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, scale, NULL);
}
if (surface)
@@ -806,8 +872,8 @@ meta_frame_layout_draw_with_style (MetaFrameLayout *layout,
float width, height;
int x, y;
width = cairo_image_surface_get_width (surface);
height = cairo_image_surface_get_height (surface);
width = cairo_image_surface_get_width (surface) / scale;
height = cairo_image_surface_get_height (surface) / scale;
x = button_rect.x + (button_rect.width - width) / 2;
y = button_rect.y + (button_rect.height - height) / 2;
@@ -822,6 +888,8 @@ meta_frame_layout_draw_with_style (MetaFrameLayout *layout,
}
}
cairo_restore (cr);
if (button_class)
gtk_style_context_remove_class (style, button_class);
}
}
@@ -918,6 +986,7 @@ create_style_context (GType widget_type,
va_list ap;
style = gtk_style_context_new ();
gtk_style_context_set_scale (style, meta_theme_get_window_scaling_factor ());
gtk_style_context_set_parent (style, parent_style);
if (parent_style)

View File

@@ -166,13 +166,7 @@ meta_ui_create_frame (MetaUI *ui,
attrs.title = NULL;
/* frame.c is going to replace the event mask immediately, but
* we still have to set it here to let GDK know what it is.
*/
attrs.event_mask =
GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK;
attrs.event_mask = GDK_EXPOSURE_MASK;
attrs.x = x;
attrs.y = y;
attrs.wclass = GDK_INPUT_OUTPUT;

View File

@@ -0,0 +1,34 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2015 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.
*
* Written by:
* Jonas Ådahl <jadahl@gmail.com>
*/
#ifndef META_WAYLAND_DATA_DEVICE_PRIVATE_H
#define META_WAYLAND_DATA_DEVICE_PRIVATE_H
#define META_TYPE_WAYLAND_DATA_SOURCE_WAYLAND (meta_wayland_data_source_wayland_get_type ())
G_DECLARE_FINAL_TYPE (MetaWaylandDataSourceWayland,
meta_wayland_data_source_wayland,
META, WAYLAND_DATA_SOURCE_WAYLAND,
MetaWaylandDataSource);
#endif /* META_WAYLAND_DATA_DEVICE_PRIVATE_H */

View File

@@ -31,24 +31,44 @@
#include <glib.h>
#include "meta-wayland-data-device.h"
#include "meta-wayland-data-device-private.h"
#include "meta-wayland-seat.h"
#include "meta-wayland-pointer.h"
#include "meta-wayland-private.h"
#include "meta-dnd-actor-private.h"
typedef struct
struct _MetaWaylandDataOffer
{
struct wl_resource *resource;
MetaWaylandDataSource *source;
struct wl_listener source_destroy_listener;
} MetaWaylandDataOffer;
};
struct _MetaWaylandDataSource
typedef struct _MetaWaylandDataSourcePrivate
{
struct wl_resource *resource;
struct wl_array mime_types;
gboolean has_target;
};
} MetaWaylandDataSourcePrivate;
typedef struct _MetaWaylandDataSourceWayland
{
MetaWaylandDataSource parent;
struct wl_resource *resource;
} MetaWaylandDataSourceWayland;
GType meta_wayland_data_source_wayland_get_type (void) G_GNUC_CONST;
G_DEFINE_TYPE_WITH_PRIVATE (MetaWaylandDataSource, meta_wayland_data_source,
G_TYPE_OBJECT);
G_DEFINE_TYPE (MetaWaylandDataSourceWayland, meta_wayland_data_source_wayland,
META_TYPE_WAYLAND_DATA_SOURCE);
static MetaWaylandDataSource *
meta_wayland_data_source_wayland_new (struct wl_resource *resource);
static void
drag_grab_data_source_destroyed (gpointer data, GObject *where_the_object_was);
static void
unbind_resource (struct wl_resource *resource)
@@ -56,6 +76,55 @@ unbind_resource (struct wl_resource *resource)
wl_list_remove (wl_resource_get_link (resource));
}
static void
meta_wayland_data_source_target (MetaWaylandDataSource *source,
const char *mime_type)
{
META_WAYLAND_DATA_SOURCE_GET_CLASS (source)->target (source, mime_type);
}
void
meta_wayland_data_source_send (MetaWaylandDataSource *source,
const char *mime_type,
int fd)
{
META_WAYLAND_DATA_SOURCE_GET_CLASS (source)->send (source, mime_type, fd);
}
gboolean
meta_wayland_data_source_has_target (MetaWaylandDataSource *source)
{
MetaWaylandDataSourcePrivate *priv =
meta_wayland_data_source_get_instance_private (source);
return priv->has_target;
}
void
meta_wayland_data_source_set_has_target (MetaWaylandDataSource *source,
gboolean has_target)
{
MetaWaylandDataSourcePrivate *priv =
meta_wayland_data_source_get_instance_private (source);
priv->has_target = has_target;
}
struct wl_array *
meta_wayland_data_source_get_mime_types (const MetaWaylandDataSource *source)
{
MetaWaylandDataSourcePrivate *priv =
meta_wayland_data_source_get_instance_private (source);
return &priv->mime_types;
}
static void
meta_wayland_data_source_cancel (MetaWaylandDataSource *source)
{
META_WAYLAND_DATA_SOURCE_GET_CLASS (source)->cancel (source);
}
static void
data_offer_accept (struct wl_client *client,
struct wl_resource *resource,
@@ -70,8 +139,9 @@ data_offer_accept (struct wl_client *client,
if (offer->source)
{
wl_data_source_send_target (offer->source->resource, mime_type);
offer->source->has_target = mime_type != NULL;
meta_wayland_data_source_target (offer->source, mime_type);
meta_wayland_data_source_set_has_target (offer->source,
mime_type != NULL);
}
}
@@ -82,9 +152,9 @@ data_offer_receive (struct wl_client *client, struct wl_resource *resource,
MetaWaylandDataOffer *offer = wl_resource_get_user_data (resource);
if (offer->source)
wl_data_source_send_send (offer->source->resource, mime_type, fd);
close (fd);
meta_wayland_data_source_send (offer->source, mime_type, fd);
else
close (fd);
}
static void
@@ -105,38 +175,34 @@ destroy_data_offer (struct wl_resource *resource)
MetaWaylandDataOffer *offer = wl_resource_get_user_data (resource);
if (offer->source)
wl_list_remove (&offer->source_destroy_listener.link);
g_object_remove_weak_pointer (G_OBJECT (offer->source),
(gpointer *)&offer->source);
g_slice_free (MetaWaylandDataOffer, offer);
}
static void
destroy_offer_data_source (struct wl_listener *listener, void *data)
{
MetaWaylandDataOffer *offer;
offer = wl_container_of (listener, offer, source_destroy_listener);
offer->source = NULL;
}
static struct wl_resource *
meta_wayland_data_source_send_offer (MetaWaylandDataSource *source,
struct wl_resource *target)
{
MetaWaylandDataSourcePrivate *priv =
meta_wayland_data_source_get_instance_private (source);
MetaWaylandDataOffer *offer = g_slice_new0 (MetaWaylandDataOffer);
char **p;
offer->source = source;
offer->source_destroy_listener.notify = destroy_offer_data_source;
offer->resource = wl_resource_create (wl_resource_get_client (target), &wl_data_offer_interface, wl_resource_get_version (target), 0);
wl_resource_set_implementation (offer->resource, &data_offer_interface, offer, destroy_data_offer);
wl_resource_add_destroy_listener (source->resource, &offer->source_destroy_listener);
g_object_add_weak_pointer (G_OBJECT (source), (gpointer *)&offer->source);
offer->resource = wl_resource_create (wl_resource_get_client (target),
&wl_data_offer_interface,
wl_resource_get_version (target), 0);
wl_resource_set_implementation (offer->resource,
&data_offer_interface,
offer,
destroy_data_offer);
wl_data_device_send_data_offer (target, offer->resource);
wl_array_for_each (p, &source->mime_types)
wl_array_for_each (p, &priv->mime_types)
wl_data_offer_send_offer (offer->resource, *p);
return offer->resource;
@@ -147,12 +213,8 @@ data_source_offer (struct wl_client *client,
struct wl_resource *resource, const char *type)
{
MetaWaylandDataSource *source = wl_resource_get_user_data (resource);
char **p;
p = wl_array_add (&source->mime_types, sizeof *p);
if (p)
*p = strdup (type);
if (!p || !*p)
if (!meta_wayland_data_source_add_mime_type (source, type))
wl_resource_post_no_memory (resource);
}
@@ -181,7 +243,6 @@ struct _MetaWaylandDragGrab {
struct wl_listener drag_icon_listener;
MetaWaylandDataSource *drag_data_source;
struct wl_listener drag_data_source_listener;
ClutterActor *feedback_actor;
@@ -199,26 +260,20 @@ destroy_drag_focus (struct wl_listener *listener, void *data)
grab->drag_focus_data_device = NULL;
}
static void
drag_grab_focus (MetaWaylandPointerGrab *grab,
MetaWaylandSurface *surface)
void
meta_wayland_drag_grab_set_focus (MetaWaylandDragGrab *drag_grab,
MetaWaylandSurface *surface)
{
MetaWaylandDragGrab *drag_grab = (MetaWaylandDragGrab*) grab;
MetaWaylandSeat *seat = drag_grab->seat;
struct wl_client *client;
struct wl_resource *data_device_resource, *offer = NULL;
struct wl_display *display;
guint32 serial;
wl_fixed_t sx, sy;
if (drag_grab->drag_focus == surface)
return;
if (drag_grab->drag_focus_data_device)
if (drag_grab->drag_focus)
{
wl_data_device_send_leave (drag_grab->drag_focus_data_device);
wl_list_remove (&drag_grab->drag_focus_listener.link);
drag_grab->drag_focus_data_device = NULL;
meta_wayland_surface_drag_dest_focus_out (drag_grab->drag_focus);
drag_grab->drag_focus = NULL;
}
@@ -232,25 +287,31 @@ drag_grab_focus (MetaWaylandPointerGrab *grab,
client = wl_resource_get_client (surface->resource);
data_device_resource = wl_resource_find_for_client (&seat->data_device.resource_list, client);
if (!data_device_resource)
return;
display = wl_client_get_display (client);
serial = wl_display_next_serial (display);
if (drag_grab->drag_data_source)
if (drag_grab->drag_data_source && data_device_resource)
offer = meta_wayland_data_source_send_offer (drag_grab->drag_data_source,
data_device_resource);
meta_wayland_pointer_get_relative_coordinates (grab->pointer, surface, &sx, &sy);
wl_data_device_send_enter (data_device_resource, serial, surface->resource,
sx, sy, offer);
drag_grab->drag_focus = surface;
drag_grab->drag_focus_data_device = data_device_resource;
drag_grab->drag_focus_listener.notify = destroy_drag_focus;
wl_resource_add_destroy_listener (data_device_resource, &drag_grab->drag_focus_listener);
meta_wayland_surface_drag_dest_focus_in (drag_grab->drag_focus,
offer ? wl_resource_get_user_data (offer) : NULL);
}
MetaWaylandSurface *
meta_wayland_drag_grab_get_focus (MetaWaylandDragGrab *drag_grab)
{
return drag_grab->drag_focus;
}
static void
drag_grab_focus (MetaWaylandPointerGrab *grab,
MetaWaylandSurface *surface)
{
MetaWaylandDragGrab *drag_grab = (MetaWaylandDragGrab*) grab;
meta_wayland_drag_grab_set_focus (drag_grab, surface);
}
static void
@@ -258,17 +319,9 @@ drag_grab_motion (MetaWaylandPointerGrab *grab,
const ClutterEvent *event)
{
MetaWaylandDragGrab *drag_grab = (MetaWaylandDragGrab*) grab;
wl_fixed_t sx, sy;
if (drag_grab->drag_focus_data_device)
{
meta_wayland_pointer_get_relative_coordinates (grab->pointer,
drag_grab->drag_focus,
&sx, &sy);
wl_data_device_send_motion (drag_grab->drag_focus_data_device,
clutter_event_get_time (event),
sx, sy);
}
if (drag_grab->drag_focus)
meta_wayland_surface_drag_dest_motion (drag_grab->drag_focus, event);
if (drag_grab->drag_surface)
meta_feedback_actor_update (META_FEEDBACK_ACTOR (drag_grab->feedback_actor),
@@ -278,6 +331,8 @@ drag_grab_motion (MetaWaylandPointerGrab *grab,
static void
data_device_end_drag_grab (MetaWaylandDragGrab *drag_grab)
{
meta_wayland_drag_grab_set_focus (drag_grab, NULL);
if (drag_grab->drag_origin)
{
drag_grab->drag_origin = NULL;
@@ -291,10 +346,9 @@ data_device_end_drag_grab (MetaWaylandDragGrab *drag_grab)
}
if (drag_grab->drag_data_source)
{
drag_grab->drag_data_source->has_target = FALSE;
wl_list_remove (&drag_grab->drag_data_source_listener.link);
}
g_object_weak_unref (G_OBJECT (drag_grab->drag_data_source),
drag_grab_data_source_destroyed,
drag_grab);
if (drag_grab->feedback_actor)
{
@@ -304,8 +358,6 @@ data_device_end_drag_grab (MetaWaylandDragGrab *drag_grab)
drag_grab->seat->data_device.current_grab = NULL;
drag_grab_focus (&drag_grab->generic, NULL);
meta_wayland_pointer_end_grab (drag_grab->generic.pointer);
g_slice_free (MetaWaylandDragGrab, drag_grab);
}
@@ -323,10 +375,9 @@ drag_grab_button (MetaWaylandPointerGrab *grab,
{
gboolean success = FALSE;
if (drag_grab->drag_focus_data_device &&
drag_grab->drag_data_source->has_target)
if (meta_wayland_data_source_has_target (drag_grab->drag_data_source))
{
wl_data_device_send_drop (drag_grab->drag_focus_data_device);
meta_wayland_surface_drag_dest_drop (drag_grab->drag_focus);
success = TRUE;
}
@@ -355,23 +406,24 @@ destroy_data_device_origin (struct wl_listener *listener, void *data)
drag_grab->drag_origin = NULL;
data_device_end_drag_grab (drag_grab);
meta_wayland_data_device_set_dnd_source (&drag_grab->seat->data_device, NULL);
}
static void
destroy_data_device_source (struct wl_listener *listener, void *data)
drag_grab_data_source_destroyed (gpointer data, GObject *where_the_object_was)
{
MetaWaylandDragGrab *drag_grab =
wl_container_of (listener, drag_grab, drag_data_source_listener);
MetaWaylandDragGrab *drag_grab = data;
drag_grab->drag_data_source = NULL;
data_device_end_drag_grab (drag_grab);
meta_wayland_data_device_set_dnd_source (&drag_grab->seat->data_device, NULL);
}
static void
destroy_data_device_icon (struct wl_listener *listener, void *data)
{
MetaWaylandDragGrab *drag_grab =
wl_container_of (listener, drag_grab, drag_data_source_listener);
wl_container_of (listener, drag_grab, drag_icon_listener);
drag_grab->drag_surface = NULL;
@@ -379,6 +431,76 @@ destroy_data_device_icon (struct wl_listener *listener, void *data)
clutter_actor_remove_all_children (drag_grab->feedback_actor);
}
void
meta_wayland_data_device_start_drag (MetaWaylandDataDevice *data_device,
struct wl_client *client,
const MetaWaylandPointerGrabInterface *funcs,
MetaWaylandSurface *surface,
MetaWaylandDataSource *source,
MetaWaylandSurface *icon_surface)
{
MetaWaylandSeat *seat = wl_container_of (data_device, seat, data_device);
MetaWaylandDragGrab *drag_grab;
ClutterPoint pos, stage_pos;
data_device->current_grab = drag_grab = g_slice_new0 (MetaWaylandDragGrab);
drag_grab->generic.interface = funcs;
drag_grab->generic.pointer = &seat->pointer;
drag_grab->drag_client = client;
drag_grab->seat = seat;
drag_grab->drag_origin = surface;
drag_grab->drag_origin_listener.notify = destroy_data_device_origin;
wl_resource_add_destroy_listener (surface->resource,
&drag_grab->drag_origin_listener);
clutter_input_device_get_coords (seat->pointer.device, NULL, &pos);
clutter_actor_transform_stage_point (CLUTTER_ACTOR (meta_surface_actor_get_texture (surface->surface_actor)),
pos.x, pos.y, &stage_pos.x, &stage_pos.y);
drag_grab->drag_start_x = stage_pos.x;
drag_grab->drag_start_y = stage_pos.y;
g_object_weak_ref (G_OBJECT (source),
drag_grab_data_source_destroyed,
drag_grab);
drag_grab->drag_data_source = source;
meta_wayland_data_device_set_dnd_source (data_device,
drag_grab->drag_data_source);
if (icon_surface)
{
drag_grab->drag_surface = icon_surface;
drag_grab->drag_icon_listener.notify = destroy_data_device_icon;
wl_resource_add_destroy_listener (icon_surface->resource,
&drag_grab->drag_icon_listener);
drag_grab->feedback_actor = meta_dnd_actor_new (CLUTTER_ACTOR (drag_grab->drag_origin->surface_actor),
drag_grab->drag_start_x,
drag_grab->drag_start_y);
meta_feedback_actor_set_anchor (META_FEEDBACK_ACTOR (drag_grab->feedback_actor),
-drag_grab->drag_surface->offset_x,
-drag_grab->drag_surface->offset_y);
clutter_actor_add_child (drag_grab->feedback_actor,
CLUTTER_ACTOR (drag_grab->drag_surface->surface_actor));
meta_feedback_actor_set_position (META_FEEDBACK_ACTOR (drag_grab->feedback_actor),
pos.x, pos.y);
}
meta_wayland_pointer_start_grab (&seat->pointer, (MetaWaylandPointerGrab*) drag_grab);
}
void
meta_wayland_data_device_end_drag (MetaWaylandDataDevice *data_device)
{
if (data_device->current_grab)
data_device_end_drag_grab (data_device->current_grab);
}
static void
data_device_start_drag (struct wl_client *client,
struct wl_resource *resource,
@@ -388,9 +510,8 @@ data_device_start_drag (struct wl_client *client,
{
MetaWaylandDataDevice *data_device = wl_resource_get_user_data (resource);
MetaWaylandSeat *seat = wl_container_of (data_device, seat, data_device);
MetaWaylandSurface *surface = NULL;
MetaWaylandDragGrab *drag_grab;
ClutterPoint pos;
MetaWaylandSurface *surface = NULL, *icon_surface = NULL;
MetaWaylandDataSource *drag_source = NULL;
if (origin_resource)
surface = wl_resource_get_user_data (origin_resource);
@@ -410,69 +531,28 @@ data_device_start_drag (struct wl_client *client,
seat->pointer.grab != &seat->pointer.default_grab)
return;
if (icon_resource)
icon_surface = wl_resource_get_user_data (icon_resource);
if (source_resource)
drag_source = wl_resource_get_user_data (source_resource);
if (icon_resource &&
meta_wayland_surface_set_role (wl_resource_get_user_data (icon_resource),
meta_wayland_surface_set_role (icon_surface,
META_WAYLAND_SURFACE_ROLE_DND,
resource,
WL_DATA_DEVICE_ERROR_ROLE) != 0)
return;
data_device->current_grab = drag_grab = g_slice_new0 (MetaWaylandDragGrab);
drag_grab->generic.interface = &drag_grab_interface;
drag_grab->generic.pointer = &seat->pointer;
drag_grab->drag_client = client;
drag_grab->seat = seat;
drag_grab->drag_origin = surface;
drag_grab->drag_origin_listener.notify = destroy_data_device_origin;
wl_resource_add_destroy_listener (origin_resource,
&drag_grab->drag_origin_listener);
clutter_input_device_get_coords (seat->pointer.device, NULL, &pos);
clutter_actor_transform_stage_point (CLUTTER_ACTOR (meta_surface_actor_get_texture (surface->surface_actor)),
pos.x, pos.y, &pos.x, &pos.y);
drag_grab->drag_start_x = pos.x;
drag_grab->drag_start_y = pos.y;
if (source_resource)
{
drag_grab->drag_data_source = wl_resource_get_user_data (source_resource);
drag_grab->drag_data_source_listener.notify = destroy_data_device_source;
wl_resource_add_destroy_listener (source_resource,
&drag_grab->drag_data_source_listener);
}
if (icon_resource)
{
drag_grab->drag_surface = wl_resource_get_user_data (icon_resource);
drag_grab->drag_icon_listener.notify = destroy_data_device_icon;
wl_resource_add_destroy_listener (icon_resource,
&drag_grab->drag_icon_listener);
drag_grab->feedback_actor = meta_dnd_actor_new (CLUTTER_ACTOR (drag_grab->drag_origin->surface_actor),
drag_grab->drag_start_x,
drag_grab->drag_start_y);
meta_feedback_actor_set_anchor (META_FEEDBACK_ACTOR (drag_grab->feedback_actor),
-drag_grab->drag_surface->offset_x,
-drag_grab->drag_surface->offset_y);
clutter_actor_add_child (drag_grab->feedback_actor,
CLUTTER_ACTOR (drag_grab->drag_surface->surface_actor));
clutter_input_device_get_coords (seat->pointer.device, NULL, &pos);
meta_feedback_actor_set_position (META_FEEDBACK_ACTOR (drag_grab->feedback_actor),
pos.x, pos.y);
}
meta_wayland_pointer_set_focus (&seat->pointer, NULL);
meta_wayland_pointer_start_grab (&seat->pointer, (MetaWaylandPointerGrab*)drag_grab);
meta_wayland_data_device_start_drag (data_device, client,
&drag_grab_interface,
surface, drag_source, icon_surface);
}
static void
destroy_selection_data_source (struct wl_listener *listener, void *data)
selection_data_source_destroyed (gpointer data, GObject *object_was_here)
{
MetaWaylandDataDevice *data_device = wl_container_of (listener, data_device, selection_data_source_listener);
MetaWaylandDataDevice *data_device = data;
MetaWaylandSeat *seat = wl_container_of (data_device, seat, data_device);
struct wl_resource *data_device_resource;
struct wl_client *focus_client = NULL;
@@ -489,6 +569,190 @@ destroy_selection_data_source (struct wl_listener *listener, void *data)
}
static void
meta_wayland_source_send (MetaWaylandDataSource *source,
const gchar *mime_type,
gint fd)
{
MetaWaylandDataSourceWayland *source_wayland =
META_WAYLAND_DATA_SOURCE_WAYLAND (source);
wl_data_source_send_send (source_wayland->resource, mime_type, fd);
close (fd);
}
static void
meta_wayland_source_target (MetaWaylandDataSource *source,
const gchar *mime_type)
{
MetaWaylandDataSourceWayland *source_wayland =
META_WAYLAND_DATA_SOURCE_WAYLAND (source);
wl_data_source_send_target (source_wayland->resource, mime_type);
}
static void
meta_wayland_source_cancel (MetaWaylandDataSource *source)
{
MetaWaylandDataSourceWayland *source_wayland =
META_WAYLAND_DATA_SOURCE_WAYLAND (source);
wl_data_source_send_cancelled (source_wayland->resource);
}
static void
meta_wayland_source_finalize (GObject *object)
{
G_OBJECT_CLASS (meta_wayland_data_source_parent_class)->finalize (object);
}
static void
meta_wayland_data_source_wayland_init (MetaWaylandDataSourceWayland *source_wayland)
{
}
static void
meta_wayland_data_source_wayland_class_init (MetaWaylandDataSourceWaylandClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
MetaWaylandDataSourceClass *data_source_class =
META_WAYLAND_DATA_SOURCE_CLASS (klass);
object_class->finalize = meta_wayland_source_finalize;
data_source_class->send = meta_wayland_source_send;
data_source_class->target = meta_wayland_source_target;
data_source_class->cancel = meta_wayland_source_cancel;
}
static void
meta_wayland_data_source_finalize (GObject *object)
{
MetaWaylandDataSource *source = META_WAYLAND_DATA_SOURCE (object);
MetaWaylandDataSourcePrivate *priv =
meta_wayland_data_source_get_instance_private (source);
char **pos;
wl_array_for_each (pos, &priv->mime_types)
g_free (*pos);
wl_array_release (&priv->mime_types);
G_OBJECT_CLASS (meta_wayland_data_source_parent_class)->finalize (object);
}
static void
meta_wayland_data_source_init (MetaWaylandDataSource *source)
{
MetaWaylandDataSourcePrivate *priv =
meta_wayland_data_source_get_instance_private (source);
wl_array_init (&priv->mime_types);
}
static void
meta_wayland_data_source_class_init (MetaWaylandDataSourceClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = meta_wayland_data_source_finalize;
}
static void
meta_wayland_drag_dest_focus_in (MetaWaylandDataDevice *data_device,
MetaWaylandSurface *surface,
MetaWaylandDataOffer *offer)
{
MetaWaylandDragGrab *grab = data_device->current_grab;
struct wl_display *display;
struct wl_client *client;
wl_fixed_t sx, sy;
if (!grab->drag_focus_data_device)
return;
client = wl_resource_get_client (surface->resource);
display = wl_client_get_display (client);
grab->drag_focus_listener.notify = destroy_drag_focus;
wl_resource_add_destroy_listener (grab->drag_focus_data_device,
&grab->drag_focus_listener);
meta_wayland_pointer_get_relative_coordinates (grab->generic.pointer,
surface, &sx, &sy);
wl_data_device_send_enter (grab->drag_focus_data_device,
wl_display_next_serial (display),
surface->resource, sx, sy, offer->resource);
}
static void
meta_wayland_drag_dest_focus_out (MetaWaylandDataDevice *data_device,
MetaWaylandSurface *surface)
{
MetaWaylandDragGrab *grab = data_device->current_grab;
if (grab->drag_focus_data_device)
wl_data_device_send_leave (grab->drag_focus_data_device);
wl_list_remove (&grab->drag_focus_listener.link);
grab->drag_focus_data_device = NULL;
}
static void
meta_wayland_drag_dest_motion (MetaWaylandDataDevice *data_device,
MetaWaylandSurface *surface,
const ClutterEvent *event)
{
MetaWaylandDragGrab *grab = data_device->current_grab;
wl_fixed_t sx, sy;
meta_wayland_pointer_get_relative_coordinates (grab->generic.pointer,
grab->drag_focus,
&sx, &sy);
wl_data_device_send_motion (grab->drag_focus_data_device,
clutter_event_get_time (event),
sx, sy);
}
static void
meta_wayland_drag_dest_drop (MetaWaylandDataDevice *data_device,
MetaWaylandSurface *surface)
{
MetaWaylandDragGrab *grab = data_device->current_grab;
wl_data_device_send_drop (grab->drag_focus_data_device);
}
static const MetaWaylandDragDestFuncs meta_wayland_drag_dest_funcs = {
meta_wayland_drag_dest_focus_in,
meta_wayland_drag_dest_focus_out,
meta_wayland_drag_dest_motion,
meta_wayland_drag_dest_drop
};
const MetaWaylandDragDestFuncs *
meta_wayland_data_device_get_drag_dest_funcs (void)
{
return &meta_wayland_drag_dest_funcs;
}
void
meta_wayland_data_device_set_dnd_source (MetaWaylandDataDevice *data_device,
MetaWaylandDataSource *source)
{
if (data_device->dnd_data_source == source)
return;
if (data_device->dnd_data_source)
g_object_remove_weak_pointer (G_OBJECT (source),
(gpointer *)&data_device->dnd_data_source);
data_device->dnd_data_source = source;
g_object_add_weak_pointer (G_OBJECT (source),
(gpointer *)&data_device->dnd_data_source);
wl_signal_emit (&data_device->dnd_ownership_signal, source);
}
void
meta_wayland_data_device_set_selection (MetaWaylandDataDevice *data_device,
MetaWaylandDataSource *source,
guint32 serial)
@@ -503,8 +767,10 @@ meta_wayland_data_device_set_selection (MetaWaylandDataDevice *data_device,
if (data_device->selection_data_source)
{
wl_data_source_send_cancelled (data_device->selection_data_source->resource);
wl_list_remove (&data_device->selection_data_source_listener.link);
meta_wayland_data_source_cancel (data_device->selection_data_source);
g_object_weak_unref (G_OBJECT (data_device->selection_data_source),
selection_data_source_destroyed,
data_device);
data_device->selection_data_source = NULL;
}
@@ -531,9 +797,12 @@ meta_wayland_data_device_set_selection (MetaWaylandDataDevice *data_device,
if (source)
{
data_device->selection_data_source_listener.notify = destroy_selection_data_source;
wl_resource_add_destroy_listener (source->resource, &data_device->selection_data_source_listener);
g_object_weak_ref (G_OBJECT (source),
selection_data_source_destroyed,
data_device);
}
wl_signal_emit (&data_device->selection_ownership_signal, source);
}
static void
@@ -545,10 +814,10 @@ data_device_set_selection (struct wl_client *client,
MetaWaylandDataDevice *data_device = wl_resource_get_user_data (resource);
MetaWaylandDataSource *source;
if (!source_resource)
return;
source = wl_resource_get_user_data (source_resource);
if (source_resource)
source = wl_resource_get_user_data (source_resource);
else
source = NULL;
/* FIXME: Store serial and check against incoming serial here. */
meta_wayland_data_device_set_selection (data_device, source, serial);
@@ -569,26 +838,21 @@ static const struct wl_data_device_interface data_device_interface = {
static void
destroy_data_source (struct wl_resource *resource)
{
MetaWaylandDataSource *source = wl_resource_get_user_data (resource);
char **p;
MetaWaylandDataSourceWayland *source = wl_resource_get_user_data (resource);
wl_array_for_each (p, &source->mime_types) free (*p);
wl_array_release (&source->mime_types);
g_slice_free (MetaWaylandDataSource, source);
source->resource = NULL;
g_object_unref (source);
}
static void
create_data_source (struct wl_client *client,
struct wl_resource *resource, guint32 id)
{
MetaWaylandDataSource *source = g_slice_new0 (MetaWaylandDataSource);
struct wl_resource *source_resource;
source->resource = wl_resource_create (client, &wl_data_source_interface, wl_resource_get_version (resource), id);
wl_resource_set_implementation (source->resource, &data_source_interface, source, destroy_data_source);
wl_array_init (&source->mime_types);
source_resource = wl_resource_create (client, &wl_data_source_interface,
wl_resource_get_version (resource), id);
meta_wayland_data_source_wayland_new (source_resource);
}
static void
@@ -632,6 +896,8 @@ void
meta_wayland_data_device_init (MetaWaylandDataDevice *data_device)
{
wl_list_init (&data_device->resource_list);
wl_signal_init (&data_device->selection_ownership_signal);
wl_signal_init (&data_device->dnd_ownership_signal);
}
void
@@ -656,6 +922,8 @@ meta_wayland_data_device_set_keyboard_focus (MetaWaylandDataDevice *data_device)
offer = meta_wayland_data_source_send_offer (source, data_device_resource);
wl_data_device_send_selection (data_device_resource, offer);
}
else
wl_data_device_send_selection (data_device_resource, NULL);
}
gboolean
@@ -683,3 +951,52 @@ meta_wayland_data_device_update_dnd_surface (MetaWaylandDataDevice *data_device)
-drag_grab->drag_surface->offset_x,
-drag_grab->drag_surface->offset_y);
}
gboolean
meta_wayland_data_source_has_mime_type (const MetaWaylandDataSource *source,
const gchar *mime_type)
{
MetaWaylandDataSourcePrivate *priv =
meta_wayland_data_source_get_instance_private (source);
gchar **p;
wl_array_for_each (p, &priv->mime_types)
{
if (g_strcmp0 (mime_type, *p) == 0)
return TRUE;
}
return FALSE;
}
static MetaWaylandDataSource *
meta_wayland_data_source_wayland_new (struct wl_resource *resource)
{
MetaWaylandDataSourceWayland *source_wayland =
g_object_new (META_TYPE_WAYLAND_DATA_SOURCE_WAYLAND, NULL);
source_wayland->resource = resource;
wl_resource_set_implementation (resource, &data_source_interface,
source_wayland, destroy_data_source);
return META_WAYLAND_DATA_SOURCE (source_wayland);
}
gboolean
meta_wayland_data_source_add_mime_type (MetaWaylandDataSource *source,
const gchar *mime_type)
{
MetaWaylandDataSourcePrivate *priv =
meta_wayland_data_source_get_instance_private (source);
gchar **pos;
pos = wl_array_add (&priv->mime_types, sizeof (*pos));
if (pos)
{
*pos = g_strdup (mime_type);
return *pos != NULL;
}
return FALSE;
}

View File

@@ -24,20 +24,44 @@
#define META_WAYLAND_DATA_DEVICE_H
#include <wayland-server.h>
#include <glib-object.h>
#include "meta-wayland-types.h"
typedef struct _MetaWaylandDragGrab MetaWaylandDragGrab;
typedef struct _MetaWaylandDataSourceFuncs MetaWaylandDataSourceFuncs;
#define META_TYPE_WAYLAND_DATA_SOURCE (meta_wayland_data_source_get_type ())
G_DECLARE_DERIVABLE_TYPE (MetaWaylandDataSource, meta_wayland_data_source,
META, WAYLAND_DATA_SOURCE, GObject);
struct _MetaWaylandDataSourceClass
{
GObjectClass parent_class;
void (* send) (MetaWaylandDataSource *source,
const gchar *mime_type,
gint fd);
void (* target) (MetaWaylandDataSource *source,
const gchar *mime_type);
void (* cancel) (MetaWaylandDataSource *source);
};
struct _MetaWaylandDataDevice
{
uint32_t selection_serial;
MetaWaylandDataSource *selection_data_source;
MetaWaylandDataSource *dnd_data_source;
struct wl_listener selection_data_source_listener;
struct wl_list resource_list;
MetaWaylandDragGrab *current_grab;
struct wl_signal selection_ownership_signal;
struct wl_signal dnd_ownership_signal;
};
GType meta_wayland_data_source_get_type (void) G_GNUC_CONST;
void meta_wayland_data_device_manager_init (MetaWaylandCompositor *compositor);
void meta_wayland_data_device_init (MetaWaylandDataDevice *data_device);
@@ -48,4 +72,45 @@ gboolean meta_wayland_data_device_is_dnd_surface (MetaWaylandDataDevice *data_de
MetaWaylandSurface *surface);
void meta_wayland_data_device_update_dnd_surface (MetaWaylandDataDevice *data_device);
void meta_wayland_data_device_set_dnd_source (MetaWaylandDataDevice *data_device,
MetaWaylandDataSource *source);
void meta_wayland_data_device_set_selection (MetaWaylandDataDevice *data_device,
MetaWaylandDataSource *source,
guint32 serial);
gboolean meta_wayland_data_source_add_mime_type (MetaWaylandDataSource *source,
const gchar *mime_type);
gboolean meta_wayland_data_source_has_mime_type (const MetaWaylandDataSource *source,
const gchar *mime_type);
struct wl_array *
meta_wayland_data_source_get_mime_types (const MetaWaylandDataSource *source);
gboolean meta_wayland_data_source_has_target (MetaWaylandDataSource *source);
void meta_wayland_data_source_set_has_target (MetaWaylandDataSource *source,
gboolean has_target);
void meta_wayland_data_source_send (MetaWaylandDataSource *source,
const gchar *mime_type,
gint fd);
const MetaWaylandDragDestFuncs *
meta_wayland_data_device_get_drag_dest_funcs (void);
void meta_wayland_data_device_start_drag (MetaWaylandDataDevice *data_device,
struct wl_client *client,
const MetaWaylandPointerGrabInterface *funcs,
MetaWaylandSurface *surface,
MetaWaylandDataSource *source,
MetaWaylandSurface *icon_surface);
void meta_wayland_data_device_end_drag (MetaWaylandDataDevice *data_device);
void meta_wayland_drag_grab_set_focus (MetaWaylandDragGrab *drag_grab,
MetaWaylandSurface *surface);
MetaWaylandSurface *
meta_wayland_drag_grab_get_focus (MetaWaylandDragGrab *drag_grab);
#endif /* META_WAYLAND_DATA_DEVICE_H */

View File

@@ -411,6 +411,11 @@ meta_wayland_xkb_info_destroy (MetaWaylandXkbInfo *xkb_info)
void
meta_wayland_keyboard_release (MetaWaylandKeyboard *keyboard)
{
MetaBackend *backend = meta_get_backend ();
g_signal_handlers_disconnect_by_func (backend, on_keymap_changed, keyboard);
g_signal_handlers_disconnect_by_func (backend, on_keymap_layout_group_changed, keyboard);
meta_wayland_keyboard_set_focus (keyboard, NULL);
meta_wayland_xkb_info_destroy (&keyboard->xkb_info);

View File

@@ -32,7 +32,7 @@
#include <string.h>
typedef struct {
MetaOutput *output;
MetaMonitorInfo *monitor_info;
struct wl_global *global;
int x, y;
enum wl_output_transform transform;
@@ -40,17 +40,6 @@ typedef struct {
GList *resources;
} MetaWaylandOutput;
/* 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 void
output_resource_destroy (struct wl_resource *res)
{
@@ -60,45 +49,6 @@ output_resource_destroy (struct wl_resource *res)
wayland_output->resources = g_list_remove (wayland_output->resources, res);
}
/* Based on code from gnome-settings-daemon */
static int
compute_scale (MetaOutput *output)
{
int scale = 1;
/* Scaling makes no sense */
if (output->crtc->rect.width < HIDPI_MIN_HEIGHT)
goto out;
/* 4K TV */
if (output->name != NULL && strstr(output->name, "HDMI") != NULL &&
output->crtc->rect.width >= SMALLEST_4K_WIDTH)
goto out;
/* Somebody encoded the aspect ratio (16/9 or 16/10)
* instead of the physical size */
if ((output->width_mm == 160 && output->height_mm == 90) ||
(output->width_mm == 160 && output->height_mm == 100) ||
(output->width_mm == 16 && output->height_mm == 9) ||
(output->width_mm == 16 && output->height_mm == 10))
goto out;
if (output->width_mm > 0 && output->height_mm > 0)
{
double dpi_x, dpi_y;
dpi_x = (double)output->crtc->rect.width / (output->width_mm / 25.4);
dpi_y = (double)output->crtc->rect.height / (output->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 void
bind_output (struct wl_client *client,
void *data,
@@ -106,9 +56,10 @@ bind_output (struct wl_client *client,
guint32 id)
{
MetaWaylandOutput *wayland_output = data;
MetaOutput *output = wayland_output->output;
MetaMonitorInfo *monitor_info = wayland_output->monitor_info;
struct wl_resource *resource;
guint mode_flags;
MetaOutput *output = monitor_info->outputs[0];
resource = wl_resource_create (client, &wl_output_interface, version, id);
wayland_output->resources = g_list_prepend (wayland_output->resources, resource);
@@ -116,17 +67,17 @@ bind_output (struct wl_client *client,
wl_resource_set_user_data (resource, wayland_output);
wl_resource_set_destructor (resource, output_resource_destroy);
meta_verbose ("Binding output %p/%s (%u, %u, %u, %u) x %f\n",
output, output->name,
output->crtc->rect.x, output->crtc->rect.y,
output->crtc->rect.width, output->crtc->rect.height,
output->crtc->current_mode->refresh_rate);
meta_verbose ("Binding monitor %p/%s (%u, %u, %u, %u) x %f\n",
monitor_info, output->name,
monitor_info->rect.x, monitor_info->rect.y,
monitor_info->rect.width, monitor_info->rect.height,
monitor_info->refresh_rate);
wl_output_send_geometry (resource,
(int)output->crtc->rect.x,
(int)output->crtc->rect.y,
output->width_mm,
output->height_mm,
(int)monitor_info->rect.x,
(int)monitor_info->rect.y,
monitor_info->width_mm,
monitor_info->height_mm,
/* Cogl values reflect XRandR values,
and so does wayland */
output->subpixel_order,
@@ -142,11 +93,10 @@ bind_output (struct wl_client *client,
wl_output_send_mode (resource,
mode_flags,
(int)output->crtc->current_mode->width,
(int)output->crtc->current_mode->height,
(int)output->crtc->current_mode->refresh_rate);
(int)monitor_info->rect.width,
(int)monitor_info->rect.height,
(int)monitor_info->refresh_rate);
output->scale = compute_scale (output);
if (version >= WL_OUTPUT_SCALE_SINCE_VERSION)
wl_output_send_scale (resource, output->scale);
@@ -179,14 +129,13 @@ wl_output_transform_from_meta_monitor_transform (MetaMonitorTransform transform)
static void
wayland_output_update_for_output (MetaWaylandOutput *wayland_output,
MetaOutput *output)
MetaMonitorInfo *monitor_info)
{
GList *iter;
guint mode_flags;
MetaOutput *output = monitor_info->outputs[0];
enum wl_output_transform wl_transform = wl_output_transform_from_meta_monitor_transform (output->crtc->transform);
g_assert (output->crtc->current_mode != NULL);
mode_flags = WL_OUTPUT_MODE_CURRENT;
if (output->crtc->current_mode == output->preferred_mode)
mode_flags |= WL_OUTPUT_MODE_PREFERRED;
@@ -195,35 +144,33 @@ wayland_output_update_for_output (MetaWaylandOutput *wayland_output,
{
struct wl_resource *resource = iter->data;
if (wayland_output->x != output->crtc->rect.x ||
wayland_output->y != output->crtc->rect.y ||
if (wayland_output->x != monitor_info->rect.x ||
wayland_output->y != monitor_info->rect.y ||
wayland_output->transform != wl_transform)
{
wl_resource_post_event (resource,
WL_OUTPUT_GEOMETRY,
(int)output->crtc->rect.x,
(int)output->crtc->rect.y,
output->width_mm,
output->height_mm,
output->subpixel_order,
output->vendor,
output->product,
wl_transform);
wl_output_send_geometry (resource,
(int)monitor_info->rect.x,
(int)monitor_info->rect.y,
monitor_info->width_mm,
monitor_info->height_mm,
output->subpixel_order,
output->vendor,
output->product,
wl_transform);
}
wl_resource_post_event (resource,
WL_OUTPUT_MODE,
mode_flags,
(int)output->crtc->current_mode->width,
(int)output->crtc->current_mode->height,
(int)output->crtc->current_mode->refresh_rate);
wl_output_send_mode (resource,
mode_flags,
(int)monitor_info->rect.width,
(int)monitor_info->rect.height,
(int)monitor_info->refresh_rate);
}
/* It's very important that we change the output pointer here, as
the old structure is about to be freed by MetaMonitorManager */
wayland_output->output = output;
wayland_output->x = output->crtc->rect.x;
wayland_output->y = output->crtc->rect.y;
wayland_output->monitor_info = monitor_info;
wayland_output->x = monitor_info->rect.x;
wayland_output->y = monitor_info->rect.y;
wayland_output->transform = wl_transform;
}
@@ -231,30 +178,26 @@ static GHashTable *
meta_wayland_compositor_update_outputs (MetaWaylandCompositor *compositor,
MetaMonitorManager *monitors)
{
MetaOutput *outputs;
unsigned int i, n_outputs;
unsigned int i;
GHashTable *new_table;
MetaMonitorInfo *monitor_infos;
unsigned int n_monitor_infos;
outputs = meta_monitor_manager_get_outputs (monitors, &n_outputs);
monitor_infos = meta_monitor_manager_get_monitor_infos (monitors, &n_monitor_infos);
new_table = g_hash_table_new_full (NULL, NULL, NULL, wayland_output_destroy_notify);
for (i = 0; i < n_outputs; i++)
for (i = 0; i < n_monitor_infos; i++)
{
MetaOutput *output = &outputs[i];
MetaMonitorInfo *info = &monitor_infos[i];
MetaWaylandOutput *wayland_output;
/* wayland does not expose disabled outputs */
if (output->crtc == NULL)
{
g_hash_table_remove (compositor->outputs, GSIZE_TO_POINTER (output->winsys_id));
continue;
}
wayland_output = g_hash_table_lookup (compositor->outputs, GSIZE_TO_POINTER (output->winsys_id));
if (info->winsys_id == 0)
continue;
wayland_output = g_hash_table_lookup (compositor->outputs, GSIZE_TO_POINTER (info->winsys_id));
if (wayland_output)
{
g_hash_table_steal (compositor->outputs, GSIZE_TO_POINTER (output->winsys_id));
g_hash_table_steal (compositor->outputs, GSIZE_TO_POINTER (info->winsys_id));
}
else
{
@@ -265,8 +208,8 @@ meta_wayland_compositor_update_outputs (MetaWaylandCompositor *compositor,
wayland_output, bind_output);
}
wayland_output_update_for_output (wayland_output, output);
g_hash_table_insert (new_table, GSIZE_TO_POINTER (output->winsys_id), wayland_output);
wayland_output_update_for_output (wayland_output, info);
g_hash_table_insert (new_table, GSIZE_TO_POINTER (info->winsys_id), wayland_output);
}
g_hash_table_destroy (compositor->outputs);

View File

@@ -339,8 +339,6 @@ handle_button_event (MetaWaylandPointer *pointer,
{
gboolean implicit_grab;
notify_motion (pointer, event);
implicit_grab = (event->type == CLUTTER_BUTTON_PRESS) && (pointer->button_count == 1);
if (implicit_grab)
{
@@ -363,8 +361,6 @@ handle_scroll_event (MetaWaylandPointer *pointer,
struct wl_list *l;
wl_fixed_t x_value = 0, y_value = 0;
notify_motion (pointer, event);
if (clutter_event_is_pointer_emulated (event))
return;

View File

@@ -33,16 +33,19 @@
#include "meta-wayland-surface.h"
#include "meta-wayland-seat.h"
typedef struct _MetaXWaylandSelection MetaXWaylandSelection;
typedef struct
{
struct wl_list link;
struct wl_resource *resource;
MetaWaylandSurface *surface;
} MetaWaylandFrameCallback;
typedef struct
{
int display_index;
char *lockfile;
char *lock_file;
int abstract_fd;
int unix_fd;
pid_t pid;
@@ -51,6 +54,8 @@ typedef struct
char *display_name;
GMainLoop *init_loop;
MetaXWaylandSelection *selection_data;
} MetaXWaylandManager;
struct _MetaWaylandCompositor

View File

@@ -46,10 +46,13 @@
#include "meta-cursor-tracker-private.h"
#include "display-private.h"
#include "window-private.h"
#include "window-wayland.h"
#include "meta-window-wayland.h"
#include "compositor/region-utils.h"
#include "meta-surface-actor.h"
#include "meta-surface-actor-wayland.h"
#include "meta-xwayland-private.h"
typedef enum
{
@@ -119,36 +122,48 @@ static void
surface_process_damage (MetaWaylandSurface *surface,
cairo_region_t *region)
{
cairo_rectangle_int_t buffer_rect;
int scale = surface->scale;
unsigned int buffer_width;
unsigned int buffer_height;
cairo_rectangle_int_t surface_rect;
cairo_region_t *scaled_region;
int i, n_rectangles;
if (!surface->buffer)
return;
buffer_rect.x = 0;
buffer_rect.y = 0;
buffer_rect.width = cogl_texture_get_width (surface->buffer->texture);
buffer_rect.height = cogl_texture_get_height (surface->buffer->texture);
/* Intersect the damage region with the surface region before scaling in
* order to avoid integer overflow when scaling a damage region is too large
* (for example INT32_MAX which mesa passes). */
buffer_width = cogl_texture_get_width (surface->buffer->texture);
buffer_height = cogl_texture_get_height (surface->buffer->texture);
surface_rect = (cairo_rectangle_int_t) {
.width = buffer_width / surface->scale,
.height = buffer_height / surface->scale,
};
cairo_region_intersect_rectangle (region, &surface_rect);
/* The region will get destroyed after this call anyway so we can
* just modify it here to avoid a copy. */
cairo_region_intersect_rectangle (region, &buffer_rect);
/* The damage region must be in the same coordinate space as the buffer,
* i.e. scaled with surface->scale. */
scaled_region = meta_region_scale (region, surface->scale);
/* First update the buffer. */
meta_wayland_buffer_process_damage (surface->buffer, region);
meta_wayland_buffer_process_damage (surface->buffer, scaled_region);
/* Now damage the actor. */
/* Now damage the actor. The actor expects damage in the unscaled texture
* coordinate space, i.e. same as the buffer. */
/* XXX: Should this be a signal / callback on MetaWaylandBuffer instead? */
n_rectangles = cairo_region_num_rectangles (region);
n_rectangles = cairo_region_num_rectangles (scaled_region);
for (i = 0; i < n_rectangles; i++)
{
cairo_rectangle_int_t rect;
cairo_region_get_rectangle (region, i, &rect);
cairo_region_get_rectangle (scaled_region, i, &rect);
meta_surface_actor_process_damage (surface->surface_actor,
rect.x * scale, rect.y * scale, rect.width * scale, rect.height * scale);
rect.x, rect.y,
rect.width, rect.height);
}
cairo_region_destroy (scaled_region);
}
static void
@@ -201,19 +216,52 @@ calculate_surface_window_geometry (MetaWaylandSurface *surface,
}
}
static void
destroy_window (MetaWaylandSurface *surface)
{
if (surface->window)
{
MetaDisplay *display = meta_get_display ();
guint32 timestamp = meta_display_get_current_time_roundtrip (display);
meta_window_unmanage (surface->window, timestamp);
}
g_assert (surface->window == NULL);
}
static void
toplevel_surface_commit (MetaWaylandSurface *surface,
MetaWaylandPendingState *pending)
{
MetaWindow *window = surface->window;
/* Sanity check. */
if (surface->buffer == NULL)
if (surface->role == META_WAYLAND_SURFACE_ROLE_WL_SHELL_SURFACE)
{
wl_resource_post_error (surface->resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
"Cannot commit a NULL buffer to an xdg_surface");
return;
/* For wl_shell, it's equivalent to an unmap. Semantics
* are poorly defined, so we can choose some that are
* convenient for us. */
if (surface->buffer && !window)
{
window = meta_window_wayland_new (meta_get_display (), surface);
meta_wayland_surface_set_window (surface, window);
}
else if (surface->buffer == NULL && window)
{
destroy_window (surface);
return;
}
}
else
{
if (surface->buffer == NULL)
{
/* XDG surfaces can't commit NULL buffers */
wl_resource_post_error (surface->resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
"Cannot commit a NULL buffer to an xdg_surface");
return;
}
}
/* We resize X based surfaces according to X events */
@@ -347,65 +395,100 @@ subsurface_surface_commit (MetaWaylandSurface *surface,
clutter_actor_set_position (CLUTTER_ACTOR (surface_actor), x, y);
}
static void
subsurface_parent_surface_committed (MetaWaylandSurface *surface);
static void
parent_surface_committed (gpointer data, gpointer user_data)
/* A non-subsurface is always desynchronized.
*
* A subsurface is effectively synchronized if either its parent is
* synchronized or itself is in synchronized mode. */
static gboolean
is_surface_effectively_synchronized (MetaWaylandSurface *surface)
{
subsurface_parent_surface_committed (data);
if (surface->wl_subsurface == NULL)
{
return FALSE;
}
else
{
if (surface->sub.synchronous)
return TRUE;
else
return is_surface_effectively_synchronized (surface->sub.parent);
}
}
static cairo_region_t*
scale_region (cairo_region_t *region, int scale)
static void
apply_pending_state (MetaWaylandSurface *surface,
MetaWaylandPendingState *pending);
static void
parent_surface_state_applied (gpointer data, gpointer user_data)
{
int n_rects, i;
cairo_rectangle_int_t *rects;
cairo_region_t *scaled_region;
MetaWaylandSurface *surface = data;
if (scale == 1)
return region;
n_rects = cairo_region_num_rectangles (region);
rects = g_malloc (sizeof(cairo_rectangle_int_t) * n_rects);
for (i = 0; i < n_rects; i++)
if (surface->sub.pending_pos)
{
cairo_region_get_rectangle (region, i, &rects[i]);
rects[i].x *= scale;
rects[i].y *= scale;
rects[i].width *= scale;
rects[i].height *= scale;
clutter_actor_set_position (CLUTTER_ACTOR (surface->surface_actor),
surface->sub.pending_x,
surface->sub.pending_y);
surface->sub.pending_pos = FALSE;
}
scaled_region = cairo_region_create_rectangles (rects, n_rects);
if (surface->sub.pending_placement_ops)
{
GSList *it;
for (it = surface->sub.pending_placement_ops; it; it = it->next)
{
MetaWaylandSubsurfacePlacementOp *op = it->data;
ClutterActor *surface_actor;
ClutterActor *parent_actor;
ClutterActor *sibling_actor;
g_free (rects);
cairo_region_destroy (region);
if (!op->sibling)
{
g_slice_free (MetaWaylandSubsurfacePlacementOp, op);
continue;
}
return scaled_region;
surface_actor = CLUTTER_ACTOR (surface->surface_actor);
parent_actor = clutter_actor_get_parent (CLUTTER_ACTOR (surface->sub.parent));
sibling_actor = CLUTTER_ACTOR (op->sibling->surface_actor);
switch (op->placement)
{
case META_WAYLAND_SUBSURFACE_PLACEMENT_ABOVE:
clutter_actor_set_child_above_sibling (parent_actor,
surface_actor,
sibling_actor);
break;
case META_WAYLAND_SUBSURFACE_PLACEMENT_BELOW:
clutter_actor_set_child_below_sibling (parent_actor,
surface_actor,
sibling_actor);
break;
}
wl_list_remove (&op->sibling_destroy_listener.link);
g_slice_free (MetaWaylandSubsurfacePlacementOp, op);
}
g_slist_free (surface->sub.pending_placement_ops);
surface->sub.pending_placement_ops = NULL;
}
if (is_surface_effectively_synchronized (surface))
apply_pending_state (surface, &surface->sub.pending);
}
static void
commit_pending_state (MetaWaylandSurface *surface,
MetaWaylandPendingState *pending)
apply_pending_state (MetaWaylandSurface *surface,
MetaWaylandPendingState *pending)
{
MetaWaylandCompositor *compositor = surface->compositor;
/* If this surface is a subsurface in in synchronous mode, commit
* has a special-case and should not apply the pending state immediately.
*
* Instead, we move it to another pending state, which will be
* actually committed when the parent commits.
*/
if (surface->sub.synchronous)
{
move_pending_state (pending, &surface->sub.pending);
return;
}
if (pending->newly_attached)
{
if (!surface->buffer && surface->window)
meta_window_queue (surface->window, META_QUEUE_CALC_SHOWING);
surface_set_buffer (surface, pending->buffer);
if (pending->buffer)
@@ -426,18 +509,20 @@ commit_pending_state (MetaWaylandSurface *surface,
if (pending->opaque_region)
{
pending->opaque_region = scale_region (pending->opaque_region, surface->scale);
meta_surface_actor_set_opaque_region (surface->surface_actor, pending->opaque_region);
}
if (pending->input_region)
{
pending->input_region = scale_region (pending->input_region,
meta_surface_actor_wayland_get_scale (META_SURFACE_ACTOR_WAYLAND (surface->surface_actor)));
meta_surface_actor_set_input_region (surface->surface_actor, pending->input_region);
if (surface->opaque_region)
cairo_region_destroy (surface->opaque_region);
surface->opaque_region = cairo_region_reference (pending->opaque_region);
}
/* scale surface texture */
meta_surface_actor_wayland_scale_texture (META_SURFACE_ACTOR_WAYLAND (surface->surface_actor));
if (pending->input_region)
{
if (surface->input_region)
cairo_region_destroy (surface->input_region);
surface->input_region = cairo_region_reference (pending->input_region);
}
meta_surface_actor_wayland_sync_state (
META_SURFACE_ACTOR_WAYLAND (surface->surface_actor));
/* wl_surface.frame */
wl_list_insert_list (&compositor->frame_callbacks, &pending->frame_callback_list);
@@ -452,15 +537,26 @@ commit_pending_state (MetaWaylandSurface *surface,
else if (surface->wl_subsurface)
subsurface_surface_commit (surface, pending);
g_list_foreach (surface->subsurfaces, parent_surface_committed, NULL);
pending_state_reset (pending);
g_list_foreach (surface->subsurfaces, parent_surface_state_applied, NULL);
}
static void
meta_wayland_surface_commit (MetaWaylandSurface *surface)
{
commit_pending_state (surface, &surface->pending);
/*
* If this is a sub-surface and it is in effective synchronous mode, only
* cache the pending surface state until either one of the following two
* scenarios happens:
* 1) Its parent surface gets its state applied.
* 2) Its mode changes from synchronized to desynchronized and its parent
* surface is in effective desynchronized mode.
*/
if (is_surface_effectively_synchronized (surface))
move_pending_state (&surface->pending, &surface->sub.pending);
else
apply_pending_state (surface, &surface->pending);
}
static void
@@ -543,6 +639,7 @@ wl_surface_frame (struct wl_client *client,
return;
callback = g_slice_new0 (MetaWaylandFrameCallback);
callback->surface = surface;
callback->resource = wl_resource_create (client, &wl_callback_interface, META_WL_CALLBACK_VERSION, callback_id);
wl_resource_set_implementation (callback->resource, NULL, callback, destroy_frame_callback);
@@ -655,26 +752,23 @@ sync_reactive (MetaWaylandSurface *surface)
surface_should_be_reactive (surface));
}
static void
sync_drag_dest_funcs (MetaWaylandSurface *surface)
{
if (surface->window &&
surface->window->client_type == META_WINDOW_CLIENT_TYPE_X11)
surface->dnd.funcs = meta_xwayland_selection_get_drag_dest_funcs ();
else
surface->dnd.funcs = meta_wayland_data_device_get_drag_dest_funcs ();
}
void
meta_wayland_surface_set_window (MetaWaylandSurface *surface,
MetaWindow *window)
{
surface->window = window;
sync_reactive (surface);
}
static void
destroy_window (MetaWaylandSurface *surface)
{
if (surface->window)
{
MetaDisplay *display = meta_get_display ();
guint32 timestamp = meta_display_get_current_time_roundtrip (display);
meta_window_unmanage (surface->window, timestamp);
}
g_assert (surface->window == NULL);
sync_drag_dest_funcs (surface);
}
static void
@@ -692,10 +786,29 @@ wl_surface_destructor (struct wl_resource *resource)
surface_set_buffer (surface, NULL);
pending_state_destroy (&surface->pending);
if (surface->opaque_region)
cairo_region_destroy (surface->opaque_region);
if (surface->input_region)
cairo_region_destroy (surface->input_region);
g_object_unref (surface->surface_actor);
meta_wayland_compositor_destroy_frame_callbacks (compositor, surface);
if (surface->resource)
wl_resource_set_user_data (surface->resource, NULL);
if (surface->xdg_surface)
wl_resource_destroy (surface->xdg_surface);
if (surface->xdg_popup)
wl_resource_destroy (surface->xdg_popup);
if (surface->wl_subsurface)
wl_resource_destroy (surface->wl_subsurface);
if (surface->wl_shell_surface)
wl_resource_destroy (surface->wl_shell_surface);
if (surface->gtk_surface)
wl_resource_destroy (surface->gtk_surface);
g_slice_free (MetaWaylandSurface, surface);
meta_wayland_compositor_repick (compositor);
@@ -718,6 +831,8 @@ meta_wayland_surface_create (MetaWaylandCompositor *compositor,
surface->buffer_destroy_listener.notify = surface_handle_buffer_destroy;
surface->surface_actor = g_object_ref_sink (meta_surface_actor_wayland_new (surface));
sync_drag_dest_funcs (surface);
pending_state_init (&surface->pending);
return surface;
}
@@ -754,6 +869,8 @@ xdg_surface_destructor (struct wl_resource *resource)
{
MetaWaylandSurface *surface = wl_resource_get_user_data (resource);
meta_wayland_compositor_destroy_frame_callbacks (surface->compositor,
surface);
destroy_window (surface);
surface->xdg_surface = NULL;
}
@@ -1021,6 +1138,14 @@ xdg_popup_destructor (struct wl_resource *resource)
{
MetaWaylandSurface *surface = wl_resource_get_user_data (resource);
meta_wayland_compositor_destroy_frame_callbacks (surface->compositor,
surface);
if (surface->popup.parent)
{
wl_list_remove (&surface->popup.parent_destroy_listener.link);
surface->popup.parent = NULL;
}
if (surface->popup.popup)
meta_wayland_popup_dismiss (surface->popup.popup);
@@ -1038,6 +1163,20 @@ static const struct xdg_popup_interface meta_wayland_xdg_popup_interface = {
xdg_popup_destroy,
};
static void
handle_popup_parent_destroyed (struct wl_listener *listener, void *data)
{
MetaWaylandSurface *surface =
wl_container_of (listener, surface, popup.parent_destroy_listener);
wl_resource_post_error (surface->xdg_popup,
XDG_POPUP_ERROR_NOT_THE_TOPMOST_POPUP,
"destroyed popup not top most popup");
surface->popup.parent = NULL;
destroy_window (surface);
}
static void
handle_popup_destroyed (struct wl_listener *listener, void *data)
{
@@ -1130,14 +1269,17 @@ xdg_shell_get_xdg_popup (struct wl_client *client,
surface->xdg_popup = popup_resource;
surface->xdg_shell_resource = resource;
surface->popup.parent = parent_surf;
surface->popup.parent_destroy_listener.notify = handle_popup_parent_destroyed;
wl_resource_add_destroy_listener (parent_surf->resource,
&surface->popup.parent_destroy_listener);
window = meta_window_wayland_new (display, surface);
meta_window_move_frame (window, FALSE,
parent_surf->window->rect.x + x,
parent_surf->window->rect.y + y);
parent_surf->window->buffer_rect.x + x,
parent_surf->window->buffer_rect.y + y);
window->showing_for_first_time = FALSE;
window->placed = TRUE;
meta_window_set_transient_for (window, parent_surf->window);
meta_window_set_type (window, META_WINDOW_DROPDOWN_MENU);
meta_wayland_surface_set_window (surface, window);
@@ -1186,6 +1328,8 @@ wl_shell_surface_destructor (struct wl_resource *resource)
{
MetaWaylandSurface *surface = wl_resource_get_user_data (resource);
meta_wayland_compositor_destroy_frame_callbacks (surface->compositor,
surface);
surface->wl_shell_surface = NULL;
}
@@ -1446,14 +1590,14 @@ gtk_surface_destructor (struct wl_resource *resource)
}
static void
set_dbus_properties (struct wl_client *client,
struct wl_resource *resource,
const char *application_id,
const char *app_menu_path,
const char *menubar_path,
const char *window_object_path,
const char *application_object_path,
const char *unique_bus_name)
gtk_surface_set_dbus_properties (struct wl_client *client,
struct wl_resource *resource,
const char *application_id,
const char *app_menu_path,
const char *menubar_path,
const char *window_object_path,
const char *application_object_path,
const char *unique_bus_name)
{
MetaWaylandSurface *surface = wl_resource_get_user_data (resource);
@@ -1473,8 +1617,36 @@ set_dbus_properties (struct wl_client *client,
window_object_path);
}
static void
gtk_surface_set_modal (struct wl_client *client,
struct wl_resource *resource)
{
MetaWaylandSurface *surface = wl_resource_get_user_data (resource);
if (surface->is_modal)
return;
surface->is_modal = TRUE;
meta_window_set_type (surface->window, META_WINDOW_MODAL_DIALOG);
}
static void
gtk_surface_unset_modal (struct wl_client *client,
struct wl_resource *resource)
{
MetaWaylandSurface *surface = wl_resource_get_user_data (resource);
if (!surface->is_modal)
return;
surface->is_modal = FALSE;
meta_window_set_type (surface->window, META_WINDOW_NORMAL);
}
static const struct gtk_surface_interface meta_wayland_gtk_surface_interface = {
set_dbus_properties
gtk_surface_set_dbus_properties,
gtk_surface_set_modal,
gtk_surface_unset_modal,
};
static void
@@ -1511,6 +1683,17 @@ bind_gtk_shell (struct wl_client *client,
uint32_t capabilities = 0;
resource = wl_resource_create (client, &gtk_shell_interface, version, id);
if (version != META_GTK_SHELL_VERSION)
{
wl_resource_post_error (resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
"Incompatible gtk-shell version "
"(supported version: %d)",
META_GTK_SHELL_VERSION);
return;
}
wl_resource_set_implementation (resource, &meta_wayland_gtk_shell_interface, data, NULL);
if (!meta_prefs_get_show_fallback_app_menu ())
@@ -1519,59 +1702,6 @@ bind_gtk_shell (struct wl_client *client,
gtk_shell_send_capabilities (resource, capabilities);
}
static void
subsurface_parent_surface_committed (MetaWaylandSurface *surface)
{
if (surface->sub.pending_pos)
{
clutter_actor_set_position (CLUTTER_ACTOR (surface->surface_actor),
surface->sub.pending_x,
surface->sub.pending_y);
surface->sub.pending_pos = FALSE;
}
if (surface->sub.pending_placement_ops)
{
GSList *it;
for (it = surface->sub.pending_placement_ops; it; it = it->next)
{
MetaWaylandSubsurfacePlacementOp *op = it->data;
ClutterActor *surface_actor;
ClutterActor *parent_actor;
ClutterActor *sibling_actor;
if (!op->sibling)
{
g_slice_free (MetaWaylandSubsurfacePlacementOp, op);
continue;
}
surface_actor = CLUTTER_ACTOR (surface->surface_actor);
parent_actor = clutter_actor_get_parent (CLUTTER_ACTOR (surface->sub.parent));
sibling_actor = CLUTTER_ACTOR (op->sibling->surface_actor);
switch (op->placement)
{
case META_WAYLAND_SUBSURFACE_PLACEMENT_ABOVE:
clutter_actor_set_child_above_sibling (parent_actor, surface_actor, sibling_actor);
break;
case META_WAYLAND_SUBSURFACE_PLACEMENT_BELOW:
clutter_actor_set_child_below_sibling (parent_actor, surface_actor, sibling_actor);
break;
}
wl_list_remove (&op->sibling_destroy_listener.link);
g_slice_free (MetaWaylandSubsurfacePlacementOp, op);
}
g_slist_free (surface->sub.pending_placement_ops);
surface->sub.pending_placement_ops = NULL;
}
if (surface->sub.synchronous)
commit_pending_state (surface, &surface->sub.pending);
}
static void
unparent_actor (MetaWaylandSurface *surface)
{
@@ -1585,6 +1715,8 @@ wl_subsurface_destructor (struct wl_resource *resource)
{
MetaWaylandSurface *surface = wl_resource_get_user_data (resource);
meta_wayland_compositor_destroy_frame_callbacks (surface->compositor,
surface);
if (surface->sub.parent)
{
wl_list_remove (&surface->sub.parent_destroy_listener.link);
@@ -1714,11 +1846,13 @@ wl_subsurface_set_desync (struct wl_client *client,
struct wl_resource *resource)
{
MetaWaylandSurface *surface = wl_resource_get_user_data (resource);
gboolean was_effectively_synchronized;
if (surface->sub.synchronous)
subsurface_parent_surface_committed (surface);
was_effectively_synchronized = is_surface_effectively_synchronized (surface);
surface->sub.synchronous = FALSE;
if (was_effectively_synchronized &&
!is_surface_effectively_synchronized (surface))
apply_pending_state (surface, &surface->sub.pending);
}
static const struct wl_subsurface_interface meta_wayland_wl_subsurface_interface = {
@@ -1930,3 +2064,41 @@ meta_wayland_surface_popup_done (MetaWaylandSurface *surface)
else if (surface->wl_shell_surface)
wl_shell_surface_send_popup_done (surface->wl_shell_surface);
}
void
meta_wayland_surface_drag_dest_focus_in (MetaWaylandSurface *surface,
MetaWaylandDataOffer *offer)
{
MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
MetaWaylandDataDevice *data_device = &compositor->seat->data_device;
surface->dnd.funcs->focus_in (data_device, surface, offer);
}
void
meta_wayland_surface_drag_dest_motion (MetaWaylandSurface *surface,
const ClutterEvent *event)
{
MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
MetaWaylandDataDevice *data_device = &compositor->seat->data_device;
surface->dnd.funcs->motion (data_device, surface, event);
}
void
meta_wayland_surface_drag_dest_focus_out (MetaWaylandSurface *surface)
{
MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
MetaWaylandDataDevice *data_device = &compositor->seat->data_device;
surface->dnd.funcs->focus_out (data_device, surface);
}
void
meta_wayland_surface_drag_dest_drop (MetaWaylandSurface *surface)
{
MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
MetaWaylandDataDevice *data_device = &compositor->seat->data_device;
surface->dnd.funcs->drop (data_device, surface);
}

View File

@@ -71,6 +71,20 @@ typedef struct
gboolean has_new_geometry;
} MetaWaylandPendingState;
struct _MetaWaylandDragDestFuncs
{
void (* focus_in) (MetaWaylandDataDevice *data_device,
MetaWaylandSurface *surface,
MetaWaylandDataOffer *offer);
void (* focus_out) (MetaWaylandDataDevice *data_device,
MetaWaylandSurface *surface);
void (* motion) (MetaWaylandDataDevice *data_device,
MetaWaylandSurface *surface,
const ClutterEvent *event);
void (* drop) (MetaWaylandDataDevice *data_device,
MetaWaylandSurface *surface);
};
struct _MetaWaylandSurface
{
/* Generic stuff */
@@ -81,10 +95,16 @@ struct _MetaWaylandSurface
MetaWindow *window;
MetaWaylandBuffer *buffer;
struct wl_listener buffer_destroy_listener;
cairo_region_t *input_region;
cairo_region_t *opaque_region;
int scale;
int32_t offset_x, offset_y;
GList *subsurfaces;
struct {
const MetaWaylandDragDestFuncs *funcs;
} dnd;
/* All the pending state that wl_surface.commit will apply. */
MetaWaylandPendingState pending;
@@ -99,11 +119,15 @@ struct _MetaWaylandSurface
struct wl_resource *xdg_shell_resource;
MetaWaylandSerial acked_configure_serial;
gboolean has_set_geometry;
gboolean is_modal;
/* xdg_popup */
struct {
MetaWaylandPopup *popup;
struct wl_listener destroy_listener;
MetaWaylandSurface *parent;
struct wl_listener parent_destroy_listener;
MetaWaylandPopup *popup;
struct wl_listener destroy_listener;
} popup;
/* wl_subsurface stuff. */
@@ -155,4 +179,12 @@ void meta_wayland_surface_delete (MetaWaylandSurface *surface);
void meta_wayland_surface_popup_done (MetaWaylandSurface *surface);
/* Drag dest functions */
void meta_wayland_surface_drag_dest_focus_in (MetaWaylandSurface *surface,
MetaWaylandDataOffer *offer);
void meta_wayland_surface_drag_dest_motion (MetaWaylandSurface *surface,
const ClutterEvent *event);
void meta_wayland_surface_drag_dest_focus_out (MetaWaylandSurface *surface);
void meta_wayland_surface_drag_dest_drop (MetaWaylandSurface *surface);
#endif

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