Compare commits

..

115 Commits

Author SHA1 Message Date
Neil Roberts
ef00e3fc0b wayland: Use an event filter instead of the captured event signal
In order to see all Clutter events, Mutter was previously installing a
signal handler on the ‘captured-event’ signal on the stage and
additionally using a signal emission hook to cope with grabs. This
changes it to use the new clutter_event_add_filter API so that we can
avoid the signal emission hook hack.
2013-09-05 12:19:58 +01:00
Neil Roberts
e0df9eee28 wayland: Remove the motion event synthesizing
The event handling code for Wayland no longer needs to synthesize X
events for the motion events because the main display code now handles
motion events directly off of the Clutter events instead of off the X
events.
2013-09-05 12:14:05 +01:00
Neil Roberts
4492845528 Move the motion event handling code to work in terms of Clutter events
There is now a meta_display_handle_event alongside the
meta_display_handle_xevent function which handles events in terms of
Clutter events instead of X events. A Clutter event filter is
registered so that all Clutter events will pass through this function.
The motion event handling code from the X event version has been moved
into this new function and has been modified to use the details from
the Clutter event instead of the X event. This is a step towards
moving all of the code over and finally removing the
meta_display_handle_xevent function.
2013-09-04 15:40:42 +01:00
Neil Roberts
c334fd5288 Rename meta_display_handle_event to meta_display_handle_xevent
The plan is to make a new version of meta_display_handle_event that
will accept Clutter events instead of X events and then gradually move
over the events to the new function and finally remove the X version.
2013-09-04 15:39:23 +01:00
Giovanni Campagna
83f61daf95 wayland: sync the keymap from X to wayland
When X clients change the keyboard map, the also update a property
on the root window. We can notice that and rebuild our data structures
with the new values, as well as inform the wayland clients.

This is a terrible hack, and it's not how we want to implement things
in 3.12, but it's enough to have the same keyboard layout in the
shell, in X clients and in wayland clients in 3.10, until we decide
on the fate of the keyboard g-s-d plugin.

https://bugzilla.gnome.org/show_bug.cgi?id=707446
2013-09-04 15:16:51 +02:00
Giovanni Campagna
a474608954 wayland: reimplement keyboard state handling properly
We can't rely on clutter's xkb_state, because that's updated
when events are pulled from the kernel, not when we see them.
Instead, use the new clutter API to get the full modifier state
from the event (which, as a side effect, also works when clutter
is using the X11 backend for running nested).

https://bugzilla.gnome.org/show_bug.cgi?id=706963
2013-09-04 15:16:51 +02:00
Giovanni Campagna
67457dc25c wayland: implement global and window keybindings
Synthetize XInput events from ClutterEvents in MetaWaylandKeyboard,
and pass them to the keybindings infrastructure for early handling,
so that we can activate them even if the currently focused window
is not an X11 one (or if there is no focused window, or we're
modal)

https://bugzilla.gnome.org/show_bug.cgi?id=706963
2013-09-04 15:15:56 +02:00
Giovanni Campagna
9cff36bf30 wayland: implement resizing and maximization for wayland clients
To properly resize clients, we need to send them configure events
with the size we computed from the constraint system.
Also, once the sizing is properly wired up, we need to make
sure that the size at the initial map is correct, and not
always 0, 0 (because the buffer is not yet converted into
a CoglTexture by MetaShapedTexture), otherwise we end up sending
out configure events at 1 x 1. To do so, we cache the surface
type in the initial state until the first commit.

Note that this does not handle interactive resizing yet, it
merely makes the API calls work for wayland clients.

While we're there, let's implement transient hints too.
(I may have to separate this out...)

https://bugzilla.gnome.org/show_bug.cgi?id=707401
2013-09-04 15:13:31 +02:00
Giovanni Campagna
8708d038be wayland: die when gnome-session asks us to
At logout, we want to die when gnome-session tells us. Previously,
we were relying on the X server going down (killed by GDM at the
end of the session), but we can't use that in wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=706421
2013-09-04 15:13:11 +02:00
Giovanni Campagna
f59d92a246 wayland: don't require Clutter backend variables to be set from outside
When running under mutter-launch, we can assume we're running on
bare metal, and set the clutter backend appropriately.

https://bugzilla.gnome.org/show_bug.cgi?id=706421
2013-09-04 15:13:11 +02:00
Giovanni Campagna
b7983201d7 Stop messing with process groups
We can be launched by gnome-session now, which implies gdb must be
attached from outside, and the Ctrl-C problem is gone.

https://bugzilla.gnome.org/show_bug.cgi?id=706421
2013-09-04 15:13:11 +02:00
Giovanni Campagna
99a6a1f881 Set DISPLAY and WAYLAND_DISPLAY for dbus activated services and for autostarted apps
Call the appropriate method on gnome-session so that autostarted
and bus activated apps see the X server and wayland socket.

https://bugzilla.gnome.org/show_bug.cgi?id=706421
2013-09-04 15:13:10 +02:00
Giovanni Campagna
3b3c6d08b6 [NOT FOR REVIEW] Add the ability to attach a debugger at init 2013-09-04 15:13:10 +02:00
Giovanni Campagna
26f452d522 wayland: constraint the pointer onto visible monitors when running on evdev
Use the new Clutter hook to make sure the pointer never enters
the dead area caused by the different monitor sizes.

You don't realize how much X is doing for you until you lose it...

https://bugzilla.gnome.org/show_bug.cgi?id=706655
2013-09-04 15:13:10 +02:00
Giovanni Campagna
76fccc069d MetaWaylandSeat: don't use use events to count pressed buttons
Use the modifier mask instead, as events can get lost if there
is a clutter grab or if some other actor is capturing events.

https://bugzilla.gnome.org/show_bug.cgi?id=706124
2013-09-03 17:13:56 +02:00
Giovanni Campagna
156365b609 MonitorManager: add a KMS backend
Using the new Cogl API to actually modeset (because we can't
use the DRM API directly without controlling buffer swap), we
can finally have a KMS monitor backend, which means full display
configuration when running on bare metal.

https://bugzilla.gnome.org/show_bug.cgi?id=706308
2013-09-03 17:13:56 +02:00
Giovanni Campagna
bd6536dec3 display: don't report extended barrier support on wayland
Even if the xserver does them, they're useless because it doesn't
get the pointer events.
This is a lame workaround for not having real barriers in wayland,
but it fixes the hot corner and message tray (because it triggers
the old xserver path)
2013-09-03 17:13:56 +02:00
Giovanni Campagna
b53bf0e8c2 Fix distcheck
Missing translation files, missing dists and some -Werrors.
2013-09-03 17:00:18 +02:00
Giovanni Campagna
a26ded47d9 Add a private gtk-mutter protocol
Add a new interface, gtk_shell, than can be used by gtk to
retrieve a surface extension called gtk_surface, which will be
used to communicate with mutter all the GTK extensions to EWMH

https://bugzilla.gnome.org/show_bug.cgi?id=707128

Add support for GTK application menus

To do so, we need to be able to set surface state before creating
the MetaWindow, so we introduce MetaWaylandSurfaceInitialState as
a staging area.
The gtk-shell-surface implementation would either write to the
initial state, or directly to the window.

At the same, implement set_title and set_class too, because it's
easy enough.

https://bugzilla.gnome.org/show_bug.cgi?id=707128
2013-09-03 10:57:28 -04:00
Giovanni Campagna
cad9e14463 Move surface state tracking and surface interface to a separate file
Move everything surface related from meta-wayland.c to meta-wayland-surface.c

https://bugzilla.gnome.org/show_bug.cgi?id=707128
2013-09-03 10:57:28 -04:00
Giovanni Campagna
806d5939e3 wayland: split headers and distribute structure definitions
Instead of having all structures in one huge headers, move them
in the appropriate place, and create one header for surface state.

https://bugzilla.gnome.org/show_bug.cgi?id=707128
2013-09-03 10:57:28 -04:00
Giovanni Campagna
0f0c23fbab wayland: generalize ShellSurface to SurfaceExtension
We want to implement new shells and new extension interfaces
for wl_surface, so generalize the book-keeping structures.

https://bugzilla.gnome.org/show_bug.cgi?id=707128
2013-09-03 10:57:28 -04:00
Jasper St. Pierre
5d1fcc26c0 Update .gitignore 2013-09-03 10:57:28 -04:00
Giovanni Campagna
cbe5b6b3bc meta-wayland: intersect the damage region with the window size before applying
According to the wayland documentation, damage outside the
window size is ignored.
This happened with xwayland+wlshm (causing a GL error when calling
TexSubImage2D), probably due to not resizing the buffer
until we receive the corresponding X event.
Might also be an off-by-one in xwayland, as the window size did
not actually change.

Note: we might want to take the configure_notify path instead,
and keep the GL/clutter size consistent with wayland rather than
X, because in the end that's what matters for events and composition.

https://bugzilla.gnome.org/show_bug.cgi?id=706289
2013-09-03 10:16:47 -04:00
Giovanni Campagna
590cf4e832 MonitorXrandr: check the event timestamps before reconfiguring
If, checking the event timestamps, we see that a new configuration
was explicitly requested by an another XRandR client, don't proceed to
apply the intended configuration again, even if looking at the
EDIDs it appears that the outputs changed.
This works around some buggy Xorg drivers (qxl, vbox) that generate
a new serial number everytime the user resizes the host window.

https://bugzilla.gnome.org/show_bug.cgi?id=706735
2013-09-02 17:36:03 +02:00
Cosimo Cecchi
22ca820c44 idle-monitor: fix event propagation to devices
device_id_max is set to the device_id in ensure_device_monitor(), but we
will loop only to (device_id_max - 1) when propagating the sync XEvent
down, missing the device correspondng to device_id_max.

https://bugzilla.gnome.org/show_bug.cgi?id=707250
2013-09-01 17:51:10 -07:00
Jasper St. Pierre
b1206ceb66 wayland: Ensure that opaque / input regions are set at commit time
The protocol specification says that opaque / input regions should be
considered pending state and should only be actually swapped out when
the surface is committed, so it can be set atomically.
2013-08-31 13:29:02 -04:00
Giovanni Campagna
ad4053ab84 wayland: fix pointer focus for destroyed surfaces
We had an assertion in meta_wayland_surface_free() that after
a repick() we would not choose the freed surface, but that didn't
consider surfaces destroyed while holding the implicit pointer
grab (ie, because the user clicked on the X button). In that case,
we need to bypass the grab infrastructure and explicitly unfocus
the dead surface.

https://bugzilla.gnome.org/show_bug.cgi?id=706982
2013-08-30 16:07:00 +02:00
Colin Walters
7bd4e6ecb0 weston-launch: Don't segfault if passed no arguments
Probably not exploitable since I think Linux always puts NULL there,
but let's actually check.
2013-08-30 08:26:31 -04:00
Giovanni Campagna
deeb1db1ac wayland: don't free surfaces that have a window associated
After a MetaWaylandSurface is associated with a MetaWindow, it
should be freed only when the MetaWindow is unmanaged. For wayland
clients, the window is unmanaged when the resource is destroyed,
but for X11 clients we want to wait for the unmap event.

https://bugzilla.gnome.org/show_bug.cgi?id=705917
2013-08-30 10:37:25 +02:00
Giovanni Campagna
7eb4bfbea3 wayland: implement support for plugin modality
Calling XIGrabDevice has no effect under wayland, because the
xserver is getting events from us. Instead, we need to use our
own interfaces for grabs.
At the same time, we can simplify the public API, as plugins
should always listen for events using clutter.

https://bugzilla.gnome.org/show_bug.cgi?id=705917
2013-08-30 10:37:25 +02:00
Giovanni Campagna
59b274f12f MetaWaylandKeyboard: use the new clutter-evdev support for xkbcommon
We need to track the full xkb_state to have the necessary information
to send to the clients, otherwise they may get confused and lock
or invert the modifiers. In the evdev backend, we just retrieve the
same state object that clutter is using, while in the other backends
we fake the state using what clutter is providing (which is a subset
of what X11 provides, which would be necessary to have full state)

https://bugzilla.gnome.org/show_bug.cgi?id=705862
2013-08-30 10:37:25 +02:00
Giovanni Campagna
e311cef013 Add keybindings for switching VTs
Once mutter is started from weston-launch on its own VT, there is
no way to change VT again (for example to actually start an application),
because the keyboard is put in raw mode.
So introduce some keybindings mimicking the standard X ones (Ctrl+Alt+Fn)
that switch the VT manually when activated.

https://bugzilla.gnome.org/show_bug.cgi?id=705861
2013-08-30 10:32:55 +02:00
Giovanni Campagna
e72f81c24f wayland: add TTY and DRM master management
Now that we have a setuid launcher binary, we can make use of
using a private protocol through the socket we're passed at startup.

We also use the new hook in clutter-evdev to ask mutter-launch for
the FDs of the input devices we need, and we emulate the old X
DRM lock with a nested GMainContext without sources.

In the future, mutter-launch will be replaced with the new logind
API currently in development.

https://bugzilla.gnome.org/show_bug.cgi?id=705861
2013-08-30 10:32:55 +02:00
Giovanni Campagna
96fa518576 mutter-launch: augment with VT and TTY handling
Set the TTY mode appropriately at startup, and clean it up
when the compositor exits. Also, take control of VT switching,
including the calls to drmSetMaster and drmDropMaster as appropriate.
In the future, we the kernel implements the mute evdev ioctl,
we'll also make sure that input devices are appropriately released.

https://bugzilla.gnome.org/show_bug.cgi?id=705861
2013-08-30 10:32:55 +02:00
Giovanni Campagna
e263b3624c mutter-launch: use systemd to obtain the TTY
Using the command line or an environment variable is dangerous,
as those can be spoofed to gain access to other sessions.

https://bugzilla.gnome.org/show_bug.cgi?id=705861
2013-08-30 10:32:55 +02:00
Giovanni Campagna
1c34f0b342 mutter-launch: make sure that the spawned binaries sees the right libraries
Being a setuid binary, our LD_LIBRARY_PATH is cleared by glibc at
startup, but we need the spawned binary to see it, otherwise
jhbuild doesn't work, so hardcode it using the configured libdir.

https://bugzilla.gnome.org/show_bug.cgi?id=705861
2013-08-30 10:32:55 +02:00
Giovanni Campagna
2d27873f98 mutter-launch: simplify by removing features we don't need
Remove the ability to launch as a different user, which we don't
need because we're spawned by gdm or by the user manually on the
command line.
At the same time, require an active local session, and remove
the ability to run from anywhere by being in the right user group
(which automatically gives you root-like privileges)

https://bugzilla.gnome.org/show_bug.cgi?id=705861
2013-08-30 10:32:55 +02:00
Giovanni Campagna
fd40a12213 wayland: import weston-launch setuid launcher
To run mutter as a display server, one needs to acquire and
release the DRM master, which is only possible for root, so
we take advantage of weston-launch, a small setuid helper binary
written for the weston project. We import our own slightly
modified copy of it, because weston-launch only launches weston,
for security reasons.

https://bugzilla.gnome.org/show_bug.cgi?id=705861
2013-08-30 10:32:55 +02:00
Jasper St. Pierre
57406e0a9e shaped-texture: Actually fetch rectangles from the blended_region
We checked for the blended region but actually fetched rectangles from
the clip region.
2013-08-29 18:35:18 -04:00
Jasper St. Pierre
1987cbb764 window-actor: Fix build 2013-08-29 17:16:15 -04:00
Jasper St. Pierre
705978405b shaped-texture: Fix build 2013-08-29 17:14:11 -04:00
Adel Gadllah
daba05f6a7 background: Rename visible_region to clip_region
This does better reflect what this region is used for.

https://bugzilla.gnome.org/show_bug.cgi?id=703332
2013-08-29 17:08:57 -04:00
Jasper St. Pierre
1a7984be43 window-actor: Use g_clear_pointer 2013-08-29 17:05:41 -04:00
Jasper St. Pierre
1b3c77d53a shaped-texture: Remove an unnecessary set to NULL 2013-08-29 17:05:36 -04:00
Jasper St. Pierre
5b0f0d9e5b shaped-texture: Remove bad comment
We do not assume ownership of the clip region anymore.
2013-08-29 17:04:55 -04:00
Adel Gadllah
9816659fa9 meta-window-actor: Fix spacing 2013-08-29 17:04:50 -04:00
Adel Gadllah
3b1b611634 meta-window-actor: Throttle obscured frame synced apps
We must send frame_drawn and frame_timing messages to even when
we don't actually queue a redraw on screen to comply with the
WM sync spec.

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

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

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

https://bugzilla.gnome.org/show_bug.cgi?id=703332
2013-08-29 17:03:48 -04:00
Jasper St. Pierre
0089b5769c shaped-texture: Turn blending off when drawing entirely opaque regions
When drawing entirely opaque regions, we traditionally kept blending on
simply because it made the code more convenient and obvious to handle.
However, this can cause lots of performance issues on GPUs that aren't
too powerful, as they have to readback the buffer underneath.

Keep track of the opaque region set by windows (through _NET_WM_OPAQUE_REGION,
Wayland opaque_region hints, standard RGB32 frame masks or similar), and draw
those rectangles separately through a different path with blending turned off.

https://bugzilla.gnome.org/show_bug.cgi?id=707019
2013-08-29 15:31:53 -04:00
Jasper St. Pierre
452be05ea0 shaped-texture: Use non-deprecated cogl APIs
https://bugzilla.gnome.org/show_bug.cgi?id=707019
2013-08-29 15:31:53 -04:00
Jasper St. Pierre
69f038f7c7 shaped-texture: Simplify pipeline creation
Split out pipeline creation to a separate function so that we don't
have so much dense code in the paint function itself, and remove some
indentation levels.

Also, don't use our own template for the unmasked pipeline, since it
has nothing different from the default pipeline template.

We also don't store the pipelines anymore since their creation isn't
really helping us; we set the mask texture and paint texture on every
paint anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=707019
2013-08-29 15:31:52 -04:00
Jasper St. Pierre
2d35e07fae wayland: Add support for set_opaque_region / set_input_region
https://bugzilla.gnome.org/show_bug.cgi?id=707019
2013-08-29 15:31:52 -04:00
Jasper St. Pierre
95e2d26d03 window-actor: Mark all Wayland clients as argb32
https://bugzilla.gnome.org/show_bug.cgi?id=707019
2013-08-29 15:26:49 -04:00
Jasper St. Pierre
f506e090ea monitor: Use a more sane dummy configuration for nested mode 2013-08-29 15:26:49 -04:00
Jasper St. Pierre
0697b53826 wayland-private: Remove unused buffer fields 2013-08-28 15:28:34 -04:00
Giovanni Campagna
7d9141c56f Revert "MetaWaylandKeyboard: use the new clutter-evdev support for xkbcommon"
This reverts commit 519a06b93d.
Depends on unreviewed stuff and breaks the build.
2013-08-28 18:04:01 +02:00
Giovanni Campagna
519a06b93d MetaWaylandKeyboard: use the new clutter-evdev support for xkbcommon
We need to track the full xkb_state to have the necessary information
to send to the clients, otherwise they may get confused and lock
or invert the modifiers. In the evdev backend, we just retrieve the
same state object that clutter is using, while in the other backends
we fake the state using what clutter is providing (which is a subset
of what X11 provides, which would be necessary to have full state)

https://bugzilla.gnome.org/show_bug.cgi?id=705862
2013-08-28 17:45:25 +02:00
Giovanni Campagna
0cceddab75 MetaWayland: install an X io error handler
This way can detect X disconnections correctly, crash with a core
dump and reset the tty.

https://bugzilla.gnome.org/show_bug.cgi?id=706962
2013-08-28 17:21:18 +02:00
Jasper St. Pierre
c9830c13b4 screen: Remove unused variable 2013-08-27 08:56:06 -04:00
Giovanni Campagna
9a4783e364 Integrate the monitor manager with wayland
Use the right backend when running as a wayland compositor,
export the data to wayland clients, and use it to keep the stage
appropriately sized.
2013-08-27 10:09:39 +02:00
Giovanni Campagna
aa15c09d54 Merge tag 'xrandr_branch_point' into wayland-kms-base
Conflicts:
	src/Makefile.am
	src/core/display.c
	src/core/screen-private.h
	src/core/screen.c
2013-08-27 10:07:39 +02:00
Giovanni Campagna
62d908be42 MonitorManager: return the new backlight after changing
Modify the interface of ChangeBacklight to return the new value,
to account for rounding to HW limits.

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

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

https://bugzilla.gnome.org/show_bug.cgi?id=673399
2013-08-27 09:57:06 +02:00
Florian Müllner
3d3ae40f79 Bump version to 3.9.90
gnome-shell requires mutter and mutter-wayland at the same version
to build. Also update NEWS, cherry-picked from master.
2013-08-27 09:51:56 +02:00
Giovanni Campagna
ea3d2b4759 wayland: make parallel installable with regular mutter
Modify all visible instances of mutter with mutter-wayland
(libraries, folders, pkgconfig, etc.), so that the wayland
branch can be installed alongside the usual X11 mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=705497
2013-08-26 15:00:29 +02:00
Giovanni Campagna
542a0886cf Remove files no one cares about anymore
mutter-plugins.pc has been replaced by libmutter.pc, and the
wm properties in the control center are long gone.

https://bugzilla.gnome.org/show_bug.cgi?id=705497
2013-08-26 15:00:29 +02:00
Giovanni Campagna
bd3d5df9ce Remove HAVE_WAYLAND ifdefs
Wayland support is always enabled now.

https://bugzilla.gnome.org/show_bug.cgi?id=705497
2013-08-26 15:00:29 +02:00
Giovanni Campagna
91cdfab495 build: make wayland support unconditional
In the wayland branch of mutter, we want to build a wayland version
of the mutter libraries, and that's much easier if we just build
wayland support unconditionally.
The define is kept to avoid a huge diff, but should be removed
in a later patch.
Also, wayland support can still be disable at runtime, by
launching mutter without the --nested switch.

https://bugzilla.gnome.org/show_bug.cgi?id=705497
2013-08-26 15:00:29 +02:00
Giovanni Campagna
1617323dca MetaShapedTexture: don't include private headers in public ones
Private headers are not installed, so they can't be referenced
from public ones.

https://bugzilla.gnome.org/show_bug.cgi?id=705497
2013-08-26 15:00:29 +02:00
Florian Müllner
bbf9358eba window: Fix a compiler warning 2013-08-23 23:09:58 -04:00
Jasper St. Pierre
9682a2aea4 window-group: Fix compiler warning 2013-08-23 22:11:37 -04:00
Jasper St. Pierre
c9fbb51775 wayland: Fix build when building without Wayland 2013-08-23 22:05:11 -04:00
Jasper St. Pierre
aa6d887214 wayland-private: Ignore deprecations around legacy_buffer
yes, it's deprecated, that's why it's marked legacy. now shush.
2013-08-23 22:00:52 -04:00
Jasper St. Pierre
13312527de Update .gitignore 2013-08-23 18:23:33 -04:00
Giovanni Campagna
9bd366f2a6 MonitorXrandr: skip CRTC reconfigurations that have no effect
If we're attempting to reconfigure the CRTCs to the same parameter,
skip the X call, as in some drivers a modeset can take time and
cause flicker.

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

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

https://bugzilla.gnome.org/show_bug.cgi?id=706582
2013-08-23 16:40:43 +02:00
Giovanni Campagna
9affbf10a6 MetaIdleMonitor: add wayland support
Keep a timer source that we reset when we capture an event in
MetaWayland, and fire watches accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=706005
2013-08-23 16:34:02 +02:00
Giovanni Campagna
c0acf3ae6d MetaIdleMonitor: add a DBus interface for the idle monitor
To allow other clients (gnome-session, gnome-settings-daemon)
to monitor user activity, introduce a DBus interface for the
idle monitor inside mutter.

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

https://bugzilla.gnome.org/show_bug.cgi?id=706005
2013-08-23 16:34:02 +02:00
Jasper St. Pierre
77290b6736 Update .gitignore 2013-08-20 17:04:43 -04:00
Giovanni Campagna
876f81db12 compositor: fix focusing the stage window
We can't use the X11 stage window, if clutter is not using the X11
backend (and even if it was, it would be bogus when the xwayland
server is not the one clutter is talking to). Instead, we introduce
the concept of "focus type", which we use to differentiate the
various meanings of None in the focus_xwindow field.

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

https://bugzilla.gnome.org/show_bug.cgi?id=705917
2013-08-20 14:25:49 +02:00
Giovanni Campagna
d26f248b0f wayland: fix a compiler warning
Implicit declaration of memset

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

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

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

https://bugzilla.gnome.org/show_bug.cgi?id=705911
2013-08-19 16:09:53 +02:00
Giovanni Campagna
4fd3c63da9 ui: restrict gtk to only use the x11 backend
We use GTK as a way to get the X11 connection for our internal
use, so we need it to keep using X.

https://bugzilla.gnome.org/show_bug.cgi?id=706303
2013-08-19 15:42:37 +02:00
Giovanni Campagna
bfc87d13cb MetaWindowActor: fix reference counting issue
We need to use g_signal_connect_object(), rather than g_signal_connect(),
because the window actor can be destroyed before the window emits
the final notify::appears-focused inside unmanage, if the plugin
decides that it doesn't want to animate the destruction (which
happens with dialogs and the default plugin)

https://bugzilla.gnome.org/show_bug.cgi?id=706207
2013-08-18 00:22:07 +02:00
Colin Walters
24564c77d6 build: Fix srcdir != builddir
Need to ensure the wayland/ directory exists in $(builddir), and find
the headers there too.
2013-08-17 18:03:10 -04:00
Giovanni Campagna
18a21b67c2 wayland: move XWayland support code to its own file
Given that xwayland code is already split in meta-xwayland, it
makes sense to have there the implementation of the private
xserver protocol too.

https://bugzilla.gnome.org/show_bug.cgi?id=705816
2013-08-15 17:42:19 +02:00
Giovanni Campagna
3803fd9511 wayland: don't use fork() and SIGCHLD to spawn processes
It is a very bad idea in a glib program (especially one heavily
using glib child watching facilities, like gnome-shell) to handle
SIGCHLD. While we're there, let's also use g_spawn_async, which
solves some malloc-after-fork problems and makes the code generally
cleaner.

https://bugzilla.gnome.org/show_bug.cgi?id=705816
2013-08-15 17:41:34 +02:00
Giovanni Campagna
152d896f75 MetaWindowActor/wayland: make sure the mapped bit is correctly set
Otherwise it stays FALSE for OR windows, causing the shape region
to be empty and the actor culled from drawing.

https://bugzilla.gnome.org/show_bug.cgi?id=706078
2013-08-15 17:41:34 +02:00
Giovanni Campagna
2f3a5f2001 MetaWaylandSeat: correct logic to set the current / focused surface
The current surface refers to the surface right below the pointer
(according to the pick performed by clutter), while the focus surface
is the one receiving events. They can be out of sync in case of
grabs, in which case we should keep trying to focus the current
surface.

https://bugzilla.gnome.org/show_bug.cgi?id=706077
2013-08-15 17:41:34 +02:00
Jasper St. Pierre
0e098249b1 Merge remote-tracking branch 'origin/master' into wayland 2013-08-13 10:44:09 -04:00
Giovanni Campagna
9a5f243f73 wayland: refactor window destruction and focus
The previous code was leaving focus fields dirty in MetaWaylandPointer
and MetaWaylandKeyboard at time (which could crash the X server
because of invalid object IDs)
The new code is more tighly integrated in the normal X11 code
for handling keyboard focus (meaning that the core idea of input
focus is also correct now), so that meta_window_unmanage() can
do the right thing. As a side benefit, clicking on wayland clients
now unfocus X11 clients.
For the mouse focus, we need to clear the surface pointer when
the metawindowactor is destroyed (even if the actual actor is
kept alive for effects), so that a repick finds a different pointer
focus.

https://bugzilla.gnome.org/show_bug.cgi?id=705859
2013-08-13 09:42:55 +02:00
Giovanni Campagna
03f55b9485 wayland: fix a #warning
Remove window_surfaces, as the FIXME asks for. We don't need it
because we can obtain the surface from the MetaWindow, and
follow the wayland compositor path for both types of clients.

https://bugzilla.gnome.org/show_bug.cgi?id=705818
2013-08-13 09:42:55 +02:00
Jasper St. Pierre
ef9ef87d91 configure: Complete fix for removing clutter-wayland-compositor 2013-08-12 14:43:23 -04:00
Jasper St. Pierre
0ee2c21da7 meta-wayland: Remove get_surface_rect
It's the same as get_input_rect, which we already have in window.
2013-08-12 12:13:45 -04:00
Jasper St. Pierre
9b966561c4 configure.ac: Remove clutter-wayland-compositor dependency
It's not necessary.
2013-08-12 12:08:58 -04:00
Giovanni Campagna
8c0779a9db wayland: add missing file
A Makefile.am is required for the protocol/ directory

https://bugzilla.gnome.org/show_bug.cgi?id=705815
2013-08-12 09:49:17 +02:00
Robert Bragg
2c901cc015 wayland: implement shell surface move interface
This implements the shell surface move interface so now it's possible to
use the mouse to interactively move wayland based windows around the
screen.
2013-08-10 19:13:49 -04:00
Robert Bragg
85e66f69fa wayland: support left click to raise wayland surfaces
This adds support for raising wayland surfaces when clicked with the
left mouse button.
2013-08-10 19:13:49 -04:00
Neil Roberts
a5585327dc wayland: Add an actor for the cursor
When running Mutter under Cogl's KMS backend no cursor will be
provided so instead this makes it so the cursor will be painted as a
CoglTexture that gets moved in response to mouse motion events. The
painting is done in a subclass of ClutterStage so that we can
guarantee that the cursor will be painted on top of everything else.

This patch adds support for the set_cursor method on the pointer
interface so that clients can change the cursor image.

The set_pointer method sets a surface and a hotspot position to use
for the cursor image. The surface's buffer is converted to a
CoglTexture and attached to a pipeline to paint directly via Cogl. If
a new buffer is attached to the surface the image will be updated. The
cursor reverts back to the default image whenever to the pointer focus
is moved off of any surface.

The image for the pointer is taken from X. It gets installed into
a fixed data location for mutter.
2013-08-10 19:13:49 -04:00
Neil Roberts
268ebb1b18 wayland: Add basic input support
This copies the basic input support from the Clayland demo compositor.
It adds a basic wl_seat implementation which can convert Clutter mouse
events to Wayland events. For this to work all of the wayland surface
actors need to be made reactive.

The wayland keyboard input focus surface is updated whenever Mutter
sees a FocusIn event so that it will stay in synch with whatever
surface Mutter wants as the focus. Wayland surfaces don't get this
event so for now it will just give them focus whenever they are
clicked as a hack to test the code.

Authored-by: Neil Roberts <neil@linux.intel.com>
Authored-by: Giovanni Campagna <gcampagna@src.gnome.org>
2013-08-10 19:13:49 -04:00
Robert Bragg
40e820f551 Add support for stacking X and Wayland windows together
This breaks down the assumptions in stack-tracker.c and stack.c that
Mutter is only stacking X windows.

The stack tracker now tracks windows using a MetaStackWindow structure
which is a union with a type member so that X windows can be
distinguished from Wayland windows.

Some notable changes are:

Queued stack tracker operations that affect Wayland windows will not be
associated with an X serial number.

If an operation only affects a Wayland window and there are no queued
stack tracker operations ("unvalidated predictions") then the operation
is applied immediately since there is no server involved with changing
the stacking for Wayland windows.

The stack tracker can no longer respond to X events by turning them into
stack operations and discarding the predicted operations made prior to
that event because operations based on X events don't know anything
about the stacking of Wayland windows.

Instead of discarding old predictions the new approach is to trust the
predictions but whenever we receive an event from the server that
affects stacking we cross-reference with the predicted stack and check
for consistency. So e.g. if we have an event that says ADD window A then
we apply the predictions (up to the serial for that event) and verify
the predicted state includes a window A. Similarly if an event says
RAISE_ABOVE(B, C) we can apply the predictions (up to the serial for
that event) and verify that window B is above C.

If we ever receive spurious stacking events (with a serial older than we
would expect) or find an inconsistency (some things aren't possible to
predict from the compositor) then we hit a re-synchronization code-path
that will query the X server for the full stacking order and then use
that stack to walk through our combined stack and force the X windows to
match the just queried stack but avoiding disrupting the relative
stacking of Wayland windows. This will be relatively expensive but
shouldn't be hit for compositor initiated restacking operations where
our predictions should be accurate.

The code in core/stack.c that deals with synchronizing the window stack
with the X server had to be updated quite heavily. In general the patch
avoids changing the fundamental approach being used but most of the code
did need some amount of re-factoring to consider what re-stacking
operations actually involve X or not and when we need to restack X
windows we sometimes need to search for a suitable X sibling to restack
relative too since the closest siblings may be Wayland windows.
2013-08-10 19:13:49 -04:00
Robert Bragg
f9a11b3b18 wayland: Adds basic hybrid X + Wayland support
This adds support for running mutter as a hybrid X and Wayland
compositor. It runs a headless XWayland server for X applications
that presents wayland surfaces back to mutter which mutter can then
composite.

This aims to not break Mutter's existing support for the traditional X
compositing model which means a single build of Mutter can be
distributed supporting the traditional model and the new Wayland based
compositing model.

TODO: although building with --disable-wayland has at least been tested,
I still haven't actually verified that running as a traditional
compositor isn't broken currently.

Note: At this point no input is supported

Note: multiple authors have contributed to this patch:
Authored-by: Robert Bragg <robert@linux.intel.com>
Authored-by: Neil Roberts <neil@linux.intel.com>
Authored-by: Rico Tzschichholz.
Authored-by: Giovanni Campagna <gcampagna@src.gnome.org>
2013-08-10 19:13:48 -04:00
Robert Bragg
bd3c357212 Adds a --nested option
This adds a --nested option to request that mutter no longer run as a
classic X compositor with an output window mapped on the X Composite
Overlay Window and also not assume it is running directly under X.

The intention is that in this mode Mutter will itself launch a headless
X server and display output will be handled by Clutter and Cogl. This
will enable running Mutter nested as an application within an X session.

This patch introduces an internal meta_is_wayland_compositor() function
as a means to condition the way mutter operates when running as a
traditional X compositor vs running as a wayland compositor where the
compositor and display server are combined into a single process.

Later we also expect to add a --kms option as another way of enabling
this wayland compositor mode that will assume full control of the
display hardware instead of running as a nested application.
2013-08-10 19:13:48 -04:00
Robert Bragg
b4d108dac6 configure: Adds --with-xwayland-path option
This adds a --with-xwayland-path configure option that can be used to
specify the absolute path of a headless X server binary supporting
the wayland xserver protocol.
2013-08-10 19:13:48 -04:00
Robert Bragg
6585a5760b configure: Adds --enable-wayland config option
This adds a --enable-wayland configure option to enable building mutter
as a hybrid X and Wayland compositor. By default the option is disabled.
If enabled then HAVE_WAYLAND is defined for C code and as an automake
conditional.

This copies the xserver.xml wayland protocol into a protocol/ directory
since wayland support will depend on this protocol for communicating
with an xwayland X server. Copying the spec like this is consistent with
Weston so we don't need a configure option to locate an external spec.
2013-08-10 19:13:48 -04:00
Robert Bragg
531be6c413 Track the X Shape input region and use it for picking
We now track whether a window has an input shape specified via the X
Shape extension. Intersecting that with the bounding shape (as required
by the X Shape extension) we use the resulting rectangles to paint
window silhouettes when picking. As well as improving the correctness of
picking this should also be much more efficient because typically when
only picking solid rectangles then the need to actually render and issue
a read_pixels request can be optimized away and instead the picking is
done on the cpu.
2013-08-10 19:13:48 -04:00
Robert Bragg
f0c503b5a9 hack autogen to allow automake 1.13 2013-08-10 19:13:48 -04:00
241 changed files with 44447 additions and 23080 deletions

18
.gitignore vendored
View File

@@ -23,7 +23,7 @@ src/50-mutter-navigation.xml
src/50-mutter-system.xml src/50-mutter-system.xml
src/50-mutter-windows.xml src/50-mutter-windows.xml
src/mutter-wm.desktop src/mutter-wm.desktop
src/mutter.desktop src/mutter-wayland.desktop
*.o *.o
*.a *.a
*.lo *.lo
@@ -46,16 +46,16 @@ POTFILES
po/*.pot po/*.pot
50-metacity-desktop-key.xml 50-metacity-desktop-key.xml
50-metacity-key.xml 50-metacity-key.xml
libmutter.pc libmutter-wayland.pc
mutter mutter-wayland
mutter-theme-viewer mutter-launch
mutter.desktop
org.gnome.mutter.gschema.valid org.gnome.mutter.gschema.valid
org.gnome.mutter.gschema.xml org.gnome.mutter.gschema.xml
org.gnome.mutter.wayland.gschema.valid
org.gnome.mutter.wayland.gschema.xml
testasyncgetprop testasyncgetprop
testboxes testboxes
testgradient testgradient
m4/*
mutter-grayscale mutter-grayscale
mutter-mag mutter-mag
mutter-message mutter-message
@@ -78,6 +78,12 @@ src/stamp-mutter-marshal.h
src/meta-dbus-xrandr.[ch] src/meta-dbus-xrandr.[ch]
src/meta-dbus-idle-monitor.[ch] src/meta-dbus-idle-monitor.[ch]
src/mutter-plugins.pc src/mutter-plugins.pc
src/wayland/gtk-shell-protocol.c
src/wayland/gtk-shell-client-protocol.h
src/wayland/gtk-shell-server-protocol.h
src/wayland/xserver-protocol.c
src/wayland/xserver-client-protocol.h
src/wayland/xserver-server-protocol.h
doc/reference/*.args doc/reference/*.args
doc/reference/*.bak doc/reference/*.bak
doc/reference/*.hierarchy doc/reference/*.hierarchy

25
COPYING
View File

@@ -1,8 +1,8 @@
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 2, June 1991 Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc., Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to the GNU Library General Public License instead.) You can apply it to
your programs, too. your programs, too.
When we speak of free software, we are referring to freedom, not When we speak of free software, we are referring to freedom, not
@@ -55,7 +55,7 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and The precise terms and conditions for copying, distribution and
modification follow. modification follow.
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on does not normally print such an announcement, your work based on
the Program is not required to print an announcement.) the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program, identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in and can be reasonably considered independent and separate works in
@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not distribution of the source code, even though third parties are not
compelled to copy the source along with the object code. compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program 4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is otherwise to copy, modify, sublicense or distribute the Program is
@@ -225,7 +225,7 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License. be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in 8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License original copyright holder who places the Program under this License
@@ -278,7 +278,7 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES. POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest If you develop a new program, and you want it to be of the greatest
@@ -303,9 +303,10 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License
with this program; if not, write to the Free Software Foundation, Inc., along with this program; if not, write to the Free Software
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail. Also add information on how to contact you by electronic and paper mail.
@@ -335,5 +336,5 @@ necessary. Here is a sample; alter the names:
This General Public License does not permit incorporating your program into This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General library. If this is what you want to do, use the GNU Library General
Public License instead of this License. Public License instead of this License.

View File

@@ -1,12 +1,8 @@
SUBDIRS=src po doc SUBDIRS=src protocol data po doc
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
EXTRA_DIST = HACKING MAINTAINERS rationales.txt EXTRA_DIST = HACKING MAINTAINERS rationales.txt
DISTCLEANFILES = intltool-extract intltool-merge intltool-update po/stamp-it po/.intltool-merge-cache DISTCLEANFILES = intltool-extract intltool-merge intltool-update po/stamp-it po/.intltool-merge-cache
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}

223
NEWS
View File

@@ -1,222 +1,7 @@
3.12.1
======
* Fix opacity values from _NET_WM_WINDOW_OPACITY [Nirbheek; #727874]
* Misc. cleanups [Jasper; #720631]
Contributors:
Nirbheek Chauhan, Jasper St. Pierre
Translations:
Inaki Larranaga Murgoitio [eu], marablack3 [el]
3.12.0
======
Translations:
Ask H. Larsen [da], Мирослав Николић [sr, sr@latin], Andika Triwidada [id],
Daniel Korostil [uk], Petr Kovar [cs]
3.11.92
=======
* Fix identification of CSD windows [Owen; #723029]
* Add minimal handling of touch events [Carlos; #723552]
* Misc bug fixes and cleanups [Owen, Adel, Jasper; #723580, #726352]
Contributors:
Adel Gadllah, Carlos Garnacho, Rui Matos, Jasper St. Pierre, Owen W. Taylor
Translations:
Changwoo Ryu [ko], Rūdolfs Mazurs [lv], Wylmer Wang [zh_CN],
Chao-Hsiung Liao [zh_HK, zh_TW], Yuri Myasoedov [ru], Tiagosdot [pt],
Claude Paroz [fr], Duarte Loreto [pt], A S Alam [pa]
3.11.91
=======
* Don't use keysym to match keybindings [Rui; #678001]
* Fix message tray icons showing up blank (again) [Adel; #725180]
* Improve keybinding lookups [Rui; #725588]
* Fix dynamic updates of titlebar style properties [Owen; #725751]
* Fix positioning of manually positioned windows [Owen; #724049]
* Misc. bug fixes [Carlos, Giovanni, Florian, Jasper; #724969, #724402, #722266,
#725338]
Contributors:
Giovanni Campagna, Adel Gadllah, Carlos Garnacho, Rui Matos, Florian Müllner,
Jasper St. Pierre
Translations:
Aurimas Černius [lt], Milo Casagrande [it], Balázs Úr [hu],
Matej Urbančič [sl], Enrico Nicoletto [pt_BR], Yosef Or Boczko [he],
Piotr Drąg [pl], Fran Diéguez [gl]
3.11.90
=======
* Use correct output property for backlight control [Robert; #723606]
* Fix double-scaling on high DPI resolutions [Adel; #723931]
* Make tile previews a compositor effect [Stefano, Florian; #665758]
* Misc. bug fixes and cleanups [Ryan, Giovanni, Jasper; #722530, #724257,
#724258, #724364, #720631, #707851, #707897]
Contributors:
Robert Ancell, Giovanni Campagna, Stefano Facchini, Adel Gadllah,
Ryan Lortie, Florian Müllner, Jasper St. Pierre, Rico Tzschichholz
Translations:
Shankar Prasad [kn], Khaled Hosny [ar], Marek Černocký [cs],
Kjartan Maraas [nb], Daniel Korostil [uk]
3.11.5
======
* Fix CSD titlebars being placed off-screen [Jasper; #719772]
* Expose MetaWindow:skip-taskbar property [Florian; #723307]
* Fix legacy tray icons showing up blank [Adel; #721596]
* Fix configuration of cloned monitors [Adel; #710610]
* Misc bug fixes and cleanups [Jasper, Adel, Jonas; #720631, #723468, #723563]
Contributors:
Jonas Ådahl, Marek Ch, Adel Gadllah, Florian Müllner, Jasper St. Pierre
Translations:
Rafael Ferreira [pt_BR], Enrico Nicoletto [pt_BR], Fran Diéguez [gl],
Chao-Hsiung Liao [zh_HK, zh_TW]
3.11.4
======
* Don't leave focus on windows that are being unmanaged [Owen; #711618]
* Reduce server grabs [Daniel Drake; #721345, #721709]
* Improve heuristic to determine display output name [Cosimo Cecchi; #721674]
* Atomically unmaximize both directions [Jasper; #722108]
* Misc bug fixes [Debarshi, Andika; #721517, #721674]
Contributors:
Cosimo Cecchi, Daniel Drake, Debarshi Ray, Jasper St. Pierre,
Andika Triwidada, Owen W. Taylor
Translations:
Rafael Ferreira [pt_BR], Dimitris Spingos [el], Daniel Mustieles [es],
Milo Casagrande [it], Yosef Or Boczko [he]
3.11.3
======
* xrandr: Use "hotplug_mode_update" property [Marc-André; #711216]
* Fix position of attached dialogs for CSD windows [Giovanni, Owen; #707194]
* Fix focus issues with external OSKs [Jasper; #715030]
* Add a MetaCullable interface [Jasper; #714706]
* Fix window group paint volume [Owen; #719669]
* Fix frame extents problems [Owen; #714707]
* Add shortcut to move windows between monitors [Florian; #671054]
* Fix problems with focus tracking [Owen; #720558]
* Misc. bug fixes and cleanups [Rui, Jasper, Owen; #712833, #678989, #720106,
#720417, #720630]
Contributors:
Robert Bragg, Giovanni Campagna, Marc-André Lureau, Rui Matos, Alberto Milone,
Florian Müllner, Sindhu S, Jasper St. Pierre, Rico Tzschichholz,
Owen W. Taylor
Translations:
甘露(Gan Lu) [zh_CN], Khaled Hosny [ar]
3.11.2
======
* Fix resize operations using mouse-button-modifier [Lionel; #710251]
* Misc. fixes and cleanups [Jasper, Rico, Florian; #711731]
Contributors:
Lionel Landwerlin, Florian Müllner, Jasper St. Pierre, Rico Tzschichholz
3.11.1
======
* Don't require at least one output device to be connected [Giovanni; #709009]
* Name the guard window [Andrew; #710346]
* Use new UPower API [Bastien]
* Expose min-backlight-step [Asad; #710380]
* Don't focus the no-focus-window for globally active windows [Jasper; #710296]
* Misc. fixes and cleanups [Jasper, Rico, Olav, Magdalen; #709776]
Contributors:
Magdalen Berns, Giovanni Campagna, Asad Mehmood, Bastien Nocera,
Jasper St. Pierre, Rico Tzschichholz, Olav Vitters, Andrew Walton
Translations:
Reinout van Schouwen [nl]
3.10.1
======
* Don't apply fullscreen workarounds to CSD windows [Giovanni; #708718]
* Fix hangs during DND operations [Adel; #709340]
* Use nearest-pixel interpolation when possible [Hans; #708389]
* Fix tile previews getting stuck on right click during drags [Lionel; #704759]
* Misc bug fixes [Giovanni, Jasper; #708420]
Contributors:
Giovanni Campagna, Adel Gadllah, Lionel Landwerlin, Hans Petter Jansson,
Jasper St. Pierre
Translations:
Khaled Hosny [ar], Reinout van Schouwen [nl], Carles Ferrando [ca@valencia]
3.10.0.1
========
* Fix bug when a window changed size twice in a single frame - this
can happen with GTK+ client-side decorations [Giovanni, Owen; #708367]
Contributors:
Giovanni Campagna, Owen Taylor
3.10.0
======
Translations:
Ask H. Larsen [da], Gabor Kelemen [hu], Duarte Loreto [pt],
Yosef Or Boczko [he]
3.9.92
======
* Don't create a dummy texture for the texture pipeline template [Neil; #707458]
* Remove holes generated by disabling the laptop lid [Giovanni; #707473]
* https://bugzilla.gnome.org/show_bug.cgi?id=707474 [Giovanni; #707474]
* Don't require plugins to pass event to Clutter [Giovanni; #707482]
* Add support for more cursor types [Giovanni; #707919]
* Immediately fire idle watches that are already expired [Giovanni; #707302]
* Misc bug fixes [Giovanni, Colin, Pavel; #707649, #707563, #708070]
Contributors:
Giovanni Campagna, Adel Gadllah, Colin Guthrie, Neil Roberts,
Jasper St. Pierre, Ray Strode, Pavel Vasin
Translations:
Мирослав Николић po/sr, sr@latin.po, Мирослав Николић [sr, sr@latin],
Chao-Hsiung Liao [zh_HK, zh_TW], Yuri Myasoedov [ru],
Ville-Pekka Vainio [fi], Changwoo Ryu [ko], A S Alam [pa],
Mattias Põldaru [et], Rūdolfs Mazurs [lv], Ihar Hrachyshka [be],
Nilamdyuti Goswami [as], Andika Triwidada [id], Baurzhan Muftakhidinov [kk],
Benjamin Steinwender [de]
3.9.91
======
* Drop man pages for removed utilities [Kalev; #706579]
* Add support for idle tracking [Giovanni; #706005]
* Skip CRTC reconfigurations that have no effect [Giovanni; #706672]
* Ignore skip-taskbar hints on parentless dialogs [Giovanni; #673399]
* Don't save pixbuf data in user data [Tim; #706777]
* Don't queue redraws for obscured regions [Adel; #703332]
* Turn blending off when drawing entirely opaque regions [Jasper; #706930]
* Check event timestamps before reconfiguring [Giovanni; #706735]
* Misc bug fixes [Giovanni, Colin, Seán, Jasper, Cosimo; #706582, #706598,
#706787, #706729, #706825, #707081, #707090, #707250, #707267]
Contributors:
Giovanni Campagna, Cosimo Cecchi, Adel Gadllah, Colin Guthrie, Kalev Lember,
Tim Lunn, Jasper St. Pierre, Rico Tzschichholz, Seán de Búrca
Translations:
Piotr Drąg [pl], Alexandre Franke [fr], Kjartan Maraas [nb],
Milo Casagrande [it], Balázs Úr [hu], Seán de Búrca [ga], Fran Diéguez [gl],
Daniel Mustieles [es], Aurimas Černius [lt], Gil Forcada [ca]
3.9.90 3.9.90
====== ======
* First release from the wayland branch, includes basic support for running
as a wayland compositor [Robert, Neil, Giovanni]
* Add support for _GTK_FRAME_EXTENTS [Jasper; #705766] * Add support for _GTK_FRAME_EXTENTS [Jasper; #705766]
* Fix quick consecutive <super> presses breaking keyboard input [Alban; #666101] * Fix quick consecutive <super> presses breaking keyboard input [Alban; #666101]
* Work towards running as wayland compositor [Giovanni] * Work towards running as wayland compositor [Giovanni]
@@ -231,8 +16,8 @@ Translations:
Contributors: Contributors:
Robert Bragg, Giovanni Campagna, Alban Crequy, Adel Gadllah, Robert Bragg, Giovanni Campagna, Alban Crequy, Adel Gadllah,
Alexander Larsson, Florian Müllner, Jasper St. Pierre, Rico Tzschichholz, Alexander Larsson, Florian Müllner, Jasper St. Pierre, Neil Roberts,
Colin Walters Rico Tzschichholz, Colin Walters
Translations: Translations:
Jiro Matsuzawa [ja], Kjartan Maraas [nb], Matej Urbančič [sl], Jiro Matsuzawa [ja], Kjartan Maraas [nb], Matej Urbančič [sl],

View File

@@ -1,11 +1,11 @@
#!/bin/sh #!/bin/bash
# Run this to generate all the initial makefiles, etc. # Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0` srcdir=`dirname $0`
test -z "$srcdir" && srcdir=. test -z "$srcdir" && srcdir=.
PKG_NAME="mutter" PKG_NAME="mutter"
REQUIRED_AUTOMAKE_VERSION=1.10 REQUIRED_AUTOMAKE_VERSION=1.13
(test -f $srcdir/configure.ac \ (test -f $srcdir/configure.ac \
&& test -d $srcdir/src) || { && test -d $srcdir/src) || {

View File

@@ -1,9 +1,8 @@
AC_PREREQ(2.50) AC_PREREQ(2.50)
AC_CONFIG_MACRO_DIR([m4])
m4_define([mutter_major_version], [3]) m4_define([mutter_major_version], [3])
m4_define([mutter_minor_version], [12]) m4_define([mutter_minor_version], [9])
m4_define([mutter_micro_version], [1]) m4_define([mutter_micro_version], [91])
m4_define([mutter_version], m4_define([mutter_version],
[mutter_major_version.mutter_minor_version.mutter_micro_version]) [mutter_major_version.mutter_minor_version.mutter_micro_version])
@@ -13,14 +12,17 @@ m4_define([mutter_plugin_api_version], [3])
AC_INIT([mutter], [mutter_version], AC_INIT([mutter], [mutter_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=mutter]) [http://bugzilla.gnome.org/enter_bug.cgi?product=mutter])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR(src/core/display.c) AC_CONFIG_SRCDIR(src/core/display.c)
AC_CONFIG_HEADERS(config.h) AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar]) AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz tar-ustar])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],) m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],)
AM_MAINTAINER_MODE([enable]) AM_MAINTAINER_MODE([enable])
# Change pkglibdir and pkgdatadir to mutter-wayland instead of mutter
PACKAGE="mutter-wayland"
AC_SUBST([PACKAGE], [$PACKAGE])
MUTTER_MAJOR_VERSION=mutter_major_version MUTTER_MAJOR_VERSION=mutter_major_version
MUTTER_MINOR_VERSION=mutter_minor_version MUTTER_MINOR_VERSION=mutter_minor_version
MUTTER_MICRO_VERSION=mutter_micro_version MUTTER_MICRO_VERSION=mutter_micro_version
@@ -36,7 +38,7 @@ AC_SUBST(MUTTER_PLUGIN_DIR)
# Honor aclocal flags # Honor aclocal flags
AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}") AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}")
GETTEXT_PACKAGE=mutter GETTEXT_PACKAGE=mutter-wayland
AC_SUBST(GETTEXT_PACKAGE) AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Name of default gettext domain]) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Name of default gettext domain])
@@ -69,15 +71,15 @@ CANBERRA_GTK_VERSION=0.26
CLUTTER_PACKAGE=clutter-1.0 CLUTTER_PACKAGE=clutter-1.0
MUTTER_PC_MODULES=" MUTTER_PC_MODULES="
gtk+-3.0 >= 3.9.11 gtk+-3.0 >= 3.3.7
gio-unix-2.0 >= 2.25.10 gio-2.0 >= 2.25.10
pango >= 1.2.0 pango >= 1.2.0
cairo >= 1.10.0 cairo >= 1.10.0
gsettings-desktop-schemas >= 3.7.3 gsettings-desktop-schemas >= 3.7.3
xcomposite >= 0.2 xfixes xrender xdamage xi >= 1.6.0 xcomposite >= 0.2 xfixes xrender xdamage xi >= 1.6.0
$CLUTTER_PACKAGE >= 1.19.5 $CLUTTER_PACKAGE >= 1.14.3
cogl-1.0 >= 1.17.1 cogl-1.0 >= 1.13.3
upower-glib >= 0.99.0 upower-glib > 0.9.11
gnome-desktop-3.0 gnome-desktop-3.0
" "
@@ -117,11 +119,32 @@ AC_ARG_ENABLE(shape,
[disable mutter's use of the shaped window extension]),, [disable mutter's use of the shaped window extension]),,
enable_shape=auto) enable_shape=auto)
## Wayland support requires the xserver.xml protocol extension found in the weston
## repository but since there aren't currently established conventions for
## installing and discovering these we simply require a location to be given
## explicitly...
AC_ARG_WITH([wayland-protocols],
[AS_HELP_STRING([--with-wayland-protocols], [Location for wayland extension protocol specs])],
[
],
[])
AC_ARG_WITH([xwayland-path],
[AS_HELP_STRING([--with-xwayland-path], [Absolute path for an X Wayland server])],
[XWAYLAND_PATH="$withval"],
[XWAYLAND_PATH="$bindir/Xorg"])
AM_GLIB_GNU_GETTEXT AM_GLIB_GNU_GETTEXT
## here we get the flags we'll actually use ## here we get the flags we'll actually use
# GRegex requires Glib-2.14.0 # GRegex requires Glib-2.14.0
PKG_CHECK_MODULES(ALL, glib-2.0 >= 2.14.0) PKG_CHECK_MODULES(ALL, glib-2.0 >= 2.14.0)
PKG_CHECK_MODULES(MUTTER_LAUNCH, libdrm libsystemd-login)
saved_LIBS="$LIBS"
LIBS="$LIBS $MUTTER_LAUNCH"
AC_CHECK_FUNCS([sd_session_get_vt])
LIBS="$saved_LIBS"
# Unconditionally use this dir to avoid a circular dep with gnomecc # Unconditionally use this dir to avoid a circular dep with gnomecc
GNOME_KEYBINDINGS_KEYSDIR="${datadir}/gnome-control-center/keybindings" GNOME_KEYBINDINGS_KEYSDIR="${datadir}/gnome-control-center/keybindings"
@@ -200,6 +223,16 @@ if test x$have_xcursor = xyes; then
AC_DEFINE(HAVE_XCURSOR, , [Building with Xcursor support]) AC_DEFINE(HAVE_XCURSOR, , [Building with Xcursor support])
fi fi
# We always build with wayland enabled
AC_DEFINE(HAVE_WAYLAND, , [Building with Wayland support])
AC_PATH_PROG([WAYLAND_SCANNER],[wayland-scanner],[no])
AS_IF([test "x$WAYLAND_SCANNER" = "xno"],
AC_MSG_ERROR([Could not find wayland-scanner in your PATH, required for parsing wayland extension protocols]))
AC_SUBST([WAYLAND_SCANNER])
AC_SUBST(XWAYLAND_PATH)
MUTTER_PC_MODULES="$MUTTER_PC_MODULES wayland-server libdrm"
PKG_CHECK_MODULES(MUTTER, $MUTTER_PC_MODULES) PKG_CHECK_MODULES(MUTTER, $MUTTER_PC_MODULES)
PKG_CHECK_EXISTS([xi >= 1.6.99.1], PKG_CHECK_EXISTS([xi >= 1.6.99.1],
@@ -437,9 +470,10 @@ doc/man/Makefile
doc/reference/Makefile doc/reference/Makefile
doc/reference/meta-docs.sgml doc/reference/meta-docs.sgml
src/Makefile src/Makefile
src/libmutter.pc src/libmutter-wayland.pc
src/mutter-plugins.pc
src/compositor/plugins/Makefile src/compositor/plugins/Makefile
protocol/Makefile
data/Makefile
po/Makefile.in po/Makefile.in
]) ])
@@ -455,7 +489,7 @@ fi
dnl ========================================================================== dnl ==========================================================================
echo " echo "
mutter-$VERSION mutter-wayland-$VERSION
prefix: ${prefix} prefix: ${prefix}
source code location: ${srcdir} source code location: ${srcdir}

3
data/Makefile.am Normal file
View File

@@ -0,0 +1,3 @@
defaultcursordir = $(pkgdatadir)/cursors
dist_defaultcursor_DATA = left_ptr.png

BIN
data/left_ptr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 B

View File

@@ -1,3 +1,4 @@
man_MANS = mutter.1 man_MANS = mutter.1 mutter-theme-viewer.1 \
mutter-window-demo.1 mutter-message.1
EXTRA_DIST = $(man_MANS) EXTRA_DIST = $(man_MANS)

60
doc/man/mutter-message.1 Normal file
View File

@@ -0,0 +1,60 @@
.\" Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.\" -----
.\" This file was confirmed to be licenced under the GPL
.\" by its author and copyright holder, Akira TAGOH, on June 1st 2008:
.\"
.\" > I'm comfortable with DFSG-free. that sounds great if you think it's
.\" > useful and worth containing it in upstream.
.\" ...
.\" > Right I know. any licenses that is DFSG-free, I'm ok with whatever,
.\" > since I have contributed that for Debian. so GPL is no problem for me.
.\" -----
.TH MUTTER\-MESSAGE 1 "28 August 2002"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
MUTTER\-MESSAGE \- a command to send a message to Mutter
.SH SYNOPSIS
.B MUTTER\-MESSAGE
[restart|reload\-theme|enable\-keybindings|disable\-keybindings]
.SH DESCRIPTION
This manual page documents briefly the
.B mutter\-message\fP.
This manual page was written for the Debian distribution
because the original program does not have a manual page.
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
.\" respectively.
\fBmutter\-message\fP send a specified message to \fBmutter\fP(1).
.SH OPTIONS
.TP
.B restart
Restart \fBmutter\fP(1) which is running.
.TP
.B reload-theme
Reload a theme which is specified on gsettings database.
.TP
.B enable-keybindings
Enable all of keybindings which is specified on gsettings database.
.TP
.B disable-keybindings
Disable all of keybindings which is specified on gsettings database.
.SH SEE ALSO
.BR mutter (1)
.SH AUTHOR
This manual page was written by Akira TAGOH <tagoh@debian.org>,
for the Debian GNU/Linux system (but may be used by others).

View File

@@ -0,0 +1,43 @@
.\" In .TH, FOO should be all caps, SECTION should be 1-8, maybe w/ subsection
.\" other parms are allowed: see man(7), man(1)
.\"
.\" Based on template provided by Tom Christiansen <tchrist@jhereg.perl.com>.
.\"
.TH MUTTER-THEME-VIEWER 1 "1 June 2004"
.SH NAME
mutter-theme-viewer \- view mutter themes
.SH SYNOPSIS
.B mutter-theme-viewer
[
.I THEMENAME
]
.SH DESCRIPTION
.\" Putting a newline after each sentence can generate better output.
.B mutter-theme-viewer
allows you to preview any installed Mutter theme.
.PP
When designing a new Mutter theme, you can use
.B mutter-theme-viewer
to measure the performance of a window frame option, and to preview
the option.
.SH OPTIONS
.TP
.I THEMENAME
Name of the theme to be shown (\fIAtlanta\fR by default).
It is case-sensitive.
.SH FILES
.br
.nf
.TP
.I /usr/share/themes
system themes directory
.TP
.I /usr/share/themes/*/mutter-1/mutter-theme-1.xml
theme specification file
.SH AUTHOR
This manual page was written by Jose M. Moya <josem@die.upm.es>, for
the Debian GNU/Linux system (but may be used by others).
.SH "SEE ALSO"
.\" Always quote multiple words for .SH
.BR mutter (1),
.BR mutter-window-demo (1).

View File

@@ -0,0 +1,25 @@
.\" In .TH, FOO should be all caps, SECTION should be 1-8, maybe w/ subsection
.\" other parms are allowed: see man(7), man(1)
.\"
.\" Based on template provided by Tom Christiansen <tchrist@jhereg.perl.com>.
.\"
.TH MUTTER-WINDOW-DEMO 1 "1 June 2004"
.SH NAME
mutter-window-demo \- demo of window features
.SH SYNOPSIS
.B mutter-window-demo
.SH DESCRIPTION
.\" Putting a newline after each sentence can generate better output.
This program demonstrates various kinds of windows that window
managers and window manager themes should handle.
.PP
Be sure to tear off the menu and toolbar, those are also a special
kind of window.
.SH AUTHOR
This manual page was written by Jose M. Moya <josem@die.upm.es>, for
the Debian GNU/Linux system (but may be used by others).
.SH "SEE ALSO"
.\" Always quote multiple words for .SH
.BR x-window-manager (1),
.BR mutter (1),
.BR mutter-theme-viewer (1).

View File

@@ -49,8 +49,8 @@ FIXXREF_OPTIONS=
# Used for dependencies. The docs will be rebuilt if any of these change. # Used for dependencies. The docs will be rebuilt if any of these change.
# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
HFILE_GLOB=$(top_srcdir)/src/*/*.h HFILE_GLOB=$(top_srcdir)/src/*.h
CFILE_GLOB=$(top_srcdir)/src/*/*.c CFILE_GLOB=$(top_srcdir)/src/*.c
# Extra header to include when scanning, which are not under DOC_SOURCE_DIR # Extra header to include when scanning, which are not under DOC_SOURCE_DIR
# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h # e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
@@ -140,7 +140,7 @@ expand_content_files= \
# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
GTKDOC_CFLAGS=$(MUTTER_CFLAGS) GTKDOC_CFLAGS=$(MUTTER_CFLAGS)
GTKDOC_LIBS=$(MUTTER_LIBS) $(top_builddir)/src/libmutter.la GTKDOC_LIBS=$(MUTTER_LIBS) $(top_builddir)/src/libmutter-wayland.la
# This includes the standard gtk-doc make rules, copied by gtkdocize. # This includes the standard gtk-doc make rules, copied by gtkdocize.
include $(top_srcdir)/gtk-doc.make include $(top_srcdir)/gtk-doc.make

View File

@@ -96,6 +96,8 @@ meta_compositor_hide_window
meta_compositor_switch_workspace meta_compositor_switch_workspace
meta_compositor_maximize_window meta_compositor_maximize_window
meta_compositor_unmaximize_window meta_compositor_unmaximize_window
meta_compositor_window_mapped
meta_compositor_window_unmapped
meta_compositor_sync_window_geometry meta_compositor_sync_window_geometry
meta_compositor_set_updates_frozen meta_compositor_set_updates_frozen
meta_compositor_queue_frame_drawn meta_compositor_queue_frame_drawn
@@ -205,6 +207,7 @@ meta_key_binding_get_modifiers
meta_key_binding_get_mask meta_key_binding_get_mask
meta_key_binding_is_builtin meta_key_binding_is_builtin
meta_keybindings_set_custom_handler meta_keybindings_set_custom_handler
meta_keybindings_switch_window
meta_screen_ungrab_all_keys meta_screen_ungrab_all_keys
meta_screen_grab_all_keys meta_screen_grab_all_keys
</SECTION> </SECTION>
@@ -386,23 +389,6 @@ MetaWindowActorPrivate
meta_window_actor_get_type meta_window_actor_get_type
</SECTION> </SECTION>
<SECTION>
<FILE>meta-cullable</FILE>
<TITLE>MetaCullable</TITLE>
MetaCullable
MetaCullableInterface
meta_cullable_cull_out
meta_cullable_reset_culling
meta_cullable_cull_out_children
meta_cullable_reset_culling_children
<SUBSECTION Standard>
META_TYPE_CULLABLE
META_CULLABLE
META_IS_CULLABLE
META_CULLABLE_GET_IFACE
meta_cullable_get_type
</SECTION>
<SECTION> <SECTION>
<FILE>prefs</FILE> <FILE>prefs</FILE>
MetaPreference MetaPreference
@@ -556,10 +542,7 @@ meta_window_is_override_redirect
meta_window_is_skip_taskbar meta_window_is_skip_taskbar
meta_window_get_rect meta_window_get_rect
meta_window_get_input_rect meta_window_get_input_rect
meta_window_get_frame_rect
meta_window_get_outer_rect meta_window_get_outer_rect
meta_window_client_rect_to_frame_rect
meta_window_frame_rect_to_client_rect
meta_window_get_screen meta_window_get_screen
meta_window_get_display meta_window_get_display
meta_window_get_xwindow meta_window_get_xwindow

View File

@@ -21,7 +21,6 @@ environment.</description>
--> -->
<mailing-list rdf:resource="http://mail.gnome.org/mailman/listinfo/gnome-shell-list" /> <mailing-list rdf:resource="http://mail.gnome.org/mailman/listinfo/gnome-shell-list" />
<download-page rdf:resource="http://download.gnome.org/sources/mutter/" /> <download-page rdf:resource="http://download.gnome.org/sources/mutter/" />
<download-page rdf:resource="http://download.gnome.org/sources/mutter-wayland/" />
<bug-database rdf:resource="http://bugzilla.gnome.org/browse.cgi?product=mutter" /> <bug-database rdf:resource="http://bugzilla.gnome.org/browse.cgi?product=mutter" />
<category rdf:resource="http://api.gnome.org/doap-extensions#desktop" /> <category rdf:resource="http://api.gnome.org/doap-extensions#desktop" />

View File

@@ -44,7 +44,6 @@ is
it it
ja ja
ka ka
kk
kn kn
ko ko
ku ku

View File

@@ -21,9 +21,9 @@ src/core/util.c
src/core/window.c src/core/window.c
src/core/window-props.c src/core/window-props.c
src/core/xprops.c src/core/xprops.c
src/mutter.desktop.in src/mutter-wayland.desktop.in
src/mutter-wm.desktop.in
src/org.gnome.mutter.gschema.xml.in src/org.gnome.mutter.gschema.xml.in
src/org.gnome.mutter.wayland.gschema.xml.in
src/ui/frames.c src/ui/frames.c
src/ui/menu.c src/ui/menu.c
src/ui/metaaccellabel.c src/ui/metaaccellabel.c

733
po/ar.po

File diff suppressed because it is too large Load Diff

499
po/as.po

File diff suppressed because it is too large Load Diff

441
po/be.po
View File

@@ -1,10 +1,10 @@
# Ihar Hrachyshka <ihar.hrachyshka@gmail.com>, 2011, 2013. # Ihar Hrachyshka <ihar.hrachyshka@gmail.com>, 2011.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: mutter.master\n" "Project-Id-Version: mutter.master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n" "product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2013-08-18 20:03+0000\n" "POT-Creation-Date: 2013-03-01 15:50+0000\n"
"PO-Revision-Date: 2012-10-13 17:44+0300\n" "PO-Revision-Date: 2012-10-13 17:44+0300\n"
"Last-Translator: Ігар Грачышка <ihar.hrachyshka@gmail.com>\n" "Last-Translator: Ігар Грачышка <ihar.hrachyshka@gmail.com>\n"
"Language-Team: Belarusian <i18n-bel-gnome@googlegroups.com>\n" "Language-Team: Belarusian <i18n-bel-gnome@googlegroups.com>\n"
@@ -206,7 +206,7 @@ msgstr "Падзяліць прагляд справа"
#. This probably means that a non-WM compositor like xcompmgr is running; #. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit #. * we have no way to get it to exit
#: ../src/compositor/compositor.c:589 #: ../src/compositor/compositor.c:507
#, c-format #, c-format
msgid "" msgid ""
"Another compositing manager is already running on screen %i on display \"%s" "Another compositing manager is already running on screen %i on display \"%s"
@@ -214,11 +214,11 @@ msgid ""
msgstr "" msgstr ""
"Іншы кампазітны кіраўнік вокнаў ужо абслугоўвае экран %i дысплея \"%s\"." "Іншы кампазітны кіраўнік вокнаў ужо абслугоўвае экран %i дысплея \"%s\"."
#: ../src/compositor/meta-background.c:1076 #: ../src/compositor/meta-background.c:1111
msgid "background texture could not be created from file" msgid "background texture could not be created from file"
msgstr "не ўдалося стварыць фонавую тэкстуру з файла" msgstr "не ўдалося стварыць фонавую тэкстуру з файла"
#: ../src/core/bell.c:322 #: ../src/core/bell.c:320
msgid "Bell event" msgid "Bell event"
msgstr "Падзея з сігналам" msgstr "Падзея з сігналам"
@@ -251,18 +251,18 @@ msgstr "_Пачакаць"
msgid "_Force Quit" msgid "_Force Quit"
msgstr "_Змусіць да выхаду" msgstr "_Змусіць да выхаду"
#: ../src/core/display.c:421 #: ../src/core/display.c:401
#, c-format #, c-format
msgid "Missing %s extension required for compositing" msgid "Missing %s extension required for compositing"
msgstr "" msgstr ""
"Адсутнічае пашырэнне \"%s\", патрэбнае для ажыццяўлення кампазітнага вываду" "Адсутнічае пашырэнне \"%s\", патрэбнае для ажыццяўлення кампазітнага вываду"
#: ../src/core/display.c:513 #: ../src/core/display.c:493
#, c-format #, c-format
msgid "Failed to open X Window System display '%s'\n" msgid "Failed to open X Window System display '%s'\n"
msgstr "Не ўдалося адкрыць X-дысплей аконнай сістэмы \"%s\"\n" msgstr "Не ўдалося адкрыць X-дысплей аконнай сістэмы \"%s\"\n"
#: ../src/core/keybindings.c:1136 #: ../src/core/keybindings.c:929
#, c-format #, c-format
msgid "" msgid ""
"Some other program is already using the key %s with modifiers %x as a " "Some other program is already using the key %s with modifiers %x as a "
@@ -271,41 +271,41 @@ msgstr ""
"Нейкая іншая праграма ўжо выкарыстоўвае як скарот клавішу %s з " "Нейкая іншая праграма ўжо выкарыстоўвае як скарот клавішу %s з "
"мадыфікатарамі %x\n" "мадыфікатарамі %x\n"
#: ../src/core/keybindings.c:1333 #: ../src/core/keybindings.c:1129
#, c-format #, c-format
msgid "\"%s\" is not a valid accelerator\n" msgid "\"%s\" is not a valid accelerator\n"
msgstr "\"%s\" - гэта хібны клавіятурны скарот\n" msgstr "\"%s\" - гэта хібны клавіятурны скарот\n"
#: ../src/core/main.c:197 #: ../src/core/main.c:196
msgid "Disable connection to session manager" msgid "Disable connection to session manager"
msgstr "Выключыць злучэнне з кіраўніком сеансаў" msgstr "Выключыць злучэнне з кіраўніком сеансаў"
#: ../src/core/main.c:203 #: ../src/core/main.c:202
msgid "Replace the running window manager" msgid "Replace the running window manager"
msgstr "Замяніць дзейнага кіраўніка вокнаў" msgstr "Замяніць дзейнага кіраўніка вокнаў"
#: ../src/core/main.c:209 #: ../src/core/main.c:208
msgid "Specify session management ID" msgid "Specify session management ID"
msgstr "Вызначыць ідэнтыфікатар для кіравання сеансам" msgstr "Вызначыць ідэнтыфікатар для кіравання сеансам"
#: ../src/core/main.c:214 #: ../src/core/main.c:213
msgid "X Display to use" msgid "X Display to use"
msgstr "Патрэбны X-дысплей" msgstr "Патрэбны X-дысплей"
#: ../src/core/main.c:220 #: ../src/core/main.c:219
msgid "Initialize session from savefile" msgid "Initialize session from savefile"
msgstr "Ініцыяваць сеанс з файла" msgstr "Ініцыяваць сеанс з файла"
#: ../src/core/main.c:226 #: ../src/core/main.c:225
msgid "Make X calls synchronous" msgid "Make X calls synchronous"
msgstr "Сінхронна выконваць выклікі X-сістэмы" msgstr "Сінхронна выконваць выклікі X-сістэмы"
#: ../src/core/main.c:534 #: ../src/core/main.c:494
#, c-format #, c-format
msgid "Failed to scan themes directory: %s\n" msgid "Failed to scan themes directory: %s\n"
msgstr "Не ўдалося праглядзець каталог з матывамі аздаблення: %s\n" msgstr "Не ўдалося праглядзець каталог з матывамі аздаблення: %s\n"
#: ../src/core/main.c:550 #: ../src/core/main.c:510
#, c-format #, c-format
msgid "" msgid ""
"Could not find a theme! Be sure %s exists and contains the usual themes.\n" "Could not find a theme! Be sure %s exists and contains the usual themes.\n"
@@ -313,19 +313,6 @@ msgstr ""
"Не ўдалося адшукаць матыў аздаблення! Праверце, каб каталог %s існаваў і " "Не ўдалося адшукаць матыў аздаблення! Праверце, каб каталог %s існаваў і "
"змяшчаў звычайныя матывы.\n" "змяшчаў звычайныя матывы.\n"
#: ../src/core/monitor.c:711
msgid "Built-in display"
msgstr "Убудаваны дысплей"
#. TRANSLATORS: this is a monitor name (in case we don't know
#. the vendor), it's Unknown followed by a size in inches,
#. like 'Unknown 15"'
#.
#: ../src/core/monitor.c:739
#, c-format
msgid "Unknown %s"
msgstr "Невядомы %s"
#: ../src/core/mutter.c:40 #: ../src/core/mutter.c:40
#, c-format #, c-format
msgid "" msgid ""
@@ -350,7 +337,7 @@ msgstr "Вывесці нумар версіі праграмы"
msgid "Mutter plugin to use" msgid "Mutter plugin to use"
msgstr "Патрэбны плугін Mutter" msgstr "Патрэбны плугін Mutter"
#: ../src/core/prefs.c:1202 #: ../src/core/prefs.c:1087
msgid "" msgid ""
"Workarounds for broken applications disabled. Some applications may not " "Workarounds for broken applications disabled. Some applications may not "
"behave properly.\n" "behave properly.\n"
@@ -358,12 +345,12 @@ msgstr ""
"Асаблівыя паводзіны для некаторых хібных праграм выключаныя. Некаторыя " "Асаблівыя паводзіны для некаторых хібных праграм выключаныя. Некаторыя "
"праграмы могуць перастаць працаваць, як мае быць.\n" "праграмы могуць перастаць працаваць, як мае быць.\n"
#: ../src/core/prefs.c:1277 #: ../src/core/prefs.c:1162
#, c-format #, c-format
msgid "Could not parse font description \"%s\" from GSettings key %s\n" msgid "Could not parse font description \"%s\" from GSettings key %s\n"
msgstr "Не ўдалося разабраць азначэнне шрыфту \"%s\" з GSettings-ключа %s\n" msgstr "Не ўдалося разабраць азначэнне шрыфту \"%s\" з GSettings-ключа %s\n"
#: ../src/core/prefs.c:1343 #: ../src/core/prefs.c:1228
#, c-format #, c-format
msgid "" msgid ""
"\"%s\" found in configuration database is not a valid value for mouse button " "\"%s\" found in configuration database is not a valid value for mouse button "
@@ -372,7 +359,7 @@ msgstr ""
"Значэнне \"%s\", знойдзенае ў базе канфігурацыйных даных, не азначае " "Значэнне \"%s\", знойдзенае ў базе канфігурацыйных даных, не азначае "
"мадыфікатар мышынай кнопкі\n" "мадыфікатар мышынай кнопкі\n"
#: ../src/core/prefs.c:1909 #: ../src/core/prefs.c:1780
#, c-format #, c-format
msgid "" msgid ""
"\"%s\" found in configuration database is not a valid value for keybinding " "\"%s\" found in configuration database is not a valid value for keybinding "
@@ -381,17 +368,17 @@ msgstr ""
"Значэнне \"%s\", знойдзенае ў базе канфігурацыйных даных, не азначае " "Значэнне \"%s\", знойдзенае ў базе канфігурацыйных даных, не азначае "
"клавіятурны скарот \"%s\"\n" "клавіятурны скарот \"%s\"\n"
#: ../src/core/prefs.c:1999 #: ../src/core/prefs.c:1879
#, c-format #, c-format
msgid "Workspace %d" msgid "Workspace %d"
msgstr "Прастора працы %d" msgstr "Прастора працы %d"
#: ../src/core/screen.c:534 #: ../src/core/screen.c:673
#, c-format #, c-format
msgid "Screen %d on display '%s' is invalid\n" msgid "Screen %d on display '%s' is invalid\n"
msgstr "Экран %d на дысплеі \"%s\" хібны\n" msgstr "Экран %d на дысплеі \"%s\" хібны\n"
#: ../src/core/screen.c:550 #: ../src/core/screen.c:689
#, c-format #, c-format
msgid "" msgid ""
"Screen %d on display \"%s\" already has a window manager; try using the --" "Screen %d on display \"%s\" already has a window manager; try using the --"
@@ -400,19 +387,19 @@ msgstr ""
"Экран %d на дысплеі \"%s\" ужо мае аконнага кіраўніка. Каб замяніць яго " "Экран %d на дысплеі \"%s\" ужо мае аконнага кіраўніка. Каб замяніць яго "
"новым, дадайце опцыю --replace.\n" "новым, дадайце опцыю --replace.\n"
#: ../src/core/screen.c:577 #: ../src/core/screen.c:716
#, c-format #, c-format
msgid "" msgid ""
"Could not acquire window manager selection on screen %d display \"%s\"\n" "Could not acquire window manager selection on screen %d display \"%s\"\n"
msgstr "" msgstr ""
"Не ўдалося пераняць вылучэнне кіраўніка вокнаў для экрана %d дысплея \"%s\"\n" "Не ўдалося пераняць вылучэнне кіраўніка вокнаў для экрана %d дысплея \"%s\"\n"
#: ../src/core/screen.c:655 #: ../src/core/screen.c:794
#, c-format #, c-format
msgid "Screen %d on display \"%s\" already has a window manager\n" msgid "Screen %d on display \"%s\" already has a window manager\n"
msgstr "Экран %d на дысплеі \"%s\" ужо мае кіраўніка вокнаў\n" msgstr "Экран %d на дысплеі \"%s\" ужо мае кіраўніка вокнаў\n"
#: ../src/core/screen.c:846 #: ../src/core/screen.c:979
#, c-format #, c-format
msgid "Could not release screen %d on display \"%s\"\n" msgid "Could not release screen %d on display \"%s\"\n"
msgstr "Не ўдалося вызваліць экран %d на дысплеі \"%s\"\n" msgstr "Не ўдалося вызваліць экран %d на дысплеі \"%s\"\n"
@@ -473,45 +460,46 @@ msgstr ""
"Гэтыя вокны не падтрымліваюць функцыі захавання дзейнага ладу працы, і таму " "Гэтыя вокны не падтрымліваюць функцыі захавання дзейнага ладу працы, і таму "
"іх прыйдзецца запусціць уручную пасля наступнага ўваходу ў сістэму." "іх прыйдзецца запусціць уручную пасля наступнага ўваходу ў сістэму."
#: ../src/core/util.c:84 #: ../src/core/util.c:80
#, c-format #, c-format
msgid "Failed to open debug log: %s\n" msgid "Failed to open debug log: %s\n"
msgstr "Не ўдалося адкрыць адладачны журнал: %s\n" msgstr "Не ўдалося адкрыць адладачны журнал: %s\n"
#: ../src/core/util.c:94 #: ../src/core/util.c:90
#, c-format #, c-format
msgid "Failed to fdopen() log file %s: %s\n" msgid "Failed to fdopen() log file %s: %s\n"
msgstr "Не ўдалося выканаць fdopen() для журнальнага файла %s: %s\n" msgstr "Не ўдалося выканаць fdopen() для журнальнага файла %s: %s\n"
#: ../src/core/util.c:100 #: ../src/core/util.c:96
#, c-format #, c-format
msgid "Opened log file %s\n" msgid "Opened log file %s\n"
msgstr "Журнальны файл %s адкрыты\n" msgstr "Журнальны файл %s адкрыты\n"
#: ../src/core/util.c:119 #: ../src/core/util.c:115 ../src/tools/mutter-message.c:149
#, c-format
msgid "Mutter was compiled without support for verbose mode\n" msgid "Mutter was compiled without support for verbose mode\n"
msgstr "" msgstr ""
"Праграма \"Mutter\" была скампіляваная без падтрымкі падрабязнага " "Праграма \"Mutter\" была скампіляваная без падтрымкі падрабязнага "
"пратакаліравання\n" "пратакаліравання\n"
#: ../src/core/util.c:264 #: ../src/core/util.c:259
msgid "Window manager: " msgid "Window manager: "
msgstr "Кіраўнік вокнаў: " msgstr "Кіраўнік вокнаў: "
#: ../src/core/util.c:414 #: ../src/core/util.c:407
msgid "Bug in window manager: " msgid "Bug in window manager: "
msgstr "Хіба ў кіраўніку вокнаў: " msgstr "Хіба ў кіраўніку вокнаў: "
#: ../src/core/util.c:445 #: ../src/core/util.c:438
msgid "Window manager warning: " msgid "Window manager warning: "
msgstr "Перасцярога ад кіраўніка вокнаў: " msgstr "Перасцярога ад кіраўніка вокнаў: "
#: ../src/core/util.c:473 #: ../src/core/util.c:466
msgid "Window manager error: " msgid "Window manager error: "
msgstr "Памылка кіраўніка вокнаў: " msgstr "Памылка кіраўніка вокнаў: "
#. first time through #. first time through
#: ../src/core/window.c:7533 #: ../src/core/window.c:7539
#, c-format #, c-format
msgid "" msgid ""
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER " "Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
@@ -527,7 +515,7 @@ msgstr ""
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain #. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
#. * about these apps but make them work. #. * about these apps but make them work.
#. #.
#: ../src/core/window.c:8257 #: ../src/core/window.c:8263
#, c-format #, c-format
msgid "" msgid ""
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size " "Window %s sets an MWM hint indicating it isn't resizable, but sets min size "
@@ -537,22 +525,22 @@ msgstr ""
"памеру, але разам з гэтым прызначыла для сябе мінімальны памер %d x %d і " "памеру, але разам з гэтым прызначыла для сябе мінімальны памер %d x %d і "
"максімальны памер %d x %d. Такія паводзіны не маюць сэнсу.\n" "максімальны памер %d x %d. Такія паводзіны не маюць сэнсу.\n"
#: ../src/core/window-props.c:347 #: ../src/core/window-props.c:318
#, c-format #, c-format
msgid "Application set a bogus _NET_WM_PID %lu\n" msgid "Application set a bogus _NET_WM_PID %lu\n"
msgstr "Праграма прызначыла памылковае значэнне _NET_WM_PID %lu\n" msgstr "Праграма прызначыла памылковае значэнне _NET_WM_PID %lu\n"
#: ../src/core/window-props.c:463 #: ../src/core/window-props.c:434
#, c-format #, c-format
msgid "%s (on %s)" msgid "%s (on %s)"
msgstr "%s (на %s)" msgstr "%s (на %s)"
#: ../src/core/window-props.c:1546 #: ../src/core/window-props.c:1517
#, c-format #, c-format
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n" msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
msgstr "Для %2$s вызначана хібнае акно WM_TRANSIENT_FOR 0x%1$lx.\n" msgstr "Для %2$s вызначана хібнае акно WM_TRANSIENT_FOR 0x%1$lx.\n"
#: ../src/core/window-props.c:1557 #: ../src/core/window-props.c:1528
#, c-format #, c-format
msgid "WM_TRANSIENT_FOR window 0x%lx for %s would create loop.\n" msgid "WM_TRANSIENT_FOR window 0x%lx for %s would create loop.\n"
msgstr "WM_TRANSIENT_FOR акно 0x%lx для %s стварыла б цыкл.\n" msgstr "WM_TRANSIENT_FOR акно 0x%lx для %s стварыла б цыкл.\n"
@@ -701,8 +689,7 @@ msgstr ""
#: ../src/org.gnome.mutter.gschema.xml.in.h:17 #: ../src/org.gnome.mutter.gschema.xml.in.h:17
msgid "Auto maximize nearly monitor sized windows" msgid "Auto maximize nearly monitor sized windows"
msgstr "" msgstr "Аўтаматычна максімалізаваць вокны, якія расцягнутыя амаль на ўвесь экран"
"Аўтаматычна максімалізаваць вокны, якія расцягнутыя амаль на ўвесь экран"
#: ../src/org.gnome.mutter.gschema.xml.in.h:18 #: ../src/org.gnome.mutter.gschema.xml.in.h:18
msgid "" msgid ""
@@ -720,104 +707,109 @@ msgstr "Выбраць акно з выплыўнога акенца"
msgid "Cancel tab popup" msgid "Cancel tab popup"
msgstr "Закрыць выплыўное акенца" msgstr "Закрыць выплыўное акенца"
#: ../src/tools/mutter-message.c:123
#, c-format
msgid "Usage: %s\n"
msgstr "Правілы выкарыстання: %s\n"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:67 #: ../src/ui/menu.c:69
msgid "Mi_nimize" msgid "Mi_nimize"
msgstr "_Мінімалізаваць" msgstr "_Мінімалізаваць"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:69 #: ../src/ui/menu.c:71
msgid "Ma_ximize" msgid "Ma_ximize"
msgstr "Масімалізаваць" msgstr "Масімалізаваць"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:71 #: ../src/ui/menu.c:73
msgid "Unma_ximize" msgid "Unma_ximize"
msgstr "Скасаваць масімалізацыю" msgstr "Скасаваць масімалізацыю"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:73 #: ../src/ui/menu.c:75
msgid "Roll _Up" msgid "Roll _Up"
msgstr "_Скруціць акно ў загаловак" msgstr "_Скруціць акно ў загаловак"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:75 #: ../src/ui/menu.c:77
msgid "_Unroll" msgid "_Unroll"
msgstr "Расруціць акно з загалоўка" msgstr "Расруціць акно з загалоўка"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:77 #: ../src/ui/menu.c:79
msgid "_Move" msgid "_Move"
msgstr "_Перамясціць акно" msgstr "_Перамясціць акно"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:79 #: ../src/ui/menu.c:81
msgid "_Resize" msgid "_Resize"
msgstr "_Змяніць памер акна" msgstr "_Змяніць памер акна"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:81 #: ../src/ui/menu.c:83
msgid "Move Titlebar On_screen" msgid "Move Titlebar On_screen"
msgstr "Перамясціць загаловак акна па _экране" msgstr "Перамясціць загаловак акна па _экране"
#. separator #. separator
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:84 ../src/ui/menu.c:86 #: ../src/ui/menu.c:86 ../src/ui/menu.c:88
msgid "Always on _Top" msgid "Always on _Top"
msgstr "Заўсёды _наверсе" msgstr "Заўсёды _наверсе"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:88 #: ../src/ui/menu.c:90
msgid "_Always on Visible Workspace" msgid "_Always on Visible Workspace"
msgstr "Заўсёды на _бачнай прасторы працы" msgstr "Заўсёды на _бачнай прасторы працы"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:90 #: ../src/ui/menu.c:92
msgid "_Only on This Workspace" msgid "_Only on This Workspace"
msgstr "_Толькі на гэтай прасторы працы" msgstr "_Толькі на гэтай прасторы працы"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:92 #: ../src/ui/menu.c:94
msgid "Move to Workspace _Left" msgid "Move to Workspace _Left"
msgstr "Перамясціць на прастору працы з_лева" msgstr "Перамясціць на прастору працы з_лева"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:94 #: ../src/ui/menu.c:96
msgid "Move to Workspace R_ight" msgid "Move to Workspace R_ight"
msgstr "Перамясціць на прастору працы с_права" msgstr "Перамясціць на прастору працы с_права"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:96 #: ../src/ui/menu.c:98
msgid "Move to Workspace _Up" msgid "Move to Workspace _Up"
msgstr "Перамясціць на прастору працы з_верху" msgstr "Перамясціць на прастору працы з_верху"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:98 #: ../src/ui/menu.c:100
msgid "Move to Workspace _Down" msgid "Move to Workspace _Down"
msgstr "Перамясціць на прастору працы з_нізу" msgstr "Перамясціць на прастору працы з_нізу"
#. separator #. separator
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:102 #: ../src/ui/menu.c:104
msgid "_Close" msgid "_Close"
msgstr "_Закрыць акно" msgstr "_Закрыць акно"
#: ../src/ui/menu.c:202 #: ../src/ui/menu.c:204
#, c-format #, c-format
msgid "Workspace %d%n" msgid "Workspace %d%n"
msgstr "Прастора працы %d%n" msgstr "Прастора працы %d%n"
#: ../src/ui/menu.c:212 #: ../src/ui/menu.c:214
#, c-format #, c-format
msgid "Workspace 1_0" msgid "Workspace 1_0"
msgstr "Прастора працы 1_0" msgstr "Прастора працы 1_0"
#: ../src/ui/menu.c:214 #: ../src/ui/menu.c:216
#, c-format #, c-format
msgid "Workspace %s%d" msgid "Workspace %s%d"
msgstr "Прастора працы %s%d" msgstr "Прастора працы %s%d"
#: ../src/ui/menu.c:384 #: ../src/ui/menu.c:397
msgid "Move to Another _Workspace" msgid "Move to Another _Workspace"
msgstr "П_ерамясціць на іншую прастору працы" msgstr "П_ерамясціць на іншую прастору працы"
@@ -919,49 +911,49 @@ msgstr "Mod5"
msgid "%d x %d" msgid "%d x %d"
msgstr "%d x %d" msgstr "%d x %d"
#: ../src/ui/theme.c:236 #: ../src/ui/theme.c:235
msgid "top" msgid "top"
msgstr "верхнюю" msgstr "верхнюю"
#: ../src/ui/theme.c:238 #: ../src/ui/theme.c:237
msgid "bottom" msgid "bottom"
msgstr "ніжнюю" msgstr "ніжнюю"
#: ../src/ui/theme.c:240 #: ../src/ui/theme.c:239
msgid "left" msgid "left"
msgstr "левую" msgstr "левую"
#: ../src/ui/theme.c:242 #: ../src/ui/theme.c:241
msgid "right" msgid "right"
msgstr "правую" msgstr "правую"
#: ../src/ui/theme.c:270 #: ../src/ui/theme.c:269
#, c-format #, c-format
msgid "frame geometry does not specify \"%s\" dimension" msgid "frame geometry does not specify \"%s\" dimension"
msgstr "апісанне геаметрыі рамкі акна не вызначае %s граніцу" msgstr "апісанне геаметрыі рамкі акна не вызначае %s граніцу"
#: ../src/ui/theme.c:289 #: ../src/ui/theme.c:288
#, c-format #, c-format
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\"" msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
msgstr "" msgstr ""
"апісанне геаметрыі рамкі акна не вызначае %s граніцу для аблямоўкі \"%s\"" "апісанне геаметрыі рамкі акна не вызначае %s граніцу для аблямоўкі \"%s\""
#: ../src/ui/theme.c:326 #: ../src/ui/theme.c:325
#, c-format #, c-format
msgid "Button aspect ratio %g is not reasonable" msgid "Button aspect ratio %g is not reasonable"
msgstr "Прапорцыі кнопкі %g не маюць сэнсу" msgstr "Прапорцыі кнопкі %g не маюць сэнсу"
#: ../src/ui/theme.c:338 #: ../src/ui/theme.c:337
#, c-format #, c-format
msgid "Frame geometry does not specify size of buttons" msgid "Frame geometry does not specify size of buttons"
msgstr "Апісанне геаметрыі рамкі акна не вызначае памер кнопак" msgstr "Апісанне геаметрыі рамкі акна не вызначае памер кнопак"
#: ../src/ui/theme.c:1051 #: ../src/ui/theme.c:1050
#, c-format #, c-format
msgid "Gradients should have at least two colors" msgid "Gradients should have at least two colors"
msgstr "Градыент мусіць мець прынамсі два колеры" msgstr "Градыент мусіць мець прынамсі два колеры"
#: ../src/ui/theme.c:1203 #: ../src/ui/theme.c:1202
#, c-format #, c-format
msgid "" msgid ""
"GTK custom color specification must have color name and fallback in " "GTK custom color specification must have color name and fallback in "
@@ -970,7 +962,7 @@ msgstr ""
"Уласная спецыфікацыя колеру GTK мусіць змяшчаць назвы асноўнага і запаснога " "Уласная спецыфікацыя колеру GTK мусіць змяшчаць назвы асноўнага і запаснога "
"колераў у дужках, напрыклад, gtk:custom(foo,bar). Не ўдалося разабраць \"%s\"" "колераў у дужках, напрыклад, gtk:custom(foo,bar). Не ўдалося разабраць \"%s\""
#: ../src/ui/theme.c:1219 #: ../src/ui/theme.c:1218
#, c-format #, c-format
msgid "" msgid ""
"Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-" "Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-"
@@ -979,7 +971,7 @@ msgstr ""
"Хібны знак \"%c\" у параметры color_name спецыфікацыі gtk:custom, дазволеныя " "Хібны знак \"%c\" у параметры color_name спецыфікацыі gtk:custom, дазволеныя "
"толькі A-Za-z0-9-_" "толькі A-Za-z0-9-_"
#: ../src/ui/theme.c:1233 #: ../src/ui/theme.c:1232
#, c-format #, c-format
msgid "" msgid ""
"Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not " "Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not "
@@ -988,7 +980,7 @@ msgstr ""
"Фармат gtk:custom: \"gtk:custom(назваолеруапасны_колер)\"; \"%s\" не " "Фармат gtk:custom: \"gtk:custom(назваолеруапасны_колер)\"; \"%s\" не "
"адпавядае фармату" "адпавядае фармату"
#: ../src/ui/theme.c:1278 #: ../src/ui/theme.c:1277
#, c-format #, c-format
msgid "" msgid ""
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] " "GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
@@ -997,7 +989,7 @@ msgstr ""
"Спецыфікацыя колеру GTK мусіць мець стан у квадратных дужках, напрыклад, gtk:" "Спецыфікацыя колеру GTK мусіць мець стан у квадратных дужках, напрыклад, gtk:"
"fg[NORMAL], дзе NORMAL - гэта стан. Не ўдалося разабраць \"%s\"" "fg[NORMAL], дзе NORMAL - гэта стан. Не ўдалося разабраць \"%s\""
#: ../src/ui/theme.c:1292 #: ../src/ui/theme.c:1291
#, c-format #, c-format
msgid "" msgid ""
"GTK color specification must have a close bracket after the state, e.g. gtk:" "GTK color specification must have a close bracket after the state, e.g. gtk:"
@@ -1007,17 +999,17 @@ msgstr ""
"напрыклад, gtk:fg[NORMAL], дзе NORMAL - гэта стан. Не ўдалося разабраць \"%s" "напрыклад, gtk:fg[NORMAL], дзе NORMAL - гэта стан. Не ўдалося разабраць \"%s"
"\"" "\""
#: ../src/ui/theme.c:1303 #: ../src/ui/theme.c:1302
#, c-format #, c-format
msgid "Did not understand state \"%s\" in color specification" msgid "Did not understand state \"%s\" in color specification"
msgstr "Незразумелы стан \"%s\" у спецыфікацыі колеру" msgstr "Незразумелы стан \"%s\" у спецыфікацыі колеру"
#: ../src/ui/theme.c:1316 #: ../src/ui/theme.c:1315
#, c-format #, c-format
msgid "Did not understand color component \"%s\" in color specification" msgid "Did not understand color component \"%s\" in color specification"
msgstr "Незразумелы складнік колеру \"%s\" у спецыфікацыі колеру" msgstr "Незразумелы складнік колеру \"%s\" у спецыфікацыі колеру"
#: ../src/ui/theme.c:1345 #: ../src/ui/theme.c:1344
#, c-format #, c-format
msgid "" msgid ""
"Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the " "Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the "
@@ -1026,58 +1018,58 @@ msgstr ""
"Фармат змяшанага колеру - \"blend/bg_color/fg_color/alpha\". \"%s\" не " "Фармат змяшанага колеру - \"blend/bg_color/fg_color/alpha\". \"%s\" не "
"адпавядае фармату." "адпавядае фармату."
#: ../src/ui/theme.c:1356 #: ../src/ui/theme.c:1355
#, c-format #, c-format
msgid "Could not parse alpha value \"%s\" in blended color" msgid "Could not parse alpha value \"%s\" in blended color"
msgstr "Не ўдалося разабраць значэнне альфа \"%s\" ў змяшаным колеры" msgstr "Не ўдалося разабраць значэнне альфа \"%s\" ў змяшаным колеры"
#: ../src/ui/theme.c:1366 #: ../src/ui/theme.c:1365
#, c-format #, c-format
msgid "Alpha value \"%s\" in blended color is not between 0.0 and 1.0" msgid "Alpha value \"%s\" in blended color is not between 0.0 and 1.0"
msgstr "" msgstr ""
"Значэнне альфа \"%s\" у змяшаным колеры не ўваходзіць у дыяпазон ад 0.0 да " "Значэнне альфа \"%s\" у змяшаным колеры не ўваходзіць у дыяпазон ад 0.0 да "
"1.0" "1.0"
#: ../src/ui/theme.c:1413 #: ../src/ui/theme.c:1412
#, c-format #, c-format
msgid "" msgid ""
"Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format" "Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format"
msgstr "" msgstr ""
"Фармат ценю - \"shade/base_color/factor\". \"%s\" не адпавядае фармату." "Фармат ценю - \"shade/base_color/factor\". \"%s\" не адпавядае фармату."
#: ../src/ui/theme.c:1424 #: ../src/ui/theme.c:1423
#, c-format #, c-format
msgid "Could not parse shade factor \"%s\" in shaded color" msgid "Could not parse shade factor \"%s\" in shaded color"
msgstr "Не ўдалося разабраць каэфіцыент ценю \"%s\" у зацененым колеры" msgstr "Не ўдалося разабраць каэфіцыент ценю \"%s\" у зацененым колеры"
#: ../src/ui/theme.c:1434 #: ../src/ui/theme.c:1433
#, c-format #, c-format
msgid "Shade factor \"%s\" in shaded color is negative" msgid "Shade factor \"%s\" in shaded color is negative"
msgstr "Каэфіцыент ценю \"%s\" у зацененым колеры адмоўны" msgstr "Каэфіцыент ценю \"%s\" у зацененым колеры адмоўны"
#: ../src/ui/theme.c:1463 #: ../src/ui/theme.c:1462
#, c-format #, c-format
msgid "Could not parse color \"%s\"" msgid "Could not parse color \"%s\""
msgstr "Не ўдалося разабраць колер \"%s\"" msgstr "Не ўдалося разабраць колер \"%s\""
#: ../src/ui/theme.c:1780 #: ../src/ui/theme.c:1779
#, c-format #, c-format
msgid "Coordinate expression contains character '%s' which is not allowed" msgid "Coordinate expression contains character '%s' which is not allowed"
msgstr "Каардынатны выраз змяшчае забаронены знак \"%s\"" msgstr "Каардынатны выраз змяшчае забаронены знак \"%s\""
#: ../src/ui/theme.c:1807 #: ../src/ui/theme.c:1806
#, c-format #, c-format
msgid "" msgid ""
"Coordinate expression contains floating point number '%s' which could not be " "Coordinate expression contains floating point number '%s' which could not be "
"parsed" "parsed"
msgstr "Каардынатны выраз змяшчае незразумелы лік з нефіксаванай коскай \"%s\"" msgstr "Каардынатны выраз змяшчае незразумелы лік з нефіксаванай коскай \"%s\""
#: ../src/ui/theme.c:1821 #: ../src/ui/theme.c:1820
#, c-format #, c-format
msgid "Coordinate expression contains integer '%s' which could not be parsed" msgid "Coordinate expression contains integer '%s' which could not be parsed"
msgstr "Каардынатны выраз змяшчае незразумелы цэлы лік \"%s\"" msgstr "Каардынатны выраз змяшчае незразумелы цэлы лік \"%s\""
#: ../src/ui/theme.c:1942 #: ../src/ui/theme.c:1941
#, c-format #, c-format
msgid "" msgid ""
"Coordinate expression contained unknown operator at the start of this text: " "Coordinate expression contained unknown operator at the start of this text: "
@@ -1085,17 +1077,17 @@ msgid ""
msgstr "" msgstr ""
"Каардынатны выраз змяшчае невядомы аператар у пачатку гэтага тэксту: \"%s\"" "Каардынатны выраз змяшчае невядомы аператар у пачатку гэтага тэксту: \"%s\""
#: ../src/ui/theme.c:1999 #: ../src/ui/theme.c:1998
#, c-format #, c-format
msgid "Coordinate expression was empty or not understood" msgid "Coordinate expression was empty or not understood"
msgstr "Каардынатны выраз пусты ці незразумелы" msgstr "Каардынатны выраз пусты ці незразумелы"
#: ../src/ui/theme.c:2112 ../src/ui/theme.c:2122 ../src/ui/theme.c:2156 #: ../src/ui/theme.c:2111 ../src/ui/theme.c:2121 ../src/ui/theme.c:2155
#, c-format #, c-format
msgid "Coordinate expression results in division by zero" msgid "Coordinate expression results in division by zero"
msgstr "Каардынатны выраз вымагае дзялення на нуль" msgstr "Каардынатны выраз вымагае дзялення на нуль"
#: ../src/ui/theme.c:2164 #: ../src/ui/theme.c:2163
#, c-format #, c-format
msgid "" msgid ""
"Coordinate expression tries to use mod operator on a floating-point number" "Coordinate expression tries to use mod operator on a floating-point number"
@@ -1103,24 +1095,24 @@ msgstr ""
"Каардынатны выраз спрабуе ўжыць аператар дзялення па модулі для ліку з " "Каардынатны выраз спрабуе ўжыць аператар дзялення па модулі для ліку з "
"нефіксаванай коскай" "нефіксаванай коскай"
#: ../src/ui/theme.c:2220 #: ../src/ui/theme.c:2219
#, c-format #, c-format
msgid "" msgid ""
"Coordinate expression has an operator \"%s\" where an operand was expected" "Coordinate expression has an operator \"%s\" where an operand was expected"
msgstr "" msgstr ""
"У каардынатным выразе ўжыты аператар \"%s\" там, дзе мусіў быць аперанд" "У каардынатным выразе ўжыты аператар \"%s\" там, дзе мусіў быць аперанд"
#: ../src/ui/theme.c:2229 #: ../src/ui/theme.c:2228
#, c-format #, c-format
msgid "Coordinate expression had an operand where an operator was expected" msgid "Coordinate expression had an operand where an operator was expected"
msgstr "У каардынатным выразе ўжыты аперанд там, дзе мусіў быць аператар" msgstr "У каардынатным выразе ўжыты аперанд там, дзе мусіў быць аператар"
#: ../src/ui/theme.c:2237 #: ../src/ui/theme.c:2236
#, c-format #, c-format
msgid "Coordinate expression ended with an operator instead of an operand" msgid "Coordinate expression ended with an operator instead of an operand"
msgstr "Каардынатны выраз заканчваецца аператарам, а не аперандам" msgstr "Каардынатны выраз заканчваецца аператарам, а не аперандам"
#: ../src/ui/theme.c:2247 #: ../src/ui/theme.c:2246
#, c-format #, c-format
msgid "" msgid ""
"Coordinate expression has operator \"%c\" following operator \"%c\" with no " "Coordinate expression has operator \"%c\" following operator \"%c\" with no "
@@ -1129,41 +1121,41 @@ msgstr ""
"У каардынатным выразе за аператарам \"%c\" ідзе аператар \"%c\", але паміж " "У каардынатным выразе за аператарам \"%c\" ідзе аператар \"%c\", але паміж "
"імі няма аперанда" "імі няма аперанда"
#: ../src/ui/theme.c:2398 ../src/ui/theme.c:2443 #: ../src/ui/theme.c:2397 ../src/ui/theme.c:2442
#, c-format #, c-format
msgid "Coordinate expression had unknown variable or constant \"%s\"" msgid "Coordinate expression had unknown variable or constant \"%s\""
msgstr "У каардынатным выразе невядомая зменная альбо канстанта \"%s\"" msgstr "У каардынатным выразе невядомая зменная альбо канстанта \"%s\""
#: ../src/ui/theme.c:2497 #: ../src/ui/theme.c:2496
#, c-format #, c-format
msgid "Coordinate expression parser overflowed its buffer." msgid "Coordinate expression parser overflowed its buffer."
msgstr "Прылада для разбору каардынатных выразаў перапоўніла свой буфер." msgstr "Прылада для разбору каардынатных выразаў перапоўніла свой буфер."
#: ../src/ui/theme.c:2526 #: ../src/ui/theme.c:2525
#, c-format #, c-format
msgid "Coordinate expression had a close parenthesis with no open parenthesis" msgid "Coordinate expression had a close parenthesis with no open parenthesis"
msgstr "" msgstr ""
"У каардынатным выразе ўжытыя дужкі, якія закрываюцца, але няма тых, якія б " "У каардынатным выразе ўжытыя дужкі, якія закрываюцца, але няма тых, якія б "
"адкрываліся" "адкрываліся"
#: ../src/ui/theme.c:2590 #: ../src/ui/theme.c:2589
#, c-format #, c-format
msgid "Coordinate expression had an open parenthesis with no close parenthesis" msgid "Coordinate expression had an open parenthesis with no close parenthesis"
msgstr "" msgstr ""
"У каардынатным выразе ўжытыя дужкі, якія адкрываюцца, але няма тых, якія б " "У каардынатным выразе ўжытыя дужкі, якія адкрываюцца, але няма тых, якія б "
"закрываліся" "закрываліся"
#: ../src/ui/theme.c:2601 #: ../src/ui/theme.c:2600
#, c-format #, c-format
msgid "Coordinate expression doesn't seem to have any operators or operands" msgid "Coordinate expression doesn't seem to have any operators or operands"
msgstr "У каардынатным выразе няма ні аператараў, ні аперандаў" msgstr "У каардынатным выразе няма ні аператараў, ні аперандаў"
#: ../src/ui/theme.c:2814 ../src/ui/theme.c:2834 ../src/ui/theme.c:2854 #: ../src/ui/theme.c:2813 ../src/ui/theme.c:2833 ../src/ui/theme.c:2853
#, c-format #, c-format
msgid "Theme contained an expression that resulted in an error: %s\n" msgid "Theme contained an expression that resulted in an error: %s\n"
msgstr "Матыў аздаблення змяшчае выраз, які стаў прычынай памылкі: %s\n" msgstr "Матыў аздаблення змяшчае выраз, які стаў прычынай памылкі: %s\n"
#: ../src/ui/theme.c:4500 #: ../src/ui/theme.c:4499
#, c-format #, c-format
msgid "" msgid ""
"<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be " "<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be "
@@ -1172,25 +1164,25 @@ msgstr ""
"Для гэтага стылю рамкі трэба вызначыць <button function=\"%s\" state=\"%s\" " "Для гэтага стылю рамкі трэба вызначыць <button function=\"%s\" state=\"%s\" "
"draw_ops=\"whatever\"/>" "draw_ops=\"whatever\"/>"
#: ../src/ui/theme.c:5011 ../src/ui/theme.c:5036 #: ../src/ui/theme.c:5010 ../src/ui/theme.c:5035
#, c-format #, c-format
msgid "" msgid ""
"Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>" "Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
msgstr "" msgstr ""
"Няма <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"што-небудзь\"/>" "Няма <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"што-небудзь\"/>"
#: ../src/ui/theme.c:5082 #: ../src/ui/theme.c:5083
#, c-format #, c-format
msgid "Failed to load theme \"%s\": %s\n" msgid "Failed to load theme \"%s\": %s\n"
msgstr "Не ўдалося загрузіць матыў аздаблення \"%s\": %s\n" msgstr "Не ўдалося загрузіць матыў аздаблення \"%s\": %s\n"
#: ../src/ui/theme.c:5218 ../src/ui/theme.c:5225 ../src/ui/theme.c:5232 #: ../src/ui/theme.c:5219 ../src/ui/theme.c:5226 ../src/ui/theme.c:5233
#: ../src/ui/theme.c:5239 ../src/ui/theme.c:5246 #: ../src/ui/theme.c:5240 ../src/ui/theme.c:5247
#, c-format #, c-format
msgid "No <%s> set for theme \"%s\"" msgid "No <%s> set for theme \"%s\""
msgstr "Для матыву аздаблення \"%2$s\" не прызначана <%1$s>" msgstr "Для матыву аздаблення \"%2$s\" не прызначана <%1$s>"
#: ../src/ui/theme.c:5254 #: ../src/ui/theme.c:5255
#, c-format #, c-format
msgid "" msgid ""
"No frame style set for window type \"%s\" in theme \"%s\", add a <window " "No frame style set for window type \"%s\" in theme \"%s\", add a <window "
@@ -1199,7 +1191,7 @@ msgstr ""
"Стыль рамкі не вызначаны для вокнаў тыпу \"%s\" для матыву аздаблення \"%s" "Стыль рамкі не вызначаны для вокнаў тыпу \"%s\" для матыву аздаблення \"%s"
"\". Дадайце <window type=\"%s\" style_set=\"штосьці\"/>." "\". Дадайце <window type=\"%s\" style_set=\"штосьці\"/>."
#: ../src/ui/theme.c:5661 ../src/ui/theme.c:5723 ../src/ui/theme.c:5786 #: ../src/ui/theme.c:5662 ../src/ui/theme.c:5724 ../src/ui/theme.c:5787
#, c-format #, c-format
msgid "" msgid ""
"User-defined constants must begin with a capital letter; \"%s\" does not" "User-defined constants must begin with a capital letter; \"%s\" does not"
@@ -1207,7 +1199,7 @@ msgstr ""
"Назвы канстантаў, вызначаных карыстальнікам, мусяць пачынацца з вялікай " "Назвы канстантаў, вызначаных карыстальнікам, мусяць пачынацца з вялікай "
"літары. \"%s\" не адпавядае гэтаму патрабаванню." "літары. \"%s\" не адпавядае гэтаму патрабаванню."
#: ../src/ui/theme.c:5669 ../src/ui/theme.c:5731 ../src/ui/theme.c:5794 #: ../src/ui/theme.c:5670 ../src/ui/theme.c:5732 ../src/ui/theme.c:5795
#, c-format #, c-format
msgid "Constant \"%s\" has already been defined" msgid "Constant \"%s\" has already been defined"
msgstr "Канстанта \"%s\" ужо азначана" msgstr "Канстанта \"%s\" ужо азначана"
@@ -1593,8 +1585,207 @@ msgstr "Выкарыстанне тэксту ўнутры элемента <%s>
msgid "<%s> specified twice for this theme" msgid "<%s> specified twice for this theme"
msgstr "<%s> двойчы вызначаны для гэтага матыву аздаблення" msgstr "<%s> двойчы вызначаны для гэтага матыву аздаблення"
#: ../src/ui/theme-parser.c:4336 #: ../src/ui/theme-parser.c:4334
#, c-format #, c-format
msgid "Failed to find a valid file for theme %s\n" msgid "Failed to find a valid file for theme %s\n"
msgstr "Памылка пошуку правільнага файла для матыву аздаблення %s\n" msgstr "Памылка пошуку правільнага файла для матыву аздаблення %s\n"
#: ../src/ui/theme-viewer.c:99
msgid "_Windows"
msgstr "_Вокны"
#: ../src/ui/theme-viewer.c:100
msgid "_Dialog"
msgstr "_Дыялогавае акенца"
#: ../src/ui/theme-viewer.c:101
msgid "_Modal dialog"
msgstr "_Мадальнае дыялогавае акенца"
#: ../src/ui/theme-viewer.c:102
msgid "_Utility"
msgstr "_Дапаможная праграма"
#: ../src/ui/theme-viewer.c:103
msgid "_Splashscreen"
msgstr "_Экранная застаўка"
#: ../src/ui/theme-viewer.c:104
msgid "_Top dock"
msgstr "_Верхняя ўбудова"
#: ../src/ui/theme-viewer.c:105
msgid "_Bottom dock"
msgstr "_Ніжняя ўбудова"
#: ../src/ui/theme-viewer.c:106
msgid "_Left dock"
msgstr "_Левая ўбудова"
#: ../src/ui/theme-viewer.c:107
msgid "_Right dock"
msgstr "_Правая ўбудова"
#: ../src/ui/theme-viewer.c:108
msgid "_All docks"
msgstr "_Усе ўбудовы"
#: ../src/ui/theme-viewer.c:109
msgid "Des_ktop"
msgstr "_Стол"
#: ../src/ui/theme-viewer.c:115
msgid "Open another one of these windows"
msgstr "Адкрыць чарговае з гэтых вокнаў"
#: ../src/ui/theme-viewer.c:117
msgid "This is a demo button with an 'open' icon"
msgstr "Гэта дэманстрацыйная кнопка са значком \"Адкрыць\""
#: ../src/ui/theme-viewer.c:119
msgid "This is a demo button with a 'quit' icon"
msgstr "Гэта дэманстрацыйная кнопка са значком \"Выйсці\""
#: ../src/ui/theme-viewer.c:248
msgid "This is a sample message in a sample dialog"
msgstr "Гэта ўзорнае паведамленне ва ўзорным дыялогавым акенцы"
#: ../src/ui/theme-viewer.c:328
#, c-format
msgid "Fake menu item %d\n"
msgstr "Несапраўдны пункт меню %d\n"
#: ../src/ui/theme-viewer.c:363
msgid "Border-only window"
msgstr "Акно толькі з аблямоўкай"
#: ../src/ui/theme-viewer.c:365
msgid "Bar"
msgstr "Стужка"
#: ../src/ui/theme-viewer.c:382
msgid "Normal Application Window"
msgstr "Звычайнае акно праграмы"
#: ../src/ui/theme-viewer.c:386
msgid "Dialog Box"
msgstr "Дыялогавае акенца"
#: ../src/ui/theme-viewer.c:390
msgid "Modal Dialog Box"
msgstr "Мадальнае дыялогавае акенца"
#: ../src/ui/theme-viewer.c:394
msgid "Utility Palette"
msgstr "Дапаможная палітра"
#: ../src/ui/theme-viewer.c:398
msgid "Torn-off Menu"
msgstr "Адчэпленае меню"
#: ../src/ui/theme-viewer.c:402
msgid "Border"
msgstr "Аблямоўка"
#: ../src/ui/theme-viewer.c:406
msgid "Attached Modal Dialog"
msgstr "Прычапленае мадальнае дыялогавае акенца"
#: ../src/ui/theme-viewer.c:737
#, c-format
msgid "Button layout test %d"
msgstr "Выпрабаванне размяшчэння кнопак %d"
#: ../src/ui/theme-viewer.c:766
#, c-format
msgid "%g milliseconds to draw one window frame"
msgstr "%g мілісекунд, каб намаляваць адну рамку акна"
#: ../src/ui/theme-viewer.c:811
#, c-format
msgid "Usage: metacity-theme-viewer [THEMENAME]\n"
msgstr "Правілы карыстання: metacity-theme-viewer [НАЗВА_МАТЫВУ]\n"
#: ../src/ui/theme-viewer.c:818
#, c-format
msgid "Error loading theme: %s\n"
msgstr "Памылка загрузкі матыву аздаблення: %s\n"
#: ../src/ui/theme-viewer.c:824
#, c-format
msgid "Loaded theme \"%s\" in %g seconds\n"
msgstr "Матыў аздаблення \"%s\" загружаны за %g секунд\n"
#: ../src/ui/theme-viewer.c:869
msgid "Normal Title Font"
msgstr "Звычайны шрыфт загалоўка"
#: ../src/ui/theme-viewer.c:875
msgid "Small Title Font"
msgstr "Маленькі шрыфт загалоўка"
#: ../src/ui/theme-viewer.c:881
msgid "Large Title Font"
msgstr "Вялікі шрыфт загалоўка"
#: ../src/ui/theme-viewer.c:886
msgid "Button Layouts"
msgstr "Размяшчэнне кнопак"
#: ../src/ui/theme-viewer.c:891
msgid "Benchmark"
msgstr "Выпрабаванне"
#: ../src/ui/theme-viewer.c:947
msgid "Window Title Goes Here"
msgstr "Месца для загалоўка акна"
#: ../src/ui/theme-viewer.c:1053
#, c-format
msgid ""
"Drew %d frames in %g client-side seconds (%g milliseconds per frame) and %g "
"seconds wall clock time including X server resources (%g milliseconds per "
"frame)\n"
msgstr ""
"Намалявана %d рамак цягам %g секунд кліенцкага часу (%g мілісекунд на рамку) "
"і %g секунд каляндарнага часу, уключна з рэсурсамі X-сервера (%g мілісекунд "
"на рамку)\n"
#: ../src/ui/theme-viewer.c:1273
msgid "position expression test returned TRUE but set error"
msgstr "выпрабаванне выразу пазіцыі вярнула TRUE, але паведаміла аб памылцы"
#: ../src/ui/theme-viewer.c:1275
msgid "position expression test returned FALSE but didn't set error"
msgstr ""
"выпрабаванне выразу пазіцыі вярнула FALSE, але не паведаміла аб памылцы"
#: ../src/ui/theme-viewer.c:1279
msgid "Error was expected but none given"
msgstr "Чакалася памылка, але звесткі не атрыманыя"
#: ../src/ui/theme-viewer.c:1281
#, c-format
msgid "Error %d was expected but %d given"
msgstr "Чакалася памылка %d, але атрымана %d"
#: ../src/ui/theme-viewer.c:1287
#, c-format
msgid "Error not expected but one was returned: %s"
msgstr "Атрымана нечаканая памылка: %s"
#: ../src/ui/theme-viewer.c:1291
#, c-format
msgid "x value was %d, %d was expected"
msgstr "X-значэнне было %d, а чакалася %d"
#: ../src/ui/theme-viewer.c:1294
#, c-format
msgid "y value was %d, %d was expected"
msgstr "Y-значэнне было %d, а чакалася %d"
#: ../src/ui/theme-viewer.c:1359
#, c-format
msgid "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
msgstr ""
"%d каардынатных выразаў разабраныя за %g секунд (у сярэднім %g секунд)\n"

2973
po/ca.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

735
po/cs.po

File diff suppressed because it is too large Load Diff

771
po/da.po

File diff suppressed because it is too large Load Diff

901
po/de.po

File diff suppressed because it is too large Load Diff

1359
po/el.po

File diff suppressed because it is too large Load Diff

1247
po/es.po

File diff suppressed because it is too large Load Diff

231
po/et.po
View File

@@ -14,8 +14,8 @@ msgstr ""
"Project-Id-Version: mutter MASTER\n" "Project-Id-Version: mutter MASTER\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n" "product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2013-09-10 15:25+0000\n" "POT-Creation-Date: 2013-03-12 18:53+0000\n"
"PO-Revision-Date: 2013-09-11 23:20+0300\n" "PO-Revision-Date: 2013-03-12 20:55+0300\n"
"Last-Translator: Mattias Põldaru <mahfiaz@gmail.com>\n" "Last-Translator: Mattias Põldaru <mahfiaz@gmail.com>\n"
"Language-Team: Estonian <>\n" "Language-Team: Estonian <>\n"
"Language: et\n" "Language: et\n"
@@ -23,7 +23,6 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n" "Plural-Forms: nplurals=2; plural=(n!=1);\n"
"X-Generator: Poedit 1.5.4\n"
msgid "Navigation" msgid "Navigation"
msgstr "Navigeerimine" msgstr "Navigeerimine"
@@ -250,17 +249,6 @@ msgid ""
msgstr "" msgstr ""
"Teemat ei leitud! Veendu, et %s on olemas ja sisaldab harilikke teemasid.\n" "Teemat ei leitud! Veendu, et %s on olemas ja sisaldab harilikke teemasid.\n"
msgid "Built-in display"
msgstr "Sisseehitatud kuva"
#. TRANSLATORS: this is a monitor name (in case we don't know
#. the vendor), it's Unknown followed by a size in inches,
#. like 'Unknown 15"'
#.
#, c-format
msgid "Unknown %s"
msgstr "Tundmatu %s"
#, c-format #, c-format
msgid "" msgid ""
"mutter %s\n" "mutter %s\n"
@@ -393,6 +381,7 @@ msgstr "Tõrge logifaili %s avamisel funktsiooniga fdopen(): %s\n"
msgid "Opened log file %s\n" msgid "Opened log file %s\n"
msgstr "Avati logifail %s\n" msgstr "Avati logifail %s\n"
#, c-format
msgid "Mutter was compiled without support for verbose mode\n" msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter kompileeriti ilma jutuka režiimi toeta\n" msgstr "Mutter kompileeriti ilma jutuka režiimi toeta\n"
@@ -583,6 +572,10 @@ msgstr "Akna valimine tabulaatori hüpikaknalt"
msgid "Cancel tab popup" msgid "Cancel tab popup"
msgstr "Tabulaatori hüpikakna katkestamine" msgstr "Tabulaatori hüpikakna katkestamine"
#, c-format
msgid "Usage: %s\n"
msgstr "Kasutamine: %s\n"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
msgid "Mi_nimize" msgid "Mi_nimize"
msgstr "_Minimeeri" msgstr "_Minimeeri"
@@ -1288,151 +1281,159 @@ msgstr "Selle teema jaoks on <%s> määratud kaks korda"
msgid "Failed to find a valid file for theme %s\n" msgid "Failed to find a valid file for theme %s\n"
msgstr "Tõrge %s teema jaoks korrektse faili leidmisel\n" msgstr "Tõrge %s teema jaoks korrektse faili leidmisel\n"
#~ msgid "Usage: %s\n" msgid "_Windows"
#~ msgstr "Kasutamine: %s\n" msgstr "_Aknad"
#~ msgid "_Windows" msgid "_Dialog"
#~ msgstr "_Aknad" msgstr "_Dialoog"
#~ msgid "_Dialog" msgid "_Modal dialog"
#~ msgstr "_Dialoog" msgstr "_Modaaldialoog"
#~ msgid "_Modal dialog" msgid "_Utility"
#~ msgstr "_Modaaldialoog" msgstr "_Utiliit"
#~ msgid "_Utility" msgid "_Splashscreen"
#~ msgstr "_Utiliit" msgstr "_Käivitusekraan"
#~ msgid "_Splashscreen" msgid "_Top dock"
#~ msgstr "_Käivitusekraan" msgstr "Ü_lemine dokk"
#~ msgid "_Top dock" msgid "_Bottom dock"
#~ msgstr "Ü_lemine dokk" msgstr "_Alumine dokk"
#~ msgid "_Bottom dock" msgid "_Left dock"
#~ msgstr "_Alumine dokk" msgstr "_Vasak dokk"
#~ msgid "_Left dock" msgid "_Right dock"
#~ msgstr "_Vasak dokk" msgstr "_Parem dokk"
#~ msgid "_Right dock" msgid "_All docks"
#~ msgstr "_Parem dokk" msgstr "_Kõik dokid"
#~ msgid "_All docks" msgid "Des_ktop"
#~ msgstr "_Kõik dokid" msgstr "_Töölaud"
#~ msgid "Des_ktop" msgid "Open another one of these windows"
#~ msgstr "_Töölaud" msgstr "Ava neist akendest järgmine"
#~ msgid "Open another one of these windows" msgid "This is a demo button with an 'open' icon"
#~ msgstr "Ava neist akendest järgmine" msgstr "See on näidisnupp koos 'ava' ikooniga"
#~ msgid "This is a demo button with an 'open' icon" msgid "This is a demo button with a 'quit' icon"
#~ msgstr "See on näidisnupp koos 'ava' ikooniga" msgstr "See on näidisnupp koos 'lõpeta' ikooniga"
#~ msgid "This is a demo button with a 'quit' icon" msgid "This is a sample message in a sample dialog"
#~ msgstr "See on näidisnupp koos 'lõpeta' ikooniga" msgstr "See on näidisteade näidisdialoogis"
#~ msgid "This is a sample message in a sample dialog" #, c-format
#~ msgstr "See on näidisteade näidisdialoogis" msgid "Fake menu item %d\n"
msgstr "Võltsitud menüüpunkt %d\n"
#~ msgid "Fake menu item %d\n" msgid "Border-only window"
#~ msgstr "Võltsitud menüüpunkt %d\n" msgstr "Ainult raamiga aken"
#~ msgid "Border-only window" msgid "Bar"
#~ msgstr "Ainult raamiga aken" msgstr "Riba"
#~ msgid "Bar" msgid "Normal Application Window"
#~ msgstr "Riba" msgstr "Tavaline rakenduseaken"
#~ msgid "Normal Application Window" msgid "Dialog Box"
#~ msgstr "Tavaline rakenduseaken" msgstr "Dialoogikast"
#~ msgid "Dialog Box" msgid "Modal Dialog Box"
#~ msgstr "Dialoogikast" msgstr "Modaalne dialoogikast"
#~ msgid "Modal Dialog Box" msgid "Utility Palette"
#~ msgstr "Modaalne dialoogikast" msgstr "Rakendite palett"
#~ msgid "Utility Palette" msgid "Torn-off Menu"
#~ msgstr "Rakendite palett" msgstr "Ärarebitav menüü"
#~ msgid "Torn-off Menu" msgid "Border"
#~ msgstr "Ärarebitav menüü" msgstr "Raam"
#~ msgid "Border" msgid "Attached Modal Dialog"
#~ msgstr "Raam" msgstr "Kinnistatud modaaldialoog"
#~ msgid "Attached Modal Dialog" #, c-format
#~ msgstr "Kinnistatud modaaldialoog" msgid "Button layout test %d"
msgstr "Nuppude paigutuse test %d"
#~ msgid "Button layout test %d" #, c-format
#~ msgstr "Nuppude paigutuse test %d" msgid "%g milliseconds to draw one window frame"
msgstr "%g millisekundit kulub ühe akna raami joonistamiseks"
#~ msgid "%g milliseconds to draw one window frame" #, c-format
#~ msgstr "%g millisekundit kulub ühe akna raami joonistamiseks" msgid "Usage: metacity-theme-viewer [THEMENAME]\n"
msgstr "Kasutamine: metacity-theme-viewer [TEEMANIMI]\n"
#~ msgid "Usage: metacity-theme-viewer [THEMENAME]\n" #, c-format
#~ msgstr "Kasutamine: metacity-theme-viewer [TEEMANIMI]\n" msgid "Error loading theme: %s\n"
msgstr "Viga teema laadimisel: %s\n"
#~ msgid "Error loading theme: %s\n" #, c-format
#~ msgstr "Viga teema laadimisel: %s\n" msgid "Loaded theme \"%s\" in %g seconds\n"
msgstr "Teema \"%s\" laaditi %g sekundiga\n"
#~ msgid "Loaded theme \"%s\" in %g seconds\n" msgid "Normal Title Font"
#~ msgstr "Teema \"%s\" laaditi %g sekundiga\n" msgstr "Tiitli tavasuurusega kirjatüüp"
#~ msgid "Normal Title Font" msgid "Small Title Font"
#~ msgstr "Tiitli tavasuurusega kirjatüüp" msgstr "Tiitli väike kirjatüüp"
#~ msgid "Small Title Font" msgid "Large Title Font"
#~ msgstr "Tiitli väike kirjatüüp" msgstr "Tiitli suur kirjatüüp"
#~ msgid "Large Title Font" msgid "Button Layouts"
#~ msgstr "Tiitli suur kirjatüüp" msgstr "Nuppude paigutus"
#~ msgid "Button Layouts" msgid "Benchmark"
#~ msgstr "Nuppude paigutus" msgstr "Jõudlus"
#~ msgid "Benchmark" msgid "Window Title Goes Here"
#~ msgstr "Jõudlus" msgstr "Siia tuleb akna pealkiri"
#~ msgid "Window Title Goes Here" #, c-format
#~ msgstr "Siia tuleb akna pealkiri" msgid ""
"Drew %d frames in %g client-side seconds (%g milliseconds per frame) and %g "
"seconds wall clock time including X server resources (%g milliseconds per "
"frame)\n"
msgstr ""
"Joonistati %d kaadrit %g kliendi-kella sekundiga (%g millisekundit kaadrile) "
"ja %g sekundiga seinakella järgi, millesse on kaasatud X-serveri "
"ressursikasutus (%g millisekundit kaadrile)\n"
#~ msgid "" msgid "position expression test returned TRUE but set error"
#~ "Drew %d frames in %g client-side seconds (%g milliseconds per frame) and " msgstr "asukoha avaldise kontroll tagastas TÕENE, aga määras vea"
#~ "%g seconds wall clock time including X server resources (%g milliseconds "
#~ "per frame)\n"
#~ msgstr ""
#~ "Joonistati %d kaadrit %g kliendi-kella sekundiga (%g millisekundit "
#~ "kaadrile) ja %g sekundiga seinakella järgi, millesse on kaasatud X-"
#~ "serveri ressursikasutus (%g millisekundit kaadrile)\n"
#~ msgid "position expression test returned TRUE but set error" msgid "position expression test returned FALSE but didn't set error"
#~ msgstr "asukoha avaldise kontroll tagastas TÕENE, aga määras vea" msgstr "asukoha avaldise kontroll tagastas VÄÄR, aga ei määranud viga"
#~ msgid "position expression test returned FALSE but didn't set error" msgid "Error was expected but none given"
#~ msgstr "asukoha avaldise kontroll tagastas VÄÄR, aga ei määranud viga" msgstr "Oodati viga, aga ühtegi ei edastatud"
#~ msgid "Error was expected but none given" #, c-format
#~ msgstr "Oodati viga, aga ühtegi ei edastatud" msgid "Error %d was expected but %d given"
msgstr "Oodati viga %d, aga edastati viga %d"
#~ msgid "Error %d was expected but %d given" #, c-format
#~ msgstr "Oodati viga %d, aga edastati viga %d" msgid "Error not expected but one was returned: %s"
msgstr "Viga ei oodatud, aga üks edastati: %s"
#~ msgid "Error not expected but one was returned: %s" #, c-format
#~ msgstr "Viga ei oodatud, aga üks edastati: %s" msgid "x value was %d, %d was expected"
msgstr "x väärtus oli %d, oodati väärtust %d"
#~ msgid "x value was %d, %d was expected" #, c-format
#~ msgstr "x väärtus oli %d, oodati väärtust %d" msgid "y value was %d, %d was expected"
msgstr "y väärtus oli %d, oodati väärtust %d"
#~ msgid "y value was %d, %d was expected" #, c-format
#~ msgstr "y väärtus oli %d, oodati väärtust %d" msgid "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
msgstr ""
#~ msgid "" "%d koordinaatide avaldis töödeldi %g sekundiga (keskmine %g sekundit)\n"
#~ "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
#~ msgstr ""
#~ "%d koordinaatide avaldis töödeldi %g sekundiga (keskmine %g sekundit)\n"
#~ msgid "Minimize window" #~ msgid "Minimize window"
#~ msgstr "Akna minimeerimine" #~ msgstr "Akna minimeerimine"

787
po/eu.po

File diff suppressed because it is too large Load Diff

512
po/fi.po

File diff suppressed because it is too large Load Diff

756
po/fr.po

File diff suppressed because it is too large Load Diff

3214
po/ga.po

File diff suppressed because it is too large Load Diff

783
po/gl.po

File diff suppressed because it is too large Load Diff

1210
po/he.po

File diff suppressed because it is too large Load Diff

790
po/hu.po

File diff suppressed because it is too large Load Diff

720
po/id.po

File diff suppressed because it is too large Load Diff

737
po/it.po

File diff suppressed because it is too large Load Diff

1477
po/kk.po

File diff suppressed because it is too large Load Diff

2008
po/kn.po

File diff suppressed because it is too large Load Diff

747
po/ko.po

File diff suppressed because it is too large Load Diff

730
po/lt.po

File diff suppressed because it is too large Load Diff

790
po/lv.po

File diff suppressed because it is too large Load Diff

716
po/nb.po

File diff suppressed because it is too large Load Diff

1194
po/nl.po

File diff suppressed because it is too large Load Diff

781
po/pa.po

File diff suppressed because it is too large Load Diff

725
po/pl.po

File diff suppressed because it is too large Load Diff

791
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

777
po/ru.po

File diff suppressed because it is too large Load Diff

417
po/sk.po
View File

@@ -13,9 +13,9 @@ msgstr ""
"Project-Id-Version: mutter\n" "Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n" "product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2013-08-21 17:41+0000\n" "POT-Creation-Date: 2013-05-24 21:44+0000\n"
"PO-Revision-Date: 2013-08-02 14:46+0200\n" "PO-Revision-Date: 2013-05-18 16:53+0100\n"
"Last-Translator: Ján Kyselica <kyselica.jan@gmail.com>\n" "Last-Translator: Jan Kyselica <kyselica.jan@gmail.com>\n"
"Language-Team: Slovak <gnome-sk-list@gnome.org>\n" "Language-Team: Slovak <gnome-sk-list@gnome.org>\n"
"Language: sk\n" "Language: sk\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@@ -87,8 +87,9 @@ msgstr "Prepnúť okná aplikácie"
# PK: zisti co to robi # PK: zisti co to robi
# description # description
#: ../src/50-mutter-navigation.xml.in.h:13 #: ../src/50-mutter-navigation.xml.in.h:13
#, fuzzy
msgid "Switch system controls" msgid "Switch system controls"
msgstr "Prepnúť medzi ovládacími prvkami systému" msgstr "Prepnúť medzi systémovými ovládacími prvkami"
# description # description
#: ../src/50-mutter-navigation.xml.in.h:14 #: ../src/50-mutter-navigation.xml.in.h:14
@@ -103,8 +104,9 @@ msgstr "Prepnúť okná aplikácie priamo"
# MČ: podobne ako vyššie: „cycle-panels“ # MČ: podobne ako vyššie: „cycle-panels“
# description # description
#: ../src/50-mutter-navigation.xml.in.h:16 #: ../src/50-mutter-navigation.xml.in.h:16
#, fuzzy
msgid "Switch system controls directly" msgid "Switch system controls directly"
msgstr "Prepnúť medzi ovládacími prvkami systému priamo" msgstr "Prepnúť medzi systémovými ovládacími prvkami priamo"
# description # description
#: ../src/50-mutter-navigation.xml.in.h:17 #: ../src/50-mutter-navigation.xml.in.h:17
@@ -265,13 +267,13 @@ msgstr "Zobraziť rozdelenie napravo"
# PK: je %i cislo obrazovky? ak ano tak "č. %i" # PK: je %i cislo obrazovky? ak ano tak "č. %i"
#. This probably means that a non-WM compositor like xcompmgr is running; #. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit #. * we have no way to get it to exit
#: ../src/compositor/compositor.c:596 #: ../src/compositor/compositor.c:571
#, c-format #, fuzzy, c-format
msgid "" msgid ""
"Another compositing manager is already running on screen %i on display \"%s" "Another compositing manager is already running on screen %i on display \"%s"
"\"." "\"."
msgstr "" msgstr ""
"Pre obrazovku č. %i na displeji „%s“ je spustený už iný správca rozloženia." "Pre obrazovku %i na displeji „%s“ je spustený už iný správca rozloženia."
#: ../src/compositor/meta-background.c:1076 #: ../src/compositor/meta-background.c:1076
msgid "background texture could not be created from file" msgid "background texture could not be created from file"
@@ -311,18 +313,18 @@ msgstr "_Počkať"
msgid "_Force Quit" msgid "_Force Quit"
msgstr "_Vynútiť ukončenie" msgstr "_Vynútiť ukončenie"
#: ../src/core/display.c:421 #: ../src/core/display.c:401
#, c-format #, c-format
msgid "Missing %s extension required for compositing" msgid "Missing %s extension required for compositing"
msgstr "Rozšírenie %s, potrebné pre kompozitné prostredie, chýba" msgstr "Rozšírenie %s, potrebné pre kompozitné prostredie, chýba"
# X window system preloz, napr. system na spravu okien X # X window system preloz, napr. system na spravu okien X
#: ../src/core/display.c:513 #: ../src/core/display.c:493
#, c-format #, c-format
msgid "Failed to open X Window System display '%s'\n" msgid "Failed to open X Window System display '%s'\n"
msgstr "Zlyhalo otvorenie displeja systému na správu okien X „%s“\n" msgstr "Zlyhalo otvorenie displeja systému na správu okien X „%s“\n"
#: ../src/core/keybindings.c:1136 #: ../src/core/keybindings.c:970
#, c-format #, c-format
msgid "" msgid ""
"Some other program is already using the key %s with modifiers %x as a " "Some other program is already using the key %s with modifiers %x as a "
@@ -330,7 +332,7 @@ msgid ""
msgstr "" msgstr ""
"Iný program už používa kláves %s s modifikátormi %x ako klávesovú skratku\n" "Iný program už používa kláves %s s modifikátormi %x ako klávesovú skratku\n"
#: ../src/core/keybindings.c:1333 #: ../src/core/keybindings.c:1151
#, c-format #, c-format
msgid "\"%s\" is not a valid accelerator\n" msgid "\"%s\" is not a valid accelerator\n"
msgstr "„%s“ nie je platný akcelerátor\n" msgstr "„%s“ nie je platný akcelerátor\n"
@@ -376,20 +378,6 @@ msgid ""
msgstr "" msgstr ""
"Nepodarilo sa nájsť tému! Overte, že %s existuje a obsahuje obvyklé témy.\n" "Nepodarilo sa nájsť tému! Overte, že %s existuje a obsahuje obvyklé témy.\n"
#: ../src/core/monitor.c:702
msgid "Built-in display"
msgstr "Vstavaný displej"
#. TRANSLATORS: this is a monitor name (in case we don't know
#. the vendor), it's Unknown followed by a size in inches,
#. like 'Unknown 15"'
#.
#: ../src/core/monitor.c:730
#, c-format
#| msgid "Unknown element %s"
msgid "Unknown %s"
msgstr "Neznámy %s"
#: ../src/core/mutter.c:40 #: ../src/core/mutter.c:40
#, c-format #, c-format
msgid "" msgid ""
@@ -415,7 +403,7 @@ msgstr "Zobrazí verziu"
msgid "Mutter plugin to use" msgid "Mutter plugin to use"
msgstr "Použije zásuvný modul Mutter" msgstr "Použije zásuvný modul Mutter"
#: ../src/core/prefs.c:1202 #: ../src/core/prefs.c:1193
msgid "" msgid ""
"Workarounds for broken applications disabled. Some applications may not " "Workarounds for broken applications disabled. Some applications may not "
"behave properly.\n" "behave properly.\n"
@@ -423,12 +411,12 @@ msgstr ""
"Náhradné riešenia pre chybné aplikácie nie sú povolené. Niektoré aplikácie " "Náhradné riešenia pre chybné aplikácie nie sú povolené. Niektoré aplikácie "
"sa nemusia správať správne.\n" "sa nemusia správať správne.\n"
#: ../src/core/prefs.c:1277 #: ../src/core/prefs.c:1268
#, c-format #, c-format
msgid "Could not parse font description \"%s\" from GSettings key %s\n" msgid "Could not parse font description \"%s\" from GSettings key %s\n"
msgstr "Nepodarilo sa spracovať popis písma „%s“ z kľúča GSettings %s\n" msgstr "Nepodarilo sa spracovať popis písma „%s“ z kľúča GSettings %s\n"
#: ../src/core/prefs.c:1343 #: ../src/core/prefs.c:1334
#, c-format #, c-format
msgid "" msgid ""
"\"%s\" found in configuration database is not a valid value for mouse button " "\"%s\" found in configuration database is not a valid value for mouse button "
@@ -437,7 +425,7 @@ msgstr ""
"V konfiguračnej databáze sa našlo „%s“, čo nie je platná hodnota pre " "V konfiguračnej databáze sa našlo „%s“, čo nie je platná hodnota pre "
"modifikátor tlačidla myši\n" "modifikátor tlačidla myši\n"
#: ../src/core/prefs.c:1909 #: ../src/core/prefs.c:1881
#, c-format #, c-format
msgid "" msgid ""
"\"%s\" found in configuration database is not a valid value for keybinding " "\"%s\" found in configuration database is not a valid value for keybinding "
@@ -446,17 +434,17 @@ msgstr ""
"V konfiguračnej databáze sa našlo „%s“, čo nie je platná hodnota pre " "V konfiguračnej databáze sa našlo „%s“, čo nie je platná hodnota pre "
"klávesovú skratku „%s“\n" "klávesovú skratku „%s“\n"
#: ../src/core/prefs.c:1999 #: ../src/core/prefs.c:1945
#, c-format #, c-format
msgid "Workspace %d" msgid "Workspace %d"
msgstr "Pracovný priestor č. %d" msgstr "Pracovný priestor č. %d"
#: ../src/core/screen.c:537 #: ../src/core/screen.c:691
#, c-format #, c-format
msgid "Screen %d on display '%s' is invalid\n" msgid "Screen %d on display '%s' is invalid\n"
msgstr "Obrazovka č. %d na displeji „%s“ nie je platná\n" msgstr "Obrazovka č. %d na displeji „%s“ nie je platná\n"
#: ../src/core/screen.c:553 #: ../src/core/screen.c:707
#, c-format #, c-format
msgid "" msgid ""
"Screen %d on display \"%s\" already has a window manager; try using the --" "Screen %d on display \"%s\" already has a window manager; try using the --"
@@ -465,7 +453,7 @@ msgstr ""
"Obrazovka č. %d na displeji „%s“ už má správcu okien. Skúste použiť prepínač " "Obrazovka č. %d na displeji „%s“ už má správcu okien. Skúste použiť prepínač "
"--replace, aby sa aktuálny správca nahradil.\n" "--replace, aby sa aktuálny správca nahradil.\n"
#: ../src/core/screen.c:580 #: ../src/core/screen.c:734
#, c-format #, c-format
msgid "" msgid ""
"Could not acquire window manager selection on screen %d display \"%s\"\n" "Could not acquire window manager selection on screen %d display \"%s\"\n"
@@ -473,12 +461,12 @@ msgstr ""
"Nepodarilo sa získať výber správcu okien pre obrazovku č. %d na displeji " "Nepodarilo sa získať výber správcu okien pre obrazovku č. %d na displeji "
"„%s“\n" "„%s“\n"
#: ../src/core/screen.c:658 #: ../src/core/screen.c:812
#, c-format #, c-format
msgid "Screen %d on display \"%s\" already has a window manager\n" msgid "Screen %d on display \"%s\" already has a window manager\n"
msgstr "Obrazovka č. %d na displeji „%s“ už má správcu okien\n" msgstr "Obrazovka č. %d na displeji „%s“ už má správcu okien\n"
#: ../src/core/screen.c:850 #: ../src/core/screen.c:998
#, c-format #, c-format
msgid "Could not release screen %d on display \"%s\"\n" msgid "Could not release screen %d on display \"%s\"\n"
msgstr "Nepodarilo sa uvoľniť obrazovku č. %d na displeji „%s“\n" msgstr "Nepodarilo sa uvoľniť obrazovku č. %d na displeji „%s“\n"
@@ -554,7 +542,8 @@ msgstr "Zlyhalo otvorenie súboru so záznamom pomocou fdopen() %s: %s\n"
msgid "Opened log file %s\n" msgid "Opened log file %s\n"
msgstr "Otvorený súbor so záznamom %s\n" msgstr "Otvorený súbor so záznamom %s\n"
#: ../src/core/util.c:119 #: ../src/core/util.c:119 ../src/tools/mutter-message.c:149
#, c-format
msgid "Mutter was compiled without support for verbose mode\n" msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter bol skompilovaný bez výpisu podrobností pri behu\n" msgstr "Mutter bol skompilovaný bez výpisu podrobností pri behu\n"
@@ -562,20 +551,20 @@ msgstr "Mutter bol skompilovaný bez výpisu podrobností pri behu\n"
msgid "Window manager: " msgid "Window manager: "
msgstr "Správca okien: " msgstr "Správca okien: "
#: ../src/core/util.c:414 #: ../src/core/util.c:412
msgid "Bug in window manager: " msgid "Bug in window manager: "
msgstr "Chyba v správcovi okien: " msgstr "Chyba v správcovi okien: "
#: ../src/core/util.c:445 #: ../src/core/util.c:443
msgid "Window manager warning: " msgid "Window manager warning: "
msgstr "Varovanie správcu okien: " msgstr "Varovanie správcu okien: "
#: ../src/core/util.c:473 #: ../src/core/util.c:471
msgid "Window manager error: " msgid "Window manager error: "
msgstr "Chyba správcu okien: " msgstr "Chyba správcu okien: "
#. first time through #. first time through
#: ../src/core/window.c:7533 #: ../src/core/window.c:7505
#, c-format #, c-format
msgid "" msgid ""
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER " "Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
@@ -591,7 +580,7 @@ msgstr ""
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain #. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
#. * about these apps but make them work. #. * about these apps but make them work.
#. #.
#: ../src/core/window.c:8257 #: ../src/core/window.c:8229
#, c-format #, c-format
msgid "" msgid ""
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size " "Window %s sets an MWM hint indicating it isn't resizable, but sets min size "
@@ -601,7 +590,7 @@ msgstr ""
"nastavuje minimálnu veľkosť %d x %d a maximálnu veľkosť %d x %d. To nedáva " "nastavuje minimálnu veľkosť %d x %d a maximálnu veľkosť %d x %d. To nedáva "
"zmysel.\n" "zmysel.\n"
#: ../src/core/window-props.c:347 #: ../src/core/window-props.c:318
#, c-format #, c-format
msgid "Application set a bogus _NET_WM_PID %lu\n" msgid "Application set a bogus _NET_WM_PID %lu\n"
msgstr "Aplikácia nastavila neplatné _NET_WM_PID %lu\n" msgstr "Aplikácia nastavila neplatné _NET_WM_PID %lu\n"
@@ -609,18 +598,18 @@ msgstr "Aplikácia nastavila neplatné _NET_WM_PID %lu\n"
# PK: co je toto? # PK: co je toto?
# JK: nedokazem zistit # JK: nedokazem zistit
# PM: vyžiadaj komentár od vývojárov, pomožeme aj ostatným prekladateľom # PM: vyžiadaj komentár od vývojárov, pomožeme aj ostatným prekladateľom
#: ../src/core/window-props.c:463 #: ../src/core/window-props.c:434
#, fuzzy, c-format #, fuzzy, c-format
msgid "%s (on %s)" msgid "%s (on %s)"
msgstr "%s (na %s)" msgstr "%s (na %s)"
#: ../src/core/window-props.c:1546 #: ../src/core/window-props.c:1517
#, c-format #, c-format
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n" msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
msgstr "Neplatné WM_TRANSIENT_FOR okno 0x%lx nastavené pre %s.\n" msgstr "Neplatné WM_TRANSIENT_FOR okno 0x%lx nastavené pre %s.\n"
# MČ: zacykliť sa, alebo vytvoriť slučku. # MČ: zacykliť sa, alebo vytvoriť slučku.
#: ../src/core/window-props.c:1557 #: ../src/core/window-props.c:1528
#, c-format #, c-format
msgid "WM_TRANSIENT_FOR window 0x%lx for %s would create loop.\n" msgid "WM_TRANSIENT_FOR window 0x%lx for %s would create loop.\n"
msgstr "WM_TRANSIENT_FOR okno 0x%lx pre %s môže vytvoriť slučku.\n" msgstr "WM_TRANSIENT_FOR okno 0x%lx pre %s môže vytvoriť slučku.\n"
@@ -708,9 +697,9 @@ msgid ""
"vertically and resizes them horizontally to cover half of the available " "vertically and resizes them horizontally to cover half of the available "
"area. Dropping windows on the top screen edge maximizes them completely." "area. Dropping windows on the top screen edge maximizes them completely."
msgstr "" msgstr ""
"Ak je povolené, upustenie okien pri zvislých okrajoch obrazovky ich zvislo " "Ak je povolené, upustenie okien pri zvislých okrajoch obrazovky ich "
"maximalizuje a vodorovná veľkosť sa zmení na polovicu dostupnej plochy. " "zvislo maximalizuje a vodorovná veľkosť sa zmení na polovicu dostupnej "
"Upustenie okien pri vrchnom okraji obrazovky ich maximalizuje úplne." "plochy. Upustenie okien pri vrchnom okraji obrazovky ich maximalizuje úplne."
# summary # summary
#: ../src/org.gnome.mutter.gschema.xml.in.h:7 #: ../src/org.gnome.mutter.gschema.xml.in.h:7
@@ -746,8 +735,9 @@ msgstr ""
# PM: ja by som dal Bez vyvovlávania tabulátorom # PM: ja by som dal Bez vyvovlávania tabulátorom
# summary # summary
#: ../src/org.gnome.mutter.gschema.xml.in.h:11 #: ../src/org.gnome.mutter.gschema.xml.in.h:11
#, fuzzy
msgid "No tab popup" msgid "No tab popup"
msgstr "Bez vyvolávania tabulátorom" msgstr "Nepoužívať prekryvnú ponuku tabulátora"
# MČ: Neviem, čo to presne má robiť, ale popis som pochopil inak. „…či sa má používať rozbaľovacia ponuka a zvýraznenie rámikom sa má vypnúť…“ # MČ: Neviem, čo to presne má robiť, ale popis som pochopil inak. „…či sa má používať rozbaľovacia ponuka a zvýraznenie rámikom sa má vypnúť…“
# description # description
@@ -816,104 +806,109 @@ msgstr "Vybrať okno z rozbaľovacej ponuky tabulátoru"
msgid "Cancel tab popup" msgid "Cancel tab popup"
msgstr "Zrušit rozbaľovaciu ponuku tabulátoru" msgstr "Zrušit rozbaľovaciu ponuku tabulátoru"
#: ../src/tools/mutter-message.c:123
#, c-format
msgid "Usage: %s\n"
msgstr "Použitie: %s\n"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:67 #: ../src/ui/menu.c:69
msgid "Mi_nimize" msgid "Mi_nimize"
msgstr "Mi_nimalizovať" msgstr "Mi_nimalizovať"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:69 #: ../src/ui/menu.c:71
msgid "Ma_ximize" msgid "Ma_ximize"
msgstr "Ma_ximalizovať" msgstr "Ma_ximalizovať"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:71 #: ../src/ui/menu.c:73
msgid "Unma_ximize" msgid "Unma_ximize"
msgstr "Zrušiť ma_ximalizáciu" msgstr "Zrušiť ma_ximalizáciu"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:73 #: ../src/ui/menu.c:75
msgid "Roll _Up" msgid "Roll _Up"
msgstr "_Zabaliť" msgstr "_Zabaliť"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:75 #: ../src/ui/menu.c:77
msgid "_Unroll" msgid "_Unroll"
msgstr "_Rozbaliť" msgstr "_Rozbaliť"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:77 #: ../src/ui/menu.c:79
msgid "_Move" msgid "_Move"
msgstr "Pre_miestniť" msgstr "Pre_miestniť"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:79 #: ../src/ui/menu.c:81
msgid "_Resize" msgid "_Resize"
msgstr "Zmeniť veľko_sť" msgstr "Zmeniť veľko_sť"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:81 #: ../src/ui/menu.c:83
msgid "Move Titlebar On_screen" msgid "Move Titlebar On_screen"
msgstr "Presunúť titulok na _obrazovku" msgstr "Presunúť titulok na _obrazovku"
#. separator #. separator
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:84 ../src/ui/menu.c:86 #: ../src/ui/menu.c:86 ../src/ui/menu.c:88
msgid "Always on _Top" msgid "Always on _Top"
msgstr "Vždy na_vrchu" msgstr "Vždy na_vrchu"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:88 #: ../src/ui/menu.c:90
msgid "_Always on Visible Workspace" msgid "_Always on Visible Workspace"
msgstr "Vž_dy na viditeľnom pracovnom priestore" msgstr "Vž_dy na viditeľnom pracovnom priestore"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:90 #: ../src/ui/menu.c:92
msgid "_Only on This Workspace" msgid "_Only on This Workspace"
msgstr "_Len na tomto pracovnom priestore" msgstr "_Len na tomto pracovnom priestore"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:92 #: ../src/ui/menu.c:94
msgid "Move to Workspace _Left" msgid "Move to Workspace _Left"
msgstr "Presunúť na pracovný priestor vľav_o" msgstr "Presunúť na pracovný priestor vľav_o"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:94 #: ../src/ui/menu.c:96
msgid "Move to Workspace R_ight" msgid "Move to Workspace R_ight"
msgstr "Presunúť na pracovný priestor v_pravo" msgstr "Presunúť na pracovný priestor v_pravo"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:96 #: ../src/ui/menu.c:98
msgid "Move to Workspace _Up" msgid "Move to Workspace _Up"
msgstr "Presunúť na pracovný priestor _hore" msgstr "Presunúť na pracovný priestor _hore"
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:98 #: ../src/ui/menu.c:100
msgid "Move to Workspace _Down" msgid "Move to Workspace _Down"
msgstr "Presunúť na pracovný priestor _dole" msgstr "Presunúť na pracovný priestor _dole"
#. separator #. separator
#. Translators: Translate this string the same way as you do in libwnck! #. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:102 #: ../src/ui/menu.c:104
msgid "_Close" msgid "_Close"
msgstr "_Zavrieť" msgstr "_Zavrieť"
#: ../src/ui/menu.c:202 #: ../src/ui/menu.c:204
#, c-format #, c-format
msgid "Workspace %d%n" msgid "Workspace %d%n"
msgstr "Pracovná priestor %d%n" msgstr "Pracovná priestor %d%n"
#: ../src/ui/menu.c:212 #: ../src/ui/menu.c:214
#, c-format #, c-format
msgid "Workspace 1_0" msgid "Workspace 1_0"
msgstr "Pracovný priestor 1_0" msgstr "Pracovný priestor 1_0"
#: ../src/ui/menu.c:214 #: ../src/ui/menu.c:216
#, c-format #, c-format
msgid "Workspace %s%d" msgid "Workspace %s%d"
msgstr "Pracovný priestor %s%d" msgstr "Pracovný priestor %s%d"
#: ../src/ui/menu.c:384 #: ../src/ui/menu.c:397
msgid "Move to Another _Workspace" msgid "Move to Another _Workspace"
msgstr "P_resunúť na iný pracovný priestor" msgstr "P_resunúť na iný pracovný priestor"
@@ -1071,21 +1066,21 @@ msgstr ""
# MČ: Preformuloval by som koniec: „platné sú len znaky A-Za-z0-9-_“ # MČ: Preformuloval by som koniec: „platné sú len znaky A-Za-z0-9-_“
# PK: color_name je asi nejaky atribut, to sa nepreklada, ked tak do zatvorky # PK: color_name je asi nejaky atribut, to sa nepreklada, ked tak do zatvorky
#: ../src/ui/theme.c:1219 #: ../src/ui/theme.c:1219
#, c-format #, fuzzy, c-format
msgid "" msgid ""
"Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-" "Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-"
"_ are valid" "_ are valid"
msgstr "" msgstr ""
"V parametri color_name (názov farby) pre gtk:custom je neplatný znak „%c“, platné sú len " "V parametri názov_farby pre gtk:custom je neplatný znak „%c“, platné sú len "
"znaky A-Za-z0-9-_" "znaky A-Za-z0-9-_"
#: ../src/ui/theme.c:1233 #: ../src/ui/theme.c:1233
#, c-format #, fuzzy, c-format
msgid "" msgid ""
"Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not " "Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not "
"fit the format" "fit the format"
msgstr "" msgstr ""
"Formát Gtk:custom je „gtk:custom(color_name,fallback)“, „%s“ tomu " "Formát Gtk:custom je „gtk:custom(názov_farby,fallback)“, „%s“ tomu "
"nezodpovedá" "nezodpovedá"
#: ../src/ui/theme.c:1278 #: ../src/ui/theme.c:1278
@@ -1271,20 +1266,20 @@ msgid ""
"Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>" "Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
msgstr "Chýbajúce <frame state=„%s“ resize=„%s“ focus=„%s“ style=„whatever“/>" msgstr "Chýbajúce <frame state=„%s“ resize=„%s“ focus=„%s“ style=„whatever“/>"
#: ../src/ui/theme.c:5082 #: ../src/ui/theme.c:5084
#, c-format #, c-format
msgid "Failed to load theme \"%s\": %s\n" msgid "Failed to load theme \"%s\": %s\n"
msgstr "Zlyhalo načítanie témy „%s“: %s\n" msgstr "Zlyhalo načítanie témy „%s“: %s\n"
# PK: prvok? # PK: prvok?
# JK: XML značka (XML tag) # JK: XML značka (XML tag)
#: ../src/ui/theme.c:5218 ../src/ui/theme.c:5225 ../src/ui/theme.c:5232 #: ../src/ui/theme.c:5220 ../src/ui/theme.c:5227 ../src/ui/theme.c:5234
#: ../src/ui/theme.c:5239 ../src/ui/theme.c:5246 #: ../src/ui/theme.c:5241 ../src/ui/theme.c:5248
#, c-format #, c-format
msgid "No <%s> set for theme \"%s\"" msgid "No <%s> set for theme \"%s\""
msgstr "Pre tému „%s“ nie je nastavená <%s>" msgstr "Pre tému „%s“ nie je nastavená <%s>"
#: ../src/ui/theme.c:5254 #: ../src/ui/theme.c:5256
#, c-format #, c-format
msgid "" msgid ""
"No frame style set for window type \"%s\" in theme \"%s\", add a <window " "No frame style set for window type \"%s\" in theme \"%s\", add a <window "
@@ -1293,13 +1288,13 @@ msgstr ""
"Pre typ okna „%s“ nie je sada štýlov v téme „%s“, pridajte prvok <window " "Pre typ okna „%s“ nie je sada štýlov v téme „%s“, pridajte prvok <window "
"type=„%s“ style_set=„whatever“/>" "type=„%s“ style_set=„whatever“/>"
#: ../src/ui/theme.c:5661 ../src/ui/theme.c:5723 ../src/ui/theme.c:5786 #: ../src/ui/theme.c:5663 ../src/ui/theme.c:5725 ../src/ui/theme.c:5788
#, c-format #, c-format
msgid "" msgid ""
"User-defined constants must begin with a capital letter; \"%s\" does not" "User-defined constants must begin with a capital letter; \"%s\" does not"
msgstr "Používateľské konštanty musia začínať veľkým písmenom, „%s“ nezačína" msgstr "Používateľské konštanty musia začínať veľkým písmenom, „%s“ nezačína"
#: ../src/ui/theme.c:5669 ../src/ui/theme.c:5731 ../src/ui/theme.c:5794 #: ../src/ui/theme.c:5671 ../src/ui/theme.c:5733 ../src/ui/theme.c:5796
#, c-format #, c-format
msgid "Constant \"%s\" has already been defined" msgid "Constant \"%s\" has already been defined"
msgstr "Konštanta „%s“ už je definovaná" msgstr "Konštanta „%s“ už je definovaná"
@@ -1402,7 +1397,7 @@ msgstr "<%s> musí uvádzať buď geometriu alebo rodiča, ktorý má geometriu"
msgid "You must specify a background for an alpha value to be meaningful" msgid "You must specify a background for an alpha value to be meaningful"
msgstr "Ak má byť hodnota alpha zmysluplná, tak musíte vybrať nejaké pozadie" msgstr "Ak má byť hodnota alpha zmysluplná, tak musíte vybrať nejaké pozadie"
#  PM: asi atribút type # PM: asi atribút type
# JK: https://bugzilla.gnome.org/show_bug.cgi?id=698123 # JK: https://bugzilla.gnome.org/show_bug.cgi?id=698123
#: ../src/ui/theme-parser.c:1264 #: ../src/ui/theme-parser.c:1264
#, fuzzy, c-format #, fuzzy, c-format
@@ -1564,7 +1559,6 @@ msgid "\"%s\" is not a valid value for resize attribute"
msgstr "„%s“ nie je platná hodnota pre atribút zmeny veľkosti" msgstr "„%s“ nie je platná hodnota pre atribút zmeny veľkosti"
# PK: shaded states? to zatvorky daj popis co je resize # PK: shaded states? to zatvorky daj popis co je resize
# PM: skôr "pre stavy maximized (maximalizovaný)/shaded (zatienený)"
#: ../src/ui/theme-parser.c:3147 #: ../src/ui/theme-parser.c:3147
#, fuzzy, c-format #, fuzzy, c-format
msgid "" msgid ""
@@ -1706,172 +1700,221 @@ msgstr "<%s> uvedený dvakrát pre túto tému"
msgid "Failed to find a valid file for theme %s\n" msgid "Failed to find a valid file for theme %s\n"
msgstr "Zlyhalo nájdenie platného súboru pre tému%s\n" msgstr "Zlyhalo nájdenie platného súboru pre tému%s\n"
#~ msgid "Usage: %s\n" #: ../src/ui/theme-viewer.c:99
#~ msgstr "Použitie: %s\n" msgid "_Windows"
msgstr "_Okná"
#~ msgid "_Windows" #: ../src/ui/theme-viewer.c:100
#~ msgstr "_Okná" msgid "_Dialog"
msgstr "_Dialógové okno"
#~ msgid "_Dialog" #: ../src/ui/theme-viewer.c:101
#~ msgstr "_Dialógové okno" msgid "_Modal dialog"
msgstr "_Modálne dialógové okno"
#~ msgid "_Modal dialog" #: ../src/ui/theme-viewer.c:102
#~ msgstr "_Modálne dialógové okno" msgid "_Utility"
msgstr "_Nástroje"
#~ msgid "_Utility" #: ../src/ui/theme-viewer.c:103
#~ msgstr "_Nástroje" msgid "_Splashscreen"
msgstr "Ú_vodná obrazovka"
#~ msgid "_Splashscreen"
#~ msgstr "Ú_vodná obrazovka"
# MČ: nie som si istý prekladom „dok“, nemal by to byť „panel“? # MČ: nie som si istý prekladom „dok“, nemal by to byť „panel“?
#~ msgid "_Top dock" #: ../src/ui/theme-viewer.c:104
#~ msgstr "_Horný panel" msgid "_Top dock"
msgstr "_Horný panel"
#~ msgid "_Bottom dock" #: ../src/ui/theme-viewer.c:105
#~ msgstr "_Spodný panel" msgid "_Bottom dock"
msgstr "_Spodný panel"
#~ msgid "_Left dock" #: ../src/ui/theme-viewer.c:106
#~ msgstr "Ľ_avý panel" msgid "_Left dock"
msgstr "Ľ_avý panel"
#~ msgid "_Right dock" #: ../src/ui/theme-viewer.c:107
#~ msgstr "_Pravý panel" msgid "_Right dock"
msgstr "_Pravý panel"
#~ msgid "_All docks" #: ../src/ui/theme-viewer.c:108
#~ msgstr "_Všetky panely" msgid "_All docks"
msgstr "_Všetky panely"
#~ msgid "Des_ktop" #: ../src/ui/theme-viewer.c:109
#~ msgstr "P_racovná plocha" msgid "Des_ktop"
msgstr "P_racovná plocha"
# tooltip # tooltip
#~ msgid "Open another one of these windows" #: ../src/ui/theme-viewer.c:115
#~ msgstr "Otvorí ďalšie z týchto okien" msgid "Open another one of these windows"
msgstr "Otvorí ďalšie z týchto okien"
# PK: prekladat to v uvodzovkach? nahlas bug # PK: prekladat to v uvodzovkach? nahlas bug
# tooltip # tooltip
# JK: https://bugzilla.gnome.org/show_bug.cgi?id=698123 # JK: https://bugzilla.gnome.org/show_bug.cgi?id=698123
#: ../src/ui/theme-viewer.c:117
#, fuzzy #, fuzzy
#~ msgid "This is a demo button with an 'open' icon" msgid "This is a demo button with an 'open' icon"
#~ msgstr "Toto je ukážkové tlačidlo s ikonou „open“" msgstr "Toto je ukážkové tlačidlo s ikonou „open“"
# tooltip # tooltip
# JK: https://bugzilla.gnome.org/show_bug.cgi?id=698123 # JK: https://bugzilla.gnome.org/show_bug.cgi?id=698123
#: ../src/ui/theme-viewer.c:119
#, fuzzy #, fuzzy
#~ msgid "This is a demo button with a 'quit' icon" msgid "This is a demo button with a 'quit' icon"
#~ msgstr "Toto je ukážkové tlačidlo s ikonou „quit“" msgstr "Toto je ukážkové tlačidlo s ikonou „quit“"
# label # label
#~ msgid "This is a sample message in a sample dialog" #: ../src/ui/theme-viewer.c:248
#~ msgstr "Toto je ukážková správa v ukážkovom dialógovom okne" msgid "This is a sample message in a sample dialog"
msgstr "Toto je ukážková správa v ukážkovom dialógovom okne"
# PK: falosna # PK: falosna
#~ msgid "Fake menu item %d\n" #: ../src/ui/theme-viewer.c:328
#~ msgstr "Falošná položka ponuky č. %d\n" #, c-format
msgid "Fake menu item %d\n"
msgstr "Falošná položka ponuky č. %d\n"
#~ msgid "Border-only window" #: ../src/ui/theme-viewer.c:363
#~ msgstr "Okno len s okrajom" msgid "Border-only window"
msgstr "Okno len s okrajom"
#~ msgid "Bar" #: ../src/ui/theme-viewer.c:365
#~ msgstr "Lišta" msgid "Bar"
msgstr "Lišta"
#~ msgid "Normal Application Window" #: ../src/ui/theme-viewer.c:382
#~ msgstr "Normálne aplikačné okno" msgid "Normal Application Window"
msgstr "Normálne aplikačné okno"
#~ msgid "Dialog Box" #: ../src/ui/theme-viewer.c:386
#~ msgstr "Dialógové okno" msgid "Dialog Box"
msgstr "Dialógové okno"
#~ msgid "Modal Dialog Box" #: ../src/ui/theme-viewer.c:390
#~ msgstr "Modálne dialógové okno" msgid "Modal Dialog Box"
msgstr "Modálne dialógové okno"
#~ msgid "Utility Palette" #: ../src/ui/theme-viewer.c:394
#~ msgstr "Paleta nástrojov" msgid "Utility Palette"
msgstr "Paleta nástrojov"
#~ msgid "Torn-off Menu" #: ../src/ui/theme-viewer.c:398
#~ msgstr "Vypnúť ponuku" msgid "Torn-off Menu"
msgstr "Vypnúť ponuku"
#~ msgid "Border" #: ../src/ui/theme-viewer.c:402
#~ msgstr "Okraj" msgid "Border"
msgstr "Okraj"
#~ msgid "Attached Modal Dialog" #: ../src/ui/theme-viewer.c:406
#~ msgstr "Pričlenené modálne okno" msgid "Attached Modal Dialog"
msgstr "Pričlenené modálne okno"
#~ msgid "Button layout test %d" #: ../src/ui/theme-viewer.c:737
#~ msgstr "Test rozloženia tlačidiel č. %d" #, c-format
msgid "Button layout test %d"
msgstr "Test rozloženia tlačidiel č. %d"
# PK: plural forms # PK: plural forms
# JK: https://bugzilla.gnome.org/show_bug.cgi?id=697987 # JK: https://bugzilla.gnome.org/show_bug.cgi?id=697987
#, fuzzy #: ../src/ui/theme-viewer.c:766
#~ msgid "%g milliseconds to draw one window frame" #, fuzzy, c-format
#~ msgstr "%g milisekúnd pre vykreslenie jedného rámca okna" msgid "%g milliseconds to draw one window frame"
msgstr "%g milisekúnd pre vykreslenie jedného rámca okna"
#~ msgid "Usage: metacity-theme-viewer [THEMENAME]\n" #: ../src/ui/theme-viewer.c:811
#~ msgstr "Použitie: metacity-theme-viewer [NÁZOVTÉMY]\n" #, c-format
msgid "Usage: metacity-theme-viewer [THEMENAME]\n"
msgstr "Použitie: metacity-theme-viewer [NÁZOVTÉMY]\n"
#~ msgid "Error loading theme: %s\n" #: ../src/ui/theme-viewer.c:818
#~ msgstr "Chyba pri načítavaní témy: %s\n" #, c-format
msgid "Error loading theme: %s\n"
msgstr "Chyba pri načítavaní témy: %s\n"
# PK: plural forms # PK: plural forms
# JK: https://bugzilla.gnome.org/show_bug.cgi?id=697987 # JK: https://bugzilla.gnome.org/show_bug.cgi?id=697987
#, fuzzy #: ../src/ui/theme-viewer.c:824
#~ msgid "Loaded theme \"%s\" in %g seconds\n" #, fuzzy, c-format
#~ msgstr "Téma „%s“ načítaná za %g send\n" msgid "Loaded theme \"%s\" in %g seconds\n"
msgstr "Téma „%s“ načítaná za %g sekúnd\n"
# PK: inde titulku, aky je rozdiel # PK: inde titulku, aky je rozdiel
#~ msgid "Normal Title Font" #: ../src/ui/theme-viewer.c:869
#~ msgstr "Obyčajné písmo titulku" msgid "Normal Title Font"
msgstr "Obyčajné písmo titulku"
#~ msgid "Small Title Font" #: ../src/ui/theme-viewer.c:875
#~ msgstr "Malé písmo titulku" msgid "Small Title Font"
msgstr "Malé písmo titulku"
#~ msgid "Large Title Font" #: ../src/ui/theme-viewer.c:881
#~ msgstr "Veľké písmo titulku" msgid "Large Title Font"
msgstr "Veľké písmo titulku"
#~ msgid "Button Layouts" #: ../src/ui/theme-viewer.c:886
#~ msgstr "Rozloženia tlačidiel" msgid "Button Layouts"
msgstr "Rozloženia tlačidiel"
#~ msgid "Benchmark" #: ../src/ui/theme-viewer.c:891
#~ msgstr "Test rýchlosti" msgid "Benchmark"
msgstr "Test rýchlosti"
#~ msgid "Window Title Goes Here" #: ../src/ui/theme-viewer.c:947
#~ msgstr "Sem príde názov okna" msgid "Window Title Goes Here"
msgstr "Sem príde názov okna"
# PK: plural forms # PK: plural forms
# JK: https://bugzilla.gnome.org/show_bug.cgi?id=697987 # JK: https://bugzilla.gnome.org/show_bug.cgi?id=697987
#, fuzzy #: ../src/ui/theme-viewer.c:1053
#~ msgid "" #, fuzzy, c-format
#~ "Drew %d frames in %g client-side seconds (%g milliseconds per frame) and " msgid ""
#~ "%g seconds wall clock time including X server resources (%g milliseconds " "Drew %d frames in %g client-side seconds (%g milliseconds per frame) and %g "
#~ "per frame)\n" "seconds wall clock time including X server resources (%g milliseconds per "
#~ msgstr "" "frame)\n"
#~ "Vykreslených %d rámcov za %g sekúnd na strane klienta (%g milisekúnd na " msgstr ""
#~ "rámec) a %g sekúnd celkového času vrátane zdrojov servera X (%g " "Vykreslených %d rámcov za %g sekúnd na strane klienta (%g milisekúnd na "
#~ "milisekúnd na rámec)\n" "rámec) a %g sekúnd celkového času vrátane zdrojov servera X (%g milisekúnd "
"na rámec)\n"
#~ msgid "position expression test returned TRUE but set error" #: ../src/ui/theme-viewer.c:1273
#~ msgstr "test výrazu polohy vrátil TRUE, ale nastavil chybu" msgid "position expression test returned TRUE but set error"
msgstr "test výrazu polohy vrátil TRUE, ale nastavil chybu"
#~ msgid "position expression test returned FALSE but didn't set error" #: ../src/ui/theme-viewer.c:1275
#~ msgstr "test výrazu polohy vrátil FALSE, ale nenastavil chybu" msgid "position expression test returned FALSE but didn't set error"
msgstr "test výrazu polohy vrátil FALSE, ale nenastavil chybu"
#~ msgid "Error was expected but none given" #: ../src/ui/theme-viewer.c:1279
#~ msgstr "Bola očakávaná chyba, ale žiadna nenastala" msgid "Error was expected but none given"
msgstr "Bola očakávaná chyba, ale žiadna nenastala"
#~ msgid "Error %d was expected but %d given" #: ../src/ui/theme-viewer.c:1281
#~ msgstr "Bola očakávaná chyba %d, ale nastala %d" #, c-format
msgid "Error %d was expected but %d given"
msgstr "Bola očakávaná chyba %d, ale nastala %d"
#~ msgid "Error not expected but one was returned: %s" #: ../src/ui/theme-viewer.c:1287
#~ msgstr "Chyba nebola očakávaná, ale bola vrátená: %s" #, c-format
msgid "Error not expected but one was returned: %s"
msgstr "Chyba nebola očakávaná, ale bola vrátená: %s"
#~ msgid "x value was %d, %d was expected" #: ../src/ui/theme-viewer.c:1291
#~ msgstr "hodnota x bola %d, očakávaná bola %d" #, c-format
msgid "x value was %d, %d was expected"
msgstr "hodnota x bola %d, očakávaná bola %d"
#~ msgid "y value was %d, %d was expected" #: ../src/ui/theme-viewer.c:1294
#~ msgstr "hodnota y bola %d, očakávaná bola %d" #, c-format
msgid "y value was %d, %d was expected"
msgstr "hodnota y bola %d, očakávaná bola %d"
# PK: plural forms # PK: plural forms
# JK: https://bugzilla.gnome.org/show_bug.cgi?id=697987 # JK: https://bugzilla.gnome.org/show_bug.cgi?id=697987
#, fuzzy #: ../src/ui/theme-viewer.c:1359
#~ msgid "" #, fuzzy, c-format
#~ "%d coordinate expressions parsed in %g seconds (%g seconds average)\n" msgid "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
#~ msgstr "" msgstr ""
#~ "%d výrazov pre súradnice analyzovaných za %g sekúnd (priemer %g sekúnd)\n" "%d výrazov pre súradnice analyzovaných za %g sekúnd (priemer %g sekúnd)\n"

789
po/sl.po

File diff suppressed because it is too large Load Diff

756
po/sr.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1132
po/uk.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1
protocol/Makefile.am Normal file
View File

@@ -0,0 +1 @@
EXTRA_DIST = xserver.xml

30
protocol/gtk-shell.xml Normal file
View File

@@ -0,0 +1,30 @@
<protocol name="gtk">
<interface name="gtk_shell" version="1">
<enum name="capability">
<entry name="global_app_menu" value="1"/>
<entry name="global_menu_bar" value="2"/>
</enum>
<event name="capabilities">
<arg name="capabilities" type="uint"/>
</event>
<request name="get_gtk_surface">
<arg name="gtk_surface" type="new_id" interface="gtk_surface"/>
<arg name="surface" type="object" interface="wl_surface"/>
</request>
</interface>
<interface name="gtk_surface" version="1">
<request name="set_dbus_properties">
<arg name="application_id" type="string" allow-null="true"/>
<arg name="app_menu_path" type="string" allow-null="true"/>
<arg name="menubar_path" type="string" allow-null="true"/>
<arg name="window_object_path" type="string" allow-null="true"/>
<arg name="application_object_path" type="string" allow-null="true"/>
<arg name="unique_bus_name" type="string" allow-null="true"/>
</request>
</interface>
</protocol>

18
protocol/xserver.xml Normal file
View File

@@ -0,0 +1,18 @@
<protocol name="xserver">
<interface name="xserver" version="1">
<request name="set_window_id">
<arg name="surface" type="object" interface="wl_surface"/>
<arg name="id" type="uint"/>
</request>
<event name="client">
<arg name="fd" type="fd"/>
</event>
<event name="listen_socket">
<arg name="fd" type="fd"/>
</event>
</interface>
</protocol>

View File

@@ -29,18 +29,6 @@
<KeyListEntry name="move-to-workspace-down" <KeyListEntry name="move-to-workspace-down"
_description="Move window one workspace down" /> _description="Move window one workspace down" />
<KeyListEntry name="move-to-monitor-left"
_description="Move window one monitor to the left" />
<KeyListEntry name="move-to-monitor-right"
_description="Move window one monitor to the right" />
<KeyListEntry name="move-to-monitor-up"
_description="Move window one monitor up" />
<KeyListEntry name="move-to-monitor-down"
_description="Move window one monitor down" />
<KeyListEntry name="switch-applications" <KeyListEntry name="switch-applications"
_description="Switch applications"/> _description="Switch applications"/>

View File

@@ -1,7 +1,7 @@
# Flag build for parallelism; see https://savannah.gnu.org/patch/?6905 # Flag build for parallelism; see https://savannah.gnu.org/patch/?6905
.AUTOPARALLEL: .AUTOPARALLEL:
lib_LTLIBRARIES = libmutter.la lib_LTLIBRARIES = libmutter-wayland.la
SUBDIRS=compositor/plugins SUBDIRS=compositor/plugins
@@ -10,6 +10,7 @@ INCLUDES= \
-DCOGL_ENABLE_EXPERIMENTAL_API \ -DCOGL_ENABLE_EXPERIMENTAL_API \
-DCOGL_ENABLE_EXPERIMENTAL_2_0_API \ -DCOGL_ENABLE_EXPERIMENTAL_2_0_API \
$(MUTTER_CFLAGS) \ $(MUTTER_CFLAGS) \
-I$(top_builddir) \
-I$(srcdir) \ -I$(srcdir) \
-I$(srcdir)/core \ -I$(srcdir)/core \
-I$(srcdir)/ui \ -I$(srcdir)/ui \
@@ -29,13 +30,24 @@ INCLUDES= \
-DMUTTER_PLUGIN_DIR=\"@MUTTER_PLUGIN_DIR@\" \ -DMUTTER_PLUGIN_DIR=\"@MUTTER_PLUGIN_DIR@\" \
-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"
INCLUDES += \
-I$(srcdir)/wayland \
-I$(builddir)/wayland \
-DXWAYLAND_PATH='"@XWAYLAND_PATH@"'
mutter_built_sources = \ mutter_built_sources = \
$(dbus_idle_built_sources) \ $(dbus_idle_built_sources) \
$(dbus_xrandr_built_sources) \ $(dbus_xrandr_built_sources) \
mutter-enum-types.h \ mutter-enum-types.h \
mutter-enum-types.c mutter-enum-types.c \
wayland/gtk-shell-protocol.c \
wayland/gtk-shell-server-protocol.h \
wayland/gtk-shell-client-protocol.h \
wayland/xserver-protocol.c \
wayland/xserver-server-protocol.h \
wayland/xserver-client-protocol.h
libmutter_la_SOURCES = \ libmutter_wayland_la_SOURCES = \
core/async-getprop.c \ core/async-getprop.c \
core/async-getprop.h \ core/async-getprop.h \
core/barrier.c \ core/barrier.c \
@@ -55,8 +67,7 @@ libmutter_la_SOURCES = \
compositor/meta-background-actor.c \ compositor/meta-background-actor.c \
compositor/meta-background-actor-private.h \ compositor/meta-background-actor-private.h \
compositor/meta-background-group.c \ compositor/meta-background-group.c \
compositor/meta-cullable.c \ compositor/meta-background-group-private.h \
compositor/meta-cullable.h \
compositor/meta-module.c \ compositor/meta-module.c \
compositor/meta-module.h \ compositor/meta-module.h \
compositor/meta-plugin.c \ compositor/meta-plugin.c \
@@ -94,6 +105,8 @@ libmutter_la_SOURCES = \
core/display.c \ core/display.c \
core/display-private.h \ core/display-private.h \
meta/display.h \ meta/display.h \
ui/draw-workspace.c \
ui/draw-workspace.h \
core/edge-resistance.c \ core/edge-resistance.c \
core/edge-resistance.h \ core/edge-resistance.h \
core/edid-parse.c \ core/edid-parse.c \
@@ -121,6 +134,7 @@ libmutter_la_SOURCES = \
core/meta-xrandr-shared.h \ core/meta-xrandr-shared.h \
core/monitor.c \ core/monitor.c \
core/monitor-config.c \ core/monitor-config.c \
core/monitor-kms.c \
core/monitor-private.h \ core/monitor-private.h \
core/monitor-xrandr.c \ core/monitor-xrandr.c \
core/mutter-Xatomtype.h \ core/mutter-Xatomtype.h \
@@ -132,18 +146,14 @@ libmutter_la_SOURCES = \
core/screen-private.h \ core/screen-private.h \
meta/screen.h \ meta/screen.h \
meta/types.h \ meta/types.h \
core/restart.c \
core/session.c \ core/session.c \
core/session.h \ core/session.h \
core/stereo.c \
core/stereo.h \
core/stack.c \ core/stack.c \
core/stack.h \ core/stack.h \
core/stack-tracker.c \ core/stack-tracker.c \
core/stack-tracker.h \ core/stack-tracker.h \
core/util.c \ core/util.c \
meta/util.h \ meta/util.h \
core/util-private.h \
core/window-props.c \ core/window-props.c \
core/window-props.h \ core/window-props.h \
core/window.c \ core/window.c \
@@ -164,17 +174,40 @@ libmutter_la_SOURCES = \
ui/metaaccellabel.h \ ui/metaaccellabel.h \
ui/resizepopup.c \ ui/resizepopup.c \
ui/resizepopup.h \ ui/resizepopup.h \
ui/tabpopup.c \
ui/tabpopup.h \
ui/tile-preview.c \
ui/tile-preview.h \
ui/theme-parser.c \ ui/theme-parser.c \
ui/theme.c \ ui/theme.c \
meta/theme.h \ meta/theme.h \
ui/theme-private.h \ ui/theme-private.h \
ui/ui.c ui/ui.c \
nodist_libmutter_la_SOURCES = \
$(mutter_built_sources) $(mutter_built_sources)
libmutter_la_LDFLAGS = -no-undefined libmutter_wayland_la_SOURCES += \
libmutter_la_LIBADD = $(MUTTER_LIBS) wayland/meta-wayland.c \
wayland/meta-wayland-private.h \
wayland/meta-xwayland-private.h \
wayland/meta-xwayland.c \
wayland/meta-wayland-data-device.c \
wayland/meta-wayland-data-device.h \
wayland/meta-wayland-keyboard.c \
wayland/meta-wayland-keyboard.h \
wayland/meta-wayland-pointer.c \
wayland/meta-wayland-pointer.h \
wayland/meta-wayland-seat.c \
wayland/meta-wayland-seat.h \
wayland/meta-wayland-stage.h \
wayland/meta-wayland-stage.c \
wayland/meta-wayland-surface.c \
wayland/meta-wayland-surface.h \
wayland/meta-wayland-types.h \
wayland/meta-weston-launch.c \
wayland/meta-weston-launch.h
libmutter_wayland_la_LDFLAGS = -no-undefined
libmutter_wayland_la_LIBADD = $(MUTTER_LIBS)
# Headers installed for plugins; introspected information will # Headers installed for plugins; introspected information will
# be extracted into Mutter-<version>.gir # be extracted into Mutter-<version>.gir
@@ -212,20 +245,27 @@ libmutterinclude_base_headers = \
libmutterinclude_extra_headers = \ libmutterinclude_extra_headers = \
meta/atomnames.h meta/atomnames.h
libmutterincludedir = $(includedir)/mutter/meta libmutterincludedir = $(includedir)/mutter-wayland/meta
libmutterinclude_HEADERS = \ libmutterinclude_HEADERS = \
$(libmutterinclude_base_headers) \ $(libmutterinclude_base_headers) \
$(libmutterinclude_extra_headers) $(libmutterinclude_extra_headers)
bin_PROGRAMS=mutter bin_PROGRAMS=mutter-wayland
mutter_SOURCES = core/mutter.c mutter_wayland_SOURCES = core/mutter.c
mutter_LDADD = $(MUTTER_LIBS) libmutter.la mutter_wayland_LDADD = $(MUTTER_LIBS) libmutter-wayland.la
libexec_PROGRAMS = mutter-restart-helper bin_PROGRAMS+=mutter-launch
mutter_restart_helper_SOURCES = core/restart-helper.c
mutter_restart_helper_LDADD = $(MUTTER_LIBS) mutter_launch_SOURCES = wayland/weston-launch.c wayland/weston-launch.h
mutter_launch_CFLAGS = $(MUTTER_LAUNCH_CFLAGS) -DLIBDIR=\"$(libdir)\"
mutter_launch_LDFLAGS = $(MUTTER_LAUNCH_LIBS) -lpam
install-exec-hook:
-chown root $(DESTDIR)$(bindir)/mutter-launch
-chmod u+s $(DESTDIR)$(bindir)/mutter-launch
if HAVE_INTROSPECTION if HAVE_INTROSPECTION
include $(INTROSPECTION_MAKEFILE) include $(INTROSPECTION_MAKEFILE)
@@ -247,15 +287,15 @@ typelib_DATA = Meta-$(api_version).typelib
INTROSPECTION_GIRS = Meta-$(api_version).gir INTROSPECTION_GIRS = Meta-$(api_version).gir
Meta-$(api_version).gir: libmutter.la Meta-$(api_version).gir: libmutter-wayland.la
@META_GIR@_INCLUDES = GObject-2.0 GDesktopEnums-3.0 Gdk-3.0 Gtk-3.0 Clutter-1.0 xlib-2.0 xfixes-4.0 Cogl-1.0 @META_GIR@_INCLUDES = GObject-2.0 GDesktopEnums-3.0 Gdk-3.0 Gtk-3.0 Clutter-1.0 xlib-2.0 xfixes-4.0 Cogl-1.0
@META_GIR@_EXPORT_PACKAGES = libmutter @META_GIR@_EXPORT_PACKAGES = libmutter-wayland
@META_GIR@_CFLAGS = $(INCLUDES) @META_GIR@_CFLAGS = $(INCLUDES)
@META_GIR@_LIBS = libmutter.la @META_GIR@_LIBS = libmutter-wayland.la
@META_GIR@_FILES = \ @META_GIR@_FILES = \
mutter-enum-types.h \ mutter-enum-types.h \
$(libmutterinclude_base_headers) \ $(libmutterinclude_base_headers) \
$(filter %.c,$(libmutter_la_SOURCES) $(nodist_libmutter_la_SOURCES)) $(filter %.c,$(libmutter_wayland_la_SOURCES))
@META_GIR@_SCANNERFLAGS = --warn-all --warn-error @META_GIR@_SCANNERFLAGS = --warn-all --warn-error
endif endif
@@ -266,22 +306,17 @@ testasyncgetprop_SOURCES = core/testasyncgetprop.c
noinst_PROGRAMS=testboxes testgradient testasyncgetprop noinst_PROGRAMS=testboxes testgradient testasyncgetprop
testboxes_LDADD = $(MUTTER_LIBS) libmutter.la testboxes_LDADD = $(MUTTER_LIBS) libmutter-wayland.la
testgradient_LDADD = $(MUTTER_LIBS) libmutter.la testgradient_LDADD = $(MUTTER_LIBS) libmutter-wayland.la
testasyncgetprop_LDADD = $(MUTTER_LIBS) libmutter.la testasyncgetprop_LDADD = $(MUTTER_LIBS) libmutter-wayland.la
@INTLTOOL_DESKTOP_RULE@ @INTLTOOL_DESKTOP_RULE@
desktopfilesdir=$(datadir)/applications desktopfilesdir=$(datadir)/applications
desktopfiles_in_files=mutter.desktop.in desktopfiles_in_files=mutter-wayland.desktop.in
desktopfiles_files=$(desktopfiles_in_files:.desktop.in=.desktop) desktopfiles_files=$(desktopfiles_in_files:.desktop.in=.desktop)
desktopfiles_DATA = $(desktopfiles_files) desktopfiles_DATA = $(desktopfiles_files)
wmpropertiesdir=$(datadir)/gnome/wm-properties
wmproperties_in_files=mutter-wm.desktop.in
wmproperties_files=$(wmproperties_in_files:.desktop.in=.desktop)
wmproperties_DATA = $(wmproperties_files)
xmldir = @GNOME_KEYBINDINGS_KEYSDIR@ xmldir = @GNOME_KEYBINDINGS_KEYSDIR@
xml_in_files = \ xml_in_files = \
50-mutter-navigation.xml.in \ 50-mutter-navigation.xml.in \
@@ -289,7 +324,9 @@ xml_in_files = \
50-mutter-windows.xml.in 50-mutter-windows.xml.in
xml_DATA = $(xml_in_files:.xml.in=.xml) xml_DATA = $(xml_in_files:.xml.in=.xml)
gsettings_SCHEMAS = org.gnome.mutter.gschema.xml dbus_idle_built_sources = meta-dbus-idle-monitor.c meta-dbus-idle-monitor.h
gsettings_SCHEMAS = org.gnome.mutter.gschema.xml org.gnome.mutter.wayland.gschema.xml
@INTLTOOL_XML_NOMERGE_RULE@ @INTLTOOL_XML_NOMERGE_RULE@
@GSETTINGS_RULES@ @GSETTINGS_RULES@
@@ -297,9 +334,10 @@ convertdir = $(datadir)/GConf/gsettings
convert_DATA = mutter-schemas.convert convert_DATA = mutter-schemas.convert
CLEANFILES = \ CLEANFILES = \
mutter.desktop \ mutter-wayland.desktop \
mutter-wm.desktop \ mutter-wm.desktop \
org.gnome.mutter.gschema.xml \ org.gnome.mutter.gschema.xml \
org.gnome.mutter.wayland.gschema.xml \
$(xml_DATA) \ $(xml_DATA) \
$(mutter_built_sources) \ $(mutter_built_sources) \
$(typelib_DATA) \ $(typelib_DATA) \
@@ -307,7 +345,7 @@ CLEANFILES = \
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libmutter.pc mutter-plugins.pc pkgconfig_DATA = libmutter-wayland.pc
EXTRA_DIST=$(desktopfiles_files) \ EXTRA_DIST=$(desktopfiles_files) \
$(wmproperties_files) \ $(wmproperties_files) \
@@ -316,13 +354,12 @@ EXTRA_DIST=$(desktopfiles_files) \
$(wmproperties_in_files) \ $(wmproperties_in_files) \
$(xml_in_files) \ $(xml_in_files) \
org.gnome.mutter.gschema.xml.in \ org.gnome.mutter.gschema.xml.in \
idle-monitor.xml \ org.gnome.mutter.wayland.gschema.xml.in \
xrandr.xml \
mutter-schemas.convert \ mutter-schemas.convert \
libmutter.pc.in \ libmutter-wayland.pc.in \
mutter-plugins.pc.in \
mutter-enum-types.h.in \ mutter-enum-types.h.in \
mutter-enum-types.c.in mutter-enum-types.c.in \
xrandr.xml idle-monitor.xml
BUILT_SOURCES = $(mutter_built_sources) BUILT_SOURCES = $(mutter_built_sources)
MUTTER_STAMP_FILES = stamp-mutter-enum-types.h MUTTER_STAMP_FILES = stamp-mutter-enum-types.h
@@ -365,3 +402,13 @@ $(dbus_idle_built_sources) : Makefile.am idle-monitor.xml
--generate-c-code meta-dbus-idle-monitor \ --generate-c-code meta-dbus-idle-monitor \
--c-generate-object-manager \ --c-generate-object-manager \
$(srcdir)/idle-monitor.xml $(srcdir)/idle-monitor.xml
wayland/%-protocol.c : $(top_builddir)/protocol/%.xml
mkdir -p wayland
$(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
wayland/%-server-protocol.h : $(top_builddir)/protocol/%.xml
mkdir -p wayland
$(AM_V_GEN)$(WAYLAND_SCANNER) server-header < $< > $@
wayland/%-client-protocol.h : $(top_builddir)/protocol/%.xml
mkdir -p wayland
$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@

View File

@@ -16,7 +16,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#include "clutter-utils.h" #include "clutter-utils.h"
@@ -93,9 +95,7 @@ meta_actor_vertices_are_untransformed (ClutterVertex *verts,
v3x != v1x || v3y != v2y) v3x != v1x || v3y != v2y)
return FALSE; return FALSE;
if (x_origin)
*x_origin = x; *x_origin = x;
if (y_origin)
*y_origin = y; *y_origin = y;
return TRUE; return TRUE;

View File

@@ -15,7 +15,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#ifndef __META_CLUTTER_UTILS_H__ #ifndef __META_CLUTTER_UTILS_H__

View File

@@ -16,7 +16,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#include <clutter/clutter.h> #include <clutter/clutter.h>
@@ -48,7 +50,7 @@ meta_create_color_texture_4ub (guint8 red,
CoglColor color; CoglColor color;
guint8 pixel[4]; guint8 pixel[4];
cogl_color_init_from_4ub (&color, red, green, blue, alpha); cogl_color_set_from_4ub (&color, red, green, blue, alpha);
cogl_color_premultiply (&color); cogl_color_premultiply (&color);
pixel[0] = cogl_color_get_red_byte (&color); pixel[0] = cogl_color_get_red_byte (&color);
@@ -71,8 +73,10 @@ meta_create_color_texture_4ub (guint8 red,
* @src_texture: (allow-none): texture to use initially for the layer * @src_texture: (allow-none): texture to use initially for the layer
* *
* Creates a pipeline with a single layer. Using a common template * Creates a pipeline with a single layer. Using a common template
* makes it easier for Cogl to share a shader for different uses in * allows sharing a shader for different uses in Mutter. To share the same
* Mutter. * shader with all other pipelines that are just texture plus opacity
* would require Cogl fixes.
* (See http://bugzilla.clutter-project.org/show_bug.cgi?id=2425)
* *
* Return value: (transfer full): a newly created #CoglPipeline * Return value: (transfer full): a newly created #CoglPipeline
*/ */
@@ -82,21 +86,22 @@ meta_create_texture_pipeline (CoglTexture *src_texture)
static CoglPipeline *texture_pipeline_template = NULL; static CoglPipeline *texture_pipeline_template = NULL;
CoglPipeline *pipeline; CoglPipeline *pipeline;
/* The only state used in the pipeline that would affect the shader /* We use a pipeline that has a dummy texture as a base for all
generation is the texture type on the layer. Therefore we create texture pipelines. The idea is that only the Cogl texture object
a template pipeline which sets this state and all texture would be different in the children so it is likely that Cogl will
pipelines are created as a copy of this. That way Cogl can find be able to share GL programs between all the textures. */
the shader state for the pipeline more quickly by looking at the
pipeline ancestry instead of resorting to the shader cache. */
if (G_UNLIKELY (texture_pipeline_template == NULL)) if (G_UNLIKELY (texture_pipeline_template == NULL))
{ {
CoglContext *ctx = CoglTexture *dummy_texture;
clutter_backend_get_cogl_context (clutter_get_default_backend ()); CoglContext *ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
dummy_texture = meta_create_color_texture_4ub (0xff, 0xff, 0xff, 0xff,
COGL_TEXTURE_NONE);
texture_pipeline_template = cogl_pipeline_new (ctx); texture_pipeline_template = cogl_pipeline_new (ctx);
cogl_pipeline_set_layer_null_texture (texture_pipeline_template, cogl_pipeline_set_layer_texture (texture_pipeline_template, 0, dummy_texture);
0, /* layer */ cogl_object_unref (dummy_texture);
COGL_TEXTURE_TYPE_2D);
} }
pipeline = cogl_pipeline_copy (texture_pipeline_template); pipeline = cogl_pipeline_copy (texture_pipeline_template);

View File

@@ -15,7 +15,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#ifndef __META_COGL_UTILS_H__ #ifndef __META_COGL_UTILS_H__

View File

@@ -17,6 +17,8 @@ struct _MetaCompositor
{ {
MetaDisplay *display; MetaDisplay *display;
Atom atom_x_root_pixmap;
Atom atom_net_wm_window_opacity;
guint repaint_func_id; guint repaint_func_id;
ClutterActor *shadow_src; ClutterActor *shadow_src;
@@ -26,8 +28,6 @@ struct _MetaCompositor
gint64 server_time_query_time; gint64 server_time_query_time;
gint64 server_time_offset; gint64 server_time_offset;
int glx_opcode;
guint server_time_is_monotonic_time : 1; guint server_time_is_monotonic_time : 1;
guint show_redraw : 1; guint show_redraw : 1;
guint debug : 1; guint debug : 1;
@@ -49,13 +49,13 @@ struct _MetaCompScreen
/* Used for unredirecting fullscreen windows */ /* Used for unredirecting fullscreen windows */
guint disable_unredirect_count; guint disable_unredirect_count;
MetaWindow *unredirected_window; MetaWindowActor *unredirected_window;
/* Before we create the output window */
XserverRegion pending_input_region;
gint switch_workspace_in_progress; gint switch_workspace_in_progress;
guint stereo_tree_ext : 1;
guint have_stereo_windows : 1;
MetaPluginManager *plugin_mgr; MetaPluginManager *plugin_mgr;
}; };
@@ -77,9 +77,4 @@ gint64 meta_compositor_monotonic_time_to_server_time (MetaDisplay *display,
void meta_check_end_modal (MetaScreen *screen); void meta_check_end_modal (MetaScreen *screen);
gboolean meta_compositor_window_is_stereo (MetaScreen *screen,
Window xwindow);
void meta_compositor_select_stereo_notify (MetaScreen *screen,
Window xwindow);
#endif /* META_COMPOSITOR_PRIVATE_H */ #endif /* META_COMPOSITOR_PRIVATE_H */

View File

@@ -42,6 +42,15 @@
* the call, so it may be necessary to readjust the display based on the * the call, so it may be necessary to readjust the display based on the
* old_rect to start the animation. * old_rect to start the animation.
* *
* meta_compositor_window_mapped() and meta_compositor_window_unmapped() are
* notifications when the toplevel window (frame or client window) is mapped or
* unmapped. That is, when the result of meta_window_toplevel_is_mapped()
* changes. The main use of this is to drop resources when a window is unmapped.
* A window will always be mapped before meta_compositor_show_window()
* is called and will not be unmapped until after meta_compositor_hide_window()
* is called. If the live_hidden_windows preference is set, windows will never
* be unmapped.
*
* # Containers # * # Containers #
* *
* There's two containers in the stage that are used to place window actors, here * There's two containers in the stage that are used to place window actors, here
@@ -74,9 +83,10 @@
#include "meta-window-actor-private.h" #include "meta-window-actor-private.h"
#include "meta-window-group.h" #include "meta-window-group.h"
#include "window-private.h" /* to check window->hidden */ #include "window-private.h" /* to check window->hidden */
#include "display-private.h" #include "display-private.h" /* for meta_display_lookup_x_window() */
#include "stereo.h" #include "meta-wayland-private.h"
#include "util-private.h" #include "meta-wayland-pointer.h"
#include "meta-wayland-keyboard.h"
#include <X11/extensions/shape.h> #include <X11/extensions/shape.h>
#include <X11/extensions/Xcomposite.h> #include <X11/extensions/Xcomposite.h>
@@ -165,7 +175,32 @@ process_damage (MetaCompositor *compositor,
if (window_actor == NULL) if (window_actor == NULL)
return; return;
meta_window_actor_process_damage (window_actor, event); meta_window_actor_process_x11_damage (window_actor, event);
}
static void
process_property_notify (MetaCompositor *compositor,
XPropertyEvent *event,
MetaWindow *window)
{
MetaWindowActor *window_actor;
if (window == NULL)
return;
window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
if (window_actor == NULL)
return;
/* Check for the opacity changing */
if (event->atom == compositor->atom_net_wm_window_opacity)
{
meta_window_actor_update_opacity (window_actor);
DEBUG_TRACE ("process_property_notify: net_wm_window_opacity\n");
return;
}
DEBUG_TRACE ("process_property_notify: unknown\n");
} }
static Window static Window
@@ -182,10 +217,6 @@ get_output_window (MetaScreen *screen)
xroot = meta_screen_get_xroot (screen); xroot = meta_screen_get_xroot (screen);
output = XCompositeGetOverlayWindow (xdisplay, xroot); output = XCompositeGetOverlayWindow (xdisplay, xroot);
/* Now that we've gotten taken a reference count on the COW, we
* can close the helper that is holding on to it */
meta_restart_finish ();
meta_core_add_old_event_mask (xdisplay, output, &mask); meta_core_add_old_event_mask (xdisplay, output, &mask);
XISetMask (mask.mask, XI_KeyPress); XISetMask (mask.mask, XI_KeyPress);
@@ -276,8 +307,8 @@ meta_get_window_actors (MetaScreen *screen)
return info->windows; return info->windows;
} }
void static void
meta_set_stage_input_region (MetaScreen *screen, do_set_stage_input_region (MetaScreen *screen,
XserverRegion region) XserverRegion region)
{ {
MetaCompScreen *info = meta_screen_get_compositor_data (screen); MetaCompScreen *info = meta_screen_get_compositor_data (screen);
@@ -295,6 +326,43 @@ meta_set_stage_input_region (MetaScreen *screen,
XFixesSetWindowShapeRegion (xdpy, info->output, ShapeInput, 0, 0, region); XFixesSetWindowShapeRegion (xdpy, info->output, ShapeInput, 0, 0, region);
} }
void
meta_set_stage_input_region (MetaScreen *screen,
XserverRegion region)
{
/* As a wayland compositor we can simply ignore all this trickery
* for setting an input region on the stage for capturing events in
* clutter since all input comes to us first and we get to choose
* who else sees them.
*/
if (!meta_is_wayland_compositor ())
{
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
MetaDisplay *display = meta_screen_get_display (screen);
Display *xdpy = meta_display_get_xdisplay (display);
if (info->stage && info->output)
{
do_set_stage_input_region (screen, region);
}
else
{
/* Reset info->pending_input_region if one existed before and set the new
* one to use it later. */
if (info->pending_input_region)
{
XFixesDestroyRegion (xdpy, info->pending_input_region);
info->pending_input_region = None;
}
if (region != None)
{
info->pending_input_region = XFixesCreateRegion (xdpy, NULL, 0);
XFixesCopyRegion (xdpy, info->pending_input_region, region);
}
}
}
}
void void
meta_empty_stage_input_region (MetaScreen *screen) meta_empty_stage_input_region (MetaScreen *screen)
{ {
@@ -323,6 +391,8 @@ meta_focus_stage_window (MetaScreen *screen,
if (!stage) if (!stage)
return; return;
if (!meta_is_wayland_compositor ())
{
window = clutter_x11_get_stage_window (stage); window = clutter_x11_get_stage_window (stage);
if (window == None) if (window == None)
@@ -330,56 +400,46 @@ meta_focus_stage_window (MetaScreen *screen,
meta_display_set_input_focus_xwindow (screen->display, meta_display_set_input_focus_xwindow (screen->display,
screen, screen,
META_FOCUS_STAGE,
window, window,
timestamp); timestamp);
}
else
{
meta_display_set_input_focus_xwindow (screen->display,
screen,
META_FOCUS_STAGE,
None,
timestamp);
}
} }
gboolean gboolean
meta_stage_is_focused (MetaScreen *screen) meta_stage_is_focused (MetaScreen *screen)
{ {
ClutterStage *stage; ClutterStage *stage;
Window window;
stage = CLUTTER_STAGE (meta_get_stage_for_screen (screen)); stage = CLUTTER_STAGE (meta_get_stage_for_screen (screen));
if (!stage) if (!stage)
return FALSE; return FALSE;
window = clutter_x11_get_stage_window (stage); return (screen->display->focus_type == META_FOCUS_STAGE);
if (window == None)
return FALSE;
return (screen->display->focus_xwindow == window);
} }
gboolean static gboolean
meta_begin_modal_for_plugin (MetaScreen *screen, begin_modal_x11 (MetaScreen *screen,
MetaPlugin *plugin, MetaPlugin *plugin,
MetaModalOptions options, MetaModalOptions options,
guint32 timestamp) guint32 timestamp)
{ {
/* To some extent this duplicates code in meta_display_begin_grab_op(), but there
* are significant differences in how we handle grabs that make it difficult to
* merge the two.
*/
MetaDisplay *display = meta_screen_get_display (screen); MetaDisplay *display = meta_screen_get_display (screen);
Display *xdpy = meta_display_get_xdisplay (display); Display *xdpy = meta_display_get_xdisplay (display);
MetaCompositor *compositor = display->compositor; MetaCompScreen *info = meta_screen_get_compositor_data (screen);
ClutterStage *stage; Window grab_window = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage));
Window grab_window;
Cursor cursor = None; Cursor cursor = None;
int result;
gboolean pointer_grabbed = FALSE; gboolean pointer_grabbed = FALSE;
gboolean keyboard_grabbed = FALSE; gboolean keyboard_grabbed = FALSE;
int result;
stage = CLUTTER_STAGE (meta_get_stage_for_screen (screen));
if (!stage)
return FALSE;
grab_window = clutter_x11_get_stage_window (stage);
if (compositor->modal_plugin != NULL || display->grab_op != META_GRAB_OP_NONE)
return FALSE;
if ((options & META_MODAL_POINTER_ALREADY_GRABBED) == 0) if ((options & META_MODAL_POINTER_ALREADY_GRABBED) == 0)
{ {
@@ -429,14 +489,6 @@ meta_begin_modal_for_plugin (MetaScreen *screen,
keyboard_grabbed = TRUE; keyboard_grabbed = TRUE;
} }
display->grab_op = META_GRAB_OP_COMPOSITOR;
display->grab_window = NULL;
display->grab_screen = screen;
display->grab_have_pointer = TRUE;
display->grab_have_keyboard = TRUE;
compositor->modal_plugin = plugin;
return TRUE; return TRUE;
fail: fail:
@@ -448,6 +500,80 @@ meta_begin_modal_for_plugin (MetaScreen *screen,
return FALSE; return FALSE;
} }
static gboolean
begin_modal_wayland (MetaScreen *screen,
MetaPlugin *plugin,
MetaModalOptions options,
guint32 timestamp)
{
MetaWaylandCompositor *compositor;
gboolean pointer_grabbed = FALSE;
gboolean keyboard_grabbed = FALSE;
compositor = meta_wayland_compositor_get_default ();
if ((options & META_MODAL_POINTER_ALREADY_GRABBED) == 0)
{
if (!meta_wayland_pointer_begin_modal (&compositor->seat->pointer))
goto fail;
pointer_grabbed = TRUE;
}
if ((options & META_MODAL_KEYBOARD_ALREADY_GRABBED) == 0)
{
if (!meta_wayland_keyboard_begin_modal (&compositor->seat->keyboard,
timestamp))
goto fail;
keyboard_grabbed = TRUE;
}
return TRUE;
fail:
if (pointer_grabbed)
meta_wayland_pointer_end_modal (&compositor->seat->pointer);
if (keyboard_grabbed)
meta_wayland_keyboard_end_modal (&compositor->seat->keyboard, timestamp);
return FALSE;
}
gboolean
meta_begin_modal_for_plugin (MetaScreen *screen,
MetaPlugin *plugin,
MetaModalOptions options,
guint32 timestamp)
{
/* To some extent this duplicates code in meta_display_begin_grab_op(), but there
* are significant differences in how we handle grabs that make it difficult to
* merge the two.
*/
MetaDisplay *display = meta_screen_get_display (screen);
MetaCompositor *compositor = display->compositor;
gboolean ok;
if (compositor->modal_plugin != NULL || display->grab_op != META_GRAB_OP_NONE)
return FALSE;
if (meta_is_wayland_compositor ())
ok = begin_modal_wayland (screen, plugin, options, timestamp);
else
ok = begin_modal_x11 (screen, plugin, options, timestamp);
if (!ok)
return FALSE;
display->grab_op = META_GRAB_OP_COMPOSITOR;
display->grab_window = NULL;
display->grab_screen = screen;
display->grab_have_pointer = TRUE;
display->grab_have_keyboard = TRUE;
compositor->modal_plugin = plugin;
return TRUE;
}
void void
meta_end_modal_for_plugin (MetaScreen *screen, meta_end_modal_for_plugin (MetaScreen *screen,
MetaPlugin *plugin, MetaPlugin *plugin,
@@ -459,8 +585,19 @@ meta_end_modal_for_plugin (MetaScreen *screen,
g_return_if_fail (compositor->modal_plugin == plugin); g_return_if_fail (compositor->modal_plugin == plugin);
if (meta_is_wayland_compositor ())
{
MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
meta_wayland_pointer_end_modal (&compositor->seat->pointer);
meta_wayland_keyboard_end_modal (&compositor->seat->keyboard,
timestamp);
}
else
{
XIUngrabDevice (xdpy, META_VIRTUAL_CORE_POINTER_ID, timestamp); XIUngrabDevice (xdpy, META_VIRTUAL_CORE_POINTER_ID, timestamp);
XIUngrabDevice (xdpy, META_VIRTUAL_CORE_KEYBOARD_ID, timestamp); XIUngrabDevice (xdpy, META_VIRTUAL_CORE_KEYBOARD_ID, timestamp);
}
display->grab_op = META_GRAB_OP_NONE; display->grab_op = META_GRAB_OP_NONE;
display->grab_window = NULL; display->grab_window = NULL;
@@ -512,6 +649,11 @@ redirect_windows (MetaCompositor *compositor,
guint n_retries; guint n_retries;
guint max_retries; guint max_retries;
/* If we're running with wayland, connected to a headless xwayland
* server then all the windows are implicitly redirected offscreen
* already and it would generate an error to try and explicitly
* redirect them via XCompositeRedirectSubwindows() */
if (meta_get_replace_current_wm ()) if (meta_get_replace_current_wm ())
max_retries = 5; max_retries = 5;
else else
@@ -545,101 +687,6 @@ redirect_windows (MetaCompositor *compositor,
} }
} }
#define GLX_STEREO_TREE_EXT 0x20F5
#define GLX_STEREO_NOTIFY_MASK_EXT 0x00000001
#define GLX_STEREO_NOTIFY_EXT 0x00000000
typedef struct {
int type;
unsigned long serial;
Bool send_event;
Display *display;
int extension;
int evtype;
Drawable window;
Bool stereo_tree;
} StereoNotifyEvent;
static gboolean
screen_has_stereo_tree_ext (MetaScreen *screen)
{
#if 0
MetaDisplay *display = meta_screen_get_display (screen);
Display *xdisplay = meta_display_get_xdisplay (display);
const char *extensions_string;
static const char * (*query_extensions_string) (Display *display,
int screen);
if (query_extensions_string == NULL)
query_extensions_string =
(const char * (*) (Display *, int))
cogl_get_proc_address ("glXQueryExtensionsString");
extensions_string = query_extensions_string (xdisplay,
meta_screen_get_screen_number (screen));
return strstr (extensions_string, "EXT_stereo_tree") != 0;
#else
return TRUE;
#endif
}
#include <GL/gl.h>
gboolean
meta_compositor_window_is_stereo (MetaScreen *screen,
Window xwindow)
{
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
MetaDisplay *display = meta_screen_get_display (screen);
Display *xdisplay = meta_display_get_xdisplay (display);
static int (*query_drawable) (Display *dpy,
Drawable draw,
int attribute,
unsigned int *value);
if (info->stereo_tree_ext)
{
unsigned int stereo_tree = 0;
if (query_drawable == NULL)
query_drawable =
(int (*) (Display *, Drawable, int, unsigned int *))
cogl_get_proc_address ("glXQueryDrawable");
query_drawable (xdisplay, xwindow, GLX_STEREO_TREE_EXT, &stereo_tree);
return stereo_tree != 0;
}
else
return FALSE;
}
void
meta_compositor_select_stereo_notify (MetaScreen *screen,
Window xwindow)
{
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
MetaDisplay *display = meta_screen_get_display (screen);
Display *xdisplay = meta_display_get_xdisplay (display);
static void (*select_event) (Display *dpy,
Drawable draw,
unsigned long event_mask);
if (info->stereo_tree_ext)
{
if (select_event == NULL)
select_event =
(void (*) (Display *, Drawable, unsigned long))
cogl_get_proc_address ("glXSelectEvent");
select_event (xdisplay, xwindow, GLX_STEREO_NOTIFY_MASK_EXT);
}
}
void void
meta_compositor_manage_screen (MetaCompositor *compositor, meta_compositor_manage_screen (MetaCompositor *compositor,
MetaScreen *screen) MetaScreen *screen)
@@ -647,14 +694,30 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
MetaCompScreen *info; MetaCompScreen *info;
MetaDisplay *display = meta_screen_get_display (screen); MetaDisplay *display = meta_screen_get_display (screen);
Display *xdisplay = meta_display_get_xdisplay (display); Display *xdisplay = meta_display_get_xdisplay (display);
Window xwin; Window xwin = None;
gint width, height; gint width, height;
MetaWaylandCompositor *wayland_compositor;
/* Check if the screen is already managed */ /* Check if the screen is already managed */
if (meta_screen_get_compositor_data (screen)) if (meta_screen_get_compositor_data (screen))
return; return;
info = g_new0 (MetaCompScreen, 1); info = g_new0 (MetaCompScreen, 1);
/*
* We use an empty input region for Clutter as a default because that allows
* the user to interact with all the windows displayed on the screen.
* We have to initialize info->pending_input_region to an empty region explicitly,
* because None value is used to mean that the whole screen is an input region.
*/
if (!meta_is_wayland_compositor ())
info->pending_input_region = XFixesCreateRegion (xdisplay, NULL, 0);
else
{
/* Stage input region trickery isn't needed when we're running as a
* wayland compositor. */
info->pending_input_region = None;
}
info->screen = screen; info->screen = screen;
meta_screen_set_compositor_data (screen, info); meta_screen_set_compositor_data (screen, info);
@@ -662,17 +725,22 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
info->output = None; info->output = None;
info->windows = NULL; info->windows = NULL;
info->stereo_tree_ext = screen_has_stereo_tree_ext (screen);
meta_screen_set_cm_selection (screen); meta_screen_set_cm_selection (screen);
/* We will have already created a stage if running as a wayland
* compositor... */
if (meta_is_wayland_compositor ())
{
wayland_compositor = meta_wayland_compositor_get_default ();
info->stage = wayland_compositor->stage;
meta_screen_get_size (screen, &width, &height);
clutter_actor_set_size (info->stage, width, height);
}
else
{
info->stage = clutter_stage_new (); info->stage = clutter_stage_new ();
g_signal_connect (CLUTTER_STAGE (info->stage), "after-paint",
G_CALLBACK (after_stage_paint), info);
clutter_stage_set_sync_delay (CLUTTER_STAGE (info->stage), META_SYNC_DELAY);
meta_screen_get_size (screen, &width, &height); meta_screen_get_size (screen, &width, &height);
clutter_actor_realize (info->stage); clutter_actor_realize (info->stage);
@@ -708,6 +776,14 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
XSelectInput (xdisplay, xwin, event_mask); XSelectInput (xdisplay, xwin, event_mask);
} }
}
clutter_stage_set_paint_callback (CLUTTER_STAGE (info->stage),
after_stage_paint,
info,
NULL);
clutter_stage_set_sync_delay (CLUTTER_STAGE (info->stage), META_SYNC_DELAY);
info->window_group = meta_window_group_new (screen); info->window_group = meta_window_group_new (screen);
info->top_window_group = meta_window_group_new (screen); info->top_window_group = meta_window_group_new (screen);
@@ -715,6 +791,24 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
clutter_actor_add_child (info->stage, info->window_group); clutter_actor_add_child (info->stage, info->window_group);
clutter_actor_add_child (info->stage, info->top_window_group); clutter_actor_add_child (info->stage, info->top_window_group);
info->plugin_mgr = meta_plugin_manager_new (screen);
if (meta_is_wayland_compositor ())
{
/* NB: When running as a wayland compositor we don't need an X
* composite overlay window, and we don't need to play any input
* region tricks to redirect events into clutter. */
info->output = None;
}
else
{
/*
* Delay the creation of the overlay window as long as we can, to avoid
* blanking out the screen. This means that during the plugin loading, the
* overlay window is not accessible; if the plugin needs to access it
* directly, it should hook into the "show" signal on stage, and do
* its stuff there.
*/
info->output = get_output_window (screen); info->output = get_output_window (screen);
XReparentWindow (xdisplay, xwin, info->output, 0, 0); XReparentWindow (xdisplay, xwin, info->output, 0, 0);
@@ -728,20 +822,12 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
*/ */
XFixesSetWindowShapeRegion (xdisplay, info->output, ShapeBounding, 0, 0, None); XFixesSetWindowShapeRegion (xdisplay, info->output, ShapeBounding, 0, 0, None);
info->output = get_output_window (screen); do_set_stage_input_region (screen, info->pending_input_region);
XReparentWindow (xdisplay, xwin, info->output, 0, 0); if (info->pending_input_region != None)
{
meta_empty_stage_input_region (screen); XFixesDestroyRegion (xdisplay, info->pending_input_region);
info->pending_input_region = None;
/* Make sure there isn't any left-over output shape on the }
* overlay window by setting the whole screen to be an
* output region.
*
* Note: there doesn't seem to be any real chance of that
* because the X server will destroy the overlay window
* when the last client using it exits.
*/
XFixesSetWindowShapeRegion (xdisplay, info->output, ShapeBounding, 0, 0, None);
/* Map overlay window before redirecting windows offscreen so we catch their /* Map overlay window before redirecting windows offscreen so we catch their
* contents until we show the stage. * contents until we show the stage.
@@ -749,14 +835,15 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
XMapWindow (xdisplay, info->output); XMapWindow (xdisplay, info->output);
redirect_windows (compositor, screen); redirect_windows (compositor, screen);
}
info->plugin_mgr = meta_plugin_manager_new (screen);
} }
void void
meta_compositor_unmanage_screen (MetaCompositor *compositor, meta_compositor_unmanage_screen (MetaCompositor *compositor,
MetaScreen *screen) MetaScreen *screen)
{ {
if (!meta_is_wayland_compositor ())
{
MetaDisplay *display = meta_screen_get_display (screen); MetaDisplay *display = meta_screen_get_display (screen);
Display *xdisplay = meta_display_get_xdisplay (display); Display *xdisplay = meta_display_get_xdisplay (display);
Window xroot = meta_screen_get_xroot (screen); Window xroot = meta_screen_get_xroot (screen);
@@ -765,6 +852,7 @@ meta_compositor_unmanage_screen (MetaCompositor *compositor,
* before giving up the window manager selection or the next * before giving up the window manager selection or the next
* window manager won't be able to redirect subwindows */ * window manager won't be able to redirect subwindows */
XCompositeUnredirectSubwindows (xdisplay, xroot, CompositeRedirectManual); XCompositeUnredirectSubwindows (xdisplay, xroot, CompositeRedirectManual);
}
} }
/* /*
@@ -787,7 +875,7 @@ meta_shape_cow_for_window (MetaScreen *screen,
int width, height; int width, height;
MetaRectangle rect; MetaRectangle rect;
meta_window_get_frame_rect (metaWindow, &rect); meta_window_get_outer_rect (metaWindow, &rect);
window_bounds.x = rect.x; window_bounds.x = rect.x;
window_bounds.y = rect.y; window_bounds.y = rect.y;
@@ -808,30 +896,6 @@ meta_shape_cow_for_window (MetaScreen *screen,
} }
} }
static void
set_unredirected_window (MetaCompScreen *info,
MetaWindow *window)
{
if (info->unredirected_window == window)
return;
if (info->unredirected_window != NULL)
{
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (info->unredirected_window));
meta_window_actor_set_unredirected (window_actor, FALSE);
}
info->unredirected_window = window;
if (info->unredirected_window != NULL)
{
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (info->unredirected_window));
meta_window_actor_set_unredirected (window_actor, TRUE);
}
meta_shape_cow_for_window (info->screen, info->unredirected_window);
}
void void
meta_compositor_add_window (MetaCompositor *compositor, meta_compositor_add_window (MetaCompositor *compositor,
MetaWindow *window) MetaWindow *window)
@@ -860,11 +924,19 @@ meta_compositor_remove_window (MetaCompositor *compositor,
if (!window_actor) if (!window_actor)
return; return;
if (!meta_is_wayland_compositor ())
{
screen = meta_window_get_screen (window); screen = meta_window_get_screen (window);
info = meta_screen_get_compositor_data (screen); info = meta_screen_get_compositor_data (screen);
if (info->unredirected_window == window) if (window_actor == info->unredirected_window)
set_unredirected_window (info, NULL); {
meta_window_actor_set_redirected (window_actor, TRUE);
meta_shape_cow_for_window (meta_window_get_screen (meta_window_actor_get_meta_window (info->unredirected_window)),
NULL);
info->unredirected_window = NULL;
}
}
meta_window_actor_destroy (window_actor); meta_window_actor_destroy (window_actor);
} }
@@ -934,18 +1006,6 @@ meta_compositor_window_shape_changed (MetaCompositor *compositor,
meta_window_actor_update_shape (window_actor); meta_window_actor_update_shape (window_actor);
} }
void
meta_compositor_window_opacity_changed (MetaCompositor *compositor,
MetaWindow *window)
{
MetaWindowActor *window_actor;
window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
if (!window_actor)
return;
meta_window_actor_update_opacity (window_actor);
}
/* Clutter makes the assumption that there is only one X window /* Clutter makes the assumption that there is only one X window
* per stage, which is a valid assumption to make for a generic * per stage, which is a valid assumption to make for a generic
* application toolkit. As such, it will ignore any events sent * application toolkit. As such, it will ignore any events sent
@@ -1006,7 +1066,10 @@ meta_compositor_process_event (MetaCompositor *compositor,
{ {
if (compositor->modal_plugin && is_grabbed_event (compositor->display, event)) if (compositor->modal_plugin && is_grabbed_event (compositor->display, event))
{ {
_meta_plugin_xevent_filter (compositor->modal_plugin, event); MetaPluginClass *klass = META_PLUGIN_GET_CLASS (compositor->modal_plugin);
if (klass->xevent_filter)
klass->xevent_filter (compositor->modal_plugin, event);
/* We always consume events even if the plugin says it didn't handle them; /* We always consume events even if the plugin says it didn't handle them;
* exclusive is exclusive */ * exclusive is exclusive */
@@ -1052,23 +1115,15 @@ meta_compositor_process_event (MetaCompositor *compositor,
} }
} }
if (event->type == GenericEvent && switch (event->type)
event->xcookie.extension == compositor->glx_opcode)
{ {
if (event->xcookie.evtype == GLX_STEREO_NOTIFY_EXT) case PropertyNotify:
{ process_property_notify (compositor, (XPropertyEvent *) event, window);
StereoNotifyEvent *stereo_event = (StereoNotifyEvent *)(event->xcookie.data); break;
window = meta_display_lookup_x_window (compositor->display, stereo_event->window);
if (window != NULL) default:
{ if (!meta_is_wayland_compositor () &&
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window)); event->type == meta_display_get_damage_event_base (compositor->display) + XDamageNotify)
meta_window_actor_stereo_notify (window_actor, stereo_event->stereo_tree);
}
}
}
if (event->type == meta_display_get_damage_event_base (compositor->display) + XDamageNotify)
{ {
/* Core code doesn't handle damage events, so we need to extract the MetaWindow /* Core code doesn't handle damage events, so we need to extract the MetaWindow
* ourselves * ourselves
@@ -1082,10 +1137,12 @@ meta_compositor_process_event (MetaCompositor *compositor,
DEBUG_TRACE ("meta_compositor_process_event (process_damage)\n"); DEBUG_TRACE ("meta_compositor_process_event (process_damage)\n");
process_damage (compositor, (XDamageNotifyEvent *) event, window); process_damage (compositor, (XDamageNotifyEvent *) event, window);
} }
break;
}
/* Clutter needs to know about MapNotify events otherwise it will /* Clutter needs to know about MapNotify events otherwise it will
think the stage is invisible */ think the stage is invisible */
if (event->type == MapNotify) if (!meta_is_wayland_compositor () && event->type == MapNotify)
clutter_x11_handle_event (event); clutter_x11_handle_event (event);
/* The above handling is basically just "observing" the events, so we return /* The above handling is basically just "observing" the events, so we return
@@ -1218,7 +1275,6 @@ sync_actor_stacking (MetaCompScreen *info)
* we go ahead and do it */ * we go ahead and do it */
children = clutter_actor_get_children (info->window_group); children = clutter_actor_get_children (info->window_group);
has_windows = FALSE;
reordered = FALSE; reordered = FALSE;
/* We allow for actors in the window group other than the actors we /* We allow for actors in the window group other than the actors we
@@ -1295,7 +1351,6 @@ meta_compositor_sync_stack (MetaCompositor *compositor,
{ {
GList *old_stack; GList *old_stack;
MetaCompScreen *info = meta_screen_get_compositor_data (screen); MetaCompScreen *info = meta_screen_get_compositor_data (screen);
int stereo_window_count = 0;
DEBUG_TRACE ("meta_compositor_sync_stack\n"); DEBUG_TRACE ("meta_compositor_sync_stack\n");
@@ -1373,16 +1428,36 @@ meta_compositor_sync_stack (MetaCompositor *compositor,
* near the front of the other.) * near the front of the other.)
*/ */
info->windows = g_list_prepend (info->windows, actor); info->windows = g_list_prepend (info->windows, actor);
if (meta_window_actor_is_stereo (actor))
stereo_window_count++;
stack = g_list_remove (stack, window); stack = g_list_remove (stack, window);
old_stack = g_list_remove (old_stack, actor); old_stack = g_list_remove (old_stack, actor);
} }
sync_actor_stacking (info); sync_actor_stacking (info);
}
meta_stereo_set_have_stereo_windows (stereo_window_count > 0); void
meta_compositor_window_mapped (MetaCompositor *compositor,
MetaWindow *window)
{
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
DEBUG_TRACE ("meta_compositor_window_mapped\n");
if (!window_actor)
return;
meta_window_actor_mapped (window_actor);
}
void
meta_compositor_window_unmapped (MetaCompositor *compositor,
MetaWindow *window)
{
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
DEBUG_TRACE ("meta_compositor_window_unmapped\n");
if (!window_actor)
return;
meta_window_actor_unmapped (window_actor);
} }
void void
@@ -1411,6 +1486,23 @@ meta_compositor_sync_screen_size (MetaCompositor *compositor,
{ {
MetaDisplay *display = meta_screen_get_display (screen); MetaDisplay *display = meta_screen_get_display (screen);
MetaCompScreen *info = meta_screen_get_compositor_data (screen); MetaCompScreen *info = meta_screen_get_compositor_data (screen);
if (meta_is_wayland_compositor ())
{
/* FIXME: when we support a sliced stage, this is the place to do it
But! This is not the place to apply KMS config, here we only
notify Clutter/Cogl/GL that the framebuffer sizes changed.
And because for now clutter does not do sliced, we use one
framebuffer the size of the whole screen, and when running on
bare metal MetaMonitorManager will do the necessary tricks to
show the right portions on the right screens.
*/
clutter_actor_set_size (info->stage, width, height);
}
else
{
Display *xdisplay; Display *xdisplay;
Window xwin; Window xwin;
@@ -1421,6 +1513,7 @@ meta_compositor_sync_screen_size (MetaCompositor *compositor,
xwin = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage)); xwin = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage));
XResizeWindow (xdisplay, xwin, width, height); XResizeWindow (xdisplay, xwin, width, height);
}
meta_verbose ("Changed size for stage on screen %d to %dx%d\n", meta_verbose ("Changed size for stage on screen %d to %dx%d\n",
meta_screen_get_screen_number (screen), meta_screen_get_screen_number (screen),
@@ -1474,6 +1567,7 @@ pre_paint_windows (MetaCompScreen *info)
{ {
GList *l; GList *l;
MetaWindowActor *top_window; MetaWindowActor *top_window;
MetaWindowActor *expected_unredirected_window = NULL;
if (info->onscreen == NULL) if (info->onscreen == NULL)
{ {
@@ -1487,13 +1581,33 @@ pre_paint_windows (MetaCompScreen *info)
if (info->windows == NULL) if (info->windows == NULL)
return; return;
if (!meta_is_wayland_compositor ())
{
top_window = g_list_last (info->windows)->data; top_window = g_list_last (info->windows)->data;
if (meta_window_actor_should_unredirect (top_window) && if (meta_window_actor_should_unredirect (top_window) &&
info->disable_unredirect_count == 0) info->disable_unredirect_count == 0)
set_unredirected_window (info, meta_window_actor_get_meta_window (top_window)); expected_unredirected_window = top_window;
else
set_unredirected_window (info, NULL); if (info->unredirected_window != expected_unredirected_window)
{
if (info->unredirected_window != NULL)
{
meta_window_actor_set_redirected (info->unredirected_window, TRUE);
meta_shape_cow_for_window (meta_window_get_screen (meta_window_actor_get_meta_window (info->unredirected_window)),
NULL);
}
if (expected_unredirected_window != NULL)
{
meta_shape_cow_for_window (meta_window_get_screen (meta_window_actor_get_meta_window (top_window)),
meta_window_actor_get_meta_window (top_window));
meta_window_actor_set_redirected (top_window, FALSE);
}
info->unredirected_window = expected_unredirected_window;
}
}
for (l = info->windows; l; l = l->next) for (l = info->windows; l; l = l->next)
meta_window_actor_pre_paint (l->data); meta_window_actor_pre_paint (l->data);
@@ -1547,8 +1661,13 @@ on_shadow_factory_changed (MetaShadowFactory *factory,
MetaCompositor * MetaCompositor *
meta_compositor_new (MetaDisplay *display) meta_compositor_new (MetaDisplay *display)
{ {
char *atom_names[] = {
"_XROOTPMAP_ID",
"_NET_WM_WINDOW_OPACITY",
};
Atom atoms[G_N_ELEMENTS(atom_names)];
MetaCompositor *compositor; MetaCompositor *compositor;
int glx_major_opcode, glx_first_event, glx_first_error; Display *xdisplay = meta_display_get_xdisplay (display);
if (!composite_at_least_version (display, 0, 3)) if (!composite_at_least_version (display, 0, 3))
return NULL; return NULL;
@@ -1560,18 +1679,21 @@ meta_compositor_new (MetaDisplay *display)
if (g_getenv("META_DISABLE_MIPMAPS")) if (g_getenv("META_DISABLE_MIPMAPS"))
compositor->no_mipmaps = TRUE; compositor->no_mipmaps = TRUE;
meta_verbose ("Creating %d atoms\n", (int) G_N_ELEMENTS (atom_names));
XInternAtoms (xdisplay, atom_names, G_N_ELEMENTS (atom_names),
False, atoms);
g_signal_connect (meta_shadow_factory_get_default (), g_signal_connect (meta_shadow_factory_get_default (),
"changed", "changed",
G_CALLBACK (on_shadow_factory_changed), G_CALLBACK (on_shadow_factory_changed),
compositor); compositor);
compositor->atom_x_root_pixmap = atoms[0];
compositor->atom_net_wm_window_opacity = atoms[1];
compositor->repaint_func_id = clutter_threads_add_repaint_func (meta_repaint_func, compositor->repaint_func_id = clutter_threads_add_repaint_func (meta_repaint_func,
compositor, compositor,
NULL); NULL);
if (XQueryExtension (meta_display_get_xdisplay (display),
"GLX",
&glx_major_opcode, &glx_first_event, &glx_first_error))
compositor->glx_opcode = glx_major_opcode;
return compositor; return compositor;
} }
@@ -1713,31 +1835,3 @@ meta_compositor_monotonic_time_to_server_time (MetaDisplay *display,
else else
return monotonic_time + compositor->server_time_offset; return monotonic_time + compositor->server_time_offset;
} }
void
meta_compositor_show_tile_preview (MetaCompositor *compositor,
MetaScreen *screen,
MetaWindow *window,
MetaRectangle *tile_rect,
int tile_monitor_number)
{
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
if (!info->plugin_mgr)
return;
meta_plugin_manager_show_tile_preview (info->plugin_mgr,
window, tile_rect, tile_monitor_number);
}
void
meta_compositor_hide_tile_preview (MetaCompositor *compositor,
MetaScreen *screen)
{
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
if (!info->plugin_mgr)
return;
meta_plugin_manager_hide_tile_preview (info->plugin_mgr);
}

View File

@@ -6,6 +6,9 @@
#include <meta/screen.h> #include <meta/screen.h>
#include <meta/meta-background-actor.h> #include <meta/meta-background-actor.h>
void meta_background_actor_set_clip_region (MetaBackgroundActor *self,
cairo_region_t *clip_region);
cairo_region_t *meta_background_actor_get_clip_region (MetaBackgroundActor *self); cairo_region_t *meta_background_actor_get_clip_region (MetaBackgroundActor *self);
#endif /* META_BACKGROUND_ACTOR_PRIVATE_H */ #endif /* META_BACKGROUND_ACTOR_PRIVATE_H */

View File

@@ -14,7 +14,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
* *
* Portions adapted from gnome-shell/src/shell-global.c * Portions adapted from gnome-shell/src/shell-global.c
*/ */
@@ -39,35 +41,20 @@
#include <meta/errors.h> #include <meta/errors.h>
#include <meta/meta-background.h> #include <meta/meta-background.h>
#include "meta-background-actor-private.h" #include "meta-background-actor-private.h"
#include "meta-cullable.h"
struct _MetaBackgroundActorPrivate struct _MetaBackgroundActorPrivate
{ {
cairo_region_t *clip_region; cairo_region_t *clip_region;
}; };
static void cullable_iface_init (MetaCullableInterface *iface); G_DEFINE_TYPE (MetaBackgroundActor, meta_background_actor, CLUTTER_TYPE_ACTOR);
G_DEFINE_TYPE_WITH_CODE (MetaBackgroundActor, meta_background_actor, CLUTTER_TYPE_ACTOR,
G_IMPLEMENT_INTERFACE (META_TYPE_CULLABLE, cullable_iface_init));
static void
set_clip_region (MetaBackgroundActor *self,
cairo_region_t *clip_region)
{
MetaBackgroundActorPrivate *priv = self->priv;
g_clear_pointer (&priv->clip_region, (GDestroyNotify) cairo_region_destroy);
if (clip_region)
priv->clip_region = cairo_region_copy (clip_region);
}
static void static void
meta_background_actor_dispose (GObject *object) meta_background_actor_dispose (GObject *object)
{ {
MetaBackgroundActor *self = META_BACKGROUND_ACTOR (object); MetaBackgroundActor *self = META_BACKGROUND_ACTOR (object);
set_clip_region (self, NULL); meta_background_actor_set_clip_region (self, NULL);
G_OBJECT_CLASS (meta_background_actor_parent_class)->dispose (object); G_OBJECT_CLASS (meta_background_actor_parent_class)->dispose (object);
} }
@@ -117,6 +104,26 @@ meta_background_actor_get_preferred_height (ClutterActor *actor,
*natural_height_p = height; *natural_height_p = height;
} }
static gboolean
meta_background_actor_get_paint_volume (ClutterActor *actor,
ClutterPaintVolume *volume)
{
ClutterContent *content;
gfloat width, height;
content = clutter_actor_get_content (actor);
if (!content)
return FALSE;
clutter_content_get_preferred_size (content, &width, &height);
clutter_paint_volume_set_width (volume, width);
clutter_paint_volume_set_height (volume, height);
return TRUE;
}
static void static void
meta_background_actor_class_init (MetaBackgroundActorClass *klass) meta_background_actor_class_init (MetaBackgroundActorClass *klass)
{ {
@@ -129,6 +136,7 @@ meta_background_actor_class_init (MetaBackgroundActorClass *klass)
actor_class->get_preferred_width = meta_background_actor_get_preferred_width; actor_class->get_preferred_width = meta_background_actor_get_preferred_width;
actor_class->get_preferred_height = meta_background_actor_get_preferred_height; actor_class->get_preferred_height = meta_background_actor_get_preferred_height;
actor_class->get_paint_volume = meta_background_actor_get_paint_volume;
} }
static void static void
@@ -158,27 +166,31 @@ meta_background_actor_new (void)
return CLUTTER_ACTOR (self); return CLUTTER_ACTOR (self);
} }
static void /**
meta_background_actor_cull_out (MetaCullable *cullable, * meta_background_actor_set_clip_region:
cairo_region_t *unobscured_region, * @self: a #MetaBackgroundActor
* @clip_region: (allow-none): the area of the actor (in allocate-relative
* coordinates) that is visible.
*
* Sets the area of the background that is unobscured by overlapping windows.
* This is used to optimize and only paint the visible portions.
*/
void
meta_background_actor_set_clip_region (MetaBackgroundActor *self,
cairo_region_t *clip_region) cairo_region_t *clip_region)
{ {
MetaBackgroundActor *self = META_BACKGROUND_ACTOR (cullable); MetaBackgroundActorPrivate *priv;
set_clip_region (self, clip_region);
}
static void g_return_if_fail (META_IS_BACKGROUND_ACTOR (self));
meta_background_actor_reset_culling (MetaCullable *cullable)
{
MetaBackgroundActor *self = META_BACKGROUND_ACTOR (cullable);
set_clip_region (self, NULL);
}
static void priv = self->priv;
cullable_iface_init (MetaCullableInterface *iface)
{ g_clear_pointer (&priv->clip_region,
iface->cull_out = meta_background_actor_cull_out; (GDestroyNotify)
iface->reset_culling = meta_background_actor_reset_culling; cairo_region_destroy);
if (clip_region)
priv->clip_region = cairo_region_copy (clip_region);
} }
/** /**

View File

@@ -0,0 +1,11 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
#ifndef META_BACKGROUND_GROUP_PRIVATE_H
#define META_BACKGROUND_GROUP_PRIVATE_H
#include <meta/screen.h>
#include <meta/meta-background-group.h>
void meta_background_group_set_clip_region (MetaBackgroundGroup *self,
cairo_region_t *visible_region);
#endif /* META_BACKGROUND_GROUP_PRIVATE_H */

View File

@@ -16,43 +16,87 @@
#include <config.h> #include <config.h>
#include <meta/meta-background-group.h> #include "compositor-private.h"
#include "meta-cullable.h" #include "clutter-utils.h"
#include "meta-background-actor-private.h"
#include "meta-background-group-private.h"
static void cullable_iface_init (MetaCullableInterface *iface); G_DEFINE_TYPE (MetaBackgroundGroup, meta_background_group, CLUTTER_TYPE_ACTOR);
G_DEFINE_TYPE_WITH_CODE (MetaBackgroundGroup, meta_background_group, CLUTTER_TYPE_ACTOR, struct _MetaBackgroundGroupPrivate
G_IMPLEMENT_INTERFACE (META_TYPE_CULLABLE, cullable_iface_init)); {
gpointer dummy;
};
static void
meta_background_group_dispose (GObject *object)
{
G_OBJECT_CLASS (meta_background_group_parent_class)->dispose (object);
}
static gboolean
meta_background_group_get_paint_volume (ClutterActor *actor,
ClutterPaintVolume *volume)
{
return clutter_paint_volume_set_from_allocation (volume, actor);
}
static void static void
meta_background_group_class_init (MetaBackgroundGroupClass *klass) meta_background_group_class_init (MetaBackgroundGroupClass *klass)
{ {
} GObjectClass *object_class = G_OBJECT_CLASS (klass);
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
static void actor_class->get_paint_volume = meta_background_group_get_paint_volume;
meta_background_group_cull_out (MetaCullable *cullable, object_class->dispose = meta_background_group_dispose;
cairo_region_t *unobscured_region,
cairo_region_t *clip_region)
{
meta_cullable_cull_out_children (cullable, unobscured_region, clip_region);
}
static void g_type_class_add_private (klass, sizeof (MetaBackgroundGroupPrivate));
meta_background_group_reset_culling (MetaCullable *cullable)
{
meta_cullable_reset_culling_children (cullable);
}
static void
cullable_iface_init (MetaCullableInterface *iface)
{
iface->cull_out = meta_background_group_cull_out;
iface->reset_culling = meta_background_group_reset_culling;
} }
static void static void
meta_background_group_init (MetaBackgroundGroup *self) meta_background_group_init (MetaBackgroundGroup *self)
{ {
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
META_TYPE_BACKGROUND_GROUP,
MetaBackgroundGroupPrivate);
}
/**
* meta_background_group_set_clip_region:
* @self: a #MetaBackgroundGroup
* @region: (allow-none): the parts of the background to paint
*
* Sets the area of the backgrounds that is unobscured by overlapping windows.
* This is used to optimize and only paint the visible portions.
*/
void
meta_background_group_set_clip_region (MetaBackgroundGroup *self,
cairo_region_t *region)
{
GList *children, *l;
children = clutter_actor_get_children (CLUTTER_ACTOR (self));
for (l = children; l; l = l->next)
{
ClutterActor *actor = l->data;
if (META_IS_BACKGROUND_ACTOR (actor))
{
meta_background_actor_set_clip_region (META_BACKGROUND_ACTOR (actor), region);
}
else if (META_IS_BACKGROUND_GROUP (actor))
{
int x, y;
if (!meta_actor_is_untransformed (actor, &x, &y))
continue;
cairo_region_translate (region, -x, -y);
meta_background_group_set_clip_region (META_BACKGROUND_GROUP (actor), region);
cairo_region_translate (region, x, y);
}
}
g_list_free (children);
} }
ClutterActor * ClutterActor *

View File

@@ -14,7 +14,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
/** /**
@@ -35,7 +37,6 @@
#include "mutter-enum-types.h" #include "mutter-enum-types.h"
#include <meta/errors.h> #include <meta/errors.h>
#include <meta/meta-background.h> #include <meta/meta-background.h>
#include "util-private.h"
#include "meta-background-actor-private.h" #include "meta-background-actor-private.h"
#define FRAGMENT_SHADER_DECLARATIONS \ #define FRAGMENT_SHADER_DECLARATIONS \

View File

@@ -1,201 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2013 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, see <http://www.gnu.org/licenses/>.
*
* Written by:
* Owen Taylor <otaylor@redhat.com>
* Ray Strode <rstrode@redhat.com>
* Jasper St. Pierre <jstpierre@mecheye.net>
*/
#include "config.h"
#include "meta-cullable.h"
#include "clutter-utils.h"
G_DEFINE_INTERFACE (MetaCullable, meta_cullable, CLUTTER_TYPE_ACTOR);
/**
* SECTION:meta-cullable
* @title: MetaCullable
* @short_description: CPU culling operations for efficient drawing
*
* When we are painting a stack of 5-10 large actors, the standard
* bottom-to-top method of drawing every actor results in a tremendous
* amount of overdraw. If these actors are painting textures like
* windows, it can easily max out the available memory bandwidth on a
* low-end graphics chipset. It's even worse if window textures are
* being accessed over the AGP bus.
*
* #MetaCullable is our solution. The basic technique applied here is to
* do a pre-pass before painting where we walk each actor from top to bottom
* and ask each actor to "cull itself out". We pass in a region it can copy
* to clip its drawing to, and the actor can subtract its fully opaque pixels
* so that actors underneath know not to draw there as well.
*/
/**
* meta_cullable_cull_out_children:
* @cullable: The #MetaCullable
* @unobscured_region: The unobscured region, as passed into cull_out()
* @clip_region: The clip region, as passed into cull_out()
*
* This is a helper method for actors that want to recurse over their
* child actors, and cull them out.
*
* See #MetaCullable and meta_cullable_cull_out() for more details.
*/
void
meta_cullable_cull_out_children (MetaCullable *cullable,
cairo_region_t *unobscured_region,
cairo_region_t *clip_region)
{
ClutterActor *actor = CLUTTER_ACTOR (cullable);
ClutterActor *child;
ClutterActorIter iter;
clutter_actor_iter_init (&iter, actor);
while (clutter_actor_iter_prev (&iter, &child))
{
float x, y;
gboolean needs_culling;
if (!META_IS_CULLABLE (child))
continue;
needs_culling = (unobscured_region != NULL && clip_region != NULL);
if (needs_culling && !CLUTTER_ACTOR_IS_VISIBLE (child))
needs_culling = FALSE;
/* If an actor has effects applied, then that can change the area
* it paints and the opacity, so we no longer can figure out what
* portion of the actor is obscured and what portion of the screen
* it obscures, so we skip the actor.
*
* This has a secondary beneficial effect: if a ClutterOffscreenEffect
* is applied to an actor, then our clipped redraws interfere with the
* caching of the FBO - even if we only need to draw a small portion
* of the window right now, ClutterOffscreenEffect may use other portions
* of the FBO later. So, skipping actors with effects applied also
* prevents these bugs.
*
* Theoretically, we should check clutter_actor_get_offscreen_redirect()
* as well for the same reason, but omitted for simplicity in the
* hopes that no-one will do that.
*/
if (needs_culling && clutter_actor_has_effects (child))
needs_culling = FALSE;
if (needs_culling && !meta_actor_is_untransformed (child, NULL, NULL))
needs_culling = FALSE;
if (needs_culling)
{
clutter_actor_get_position (child, &x, &y);
/* Temporarily move to the coordinate system of the actor */
cairo_region_translate (unobscured_region, - x, - y);
cairo_region_translate (clip_region, - x, - y);
meta_cullable_cull_out (META_CULLABLE (child), unobscured_region, clip_region);
cairo_region_translate (unobscured_region, x, y);
cairo_region_translate (clip_region, x, y);
}
else
{
meta_cullable_cull_out (META_CULLABLE (child), NULL, NULL);
}
}
}
/**
* meta_cullable_reset_culling_children:
* @cullable: The #MetaCullable
*
* This is a helper method for actors that want to recurse over their
* child actors, and cull them out.
*
* See #MetaCullable and meta_cullable_reset_culling() for more details.
*/
void
meta_cullable_reset_culling_children (MetaCullable *cullable)
{
ClutterActor *actor = CLUTTER_ACTOR (cullable);
ClutterActor *child;
ClutterActorIter iter;
clutter_actor_iter_init (&iter, actor);
while (clutter_actor_iter_next (&iter, &child))
{
if (!META_IS_CULLABLE (child))
continue;
meta_cullable_reset_culling (META_CULLABLE (child));
}
}
static void
meta_cullable_default_init (MetaCullableInterface *iface)
{
}
/**
* meta_cullable_cull_out:
* @cullable: The #MetaCullable
* @unobscured_region: The unobscured region, in @cullable's space.
* @clip_region: The clip region, in @cullable's space.
*
* When #MetaWindowGroup is painted, we walk over its direct cullable
* children from top to bottom and ask themselves to "cull out". Cullables
* can use @unobscured_region and @clip_region to clip their drawing. Actors
* interested in eliminating overdraw should copy the @clip_region and only
* paint those parts, as everything else has been obscured by actors above it.
*
* Actors that may have fully opaque parts should also subtract out a region
* that is fully opaque from @unobscured_region and @clip_region.
*
* @unobscured_region and @clip_region are extremely similar. The difference
* is that @clip_region starts off with the stage's clip, if Clutter detects
* that we're doing a clipped redraw. @unobscured_region, however, starts off
* with the full stage size, so actors that may want to record what parts of
* their window are unobscured for e.g. scheduling repaints can do so.
*
* Actors that have children can also use the meta_cullable_cull_out_children()
* helper method to do a simple cull across all their children.
*/
void
meta_cullable_cull_out (MetaCullable *cullable,
cairo_region_t *unobscured_region,
cairo_region_t *clip_region)
{
META_CULLABLE_GET_IFACE (cullable)->cull_out (cullable, unobscured_region, clip_region);
}
/**
* meta_cullable_reset_culling:
* @cullable: The #MetaCullable
*
* Actors that copied data in their cull_out() implementation can now
* reset their data, as the paint is now over. Additional paints may be
* done by #ClutterClone or similar, and they should not be affected by
* the culling operation.
*/
void
meta_cullable_reset_culling (MetaCullable *cullable)
{
META_CULLABLE_GET_IFACE (cullable)->reset_culling (cullable);
}

View File

@@ -1,66 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2013 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, see <http://www.gnu.org/licenses/>.
*
* Written by:
* Owen Taylor <otaylor@redhat.com>
* Ray Strode <rstrode@redhat.com>
* Jasper St. Pierre <jstpierre@mecheye.net>
*/
#ifndef __META_CULLABLE_H__
#define __META_CULLABLE_H__
#include <clutter/clutter.h>
G_BEGIN_DECLS
#define META_TYPE_CULLABLE (meta_cullable_get_type ())
#define META_CULLABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_CULLABLE, MetaCullable))
#define META_IS_CULLABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_CULLABLE))
#define META_CULLABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), META_TYPE_CULLABLE, MetaCullableInterface))
typedef struct _MetaCullable MetaCullable;
typedef struct _MetaCullableInterface MetaCullableInterface;
struct _MetaCullableInterface
{
GTypeInterface g_iface;
void (* cull_out) (MetaCullable *cullable,
cairo_region_t *unobscured_region,
cairo_region_t *clip_region);
void (* reset_culling) (MetaCullable *cullable);
};
GType meta_cullable_get_type (void);
void meta_cullable_cull_out (MetaCullable *cullable,
cairo_region_t *unobscured_region,
cairo_region_t *clip_region);
void meta_cullable_reset_culling (MetaCullable *cullable);
/* Utility methods for implementations */
void meta_cullable_cull_out_children (MetaCullable *cullable,
cairo_region_t *unobscured_region,
cairo_region_t *clip_region);
void meta_cullable_reset_culling_children (MetaCullable *cullable);
G_END_DECLS
#endif /* __META_CULLABLE_H__ */

View File

@@ -16,7 +16,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#include <meta/meta-plugin.h> #include <meta/meta-plugin.h>
@@ -190,7 +192,10 @@ meta_module_class_init (MetaModuleClass *klass)
static void static void
meta_module_init (MetaModule *self) meta_module_init (MetaModule *self)
{ {
self->priv = META_MODULE_GET_PRIVATE (self); MetaModulePrivate *priv;
self->priv = priv = META_MODULE_GET_PRIVATE (self);
} }
GType GType

View File

@@ -16,7 +16,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#ifndef META_MODULE_H_ #ifndef META_MODULE_H_

View File

@@ -16,7 +16,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#include "config.h" #include "config.h"
@@ -304,13 +306,41 @@ meta_plugin_manager_filter_keybinding (MetaPluginManager *plugin_mgr,
return FALSE; return FALSE;
} }
/*
* The public method that the compositor hooks into for desktop switching.
*
* Returns TRUE if the plugin handled the event type (i.e.,
* if the return value is FALSE, there will be no subsequent call to the
* manager completed() callback, and the compositor must ensure that any
* appropriate post-effect cleanup is carried out.
*/
gboolean gboolean
meta_plugin_manager_xevent_filter (MetaPluginManager *plugin_mgr, meta_plugin_manager_xevent_filter (MetaPluginManager *plugin_mgr,
XEvent *xev) XEvent *xev)
{ {
MetaPlugin *plugin = plugin_mgr->plugin; MetaPlugin *plugin = plugin_mgr->plugin;
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
return _meta_plugin_xevent_filter (plugin, xev); /* We need to make sure that clutter gets certain events, like
* ConfigureNotify on the stage window. If there is a plugin that
* provides an xevent_filter function, then it's the responsibility
* of that plugin to pass events to Clutter. Otherwise, we send the
* event directly to Clutter ourselves.
*/
if (klass->xevent_filter)
return klass->xevent_filter (plugin, xev);
/* When mutter is running as a wayland compositor, things like input
* events just come directly from clutter so it won't have disabled
* clutter's event retrieval and won't need to forward it events (if
* it did it would lead to recursion). Also when running as a
* wayland compositor we shouldn't be assuming that we're running
* with the clutter x11 backend.
*/
if (meta_is_wayland_compositor ())
return FALSE;
return clutter_x11_handle_event (xev) != CLUTTER_X11_FILTER_CONTINUE;
} }
void void
@@ -324,44 +354,3 @@ meta_plugin_manager_confirm_display_change (MetaPluginManager *plugin_mgr)
else else
return meta_plugin_complete_display_change (plugin, TRUE); return meta_plugin_complete_display_change (plugin, TRUE);
} }
gboolean
meta_plugin_manager_show_tile_preview (MetaPluginManager *plugin_mgr,
MetaWindow *window,
MetaRectangle *tile_rect,
int tile_monitor_number)
{
MetaPlugin *plugin = plugin_mgr->plugin;
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
MetaDisplay *display = meta_screen_get_display (plugin_mgr->screen);
if (display->display_opening)
return FALSE;
if (klass->show_tile_preview)
{
klass->show_tile_preview (plugin, window, tile_rect, tile_monitor_number);
return TRUE;
}
return FALSE;
}
gboolean
meta_plugin_manager_hide_tile_preview (MetaPluginManager *plugin_mgr)
{
MetaPlugin *plugin = plugin_mgr->plugin;
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
MetaDisplay *display = meta_screen_get_display (plugin_mgr->screen);
if (display->display_opening)
return FALSE;
if (klass->hide_tile_preview)
{
klass->hide_tile_preview (plugin);
return TRUE;
}
return FALSE;
}

View File

@@ -16,7 +16,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#ifndef META_PLUGIN_MANAGER_H_ #ifndef META_PLUGIN_MANAGER_H_
@@ -70,14 +72,7 @@ gboolean meta_plugin_manager_filter_keybinding (MetaPluginManager *mgr,
gboolean meta_plugin_manager_xevent_filter (MetaPluginManager *mgr, gboolean meta_plugin_manager_xevent_filter (MetaPluginManager *mgr,
XEvent *xev); XEvent *xev);
gboolean _meta_plugin_xevent_filter (MetaPlugin *plugin,
XEvent *xev);
void meta_plugin_manager_confirm_display_change (MetaPluginManager *mgr); void meta_plugin_manager_confirm_display_change (MetaPluginManager *mgr);
gboolean meta_plugin_manager_show_tile_preview (MetaPluginManager *mgr,
MetaWindow *window,
MetaRectangle *tile_rect,
int tile_monitor_number);
gboolean meta_plugin_manager_hide_tile_preview (MetaPluginManager *mgr);
#endif #endif

View File

@@ -16,7 +16,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
/** /**
@@ -136,7 +138,9 @@ meta_plugin_class_init (MetaPluginClass *klass)
static void static void
meta_plugin_init (MetaPlugin *self) meta_plugin_init (MetaPlugin *self)
{ {
self->priv = META_PLUGIN_GET_PRIVATE (self); MetaPluginPrivate *priv;
self->priv = priv = META_PLUGIN_GET_PRIVATE (self);
} }
gboolean gboolean
@@ -181,18 +185,6 @@ _meta_plugin_effect_started (MetaPlugin *plugin)
priv->running++; priv->running++;
} }
gboolean
_meta_plugin_xevent_filter (MetaPlugin *plugin,
XEvent *xev)
{
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
if (klass->xevent_filter && klass->xevent_filter (plugin, xev))
return TRUE;
else
return clutter_x11_handle_event (xev) != CLUTTER_X11_FILTER_CONTINUE;
}
void void
meta_plugin_switch_workspace_completed (MetaPlugin *plugin) meta_plugin_switch_workspace_completed (MetaPlugin *plugin)
{ {

View File

@@ -17,7 +17,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#ifndef __META_SHADOW_FACTORY_PRIVATE_H__ #ifndef __META_SHADOW_FACTORY_PRIVATE_H__

View File

@@ -13,7 +13,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
/** /**

View File

@@ -28,13 +28,17 @@
#define __META_SHAPED_TEXTURE_PRIVATE_H__ #define __META_SHAPED_TEXTURE_PRIVATE_H__
#include <meta/meta-shaped-texture.h> #include <meta/meta-shaped-texture.h>
#include "meta-wayland-private.h"
ClutterActor *meta_shaped_texture_new (void); ClutterActor *meta_shaped_texture_new_with_xwindow (Window xwindow);
void meta_shaped_texture_set_texture (MetaShapedTexture *stex, ClutterActor *meta_shaped_texture_new_with_wayland_surface (MetaWaylandSurface *surface);
CoglTexture *texture, void meta_shaped_texture_set_wayland_surface (MetaShapedTexture *stex,
gboolean stereo); MetaWaylandSurface *surface);
gboolean meta_shaped_texture_get_unobscured_bounds (MetaShapedTexture *stex, MetaWaylandSurface *meta_shaped_texture_get_wayland_surface (MetaShapedTexture *stex);
cairo_rectangle_int_t *unobscured_bounds);
gboolean meta_shaped_texture_is_obscured (MetaShapedTexture *self); void meta_shaped_texture_set_pixmap (MetaShapedTexture *stex,
Pixmap pixmap);
void meta_shaped_texture_attach_wayland_buffer (MetaShapedTexture *stex,
MetaWaylandBuffer *buffer);
#endif #endif

View File

@@ -16,7 +16,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
/** /**
@@ -28,17 +30,17 @@
#include <config.h> #include <config.h>
#include <meta/meta-shaped-texture.h> #include <meta/meta-shaped-texture.h>
#include "clutter-utils.h" #include <meta/util.h>
#include "meta-texture-tower.h" #include "meta-texture-tower.h"
#include "meta-shaped-texture-private.h" #include "meta-shaped-texture-private.h"
#include "meta-window-actor-private.h" #include "meta-wayland-private.h"
#include <cogl/cogl-wayland-server.h>
#include <clutter/clutter.h> #include <clutter/clutter.h>
#include <cogl/cogl.h> #include <cogl/cogl.h>
#include <cogl/cogl-texture-pixmap-x11.h> #include <cogl/cogl-texture-pixmap-x11.h>
#include <gdk/gdk.h> /* for gdk_rectangle_intersect() */ #include <gdk/gdk.h> /* for gdk_rectangle_intersect() */
#include "meta-cullable.h"
static void meta_shaped_texture_dispose (GObject *object); static void meta_shaped_texture_dispose (GObject *object);
@@ -58,10 +60,15 @@ static void meta_shaped_texture_get_preferred_height (ClutterActor *self,
static gboolean meta_shaped_texture_get_paint_volume (ClutterActor *self, ClutterPaintVolume *volume); static gboolean meta_shaped_texture_get_paint_volume (ClutterActor *self, ClutterPaintVolume *volume);
static void cullable_iface_init (MetaCullableInterface *iface); typedef enum _MetaShapedTextureType
{
META_SHAPED_TEXTURE_TYPE_X11_PIXMAP,
META_SHAPED_TEXTURE_TYPE_WAYLAND_SURFACE,
} MetaShapedTextureType;
G_DEFINE_TYPE_WITH_CODE (MetaShapedTexture, meta_shaped_texture, CLUTTER_TYPE_ACTOR,
G_IMPLEMENT_INTERFACE (META_TYPE_CULLABLE, cullable_iface_init)); G_DEFINE_TYPE (MetaShapedTexture, meta_shaped_texture,
CLUTTER_TYPE_ACTOR);
#define META_SHAPED_TEXTURE_GET_PRIVATE(obj) \ #define META_SHAPED_TEXTURE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), META_TYPE_SHAPED_TEXTURE, \ (G_TYPE_INSTANCE_GET_PRIVATE ((obj), META_TYPE_SHAPED_TEXTURE, \
@@ -70,24 +77,27 @@ G_DEFINE_TYPE_WITH_CODE (MetaShapedTexture, meta_shaped_texture, CLUTTER_TYPE_AC
struct _MetaShapedTexturePrivate struct _MetaShapedTexturePrivate
{ {
MetaTextureTower *paint_tower; MetaTextureTower *paint_tower;
MetaTextureTower *paint_tower_right;
MetaShapedTextureType type;
union {
struct {
Pixmap pixmap;
} x11;
struct {
MetaWaylandSurface *surface;
} wayland;
};
CoglTexture *texture; CoglTexture *texture;
CoglTexture *texture_right;
CoglTexture *mask_texture; CoglTexture *mask_texture;
cairo_region_t *input_shape_region;
/* The region containing only fully opaque pixels */
cairo_region_t *opaque_region;
/* MetaCullable regions, see that documentation for more details */
cairo_region_t *clip_region; cairo_region_t *clip_region;
cairo_region_t *unobscured_region; cairo_region_t *input_shape_region;
cairo_region_t *opaque_region;
guint tex_width, tex_height; guint tex_width, tex_height;
guint stereo : 1;
guint create_mipmaps : 1; guint create_mipmaps : 1;
}; };
@@ -116,55 +126,28 @@ meta_shaped_texture_init (MetaShapedTexture *self)
priv = self->priv = META_SHAPED_TEXTURE_GET_PRIVATE (self); priv = self->priv = META_SHAPED_TEXTURE_GET_PRIVATE (self);
priv->paint_tower = meta_texture_tower_new (); priv->paint_tower = meta_texture_tower_new ();
priv->paint_tower_right = NULL; /* demand create */
priv->type = META_SHAPED_TEXTURE_TYPE_X11_PIXMAP;
priv->texture = NULL; priv->texture = NULL;
priv->texture_right = NULL;
priv->mask_texture = NULL; priv->mask_texture = NULL;
priv->create_mipmaps = TRUE; priv->create_mipmaps = TRUE;
} }
static void
set_unobscured_region (MetaShapedTexture *self,
cairo_region_t *unobscured_region)
{
MetaShapedTexturePrivate *priv = self->priv;
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 };
priv->unobscured_region = cairo_region_copy (unobscured_region);
cairo_region_intersect_rectangle (priv->unobscured_region, &bounds);
}
}
static void
set_clip_region (MetaShapedTexture *self,
cairo_region_t *clip_region)
{
MetaShapedTexturePrivate *priv = self->priv;
g_clear_pointer (&priv->clip_region, (GDestroyNotify) cairo_region_destroy);
if (clip_region)
priv->clip_region = cairo_region_copy (clip_region);
}
static void static void
meta_shaped_texture_dispose (GObject *object) meta_shaped_texture_dispose (GObject *object)
{ {
MetaShapedTexture *self = (MetaShapedTexture *) object; MetaShapedTexture *self = (MetaShapedTexture *) object;
MetaShapedTexturePrivate *priv = self->priv; MetaShapedTexturePrivate *priv = self->priv;
g_clear_pointer (&priv->paint_tower, meta_texture_tower_free); if (priv->paint_tower)
g_clear_pointer (&priv->paint_tower_right, meta_texture_tower_free); meta_texture_tower_free (priv->paint_tower);
priv->paint_tower = NULL;
g_clear_pointer (&priv->texture, cogl_object_unref); g_clear_pointer (&priv->texture, cogl_object_unref);
g_clear_pointer (&priv->texture_right, cogl_object_unref);
g_clear_pointer (&priv->opaque_region, cairo_region_destroy);
meta_shaped_texture_set_mask_texture (self, NULL); meta_shaped_texture_set_mask_texture (self, NULL);
set_unobscured_region (self, NULL); meta_shaped_texture_set_clip_region (self, NULL);
set_clip_region (self, NULL);
G_OBJECT_CLASS (meta_shaped_texture_parent_class)->dispose (object); G_OBJECT_CLASS (meta_shaped_texture_parent_class)->dispose (object);
} }
@@ -235,22 +218,96 @@ paint_clipped_rectangle (CoglFramebuffer *fb,
cogl_framebuffer_draw_multitextured_rectangle (fb, pipeline, cogl_framebuffer_draw_multitextured_rectangle (fb, pipeline,
x1, y1, x2, y2, x1, y1, x2, y2,
&coords[0], 8); &coords[0], 8);
}
static void
set_cogl_texture (MetaShapedTexture *stex,
CoglTexture *cogl_tex)
{
MetaShapedTexturePrivate *priv;
guint width, height;
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
priv = stex->priv;
if (priv->texture)
cogl_object_unref (priv->texture);
priv->texture = cogl_object_ref (cogl_tex);
if (cogl_tex != NULL)
{
width = cogl_texture_get_width (COGL_TEXTURE (cogl_tex));
height = cogl_texture_get_height (COGL_TEXTURE (cogl_tex));
if (width != priv->tex_width ||
height != priv->tex_height)
{
priv->tex_width = width;
priv->tex_height = height;
clutter_actor_queue_relayout (CLUTTER_ACTOR (stex));
}
}
else
{
/* size changed to 0 going to an invalid handle */
priv->tex_width = 0;
priv->tex_height = 0;
clutter_actor_queue_relayout (CLUTTER_ACTOR (stex));
}
/* NB: We don't queue a redraw of the actor here because we don't
* know how much of the buffer has changed with respect to the
* previous buffer. We only queue a redraw in response to surface
* damage. */
} }
static void static void
paint_texture (MetaShapedTexture *stex, meta_shaped_texture_paint (ClutterActor *actor)
CoglTexture *paint_tex)
{ {
ClutterActor *actor = CLUTTER_ACTOR (stex); MetaShapedTexture *stex = (MetaShapedTexture *) actor;
MetaShapedTexturePrivate *priv = stex->priv; MetaShapedTexturePrivate *priv = stex->priv;
guint tex_width, tex_height; guint tex_width, tex_height;
guchar opacity; guchar opacity;
CoglContext *ctx; CoglContext *ctx;
CoglFramebuffer *fb; CoglFramebuffer *fb;
CoglPipeline *pipeline = NULL; CoglPipeline *pipeline = NULL;
CoglTexture *paint_tex;
ClutterActorBox alloc; ClutterActorBox alloc;
cairo_region_t *blended_region = NULL; cairo_region_t *blended_region = NULL;
CoglPipelineFilter filter;
if (priv->clip_region && cairo_region_is_empty (priv->clip_region))
return;
if (!CLUTTER_ACTOR_IS_REALIZED (CLUTTER_ACTOR (stex)))
clutter_actor_realize (CLUTTER_ACTOR (stex));
/* The GL EXT_texture_from_pixmap extension does allow for it to be
* used together with SGIS_generate_mipmap, however this is very
* rarely supported. Also, even when it is supported there
* are distinct performance implications from:
*
* - Updating mipmaps that we don't need
* - Having to reallocate pixmaps on the server into larger buffers
*
* So, we just unconditionally use our mipmap emulation code. If we
* wanted to use SGIS_generate_mipmap, we'd have to query COGL to
* see if it was supported (no API currently), and then if and only
* if that was the case, set the clutter texture quality to HIGH.
* Setting the texture quality to high without SGIS_generate_mipmap
* support for TFP textures will result in fallbacks to XGetImage.
*/
if (priv->create_mipmaps)
paint_tex = meta_texture_tower_get_paint_texture (priv->paint_tower);
else
paint_tex = COGL_TEXTURE (priv->texture);
if (paint_tex == NULL)
return;
tex_width = priv->tex_width; tex_width = priv->tex_width;
tex_height = priv->tex_height; tex_height = priv->tex_height;
@@ -258,17 +315,8 @@ paint_texture (MetaShapedTexture *stex,
if (tex_width == 0 || tex_height == 0) /* no contents yet */ if (tex_width == 0 || tex_height == 0) /* no contents yet */
return; return;
/* Use nearest-pixel interpolation if the texture is unscaled. This
* improves performance, especially with software rendering.
*/
filter = COGL_PIPELINE_FILTER_LINEAR;
if (!clutter_actor_is_in_clone_paint (actor) && meta_actor_is_untransformed (actor, NULL, NULL))
filter = COGL_PIPELINE_FILTER_NEAREST;
fb = cogl_get_draw_framebuffer ();
ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ()); ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
fb = cogl_get_draw_framebuffer ();
opacity = clutter_actor_get_paint_opacity (actor); opacity = clutter_actor_get_paint_opacity (actor);
clutter_actor_get_allocation_box (actor, &alloc); clutter_actor_get_allocation_box (actor, &alloc);
@@ -295,7 +343,6 @@ paint_texture (MetaShapedTexture *stex,
opaque_pipeline = get_unblended_pipeline (ctx); opaque_pipeline = get_unblended_pipeline (ctx);
cogl_pipeline_set_layer_texture (opaque_pipeline, 0, paint_tex); cogl_pipeline_set_layer_texture (opaque_pipeline, 0, paint_tex);
cogl_pipeline_set_layer_filters (opaque_pipeline, 0, filter, filter);
n_rects = cairo_region_num_rectangles (region); n_rects = cairo_region_num_rectangles (region);
for (i = 0; i < n_rects; i++) for (i = 0; i < n_rects; i++)
@@ -337,11 +384,9 @@ paint_texture (MetaShapedTexture *stex,
{ {
pipeline = get_masked_pipeline (ctx); pipeline = get_masked_pipeline (ctx);
cogl_pipeline_set_layer_texture (pipeline, 1, priv->mask_texture); cogl_pipeline_set_layer_texture (pipeline, 1, priv->mask_texture);
cogl_pipeline_set_layer_filters (pipeline, 1, filter, filter);
} }
cogl_pipeline_set_layer_texture (pipeline, 0, paint_tex); cogl_pipeline_set_layer_texture (pipeline, 0, paint_tex);
cogl_pipeline_set_layer_filters (pipeline, 0, filter, filter);
{ {
CoglColor color; CoglColor color;
@@ -391,74 +436,6 @@ paint_texture (MetaShapedTexture *stex,
cairo_region_destroy (blended_region); cairo_region_destroy (blended_region);
} }
static void
meta_shaped_texture_paint (ClutterActor *actor)
{
MetaShapedTexture *stex = (MetaShapedTexture *) actor;
MetaShapedTexturePrivate *priv = stex->priv;
CoglFramebuffer *fb;
gboolean stereo;
CoglTexture *paint_tex;
CoglTexture *paint_tex_right;
if (priv->clip_region && cairo_region_is_empty (priv->clip_region))
return;
if (!CLUTTER_ACTOR_IS_REALIZED (CLUTTER_ACTOR (stex)))
clutter_actor_realize (CLUTTER_ACTOR (stex));
/* The GL EXT_texture_from_pixmap extension does allow for it to be
* used together with SGIS_generate_mipmap, however this is very
* rarely supported. Also, even when it is supported there
* are distinct performance implications from:
*
* - Updating mipmaps that we don't need
* - Having to reallocate pixmaps on the server into larger buffers
*
* So, we just unconditionally use our mipmap emulation code. If we
* wanted to use SGIS_generate_mipmap, we'd have to query COGL to
* see if it was supported (no API currently), and then if and only
* if that was the case, set the clutter texture quality to HIGH.
* Setting the texture quality to high without SGIS_generate_mipmap
* support for TFP textures will result in fallbacks to XGetImage.
*/
if (priv->create_mipmaps)
paint_tex = meta_texture_tower_get_paint_texture (priv->paint_tower);
else
paint_tex = COGL_TEXTURE (priv->texture);
fb = cogl_get_draw_framebuffer ();
stereo = priv->stereo && cogl_framebuffer_get_is_stereo (fb);
if (stereo)
{
if (priv->create_mipmaps)
paint_tex_right = meta_texture_tower_get_paint_texture (priv->paint_tower_right);
else
paint_tex_right = COGL_TEXTURE (priv->texture_right);
}
else
paint_tex_right = NULL;
if (paint_tex != NULL)
{
if (stereo)
cogl_framebuffer_set_stereo_mode (fb, COGL_STEREO_LEFT);
else
cogl_framebuffer_set_stereo_mode (fb, COGL_STEREO_BOTH);
paint_texture (stex, paint_tex);
}
if (paint_tex_right != NULL)
{
cogl_framebuffer_set_stereo_mode (fb, COGL_STEREO_RIGHT);
paint_texture (stex, paint_tex_right);
cogl_framebuffer_set_stereo_mode (fb, COGL_STEREO_BOTH);
}
}
static void static void
meta_shaped_texture_pick (ClutterActor *actor, meta_shaped_texture_pick (ClutterActor *actor,
const ClutterColor *color) const ClutterColor *color)
@@ -563,37 +540,52 @@ meta_shaped_texture_get_preferred_height (ClutterActor *self,
} }
static gboolean static gboolean
meta_shaped_texture_get_paint_volume (ClutterActor *actor, meta_shaped_texture_get_paint_volume (ClutterActor *self,
ClutterPaintVolume *volume) ClutterPaintVolume *volume)
{ {
MetaShapedTexture *self = META_SHAPED_TEXTURE (actor); return clutter_paint_volume_set_from_allocation (volume, self);
cairo_rectangle_int_t unobscured_bounds; }
if (!clutter_paint_volume_set_from_allocation (volume, actor)) ClutterActor *
return FALSE; meta_shaped_texture_new_with_wayland_surface (MetaWaylandSurface *surface)
{
ClutterActor *actor = g_object_new (META_TYPE_SHAPED_TEXTURE, NULL);
MetaShapedTexturePrivate *priv = META_SHAPED_TEXTURE (actor)->priv;
if (meta_shaped_texture_get_unobscured_bounds (self, &unobscured_bounds)) /* XXX: it could probably be better to have a "type" construct-only
{ * property or create wayland/x11 subclasses */
ClutterVertex origin; priv->type = META_SHAPED_TEXTURE_TYPE_WAYLAND_SURFACE;
cairo_rectangle_int_t bounds;
/* I hate ClutterPaintVolume so much... */ meta_shaped_texture_set_wayland_surface (META_SHAPED_TEXTURE (actor),
clutter_paint_volume_get_origin (volume, &origin); surface);
bounds.x = origin.x;
bounds.y = origin.y;
bounds.width = clutter_paint_volume_get_width (volume);
bounds.height = clutter_paint_volume_get_height (volume);
gdk_rectangle_intersect (&bounds, &unobscured_bounds, &bounds); return actor;
}
origin.x = bounds.x; void
origin.y = bounds.y; meta_shaped_texture_set_wayland_surface (MetaShapedTexture *stex,
clutter_paint_volume_set_origin (volume, &origin); MetaWaylandSurface *surface)
clutter_paint_volume_set_width (volume, bounds.width); {
clutter_paint_volume_set_height (volume, bounds.height); MetaShapedTexturePrivate *priv = stex->priv;
}
return TRUE; priv->wayland.surface = surface;
if (surface && surface->buffer_ref.buffer)
meta_shaped_texture_attach_wayland_buffer (stex,
surface->buffer_ref.buffer);
}
MetaWaylandSurface *
meta_shaped_texture_get_wayland_surface (MetaShapedTexture *stex)
{
MetaShapedTexturePrivate *priv = stex->priv;
return priv->wayland.surface;
}
ClutterActor *
meta_shaped_texture_new_with_xwindow (Window xwindow)
{
return g_object_new (META_TYPE_SHAPED_TEXTURE, NULL);
} }
void void
@@ -614,12 +606,6 @@ meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *stex,
priv->create_mipmaps = create_mipmaps; priv->create_mipmaps = create_mipmaps;
base_texture = create_mipmaps ? priv->texture : NULL; base_texture = create_mipmaps ? priv->texture : NULL;
meta_texture_tower_set_base_texture (priv->paint_tower, base_texture); meta_texture_tower_set_base_texture (priv->paint_tower, base_texture);
if (priv->stereo)
{
base_texture = create_mipmaps ? priv->texture_right : NULL;
meta_texture_tower_set_base_texture (priv->paint_tower_right, base_texture);
}
} }
} }
@@ -644,48 +630,111 @@ meta_shaped_texture_set_mask_texture (MetaShapedTexture *stex,
clutter_actor_queue_redraw (CLUTTER_ACTOR (stex)); clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
} }
static cairo_region_t * static void
effective_unobscured_region (MetaShapedTexture *self) wayland_surface_update_area (MetaShapedTexture *stex,
int x,
int y,
int width,
int height)
{ {
MetaShapedTexturePrivate *priv = self->priv; MetaShapedTexturePrivate *priv;
ClutterActor *parent = clutter_actor_get_parent (CLUTTER_ACTOR (self)); MetaWaylandBuffer *buffer;
if (clutter_actor_has_mapped_clones (CLUTTER_ACTOR (self))) priv = stex->priv;
return NULL;
while (parent && !META_IS_WINDOW_ACTOR (parent)) g_return_if_fail (priv->type == META_SHAPED_TEXTURE_TYPE_WAYLAND_SURFACE);
parent = clutter_actor_get_parent (parent); g_return_if_fail (priv->texture != NULL);
if (parent && clutter_actor_has_mapped_clones (parent)) buffer = priv->wayland.surface->buffer_ref.buffer;
return NULL;
return priv->unobscured_region; if (buffer)
}
gboolean
meta_shaped_texture_get_unobscured_bounds (MetaShapedTexture *self,
cairo_rectangle_int_t *unobscured_bounds)
{
cairo_region_t *unobscured_region = effective_unobscured_region (self);
if (unobscured_region)
{ {
cairo_region_get_extents (unobscured_region, unobscured_bounds); struct wl_resource *resource = buffer->resource;
return TRUE; struct wl_shm_buffer *shm_buffer = wl_shm_buffer_get (resource);
if (shm_buffer)
{
CoglPixelFormat format;
switch (wl_shm_buffer_get_format (shm_buffer))
{
#if G_BYTE_ORDER == G_BIG_ENDIAN
case WL_SHM_FORMAT_ARGB8888:
format = COGL_PIXEL_FORMAT_ARGB_8888_PRE;
break;
case WL_SHM_FORMAT_XRGB8888:
format = COGL_PIXEL_FORMAT_ARGB_8888;
break;
#elif G_BYTE_ORDER == G_LITTLE_ENDIAN
case WL_SHM_FORMAT_ARGB8888:
format = COGL_PIXEL_FORMAT_BGRA_8888_PRE;
break;
case WL_SHM_FORMAT_XRGB8888:
format = COGL_PIXEL_FORMAT_BGRA_8888;
break;
#endif
default:
g_warn_if_reached ();
format = COGL_PIXEL_FORMAT_ARGB_8888;
}
cogl_texture_set_region (priv->texture,
x, y,
x, y,
width, height,
width, height,
format,
wl_shm_buffer_get_stride (shm_buffer),
wl_shm_buffer_get_data (shm_buffer));
}
} }
else
return FALSE;
} }
gboolean static void
meta_shaped_texture_is_obscured (MetaShapedTexture *self) get_clip (MetaShapedTexture *stex,
int x,
int y,
int width,
int height,
cairo_rectangle_int_t *clip)
{ {
cairo_region_t *unobscured_region = effective_unobscured_region (self); ClutterActor *self = CLUTTER_ACTOR (stex);
MetaShapedTexturePrivate *priv;
ClutterActorBox allocation;
float scale_x;
float scale_y;
if (unobscured_region) /* NB: clutter_actor_queue_redraw_with_clip expects a box in the actor's
return cairo_region_is_empty (unobscured_region); * coordinate space so we need to convert from surface coordinates to
else * actor coordinates...
return FALSE; */
/* Calling clutter_actor_get_allocation_box() is enormously expensive
* if the actor has an out-of-date allocation, since it triggers
* a full redraw. clutter_actor_queue_redraw_with_clip() would redraw
* the whole stage anyways in that case, so just go ahead and do
* it here.
*/
if (!clutter_actor_has_allocation (self))
{
clutter_actor_queue_redraw (self);
return;
}
priv = stex->priv;
if (priv->tex_width == 0 || priv->tex_height == 0)
return;
clutter_actor_get_allocation_box (self, &allocation);
scale_x = (allocation.x2 - allocation.x1) / priv->tex_width;
scale_y = (allocation.y2 - allocation.y1) / priv->tex_height;
clip->x = x * scale_x;
clip->y = y * scale_y;
clip->width = width * scale_x;
clip->height = height * scale_y;
} }
/** /**
@@ -695,9 +744,14 @@ meta_shaped_texture_is_obscured (MetaShapedTexture *self)
* @y: the y coordinate of the damaged area * @y: the y coordinate of the damaged area
* @width: the width of the damaged area * @width: the width of the damaged area
* @height: the height of the damaged area * @height: the height of the damaged area
* @unobscured_region: The unobscured region of the window or %NULL if
* there is no valid one (like when the actor is transformed or
* has a mapped clone)
* *
* Repairs the damaged area indicated by @x, @y, @width and @height * Repairs the damaged area indicated by @x, @y, @width and @height
* and potentially queues a redraw. * and queues a redraw for the intersection @visibible_region and
* the damage area. If @visibible_region is %NULL a redraw will always
* get queued.
* *
* Return value: Whether a redraw have been queued or not * Return value: Whether a redraw have been queued or not
*/ */
@@ -706,22 +760,32 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
int x, int x,
int y, int y,
int width, int width,
int height) int height,
cairo_region_t *unobscured_region)
{ {
MetaShapedTexturePrivate *priv; MetaShapedTexturePrivate *priv;
cairo_region_t *unobscured_region; cairo_rectangle_int_t clip;
const cairo_rectangle_int_t clip = { x, y, width, height };
priv = stex->priv; priv = stex->priv;
if (priv->texture == NULL) if (priv->texture == NULL)
return FALSE; return FALSE;
meta_texture_tower_update_area (priv->paint_tower, x, y, width, height); switch (priv->type)
if (priv->stereo) {
meta_texture_tower_update_area (priv->paint_tower_right, x, y, width, height); case META_SHAPED_TEXTURE_TYPE_X11_PIXMAP:
cogl_texture_pixmap_x11_update_area (COGL_TEXTURE_PIXMAP_X11 (priv->texture),
x, y, width, height);
break;
case META_SHAPED_TEXTURE_TYPE_WAYLAND_SURFACE:
wayland_surface_update_area (stex, x, y, width, height);
break;
}
meta_texture_tower_update_area (priv->paint_tower, x, y, width, height);
get_clip (stex, x, y, width, height, &clip);
unobscured_region = effective_unobscured_region (stex);
if (unobscured_region) if (unobscured_region)
{ {
cairo_region_t *intersection; cairo_region_t *intersection;
@@ -738,99 +802,81 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
cairo_region_get_extents (intersection, &damage_rect); cairo_region_get_extents (intersection, &damage_rect);
clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stex), &damage_rect); clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stex), &damage_rect);
cairo_region_destroy (intersection); cairo_region_destroy (intersection);
return TRUE; return TRUE;
} }
cairo_region_destroy (intersection); cairo_region_destroy (intersection);
return FALSE; return FALSE;
} }
else
{
clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stex), &clip); clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stex), &clip);
return TRUE; return TRUE;
}
} }
static void /**
set_cogl_texture (MetaShapedTexture *stex, * meta_shaped_texture_set_pixmap:
CoglTexture *cogl_tex, * @stex: The #MetaShapedTexture
gboolean stereo) * @pixmap: The pixmap you want the stex to assume
*/
void
meta_shaped_texture_set_pixmap (MetaShapedTexture *stex,
Pixmap pixmap)
{ {
MetaShapedTexturePrivate *priv; MetaShapedTexturePrivate *priv;
guint width, height;
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex)); g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
priv = stex->priv; priv = stex->priv;
if (priv->texture != NULL) if (priv->x11.pixmap == pixmap)
cogl_object_unref (priv->texture); return;
if (priv->texture_right != NULL)
cogl_object_unref (priv->texture_right);
priv->stereo = stereo; priv->x11.pixmap = pixmap;
priv->texture = cogl_tex; if (pixmap != None)
if (priv->stereo)
{ {
priv->texture_right = cogl_texture_pixmap_x11_new_right ((CoglTexturePixmapX11 *)cogl_tex); CoglContext *ctx =
if (priv->paint_tower_right == NULL) clutter_backend_get_cogl_context (clutter_get_default_backend ());
priv->paint_tower_right = meta_texture_tower_new (); CoglTexture *texture =
COGL_TEXTURE (cogl_texture_pixmap_x11_new (ctx, pixmap, FALSE, NULL));
set_cogl_texture (stex, texture);
} }
else else
{ set_cogl_texture (stex, NULL);
priv->texture_right = NULL;
g_clear_pointer (&priv->paint_tower_right, meta_texture_tower_free);
}
if (cogl_tex != NULL)
{
width = cogl_texture_get_width (COGL_TEXTURE (cogl_tex));
height = cogl_texture_get_height (COGL_TEXTURE (cogl_tex));
if (width != priv->tex_width ||
height != priv->tex_height)
{
priv->tex_width = width;
priv->tex_height = height;
clutter_actor_queue_relayout (CLUTTER_ACTOR (stex));
}
}
else
{
/* size changed to 0 going to an invalid texture */
priv->tex_width = 0;
priv->tex_height = 0;
clutter_actor_queue_relayout (CLUTTER_ACTOR (stex));
}
/* NB: We don't queue a redraw of the actor here because we don't
* know how much of the buffer has changed with respect to the
* previous buffer. We only queue a redraw in response to surface
* damage. */
if (priv->create_mipmaps) if (priv->create_mipmaps)
{ meta_texture_tower_set_base_texture (priv->paint_tower,
meta_texture_tower_set_base_texture (priv->paint_tower, cogl_tex); COGL_TEXTURE (priv->texture));
if (priv->stereo)
meta_texture_tower_set_base_texture (priv->paint_tower_right, priv->texture_right);
}
} }
/**
* meta_shaped_texture_set_texture:
* @stex: The #MetaShapedTexture
* @pixmap: The #CoglTexture to display
*/
void void
meta_shaped_texture_set_texture (MetaShapedTexture *stex, meta_shaped_texture_attach_wayland_buffer (MetaShapedTexture *stex,
CoglTexture *texture, MetaWaylandBuffer *buffer)
gboolean stereo)
{ {
MetaShapedTexturePrivate *priv;
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex)); g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
set_cogl_texture (stex, texture, stereo); priv = stex->priv;
/* TODO: we should change this api to be something like
* meta_shaped_texture_notify_buffer_attach() since we now maintain
* a reference to the MetaWaylandSurface where we can access the
* buffer without it being explicitly passed as an argument.
*/
g_return_if_fail (priv->wayland.surface->buffer_ref.buffer == buffer);
if (buffer)
set_cogl_texture (stex, buffer->texture);
else
set_cogl_texture (stex, NULL);
if (priv->create_mipmaps)
meta_texture_tower_set_base_texture (priv->paint_tower,
COGL_TEXTURE (priv->texture));
} }
/** /**
@@ -881,6 +927,39 @@ meta_shaped_texture_set_input_shape_region (MetaShapedTexture *stex,
clutter_actor_queue_redraw (CLUTTER_ACTOR (stex)); clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
} }
/**
* meta_shaped_texture_set_clip_region:
* @stex: a #MetaShapedTexture
* @clip_region: the region of the texture that is visible and
* should be painted.
*
* Provides a hint to the texture about what areas of the texture
* are not completely obscured and thus need to be painted. This
* is an optimization and is not supposed to have any effect on
* the output.
*
* Typically a parent container will set the clip region before
* painting its children, and then unset it afterwards.
*/
void
meta_shaped_texture_set_clip_region (MetaShapedTexture *stex,
cairo_region_t *clip_region)
{
MetaShapedTexturePrivate *priv;
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
priv = stex->priv;
if (priv->clip_region)
cairo_region_destroy (priv->clip_region);
if (clip_region)
priv->clip_region = cairo_region_copy (clip_region);
else
priv->clip_region = NULL;
}
/** /**
* meta_shaped_texture_set_opaque_region: * meta_shaped_texture_set_opaque_region:
* @stex: a #MetaShapedTexture * @stex: a #MetaShapedTexture
@@ -1008,46 +1087,3 @@ meta_shaped_texture_get_image (MetaShapedTexture *stex,
return surface; return surface;
} }
static void
meta_shaped_texture_cull_out (MetaCullable *cullable,
cairo_region_t *unobscured_region,
cairo_region_t *clip_region)
{
MetaShapedTexture *self = META_SHAPED_TEXTURE (cullable);
MetaShapedTexturePrivate *priv = self->priv;
set_unobscured_region (self, unobscured_region);
set_clip_region (self, clip_region);
if (clutter_actor_get_paint_opacity (CLUTTER_ACTOR (self)) == 0xff)
{
if (priv->opaque_region)
{
if (unobscured_region)
cairo_region_subtract (unobscured_region, priv->opaque_region);
if (clip_region)
cairo_region_subtract (clip_region, priv->opaque_region);
}
}
}
static void
meta_shaped_texture_reset_culling (MetaCullable *cullable)
{
MetaShapedTexture *self = META_SHAPED_TEXTURE (cullable);
set_clip_region (self, NULL);
}
static void
cullable_iface_init (MetaCullableInterface *iface)
{
iface->cull_out = meta_shaped_texture_cull_out;
iface->reset_culling = meta_shaped_texture_reset_culling;
}
ClutterActor *
meta_shaped_texture_new (void)
{
return g_object_new (META_TYPE_SHAPED_TEXTURE, NULL);
}

View File

@@ -18,7 +18,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#include <config.h> #include <config.h>
@@ -26,6 +28,41 @@
#include <clutter/clutter.h> #include <clutter/clutter.h>
#include "meta-texture-rectangle.h" #include "meta-texture-rectangle.h"
CoglTexture *
meta_texture_rectangle_new (unsigned int width,
unsigned int height,
CoglPixelFormat format,
CoglPixelFormat internal_format,
unsigned int rowstride,
const guint8 *data,
GError **error)
{
ClutterBackend *backend =
clutter_get_default_backend ();
CoglContext *context =
clutter_backend_get_cogl_context (backend);
CoglTextureRectangle *tex_rect;
tex_rect = cogl_texture_rectangle_new_with_size (context,
width, height,
internal_format,
error);
if (tex_rect == NULL)
return NULL;
if (data)
cogl_texture_set_region (COGL_TEXTURE (tex_rect),
0, 0, /* src_x/y */
0, 0, /* dst_x/y */
width, height, /* dst_width/height */
width, height, /* width/height */
format,
rowstride,
data);
return COGL_TEXTURE (tex_rect);
}
static void static void
texture_rectangle_check_cb (CoglTexture *sub_texture, texture_rectangle_check_cb (CoglTexture *sub_texture,
const float *sub_texture_coords, const float *sub_texture_coords,

View File

@@ -18,7 +18,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#ifndef __META_TEXTURE_RECTANGLE_H__ #ifndef __META_TEXTURE_RECTANGLE_H__
@@ -28,6 +30,15 @@
G_BEGIN_DECLS G_BEGIN_DECLS
CoglTexture *
meta_texture_rectangle_new (unsigned int width,
unsigned int height,
CoglPixelFormat format,
CoglPixelFormat internal_format,
unsigned int rowstride,
const guint8 *data,
GError **error);
gboolean gboolean
meta_texture_rectangle_check (CoglTexture *texture); meta_texture_rectangle_check (CoglTexture *texture);

View File

@@ -17,7 +17,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#include <math.h> #include <math.h>
@@ -60,7 +62,6 @@ struct _MetaTextureTower
CoglTexture *textures[MAX_TEXTURE_LEVELS]; CoglTexture *textures[MAX_TEXTURE_LEVELS];
CoglOffscreen *fbos[MAX_TEXTURE_LEVELS]; CoglOffscreen *fbos[MAX_TEXTURE_LEVELS];
Box invalid[MAX_TEXTURE_LEVELS]; Box invalid[MAX_TEXTURE_LEVELS];
CoglPipeline *pipeline_template;
}; };
/** /**
@@ -92,9 +93,6 @@ meta_texture_tower_free (MetaTextureTower *tower)
{ {
g_return_if_fail (tower != NULL); g_return_if_fail (tower != NULL);
if (tower->pipeline_template != NULL)
cogl_object_unref (tower->pipeline_template);
meta_texture_tower_set_base_texture (tower, NULL); meta_texture_tower_set_base_texture (tower, NULL);
g_slice_free (MetaTextureTower, tower); g_slice_free (MetaTextureTower, tower);
@@ -359,10 +357,18 @@ texture_tower_create_texture (MetaTextureTower *tower,
if ((!is_power_of_two (width) || !is_power_of_two (height)) && if ((!is_power_of_two (width) || !is_power_of_two (height)) &&
meta_texture_rectangle_check (tower->textures[level - 1])) meta_texture_rectangle_check (tower->textures[level - 1]))
{ {
ClutterBackend *backend = clutter_get_default_backend (); tower->textures[level] =
CoglContext *context = clutter_backend_get_cogl_context (backend); meta_texture_rectangle_new (width, height,
/* data format */
tower->textures[level] = cogl_texture_rectangle_new_with_size (context, width, height); TEXTURE_FORMAT,
/* internal cogl format */
TEXTURE_FORMAT,
/* rowstride */
width * 4,
/* data */
NULL,
/* error */
NULL);
} }
else else
{ {
@@ -377,7 +383,7 @@ texture_tower_create_texture (MetaTextureTower *tower,
tower->invalid[level].y2 = height; tower->invalid[level].y2 = height;
} }
static void static gboolean
texture_tower_revalidate_fbo (MetaTextureTower *tower, texture_tower_revalidate_fbo (MetaTextureTower *tower,
int level) int level)
{ {
@@ -388,50 +394,174 @@ texture_tower_revalidate_fbo (MetaTextureTower *tower,
int dest_texture_width = cogl_texture_get_width (dest_texture); int dest_texture_width = cogl_texture_get_width (dest_texture);
int dest_texture_height = cogl_texture_get_height (dest_texture); int dest_texture_height = cogl_texture_get_height (dest_texture);
Box *invalid = &tower->invalid[level]; Box *invalid = &tower->invalid[level];
CoglFramebuffer *fb; CoglMatrix modelview;
CoglError *catch_error = NULL;
CoglPipeline *pipeline;
if (tower->fbos[level] == NULL) if (tower->fbos[level] == NULL)
tower->fbos[level] = cogl_offscreen_new_with_texture (dest_texture); tower->fbos[level] = cogl_offscreen_new_to_texture (dest_texture);
fb = COGL_FRAMEBUFFER (tower->fbos[level]); if (tower->fbos[level] == NULL)
return FALSE;
if (!cogl_framebuffer_allocate (fb, &catch_error)) cogl_push_framebuffer (COGL_FRAMEBUFFER (tower->fbos[level]));
{
cogl_error_free (catch_error);
return;
}
cogl_framebuffer_orthographic (fb, 0, 0, dest_texture_width, dest_texture_height, -1., 1.); cogl_ortho (0, dest_texture_width, dest_texture_height, 0, -1., 1.);
if (!tower->pipeline_template) cogl_matrix_init_identity (&modelview);
{ cogl_set_modelview_matrix (&modelview);
CoglContext *ctx =
clutter_backend_get_cogl_context (clutter_get_default_backend ());
tower->pipeline_template = cogl_pipeline_new (ctx);
cogl_pipeline_set_blend (tower->pipeline_template, "RGBA = ADD (SRC_COLOR, 0)", NULL);
}
pipeline = cogl_pipeline_copy (tower->pipeline_template); cogl_set_source_texture (tower->textures[level - 1]);
cogl_pipeline_set_layer_texture (pipeline, 0, tower->textures[level - 1]); cogl_rectangle_with_texture_coords (invalid->x1, invalid->y1,
cogl_framebuffer_draw_textured_rectangle (fb, pipeline,
invalid->x1, invalid->y1,
invalid->x2, invalid->y2, invalid->x2, invalid->y2,
(2. * invalid->x1) / source_texture_width, (2. * invalid->x1) / source_texture_width,
(2. * invalid->y1) / source_texture_height, (2. * invalid->y1) / source_texture_height,
(2. * invalid->x2) / source_texture_width, (2. * invalid->x2) / source_texture_width,
(2. * invalid->y2) / source_texture_height); (2. * invalid->y2) / source_texture_height);
cogl_object_unref (pipeline); cogl_pop_framebuffer ();
return TRUE;
}
static void
fill_copy (guchar *buf,
const guchar *source,
int width)
{
memcpy (buf, source, width * 4);
}
static void
fill_scale_down (guchar *buf,
const guchar *source,
int width)
{
while (width > 1)
{
buf[0] = (source[0] + source[4]) / 2;
buf[1] = (source[1] + source[5]) / 2;
buf[2] = (source[2] + source[6]) / 2;
buf[3] = (source[3] + source[7]) / 2;
buf += 4;
source += 8;
width -= 2;
}
if (width > 0)
{
buf[0] = source[0] / 2;
buf[1] = source[1] / 2;
buf[2] = source[2] / 2;
buf[3] = source[3] / 2;
}
}
static void
texture_tower_revalidate_client (MetaTextureTower *tower,
int level)
{
CoglTexture *source_texture = tower->textures[level - 1];
int source_texture_width = cogl_texture_get_width (source_texture);
int source_texture_height = cogl_texture_get_height (source_texture);
guint source_rowstride;
guchar *source_data;
CoglTexture *dest_texture = tower->textures[level];
int dest_texture_width = cogl_texture_get_width (dest_texture);
int dest_texture_height = cogl_texture_get_height (dest_texture);
int dest_x = tower->invalid[level].x1;
int dest_y = tower->invalid[level].y1;
int dest_width = tower->invalid[level].x2 - tower->invalid[level].x1;
int dest_height = tower->invalid[level].y2 - tower->invalid[level].y1;
guchar *dest_data;
guchar *source_tmp1 = NULL, *source_tmp2 = NULL;
int i, j;
source_rowstride = source_texture_width * 4;
source_data = g_malloc (source_texture_height * source_rowstride);
cogl_texture_get_data (source_texture, TEXTURE_FORMAT, source_rowstride,
source_data);
dest_data = g_malloc (dest_height * dest_width * 4);
if (dest_texture_height < source_texture_height)
{
source_tmp1 = g_malloc (dest_width * 4);
source_tmp2 = g_malloc (dest_width * 4);
}
for (i = 0; i < dest_height; i++)
{
guchar *dest_row = dest_data + i * dest_width * 4;
if (dest_texture_height < source_texture_height)
{
guchar *source1, *source2;
guchar *dest;
if (dest_texture_width < source_texture_width)
{
fill_scale_down (source_tmp1,
source_data + ((i + dest_y) * 2) * source_rowstride + dest_x * 2 * 4,
dest_width * 2);
fill_scale_down (source_tmp2,
source_data + ((i + dest_y) * 2 + 1) * source_rowstride + dest_x * 2 * 4,
dest_width * 2);
}
else
{
fill_copy (source_tmp1,
source_data + ((i + dest_y) * 2) * source_rowstride + dest_x * 4,
dest_width);
fill_copy (source_tmp2,
source_data + ((i + dest_y) * 2 + 1) * source_rowstride + dest_x * 4,
dest_width);
}
source1 = source_tmp1;
source2 = source_tmp2;
dest = dest_row;
for (j = 0; j < dest_width * 4; j++)
*(dest++) = (*(source1++) + *(source2++)) / 2;
}
else
{
if (dest_texture_width < source_texture_width)
fill_scale_down (dest_row,
source_data + (i + dest_y) * source_rowstride + dest_x * 2 * 4,
dest_width * 2);
else
fill_copy (dest_row,
source_data + (i + dest_y) * source_rowstride,
dest_width);
}
}
cogl_texture_set_region (dest_texture,
0, 0,
dest_x, dest_y,
dest_width, dest_height,
dest_width, dest_height,
TEXTURE_FORMAT,
4 * dest_width,
dest_data);
if (dest_texture_height < source_texture_height)
{
g_free (source_tmp1);
g_free (source_tmp2);
}
g_free (source_data);
g_free (dest_data);
} }
static void static void
texture_tower_revalidate (MetaTextureTower *tower, texture_tower_revalidate (MetaTextureTower *tower,
int level) int level)
{ {
texture_tower_revalidate_fbo (tower, level); if (!texture_tower_revalidate_fbo (tower, level))
texture_tower_revalidate_client (tower, level);
} }
/** /**

View File

@@ -17,7 +17,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#ifndef __META_TEXTURE_TOWER_H__ #ifndef __META_TEXTURE_TOWER_H__

View File

@@ -5,6 +5,9 @@
#include <config.h> #include <config.h>
#include <wayland-server.h>
#include <meta-wayland-private.h>
#include <X11/extensions/Xdamage.h> #include <X11/extensions/Xdamage.h>
#include <meta/compositor-mutter.h> #include <meta/compositor-mutter.h>
@@ -24,9 +27,19 @@ void meta_window_actor_unmaximize (MetaWindowActor *self,
MetaRectangle *old_rect, MetaRectangle *old_rect,
MetaRectangle *new_rect); MetaRectangle *new_rect);
void meta_window_actor_process_damage (MetaWindowActor *self, void meta_window_actor_process_x11_damage (MetaWindowActor *self,
XDamageNotifyEvent *event); XDamageNotifyEvent *event);
void meta_window_actor_process_wayland_damage (MetaWindowActor *self,
int x,
int y,
int width,
int height);
void meta_window_actor_set_wayland_surface (MetaWindowActor *self,
MetaWaylandSurface *surface);
void meta_window_actor_attach_wayland_buffer (MetaWindowActor *self,
MetaWaylandBuffer *buffer);
void meta_window_actor_pre_paint (MetaWindowActor *self); void meta_window_actor_pre_paint (MetaWindowActor *self);
void meta_window_actor_post_paint (MetaWindowActor *self); void meta_window_actor_post_paint (MetaWindowActor *self);
void meta_window_actor_frame_complete (MetaWindowActor *self, void meta_window_actor_frame_complete (MetaWindowActor *self,
@@ -35,12 +48,12 @@ void meta_window_actor_frame_complete (MetaWindowActor *self,
void meta_window_actor_invalidate_shadow (MetaWindowActor *self); void meta_window_actor_invalidate_shadow (MetaWindowActor *self);
void meta_window_actor_get_shape_bounds (MetaWindowActor *self, void meta_window_actor_set_redirected (MetaWindowActor *self, gboolean state);
cairo_rectangle_int_t *bounds);
gboolean meta_window_actor_should_unredirect (MetaWindowActor *self); gboolean meta_window_actor_should_unredirect (MetaWindowActor *self);
void meta_window_actor_set_unredirected (MetaWindowActor *self,
gboolean unredirected); void meta_window_actor_get_shape_bounds (MetaWindowActor *self,
cairo_rectangle_int_t *bounds);
gboolean meta_window_actor_effect_in_progress (MetaWindowActor *self); gboolean meta_window_actor_effect_in_progress (MetaWindowActor *self);
void meta_window_actor_sync_actor_geometry (MetaWindowActor *self, void meta_window_actor_sync_actor_geometry (MetaWindowActor *self,
@@ -55,14 +68,18 @@ void meta_window_actor_set_updates_frozen (MetaWindowActor *self,
void meta_window_actor_queue_frame_drawn (MetaWindowActor *self, void meta_window_actor_queue_frame_drawn (MetaWindowActor *self,
gboolean no_delay_frame); gboolean no_delay_frame);
cairo_region_t *meta_window_actor_get_obscured_region (MetaWindowActor *self);
void meta_window_actor_set_clip_region (MetaWindowActor *self,
cairo_region_t *clip_region);
void meta_window_actor_set_clip_region_beneath (MetaWindowActor *self,
cairo_region_t *beneath_region);
void meta_window_actor_reset_clip_regions (MetaWindowActor *self);
void meta_window_actor_set_unobscured_region (MetaWindowActor *self,
cairo_region_t *unobscured_region);
void meta_window_actor_effect_completed (MetaWindowActor *actor, void meta_window_actor_effect_completed (MetaWindowActor *actor,
gulong event); gulong event);
void meta_window_actor_stereo_notify (MetaWindowActor *actor,
gboolean stereo_tree);
gboolean meta_window_actor_is_stereo (MetaWindowActor *actor);
void meta_window_actor_detach (MetaWindowActor *self);
#endif /* META_WINDOW_ACTOR_PRIVATE_H */ #endif /* META_WINDOW_ACTOR_PRIVATE_H */

File diff suppressed because it is too large Load Diff

View File

@@ -11,8 +11,9 @@
#include "compositor-private.h" #include "compositor-private.h"
#include "meta-window-actor-private.h" #include "meta-window-actor-private.h"
#include "meta-window-group.h" #include "meta-window-group.h"
#include "meta-background-actor-private.h"
#include "meta-background-group-private.h"
#include "window-private.h" #include "window-private.h"
#include "meta-cullable.h"
struct _MetaWindowGroupClass struct _MetaWindowGroupClass
{ {
@@ -26,10 +27,7 @@ struct _MetaWindowGroup
MetaScreen *screen; MetaScreen *screen;
}; };
static void cullable_iface_init (MetaCullableInterface *iface); G_DEFINE_TYPE (MetaWindowGroup, meta_window_group, CLUTTER_TYPE_ACTOR);
G_DEFINE_TYPE_WITH_CODE (MetaWindowGroup, meta_window_group, CLUTTER_TYPE_ACTOR,
G_IMPLEMENT_INTERFACE (META_TYPE_CULLABLE, cullable_iface_init));
/* Help macros to scale from OpenGL <-1,1> coordinates system to /* Help macros to scale from OpenGL <-1,1> coordinates system to
* window coordinates ranging [0,window-size]. Borrowed from clutter-utils.c * window coordinates ranging [0,window-size]. Borrowed from clutter-utils.c
@@ -89,40 +87,33 @@ painting_untransformed (MetaWindowGroup *window_group,
return meta_actor_vertices_are_untransformed (vertices, width, height, x_origin, y_origin); return meta_actor_vertices_are_untransformed (vertices, width, height, x_origin, y_origin);
} }
static void
meta_window_group_cull_out (MetaCullable *cullable,
cairo_region_t *unobscured_region,
cairo_region_t *clip_region)
{
meta_cullable_cull_out_children (cullable, unobscured_region, clip_region);
}
static void
meta_window_group_reset_culling (MetaCullable *cullable)
{
meta_cullable_reset_culling_children (cullable);
}
static void
cullable_iface_init (MetaCullableInterface *iface)
{
iface->cull_out = meta_window_group_cull_out;
iface->reset_culling = meta_window_group_reset_culling;
}
static void static void
meta_window_group_paint (ClutterActor *actor) meta_window_group_paint (ClutterActor *actor)
{ {
cairo_region_t *clip_region; cairo_region_t *clip_region;
cairo_region_t *unobscured_region; cairo_region_t *unobscured_region;
ClutterActorIter iter;
ClutterActor *child;
cairo_rectangle_int_t visible_rect, clip_rect; cairo_rectangle_int_t visible_rect, clip_rect;
int paint_x_offset, paint_y_offset;
int paint_x_origin, paint_y_origin; int paint_x_origin, paint_y_origin;
int actor_x_origin, actor_y_origin; int actor_x_origin, actor_y_origin;
int paint_x_offset, paint_y_offset;
MetaWindowGroup *window_group = META_WINDOW_GROUP (actor); MetaWindowGroup *window_group = META_WINDOW_GROUP (actor);
ClutterActor *stage = clutter_actor_get_stage (actor);
MetaCompScreen *info = meta_screen_get_compositor_data (window_group->screen); MetaCompScreen *info = meta_screen_get_compositor_data (window_group->screen);
ClutterActor *stage = clutter_actor_get_stage (actor);
/* Start off by treating all windows as completely unobscured, so damage anywhere
* in a window queues redraws, but confine it more below. */
clutter_actor_iter_init (&iter, actor);
while (clutter_actor_iter_next (&iter, &child))
{
if (META_IS_WINDOW_ACTOR (child))
{
MetaWindowActor *window_actor = META_WINDOW_ACTOR (child);
meta_window_actor_set_unobscured_region (window_actor, NULL);
}
}
/* Normally we expect an actor to be drawn at it's position on the screen. /* Normally we expect an actor to be drawn at it's position on the screen.
* However, if we're inside the paint of a ClutterClone, that won't be the * However, if we're inside the paint of a ClutterClone, that won't be the
@@ -144,6 +135,9 @@ meta_window_group_paint (ClutterActor *actor)
return; return;
} }
paint_x_offset = paint_x_origin - actor_x_origin;
paint_y_offset = paint_y_origin - actor_y_origin;
visible_rect.x = visible_rect.y = 0; visible_rect.x = visible_rect.y = 0;
visible_rect.width = clutter_actor_get_width (CLUTTER_ACTOR (stage)); visible_rect.width = clutter_actor_get_width (CLUTTER_ACTOR (stage));
visible_rect.height = clutter_actor_get_height (CLUTTER_ACTOR (stage)); visible_rect.height = clutter_actor_get_height (CLUTTER_ACTOR (stage));
@@ -161,53 +155,138 @@ meta_window_group_paint (ClutterActor *actor)
clip_region = cairo_region_create_rectangle (&clip_rect); clip_region = cairo_region_create_rectangle (&clip_rect);
paint_x_offset = paint_x_origin - actor_x_origin; if (!meta_is_wayland_compositor ())
paint_y_offset = paint_y_origin - actor_y_origin; {
cairo_region_translate (clip_region, -paint_x_offset, -paint_y_offset); info = meta_screen_get_compositor_data (window_group->screen);
if (info->unredirected_window != NULL) if (info->unredirected_window != NULL)
{ {
cairo_rectangle_int_t unredirected_rect; cairo_rectangle_int_t unredirected_rect;
MetaWindow *window = meta_window_actor_get_meta_window (info->unredirected_window);
meta_window_get_frame_rect (info->unredirected_window, (MetaRectangle *)&unredirected_rect); meta_window_get_outer_rect (window, (MetaRectangle *)&unredirected_rect);
cairo_region_subtract_rectangle (unobscured_region, &unredirected_rect); cairo_region_subtract_rectangle (unobscured_region, &unredirected_rect);
cairo_region_subtract_rectangle (clip_region, &unredirected_rect); cairo_region_subtract_rectangle (clip_region, &unredirected_rect);
} }
}
meta_cullable_cull_out (META_CULLABLE (window_group), unobscured_region, clip_region); /* We walk the list from top to bottom (opposite of painting order),
* and subtract the opaque area of each window out of the visible
* region that we pass to the windows below.
*/
clutter_actor_iter_init (&iter, actor);
while (clutter_actor_iter_prev (&iter, &child))
{
if (!CLUTTER_ACTOR_IS_VISIBLE (child))
continue;
if (!meta_is_wayland_compositor () &&
info->unredirected_window != NULL &&
child == CLUTTER_ACTOR (info->unredirected_window))
continue;
/* If an actor has effects applied, then that can change the area
* it paints and the opacity, so we no longer can figure out what
* portion of the actor is obscured and what portion of the screen
* it obscures, so we skip the actor.
*
* This has a secondary beneficial effect: if a ClutterOffscreenEffect
* is applied to an actor, then our clipped redraws interfere with the
* caching of the FBO - even if we only need to draw a small portion
* of the window right now, ClutterOffscreenEffect may use other portions
* of the FBO later. So, skipping actors with effects applied also
* prevents these bugs.
*
* Theoretically, we should check clutter_actor_get_offscreen_redirect()
* as well for the same reason, but omitted for simplicity in the
* hopes that no-one will do that.
*/
if (clutter_actor_has_effects (child))
continue;
if (META_IS_WINDOW_ACTOR (child))
{
MetaWindowActor *window_actor = META_WINDOW_ACTOR (child);
int x, y;
if (!meta_actor_is_untransformed (CLUTTER_ACTOR (window_actor), &x, &y))
continue;
x += paint_x_offset;
y += paint_y_offset;
/* Temporarily move to the coordinate system of the actor */
cairo_region_translate (unobscured_region, - x, - y);
cairo_region_translate (clip_region, - x, - y);
meta_window_actor_set_unobscured_region (window_actor, unobscured_region);
meta_window_actor_set_clip_region (window_actor, clip_region);
if (clutter_actor_get_paint_opacity (CLUTTER_ACTOR (window_actor)) == 0xff)
{
cairo_region_t *obscured_region = meta_window_actor_get_obscured_region (window_actor);
if (obscured_region)
{
cairo_region_subtract (unobscured_region, obscured_region);
cairo_region_subtract (clip_region, obscured_region);
}
}
meta_window_actor_set_clip_region_beneath (window_actor, clip_region);
cairo_region_translate (unobscured_region, x, y);
cairo_region_translate (clip_region, x, y);
}
else if (META_IS_BACKGROUND_ACTOR (child) ||
META_IS_BACKGROUND_GROUP (child))
{
int x, y;
if (!meta_actor_is_untransformed (child, &x, &y))
continue;
x += paint_x_offset;
y += paint_y_offset;
cairo_region_translate (clip_region, - x, - y);
if (META_IS_BACKGROUND_GROUP (child))
meta_background_group_set_clip_region (META_BACKGROUND_GROUP (child), clip_region);
else
meta_background_actor_set_clip_region (META_BACKGROUND_ACTOR (child), clip_region);
cairo_region_translate (clip_region, x, y);
}
}
cairo_region_destroy (unobscured_region); cairo_region_destroy (unobscured_region);
cairo_region_destroy (clip_region); cairo_region_destroy (clip_region);
CLUTTER_ACTOR_CLASS (meta_window_group_parent_class)->paint (actor); CLUTTER_ACTOR_CLASS (meta_window_group_parent_class)->paint (actor);
meta_cullable_reset_culling (META_CULLABLE (window_group)); /* Now that we are done painting, unset the visible regions (they will
} * mess up painting clones of our actors)
*/
/* Adapted from clutter_actor_update_default_paint_volume() */ clutter_actor_iter_init (&iter, actor);
static gboolean
meta_window_group_get_paint_volume (ClutterActor *self,
ClutterPaintVolume *volume)
{
ClutterActorIter iter;
ClutterActor *child;
clutter_actor_iter_init (&iter, self);
while (clutter_actor_iter_next (&iter, &child)) while (clutter_actor_iter_next (&iter, &child))
{ {
const ClutterPaintVolume *child_volume; if (META_IS_WINDOW_ACTOR (child))
{
if (!CLUTTER_ACTOR_IS_MAPPED (child)) MetaWindowActor *window_actor = META_WINDOW_ACTOR (child);
continue; meta_window_actor_reset_clip_regions (window_actor);
child_volume = clutter_actor_get_transformed_paint_volume (child, self);
if (child_volume == NULL)
return FALSE;
clutter_paint_volume_union (volume, child_volume);
} }
else if (META_IS_BACKGROUND_ACTOR (child))
{
MetaBackgroundActor *background_actor = META_BACKGROUND_ACTOR (child);
meta_background_actor_set_clip_region (background_actor, NULL);
}
}
}
return TRUE; static gboolean
meta_window_group_get_paint_volume (ClutterActor *actor,
ClutterPaintVolume *volume)
{
return clutter_paint_volume_set_from_allocation (volume, actor);
} }
static void static void

View File

@@ -11,9 +11,29 @@
* MetaWindowGroup: * MetaWindowGroup:
* *
* This class is a subclass of ClutterActor with special handling for * This class is a subclass of ClutterActor with special handling for
* #MetaCullable when painting children. It uses code similar to * MetaWindowActor/MetaBackgroundActor/MetaBackgroundGroup when painting
* meta_cullable_cull_out_children(), but also has additional special * children.
* cases for the undirected window, and similar. *
* When we are painting a stack of 5-10 maximized windows, the
* standard bottom-to-top method of drawing every actor results in a
* tremendous amount of overdraw and can easily max out the available
* memory bandwidth on a low-end graphics chipset. It's even worse if
* window textures are being accessed over the AGP bus.
*
* The basic technique applied here is to do a pre-pass before painting
* where we walk window from top to bottom and compute the visible area
* at each step by subtracting out the windows above it. The visible
* area is passed to MetaWindowActor which uses it to clip the portion of
* the window which drawn and avoid redrawing the shadow if it is completely
* obscured.
*
* A caveat is that this is ineffective if applications are using ARGB
* visuals, since we have no way of knowing whether a window obscures
* the windows behind it or not. Alternate approaches using the depth
* or stencil buffer rather than client side regions might be able to
* handle alpha windows, but the combination of glAlphaFunc and stenciling
* tends not to be efficient except on newer cards. (And on newer cards
* we have lots of memory and bandwidth.)
*/ */
#define META_TYPE_WINDOW_GROUP (meta_window_group_get_type ()) #define META_TYPE_WINDOW_GROUP (meta_window_group_get_type ())

View File

@@ -17,7 +17,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#include <string.h> #include <string.h>

View File

@@ -17,7 +17,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#ifndef __META_WINDOW_SHAPE_H__ #ifndef __META_WINDOW_SHAPE_H__

View File

@@ -16,17 +16,20 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#include <config.h>
#include <meta/meta-plugin.h> #include <meta/meta-plugin.h>
#include <meta/window.h> #include <meta/window.h>
#include <meta/util.h>
#include <meta/meta-background-group.h> #include <meta/meta-background-group.h>
#include <meta/meta-background-actor.h> #include <meta/meta-background-actor.h>
#include <meta/util.h>
#include <glib/gi18n-lib.h> #include <libintl.h>
#define _(x) dgettext (GETTEXT_PACKAGE, x)
#define N_(x) x
#include <clutter/clutter.h> #include <clutter/clutter.h>
#include <gmodule.h> #include <gmodule.h>
@@ -39,7 +42,6 @@
#define SWITCH_TIMEOUT 500 #define SWITCH_TIMEOUT 500
#define ACTOR_DATA_KEY "MCCP-Default-actor-data" #define ACTOR_DATA_KEY "MCCP-Default-actor-data"
#define SCREEN_TILE_PREVIEW_DATA_KEY "MCCP-Default-screen-tile-preview-data"
#define META_TYPE_DEFAULT_PLUGIN (meta_default_plugin_get_type ()) #define META_TYPE_DEFAULT_PLUGIN (meta_default_plugin_get_type ())
#define META_DEFAULT_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_DEFAULT_PLUGIN, MetaDefaultPlugin)) #define META_DEFAULT_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_DEFAULT_PLUGIN, MetaDefaultPlugin))
@@ -68,7 +70,6 @@ struct _MetaDefaultPluginClass
}; };
static GQuark actor_data_quark = 0; static GQuark actor_data_quark = 0;
static GQuark screen_tile_preview_data_quark = 0;
static void start (MetaPlugin *plugin); static void start (MetaPlugin *plugin);
static void minimize (MetaPlugin *plugin, static void minimize (MetaPlugin *plugin,
@@ -99,12 +100,6 @@ static void kill_window_effects (MetaPlugin *plugin,
MetaWindowActor *actor); MetaWindowActor *actor);
static void kill_switch_workspace (MetaPlugin *plugin); static void kill_switch_workspace (MetaPlugin *plugin);
static void show_tile_preview (MetaPlugin *plugin,
MetaWindow *window,
MetaRectangle *tile_rect,
int tile_monitor_number);
static void hide_tile_preview (MetaPlugin *plugin);
static void confirm_display_change (MetaPlugin *plugin); static void confirm_display_change (MetaPlugin *plugin);
static const MetaPluginInfo * plugin_info (MetaPlugin *plugin); static const MetaPluginInfo * plugin_info (MetaPlugin *plugin);
@@ -151,15 +146,6 @@ typedef struct
} EffectCompleteData; } EffectCompleteData;
typedef struct _ScreenTilePreview
{
ClutterActor *actor;
GdkRGBA *preview_color;
MetaRectangle tile_rect;
} ScreenTilePreview;
static void static void
meta_default_plugin_dispose (GObject *object) meta_default_plugin_dispose (GObject *object)
{ {
@@ -220,8 +206,6 @@ meta_default_plugin_class_init (MetaDefaultPluginClass *klass)
plugin_class->unmaximize = unmaximize; plugin_class->unmaximize = unmaximize;
plugin_class->destroy = destroy; plugin_class->destroy = destroy;
plugin_class->switch_workspace = switch_workspace; plugin_class->switch_workspace = switch_workspace;
plugin_class->show_tile_preview = show_tile_preview;
plugin_class->hide_tile_preview = hide_tile_preview;
plugin_class->plugin_info = plugin_info; plugin_class->plugin_info = plugin_info;
plugin_class->kill_window_effects = kill_window_effects; plugin_class->kill_window_effects = kill_window_effects;
plugin_class->kill_switch_workspace = kill_switch_workspace; plugin_class->kill_switch_workspace = kill_switch_workspace;
@@ -308,13 +292,26 @@ on_switch_workspace_effect_complete (ClutterTimeline *timeline, gpointer data)
meta_plugin_switch_workspace_completed (plugin); meta_plugin_switch_workspace_completed (plugin);
} }
static gboolean
show_stage (MetaPlugin *plugin)
{
MetaScreen *screen;
ClutterActor *stage;
screen = meta_plugin_get_screen (plugin);
stage = meta_get_stage_for_screen (screen);
clutter_actor_show (stage);
return FALSE;
}
static void static void
on_monitors_changed (MetaScreen *screen, on_monitors_changed (MetaScreen *screen,
MetaPlugin *plugin) MetaPlugin *plugin)
{ {
MetaDefaultPlugin *self = META_DEFAULT_PLUGIN (plugin); MetaDefaultPlugin *self = META_DEFAULT_PLUGIN (plugin);
int i, n; int i, n;
GRand *rand = g_rand_new_with_seed (12345);
clutter_actor_destroy_all_children (self->priv->background_group); clutter_actor_destroy_all_children (self->priv->background_group);
@@ -337,16 +334,14 @@ on_monitors_changed (MetaScreen *screen,
reproducible. reproducible.
*/ */
clutter_color_init (&color, clutter_color_init (&color,
g_rand_int_range (rand, 0, 255), g_random_int () % 255,
g_rand_int_range (rand, 0, 255), g_random_int () % 255,
g_rand_int_range (rand, 0, 255), g_random_int () % 255,
255); 255);
clutter_actor_set_background_color (background, &color); clutter_actor_set_background_color (background, &color);
clutter_actor_add_child (self->priv->background_group, background); clutter_actor_add_child (self->priv->background_group, background);
} }
g_rand_free (rand);
} }
static void static void
@@ -363,7 +358,10 @@ start (MetaPlugin *plugin)
G_CALLBACK (on_monitors_changed), plugin); G_CALLBACK (on_monitors_changed), plugin);
on_monitors_changed (screen, plugin); on_monitors_changed (screen, plugin);
clutter_actor_show (meta_get_stage_for_screen (screen)); meta_later_add (META_LATER_BEFORE_REDRAW,
(GSourceFunc) show_stage,
plugin,
NULL);
} }
static void static void
@@ -412,11 +410,9 @@ switch_workspace (MetaPlugin *plugin,
MetaWindowActor *window_actor = l->data; MetaWindowActor *window_actor = l->data;
ActorPrivate *apriv = get_actor_private (window_actor); ActorPrivate *apriv = get_actor_private (window_actor);
ClutterActor *actor = CLUTTER_ACTOR (window_actor); ClutterActor *actor = CLUTTER_ACTOR (window_actor);
MetaWorkspace *workspace;
gint win_workspace; gint win_workspace;
workspace = meta_window_get_workspace (meta_window_actor_get_meta_window (window_actor)); win_workspace = meta_window_actor_get_workspace (window_actor);
win_workspace = meta_workspace_index (workspace);
if (win_workspace == to || win_workspace == from) if (win_workspace == to || win_workspace == from)
{ {
@@ -709,15 +705,15 @@ map (MetaPlugin *plugin, MetaWindowActor *window_actor)
EffectCompleteData *data = g_new0 (EffectCompleteData, 1); EffectCompleteData *data = g_new0 (EffectCompleteData, 1);
ActorPrivate *apriv = get_actor_private (window_actor); ActorPrivate *apriv = get_actor_private (window_actor);
clutter_actor_set_pivot_point (actor, 0.5, 0.5); clutter_actor_move_anchor_point_from_gravity (actor,
clutter_actor_set_opacity (actor, 0); CLUTTER_GRAVITY_CENTER);
clutter_actor_set_scale (actor, 0.5, 0.5);
clutter_actor_set_scale (actor, 0.0, 0.0);
clutter_actor_show (actor); clutter_actor_show (actor);
animation = clutter_actor_animate (actor, animation = clutter_actor_animate (actor,
CLUTTER_EASE_OUT_QUAD, CLUTTER_EASE_IN_SINE,
MAP_TIMEOUT, MAP_TIMEOUT,
"opacity", 255,
"scale-x", 1.0, "scale-x", 1.0,
"scale-y", 1.0, "scale-y", 1.0,
NULL); NULL);
@@ -789,82 +785,6 @@ destroy (MetaPlugin *plugin, MetaWindowActor *window_actor)
meta_plugin_destroy_completed (plugin, window_actor); meta_plugin_destroy_completed (plugin, window_actor);
} }
/*
* Tile preview private data accessor
*/
static void
free_screen_tile_preview (gpointer data)
{
ScreenTilePreview *preview = data;
if (G_LIKELY (preview != NULL)) {
clutter_actor_destroy (preview->actor);
g_slice_free (ScreenTilePreview, preview);
}
}
static ScreenTilePreview *
get_screen_tile_preview (MetaScreen *screen)
{
ScreenTilePreview *preview = g_object_get_qdata (G_OBJECT (screen), screen_tile_preview_data_quark);
if (G_UNLIKELY (screen_tile_preview_data_quark == 0))
screen_tile_preview_data_quark = g_quark_from_static_string (SCREEN_TILE_PREVIEW_DATA_KEY);
if (G_UNLIKELY (!preview))
{
preview = g_slice_new0 (ScreenTilePreview);
preview->actor = clutter_actor_new ();
clutter_actor_set_background_color (preview->actor, CLUTTER_COLOR_Blue);
clutter_actor_set_opacity (preview->actor, 100);
clutter_actor_add_child (meta_get_window_group_for_screen (screen), preview->actor);
g_object_set_qdata_full (G_OBJECT (screen),
screen_tile_preview_data_quark, preview,
free_screen_tile_preview);
}
return preview;
}
static void
show_tile_preview (MetaPlugin *plugin,
MetaWindow *window,
MetaRectangle *tile_rect,
int tile_monitor_number)
{
MetaScreen *screen = meta_plugin_get_screen (plugin);
ScreenTilePreview *preview = get_screen_tile_preview (screen);
ClutterActor *window_actor;
if (CLUTTER_ACTOR_IS_VISIBLE (preview->actor)
&& preview->tile_rect.x == tile_rect->x
&& preview->tile_rect.y == tile_rect->y
&& preview->tile_rect.width == tile_rect->width
&& preview->tile_rect.height == tile_rect->height)
return; /* nothing to do */
clutter_actor_set_position (preview->actor, tile_rect->x, tile_rect->y);
clutter_actor_set_size (preview->actor, tile_rect->width, tile_rect->height);
clutter_actor_show (preview->actor);
window_actor = CLUTTER_ACTOR (meta_window_get_compositor_private (window));
clutter_actor_lower (preview->actor, window_actor);
preview->tile_rect = *tile_rect;
}
static void
hide_tile_preview (MetaPlugin *plugin)
{
MetaScreen *screen = meta_plugin_get_screen (plugin);
ScreenTilePreview *preview = get_screen_tile_preview (screen);
clutter_actor_hide (preview->actor);
}
static void static void
kill_switch_workspace (MetaPlugin *plugin) kill_switch_workspace (MetaPlugin *plugin)
{ {

View File

@@ -15,7 +15,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#include "region-utils.h" #include "region-utils.h"

View File

@@ -15,7 +15,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#ifndef __META_REGION_UTILS_H__ #ifndef __META_REGION_UTILS_H__

View File

@@ -15,7 +15,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
/* The standard cycle-windows keybinding should be the key above the /* The standard cycle-windows keybinding should be the key above the

View File

@@ -17,7 +17,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
/* /*
@@ -51,7 +53,6 @@
#include "bell.h" #include "bell.h"
#include "screen-private.h" #include "screen-private.h"
#include "window-private.h" #include "window-private.h"
#include "util-private.h"
#include <meta/prefs.h> #include <meta/prefs.h>
#include <meta/compositor.h> #include <meta/compositor.h>
#ifdef HAVE_LIBCANBERRA #ifdef HAVE_LIBCANBERRA

View File

@@ -14,7 +14,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#include <X11/Xlib.h> #include <X11/Xlib.h>

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