Compare commits

..

29 Commits

Author SHA1 Message Date
Florian Müllner
7631ba5208 Bump version to 3.20.2
Update NEWS.
2016-05-10 22:15:58 +02:00
Tiago Santos
b31eddd208 Updated Portuguese translation 2016-04-30 15:15:52 +00:00
Carlos Garnacho
a6cc35e595 wayland: remove pressed button checks from meta_wayland_pointer_can_grab_surface()
Leave these checks up to the callers, the only uses of this function
(indirect, through meta_wayland_seat_get_grab_info) are
[wl_shell|xdg]_surface.move/resize/show_window_menu.

In move/resize it makes sense to check for a button being pressed, because
we must expect a button release event. However for xdg_surface.show_window_menu
we 1) don't strictly need further events and 2) we must account for press+release
event pairs being processed at once in the compositor before the client sees
the former.

That is eg. the case of touchpad 2nd/3rd button tap emulation, multifinger
taps will emit the event pair at once, so when the client manages to request
xdg_surface.show_window_menu, it'll be too late in the compositor side, so the
request is ignored.

https://bugzilla.gnome.org/show_bug.cgi?id=764519
2016-04-25 14:23:01 +02:00
Jonas Ådahl
08ac192b9d wayland: Handle wl_data_device being destroyed while focused
A wl_data_device object may be created while it is being focused,
either because the client destroyed it or because the client was
destroyed. Handle this by early out in focus handler vfuncs the case
where it was destroyed, so that we don't corrupt memory and/or cause
segmentation fault.

https://bugzilla.gnome.org/show_bug.cgi?id=765062
2016-04-25 20:17:24 +08:00
Florian Müllner
ed5c3b39ee monitor-manager: Add get_is_builtin_display_on()
Wrap the existing laptop_display_is_on() method in a public function
that gnome-shell can use to query whether a builtin output is present
and enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=765267
2016-04-21 21:16:16 +02:00
Florian Müllner
b6f11fa8b8 monitor-config: Update laptop heuristics to match GnomeRROutput
gnome-desktop's GnomeRROutput class has heuristics to classify a display
as builtin similar to our own[0]. The two heuristics don't quite match
though, so different core components can end up with a different view
on the current display configuration. Minimize that risk by adding a
couple of rules that bring the two heuristics closer together.

[0] https://git.gnome.org/browse/gnome-desktop/tree/libgnome-desktop/gnome-rr.c#n1674

https://bugzilla.gnome.org/show_bug.cgi?id=765267
2016-04-21 17:36:22 +02:00
Florian Müllner
ab6c008e3e monitor-manager: Expose output_is_laptop() method
We currently duplicate the heuristics of whether an output is considered
a laptop or not. Avoid this by sharing a small helper method.

https://bugzilla.gnome.org/show_bug.cgi?id=765267
2016-04-21 17:36:22 +02:00
Victor Toso
ff312b6958 fix warning due implicit declaration of function
error: implicit declaration of function
  .x = (int)roundf (priv->current_x - (hot_x * texture_scale)),
            ^

https://bugzilla.gnome.org/show_bug.cgi?id=765252
2016-04-20 09:22:52 +02:00
Rui Matos
e284370013 wayland-keyboard: Notify clients of pending modifier state changes
If we get a key event but still have pending modifier state changes we
need to send a modifiers event right away so that the key event can be
interpreted by clients correctly modified.

This case could happen when mutter/gnome-shell itself consumes the
modifier key press event such as with the overview key which by
default is triggered on super press.

https://bugzilla.gnome.org/show_bug.cgi?id=748526
2016-04-19 18:02:25 +02:00
Rui Matos
0fa9751b31 wayland-keyboard: Include virtual modifiers along with real modifiers
The wayland protocol has enough space to send both virtual and real
modifiers on modifiers events which saves clients the work of
resolving virtual modifiers themselves.

https://bugzilla.gnome.org/show_bug.cgi?id=748526
2016-04-19 18:02:25 +02:00
Rui Matos
82a247ccf5 keybindings: Keep virtual modifier masks around
Besides the resolved real modifier masks, having the virtual masks
around will be useful too.

https://bugzilla.gnome.org/show_bug.cgi?id=748526
2016-04-19 18:02:25 +02:00
Olivier Fourdan
5d6af70bc9 keybindings: Fix keyboard move/resize on Wayland
Rework the code to keep the grab/ungrab logic when running as a Wayland
compositor.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=758076
2016-04-19 09:02:06 +02:00
GNOME Translation Robot
5a58fc0621 Updated Japanese translation 2016-04-17 06:40:14 +00:00
Florian Müllner
8842bdfb11 Do not skip CoglError parameters
While CoglError is a define to GError, it doesn't follow the convention
of ignoring errors when NULL is passed, but rather treats the error as
fatal :-(
That's clearly unwanted for a compositor, so make sure to always pass
an error parameter where a runtime error is possible (i.e. any CoglError
that is not a malformed blend string).

https://bugzilla.gnome.org/show_bug.cgi?id=765058
2016-04-15 17:22:24 +02:00
Florian Müllner
bdc72dd9d7 Do not try to unref NULL CoglObjects
https://bugzilla.gnome.org/show_bug.cgi?id=765058
2016-04-15 17:21:22 +02:00
Florian Müllner
588b8a163b Bump version to 3.20.1
Update NEWS.
2016-04-13 19:02:41 +02:00
Rui Matos
8587f0e80d monitor-config: Handle invalid previous configurations
The previous configuration might not apply because the number of
enabled outputs when trying to apply it might have changed. This isn't
a bug so we shouldn't assert. Instead, we can handle it by falling
back as we would if we didn't have a previous configuration to start
with.

https://bugzilla.gnome.org/show_bug.cgi?id=764286
2016-04-13 18:16:36 +02:00
Cosimo Cecchi
150732a894 theme: set RTL/LTR flags on the style context
https://bugzilla.gnome.org/show_bug.cgi?id=764807
2016-04-09 10:03:27 -07:00
Jasper St. Pierre
75e6029206 stack: Fix 32-bit issues
Since g_array_append_val isn't smart enough to do a proper upcast, we
have to do it manually, lest we get junk.

This fixes various RAISE_ABOVE: window not in stack: 0x8100c8003
warnings that appear on 32-bit systems.
2016-04-08 17:28:26 -07:00
Rui Matos
e017148208 wayland: Make wayland move/resizes be constrained the same as X11
Just like we do for _NET_WM_MOVERESIZE messages on X11, consider
wayland client move/resizes as "frame actions" so that the same
constraints are applied to them, in particular the titlebar visibility
constraint.

https://bugzilla.gnome.org/show_bug.cgi?id=748819
2016-04-06 17:58:18 +02:00
Jonas Ådahl
7173937a7d wayland/cursor: Keep a private use count and reference to active buffer
In order for the native cursor renderer to be able to create a hw
cursor in response to wl_pointer.set_cursor(), keep a private use-count
and reference to the active buffer, stopping it from being released
until it is consumed, replaced, or the surface is destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=762828
2016-03-29 18:26:10 +08:00
Jonas Ådahl
f44238a72f MetaWaylandSurface: Keep an extra buffer use count for role-less surfaces
Whether a surface needs to keep the committed wl_buffer un-released
depends on what role the surface gets assigned to. For example a cursor
role may need an unreleased shm buffer in order to create a hw cursor from
it.

In order to support this, keep a separate reference and use count to
the buffer on behalf of the in the future assigned role, and release
those references after the surface was assigned a role. A role that
needs its own references and use counts, must in its assign function
make sure to add those.

https://bugzilla.gnome.org/show_bug.cgi?id=762828
2016-03-29 18:26:10 +08:00
Jonas Ådahl
10a0114856 wayland: Move buffer use count to MetaWaylandSurface
Each wl_surface.commit with a newly attached buffer should result in
one wl_buffer.release for the attached buffer. For example attaching
the same buffer to two different surfaces must always result in two
wl_buffer.release events being emitted by the server. The client is
responsible for counting the wl_buffer.release events and be sure to
have received as many release events as it has attached and committed
the buffer, before reusing it.

https://bugzilla.gnome.org/show_bug.cgi?id=762828
2016-03-29 18:26:10 +08:00
Jonas Ådahl
aa7bc501d5 wayland: Replace buffer destroy wl_signal with a GObject signal
Don't use the libwayland-* utilities when we have our own that do the
same thing.

https://bugzilla.gnome.org/show_bug.cgi?id=762828
2016-03-29 18:02:31 +08:00
Trần Ngọc Quân
623eb6eacc Updated Vietnamese translation
Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
2016-03-27 07:25:53 +07:00
Fabio Tomat
12a3125132 Updated Friulian translation 2016-03-25 16:54:40 +00:00
Fabio Tomat
2ca3d30485 Added Friulian translation 2016-03-25 11:55:58 +00:00
Reinout van Schouwen
0559b8fe03 Updated Dutch translation by Nathan Follens 2016-03-23 22:42:11 +01:00
Inaki Larranaga Murgoitio
0e0915ed79 Updated Basque language 2016-03-23 17:06:28 +01:00
37 changed files with 3528 additions and 2997 deletions

27
NEWS
View File

@@ -1,3 +1,30 @@
3.20.2
======
* Notify clients of pending modifier state changes [Rui; #748526]
* Add get_is_builtin_display_on() method [Florian; #765267]
* Fix 2-finger titlebar taps on wayland [Carlos; #764519]
* Misc. bug fixes [Florian, Victor, Jonas; #765058, #765252, #765062]
Contributors:
Jonas Ådahl, Olivier Fourdan, Carlos Garnacho, Rui Matos, Florian Müllner,
Victor Toso
Translations:
GNOME Translation Robot [ja], Tiago Santos [pt]
3.20.1
======
* Constrain window move/resizes on wayland as on X11 [Rui; #748819]
* Don't crash with invalid previous monitor configurations [Rui; #764286]
* Misc. bug fixes and cleanups [Jonas, Cosimo; #762828, #764807]
Contributors:
Jonas Ådahl, Cosimo Cecchi, Rui Matos, Jasper St. Pierre
Translations:
Inaki Larranaga Murgoitio [eu], Reinout van Schouwen [nl], Fabio Tomat [fur],
Trần Ngọc Quân [vi]
3.20.0
======
* Fix crash when using visual bell [Jonas; #763858]

View File

@@ -2,7 +2,7 @@ AC_PREREQ(2.62)
m4_define([mutter_major_version], [3])
m4_define([mutter_minor_version], [20])
m4_define([mutter_micro_version], [0])
m4_define([mutter_micro_version], [2])
m4_define([mutter_version],
[mutter_major_version.mutter_minor_version.mutter_micro_version])

View File

@@ -29,6 +29,7 @@ eu
fa
fi
fr
fur
ga
gl
gu

View File

@@ -2,24 +2,23 @@
# This file is distributed under the same license as the PACKAGE package.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
#
#
# Hizkuntza Politikarako Sailburuordetza <hizpol@ej-gv.es>, 2004.
# Iñaki Larrañaga Murgoitio <dooteo@zundan.com>, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011.
# Iñaki Larrañaga Murgoitio <dooteo@zundan.com>, 2012, 2013, 2014, 2015.
#
# Iñaki Larrañaga Murgoitio <dooteo@zundan.com>, 2012, 2013, 2014, 2015, 2016.
msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2015-03-21 15:50+0100\n"
"PO-Revision-Date: 2015-03-21 15:51+0100\n"
"Last-Translator: Iñaki Larrañaga Murgoitio <dooteo@zundan.com>\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-03-23 17:05+0100\n"
"PO-Revision-Date: 2016-03-23 17:06+0100\n"
"Last-Translator: dooteo <dooteo@zundan.com>\n"
"Language-Team: Basque <librezale@librezale.org>\n"
"Language: eu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Lokalize 1.4\n"
"X-Generator: Lokalize 2.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../data/50-mutter-navigation.xml.in.h:1
@@ -455,22 +454,22 @@ msgstr "Aldatu 11. TBra"
msgid "Switch to VT 12"
msgstr "Aldatu 12. TBra"
#: ../src/backends/meta-monitor-manager.c:364
#: ../src/backends/meta-monitor-manager.c:518
msgid "Built-in display"
msgstr "Bertako pantaila"
#: ../src/backends/meta-monitor-manager.c:391
#: ../src/backends/meta-monitor-manager.c:544
msgid "Unknown"
msgstr "Ezezaguna"
#: ../src/backends/meta-monitor-manager.c:393
#: ../src/backends/meta-monitor-manager.c:546
msgid "Unknown Display"
msgstr "Pantaila ezezaguna"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: ../src/backends/meta-monitor-manager.c:401
#: ../src/backends/meta-monitor-manager.c:554
#, c-format
msgid "%s %s"
msgstr "%s %s"
@@ -486,7 +485,7 @@ msgstr ""
"Dagoeneko beste konposatze-kudeatzailea ari da exekutatzen \"%2$s\" "
"pantailako %1$i. monitorean \"."
#: ../src/core/bell.c:185
#: ../src/core/bell.c:194
msgid "Bell event"
msgstr "Soinuaren gertaera"
@@ -515,40 +514,44 @@ msgstr "_Itxaron"
msgid "_Force Quit"
msgstr "_Behartu ixtera"
#: ../src/core/display.c:562
#: ../src/core/display.c:555
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "Huts egin du X Window sistemaren '%s' pantaila irekitzean\n"
#: ../src/core/main.c:176
#: ../src/core/main.c:181
msgid "Disable connection to session manager"
msgstr "Desgaitu saio-kudeatzailearen konexioa"
#: ../src/core/main.c:182
#: ../src/core/main.c:187
msgid "Replace the running window manager"
msgstr "Ordeztu exekutatzen dagoen leiho-kudeatzailea"
#: ../src/core/main.c:188
#: ../src/core/main.c:193
msgid "Specify session management ID"
msgstr "Zehaztu saio-kudeatzailearen IDa"
#: ../src/core/main.c:193
#: ../src/core/main.c:198
msgid "X Display to use"
msgstr "X pantaila erabiltzeko"
#: ../src/core/main.c:199
#: ../src/core/main.c:204
msgid "Initialize session from savefile"
msgstr "Hasieratu saioa babes-fitxategitik"
#: ../src/core/main.c:205
#: ../src/core/main.c:210
msgid "Make X calls synchronous"
msgstr "Egin X deiak sinkronoak izatea"
#: ../src/core/main.c:212
#: ../src/core/main.c:217
msgid "Run as a wayland compositor"
msgstr "Exekutatu wayland konposatzaile gisa"
#: ../src/core/main.c:220
#: ../src/core/main.c:223
msgid "Run as a nested compositor"
msgstr "Exekutatu habiaratutako konposatzaile gisa"
#: ../src/core/main.c:231
msgid "Run as a full display server, rather than nested"
msgstr "Exekutatu pantaila-zerbitzari oso bezala, habiaratuta baino"
@@ -575,12 +578,12 @@ msgstr "Erakutsi bertsioa"
msgid "Mutter plugin to use"
msgstr "Mutter-en osagaia erabiltzeko"
#: ../src/core/prefs.c:2004
#: ../src/core/prefs.c:1997
#, c-format
msgid "Workspace %d"
msgstr "%d. laneko area"
#: ../src/core/screen.c:525
#: ../src/core/screen.c:521
#, c-format
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
@@ -589,12 +592,12 @@ msgstr ""
"'%s' pantailak badu leiho-kudeatzailea; erabili --replace aukera uneko leiho-"
"kudeatzailea ordezteko."
#: ../src/core/screen.c:607
#: ../src/core/screen.c:603
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgstr "'%2$s' bistaratzeko %1$d pantaila ez da baliozkoa\n"
#: ../src/core/util.c:118
#: ../src/core/util.c:121
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter modu xehatuaren euskarririk gabe konpilatu da\n"
@@ -676,11 +679,11 @@ msgstr "%s (%s)"
#~ "\" ez dator bat formatuarekin"
#~ msgid ""
#~ "GTK color specification must have the state in brackets, e.g. gtk:fg"
#~ "[NORMAL] where NORMAL is the state; could not parse \"%s\""
#~ "GTK color specification must have the state in brackets, e.g. gtk:"
#~ "fg[NORMAL] where NORMAL is the state; could not parse \"%s\""
#~ msgstr ""
#~ "GTK kolore-zehaztapenak egoera kortxete artean izan behar du, adib. gtk:fg"
#~ "[NORMAL], NORMAL egoera izanik; \"%s\" ezin da analizatu"
#~ "GTK kolore-zehaztapenak egoera kortxete artean izan behar du, adib. gtk:"
#~ "fg[NORMAL], NORMAL egoera izanik; \"%s\" ezin da analizatu"
#~ msgid ""
#~ "GTK color specification must have a close bracket after the state, e.g. "

583
po/fur.po Normal file
View File

@@ -0,0 +1,583 @@
# Friulian translation for mutter.
# Copyright (C) 2016 mutter's COPYRIGHT HOLDER
# This file is distributed under the same license as the mutter package.
# Fabio Tomat <f.t.public@gmail.com>, 2016.
#
msgid ""
msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2016-03-25 01:58+0000\n"
"PO-Revision-Date: 2016-03-25 17:54+0100\n"
"Language-Team: Friulian <fur@li.org>\n"
"Language: fur\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Last-Translator: Fabio Tomat <f.t.public@gmail.com>\n"
"X-Generator: Poedit 1.8.5\n"
#: ../data/50-mutter-navigation.xml.in.h:1
msgid "Navigation"
msgstr "Navigazion"
#: ../data/50-mutter-navigation.xml.in.h:2
msgid "Move window to workspace 1"
msgstr "Sposte barcon tal spazi di lavôr 1"
#: ../data/50-mutter-navigation.xml.in.h:3
msgid "Move window to workspace 2"
msgstr "Sposte barcon tal spazi di lavôr 2"
#: ../data/50-mutter-navigation.xml.in.h:4
msgid "Move window to workspace 3"
msgstr "Sposte barcon tal spazi di lavôr 3"
#: ../data/50-mutter-navigation.xml.in.h:5
msgid "Move window to workspace 4"
msgstr "Sposte barcon tal spazi di lavôr 4"
#: ../data/50-mutter-navigation.xml.in.h:6
msgid "Move window to last workspace"
msgstr "Sposte barcon tal ultin spazi di lavôr"
#: ../data/50-mutter-navigation.xml.in.h:7
msgid "Move window one workspace to the left"
msgstr "Sposte barcon tal spazi di lavôr a çampe"
#: ../data/50-mutter-navigation.xml.in.h:8
msgid "Move window one workspace to the right"
msgstr "Sposte barcon tal spazi di lavôr a drete"
#: ../data/50-mutter-navigation.xml.in.h:9
msgid "Move window one workspace up"
msgstr "Sposte barcon tal spazi di lavôr parsore"
#: ../data/50-mutter-navigation.xml.in.h:10
msgid "Move window one workspace down"
msgstr "Sposte barcon tal spazi di lavôr sot"
#: ../data/50-mutter-navigation.xml.in.h:11
msgid "Move window one monitor to the left"
msgstr "Sposte barcon tal visôr a çampe"
#: ../data/50-mutter-navigation.xml.in.h:12
msgid "Move window one monitor to the right"
msgstr "Sposte barcon tal visôr a drete"
#: ../data/50-mutter-navigation.xml.in.h:13
msgid "Move window one monitor up"
msgstr "Sposte barcon tal visôr parsore"
#: ../data/50-mutter-navigation.xml.in.h:14
msgid "Move window one monitor down"
msgstr "Sposte barcon tal visôr sot"
#: ../data/50-mutter-navigation.xml.in.h:15
msgid "Switch applications"
msgstr "Passâ di une aplicazion in chê altre"
#: ../data/50-mutter-navigation.xml.in.h:16
msgid "Switch to previous application"
msgstr "Passe ae aplicazion prime"
#: ../data/50-mutter-navigation.xml.in.h:17
msgid "Switch windows"
msgstr "Passâ di un barcon in chel altri"
#: ../data/50-mutter-navigation.xml.in.h:18
msgid "Switch to previous window"
msgstr "Passe al barcon prime"
#: ../data/50-mutter-navigation.xml.in.h:19
msgid "Switch windows of an application"
msgstr "Passâ di un barcon in chel altri di une aplicazion"
#: ../data/50-mutter-navigation.xml.in.h:20
msgid "Switch to previous window of an application"
msgstr "Passe al barcon prime di une aplicazion"
#: ../data/50-mutter-navigation.xml.in.h:21
msgid "Switch system controls"
msgstr "Passâ di un control di sisteme in chel altri"
#: ../data/50-mutter-navigation.xml.in.h:22
msgid "Switch to previous system control"
msgstr "Passe al control di sisteme precedent"
#: ../data/50-mutter-navigation.xml.in.h:23
msgid "Switch windows directly"
msgstr ""
#: ../data/50-mutter-navigation.xml.in.h:24
msgid "Switch directly to previous window"
msgstr ""
#: ../data/50-mutter-navigation.xml.in.h:25
msgid "Switch windows of an app directly"
msgstr ""
#: ../data/50-mutter-navigation.xml.in.h:26
msgid "Switch directly to previous window of an app"
msgstr ""
#: ../data/50-mutter-navigation.xml.in.h:27
msgid "Switch system controls directly"
msgstr ""
#: ../data/50-mutter-navigation.xml.in.h:28
msgid "Switch directly to previous system control"
msgstr ""
#: ../data/50-mutter-navigation.xml.in.h:29
msgid "Hide all normal windows"
msgstr "Plate ducj i barcons normâi"
#: ../data/50-mutter-navigation.xml.in.h:30
msgid "Switch to workspace 1"
msgstr "Passe al spazi di lavôr 1"
#: ../data/50-mutter-navigation.xml.in.h:31
msgid "Switch to workspace 2"
msgstr "Passe al spazi di lavôr 2"
#: ../data/50-mutter-navigation.xml.in.h:32
msgid "Switch to workspace 3"
msgstr "Passe al spazi di lavôr 3"
#: ../data/50-mutter-navigation.xml.in.h:33
msgid "Switch to workspace 4"
msgstr "Passe al spazi di lavôr 4"
#: ../data/50-mutter-navigation.xml.in.h:34
msgid "Switch to last workspace"
msgstr "Passe al ultin spazi di lavôr"
#: ../data/50-mutter-navigation.xml.in.h:35
msgid "Move to workspace left"
msgstr "Sposte il spazi di lavôr a çampe"
#: ../data/50-mutter-navigation.xml.in.h:36
msgid "Move to workspace right"
msgstr "Sposte il spazi di lavôr a drete"
#: ../data/50-mutter-navigation.xml.in.h:37
msgid "Move to workspace above"
msgstr "Sposte il spazi di lavôr parsore"
#: ../data/50-mutter-navigation.xml.in.h:38
msgid "Move to workspace below"
msgstr "Sposte il spazi di lavôr sot"
#: ../data/50-mutter-system.xml.in.h:1
msgid "System"
msgstr "Sisteme"
#: ../data/50-mutter-system.xml.in.h:2
msgid "Show the run command prompt"
msgstr ""
#: ../data/50-mutter-system.xml.in.h:3
msgid "Show the activities overview"
msgstr "Mostre la panoramiche ativitâts"
#: ../data/50-mutter-windows.xml.in.h:1
msgid "Windows"
msgstr "Barcons"
#: ../data/50-mutter-windows.xml.in.h:2
msgid "Activate the window menu"
msgstr "Ative il menù dal barcon"
#: ../data/50-mutter-windows.xml.in.h:3
msgid "Toggle fullscreen mode"
msgstr "Ative/Disative modalitât plen visôr"
#: ../data/50-mutter-windows.xml.in.h:4
msgid "Toggle maximization state"
msgstr "Ative/Disative il stât slargjât"
#: ../data/50-mutter-windows.xml.in.h:5
msgid "Maximize window"
msgstr "Slargje il barcon"
#: ../data/50-mutter-windows.xml.in.h:6
msgid "Restore window"
msgstr "Ripristine barcon"
#: ../data/50-mutter-windows.xml.in.h:7
msgid "Toggle shaded state"
msgstr "Ative/Disative stât inrodolât"
#: ../data/50-mutter-windows.xml.in.h:8
msgid "Close window"
msgstr "Siere il barcon"
#: ../data/50-mutter-windows.xml.in.h:9
msgid "Hide window"
msgstr "Plate il barcon"
#: ../data/50-mutter-windows.xml.in.h:10
msgid "Move window"
msgstr "Sposte il barcon"
#: ../data/50-mutter-windows.xml.in.h:11
msgid "Resize window"
msgstr "Ridimensione barcon"
#: ../data/50-mutter-windows.xml.in.h:12
msgid "Toggle window on all workspaces or one"
msgstr "Ative/Disative barcon su ducj i spazis di lavôr o nome un"
#: ../data/50-mutter-windows.xml.in.h:13
msgid "Raise window if covered, otherwise lower it"
msgstr "Tire sù il barcon se al è cuviert, se no sbassilu"
#: ../data/50-mutter-windows.xml.in.h:14
msgid "Raise window above other windows"
msgstr "Met il barcon parsore di chei altris"
#: ../data/50-mutter-windows.xml.in.h:15
msgid "Lower window below other windows"
msgstr "Bute il barcon sot di chei altris"
#: ../data/50-mutter-windows.xml.in.h:16
msgid "Maximize window vertically"
msgstr "Slargje il barcon par verticâl"
#: ../data/50-mutter-windows.xml.in.h:17
msgid "Maximize window horizontally"
msgstr "Slargje il barcon par orizontâl"
#: ../data/50-mutter-windows.xml.in.h:18
msgid "View split on left"
msgstr ""
#: ../data/50-mutter-windows.xml.in.h:19
msgid "View split on right"
msgstr ""
#: ../data/mutter.desktop.in.h:1
msgid "Mutter"
msgstr "Mutter"
#: ../data/org.gnome.mutter.gschema.xml.in.h:1
msgid "Modifier to use for extended window management operations"
msgstr ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:2
msgid ""
"This key will initiate the \"overlay\", which is a combination window "
"overview and application launching system. The default is intended to be the "
"\"Windows key\" on PC hardware. It's expected that this binding either the "
"default or set to the empty string."
msgstr ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:3
msgid "Attach modal dialogs"
msgstr ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:4
msgid ""
"When true, instead of having independent titlebars, modal dialogs appear "
"attached to the titlebar of the parent window and are moved together with "
"the parent window."
msgstr ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:5
msgid "Enable edge tiling when dropping windows on screen edges"
msgstr ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:6
msgid ""
"If enabled, dropping windows on vertical screen edges maximizes them "
"vertically and resizes them horizontally to cover half of the available "
"area. Dropping windows on the top screen edge maximizes them completely."
msgstr ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:7
msgid "Workspaces are managed dynamically"
msgstr "I spazis di vore a son ministrât in maniere dinamiche"
#: ../data/org.gnome.mutter.gschema.xml.in.h:8
msgid ""
"Determines whether workspaces are managed dynamically or whether there's a "
"static number of workspaces (determined by the num-workspaces key in org."
"gnome.desktop.wm.preferences)."
msgstr ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:9
msgid "Workspaces only on primary"
msgstr "Spazis di vore nome tal visôr primari"
#: ../data/org.gnome.mutter.gschema.xml.in.h:10
msgid ""
"Determines whether workspace switching should happen for windows on all "
"monitors or only for windows on the primary monitor."
msgstr ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:11
msgid "No tab popup"
msgstr ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:12
msgid ""
"Determines whether the use of popup and highlight frame should be disabled "
"for window cycling."
msgstr ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:13
msgid "Delay focus changes until the pointer stops moving"
msgstr ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:14
msgid ""
"If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
"the focus will not be changed immediately when entering a window, but only "
"after the pointer stops moving."
msgstr ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:15
msgid "Draggable border width"
msgstr ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:16
msgid ""
"The amount of total draggable borders. If the theme's visible borders are "
"not enough, invisible borders will be added to meet this value."
msgstr ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:17
msgid "Auto maximize nearly monitor sized windows"
msgstr ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:18
msgid ""
"If enabled, new windows that are initially the size of the monitor "
"automatically get maximized."
msgstr ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:19
msgid "Place new windows in the center"
msgstr "Place i gnûfs barcons tal mieç"
#: ../data/org.gnome.mutter.gschema.xml.in.h:20
msgid ""
"When true, the new windows will always be put in the center of the active "
"screen of the monitor."
msgstr ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:21
msgid "Select window from tab popup"
msgstr ""
#: ../data/org.gnome.mutter.gschema.xml.in.h:22
msgid "Cancel tab popup"
msgstr ""
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:1
msgid "Switch to VT 1"
msgstr "Passe al VT 1"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:2
msgid "Switch to VT 2"
msgstr "Passe al VT 2"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:3
msgid "Switch to VT 3"
msgstr "Passe al VT 3"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:4
msgid "Switch to VT 4"
msgstr "Passe al VT 4"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:5
msgid "Switch to VT 5"
msgstr "Passe al VT 5"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:6
msgid "Switch to VT 6"
msgstr "Passe al VT 6"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:7
msgid "Switch to VT 7"
msgstr "Passe al VT 7"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
msgid "Switch to VT 8"
msgstr "Passe al VT 8"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
msgid "Switch to VT 9"
msgstr "Passe al VT 9"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
msgid "Switch to VT 10"
msgstr "Passe al VT 10"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
msgid "Switch to VT 11"
msgstr "Passe al VT 11"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
msgid "Switch to VT 12"
msgstr "Passe al VT 12"
#: ../src/backends/meta-monitor-manager.c:518
msgid "Built-in display"
msgstr "Display integrât"
#: ../src/backends/meta-monitor-manager.c:544
msgid "Unknown"
msgstr "No cognossût"
#: ../src/backends/meta-monitor-manager.c:546
msgid "Unknown Display"
msgstr "Display no cognossût"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: ../src/backends/meta-monitor-manager.c:554
#, c-format
msgid "%s %s"
msgstr "%s %s"
#. This probably means that a non-WM compositor like xcompmgr is running;
#. * we have no way to get it to exit
#: ../src/compositor/compositor.c:456
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display \"%s"
"\"."
msgstr ""
"Un altri compositing manager al è za in esecuzion sul schermi %i sul display "
"\"%s\"."
#: ../src/core/bell.c:194
msgid "Bell event"
msgstr "Event cjampane"
#: ../src/core/delete.c:127
#, c-format
msgid "“%s” is not responding."
msgstr "“%s” nol rispuint."
#: ../src/core/delete.c:129
msgid "Application is not responding."
msgstr "La aplicazion no rispuint."
#: ../src/core/delete.c:134
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
msgstr ""
#: ../src/core/delete.c:141
msgid "_Wait"
msgstr "_Spiete"
#: ../src/core/delete.c:141
msgid "_Force Quit"
msgstr "Sfuarce _Jessude"
#: ../src/core/display.c:555
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "Impussibil vierzi il display '%s' di X Window System\n"
#: ../src/core/main.c:181
msgid "Disable connection to session manager"
msgstr ""
#: ../src/core/main.c:187
msgid "Replace the running window manager"
msgstr "Rimplace il window manager in vore"
#: ../src/core/main.c:193
msgid "Specify session management ID"
msgstr ""
#: ../src/core/main.c:198
msgid "X Display to use"
msgstr "Display X di doprâ"
#: ../src/core/main.c:204
msgid "Initialize session from savefile"
msgstr "Inizialize session da file salvât"
#: ../src/core/main.c:210
msgid "Make X calls synchronous"
msgstr "Fâs lis clamadis X sincronis"
#: ../src/core/main.c:217
msgid "Run as a wayland compositor"
msgstr "Eseguìs come compositor wayland"
#: ../src/core/main.c:223
msgid "Run as a nested compositor"
msgstr "Eseguìs come compositor nidiât"
#: ../src/core/main.c:231
msgid "Run as a full display server, rather than nested"
msgstr "Eseguìs come servidôr display complet, invezit che nidiât"
#: ../src/core/mutter.c:39
#, c-format
msgid ""
"mutter %s\n"
"Copyright (C) 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
"This is free software; see the source for copying conditions.\n"
"There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A "
"PARTICULAR PURPOSE.\n"
msgstr ""
"mutter %s\n"
"Copyright (C) 2001-%d Havoc Pennington, Red Hat, Inc., e altris\n"
"Chest al è software libar; viodi i sorzints pes condizions di copie.\n"
"No je NISSUNE garanzie; nancje di COMERCIABILITÂT o IDONEITÂT A UNE "
"FINALITÂT PARTICOLÂR.\n"
#: ../src/core/mutter.c:53
msgid "Print version"
msgstr "Stampe version"
#: ../src/core/mutter.c:59
msgid "Mutter plugin to use"
msgstr "Plugin Mutter di doprâ"
#: ../src/core/prefs.c:1997
#, c-format
msgid "Workspace %d"
msgstr "Spazi di lavôr %d"
#: ../src/core/screen.c:521
#, c-format
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
"to replace the current window manager."
msgstr ""
"Il display \"%s\" al à za un window manager; prove dopre la opzion --replace "
"par rimplaçâ chel atuâl."
#: ../src/core/screen.c:603
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgstr "Schermi %d su display '%s' no valit\n"
#: ../src/core/util.c:121
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter al è stât compilât cence supuart pe modalitât fetose\n"
#: ../src/x11/session.c:1815
msgid ""
"These windows do not support &quot;save current setup&quot; and will have to "
"be restarted manually next time you log in."
msgstr ""
"Chescj barcons no supuartin la funzion &quot;salve impostazions atuâi&quot; "
"e si scugnarà tornâ a inviâlis a man tal prossim acès."
#: ../src/x11/window-props.c:549
#, c-format
msgid "%s (on %s)"
msgstr "%s (su %s)"

2682
po/ja.po

File diff suppressed because it is too large Load Diff

2274
po/nl.po

File diff suppressed because it is too large Load Diff

View File

@@ -3,21 +3,22 @@
# Distributed under the same licence as the metacity package
# Duarte Loreto <happyguy_pt@hotmail.com>, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014.
# Pedro Albuquerque <palbuquerque73@openmailbox.com>, 2015.
# Tiago Santos <tiagofsantos81@sapo.pt>, 2016.
#
msgid ""
msgstr ""
"Project-Id-Version: 3.10\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2015-06-07 22:51+0000\n"
"PO-Revision-Date: 2015-06-25 08:16+0100\n"
"Last-Translator: Pedro Albuquerque <palbuquerque73@openmailbox.com>\n"
"POT-Creation-Date: 2016-04-30 13:15+0000\n"
"PO-Revision-Date: 2016-04-30 16:12+0100\n"
"Last-Translator: Tiago Santos <tiagofsantos81@sapo.pt>\n"
"Language-Team: Português <palbuquerque73@openmailbox.com>\n"
"Language: pt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Gtranslator 2.91.6\n"
"X-Generator: Poedit 1.5.4\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../data/50-mutter-navigation.xml.in.h:1
@@ -41,7 +42,6 @@ msgid "Move window to workspace 4"
msgstr "Mover janela para a área de trabalho 4"
#: ../data/50-mutter-navigation.xml.in.h:6
#| msgid "Move window to workspace 1"
msgid "Move window to last workspace"
msgstr "Mover janela para a última área de trabalho"
@@ -82,7 +82,6 @@ msgid "Switch applications"
msgstr "Mudar de aplicações"
#: ../data/50-mutter-navigation.xml.in.h:16
#| msgid "Switch applications"
msgid "Switch to previous application"
msgstr "Mudar para a aplicação anterior"
@@ -91,7 +90,6 @@ msgid "Switch windows"
msgstr "Mudar de janelas"
#: ../data/50-mutter-navigation.xml.in.h:18
#| msgid "Switch windows"
msgid "Switch to previous window"
msgstr "Mudar para a janela anterior"
@@ -100,7 +98,6 @@ msgid "Switch windows of an application"
msgstr "Alternar entre janelas de uma aplicação"
#: ../data/50-mutter-navigation.xml.in.h:20
#| msgid "Switch windows of an application"
msgid "Switch to previous window of an application"
msgstr "Mudar para a janela anterior de uma aplicação"
@@ -109,7 +106,6 @@ msgid "Switch system controls"
msgstr "Alternar entre controlos de sistema"
#: ../data/50-mutter-navigation.xml.in.h:22
#| msgid "Switch system controls"
msgid "Switch to previous system control"
msgstr "Mudar para o controlo de sistema anterior"
@@ -126,7 +122,6 @@ msgid "Switch windows of an app directly"
msgstr "Alternar diretamente entre janelas de uma aplicação"
#: ../data/50-mutter-navigation.xml.in.h:26
#| msgid "Switch windows of an application"
msgid "Switch directly to previous window of an app"
msgstr "Mudar diretamente para a janela anterior de uma aplicação"
@@ -135,7 +130,6 @@ msgid "Switch system controls directly"
msgstr "Alternar diretamente entre controlos de sistema"
#: ../data/50-mutter-navigation.xml.in.h:28
#| msgid "Switch system controls"
msgid "Switch directly to previous system control"
msgstr "Mudar diretamente para o controlo de sistema anterior"
@@ -160,7 +154,6 @@ msgid "Switch to workspace 4"
msgstr "Mudar para a área de trabalho 4"
#: ../data/50-mutter-navigation.xml.in.h:34
#| msgid "Switch to workspace 1"
msgid "Switch to last workspace"
msgstr "Mudar para a última área de trabalho 1"
@@ -415,81 +408,69 @@ msgid "Cancel tab popup"
msgstr "Cancelar o popup de tabulador"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:1
#| msgid "Switch to workspace 1"
msgid "Switch to VT 1"
msgstr "Alternar para a área de trabalho 1"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:2
#| msgid "Switch to workspace 2"
msgid "Switch to VT 2"
msgstr "Alternar para a área de trabalho 2"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:3
#| msgid "Switch to workspace 3"
msgid "Switch to VT 3"
msgstr "Alternar para a área de trabalho 3"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:4
#| msgid "Switch to workspace 4"
msgid "Switch to VT 4"
msgstr "Alternar para a área de trabalho 4"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:5
#| msgid "Switch to workspace 5"
msgid "Switch to VT 5"
msgstr "Mover para a área de trabalho 5"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:6
#| msgid "Switch to workspace 6"
msgid "Switch to VT 6"
msgstr "Mover para a área de trabalho 6"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:7
#| msgid "Switch to workspace 7"
msgid "Switch to VT 7"
msgstr "Mover para a área de trabalho 7"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:8
#| msgid "Switch to workspace 8"
msgid "Switch to VT 8"
msgstr "Mover para a área de trabalho 8"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:9
#| msgid "Switch to workspace 9"
msgid "Switch to VT 9"
msgstr "Mover para a área de trabalho 9"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:10
#| msgid "Switch to workspace 10"
msgid "Switch to VT 10"
msgstr "Mover para a área de trabalho 10"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:11
#| msgid "Switch to workspace 11"
msgid "Switch to VT 11"
msgstr "Mover para a área de trabalho 11"
#: ../data/org.gnome.mutter.wayland.gschema.xml.in.h:12
#| msgid "Switch to workspace 12"
msgid "Switch to VT 12"
msgstr "Mover para a área de trabalho 12"
#: ../src/backends/meta-monitor-manager.c:496
#: ../src/backends/meta-monitor-manager.c:515
msgid "Built-in display"
msgstr "Ecrã embutido"
#: ../src/backends/meta-monitor-manager.c:522
#: ../src/backends/meta-monitor-manager.c:538
msgid "Unknown"
msgstr "Desconhecido"
#: ../src/backends/meta-monitor-manager.c:524
#: ../src/backends/meta-monitor-manager.c:540
msgid "Unknown Display"
msgstr "Ecrã desconhecido"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: ../src/backends/meta-monitor-manager.c:532
#: ../src/backends/meta-monitor-manager.c:548
#, c-format
msgid "%s %s"
msgstr "%s %s"
@@ -505,7 +486,7 @@ msgstr ""
"Já se encontra em execução outro gestor de janelas no ecrã %i do monitor \"%s"
"\"."
#: ../src/core/bell.c:185
#: ../src/core/bell.c:194
msgid "Bell event"
msgstr "Evento de campainha"
@@ -534,40 +515,45 @@ msgstr "_Aguardar"
msgid "_Force Quit"
msgstr "_Forçar terminar"
#: ../src/core/display.c:563
#: ../src/core/display.c:555
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "Falha ao abrir ecrã \"%s\" do sistema Janelas X\n"
#: ../src/core/main.c:176
#: ../src/core/main.c:181
msgid "Disable connection to session manager"
msgstr "Desativar a ligação ao gestor de sessão"
#: ../src/core/main.c:182
#: ../src/core/main.c:187
msgid "Replace the running window manager"
msgstr "Substituir o gestor de janelas em execução"
#: ../src/core/main.c:188
#: ../src/core/main.c:193
msgid "Specify session management ID"
msgstr "Especificar a ID de gestão de sessão"
#: ../src/core/main.c:193
#: ../src/core/main.c:198
msgid "X Display to use"
msgstr "Ecrã X a utilizar"
#: ../src/core/main.c:199
#: ../src/core/main.c:204
msgid "Initialize session from savefile"
msgstr "Inicializar a sessão a partir de um ficheiro de gravação de sessão"
#: ../src/core/main.c:205
#: ../src/core/main.c:210
msgid "Make X calls synchronous"
msgstr "Fazer as chamadas X sincronamente"
#: ../src/core/main.c:212
#: ../src/core/main.c:217
msgid "Run as a wayland compositor"
msgstr "Executar como compositor wayland"
#: ../src/core/main.c:220
#: ../src/core/main.c:223
#| msgid "Run as a wayland compositor"
msgid "Run as a nested compositor"
msgstr "Executar como compositor aninhado"
#: ../src/core/main.c:231
msgid "Run as a full display server, rather than nested"
msgstr "Executar como servidor de ecrã completo, em vez de aninhado"
@@ -595,16 +581,13 @@ msgstr "Imprimir a versão"
msgid "Mutter plugin to use"
msgstr "Extensão Mutter a utilizar"
#: ../src/core/prefs.c:2004
#: ../src/core/prefs.c:1997
#, c-format
msgid "Workspace %d"
msgstr "Área de trabalho %d"
#: ../src/core/screen.c:525
#: ../src/core/screen.c:521
#, c-format
#| msgid ""
#| "Screen %d on display \"%s\" already has a window manager; try using the --"
#| "replace option to replace the current window manager.\n"
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
"to replace the current window manager."
@@ -612,12 +595,12 @@ msgstr ""
"O ecrã \"%s\" já tem um gestor de janelas; tente utilizar a opção --replace "
"para substituir o gestor de janelas atual."
#: ../src/core/screen.c:607
#: ../src/core/screen.c:603
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgstr "Ecrã %d no monitor \"%s\" é inválido\n"
#: ../src/core/util.c:118
#: ../src/core/util.c:121
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "O Mutter foi compilado sem suporte para modo verboso\n"

View File

@@ -1,17 +1,17 @@
# Vietnamese translation for Metacity.
# Copyright © 2015 GNOME i18n Project for Vietnamese.
# Copyright © 2016 GNOME i18n Project for Vietnamese.
# This file is distributed under the same license as the Metacity package.
# Nguyễn Thái Ngọc Duy <pclouds@gmail.com>, 2002-2004, 2007, 2008, 2011-2013.
# Clytie Siddall <clytie@riverland.net.au>, 2005-2009.
# Trần Ngọc Quân <vnwildman@gmail.com>, 2014, 2015.
# Trần Ngọc Quân <vnwildman@gmail.com>, 2014, 2015, 2016.
#
msgid ""
msgstr ""
"Project-Id-Version: metacity master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2015-03-09 23:13+0000\n"
"PO-Revision-Date: 2015-03-10 13:28+0700\n"
"POT-Creation-Date: 2016-03-26 14:03+0000\n"
"PO-Revision-Date: 2016-03-27 07:22+0700\n"
"Last-Translator: Trần Ngọc Quân <vnwildman@gmail.com>\n"
"Language-Team: Vietnamese <gnome-vi-list@gnome.org>\n"
"Language: vi\n"
@@ -19,11 +19,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: LocFactoryEditor 1.8\n"
"X-Generator: Gtranslator 2.91.7\n"
#: ../data/50-mutter-navigation.xml.in.h:1
msgid "Navigation"
msgstr "Di chuyển"
msgstr "Điều hướng"
#: ../data/50-mutter-navigation.xml.in.h:2
msgid "Move window to workspace 1"
@@ -447,22 +447,22 @@ msgstr "Chuyển sang VT 11"
msgid "Switch to VT 12"
msgstr "Chuyển sang VT 12"
#: ../src/backends/meta-monitor-manager.c:364
#: ../src/backends/meta-monitor-manager.c:518
msgid "Built-in display"
msgstr "Màn hình tích hợp"
#: ../src/backends/meta-monitor-manager.c:391
#: ../src/backends/meta-monitor-manager.c:544
msgid "Unknown"
msgstr "Không rõ"
#: ../src/backends/meta-monitor-manager.c:393
#: ../src/backends/meta-monitor-manager.c:546
msgid "Unknown Display"
msgstr "Không hiểu màn hình"
#. TRANSLATORS: this is a monitor vendor name, followed by a
#. * size in inches, like 'Dell 15"'
#.
#: ../src/backends/meta-monitor-manager.c:401
#: ../src/backends/meta-monitor-manager.c:554
#, c-format
msgid "%s %s"
msgstr "%s %s"
@@ -477,7 +477,7 @@ msgid ""
msgstr ""
"Bộ quản lý cửa sổ đã đang chạy trên Màn hình %i trên bộ trình bày \"%s\"."
#: ../src/core/bell.c:185
#: ../src/core/bell.c:194
msgid "Bell event"
msgstr "Sự kiện chuông"
@@ -506,40 +506,44 @@ msgstr "_Chờ"
msgid "_Force Quit"
msgstr "_Buộc thoát"
#: ../src/core/display.c:562
#: ../src/core/display.c:555
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "Gặp lỗi khi mở bộ trình bày Hệ thống Cửa sổ X \"%s\".\n"
#: ../src/core/main.c:176
#: ../src/core/main.c:181
msgid "Disable connection to session manager"
msgstr "Vô hiệu hóa kết nối với bộ quản lý phiên làm việc"
#: ../src/core/main.c:182
#: ../src/core/main.c:187
msgid "Replace the running window manager"
msgstr "Thay thế bộ quản lý cửa sổ đang chạy"
#: ../src/core/main.c:188
#: ../src/core/main.c:193
msgid "Specify session management ID"
msgstr "Ghi rõ mã số quản lý phiên làm việc"
#: ../src/core/main.c:193
#: ../src/core/main.c:198
msgid "X Display to use"
msgstr "Bộ trình bày X cần dùng"
#: ../src/core/main.c:199
#: ../src/core/main.c:204
msgid "Initialize session from savefile"
msgstr "Khởi động phiên làm việc từ tập tin lưu"
#: ../src/core/main.c:205
#: ../src/core/main.c:210
msgid "Make X calls synchronous"
msgstr "Khiến các lời gọi X đồng bộ với nhau"
#: ../src/core/main.c:212
#: ../src/core/main.c:217
msgid "Run as a wayland compositor"
msgstr "Chạy như là một “wayland compositor”"
#: ../src/core/main.c:220
#: ../src/core/main.c:223
msgid "Run as a nested compositor"
msgstr "Chạy như là một “nested compositor”"
#: ../src/core/main.c:231
msgid "Run as a full display server, rather than nested"
msgstr "Chạy như là một dịch vụ hiển thị đầy đủ, thay cho lồng nhau"
@@ -567,12 +571,12 @@ msgstr "Hiển thị phiên bản"
msgid "Mutter plugin to use"
msgstr "Phần bổ sung Mutter cần dùng"
#: ../src/core/prefs.c:2004
#: ../src/core/prefs.c:1997
#, c-format
msgid "Workspace %d"
msgstr "Vùng làm việc %d"
#: ../src/core/screen.c:525
#: ../src/core/screen.c:521
#, c-format
msgid ""
"Display \"%s\" already has a window manager; try using the --replace option "
@@ -581,12 +585,12 @@ msgstr ""
"Màn hình \"%s\" đã có bộ quản lý cửa sổ rồi; hãy thử dùng tùy chọn “--"
"replace” để thay thế bộ quản lý cửa sổ đang dùng."
#: ../src/core/screen.c:607
#: ../src/core/screen.c:603
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgstr "Màn hình %d trên bộ trình bày \"%s\" không hợp lệ.\n"
#: ../src/core/util.c:118
#: ../src/core/util.c:121
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Mutter đã được biên dịch không hỗ trợ chế độ chi tiết\n"

View File

@@ -28,6 +28,7 @@
#include <meta/meta-backend.h>
#include <meta/util.h>
#include <math.h>
#include <cogl/cogl.h>
#include <clutter/clutter.h>

View File

@@ -198,6 +198,7 @@ ensure_xfixes_cursor (MetaCursorTracker *tracker)
guint8 *cursor_data;
gboolean free_cursor_data;
CoglContext *ctx;
CoglError *error = NULL;
if (tracker->xfixes_cursor)
return;
@@ -239,11 +240,17 @@ ensure_xfixes_cursor (MetaCursorTracker *tracker)
CLUTTER_CAIRO_FORMAT_ARGB32,
cursor_image->width * 4, /* stride */
cursor_data,
NULL);
&error);
if (free_cursor_data)
g_free (cursor_data);
if (error != NULL)
{
meta_warning ("Failed to allocate cursor sprite texture: %s\n", error->message);
cogl_error_free (error);
}
if (sprite != NULL)
{
MetaCursorSprite *cursor_sprite = meta_cursor_sprite_new ();

View File

@@ -136,6 +136,7 @@ meta_cursor_sprite_load_from_xcursor_image (MetaCursorSprite *self,
ClutterBackend *clutter_backend;
CoglContext *cogl_context;
CoglTexture *texture;
CoglError *error = NULL;
g_assert (self->texture == NULL);
@@ -156,10 +157,19 @@ meta_cursor_sprite_load_from_xcursor_image (MetaCursorSprite *self,
cogl_format,
rowstride,
(uint8_t *) xc_image->pixels,
NULL);
&error);
if (error)
{
meta_warning ("Failed to allocate cursor texture: %s\n", error->message);
cogl_error_free (error);
}
meta_cursor_sprite_set_texture (self, texture,
xc_image->xhot, xc_image->yhot);
cogl_object_unref (texture);
if (texture)
cogl_object_unref (texture);
meta_cursor_renderer_realize_cursor_from_xcursor (renderer, self, xc_image);
}

View File

@@ -913,23 +913,13 @@ key_is_laptop (MetaOutputKey *key)
{
/* FIXME: extend with better heuristics */
return g_str_has_prefix (key->connector, "LVDS") ||
g_str_has_prefix (key->connector, "lvds") ||
g_str_has_prefix (key->connector, "Lvds") ||
g_str_has_prefix (key->connector, "LCD") || /* some versions of fglrx, sigh */
g_str_has_prefix (key->connector, "DSI") ||
g_str_has_prefix (key->connector, "eDP");
}
static gboolean
output_is_laptop (MetaOutput *output)
{
/* FIXME: extend with better heuristics */
switch (output->connector_type)
{
case META_CONNECTOR_TYPE_eDP:
case META_CONNECTOR_TYPE_LVDS:
return TRUE;
default:
return FALSE;
}
}
static gboolean
laptop_display_is_on (MetaConfiguration *config)
{
@@ -1051,6 +1041,17 @@ apply_configuration_with_lid (MetaMonitorConfig *self,
return apply_configuration (self, config, manager);
}
gboolean
meta_monitor_config_get_is_builtin_display_on (MetaMonitorConfig *self)
{
g_return_val_if_fail (META_IS_MONITOR_CONFIG (self), FALSE);
if (self->current)
return laptop_display_is_on (self->current);
return FALSE;
}
gboolean
meta_monitor_config_apply_stored (MetaMonitorConfig *self,
MetaMonitorManager *manager)
@@ -1092,7 +1093,7 @@ find_primary_output (MetaOutput *outputs,
for (i = 0; i < n_outputs; i++)
{
if (output_is_laptop (&outputs[i]))
if (meta_output_is_laptop (&outputs[i]))
return i;
}
@@ -1554,18 +1555,19 @@ meta_monitor_config_restore_previous (MetaMonitorConfig *self,
/* The user chose to restore the previous configuration. In this
* case, restore the previous configuration. */
MetaConfiguration *prev_config = config_ref (self->previous);
apply_configuration (self, prev_config, manager);
gboolean ok = apply_configuration (self, prev_config, manager);
config_unref (prev_config);
/* After this, self->previous contains the rejected configuration.
* Since it was rejected, nuke it. */
g_clear_pointer (&self->previous, (GDestroyNotify) config_unref);
if (ok)
return;
}
else
{
if (!meta_monitor_config_apply_stored (self, manager))
meta_monitor_config_make_default (self, manager);
}
if (!meta_monitor_config_apply_stored (self, manager))
meta_monitor_config_make_default (self, manager);
}
static void
@@ -2029,7 +2031,11 @@ meta_monitor_config_assign_crtcs (MetaConfiguration *config,
all_outputs = meta_monitor_manager_get_outputs (manager,
&n_outputs);
g_assert (n_outputs == config->n_outputs);
if (n_outputs != config->n_outputs)
{
g_hash_table_destroy (assignment.info);
return FALSE;
}
for (i = 0; i < n_outputs; i++)
{

View File

@@ -49,4 +49,6 @@ void meta_monitor_config_make_persistent (MetaMonitorConfig *confi
void meta_monitor_config_restore_previous (MetaMonitorConfig *config,
MetaMonitorManager *manager);
gboolean meta_monitor_config_get_is_builtin_display_on (MetaMonitorConfig *config);
#endif /* META_MONITOR_CONFIG_H */

View File

@@ -398,6 +398,7 @@ void meta_monitor_manager_confirm_configuration (MetaMonitorManag
void meta_output_parse_edid (MetaOutput *output,
GBytes *edid);
gboolean meta_output_is_laptop (MetaOutput *output);
void meta_crtc_info_free (MetaCRTCInfo *info);
void meta_output_info_free (MetaOutputInfo *info);

View File

@@ -511,14 +511,8 @@ make_display_name (MetaMonitorManager *manager,
g_autofree char *inches = NULL;
g_autofree char *vendor_name = NULL;
switch (output->connector_type)
{
case META_CONNECTOR_TYPE_LVDS:
case META_CONNECTOR_TYPE_eDP:
if (meta_output_is_laptop (output))
return g_strdup (_("Built-in display"));
default:
break;
}
if (output->width_mm > 0 && output->height_mm > 0)
{
@@ -1464,6 +1458,21 @@ meta_output_parse_edid (MetaOutput *meta_output,
meta_output->serial = g_strdup ("unknown");
}
gboolean
meta_output_is_laptop (MetaOutput *output)
{
/* FIXME: extend with better heuristics */
switch (output->connector_type)
{
case META_CONNECTOR_TYPE_eDP:
case META_CONNECTOR_TYPE_LVDS:
case META_CONNECTOR_TYPE_DSI:
return TRUE;
default:
return FALSE;
}
}
void
meta_monitor_manager_on_hotplug (MetaMonitorManager *manager)
{
@@ -1590,3 +1599,11 @@ meta_monitor_manager_get_monitor_at_point (MetaMonitorManager *manager,
return -1;
}
gboolean
meta_monitor_manager_get_is_builtin_display_on (MetaMonitorManager *manager)
{
g_return_val_if_fail (META_IS_MONITOR_MANAGER (manager), FALSE);
return meta_monitor_config_get_is_builtin_display_on (manager->config);
}

View File

@@ -152,6 +152,7 @@ file_loaded (GObject *source_object,
{
MetaBackgroundImage *image = META_BACKGROUND_IMAGE (source_object);
GError *error = NULL;
CoglError *catch_error = NULL;
GTask *task;
CoglTexture *texture;
GdkPixbuf *pixbuf;
@@ -186,9 +187,10 @@ file_loaded (GObject *source_object,
has_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
row_stride,
pixels, 0,
NULL))
&catch_error))
{
g_warning ("Failed to create texture for background");
cogl_error_free (catch_error);
cogl_object_unref (texture);
}

View File

@@ -17,6 +17,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include <meta/util.h>
#include <meta/meta-background.h>
#include <meta/meta-background-image.h>
#include "meta-background-private.h"
@@ -542,6 +543,7 @@ ensure_color_texture (MetaBackground *self)
{
ClutterBackend *backend = clutter_get_default_backend ();
CoglContext *ctx = clutter_backend_get_cogl_context (backend);
CoglError *error = NULL;
uint8_t pixels[6];
int width, height;
@@ -582,7 +584,13 @@ ensure_color_texture (MetaBackground *self)
COGL_PIXEL_FORMAT_RGB_888,
width * 3,
pixels,
NULL));
&error));
if (error != NULL)
{
meta_warning ("Failed to allocate color texture: %s\n", error->message);
cogl_error_free (error);
}
}
}

View File

@@ -27,6 +27,7 @@
#include <string.h>
#include <meta/meta-shadow-factory.h>
#include <meta/util.h>
#include "cogl-utils.h"
#include "region-utils.h"
@@ -707,6 +708,7 @@ make_shadow (MetaShadow *shadow,
{
ClutterBackend *backend = clutter_get_default_backend ();
CoglContext *ctx = clutter_backend_get_cogl_context (backend);
CoglError *error = NULL;
int d = get_box_filter_size (shadow->key.radius);
int spread = get_shadow_spread (shadow->key.radius);
cairo_rectangle_int_t extents;
@@ -804,7 +806,13 @@ make_shadow (MetaShadow *shadow,
(buffer +
(y_offset - shadow->outer_border_top) * buffer_width +
(x_offset - shadow->outer_border_left)),
NULL));
&error));
if (error)
{
meta_warning ("Failed to allocate shadow texture: %s\n", error->message);
cogl_error_free (error);
}
cairo_region_destroy (row_convolve_region);
cairo_region_destroy (column_convolve_region);

View File

@@ -136,7 +136,8 @@ meta_surface_actor_wayland_get_subsurface_rect (MetaSurfaceActorWayland *self,
MetaRectangle *rect)
{
MetaWaylandSurface *surface = meta_surface_actor_wayland_get_surface (self);
CoglTexture *texture = surface->buffer->texture;
MetaWaylandBuffer *buffer = meta_wayland_surface_get_buffer (surface);
CoglTexture *texture = buffer->texture;
MetaWindow *toplevel_window;
int monitor_scale;
float x, y;

View File

@@ -102,8 +102,7 @@ detach_pixmap (MetaSurfaceActorX11 *self)
priv->pixmap = None;
meta_error_trap_pop (display);
cogl_object_unref (priv->texture);
priv->texture = NULL;
g_clear_pointer (&priv->texture, cogl_object_unref);
}
static void
@@ -114,14 +113,20 @@ set_pixmap (MetaSurfaceActorX11 *self,
CoglContext *ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
MetaShapedTexture *stex = meta_surface_actor_get_texture (META_SURFACE_ACTOR (self));
CoglError *error = NULL;
CoglTexture *texture;
g_assert (priv->pixmap == None);
priv->pixmap = pixmap;
texture = COGL_TEXTURE (cogl_texture_pixmap_x11_new (ctx, priv->pixmap, FALSE, NULL));
texture = COGL_TEXTURE (cogl_texture_pixmap_x11_new (ctx, priv->pixmap, FALSE, &error));
if (G_UNLIKELY (!cogl_texture_pixmap_x11_is_using_tfp_extension (COGL_TEXTURE_PIXMAP_X11 (texture))))
if (error != NULL)
{
g_warning ("Failed to allocate stex texture: %s", error->message);
cogl_error_free (error);
}
else if (G_UNLIKELY (!cogl_texture_pixmap_x11_is_using_tfp_extension (COGL_TEXTURE_PIXMAP_X11 (texture))))
g_warning ("NOTE: Not using GLX TFP!\n");
priv->texture = texture;

View File

@@ -1752,9 +1752,17 @@ build_and_scan_frame_mask (MetaWindowActor *self,
}
else
{
CoglError *error = NULL;
mask_texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx, tex_width, tex_height,
COGL_PIXEL_FORMAT_A_8,
stride, mask_data, NULL));
stride, mask_data, &error));
if (error)
{
g_warning ("Failed to allocate mask texture: %s", error->message);
cogl_error_free (error);
}
}
meta_shaped_texture_set_mask_texture (stex, mask_texture);

View File

@@ -94,8 +94,11 @@ typedef struct
GHashTable *key_bindings_index;
xkb_mod_mask_t ignored_modifier_mask;
xkb_mod_mask_t hyper_mask;
xkb_mod_mask_t virtual_hyper_mask;
xkb_mod_mask_t super_mask;
xkb_mod_mask_t virtual_super_mask;
xkb_mod_mask_t meta_mask;
xkb_mod_mask_t virtual_meta_mask;
MetaKeyCombo overlay_key_combo;
MetaResolvedKeyCombo overlay_resolved_key_combo;
gboolean overlay_key_only_pressed;

View File

@@ -185,16 +185,18 @@ reload_modmap (MetaKeyBindingManager *keys)
struct xkb_keymap *keymap = meta_backend_get_keymap (backend);
struct xkb_state *scratch_state;
xkb_mod_mask_t scroll_lock_mask;
xkb_mod_mask_t dummy_mask;
/* Modifiers to find. */
struct {
const char *name;
xkb_mod_mask_t *mask_p;
xkb_mod_mask_t *virtual_mask_p;
} mods[] = {
{ "ScrollLock", &scroll_lock_mask },
{ "Meta", &keys->meta_mask },
{ "Hyper", &keys->hyper_mask },
{ "Super", &keys->super_mask },
{ "ScrollLock", &scroll_lock_mask, &dummy_mask },
{ "Meta", &keys->meta_mask, &keys->virtual_meta_mask },
{ "Hyper", &keys->hyper_mask, &keys->virtual_hyper_mask },
{ "Super", &keys->super_mask, &keys->virtual_super_mask },
};
scratch_state = xkb_state_new (keymap);
@@ -203,6 +205,7 @@ reload_modmap (MetaKeyBindingManager *keys)
for (i = 0; i < G_N_ELEMENTS (mods); i++)
{
xkb_mod_mask_t *mask_p = mods[i].mask_p;
xkb_mod_mask_t *virtual_mask_p = mods[i].virtual_mask_p;
xkb_mod_index_t idx = xkb_keymap_mod_get_index (keymap, mods[i].name);
if (idx != XKB_MOD_INVALID)
@@ -210,9 +213,13 @@ reload_modmap (MetaKeyBindingManager *keys)
xkb_mod_mask_t vmodmask = (1 << idx);
xkb_state_update_mask (scratch_state, vmodmask, 0, 0, 0, 0, 0);
*mask_p = xkb_state_serialize_mods (scratch_state, XKB_STATE_MODS_DEPRESSED) & ~vmodmask;
*virtual_mask_p = vmodmask;
}
else
*mask_p = 0;
{
*mask_p = 0;
*virtual_mask_p = 0;
}
}
xkb_state_unref (scratch_state);
@@ -897,6 +904,9 @@ meta_change_button_grab (MetaKeyBindingManager *keys,
int button,
int modmask)
{
if (meta_is_wayland_compositor ())
return;
MetaBackendX11 *backend = META_BACKEND_X11 (meta_get_backend ());
Display *xdisplay = meta_backend_x11_get_xdisplay (backend);
@@ -969,9 +979,6 @@ meta_display_grab_window_buttons (MetaDisplay *display,
{
MetaKeyBindingManager *keys = &display->key_binding_manager;
if (meta_is_wayland_compositor ())
return;
/* Grab Alt + button1 for moving window.
* Grab Alt + button2 for resizing window.
* Grab Alt + button3 for popping up window menu.
@@ -1008,9 +1015,6 @@ meta_display_ungrab_window_buttons (MetaDisplay *display,
{
MetaKeyBindingManager *keys = &display->key_binding_manager;
if (meta_is_wayland_compositor ())
return;
if (keys->window_grab_modifiers == 0)
return;
@@ -1037,9 +1041,6 @@ meta_display_grab_focus_window_button (MetaDisplay *display,
{
MetaKeyBindingManager *keys = &display->key_binding_manager;
if (meta_is_wayland_compositor ())
return;
/* Grab button 1 for activating unfocused windows */
meta_verbose ("Grabbing unfocused window buttons for %s\n", window->desc);
@@ -1079,9 +1080,6 @@ meta_display_ungrab_focus_window_button (MetaDisplay *display,
{
MetaKeyBindingManager *keys = &display->key_binding_manager;
if (meta_is_wayland_compositor ())
return;
meta_verbose ("Ungrabbing unfocused window buttons for %s\n", window->desc);
if (!window->have_focus_click_grab)
@@ -1161,6 +1159,9 @@ meta_change_keygrab (MetaKeyBindingManager *keys,
XISetMask (mask.mask, XI_KeyPress);
XISetMask (mask.mask, XI_KeyRelease);
if (meta_is_wayland_compositor ())
return;
MetaBackendX11 *backend = META_BACKEND_X11 (meta_get_backend ());
Display *xdisplay = meta_backend_x11_get_xdisplay (backend);
@@ -1275,11 +1276,6 @@ meta_screen_change_keygrabs (MetaScreen *screen,
void
meta_screen_grab_keys (MetaScreen *screen)
{
MetaBackend *backend = meta_get_backend ();
if (!META_IS_BACKEND_X11 (backend))
return;
if (screen->keys_grabbed)
return;
@@ -1313,10 +1309,6 @@ meta_window_grab_keys (MetaWindow *window)
MetaDisplay *display = window->display;
MetaKeyBindingManager *keys = &display->key_binding_manager;
/* Under Wayland, we don't need to grab at all. */
if (meta_is_wayland_compositor ())
return;
if (window->all_keys_grabbed)
return;
@@ -1384,7 +1376,6 @@ guint
meta_display_grab_accelerator (MetaDisplay *display,
const char *accelerator)
{
MetaBackend *backend = meta_get_backend ();
MetaKeyBindingManager *keys = &display->key_binding_manager;
MetaKeyBinding *binding;
MetaKeyGrab *grab;
@@ -1408,8 +1399,7 @@ meta_display_grab_accelerator (MetaDisplay *display,
if (get_keybinding (keys, &resolved_combo))
return META_KEYBINDING_ACTION_NONE;
if (META_IS_BACKEND_X11 (backend))
meta_change_keygrab (keys, display->screen->xroot, TRUE, &resolved_combo);
meta_change_keygrab (keys, display->screen->xroot, TRUE, &resolved_combo);
grab = g_new0 (MetaKeyGrab, 1);
grab->action = next_dynamic_keybinding_action ();
@@ -1434,7 +1424,6 @@ gboolean
meta_display_ungrab_accelerator (MetaDisplay *display,
guint action)
{
MetaBackend *backend = meta_get_backend ();
MetaKeyBindingManager *keys = &display->key_binding_manager;
MetaKeyBinding *binding;
MetaKeyGrab *grab;
@@ -1454,8 +1443,7 @@ meta_display_ungrab_accelerator (MetaDisplay *display,
{
guint32 index_key;
if (META_IS_BACKEND_X11 (backend))
meta_change_keygrab (keys, display->screen->xroot, FALSE, &binding->resolved_combo);
meta_change_keygrab (keys, display->screen->xroot, FALSE, &binding->resolved_combo);
index_key = key_combo_key (&binding->resolved_combo);
g_hash_table_remove (keys->key_bindings_index, GINT_TO_POINTER (index_key));
@@ -1482,6 +1470,9 @@ grab_keyboard (Window xwindow,
XISetMask (mask.mask, XI_KeyPress);
XISetMask (mask.mask, XI_KeyRelease);
if (meta_is_wayland_compositor ())
return TRUE;
/* Grab the keyboard, so we get key releases and all key
* presses
*/
@@ -1513,6 +1504,9 @@ grab_keyboard (Window xwindow,
static void
ungrab_keyboard (guint32 timestamp)
{
if (meta_is_wayland_compositor ())
return;
MetaBackendX11 *backend = META_BACKEND_X11 (meta_get_backend ());
Display *xdisplay = meta_backend_x11_get_xdisplay (backend);
@@ -1525,10 +1519,6 @@ meta_window_grab_all_keys (MetaWindow *window,
{
Window grabwindow;
gboolean retval;
MetaBackend *backend = meta_get_backend ();
if (!META_IS_BACKEND_X11 (backend))
return TRUE;
if (window->all_keys_grabbed)
return FALSE;
@@ -1590,11 +1580,6 @@ meta_display_freeze_keyboard (MetaDisplay *display, guint32 timestamp)
void
meta_display_ungrab_keyboard (MetaDisplay *display, guint32 timestamp)
{
MetaBackend *backend = meta_get_backend ();
if (!META_IS_BACKEND_X11 (backend))
return;
ungrab_keyboard (timestamp);
}

View File

@@ -1061,7 +1061,7 @@ stack_sync_to_xserver (MetaStack *stack)
for (tmp = g_list_last(stack->sorted); tmp != NULL; tmp = tmp->prev)
{
MetaWindow *w = tmp->data;
Window top_level_window;
guint64 top_level_window;
guint64 stack_id;
if (w->unmanaging)
@@ -1100,7 +1100,8 @@ stack_sync_to_xserver (MetaStack *stack)
/* The screen guard window sits above all hidden windows and acts as
* a barrier to input reaching these windows. */
g_array_append_val (x11_hidden_stack_ids, stack->screen->guard_window);
guint64 guard_window_id = stack->screen->guard_window;
g_array_append_val (x11_hidden_stack_ids, guard_window_id);
/* Sync to server */

View File

@@ -726,7 +726,7 @@ client_window_should_be_mapped (MetaWindow *window)
{
#ifdef HAVE_WAYLAND
if (window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND &&
!window->surface->buffer)
!meta_wayland_surface_get_buffer (window->surface))
return FALSE;
#endif
@@ -1554,7 +1554,7 @@ meta_window_should_be_showing (MetaWindow *window)
{
#ifdef HAVE_WAYLAND
if (window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND &&
!window->surface->buffer)
!meta_wayland_surface_get_buffer (window->surface))
return FALSE;
#endif

View File

@@ -34,4 +34,6 @@ MetaMonitorManager *meta_monitor_manager_get (void);
gint meta_monitor_manager_get_monitor_for_output (MetaMonitorManager *manager,
guint id);
gboolean meta_monitor_manager_get_is_builtin_display_on (MetaMonitorManager *manager);
#endif /* META_MONITOR_MANAGER_H */

View File

@@ -992,6 +992,7 @@ create_style_context (GType widget_type,
...)
{
GtkStyleContext *style;
GtkStateFlags state;
GtkWidgetPath *path;
const char *name;
va_list ap;
@@ -1010,6 +1011,19 @@ create_style_context (GType widget_type,
if (object_name)
gtk_widget_path_iter_set_object_name (path, -1, object_name);
state = gtk_style_context_get_state (style);
if (meta_get_locale_direction() == META_LOCALE_DIRECTION_RTL)
{
state |= GTK_STATE_FLAG_DIR_RTL;
state &= ~GTK_STATE_FLAG_DIR_LTR;
}
else
{
state |= GTK_STATE_FLAG_DIR_LTR;
state &= ~GTK_STATE_FLAG_DIR_RTL;
}
gtk_style_context_set_state (style, state);
va_start (ap, first_class);
for (name = first_class; name; name = va_arg (ap, const char *))
gtk_widget_path_iter_add_class (path, -1, name);

View File

@@ -30,6 +30,15 @@
#include <cogl/cogl-wayland-server.h>
#include <meta/util.h>
enum
{
RESOURCE_DESTROYED,
LAST_SIGNAL
};
guint signals[LAST_SIGNAL];
G_DEFINE_TYPE (MetaWaylandBuffer, meta_wayland_buffer, G_TYPE_OBJECT);
static void
@@ -40,29 +49,10 @@ meta_wayland_buffer_destroy_handler (struct wl_listener *listener,
wl_container_of (listener, buffer, destroy_listener);
buffer->resource = NULL;
wl_signal_emit (&buffer->destroy_signal, buffer);
g_signal_emit (buffer, signals[RESOURCE_DESTROYED], 0);
g_object_unref (buffer);
}
void
meta_wayland_buffer_ref_use_count (MetaWaylandBuffer *buffer)
{
g_warn_if_fail (buffer->resource);
buffer->use_count++;
}
void
meta_wayland_buffer_unref_use_count (MetaWaylandBuffer *buffer)
{
g_return_if_fail (buffer->use_count != 0);
buffer->use_count--;
if (buffer->use_count == 0 && buffer->resource)
wl_resource_queue_event (buffer->resource, WL_BUFFER_RELEASE);
}
MetaWaylandBuffer *
meta_wayland_buffer_from_resource (struct wl_resource *resource)
{
@@ -82,7 +72,6 @@ meta_wayland_buffer_from_resource (struct wl_resource *resource)
buffer = g_object_new (META_TYPE_WAYLAND_BUFFER, NULL);
buffer->resource = resource;
wl_signal_init (&buffer->destroy_signal);
buffer->destroy_listener.notify = meta_wayland_buffer_destroy_handler;
wl_resource_add_destroy_listener (resource, &buffer->destroy_listener);
}
@@ -98,7 +87,6 @@ meta_wayland_buffer_ensure_texture (MetaWaylandBuffer *buffer)
CoglTexture *texture;
struct wl_shm_buffer *shm_buffer;
g_return_val_if_fail (buffer->use_count != 0, NULL);
g_return_val_if_fail (buffer->resource, NULL);
if (buffer->texture)
@@ -134,8 +122,6 @@ meta_wayland_buffer_process_damage (MetaWaylandBuffer *buffer,
{
struct wl_shm_buffer *shm_buffer;
g_return_if_fail (buffer->use_count != 0);
shm_buffer = wl_shm_buffer_get (buffer->resource);
if (shm_buffer)
@@ -148,12 +134,19 @@ meta_wayland_buffer_process_damage (MetaWaylandBuffer *buffer,
for (i = 0; i < n_rectangles; i++)
{
CoglError *error = NULL;
cairo_rectangle_int_t rect;
cairo_region_get_rectangle (region, i, &rect);
cogl_wayland_texture_set_region_from_shm_buffer (buffer->texture,
rect.x, rect.y, rect.width, rect.height,
shm_buffer,
rect.x, rect.y, 0, NULL);
rect.x, rect.y, 0, &error);
if (error)
{
meta_warning ("Failed to set texture region: %s\n", error->message);
cogl_error_free (error);
}
}
wl_shm_buffer_end_access (shm_buffer);
@@ -181,4 +174,11 @@ meta_wayland_buffer_class_init (MetaWaylandBufferClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = meta_wayland_buffer_finalize;
signals[RESOURCE_DESTROYED] = g_signal_new ("resource-destroyed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
}

View File

@@ -36,11 +36,9 @@ struct _MetaWaylandBuffer
GObject parent;
struct wl_resource *resource;
struct wl_signal destroy_signal;
struct wl_listener destroy_listener;
CoglTexture *texture;
uint32_t use_count;
};
#define META_TYPE_WAYLAND_BUFFER (meta_wayland_buffer_get_type ())
@@ -48,8 +46,6 @@ G_DECLARE_FINAL_TYPE (MetaWaylandBuffer, meta_wayland_buffer,
META, WAYLAND_BUFFER, GObject);
MetaWaylandBuffer * meta_wayland_buffer_from_resource (struct wl_resource *resource);
void meta_wayland_buffer_ref_use_count (MetaWaylandBuffer *buffer);
void meta_wayland_buffer_unref_use_count (MetaWaylandBuffer *buffer);
CoglTexture * meta_wayland_buffer_ensure_texture (MetaWaylandBuffer *buffer);
void meta_wayland_buffer_process_damage (MetaWaylandBuffer *buffer,
cairo_region_t *region);

View File

@@ -1424,9 +1424,10 @@ meta_wayland_drag_dest_focus_out (MetaWaylandDataDevice *data_device,
{
MetaWaylandDragGrab *grab = data_device->current_grab;
if (grab->drag_focus_data_device)
wl_data_device_send_leave (grab->drag_focus_data_device);
if (!grab->drag_focus_data_device)
return;
wl_data_device_send_leave (grab->drag_focus_data_device);
wl_list_remove (&grab->drag_focus_listener.link);
grab->drag_focus_data_device = NULL;
}
@@ -1439,6 +1440,9 @@ meta_wayland_drag_dest_motion (MetaWaylandDataDevice *data_device,
MetaWaylandDragGrab *grab = data_device->current_grab;
wl_fixed_t sx, sy;
if (!grab->drag_focus_data_device)
return;
meta_wayland_pointer_get_relative_coordinates (grab->generic.pointer,
grab->drag_focus,
&sx, &sy);
@@ -1453,6 +1457,9 @@ meta_wayland_drag_dest_drop (MetaWaylandDataDevice *data_device,
{
MetaWaylandDragGrab *grab = data_device->current_grab;
if (!grab->drag_focus_data_device)
return;
wl_data_device_send_drop (grab->drag_focus_data_device);
}

View File

@@ -58,6 +58,7 @@
#include <sys/mman.h>
#include <clutter/evdev/clutter-evdev.h>
#include "display-private.h"
#include "backends/meta-backend-private.h"
#include "meta-wayland-private.h"
@@ -279,14 +280,66 @@ notify_key (MetaWaylandKeyboard *keyboard,
return keyboard->grab->interface->key (keyboard->grab, event);
}
static xkb_mod_mask_t
add_vmod (xkb_mod_mask_t mask,
xkb_mod_mask_t mod,
xkb_mod_mask_t vmod,
xkb_mod_mask_t *added)
{
if ((mask & mod) && !(mod & *added))
{
mask |= vmod;
*added |= mod;
}
return mask;
}
static xkb_mod_mask_t
add_virtual_mods (xkb_mod_mask_t mask)
{
MetaKeyBindingManager *keys = &(meta_get_display ()->key_binding_manager);
xkb_mod_mask_t added;
guint i;
/* Order is important here: if multiple vmods share the same real
modifier we only want to add the first. */
struct {
xkb_mod_mask_t mod;
xkb_mod_mask_t vmod;
} mods[] = {
{ keys->super_mask, keys->virtual_super_mask },
{ keys->hyper_mask, keys->virtual_hyper_mask },
{ keys->meta_mask, keys->virtual_meta_mask },
};
added = 0;
for (i = 0; i < G_N_ELEMENTS (mods); ++i)
mask = add_vmod (mask, mods[i].mod, mods[i].vmod, &added);
return mask;
}
static void
keyboard_send_modifiers (MetaWaylandKeyboard *keyboard,
struct wl_resource *resource,
uint32_t serial)
{
struct xkb_state *state = keyboard->xkb_info.state;
xkb_mod_mask_t depressed, latched, locked;
depressed = add_virtual_mods (xkb_state_serialize_mods (state, XKB_STATE_MODS_DEPRESSED));
latched = add_virtual_mods (xkb_state_serialize_mods (state, XKB_STATE_MODS_LATCHED));
locked = add_virtual_mods (xkb_state_serialize_mods (state, XKB_STATE_MODS_LOCKED));
wl_keyboard_send_modifiers (resource, serial, depressed, latched, locked,
xkb_state_serialize_layout (state, XKB_STATE_LAYOUT_EFFECTIVE));
}
static void
meta_wayland_keyboard_broadcast_modifiers (MetaWaylandKeyboard *keyboard)
{
struct xkb_state *state;
struct wl_resource *resource;
struct wl_list *l;
state = keyboard->xkb_info.state;
l = &keyboard->focus_resource_list;
if (!wl_list_empty (l))
@@ -294,14 +347,7 @@ meta_wayland_keyboard_broadcast_modifiers (MetaWaylandKeyboard *keyboard)
uint32_t serial = wl_display_next_serial (keyboard->display);
wl_resource_for_each (resource, l)
{
wl_keyboard_send_modifiers (resource,
serial,
xkb_state_serialize_mods (state, XKB_STATE_MODS_DEPRESSED),
xkb_state_serialize_mods (state, XKB_STATE_MODS_LATCHED),
xkb_state_serialize_mods (state, XKB_STATE_MODS_LOCKED),
xkb_state_serialize_layout (state, XKB_STATE_LAYOUT_EFFECTIVE));
}
keyboard_send_modifiers (keyboard, resource, serial);
}
}
@@ -509,6 +555,13 @@ meta_wayland_keyboard_update (MetaWaylandKeyboard *keyboard,
{
gboolean is_press = event->type == CLUTTER_KEY_PRESS;
/* If we get a key event but still have pending modifier state
* changes from a previous event that didn't get cleared, we need to
* send that state right away so that the new key event can be
* interpreted by clients correctly modified. */
if (keyboard->mods_changed)
notify_modifiers (keyboard);
keyboard->mods_changed = xkb_state_update_key (keyboard->xkb_info.state,
event->hardware_keycode,
is_press ? XKB_KEY_DOWN : XKB_KEY_UP);
@@ -602,7 +655,6 @@ broadcast_focus (MetaWaylandKeyboard *keyboard,
struct wl_resource *resource)
{
struct wl_array fake_keys;
struct xkb_state *state = keyboard->xkb_info.state;
/* We never want to send pressed keys to wayland clients on
* enter. The protocol says that we should send them, presumably so
@@ -622,11 +674,7 @@ broadcast_focus (MetaWaylandKeyboard *keyboard,
*/
wl_array_init (&fake_keys);
wl_keyboard_send_modifiers (resource, keyboard->focus_serial,
xkb_state_serialize_mods (state, XKB_STATE_MODS_DEPRESSED),
xkb_state_serialize_mods (state, XKB_STATE_MODS_LATCHED),
xkb_state_serialize_mods (state, XKB_STATE_MODS_LOCKED),
xkb_state_serialize_layout (state, XKB_STATE_LAYOUT_EFFECTIVE));
keyboard_send_modifiers (keyboard, resource, keyboard->focus_serial);
wl_keyboard_send_enter (resource, keyboard->focus_serial,
keyboard->focus_surface->resource,
&fake_keys);

View File

@@ -80,6 +80,8 @@ struct _MetaWaylandSurfaceRoleCursor
int hot_x;
int hot_y;
MetaCursorSprite *cursor_sprite;
MetaWaylandBuffer *buffer;
};
G_DEFINE_TYPE (MetaWaylandSurfaceRoleCursor,
@@ -966,24 +968,29 @@ update_cursor_sprite_texture (MetaWaylandSurface *surface)
MetaWaylandSurfaceRoleCursor *cursor_role =
META_WAYLAND_SURFACE_ROLE_CURSOR (surface->role);
MetaCursorSprite *cursor_sprite = cursor_role->cursor_sprite;
MetaWaylandBuffer *buffer = meta_wayland_surface_get_buffer (surface);
g_return_if_fail (!surface->buffer || surface->buffer->texture);
g_return_if_fail (!buffer || buffer->texture);
if (surface->buffer)
if (buffer)
{
meta_cursor_sprite_set_texture (cursor_sprite,
surface->buffer->texture,
buffer->texture,
cursor_role->hot_x * surface->scale,
cursor_role->hot_y * surface->scale);
if (surface->using_buffer)
if (cursor_role->buffer)
{
struct wl_resource *buffer;
struct wl_resource *buffer_resource;
buffer = surface->buffer->resource;
g_assert (cursor_role->buffer == buffer);
buffer_resource = buffer->resource;
meta_cursor_renderer_realize_cursor_from_wl_buffer (cursor_renderer,
cursor_sprite,
buffer);
buffer_resource);
meta_wayland_surface_unref_buffer_use_count (surface);
g_clear_object (&cursor_role->buffer);
}
}
else
@@ -1131,8 +1138,7 @@ meta_wayland_pointer_can_grab_surface (MetaWaylandPointer *pointer,
MetaWaylandSurface *surface,
uint32_t serial)
{
return (pointer->button_count > 0 &&
pointer->grab_serial == serial &&
return (pointer->grab_serial == serial &&
pointer->focus_surface == surface);
}
@@ -1259,18 +1265,53 @@ meta_wayland_pointer_get_seat (MetaWaylandPointer *pointer)
static void
cursor_surface_role_assigned (MetaWaylandSurfaceRole *surface_role)
{
MetaWaylandSurfaceRoleCursor *cursor_role =
META_WAYLAND_SURFACE_ROLE_CURSOR (surface_role);
MetaWaylandSurface *surface =
meta_wayland_surface_role_get_surface (surface_role);
MetaWaylandBuffer *buffer = meta_wayland_surface_get_buffer (surface);
if (buffer)
{
g_set_object (&cursor_role->buffer, buffer);
meta_wayland_surface_ref_buffer_use_count (surface);
}
meta_wayland_surface_queue_pending_frame_callbacks (surface);
}
static void
cursor_surface_role_pre_commit (MetaWaylandSurfaceRole *surface_role,
MetaWaylandPendingState *pending)
{
MetaWaylandSurfaceRoleCursor *cursor_role =
META_WAYLAND_SURFACE_ROLE_CURSOR (surface_role);
MetaWaylandSurface *surface =
meta_wayland_surface_role_get_surface (surface_role);
meta_wayland_surface_queue_pending_frame_callbacks (surface);
if (pending->newly_attached && cursor_role->buffer)
{
meta_wayland_surface_unref_buffer_use_count (surface);
g_clear_object (&cursor_role->buffer);
}
}
static void
cursor_surface_role_commit (MetaWaylandSurfaceRole *surface_role,
MetaWaylandPendingState *pending)
{
MetaWaylandSurfaceRoleCursor *cursor_role =
META_WAYLAND_SURFACE_ROLE_CURSOR (surface_role);
MetaWaylandSurface *surface =
meta_wayland_surface_role_get_surface (surface_role);
MetaWaylandBuffer *buffer = meta_wayland_surface_get_buffer (surface);
if (pending->newly_attached)
{
g_set_object (&cursor_role->buffer, buffer);
if (cursor_role->buffer)
meta_wayland_surface_ref_buffer_use_count (surface);
}
meta_wayland_surface_queue_pending_state_frame_callbacks (surface, pending);
@@ -1325,6 +1366,12 @@ cursor_surface_role_dispose (GObject *object)
g_clear_object (&cursor_role->cursor_sprite);
if (cursor_role->buffer)
{
meta_wayland_surface_unref_buffer_use_count (surface);
g_clear_object (&cursor_role->buffer);
}
G_OBJECT_CLASS (meta_wayland_surface_role_cursor_parent_class)->dispose (object);
}
@@ -1341,6 +1388,7 @@ meta_wayland_surface_role_cursor_class_init (MetaWaylandSurfaceRoleCursorClass *
GObjectClass *object_class = G_OBJECT_CLASS (klass);
surface_role_class->assigned = cursor_surface_role_assigned;
surface_role_class->pre_commit = cursor_surface_role_pre_commit;
surface_role_class->commit = cursor_surface_role_commit;
surface_role_class->is_on_output = cursor_surface_role_is_on_output;

View File

@@ -374,10 +374,11 @@ meta_wayland_seat_set_input_focus (MetaWaylandSeat *seat,
gboolean
meta_wayland_seat_get_grab_info (MetaWaylandSeat *seat,
MetaWaylandSurface *surface,
uint32_t serial,
gfloat *x,
gfloat *y)
MetaWaylandSurface *surface,
uint32_t serial,
gboolean require_pressed,
gfloat *x,
gfloat *y)
{
ClutterEventSequence *sequence = NULL;
gboolean can_grab_surface = FALSE;
@@ -391,7 +392,8 @@ meta_wayland_seat_get_grab_info (MetaWaylandSeat *seat,
}
else
{
if ((seat->capabilities & WL_SEAT_CAPABILITY_POINTER) != 0)
if ((seat->capabilities & WL_SEAT_CAPABILITY_POINTER) != 0 &&
(!require_pressed || seat->pointer.button_count > 0))
can_grab_surface = meta_wayland_pointer_can_grab_surface (&seat->pointer, surface, serial);
if (can_grab_surface)

View File

@@ -60,10 +60,11 @@ void meta_wayland_seat_set_input_focus (MetaWaylandSeat *seat,
void meta_wayland_seat_repick (MetaWaylandSeat *seat);
gboolean meta_wayland_seat_get_grab_info (MetaWaylandSeat *seat,
MetaWaylandSurface *surface,
uint32_t serial,
gfloat *x,
gfloat *y);
MetaWaylandSurface *surface,
uint32_t serial,
gboolean require_pressed,
gfloat *x,
gfloat *y);
gboolean meta_wayland_seat_can_popup (MetaWaylandSeat *seat,
uint32_t serial);

View File

@@ -140,6 +140,10 @@ G_DEFINE_TYPE (MetaWaylandSurfaceRoleDND,
static void
meta_wayland_surface_role_assigned (MetaWaylandSurfaceRole *surface_role);
static void
meta_wayland_surface_role_pre_commit (MetaWaylandSurfaceRole *surface_role,
MetaWaylandPendingState *pending);
static void
meta_wayland_surface_role_commit (MetaWaylandSurfaceRole *surface_role,
MetaWaylandPendingState *pending);
@@ -163,6 +167,13 @@ meta_wayland_surface_assign_role (MetaWaylandSurface *surface,
meta_wayland_surface_role_assigned (surface->role);
/* Release the use count held on behalf of the just assigned role. */
if (surface->unassigned.buffer)
{
meta_wayland_surface_unref_buffer_use_count (surface);
g_clear_object (&surface->unassigned.buffer);
}
return TRUE;
}
else if (G_OBJECT_TYPE (surface->role) != role_type)
@@ -175,56 +186,29 @@ meta_wayland_surface_assign_role (MetaWaylandSurface *surface,
}
}
static void
surface_use_buffer (MetaWaylandSurface *surface)
{
g_return_if_fail (!surface->using_buffer);
meta_wayland_buffer_ref_use_count (surface->buffer);
surface->using_buffer = TRUE;
}
static void
surface_stop_using_buffer (MetaWaylandSurface *surface)
{
if (!surface->using_buffer)
return;
meta_wayland_buffer_unref_use_count (surface->buffer);
surface->using_buffer = FALSE;
}
static void
surface_set_buffer (MetaWaylandSurface *surface,
MetaWaylandBuffer *buffer)
{
if (surface->buffer == buffer)
return;
if (surface->buffer)
surface_stop_using_buffer (surface);
g_set_object (&surface->buffer, buffer);
}
static void
surface_process_damage (MetaWaylandSurface *surface,
cairo_region_t *region)
{
MetaWaylandBuffer *buffer = surface->buffer_ref.buffer;
unsigned int buffer_width;
unsigned int buffer_height;
cairo_rectangle_int_t surface_rect;
cairo_region_t *scaled_region;
int i, n_rectangles;
if (!surface->buffer)
/* If the client destroyed the buffer it attached before committing, but
* still posted damage, or posted damage without any buffer, don't try to
* process it on the non-existing buffer.
*/
if (!buffer)
return;
/* Intersect the damage region with the surface region before scaling in
* order to avoid integer overflow when scaling a damage region is too large
* (for example INT32_MAX which mesa passes). */
buffer_width = cogl_texture_get_width (surface->buffer->texture);
buffer_height = cogl_texture_get_height (surface->buffer->texture);
buffer_width = cogl_texture_get_width (buffer->texture);
buffer_height = cogl_texture_get_height (buffer->texture);
surface_rect = (cairo_rectangle_int_t) {
.width = buffer_width / surface->scale,
.height = buffer_height / surface->scale,
@@ -236,7 +220,7 @@ surface_process_damage (MetaWaylandSurface *surface,
scaled_region = meta_region_scale (region, surface->scale);
/* First update the buffer. */
meta_wayland_buffer_process_damage (surface->buffer, scaled_region);
meta_wayland_buffer_process_damage (buffer, scaled_region);
/* Now damage the actor. The actor expects damage in the unscaled texture
* coordinate space, i.e. same as the buffer. */
@@ -290,7 +274,7 @@ calculate_surface_window_geometry (MetaWaylandSurface *surface,
if (!CLUTTER_ACTOR_IS_VISIBLE (CLUTTER_ACTOR (surface_actor)))
return;
if (!surface->buffer)
if (!surface->buffer_ref.buffer)
return;
meta_surface_actor_wayland_get_subsurface_rect (surface_actor,
@@ -326,6 +310,36 @@ destroy_window (MetaWaylandSurface *surface)
g_assert (surface->window == NULL);
}
MetaWaylandBuffer *
meta_wayland_surface_get_buffer (MetaWaylandSurface *surface)
{
return surface->buffer_ref.buffer;
}
void
meta_wayland_surface_ref_buffer_use_count (MetaWaylandSurface *surface)
{
g_return_if_fail (surface->buffer_ref.buffer);
g_warn_if_fail (surface->buffer_ref.buffer->resource);
surface->buffer_ref.use_count++;
}
void
meta_wayland_surface_unref_buffer_use_count (MetaWaylandSurface *surface)
{
MetaWaylandBuffer *buffer = surface->buffer_ref.buffer;
g_return_if_fail (surface->buffer_ref.use_count != 0);
surface->buffer_ref.use_count--;
g_return_if_fail (buffer);
if (surface->buffer_ref.use_count == 0 && buffer->resource)
wl_resource_queue_event (buffer->resource, WL_BUFFER_RELEASE);
}
static void
queue_surface_actor_frame_callbacks (MetaWaylandSurface *surface,
MetaWaylandPendingState *pending)
@@ -344,6 +358,7 @@ toplevel_surface_commit (MetaWaylandSurfaceRole *surface_role,
{
MetaWaylandSurface *surface =
meta_wayland_surface_role_get_surface (surface_role);
MetaWaylandBuffer *buffer = surface->buffer_ref.buffer;
MetaWindow *window = surface->window;
queue_surface_actor_frame_callbacks (surface, pending);
@@ -359,12 +374,12 @@ toplevel_surface_commit (MetaWaylandSurfaceRole *surface_role,
/* For wl_shell, it's equivalent to an unmap. Semantics
* are poorly defined, so we can choose some that are
* convenient for us. */
if (surface->buffer && !window)
if (buffer && !window)
{
window = meta_window_wayland_new (meta_get_display (), surface);
meta_wayland_surface_set_window (surface, window);
}
else if (surface->buffer == NULL && window)
else if (buffer == NULL && window)
{
destroy_window (surface);
return;
@@ -372,7 +387,7 @@ toplevel_surface_commit (MetaWaylandSurfaceRole *surface_role,
}
else
{
if (surface->buffer == NULL)
if (buffer == NULL)
{
/* XDG surfaces can't commit NULL buffers */
wl_resource_post_error (surface->resource,
@@ -390,7 +405,7 @@ toplevel_surface_commit (MetaWaylandSurfaceRole *surface_role,
{
MetaRectangle geom = { 0 };
CoglTexture *texture = surface->buffer->texture;
CoglTexture *texture = buffer->texture;
/* Update the buffer rect immediately. */
window->buffer_rect.width = cogl_texture_get_width (texture);
window->buffer_rect.height = cogl_texture_get_height (texture);
@@ -432,11 +447,11 @@ toplevel_surface_commit (MetaWaylandSurfaceRole *surface_role,
}
static void
surface_handle_pending_buffer_destroy (struct wl_listener *listener, void *data)
pending_buffer_resource_destroyed (MetaWaylandBuffer *buffer,
MetaWaylandPendingState *pending)
{
MetaWaylandPendingState *state = wl_container_of (listener, state, buffer_destroy_listener);
state->buffer = NULL;
g_signal_handler_disconnect (buffer, pending->buffer_destroy_handler_id);
pending->buffer = NULL;
}
static void
@@ -454,7 +469,6 @@ pending_state_init (MetaWaylandPendingState *state)
state->opaque_region_set = FALSE;
state->damage = cairo_region_create ();
state->buffer_destroy_listener.notify = surface_handle_pending_buffer_destroy;
wl_list_init (&state->frame_callback_list);
state->has_new_geometry = FALSE;
@@ -470,7 +484,8 @@ pending_state_destroy (MetaWaylandPendingState *state)
g_clear_pointer (&state->opaque_region, cairo_region_destroy);
if (state->buffer)
wl_list_remove (&state->buffer_destroy_listener.link);
g_signal_handler_disconnect (state->buffer,
state->buffer_destroy_handler_id);
wl_list_for_each_safe (cb, next, &state->frame_callback_list, link)
wl_resource_destroy (cb->resource);
}
@@ -487,7 +502,7 @@ move_pending_state (MetaWaylandPendingState *from,
MetaWaylandPendingState *to)
{
if (from->buffer)
wl_list_remove (&from->buffer_destroy_listener.link);
g_signal_handler_disconnect (from->buffer, from->buffer_destroy_handler_id);
to->newly_attached = from->newly_attached;
to->buffer = from->buffer;
@@ -506,7 +521,12 @@ move_pending_state (MetaWaylandPendingState *from,
wl_list_insert_list (&to->frame_callback_list, &from->frame_callback_list);
if (to->buffer)
wl_signal_add (&to->buffer->destroy_signal, &to->buffer_destroy_listener);
{
to->buffer_destroy_handler_id =
g_signal_connect (to->buffer, "resource-destroyed",
G_CALLBACK (pending_buffer_resource_destroyed),
to);
}
pending_state_init (from);
}
@@ -554,7 +574,7 @@ subsurface_surface_commit (MetaWaylandSurfaceRole *surface_role,
queue_surface_actor_frame_callbacks (surface, pending);
if (surface->buffer != NULL)
if (surface->buffer_ref.buffer != NULL)
clutter_actor_show (CLUTTER_ACTOR (surface_actor));
else
clutter_actor_hide (CLUTTER_ACTOR (surface_actor));
@@ -651,28 +671,59 @@ static void
apply_pending_state (MetaWaylandSurface *surface,
MetaWaylandPendingState *pending)
{
gboolean release_new_buffer = FALSE;
MetaSurfaceActorWayland *surface_actor_wayland =
META_SURFACE_ACTOR_WAYLAND (surface->surface_actor);
if (surface->role)
{
meta_wayland_surface_role_pre_commit (surface->role, pending);
}
else
{
if (pending->newly_attached && surface->unassigned.buffer)
{
meta_wayland_surface_unref_buffer_use_count (surface);
g_clear_object (&surface->unassigned.buffer);
}
}
if (pending->newly_attached)
{
if (!surface->buffer && surface->window)
gboolean switched_buffer;
if (!surface->buffer_ref.buffer && surface->window)
meta_window_queue (surface->window, META_QUEUE_CALC_SHOWING);
surface_set_buffer (surface, pending->buffer);
/* Always release any previously held buffer. If the buffer held is same
* as the newly attached buffer, we still need to release it here, because
* wl_surface.attach+commit and wl_buffer.release on the attached buffer
* is symmetric.
*/
if (surface->buffer_held)
meta_wayland_surface_unref_buffer_use_count (surface);
if (pending->buffer && !surface->using_buffer)
switched_buffer = g_set_object (&surface->buffer_ref.buffer,
pending->buffer);
if (pending->buffer)
meta_wayland_surface_ref_buffer_use_count (surface);
if (switched_buffer && pending->buffer)
{
struct wl_shm_buffer *shm_buffer = wl_shm_buffer_get (pending->buffer->resource);
CoglTexture *texture;
surface_use_buffer (surface);
CoglTexture *texture = meta_wayland_buffer_ensure_texture (pending->buffer);
meta_surface_actor_wayland_set_texture (META_SURFACE_ACTOR_WAYLAND (surface->surface_actor), texture);
/* Release the buffer as soon as possible, so the client can reuse it
*/
if (shm_buffer)
release_new_buffer = TRUE;
texture = meta_wayland_buffer_ensure_texture (pending->buffer);
meta_surface_actor_wayland_set_texture (surface_actor_wayland,
texture);
}
/* If the newly attached buffer is going to be accessed directly without
* making a copy, such as an EGL buffer, mark it as in-use don't release
* it until is replaced by a subsequent wl_surface.commit or when the
* wl_surface is destroyed.
*/
surface->buffer_held = (pending->buffer &&
!wl_shm_buffer_get (pending->buffer->resource));
}
if (pending->scale > 0)
@@ -681,9 +732,6 @@ apply_pending_state (MetaWaylandSurface *surface,
if (!cairo_region_is_empty (pending->damage))
surface_process_damage (surface, pending->damage);
if (release_new_buffer)
surface_stop_using_buffer (surface);
surface->offset_x += pending->dx;
surface->offset_y += pending->dy;
@@ -721,14 +769,31 @@ apply_pending_state (MetaWaylandSurface *surface,
wl_list_insert_list (&surface->pending_frame_callback_list,
&pending->frame_callback_list);
wl_list_init (&pending->frame_callback_list);
if (pending->newly_attached)
{
/* The need to keep the wl_buffer from being released depends on what
* role the surface is given. That means we need to also keep a use
* count for wl_buffer's that are used by unassigned wl_surface's.
*/
g_set_object (&surface->unassigned.buffer, surface->buffer_ref.buffer);
if (surface->unassigned.buffer)
meta_wayland_surface_ref_buffer_use_count (surface);
}
}
/* If we have a buffer that we are not using, decrease the use count so it may
* be released if no-one else has a use-reference to it.
*/
if (pending->newly_attached &&
!surface->buffer_held && surface->buffer_ref.buffer)
meta_wayland_surface_unref_buffer_use_count (surface);
g_signal_emit (pending,
pending_state_signals[PENDING_STATE_SIGNAL_APPLIED],
0);
meta_surface_actor_wayland_sync_state (
META_SURFACE_ACTOR_WAYLAND (surface->surface_actor));
meta_surface_actor_wayland_sync_state (surface_actor_wayland);
pending_state_reset (pending);
@@ -779,7 +844,10 @@ wl_surface_attach (struct wl_client *client,
buffer = NULL;
if (surface->pending->buffer)
wl_list_remove (&surface->pending->buffer_destroy_listener.link);
{
g_signal_handler_disconnect (surface->pending->buffer,
surface->pending->buffer_destroy_handler_id);
}
surface->pending->newly_attached = TRUE;
surface->pending->buffer = buffer;
@@ -787,8 +855,12 @@ wl_surface_attach (struct wl_client *client,
surface->pending->dy = dy;
if (buffer)
wl_signal_add (&buffer->destroy_signal,
&surface->pending->buffer_destroy_listener);
{
surface->pending->buffer_destroy_handler_id =
g_signal_connect (buffer, "resource-destroyed",
G_CALLBACK (pending_buffer_resource_destroyed),
surface->pending);
}
}
static void
@@ -1110,7 +1182,16 @@ wl_surface_destructor (struct wl_resource *resource)
if (surface->window)
destroy_window (surface);
surface_set_buffer (surface, NULL);
if (surface->unassigned.buffer)
{
meta_wayland_surface_unref_buffer_use_count (surface);
g_clear_object (&surface->unassigned.buffer);
}
if (surface->buffer_held)
meta_wayland_surface_unref_buffer_use_count (surface);
g_clear_object (&surface->buffer_ref.buffer);
g_clear_object (&surface->pending);
if (surface->opaque_region)
@@ -1281,7 +1362,7 @@ xdg_surface_show_window_menu (struct wl_client *client,
MetaWaylandSeat *seat = wl_resource_get_user_data (seat_resource);
MetaWaylandSurface *surface = wl_resource_get_user_data (resource);
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, NULL, NULL))
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, FALSE, NULL, NULL))
return;
meta_window_show_menu (surface->window, META_WINDOW_MENU_WM,
@@ -1301,12 +1382,15 @@ begin_grab_op_on_surface (MetaWaylandSurface *surface,
if (grab_op == META_GRAB_OP_NONE)
return FALSE;
/* This is an input driven operation so we set frame_action to
constrain it in the same way as it would be if the window was
being moved/resized via a SSD event. */
return meta_display_begin_grab_op (window->display,
window->screen,
window,
grab_op,
TRUE, /* pointer_already_grabbed */
FALSE, /* frame_action */
TRUE, /* frame_action */
1, /* button. XXX? */
0, /* modmask */
meta_display_get_current_time_roundtrip (window->display),
@@ -1323,7 +1407,7 @@ xdg_surface_move (struct wl_client *client,
MetaWaylandSurface *surface = wl_resource_get_user_data (resource);
gfloat x, y;
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, &x, &y))
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, TRUE, &x, &y))
return;
begin_grab_op_on_surface (surface, seat, META_GRAB_OP_MOVING, x, y);
@@ -1363,7 +1447,7 @@ xdg_surface_resize (struct wl_client *client,
MetaWaylandSurface *surface = wl_resource_get_user_data (resource);
gfloat x, y;
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, &x, &y))
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, TRUE, &x, &y))
return;
begin_grab_op_on_surface (surface, seat, grab_op_for_xdg_surface_resize_edge (edges), x, y);
@@ -1706,7 +1790,7 @@ wl_shell_surface_move (struct wl_client *client,
MetaWaylandSurface *surface = wl_resource_get_user_data (resource);
gfloat x, y;
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, &x, &y))
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, TRUE, &x, &y))
return;
begin_grab_op_on_surface (surface, seat, META_GRAB_OP_MOVING, x, y);
@@ -1746,7 +1830,7 @@ wl_shell_surface_resize (struct wl_client *client,
MetaWaylandSurface *surface = wl_resource_get_user_data (resource);
gfloat x, y;
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, &x, &y))
if (!meta_wayland_seat_get_grab_info (seat, surface, serial, TRUE, &x, &y))
return;
begin_grab_op_on_surface (surface, seat, grab_op_for_wl_shell_surface_resize_edge (edges), x, y);
@@ -2613,6 +2697,17 @@ meta_wayland_surface_role_assigned (MetaWaylandSurfaceRole *surface_role)
META_WAYLAND_SURFACE_ROLE_GET_CLASS (surface_role)->assigned (surface_role);
}
static void
meta_wayland_surface_role_pre_commit (MetaWaylandSurfaceRole *surface_role,
MetaWaylandPendingState *pending)
{
MetaWaylandSurfaceRoleClass *klass;
klass = META_WAYLAND_SURFACE_ROLE_GET_CLASS (surface_role);
if (klass->pre_commit)
klass->pre_commit (surface_role, pending);
}
static void
meta_wayland_surface_role_commit (MetaWaylandSurfaceRole *surface_role,
MetaWaylandPendingState *pending)
@@ -2759,10 +2854,10 @@ meta_wayland_surface_calculate_input_region (MetaWaylandSurface *surface)
cairo_rectangle_int_t buffer_rect;
CoglTexture *texture;
if (!surface->buffer)
if (!surface->buffer_ref.buffer)
return NULL;
texture = surface->buffer->texture;
texture = surface->buffer_ref.buffer->texture;
buffer_rect = (cairo_rectangle_int_t) {
.width = cogl_texture_get_width (texture) / surface->scale,
.height = cogl_texture_get_height (texture) / surface->scale,

View File

@@ -56,6 +56,8 @@ struct _MetaWaylandSurfaceRoleClass
GObjectClass parent_class;
void (*assigned) (MetaWaylandSurfaceRole *surface_role);
void (*pre_commit) (MetaWaylandSurfaceRole *surface_role,
MetaWaylandPendingState *pending);
void (*commit) (MetaWaylandSurfaceRole *surface_role,
MetaWaylandPendingState *pending);
gboolean (*is_on_output) (MetaWaylandSurfaceRole *surface_role,
@@ -104,7 +106,7 @@ struct _MetaWaylandPendingState
/* wl_surface.attach */
gboolean newly_attached;
MetaWaylandBuffer *buffer;
struct wl_listener buffer_destroy_listener;
gulong buffer_destroy_handler_id;
int32_t dx;
int32_t dy;
@@ -151,8 +153,6 @@ struct _MetaWaylandSurface
MetaSurfaceActor *surface_actor;
MetaWaylandSurfaceRole *role;
MetaWindow *window;
MetaWaylandBuffer *buffer;
gboolean using_buffer;
cairo_region_t *input_region;
cairo_region_t *opaque_region;
int scale;
@@ -160,11 +160,25 @@ struct _MetaWaylandSurface
GList *subsurfaces;
GHashTable *outputs_to_destroy_notify_id;
/* Buffer reference state. */
struct {
MetaWaylandBuffer *buffer;
unsigned int use_count;
} buffer_ref;
/* Buffer renderer state. */
gboolean buffer_held;
/* List of pending frame callbacks that needs to stay queued longer than one
* commit sequence, such as when it has not yet been assigned a role.
*/
struct wl_list pending_frame_callback_list;
/* Intermediate state for when no role has been assigned. */
struct {
MetaWaylandBuffer *buffer;
} unassigned;
struct {
const MetaWaylandDragDestFuncs *funcs;
} dnd;
@@ -230,6 +244,12 @@ MetaWaylandSurface *meta_wayland_surface_create (MetaWaylandCompositor *composit
gboolean meta_wayland_surface_assign_role (MetaWaylandSurface *surface,
GType role_type);
MetaWaylandBuffer *meta_wayland_surface_get_buffer (MetaWaylandSurface *surface);
void meta_wayland_surface_ref_buffer_use_count (MetaWaylandSurface *surface);
void meta_wayland_surface_unref_buffer_use_count (MetaWaylandSurface *surface);
void meta_wayland_surface_set_window (MetaWaylandSurface *surface,
MetaWindow *window);