Compare commits
20 Commits
wip/laney/
...
3.29.91
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5f99eeb926 | ||
![]() |
e1513b6b00 | ||
![]() |
0cc3cd62ba | ||
![]() |
0f40541bb2 | ||
![]() |
db604dda89 | ||
![]() |
21ce6f96f1 | ||
![]() |
323a806d35 | ||
![]() |
84ac28cbee | ||
![]() |
2860adcf65 | ||
![]() |
2dbacfa8d6 | ||
![]() |
85e5b160ee | ||
![]() |
9510fbcbac | ||
![]() |
7c06e21e5a | ||
![]() |
1bfa20929b | ||
![]() |
bafc43ca26 | ||
![]() |
d37528f693 | ||
![]() |
37eeda0320 | ||
![]() |
acf70a3561 | ||
![]() |
24aef44baf | ||
![]() |
f7af32a3ea |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -94,6 +94,8 @@ src/xwayland-keyboard-grab-unstable-v1-protocol.c
|
||||
src/xwayland-keyboard-grab-unstable-v1-server-protocol.h
|
||||
src/tablet-unstable-v*-protocol.c
|
||||
src/tablet-unstable-v*-server-protocol.h
|
||||
src/text-input-unstable-v*-protocol.c
|
||||
src/text-input-unstable-v*-server-protocol.h
|
||||
src/keyboard-shortcuts-inhibit-unstable-v*-protocol.c
|
||||
src/keyboard-shortcuts-inhibit-unstable-v*-server-protocol.h
|
||||
src/linux-dmabuf-unstable-v*-protocol.c
|
||||
|
18
NEWS
18
NEWS
@@ -1,3 +1,21 @@
|
||||
3.29.91
|
||||
=======
|
||||
* Various crash fixes [Olivier, Iain; #255, #223]
|
||||
* Fix lock up with some DRI drivers [Alex; #127]
|
||||
* Send correct button codes from virtual evdev devices [Jonas; !190]
|
||||
* Improve grab-device clock updates on X11 [Jeff; !174]
|
||||
* Fix popups closing immediately on key down [Jonas; !180]
|
||||
* Prevent clients from modifying the shared keymap [Jonas; #784206]
|
||||
|
||||
Contributors:
|
||||
Jonas Ådahl, Andrea Azzarone, Piotr Drąg, Olivier Fourdan, Carlos Garnacho,
|
||||
Jan Grulich, Iain Lane, Alex Villacís Lasso, Jeff Smith, Daniel van Vugt
|
||||
|
||||
Translators:
|
||||
Matej Urbančič [sl], Mario Blättermann [de], Piotr Drąg [pl],
|
||||
Aurimas Černius [lt], Yi-Jyun Pan [zh_TW], Emin Tufan Çetin [tr],
|
||||
Fabio Tomat [fur], Bruce Cowan [en_GB]
|
||||
|
||||
3.29.90
|
||||
=======
|
||||
* Various crash fixes [Olivier, Jonas, Florian; #189, #70, #194, #15, #130]
|
||||
|
@@ -761,6 +761,7 @@ typedef enum { /*< prefix=CLUTTER_DRAG >*/
|
||||
* ClutterEventFlags:
|
||||
* @CLUTTER_EVENT_NONE: No flag set
|
||||
* @CLUTTER_EVENT_FLAG_SYNTHETIC: Synthetic event
|
||||
* @CLUTTER_EVENT_FLAG_REPEATED: Auto-repeated event
|
||||
*
|
||||
* Flags for the #ClutterEvent
|
||||
*
|
||||
@@ -769,7 +770,8 @@ typedef enum { /*< prefix=CLUTTER_DRAG >*/
|
||||
typedef enum { /*< flags prefix=CLUTTER_EVENT >*/
|
||||
CLUTTER_EVENT_NONE = 0,
|
||||
CLUTTER_EVENT_FLAG_SYNTHETIC = 1 << 0,
|
||||
CLUTTER_EVENT_FLAG_INPUT_METHOD = 1 << 1
|
||||
CLUTTER_EVENT_FLAG_INPUT_METHOD = 1 << 1,
|
||||
CLUTTER_EVENT_FLAG_REPEATED = 1 << 2
|
||||
} ClutterEventFlags;
|
||||
|
||||
/**
|
||||
|
@@ -313,8 +313,7 @@ start_slow_keys (ClutterEvent *event,
|
||||
SlowKeysEventPending *slow_keys_event;
|
||||
ClutterKeyEvent *key_event = (ClutterKeyEvent *) event;
|
||||
|
||||
/* Synthetic key events are for autorepeat, ignore those... */
|
||||
if (key_event->flags & CLUTTER_EVENT_FLAG_SYNTHETIC)
|
||||
if (key_event->flags & CLUTTER_EVENT_FLAG_REPEATED)
|
||||
return;
|
||||
|
||||
slow_keys_event = g_new0 (SlowKeysEventPending, 1);
|
||||
|
@@ -310,7 +310,7 @@ clutter_seat_evdev_notify_key (ClutterSeatEvdev *seat,
|
||||
else
|
||||
{
|
||||
changed_state = 0;
|
||||
clutter_event_set_flags (event, CLUTTER_EVENT_FLAG_SYNTHETIC);
|
||||
clutter_event_set_flags (event, CLUTTER_EVENT_FLAG_REPEATED);
|
||||
}
|
||||
|
||||
queue_event (event);
|
||||
|
@@ -185,6 +185,26 @@ clutter_virtual_input_device_evdev_notify_absolute_motion (ClutterVirtualInputDe
|
||||
NULL);
|
||||
}
|
||||
|
||||
static int
|
||||
translate_to_evdev_button (int clutter_button)
|
||||
{
|
||||
switch (clutter_button)
|
||||
{
|
||||
case CLUTTER_BUTTON_PRIMARY:
|
||||
return BTN_LEFT;
|
||||
case CLUTTER_BUTTON_SECONDARY:
|
||||
return BTN_RIGHT;
|
||||
case CLUTTER_BUTTON_MIDDLE:
|
||||
return BTN_MIDDLE;
|
||||
default:
|
||||
/*
|
||||
* For compatibility reasons, all additional buttons go after the old
|
||||
* 4-7 scroll ones.
|
||||
*/
|
||||
return clutter_button + (BTN_LEFT - 1) - 4;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_virtual_input_device_evdev_notify_button (ClutterVirtualInputDevice *virtual_device,
|
||||
uint64_t time_us,
|
||||
@@ -194,30 +214,33 @@ clutter_virtual_input_device_evdev_notify_button (ClutterVirtualInputDevice *vir
|
||||
ClutterVirtualInputDeviceEvdev *virtual_evdev =
|
||||
CLUTTER_VIRTUAL_INPUT_DEVICE_EVDEV (virtual_device);
|
||||
int button_count;
|
||||
int evdev_button;
|
||||
|
||||
if (time_us == CLUTTER_CURRENT_TIME)
|
||||
time_us = g_get_monotonic_time ();
|
||||
|
||||
if (get_button_type (button) != EVDEV_BUTTON_TYPE_BUTTON)
|
||||
evdev_button = translate_to_evdev_button (button);
|
||||
|
||||
if (get_button_type (evdev_button) != EVDEV_BUTTON_TYPE_BUTTON)
|
||||
{
|
||||
g_warning ("Unknown/invalid virtual device button 0x%x pressed",
|
||||
button);
|
||||
evdev_button);
|
||||
return;
|
||||
}
|
||||
|
||||
button_count = update_button_count (virtual_evdev, button, button_state);
|
||||
button_count = update_button_count (virtual_evdev, evdev_button, button_state);
|
||||
if (button_count < 0 || button_count > 1)
|
||||
{
|
||||
g_warning ("Received multiple virtual 0x%x button %s (ignoring)", button,
|
||||
g_warning ("Received multiple virtual 0x%x button %s (ignoring)", evdev_button,
|
||||
button_state == CLUTTER_BUTTON_STATE_PRESSED ? "presses" : "releases");
|
||||
update_button_count (virtual_evdev, button, 1 - button_state);
|
||||
update_button_count (virtual_evdev, evdev_button, 1 - button_state);
|
||||
return;
|
||||
}
|
||||
|
||||
clutter_seat_evdev_notify_button (virtual_evdev->seat,
|
||||
virtual_evdev->device,
|
||||
time_us,
|
||||
button,
|
||||
evdev_button,
|
||||
button_state);
|
||||
}
|
||||
|
||||
|
@@ -1271,6 +1271,9 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
|
||||
? CLUTTER_KEY_PRESS
|
||||
: CLUTTER_KEY_RELEASE;
|
||||
|
||||
if (xev->evtype == XI_KeyPress && xev->flags & XIKeyRepeat)
|
||||
clutter_event_set_flags (event, CLUTTER_EVENT_FLAG_REPEATED);
|
||||
|
||||
event->key.time = xev->time;
|
||||
event->key.stage = stage;
|
||||
_clutter_input_device_xi2_translate_state (event, &xev->mods, &xev->buttons, &xev->group);
|
||||
|
@@ -2,7 +2,7 @@ AC_PREREQ(2.62)
|
||||
|
||||
m4_define([mutter_major_version], [3])
|
||||
m4_define([mutter_minor_version], [29])
|
||||
m4_define([mutter_micro_version], [90])
|
||||
m4_define([mutter_micro_version], [91])
|
||||
|
||||
m4_define([mutter_version],
|
||||
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
||||
@@ -325,7 +325,7 @@ AS_IF([test "$have_wayland" = "yes"], [
|
||||
AC_SUBST([WAYLAND_SCANNER])
|
||||
AC_DEFINE([HAVE_WAYLAND],[1],[Define if you want to enable Wayland support])
|
||||
|
||||
PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.12],
|
||||
PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.16],
|
||||
[ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
|
||||
AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
|
||||
])
|
||||
|
@@ -26,7 +26,6 @@ XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ \
|
||||
--flag=g_sprintf:2:c-format \
|
||||
--flag=g_snprintf:3:c-format
|
||||
|
||||
|
||||
# This is the copyright holder that gets inserted into the header of the
|
||||
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
|
||||
# package. (Note that the msgstr strings, extracted from the package's
|
||||
@@ -36,6 +35,7 @@ XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ \
|
||||
# the public domain; in this case the translators are expected to disclaim
|
||||
# their copyright.
|
||||
COPYRIGHT_HOLDER = Translation copyright holder
|
||||
|
||||
# This is the email address or URL to which the translators shall report
|
||||
# bugs in the untranslated strings:
|
||||
# - Strings which are not entire sentences, see the maintainer guidelines
|
||||
@@ -50,7 +50,7 @@ COPYRIGHT_HOLDER = Translation copyright holder
|
||||
# It can be your email address, or a mailing list address where translators
|
||||
# can write to without being subscribed, or the URL of a web page through
|
||||
# which the translators can contact you.
|
||||
MSGID_BUGS_ADDRESS = http://bugzilla.gnome.org/enter_bug.cgi?product=mutter&keywords=I18N+L10N&component=general
|
||||
MSGID_BUGS_ADDRESS = https://gitlab.gnome.org/GNOME/mutter/issues
|
||||
|
||||
# This is the list of locale categories, beyond LC_MESSAGES, for which the
|
||||
# message catalogs shall be used. It is usually empty.
|
||||
|
477
po/en_GB.po
477
po/en_GB.po
@@ -5,23 +5,22 @@
|
||||
# Gareth Owen <gowen72@yahoo.com>, 2004.
|
||||
# Philip Withnall <philip@tecnocode.co.uk>, 2010.
|
||||
# Chris Leonard <cjlhomeaddress@gmail.com>, 2012.
|
||||
# Bruce Cowan <bruce@bcowan.me.uk>, 2011, 2012, 2013.
|
||||
# Bruce Cowan <bruce@bcowan.me.uk>, 2011, 2012, 2013, 2018.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mutter\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
|
||||
"product=mutter&keywords=I18N+L10N&component=general\n"
|
||||
"POT-Creation-Date: 2016-09-07 09:27+0000\n"
|
||||
"PO-Revision-Date: 2016-09-19 12:10+0200\n"
|
||||
"Last-Translator: David King <amigadave@amigadave.com>\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
|
||||
"POT-Creation-Date: 2018-07-07 09:58+0000\n"
|
||||
"PO-Revision-Date: 2018-08-19 17:43+0100\n"
|
||||
"Last-Translator: Bruce Cowan <bruce@bcowan.me.uk>\n"
|
||||
"Language-Team: British English <en@li.org>\n"
|
||||
"Language: en_GB\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Gtranslator 2.91.6\n"
|
||||
"X-Generator: Poedit 2.0.7\n"
|
||||
"X-Project-Style: gnome\n"
|
||||
|
||||
#: data/50-mutter-navigation.xml:6
|
||||
@@ -49,134 +48,118 @@ msgid "Move window to last workspace"
|
||||
msgstr "Move window to last workspace"
|
||||
|
||||
#: data/50-mutter-navigation.xml:24
|
||||
msgid "Move window one workspace to the left"
|
||||
msgstr "Move window one workspace to the left"
|
||||
|
||||
#: data/50-mutter-navigation.xml:27
|
||||
msgid "Move window one workspace to the right"
|
||||
msgstr "Move window one workspace to the right"
|
||||
|
||||
#: data/50-mutter-navigation.xml:30
|
||||
msgid "Move window one workspace up"
|
||||
msgstr "Move window one workspace up"
|
||||
|
||||
#: data/50-mutter-navigation.xml:33
|
||||
#: data/50-mutter-navigation.xml:27
|
||||
msgid "Move window one workspace down"
|
||||
msgstr "Move window one workspace down"
|
||||
|
||||
#: data/50-mutter-navigation.xml:36
|
||||
#: data/50-mutter-navigation.xml:30
|
||||
msgid "Move window one monitor to the left"
|
||||
msgstr "Move window one monitor to the left"
|
||||
|
||||
#: data/50-mutter-navigation.xml:39
|
||||
#: data/50-mutter-navigation.xml:33
|
||||
msgid "Move window one monitor to the right"
|
||||
msgstr "Move window one monitor to the right"
|
||||
|
||||
#: data/50-mutter-navigation.xml:42
|
||||
#: data/50-mutter-navigation.xml:36
|
||||
msgid "Move window one monitor up"
|
||||
msgstr "Move window one monitor up"
|
||||
|
||||
#: data/50-mutter-navigation.xml:45
|
||||
#: data/50-mutter-navigation.xml:39
|
||||
msgid "Move window one monitor down"
|
||||
msgstr "Move window one monitor down"
|
||||
|
||||
#: data/50-mutter-navigation.xml:49
|
||||
#: data/50-mutter-navigation.xml:43
|
||||
msgid "Switch applications"
|
||||
msgstr "Switch applications"
|
||||
|
||||
#: data/50-mutter-navigation.xml:54
|
||||
#: data/50-mutter-navigation.xml:48
|
||||
msgid "Switch to previous application"
|
||||
msgstr "Switch to previous application"
|
||||
|
||||
#: data/50-mutter-navigation.xml:58
|
||||
#: data/50-mutter-navigation.xml:52
|
||||
msgid "Switch windows"
|
||||
msgstr "Switch windows"
|
||||
|
||||
#: data/50-mutter-navigation.xml:63
|
||||
#: data/50-mutter-navigation.xml:57
|
||||
msgid "Switch to previous window"
|
||||
msgstr "Switch to previous window"
|
||||
|
||||
#: data/50-mutter-navigation.xml:67
|
||||
#: data/50-mutter-navigation.xml:61
|
||||
msgid "Switch windows of an application"
|
||||
msgstr "Switch windows of an application"
|
||||
|
||||
#: data/50-mutter-navigation.xml:72
|
||||
#: data/50-mutter-navigation.xml:66
|
||||
msgid "Switch to previous window of an application"
|
||||
msgstr "Switch to previous window of an application"
|
||||
|
||||
#: data/50-mutter-navigation.xml:76
|
||||
#: data/50-mutter-navigation.xml:70
|
||||
msgid "Switch system controls"
|
||||
msgstr "Switch system controls"
|
||||
|
||||
#: data/50-mutter-navigation.xml:81
|
||||
#: data/50-mutter-navigation.xml:75
|
||||
msgid "Switch to previous system control"
|
||||
msgstr "Switch to previous system control"
|
||||
|
||||
#: data/50-mutter-navigation.xml:85
|
||||
#: data/50-mutter-navigation.xml:79
|
||||
msgid "Switch windows directly"
|
||||
msgstr "Switch windows directly"
|
||||
|
||||
#: data/50-mutter-navigation.xml:90
|
||||
#: data/50-mutter-navigation.xml:84
|
||||
msgid "Switch directly to previous window"
|
||||
msgstr "Switch directly to previous window"
|
||||
|
||||
#: data/50-mutter-navigation.xml:94
|
||||
#: data/50-mutter-navigation.xml:88
|
||||
msgid "Switch windows of an app directly"
|
||||
msgstr "Switch windows of an app directly"
|
||||
|
||||
#: data/50-mutter-navigation.xml:99
|
||||
#: data/50-mutter-navigation.xml:93
|
||||
msgid "Switch directly to previous window of an app"
|
||||
msgstr "Switch directly to previous window of an app"
|
||||
|
||||
#: data/50-mutter-navigation.xml:103
|
||||
#: data/50-mutter-navigation.xml:97
|
||||
msgid "Switch system controls directly"
|
||||
msgstr "Switch system controls directly"
|
||||
|
||||
#: data/50-mutter-navigation.xml:108
|
||||
#: data/50-mutter-navigation.xml:102
|
||||
msgid "Switch directly to previous system control"
|
||||
msgstr "Switch directly to previous system control"
|
||||
|
||||
#: data/50-mutter-navigation.xml:111
|
||||
#: data/50-mutter-navigation.xml:105
|
||||
msgid "Hide all normal windows"
|
||||
msgstr "Hide all normal windows"
|
||||
|
||||
#: data/50-mutter-navigation.xml:114
|
||||
#: data/50-mutter-navigation.xml:108
|
||||
msgid "Switch to workspace 1"
|
||||
msgstr "Switch to workspace 1"
|
||||
|
||||
#: data/50-mutter-navigation.xml:117
|
||||
#: data/50-mutter-navigation.xml:111
|
||||
msgid "Switch to workspace 2"
|
||||
msgstr "Switch to workspace 2"
|
||||
|
||||
#: data/50-mutter-navigation.xml:120
|
||||
#: data/50-mutter-navigation.xml:114
|
||||
msgid "Switch to workspace 3"
|
||||
msgstr "Switch to workspace 3"
|
||||
|
||||
#: data/50-mutter-navigation.xml:123
|
||||
#: data/50-mutter-navigation.xml:117
|
||||
msgid "Switch to workspace 4"
|
||||
msgstr "Switch to workspace 4"
|
||||
|
||||
#: data/50-mutter-navigation.xml:126
|
||||
#: data/50-mutter-navigation.xml:120
|
||||
msgid "Switch to last workspace"
|
||||
msgstr "Switch to last workspace"
|
||||
|
||||
#: data/50-mutter-navigation.xml:129
|
||||
msgid "Move to workspace left"
|
||||
msgstr "Move to workspace left"
|
||||
|
||||
#: data/50-mutter-navigation.xml:132
|
||||
msgid "Move to workspace right"
|
||||
msgstr "Move to workspace right"
|
||||
|
||||
#: data/50-mutter-navigation.xml:135
|
||||
#: data/50-mutter-navigation.xml:123
|
||||
msgid "Move to workspace above"
|
||||
msgstr "Move to workspace above"
|
||||
|
||||
#: data/50-mutter-navigation.xml:138
|
||||
#: data/50-mutter-navigation.xml:126
|
||||
msgid "Move to workspace below"
|
||||
msgstr "Move to workspace below"
|
||||
|
||||
#: data/50-mutter-system.xml:6
|
||||
#: data/50-mutter-system.xml:6 data/50-mutter-wayland.xml:6
|
||||
msgid "System"
|
||||
msgstr "System"
|
||||
|
||||
@@ -188,6 +171,10 @@ msgstr "Show the run command prompt"
|
||||
msgid "Show the activities overview"
|
||||
msgstr "Show the activities overview"
|
||||
|
||||
#: data/50-mutter-wayland.xml:8
|
||||
msgid "Restore the keyboard shortcuts"
|
||||
msgstr "Restore the keyboard shortcuts"
|
||||
|
||||
#: data/50-mutter-windows.xml:6
|
||||
msgid "Windows"
|
||||
msgstr "Windows"
|
||||
@@ -213,54 +200,50 @@ msgid "Restore window"
|
||||
msgstr "Restore window"
|
||||
|
||||
#: data/50-mutter-windows.xml:18
|
||||
msgid "Toggle shaded state"
|
||||
msgstr "Toggle shaded state"
|
||||
|
||||
#: data/50-mutter-windows.xml:20
|
||||
msgid "Close window"
|
||||
msgstr "Close window"
|
||||
|
||||
#: data/50-mutter-windows.xml:22
|
||||
#: data/50-mutter-windows.xml:20
|
||||
msgid "Hide window"
|
||||
msgstr "Hide window"
|
||||
|
||||
#: data/50-mutter-windows.xml:24
|
||||
#: data/50-mutter-windows.xml:22
|
||||
msgid "Move window"
|
||||
msgstr "Move window"
|
||||
|
||||
#: data/50-mutter-windows.xml:26
|
||||
#: data/50-mutter-windows.xml:24
|
||||
msgid "Resize window"
|
||||
msgstr "Resize window"
|
||||
|
||||
#: data/50-mutter-windows.xml:29
|
||||
#: data/50-mutter-windows.xml:27
|
||||
msgid "Toggle window on all workspaces or one"
|
||||
msgstr "Toggle window on all workspaces or one"
|
||||
|
||||
#: data/50-mutter-windows.xml:31
|
||||
#: data/50-mutter-windows.xml:29
|
||||
msgid "Raise window if covered, otherwise lower it"
|
||||
msgstr "Raise window if covered, otherwise lower it"
|
||||
|
||||
#: data/50-mutter-windows.xml:33
|
||||
#: data/50-mutter-windows.xml:31
|
||||
msgid "Raise window above other windows"
|
||||
msgstr "Raise window above other windows"
|
||||
|
||||
#: data/50-mutter-windows.xml:35
|
||||
#: data/50-mutter-windows.xml:33
|
||||
msgid "Lower window below other windows"
|
||||
msgstr "Lower window below other windows"
|
||||
|
||||
#: data/50-mutter-windows.xml:37
|
||||
#: data/50-mutter-windows.xml:35
|
||||
msgid "Maximize window vertically"
|
||||
msgstr "Maximise window vertically"
|
||||
|
||||
#: data/50-mutter-windows.xml:39
|
||||
#: data/50-mutter-windows.xml:37
|
||||
msgid "Maximize window horizontally"
|
||||
msgstr "Maximise window horizontally"
|
||||
|
||||
#: data/50-mutter-windows.xml:43
|
||||
#: data/50-mutter-windows.xml:41
|
||||
msgid "View split on left"
|
||||
msgstr "View split on left"
|
||||
|
||||
#: data/50-mutter-windows.xml:47
|
||||
#: data/50-mutter-windows.xml:45
|
||||
msgid "View split on right"
|
||||
msgstr "View split on right"
|
||||
|
||||
@@ -273,16 +256,21 @@ msgid "Modifier to use for extended window management operations"
|
||||
msgstr "Modifier to use for extended window management operations"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:8
|
||||
#| msgid ""
|
||||
#| "This key will initiate the \"overlay\", which is a combination window "
|
||||
#| "overview and application launching system. The default is intended to be "
|
||||
#| "the \"Windows key\" on PC hardware. It's expected that this binding "
|
||||
#| "either the default or set to the empty string."
|
||||
msgid ""
|
||||
"This key will initiate the \"overlay\", which is a combination window "
|
||||
"overview and application launching system. The default is intended to be the "
|
||||
"\"Windows key\" on PC hardware. It's expected that this binding either the "
|
||||
"default or set to the empty string."
|
||||
"This key will initiate the “overlay”, which is a combination window overview "
|
||||
"and application launching system. The default is intended to be the “Windows "
|
||||
"key” on PC hardware. It’s expected that this binding either the default or "
|
||||
"set to the empty string."
|
||||
msgstr ""
|
||||
"This key will initiate the \"overlay\", which is a combination window "
|
||||
"overview and application launching system. The default is intended to be the "
|
||||
"\"Windows key\" on PC hardware. It's expected that this binding either the "
|
||||
"default or set to the empty string."
|
||||
"This key will initiate the “overlay”, which is a combination window overview "
|
||||
"and application launching system. The default is intended to be the “Windows "
|
||||
"key” on PC hardware. It’s expected that this binding either the default or "
|
||||
"set to the empty string."
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:20
|
||||
msgid "Attach modal dialogs"
|
||||
@@ -317,12 +305,16 @@ msgid "Workspaces are managed dynamically"
|
||||
msgstr "Workspaces are managed dynamically"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:41
|
||||
#| msgid ""
|
||||
#| "Determines whether workspaces are managed dynamically or whether there's "
|
||||
#| "a static number of workspaces (determined by the num-workspaces key in "
|
||||
#| "org.gnome.desktop.wm.preferences)."
|
||||
msgid ""
|
||||
"Determines whether workspaces are managed dynamically or whether there's a "
|
||||
"Determines whether workspaces are managed dynamically or whether there’s a "
|
||||
"static number of workspaces (determined by the num-workspaces key in org."
|
||||
"gnome.desktop.wm.preferences)."
|
||||
msgstr ""
|
||||
"Determines whether workspaces are managed dynamically or whether there's a "
|
||||
"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)."
|
||||
|
||||
@@ -355,25 +347,32 @@ msgid "Delay focus changes until the pointer stops moving"
|
||||
msgstr "Delay focus changes until the pointer stops moving"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:69
|
||||
#| msgid ""
|
||||
#| "If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
|
||||
#| "the focus will not be changed immediately when entering a window, but "
|
||||
#| "only after the pointer stops moving."
|
||||
msgid ""
|
||||
"If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
|
||||
"the focus will not be changed immediately when entering a window, but only "
|
||||
"after the pointer stops moving."
|
||||
"If set to true, and the focus mode is either “sloppy” or “mouse” then the "
|
||||
"focus will not be changed immediately when entering a window, but only after "
|
||||
"the pointer stops moving."
|
||||
msgstr ""
|
||||
"If set to true, and the focus mode is either \"sloppy\" or \"mouse\" then "
|
||||
"the focus will not be changed immediately when entering a window, but only "
|
||||
"after the pointer stops moving."
|
||||
"If set to true, and the focus mode is either “sloppy” or “mouse” then the "
|
||||
"focus will not be changed immediately when entering a window, but only after "
|
||||
"the pointer stops moving."
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:79
|
||||
msgid "Draggable border width"
|
||||
msgstr "Draggable border width"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:80
|
||||
#| msgid ""
|
||||
#| "The amount of total draggable borders. If the theme's visible borders are "
|
||||
#| "not enough, invisible borders will be added to meet this value."
|
||||
msgid ""
|
||||
"The amount of total draggable borders. If the theme's visible borders are "
|
||||
"The amount of total draggable borders. If the theme’s visible borders are "
|
||||
"not enough, invisible borders will be added to meet this value."
|
||||
msgstr ""
|
||||
"The amount of total draggable borders. If the theme's visible borders are "
|
||||
"The amount of total draggable borders. If the theme’s visible borders are "
|
||||
"not enough, invisible borders will be added to meet this value."
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:89
|
||||
@@ -400,14 +399,47 @@ msgstr ""
|
||||
"When true, the new windows will always be put in the centre of the active "
|
||||
"screen of the monitor."
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:120
|
||||
#: data/org.gnome.mutter.gschema.xml.in:107
|
||||
msgid "Enable experimental features"
|
||||
msgstr "Enable experimental features"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:108
|
||||
msgid ""
|
||||
"To enable experimental features, add the feature keyword to the list. "
|
||||
"Whether the feature requires restarting the compositor depends on the given "
|
||||
"feature. Any experimental feature is not required to still be available, or "
|
||||
"configurable. Don’t expect adding anything in this setting to be future "
|
||||
"proof. Currently possible keywords: • “scale-monitor-framebuffer” — makes "
|
||||
"mutter default to layout logical monitors in a logical pixel coordinate "
|
||||
"space, while scaling monitor framebuffers instead of window content, to "
|
||||
"manage HiDPI monitors. Does not require a restart."
|
||||
msgstr ""
|
||||
"To enable experimental features, add the feature keyword to the list. "
|
||||
"Whether the feature requires restarting the compositor depends on the given "
|
||||
"feature. Any experimental feature is not required to still be available, or "
|
||||
"configurable. Don’t expect adding anything in this setting to be future "
|
||||
"proof. Currently possible keywords: • “scale-monitor-framebuffer” — makes "
|
||||
"mutter default to layout logical monitors in a logical pixel coordinate "
|
||||
"space, while scaling monitor framebuffers instead of window content, to "
|
||||
"manage HiDPI monitors. Does not require a restart."
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:141
|
||||
msgid "Select window from tab popup"
|
||||
msgstr "Select window from tab popup"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:125
|
||||
#: data/org.gnome.mutter.gschema.xml.in:146
|
||||
msgid "Cancel tab popup"
|
||||
msgstr "Cancel tab popup"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:151
|
||||
#| msgid "Switch monitor"
|
||||
msgid "Switch monitor configurations"
|
||||
msgstr "Switch monitor configurations"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:156
|
||||
msgid "Rotates the built-in monitor configuration"
|
||||
msgstr "Rotates the built-in monitor configuration"
|
||||
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:6
|
||||
msgid "Switch to VT 1"
|
||||
msgstr "Switch to VT 1"
|
||||
@@ -456,59 +488,167 @@ msgstr "Switch to VT 11"
|
||||
msgid "Switch to VT 12"
|
||||
msgstr "Switch to VT 12"
|
||||
|
||||
#: src/backends/meta-input-settings.c:1707
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:54
|
||||
msgid "Re-enable shortcuts"
|
||||
msgstr "Re-enable shortcuts"
|
||||
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:64
|
||||
msgid "Allow grabs with Xwayland"
|
||||
msgstr "Allow grabs with Xwayland"
|
||||
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:65
|
||||
msgid ""
|
||||
"Allow keyboard grabs issued by X11 applications running in Xwayland to be "
|
||||
"taken into account. For a X11 grab to be taken into account under Wayland, "
|
||||
"the client must also either send a specific X11 ClientMessage to the root "
|
||||
"window or be among the applications white-listed in key “xwayland-grab-"
|
||||
"access-rules”."
|
||||
msgstr ""
|
||||
"Allow keyboard grabs issued by X11 applications running in Xwayland to be "
|
||||
"taken into account. For a X11 grab to be taken into account under Wayland, "
|
||||
"the client must also either send a specific X11 ClientMessage to the root "
|
||||
"window or be among the applications white-listed in key “xwayland-grab-"
|
||||
"access-rules”."
|
||||
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:77
|
||||
msgid "Xwayland applications allowed to issue keyboard grabs"
|
||||
msgstr "Xwayland applications allowed to issue keyboard grabs"
|
||||
|
||||
#: data/org.gnome.mutter.wayland.gschema.xml.in:78
|
||||
msgid ""
|
||||
"List the resource names or resource class of X11 windows either allowed or "
|
||||
"not allowed to issue X11 keyboard grabs under Xwayland. The resource name or "
|
||||
"resource class of a given X11 window can be obtained using the command "
|
||||
"“xprop WM_CLASS”. Wildcards “*” and jokers “?” in the values are supported. "
|
||||
"Values starting with “!” are blacklisted, which has precedence over the "
|
||||
"whitelist, to revoke applications from the default system list. The default "
|
||||
"system list includes the following applications: "
|
||||
"“@XWAYLAND_GRAB_DEFAULT_ACCESS_RULES@” Users can break an existing grab by "
|
||||
"using the specific keyboard shortcut defined by the keybinding key “restore-"
|
||||
"shortcuts”."
|
||||
msgstr ""
|
||||
"List the resource names or resource class of X11 windows either allowed or "
|
||||
"not allowed to issue X11 keyboard grabs under Xwayland. The resource name or "
|
||||
"resource class of a given X11 window can be obtained using the command "
|
||||
"“xprop WM_CLASS”. Wildcards “*” and jokers “?” in the values are supported. "
|
||||
"Values starting with “!” are blacklisted, which has precedence over the "
|
||||
"whitelist, to revoke applications from the default system list. The default "
|
||||
"system list includes the following applications: "
|
||||
"“@XWAYLAND_GRAB_DEFAULT_ACCESS_RULES@” Users can break an existing grab by "
|
||||
"using the specific keyboard shortcut defined by the keybinding key “restore-"
|
||||
"shortcuts”."
|
||||
|
||||
#. TRANSLATORS: This string refers to a button that switches between
|
||||
#. * different modes.
|
||||
#.
|
||||
#: src/backends/meta-input-settings.c:2325
|
||||
#, c-format
|
||||
#| msgid "Mode Switch: Mode %d"
|
||||
msgid "Mode Switch (Group %d)"
|
||||
msgstr "Mode Switch (Group %d)"
|
||||
|
||||
#. TRANSLATORS: This string refers to an action, cycles drawing tablets'
|
||||
#. * mapping through the available outputs.
|
||||
#.
|
||||
#: src/backends/meta-input-settings.c:2348
|
||||
msgid "Switch monitor"
|
||||
msgstr "Switch monitor"
|
||||
|
||||
#: src/backends/meta-input-settings.c:1709
|
||||
#: src/backends/meta-input-settings.c:2350
|
||||
msgid "Show on-screen help"
|
||||
msgstr "Show on-screen help"
|
||||
|
||||
#: src/backends/meta-monitor-manager.c:514
|
||||
#: src/backends/meta-monitor-manager.c:907
|
||||
msgid "Built-in display"
|
||||
msgstr "Built-in display"
|
||||
|
||||
#: src/backends/meta-monitor-manager.c:537
|
||||
#: src/backends/meta-monitor-manager.c:930
|
||||
msgid "Unknown"
|
||||
msgstr "Unknown"
|
||||
|
||||
#: src/backends/meta-monitor-manager.c:539
|
||||
#: src/backends/meta-monitor-manager.c:932
|
||||
msgid "Unknown Display"
|
||||
msgstr "Unknown Display"
|
||||
|
||||
#. TRANSLATORS: this is a monitor vendor name, followed by a
|
||||
#. * size in inches, like 'Dell 15"'
|
||||
#.
|
||||
#: src/backends/meta-monitor-manager.c:547
|
||||
#: src/backends/meta-monitor-manager.c:940
|
||||
#, c-format
|
||||
msgid "%s %s"
|
||||
msgstr "%s %s"
|
||||
|
||||
#. This probably means that a non-WM compositor like xcompmgr is running;
|
||||
#. * we have no way to get it to exit
|
||||
#: src/compositor/compositor.c:463
|
||||
#: src/compositor/compositor.c:481
|
||||
#, c-format
|
||||
#| msgid ""
|
||||
#| "Another compositing manager is already running on screen %i on display "
|
||||
#| "\"%s\"."
|
||||
msgid ""
|
||||
"Another compositing manager is already running on screen %i on display \"%s"
|
||||
"\"."
|
||||
"Another compositing manager is already running on screen %i on display “%s”."
|
||||
msgstr ""
|
||||
"Another compositing manager is already running on screen %i on display \"%s"
|
||||
"\"."
|
||||
"Another compositing manager is already running on screen %i on display “%s”."
|
||||
|
||||
#: src/core/bell.c:194
|
||||
#: src/core/bell.c:254
|
||||
msgid "Bell event"
|
||||
msgstr "Bell event"
|
||||
|
||||
#: src/core/delete.c:127
|
||||
#: src/core/main.c:191
|
||||
msgid "Disable connection to session manager"
|
||||
msgstr "Disable connection to session manager"
|
||||
|
||||
#: src/core/main.c:197
|
||||
msgid "Replace the running window manager"
|
||||
msgstr "Replace the running window manager"
|
||||
|
||||
#: src/core/main.c:203
|
||||
msgid "Specify session management ID"
|
||||
msgstr "Specify session management ID"
|
||||
|
||||
#: src/core/main.c:208
|
||||
msgid "X Display to use"
|
||||
msgstr "X Display to use"
|
||||
|
||||
#: src/core/main.c:214
|
||||
msgid "Initialize session from savefile"
|
||||
msgstr "Initialise session from savefile"
|
||||
|
||||
#: src/core/main.c:220
|
||||
msgid "Make X calls synchronous"
|
||||
msgstr "Make X calls synchronous"
|
||||
|
||||
#: src/core/main.c:227
|
||||
msgid "Run as a wayland compositor"
|
||||
msgstr "Run as a wayland compositor"
|
||||
|
||||
#: src/core/main.c:233
|
||||
msgid "Run as a nested compositor"
|
||||
msgstr "Run as a nested compositor"
|
||||
|
||||
#: src/core/main.c:239
|
||||
msgid "Run wayland compositor without starting Xwayland"
|
||||
msgstr "Run wayland compositor without starting Xwayland"
|
||||
|
||||
#: src/core/main.c:247
|
||||
msgid "Run as a full display server, rather than nested"
|
||||
msgstr "Run as a full display server, rather than nested"
|
||||
|
||||
#: src/core/main.c:253
|
||||
msgid "Run with X11 backend"
|
||||
msgstr "Run with X11 backend"
|
||||
|
||||
#. Translators: %s is a window title
|
||||
#: src/core/meta-close-dialog-default.c:148
|
||||
#, c-format
|
||||
msgid "“%s” is not responding."
|
||||
msgstr "“%s” is not responding."
|
||||
|
||||
#: src/core/delete.c:129
|
||||
#: src/core/meta-close-dialog-default.c:150
|
||||
msgid "Application is not responding."
|
||||
msgstr "Application is not responding."
|
||||
|
||||
#: src/core/delete.c:134
|
||||
#: src/core/meta-close-dialog-default.c:155
|
||||
msgid ""
|
||||
"You may choose to wait a short while for it to continue or force the "
|
||||
"application to quit entirely."
|
||||
@@ -516,66 +656,31 @@ msgstr ""
|
||||
"You may choose to wait a short while for it to continue or force the "
|
||||
"application to quit entirely."
|
||||
|
||||
#: src/core/delete.c:141
|
||||
msgid "_Wait"
|
||||
msgstr "_Wait"
|
||||
|
||||
#: src/core/delete.c:141
|
||||
#: src/core/meta-close-dialog-default.c:162
|
||||
msgid "_Force Quit"
|
||||
msgstr "_Force Quit"
|
||||
|
||||
#: src/core/display.c:590
|
||||
#, c-format
|
||||
msgid "Failed to open X Window System display '%s'\n"
|
||||
msgstr "Failed to open X Window System display '%s'\n"
|
||||
|
||||
#: src/core/main.c:182
|
||||
msgid "Disable connection to session manager"
|
||||
msgstr "Disable connection to session manager"
|
||||
|
||||
#: src/core/main.c:188
|
||||
msgid "Replace the running window manager"
|
||||
msgstr "Replace the running window manager"
|
||||
|
||||
#: src/core/main.c:194
|
||||
msgid "Specify session management ID"
|
||||
msgstr "Specify session management ID"
|
||||
|
||||
#: src/core/main.c:199
|
||||
msgid "X Display to use"
|
||||
msgstr "X Display to use"
|
||||
|
||||
#: src/core/main.c:205
|
||||
msgid "Initialize session from savefile"
|
||||
msgstr "Initialise session from savefile"
|
||||
|
||||
#: src/core/main.c:211
|
||||
msgid "Make X calls synchronous"
|
||||
msgstr "Make X calls synchronous"
|
||||
|
||||
#: src/core/main.c:218
|
||||
msgid "Run as a wayland compositor"
|
||||
msgstr "Run as a wayland compositor"
|
||||
|
||||
#: src/core/main.c:224
|
||||
msgid "Run as a nested compositor"
|
||||
msgstr "Run as a nested compositor"
|
||||
|
||||
#: src/core/main.c:232
|
||||
msgid "Run as a full display server, rather than nested"
|
||||
msgstr "Run as a full display server, rather than nested"
|
||||
#: src/core/meta-close-dialog-default.c:162
|
||||
msgid "_Wait"
|
||||
msgstr "_Wait"
|
||||
|
||||
#: src/core/mutter.c:39
|
||||
#, c-format
|
||||
#| msgid ""
|
||||
#| "mutter %s\n"
|
||||
#| "Copyright (C) 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
|
||||
#| "This is free software; see the source for copying conditions.\n"
|
||||
#| "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A "
|
||||
#| "PARTICULAR PURPOSE.\n"
|
||||
msgid ""
|
||||
"mutter %s\n"
|
||||
"Copyright (C) 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
|
||||
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
|
||||
"This is free software; see the source for copying conditions.\n"
|
||||
"There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A "
|
||||
"PARTICULAR PURPOSE.\n"
|
||||
msgstr ""
|
||||
"mutter %s\n"
|
||||
"Copyright (C) 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
|
||||
"Copyright © 2001-%d Havoc Pennington, Red Hat, Inc., and others\n"
|
||||
"This is free software; see the source for copying conditions.\n"
|
||||
"There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A "
|
||||
"PARTICULAR PURPOSE.\n"
|
||||
@@ -588,47 +693,79 @@ msgstr "Print version"
|
||||
msgid "Mutter plugin to use"
|
||||
msgstr "Mutter plugin to use"
|
||||
|
||||
#: src/core/prefs.c:1997
|
||||
#: src/core/prefs.c:1915
|
||||
#, c-format
|
||||
msgid "Workspace %d"
|
||||
msgstr "Workspace %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 ""
|
||||
"Display \"%s\" already has a window manager; try using the --replace option "
|
||||
"to replace the current window manager."
|
||||
|
||||
#: src/core/screen.c:606
|
||||
#, c-format
|
||||
msgid "Screen %d on display '%s' is invalid\n"
|
||||
msgstr "Screen %d on display '%s' is invalid\n"
|
||||
|
||||
#: src/core/util.c:120
|
||||
msgid "Mutter was compiled without support for verbose mode\n"
|
||||
msgstr "Mutter was compiled without support for verbose mode\n"
|
||||
|
||||
#: src/wayland/meta-wayland-tablet-pad.c:595
|
||||
#: src/wayland/meta-wayland-tablet-pad.c:567
|
||||
#, c-format
|
||||
msgid "Mode Switch: Mode %d"
|
||||
msgstr "Mode Switch: Mode %d"
|
||||
|
||||
#: src/x11/session.c:1815
|
||||
#: src/x11/meta-x11-display.c:666
|
||||
#, c-format
|
||||
#| msgid ""
|
||||
#| "Display \"%s\" already has a window manager; try using the --replace "
|
||||
#| "option to replace the current window manager."
|
||||
msgid ""
|
||||
"These windows do not support "save current setup" and will have to "
|
||||
"be restarted manually next time you log in."
|
||||
"Display “%s” already has a window manager; try using the --replace option to "
|
||||
"replace the current window manager."
|
||||
msgstr ""
|
||||
"These windows do not support "save current setup" and will have to "
|
||||
"be restarted manually next time you log in."
|
||||
"Display “%s” already has a window manager; try using the --replace option to "
|
||||
"replace the current window manager."
|
||||
|
||||
#: src/x11/window-props.c:548
|
||||
#: src/x11/meta-x11-display.c:1010
|
||||
msgid "Failed to initialize GDK\n"
|
||||
msgstr "Failed to initialise GDK\n"
|
||||
|
||||
#: src/x11/meta-x11-display.c:1034
|
||||
#, c-format
|
||||
#| msgid "Failed to open X Window System display '%s'\n"
|
||||
msgid "Failed to open X Window System display “%s”\n"
|
||||
msgstr "Failed to open X Window System display “%s”\n"
|
||||
|
||||
#: src/x11/meta-x11-display.c:1117
|
||||
#, c-format
|
||||
#| msgid "Screen %d on display '%s' is invalid\n"
|
||||
msgid "Screen %d on display “%s” is invalid\n"
|
||||
msgstr "Screen %d on display “%s” is invalid\n"
|
||||
|
||||
#: src/x11/session.c:1819
|
||||
#| msgid ""
|
||||
#| "These windows do not support "save current setup" and will have "
|
||||
#| "to be restarted manually next time you log in."
|
||||
msgid ""
|
||||
"These windows do not support “save current setup” and will have to be "
|
||||
"restarted manually next time you log in."
|
||||
msgstr ""
|
||||
"These windows do not support “save current setup” and will have to be "
|
||||
"restarted manually next time you log in."
|
||||
|
||||
#: src/x11/window-props.c:565
|
||||
#, c-format
|
||||
msgid "%s (on %s)"
|
||||
msgstr "%s (on %s)"
|
||||
|
||||
#~ msgid "Move window one workspace to the left"
|
||||
#~ msgstr "Move window one workspace to the left"
|
||||
|
||||
#~ msgid "Move window one workspace to the right"
|
||||
#~ msgstr "Move window one workspace to the right"
|
||||
|
||||
#~ msgid "Move to workspace left"
|
||||
#~ msgstr "Move to workspace left"
|
||||
|
||||
#~ msgid "Move to workspace right"
|
||||
#~ msgstr "Move to workspace right"
|
||||
|
||||
#~ msgid "Toggle shaded state"
|
||||
#~ msgstr "Toggle shaded state"
|
||||
|
||||
#~ msgid "background texture could not be created from file"
|
||||
#~ msgstr "background texture could not be created from file"
|
||||
|
||||
|
98
po/fur.po
98
po/fur.po
@@ -7,15 +7,15 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mutter master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
|
||||
"POT-Creation-Date: 2018-06-07 13:00+0000\n"
|
||||
"PO-Revision-Date: 2018-06-29 15:33+0200\n"
|
||||
"POT-Creation-Date: 2018-08-15 08:53+0000\n"
|
||||
"PO-Revision-Date: 2018-08-17 05:49+0200\n"
|
||||
"Last-Translator: Fabio Tomat <f.t.public@gmail.com>\n"
|
||||
"Language-Team: Friulian <fur@li.org>\n"
|
||||
"Language: fur\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 2.0.8\n"
|
||||
"X-Generator: Poedit 2.0.7\n"
|
||||
|
||||
#: data/50-mutter-navigation.xml:6
|
||||
msgid "Navigation"
|
||||
@@ -538,22 +538,22 @@ msgstr "Cambie visôr"
|
||||
msgid "Show on-screen help"
|
||||
msgstr "Mostre jutori a schermi"
|
||||
|
||||
#: src/backends/meta-monitor-manager.c:903
|
||||
#: src/backends/meta-monitor-manager.c:886
|
||||
msgid "Built-in display"
|
||||
msgstr "Display integrât"
|
||||
|
||||
#: src/backends/meta-monitor-manager.c:926
|
||||
#: src/backends/meta-monitor-manager.c:909
|
||||
msgid "Unknown"
|
||||
msgstr "No cognossût"
|
||||
|
||||
#: src/backends/meta-monitor-manager.c:928
|
||||
#: src/backends/meta-monitor-manager.c:911
|
||||
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:936
|
||||
#: src/backends/meta-monitor-manager.c:919
|
||||
#, c-format
|
||||
msgid "%s %s"
|
||||
msgstr "%s %s"
|
||||
@@ -568,66 +568,65 @@ msgstr ""
|
||||
"Un altri compositing manager al è za in esecuzion sul schermi %i sul display "
|
||||
"“%s”."
|
||||
|
||||
#: src/core/bell.c:194
|
||||
#: src/core/bell.c:254
|
||||
msgid "Bell event"
|
||||
msgstr "Event cjampane"
|
||||
|
||||
#: src/core/display.c:608
|
||||
#, 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:190
|
||||
#: src/core/main.c:191
|
||||
msgid "Disable connection to session manager"
|
||||
msgstr "Disabilite la conession al gjestôr de session"
|
||||
|
||||
#: src/core/main.c:196
|
||||
#: src/core/main.c:197
|
||||
msgid "Replace the running window manager"
|
||||
msgstr "Rimplace il window manager in vore"
|
||||
|
||||
#: src/core/main.c:202
|
||||
#: src/core/main.c:203
|
||||
msgid "Specify session management ID"
|
||||
msgstr "Specifiche il ID di gjestion session"
|
||||
|
||||
#: src/core/main.c:207
|
||||
#: src/core/main.c:208
|
||||
msgid "X Display to use"
|
||||
msgstr "Display X di doprâ"
|
||||
|
||||
#: src/core/main.c:213
|
||||
#: src/core/main.c:214
|
||||
msgid "Initialize session from savefile"
|
||||
msgstr "Inizialize session da file salvât"
|
||||
|
||||
#: src/core/main.c:219
|
||||
#: src/core/main.c:220
|
||||
msgid "Make X calls synchronous"
|
||||
msgstr "Fâs lis clamadis X sincronis"
|
||||
|
||||
#: src/core/main.c:226
|
||||
#: src/core/main.c:227
|
||||
msgid "Run as a wayland compositor"
|
||||
msgstr "Eseguìs come compositor wayland"
|
||||
|
||||
#: src/core/main.c:232
|
||||
#: src/core/main.c:233
|
||||
msgid "Run as a nested compositor"
|
||||
msgstr "Eseguìs come compositor nidiât"
|
||||
|
||||
#: src/core/main.c:240
|
||||
#: src/core/main.c:239
|
||||
msgid "Run wayland compositor without starting Xwayland"
|
||||
msgstr "Eseguìs il compositôr di wayland cence inviâ Xwayland"
|
||||
|
||||
#: src/core/main.c:247
|
||||
msgid "Run as a full display server, rather than nested"
|
||||
msgstr "Eseguìs come servidôr display complet, invezit che nidiât"
|
||||
|
||||
#: src/core/main.c:246
|
||||
#: src/core/main.c:253
|
||||
msgid "Run with X11 backend"
|
||||
msgstr "Eseguìs cul backend X11"
|
||||
|
||||
#. Translators: %s is a window title
|
||||
#: src/core/meta-close-dialog-default.c:147
|
||||
#: src/core/meta-close-dialog-default.c:148
|
||||
#, c-format
|
||||
msgid "“%s” is not responding."
|
||||
msgstr "“%s” nol rispuint."
|
||||
|
||||
#: src/core/meta-close-dialog-default.c:149
|
||||
#: src/core/meta-close-dialog-default.c:150
|
||||
msgid "Application is not responding."
|
||||
msgstr "La aplicazion no rispuint."
|
||||
|
||||
#: src/core/meta-close-dialog-default.c:154
|
||||
#: src/core/meta-close-dialog-default.c:155
|
||||
msgid ""
|
||||
"You may choose to wait a short while for it to continue or force the "
|
||||
"application to quit entirely."
|
||||
@@ -635,11 +634,11 @@ msgstr ""
|
||||
"Al è pussibil sielzi di spietâ un pôc lassant che la aplicazion e continui o "
|
||||
"sfuarçâ la aplicazion par sierâle dal dut."
|
||||
|
||||
#: src/core/meta-close-dialog-default.c:161
|
||||
#: src/core/meta-close-dialog-default.c:162
|
||||
msgid "_Force Quit"
|
||||
msgstr "Sfuarce _Jessude"
|
||||
|
||||
#: src/core/meta-close-dialog-default.c:161
|
||||
#: src/core/meta-close-dialog-default.c:162
|
||||
msgid "_Wait"
|
||||
msgstr "_Spiete"
|
||||
|
||||
@@ -666,25 +665,11 @@ msgstr "Stampe version"
|
||||
msgid "Mutter plugin to use"
|
||||
msgstr "Plugin Mutter di doprâ"
|
||||
|
||||
#: src/core/prefs.c:1997
|
||||
#: src/core/prefs.c:1787
|
||||
#, c-format
|
||||
msgid "Workspace %d"
|
||||
msgstr "Spazi di lavôr %d"
|
||||
|
||||
#: src/core/screen.c:583
|
||||
#, 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:668
|
||||
#, c-format
|
||||
msgid "Screen %d on display “%s” is invalid\n"
|
||||
msgstr "Schermi %d su display “%s” no valit\n"
|
||||
|
||||
#: src/core/util.c:120
|
||||
msgid "Mutter was compiled without support for verbose mode\n"
|
||||
msgstr "Mutter al è stât compilât cence supuart pe modalitât fetose\n"
|
||||
@@ -694,7 +679,30 @@ msgstr "Mutter al è stât compilât cence supuart pe modalitât fetose\n"
|
||||
msgid "Mode Switch: Mode %d"
|
||||
msgstr "Cambie mût: mût %d"
|
||||
|
||||
#: src/x11/session.c:1818
|
||||
#: src/x11/meta-x11-display.c:666
|
||||
#, 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/x11/meta-x11-display.c:1010
|
||||
msgid "Failed to initialize GDK\n"
|
||||
msgstr "No si è rivâts a inizializâ GDK\n"
|
||||
|
||||
#: src/x11/meta-x11-display.c:1034
|
||||
#, c-format
|
||||
msgid "Failed to open X Window System display “%s”\n"
|
||||
msgstr "Impussibil vierzi il display “%s” di X Window System\n"
|
||||
|
||||
#: src/x11/meta-x11-display.c:1117
|
||||
#, c-format
|
||||
msgid "Screen %d on display “%s” is invalid\n"
|
||||
msgstr "Schermi %d su display “%s” no valit\n"
|
||||
|
||||
#: src/x11/session.c:1819
|
||||
msgid ""
|
||||
"These windows do not support “save current setup” and will have to be "
|
||||
"restarted manually next time you log in."
|
||||
@@ -702,7 +710,7 @@ msgstr ""
|
||||
"Chescj barcons no supuartin la funzion “salve impostazions atuâls” e si "
|
||||
"scugnarà tornâ a inviâlis a man tal prossim acès."
|
||||
|
||||
#: src/x11/window-props.c:559
|
||||
#: src/x11/window-props.c:565
|
||||
#, c-format
|
||||
msgid "%s (on %s)"
|
||||
msgstr "%s (su %s)"
|
||||
|
148
po/tr.po
148
po/tr.po
@@ -14,8 +14,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mutter master\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
|
||||
"POT-Creation-Date: 2018-02-06 04:14+0000\n"
|
||||
"PO-Revision-Date: 2018-03-13 10:53+0300\n"
|
||||
"POT-Creation-Date: 2018-07-07 09:58+0000\n"
|
||||
"PO-Revision-Date: 2018-08-08 10:19+0300\n"
|
||||
"Last-Translator: Emin Tufan Çetin <etcetin@gmail.com>\n"
|
||||
"Language-Team: Türkçe <gnome-turk@gnome.org>\n"
|
||||
"Language: tr\n"
|
||||
@@ -289,7 +289,7 @@ msgstr ""
|
||||
#: data/org.gnome.mutter.gschema.xml.in:30
|
||||
msgid "Enable edge tiling when dropping windows on screen edges"
|
||||
msgstr ""
|
||||
"Pencereler ekran kenarlarında bırakıldığında kenar döşemeyi etkinleştir."
|
||||
"Pencereler ekran kenarlarında bırakıldığında kenar döşemeyi etkinleştir"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:31
|
||||
msgid ""
|
||||
@@ -396,6 +396,18 @@ msgid "Enable experimental features"
|
||||
msgstr "Deneysel özellikleri etkinleştir"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:108
|
||||
#| msgid ""
|
||||
#| "To enable experimental features, add the feature keyword to the list. "
|
||||
#| "Whether the feature requires restarting the compositor depends on the "
|
||||
#| "given feature. Any experimental feature is not required to still be "
|
||||
#| "available, or configurable. Don’t expect adding anything in this setting "
|
||||
#| "to be future proof. Currently possible keywords: • “scale-monitor-"
|
||||
#| "framebuffer” — makes mutter default to layout logical monitors in a "
|
||||
#| "logical pixel coordinate space, while scaling monitor framebuffers "
|
||||
#| "instead of window content, to manage HiDPI monitors. Does not require a "
|
||||
#| "restart. • “remote-desktop” — enables remote desktop support. To support "
|
||||
#| "remote desktop with screen sharing, “screen-cast” must also be enabled. • "
|
||||
#| "“screen-cast” — enables screen cast support."
|
||||
msgid ""
|
||||
"To enable experimental features, add the feature keyword to the list. "
|
||||
"Whether the feature requires restarting the compositor depends on the given "
|
||||
@@ -404,42 +416,32 @@ msgid ""
|
||||
"proof. Currently possible keywords: • “scale-monitor-framebuffer” — makes "
|
||||
"mutter default to layout logical monitors in a logical pixel coordinate "
|
||||
"space, while scaling monitor framebuffers instead of window content, to "
|
||||
"manage HiDPI monitors. Does not require a restart. • “remote-desktop” — "
|
||||
"enables remote desktop support. To support remote desktop with screen "
|
||||
"sharing, “screen-cast” must also be enabled. • “screen-cast” — enables "
|
||||
"screen cast support."
|
||||
"manage HiDPI monitors. Does not require a restart."
|
||||
msgstr ""
|
||||
"Deneysel özellikleri etkinleştirmek için özelliğin anahtar sözcüğünü listeye "
|
||||
"ekleyin. Özelliğin yeniden başlatmayı gerektirip gerektirmeyeceği verilen "
|
||||
"özelliğe bağlıdır. Hiçbir deneysel özellik hala kullanılabilir veya "
|
||||
"yapılandırılabilir olmak zorunda değildir. Bu ayara eklenecek herhangi bir "
|
||||
"şeyin gelecekte olabilecek değişikliklerden etkilenmeyeceğini düşünmeyin. Şu "
|
||||
"anda kullanılabilir anahtar sözcükler: • “monitor-config-manager” — "
|
||||
"eskisinin yerini alması amaçlanan yeni monitör yapılandırma sistemini "
|
||||
"kullan. Bu, yapılandırma uygulamaları tarafından kullanılmak üzere daha "
|
||||
"yüksek düzeyde bir yapılandırma API’sini etkinleştirir ve ayrıca mantıksal "
|
||||
"monitör ölçeğinde yapılandırma yapmaya olanak tanır.• “scale-monitor-"
|
||||
"framebuffer” — mutter’in HiDPI monitörleri yönetmesi için pencere içeriği "
|
||||
"yerine monitör çerçeve arabelleğini ölçeklendirirken, mantıksal monitörleri "
|
||||
"mantıksal piksel koordinat aralığına yerleştirmesini öntanımlı yapar. "
|
||||
"Yeniden başlatma gerektirmez. • “remote-desktop” — uzak masaüstü desteğini "
|
||||
"etkinleştirir. Uzak masaüstünü ekran paylaşmayla desteklemek için “screen-"
|
||||
"cast” mutlaka etkinleştirilmelidir. • “screen-cast” — ekran kaydı desteğini "
|
||||
"etkinleştirir."
|
||||
"anda kullanılabilir anahtar sözcükler: • “scale-monitor-framebuffer” — "
|
||||
"mutter’in HiDPI monitörleri yönetmesi için pencere içeriği yerine monitör "
|
||||
"çerçeve arabelleğini ölçeklendirirken, mantıksal monitörleri mantıksal "
|
||||
"piksel koordinat aralığına yerleştirmesini öntanımlı yapar. Yeniden başlatma "
|
||||
"gerektirmez."
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:145
|
||||
#: data/org.gnome.mutter.gschema.xml.in:141
|
||||
msgid "Select window from tab popup"
|
||||
msgstr "Pencereyi, sekme açılır penceresinden seç"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:150
|
||||
#: data/org.gnome.mutter.gschema.xml.in:146
|
||||
msgid "Cancel tab popup"
|
||||
msgstr "Sekmeyi yeni pencerede açmayı iptal et"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:155
|
||||
#: data/org.gnome.mutter.gschema.xml.in:151
|
||||
msgid "Switch monitor configurations"
|
||||
msgstr "Monitör yapılandırmaları arasında geçiş yap"
|
||||
|
||||
#: data/org.gnome.mutter.gschema.xml.in:160
|
||||
#: data/org.gnome.mutter.gschema.xml.in:156
|
||||
msgid "Rotates the built-in monitor configuration"
|
||||
msgstr "Yerleşik monitör yapılandırmaları arasında geçiş yapar"
|
||||
|
||||
@@ -560,22 +562,22 @@ msgstr "Monitör değiştir"
|
||||
msgid "Show on-screen help"
|
||||
msgstr "Ekranda yardımı göster"
|
||||
|
||||
#: src/backends/meta-monitor-manager.c:900
|
||||
#: src/backends/meta-monitor-manager.c:907
|
||||
msgid "Built-in display"
|
||||
msgstr "Yerleşik ekran"
|
||||
|
||||
#: src/backends/meta-monitor-manager.c:923
|
||||
#: src/backends/meta-monitor-manager.c:930
|
||||
msgid "Unknown"
|
||||
msgstr "Bilinmiyor"
|
||||
|
||||
#: src/backends/meta-monitor-manager.c:925
|
||||
#: src/backends/meta-monitor-manager.c:932
|
||||
msgid "Unknown Display"
|
||||
msgstr "Bilinmeyen Ekran"
|
||||
|
||||
#. TRANSLATORS: this is a monitor vendor name, followed by a
|
||||
#. * size in inches, like 'Dell 15"'
|
||||
#.
|
||||
#: src/backends/meta-monitor-manager.c:933
|
||||
#: src/backends/meta-monitor-manager.c:940
|
||||
#, c-format
|
||||
msgid "%s %s"
|
||||
msgstr "%s %s"
|
||||
@@ -590,66 +592,65 @@ msgstr ""
|
||||
"“%2$s” monitöründeki %1$i ekranında zaten başka bir birleştirme yöneticisi "
|
||||
"çalışıyor."
|
||||
|
||||
#: src/core/bell.c:194
|
||||
#: src/core/bell.c:254
|
||||
msgid "Bell event"
|
||||
msgstr "Etkinlik zili"
|
||||
|
||||
#: src/core/display.c:608
|
||||
#, c-format
|
||||
msgid "Failed to open X Window System display “%s”\n"
|
||||
msgstr "X Pencere Sistemi “%s” ekranı açılamadı\n"
|
||||
|
||||
#: src/core/main.c:190
|
||||
#: src/core/main.c:191
|
||||
msgid "Disable connection to session manager"
|
||||
msgstr "Ortam yöneticisine olan bağlantıyı kapat"
|
||||
|
||||
#: src/core/main.c:196
|
||||
#: src/core/main.c:197
|
||||
msgid "Replace the running window manager"
|
||||
msgstr "Çalışan pencere yöneticisinin yerini al"
|
||||
|
||||
#: src/core/main.c:202
|
||||
#: src/core/main.c:203
|
||||
msgid "Specify session management ID"
|
||||
msgstr "Ortam yönetim ID’sini belirt"
|
||||
|
||||
#: src/core/main.c:207
|
||||
#: src/core/main.c:208
|
||||
msgid "X Display to use"
|
||||
msgstr "Kullanılacak X Ekranı"
|
||||
|
||||
#: src/core/main.c:213
|
||||
#: src/core/main.c:214
|
||||
msgid "Initialize session from savefile"
|
||||
msgstr "Ortamı kayıtlı dosyadan başlat"
|
||||
|
||||
#: src/core/main.c:219
|
||||
#: src/core/main.c:220
|
||||
msgid "Make X calls synchronous"
|
||||
msgstr "X çağrılarını eşazamanlı yap"
|
||||
msgstr "X çağrılarını eşzamanlı yap"
|
||||
|
||||
#: src/core/main.c:226
|
||||
#: src/core/main.c:227
|
||||
msgid "Run as a wayland compositor"
|
||||
msgstr "Bir wayland dizgicisi olarak çalıştır"
|
||||
msgstr "Wayland dizgici olarak çalıştır"
|
||||
|
||||
#: src/core/main.c:232
|
||||
#: src/core/main.c:233
|
||||
msgid "Run as a nested compositor"
|
||||
msgstr "Yuvalanmış dizgici olarak çalıştır"
|
||||
|
||||
#: src/core/main.c:240
|
||||
#: src/core/main.c:239
|
||||
msgid "Run wayland compositor without starting Xwayland"
|
||||
msgstr "Xwayland’i çalıştırmadan Wayland dizgici çalıştır"
|
||||
|
||||
#: src/core/main.c:247
|
||||
msgid "Run as a full display server, rather than nested"
|
||||
msgstr "İç içe değil tam ekran sunucusu olarak çalıştır"
|
||||
|
||||
#: src/core/main.c:246
|
||||
#: src/core/main.c:253
|
||||
msgid "Run with X11 backend"
|
||||
msgstr "X11 arkayüzüyle çalıştır"
|
||||
|
||||
#. Translators: %s is a window title
|
||||
#: src/core/meta-close-dialog-default.c:147
|
||||
#: src/core/meta-close-dialog-default.c:148
|
||||
#, c-format
|
||||
msgid "“%s” is not responding."
|
||||
msgstr "“%s” yanıt vermiyor."
|
||||
|
||||
#: src/core/meta-close-dialog-default.c:149
|
||||
#: src/core/meta-close-dialog-default.c:150
|
||||
msgid "Application is not responding."
|
||||
msgstr "Uygulama yanıt vermiyor"
|
||||
msgstr "Uygulama yanıt vermiyor."
|
||||
|
||||
#: src/core/meta-close-dialog-default.c:154
|
||||
#: src/core/meta-close-dialog-default.c:155
|
||||
msgid ""
|
||||
"You may choose to wait a short while for it to continue or force the "
|
||||
"application to quit entirely."
|
||||
@@ -657,11 +658,11 @@ msgstr ""
|
||||
"Uygulamanın devam etmesi için bir süre beklemeyi seçebilir veya tümüyle "
|
||||
"çıkması için zorlayabilirsiniz."
|
||||
|
||||
#: src/core/meta-close-dialog-default.c:161
|
||||
#: src/core/meta-close-dialog-default.c:162
|
||||
msgid "_Force Quit"
|
||||
msgstr "_Zorla Çık"
|
||||
|
||||
#: src/core/meta-close-dialog-default.c:161
|
||||
#: src/core/meta-close-dialog-default.c:162
|
||||
msgid "_Wait"
|
||||
msgstr "_Bekle"
|
||||
|
||||
@@ -688,26 +689,11 @@ msgstr "Sürümü yazdır"
|
||||
msgid "Mutter plugin to use"
|
||||
msgstr "Kullanılacak Mutter eklentisi"
|
||||
|
||||
#: src/core/prefs.c:1997
|
||||
#: src/core/prefs.c:1915
|
||||
#, c-format
|
||||
msgid "Workspace %d"
|
||||
msgstr "Çalışma Alanı %d"
|
||||
|
||||
#: src/core/screen.c:583
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Display “%s” already has a window manager; try using the --replace option to "
|
||||
"replace the current window manager."
|
||||
msgstr ""
|
||||
"“%s” ekranı zaten bir pencere yöneticisine sahip; geçerli pencere "
|
||||
"yöneticisinin yerine bir başkasını koymak için --replace seçeneğini "
|
||||
"kullanmayı deneyin."
|
||||
|
||||
#: src/core/screen.c:668
|
||||
#, c-format
|
||||
msgid "Screen %d on display “%s” is invalid\n"
|
||||
msgstr "“%2$s” monitöründeki %1$d ekranı geçersiz\n"
|
||||
|
||||
#: src/core/util.c:120
|
||||
msgid "Mutter was compiled without support for verbose mode\n"
|
||||
msgstr "Mutter, ayrıntılı kip desteği olmadan derlenmiş\n"
|
||||
@@ -717,7 +703,31 @@ msgstr "Mutter, ayrıntılı kip desteği olmadan derlenmiş\n"
|
||||
msgid "Mode Switch: Mode %d"
|
||||
msgstr "Kip Anahtarı: Kip %d"
|
||||
|
||||
#: src/x11/session.c:1818
|
||||
#: src/x11/meta-x11-display.c:666
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Display “%s” already has a window manager; try using the --replace option to "
|
||||
"replace the current window manager."
|
||||
msgstr ""
|
||||
"“%s” ekranı zaten bir pencere yöneticisine sahip; geçerli pencere "
|
||||
"yöneticisinin yerine bir başkasını koymak için --replace seçeneğini "
|
||||
"kullanmayı deneyin."
|
||||
|
||||
#: src/x11/meta-x11-display.c:1010
|
||||
msgid "Failed to initialize GDK\n"
|
||||
msgstr "GDK ilklendirilemedi\n"
|
||||
|
||||
#: src/x11/meta-x11-display.c:1034
|
||||
#, c-format
|
||||
msgid "Failed to open X Window System display “%s”\n"
|
||||
msgstr "X Pencere Sistemi “%s” ekranı açılamadı\n"
|
||||
|
||||
#: src/x11/meta-x11-display.c:1117
|
||||
#, c-format
|
||||
msgid "Screen %d on display “%s” is invalid\n"
|
||||
msgstr "“%2$s” monitöründeki %1$d ekranı geçersiz\n"
|
||||
|
||||
#: src/x11/session.c:1819
|
||||
msgid ""
|
||||
"These windows do not support “save current setup” and will have to be "
|
||||
"restarted manually next time you log in."
|
||||
@@ -725,7 +735,7 @@ msgstr ""
|
||||
"Bu pencereler, “geçerli ayarları kaydet” özelliğini desteklemiyor ve bir "
|
||||
"dahaki girişinizde elle yeniden başlatılmak zorundadır."
|
||||
|
||||
#: src/x11/window-props.c:559
|
||||
#: src/x11/window-props.c:565
|
||||
#, c-format
|
||||
msgid "%s (on %s)"
|
||||
msgstr "%s (%s üzerinde)"
|
||||
|
100
po/zh_TW.po
100
po/zh_TW.po
@@ -9,16 +9,16 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: metacity 3.3.4\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/mutter/issues\n"
|
||||
"POT-Creation-Date: 2018-06-07 13:00+0000\n"
|
||||
"PO-Revision-Date: 2018-06-09 11:26+0800\n"
|
||||
"Last-Translator: Cheng-Chia Tseng <pswo10680@gmail.com>\n"
|
||||
"POT-Creation-Date: 2018-08-06 14:19+0000\n"
|
||||
"PO-Revision-Date: 2018-08-12 16:35+0800\n"
|
||||
"Last-Translator: pan93412 <pan93412@gmail.com>\n"
|
||||
"Language-Team: Chinese (Taiwan) <zh-l10n@lists.linux.org.tw>\n"
|
||||
"Language: zh_TW\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Poedit 2.0.8\n"
|
||||
"X-Generator: Poedit 1.8.4\n"
|
||||
|
||||
#: data/50-mutter-navigation.xml:6
|
||||
msgid "Navigation"
|
||||
@@ -515,22 +515,22 @@ msgstr "切換螢幕"
|
||||
msgid "Show on-screen help"
|
||||
msgstr "顯示螢幕求助"
|
||||
|
||||
#: src/backends/meta-monitor-manager.c:903
|
||||
#: src/backends/meta-monitor-manager.c:886
|
||||
msgid "Built-in display"
|
||||
msgstr "內建顯示"
|
||||
|
||||
#: src/backends/meta-monitor-manager.c:926
|
||||
#: src/backends/meta-monitor-manager.c:909
|
||||
msgid "Unknown"
|
||||
msgstr "不明"
|
||||
|
||||
#: src/backends/meta-monitor-manager.c:928
|
||||
#: src/backends/meta-monitor-manager.c:911
|
||||
msgid "Unknown Display"
|
||||
msgstr "不明的顯示器"
|
||||
|
||||
#. TRANSLATORS: this is a monitor vendor name, followed by a
|
||||
#. * size in inches, like 'Dell 15"'
|
||||
#.
|
||||
#: src/backends/meta-monitor-manager.c:936
|
||||
#: src/backends/meta-monitor-manager.c:919
|
||||
#, c-format
|
||||
msgid "%s %s"
|
||||
msgstr "%s %s"
|
||||
@@ -544,76 +544,75 @@ msgid ""
|
||||
"Another compositing manager is already running on screen %i on display “%s”."
|
||||
msgstr "在畫面「%2$s」中的第 %1$i 個螢幕中已啟動另一個組合視窗管理員。"
|
||||
|
||||
#: src/core/bell.c:194
|
||||
#: src/core/bell.c:254
|
||||
msgid "Bell event"
|
||||
msgstr "響鈴事件"
|
||||
|
||||
#: src/core/display.c:608
|
||||
#, c-format
|
||||
msgid "Failed to open X Window System display “%s”\n"
|
||||
msgstr "無法開啟 X Window 系統畫面「%s」\n"
|
||||
|
||||
#: src/core/main.c:190
|
||||
#: src/core/main.c:191
|
||||
msgid "Disable connection to session manager"
|
||||
msgstr "停用到作業階段管理員的連線"
|
||||
|
||||
#: src/core/main.c:196
|
||||
#: src/core/main.c:197
|
||||
msgid "Replace the running window manager"
|
||||
msgstr "取代執行中的視窗管理員"
|
||||
|
||||
#: src/core/main.c:202
|
||||
#: src/core/main.c:203
|
||||
msgid "Specify session management ID"
|
||||
msgstr "指定作業階段管理 ID"
|
||||
|
||||
#: src/core/main.c:207
|
||||
#: src/core/main.c:208
|
||||
msgid "X Display to use"
|
||||
msgstr "使用的 X 畫面"
|
||||
|
||||
#: src/core/main.c:213
|
||||
#: src/core/main.c:214
|
||||
msgid "Initialize session from savefile"
|
||||
msgstr "以 savefile 初始化作業階段"
|
||||
|
||||
#: src/core/main.c:219
|
||||
#: src/core/main.c:220
|
||||
msgid "Make X calls synchronous"
|
||||
msgstr "使用同步方式調用 X 函式"
|
||||
|
||||
#: src/core/main.c:226
|
||||
#: src/core/main.c:227
|
||||
msgid "Run as a wayland compositor"
|
||||
msgstr "以 wayland 組合器執行"
|
||||
|
||||
#: src/core/main.c:232
|
||||
#: src/core/main.c:233
|
||||
msgid "Run as a nested compositor"
|
||||
msgstr "以巢狀組合器執行"
|
||||
|
||||
#: src/core/main.c:240
|
||||
#: src/core/main.c:239
|
||||
msgid "Run wayland compositor without starting Xwayland"
|
||||
msgstr "在不啟動 Xwayland 的情況下開啟 Wayland 合成器"
|
||||
|
||||
#: src/core/main.c:247
|
||||
msgid "Run as a full display server, rather than nested"
|
||||
msgstr "以完全顯示伺服器執行,而非巢狀"
|
||||
|
||||
#: src/core/main.c:246
|
||||
#: src/core/main.c:253
|
||||
msgid "Run with X11 backend"
|
||||
msgstr "透過 X11 後端執行"
|
||||
|
||||
#. Translators: %s is a window title
|
||||
#: src/core/meta-close-dialog-default.c:147
|
||||
#: src/core/meta-close-dialog-default.c:148
|
||||
#, c-format
|
||||
msgid "“%s” is not responding."
|
||||
msgstr "「%s」沒有回應。"
|
||||
|
||||
#: src/core/meta-close-dialog-default.c:149
|
||||
#: src/core/meta-close-dialog-default.c:150
|
||||
msgid "Application is not responding."
|
||||
msgstr "應用程式沒有回應。"
|
||||
|
||||
#: src/core/meta-close-dialog-default.c:154
|
||||
#: src/core/meta-close-dialog-default.c:155
|
||||
msgid ""
|
||||
"You may choose to wait a short while for it to continue or force the "
|
||||
"application to quit entirely."
|
||||
msgstr "您可以選擇稍等一下讓它繼續,或者強制完全退出程式。"
|
||||
|
||||
#: src/core/meta-close-dialog-default.c:161
|
||||
#: src/core/meta-close-dialog-default.c:162
|
||||
msgid "_Force Quit"
|
||||
msgstr "強制退出(_F)"
|
||||
|
||||
#: src/core/meta-close-dialog-default.c:161
|
||||
#: src/core/meta-close-dialog-default.c:162
|
||||
msgid "_Wait"
|
||||
msgstr "等待(_W)"
|
||||
|
||||
@@ -640,25 +639,11 @@ msgid "Mutter plugin to use"
|
||||
msgstr "要使用的 Mutter 外掛程式"
|
||||
|
||||
# (Abel) take care of the same string in libwnck
|
||||
#: src/core/prefs.c:1997
|
||||
#: src/core/prefs.c:1787
|
||||
#, c-format
|
||||
msgid "Workspace %d"
|
||||
msgstr "工作區 %d"
|
||||
|
||||
#: src/core/screen.c:583
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Display “%s” already has a window manager; try using the --replace option to "
|
||||
"replace the current window manager."
|
||||
msgstr ""
|
||||
"畫面「%s」已經有了視窗管理員;請嘗試使用 --replace 選項來替換目前的視窗管理"
|
||||
"員。"
|
||||
|
||||
#: src/core/screen.c:668
|
||||
#, c-format
|
||||
msgid "Screen %d on display “%s” is invalid\n"
|
||||
msgstr "畫面「%2$s」中的第 %1$d 個螢幕無效\n"
|
||||
|
||||
#: src/core/util.c:120
|
||||
msgid "Mutter was compiled without support for verbose mode\n"
|
||||
msgstr "編譯 Mutter 時並沒有加入詳細偵錯模式的支援\n"
|
||||
@@ -668,13 +653,36 @@ msgstr "編譯 Mutter 時並沒有加入詳細偵錯模式的支援\n"
|
||||
msgid "Mode Switch: Mode %d"
|
||||
msgstr "模式切換:模式 %d"
|
||||
|
||||
#: src/x11/session.c:1818
|
||||
#: src/x11/meta-x11-display.c:666
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Display “%s” already has a window manager; try using the --replace option to "
|
||||
"replace the current window manager."
|
||||
msgstr ""
|
||||
"畫面「%s」已經有了視窗管理員;請嘗試使用 --replace 選項來替換目前的視窗管理"
|
||||
"員。"
|
||||
|
||||
#: src/x11/meta-x11-display.c:1010
|
||||
msgid "Failed to initialize GDK\n"
|
||||
msgstr "無法初始化 GDK\n"
|
||||
|
||||
#: src/x11/meta-x11-display.c:1034
|
||||
#, c-format
|
||||
msgid "Failed to open X Window System display “%s”\n"
|
||||
msgstr "無法開啟 X Window 系統畫面「%s」\n"
|
||||
|
||||
#: src/x11/meta-x11-display.c:1117
|
||||
#, c-format
|
||||
msgid "Screen %d on display “%s” is invalid\n"
|
||||
msgstr "畫面「%2$s」中的第 %1$d 個螢幕無效\n"
|
||||
|
||||
#: src/x11/session.c:1819
|
||||
msgid ""
|
||||
"These windows do not support “save current setup” and will have to be "
|
||||
"restarted manually next time you log in."
|
||||
msgstr "這些視窗不支援「儲存目前的設定」,必須在下次登入後自行啟動。"
|
||||
|
||||
#: src/x11/window-props.c:559
|
||||
#: src/x11/window-props.c:565
|
||||
#, c-format
|
||||
msgid "%s (on %s)"
|
||||
msgstr "%s(在 %s)"
|
||||
|
@@ -88,6 +88,8 @@ mutter_built_sources += \
|
||||
xdg-output-unstable-v1-server-protocol.h \
|
||||
xwayland-keyboard-grab-unstable-v1-protocol.c \
|
||||
xwayland-keyboard-grab-unstable-v1-server-protocol.h \
|
||||
text-input-unstable-v3-protocol.c \
|
||||
text-input-unstable-v3-server-protocol.h \
|
||||
gtk-text-input-protocol.c \
|
||||
gtk-text-input-server-protocol.h \
|
||||
$(NULL)
|
||||
@@ -459,6 +461,8 @@ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES += \
|
||||
wayland/meta-wayland-subsurface.h \
|
||||
wayland/meta-wayland-shell-surface.c \
|
||||
wayland/meta-wayland-shell-surface.h \
|
||||
wayland/meta-wayland-text-input-legacy.c \
|
||||
wayland/meta-wayland-text-input-legacy.h \
|
||||
wayland/meta-wayland-text-input.c \
|
||||
wayland/meta-wayland-text-input.h \
|
||||
wayland/meta-wayland-types.h \
|
||||
|
@@ -226,7 +226,7 @@ meta_idle_monitor_inhibited_actions_changed (GDBusProxy *session,
|
||||
{
|
||||
gboolean inhibited;
|
||||
|
||||
inhibited = g_variant_get_uint32 (v) & GSM_INHIBITOR_FLAG_IDLE;
|
||||
inhibited = !!(g_variant_get_uint32 (v) & GSM_INHIBITOR_FLAG_IDLE);
|
||||
g_variant_unref (v);
|
||||
|
||||
if (!inhibited)
|
||||
@@ -265,7 +265,8 @@ meta_idle_monitor_init (MetaIdleMonitor *monitor)
|
||||
"InhibitedActions");
|
||||
if (v)
|
||||
{
|
||||
monitor->inhibited = g_variant_get_uint32 (v) & GSM_INHIBITOR_FLAG_IDLE;
|
||||
monitor->inhibited = !!(g_variant_get_uint32 (v) &
|
||||
GSM_INHIBITOR_FLAG_IDLE);
|
||||
g_variant_unref (v);
|
||||
}
|
||||
}
|
||||
|
@@ -68,8 +68,6 @@ struct _MetaGpuKms
|
||||
int max_buffer_height;
|
||||
|
||||
gboolean page_flips_not_supported;
|
||||
|
||||
MetaKmsResources resources;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (MetaGpuKms, meta_gpu_kms, META_TYPE_GPU)
|
||||
@@ -728,29 +726,20 @@ init_outputs (MetaGpuKms *gpu_kms,
|
||||
setup_output_clones (gpu);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static void
|
||||
meta_kms_resources_init (MetaKmsResources *resources,
|
||||
int fd,
|
||||
GError **error)
|
||||
int fd)
|
||||
{
|
||||
drmModeRes *drm_resources;
|
||||
unsigned int i;
|
||||
|
||||
drm_resources = drmModeGetResources (fd);
|
||||
|
||||
if (drm_resources == NULL) {
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "No resources");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
resources->resources = drm_resources;
|
||||
|
||||
resources->n_encoders = (unsigned int) drm_resources->count_encoders;
|
||||
resources->encoders = g_new (drmModeEncoder *, resources->n_encoders);
|
||||
for (i = 0; i < resources->n_encoders; i++)
|
||||
resources->encoders[i] = drmModeGetEncoder (fd, drm_resources->encoders[i]);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -772,7 +761,9 @@ meta_gpu_kms_read_current (MetaGpu *gpu,
|
||||
MetaGpuKms *gpu_kms = META_GPU_KMS (gpu);
|
||||
MetaMonitorManager *monitor_manager =
|
||||
meta_gpu_get_monitor_manager (gpu);
|
||||
MetaKmsResources resources = gpu_kms->resources;
|
||||
MetaKmsResources resources;
|
||||
|
||||
meta_kms_resources_init (&resources, gpu_kms->fd);
|
||||
|
||||
gpu_kms->max_buffer_width = resources.resources->max_width;
|
||||
gpu_kms->max_buffer_height = resources.resources->max_height;
|
||||
@@ -821,11 +812,6 @@ meta_gpu_kms_new (MetaMonitorManagerKms *monitor_manager_kms,
|
||||
gpu_kms->fd = kms_fd;
|
||||
gpu_kms->file_path = g_strdup (kms_file_path);
|
||||
|
||||
if (!meta_kms_resources_init (&gpu_kms->resources, gpu_kms->fd, error)) {
|
||||
g_clear_object (&gpu_kms);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
drmSetClientCap (gpu_kms->fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
|
||||
|
||||
source = g_source_new (&kms_event_funcs, sizeof (MetaKmsSource));
|
||||
@@ -855,7 +841,7 @@ meta_gpu_kms_finalize (GObject *object)
|
||||
meta_launcher_close_restricted (launcher, gpu_kms->fd);
|
||||
g_clear_pointer (&gpu_kms->file_path, g_free);
|
||||
|
||||
g_clear_pointer (&gpu_kms->source, g_source_destroy);
|
||||
g_source_destroy (gpu_kms->source);
|
||||
|
||||
free_resources (gpu_kms);
|
||||
|
||||
|
@@ -1625,12 +1625,23 @@ gbm_get_next_fb_id (MetaGpuKms *gpu_kms,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
for (i = 0; i < gbm_bo_get_plane_count (next_bo); i++)
|
||||
if (gbm_bo_get_handle_for_plane (next_bo, 0).s32 == -1)
|
||||
{
|
||||
strides[i] = gbm_bo_get_stride_for_plane (next_bo, i);
|
||||
handles[i] = gbm_bo_get_handle_for_plane (next_bo, i).u32;
|
||||
offsets[i] = gbm_bo_get_offset (next_bo, i);
|
||||
modifiers[i] = gbm_bo_get_modifier (next_bo);
|
||||
/* Failed to fetch handle to plane, falling back to old method */
|
||||
strides[0] = gbm_bo_get_stride (next_bo);
|
||||
handles[0] = gbm_bo_get_handle (next_bo).u32;
|
||||
offsets[0] = 0;
|
||||
modifiers[0] = DRM_FORMAT_MOD_INVALID;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < gbm_bo_get_plane_count (next_bo); i++)
|
||||
{
|
||||
strides[i] = gbm_bo_get_stride_for_plane (next_bo, i);
|
||||
handles[i] = gbm_bo_get_handle_for_plane (next_bo, i).u32;
|
||||
offsets[i] = gbm_bo_get_offset (next_bo, i);
|
||||
modifiers[i] = gbm_bo_get_modifier (next_bo);
|
||||
}
|
||||
}
|
||||
|
||||
kms_fd = meta_gpu_kms_get_fd (gpu_kms);
|
||||
|
@@ -547,8 +547,9 @@ meta_backend_x11_grab_device (MetaBackend *backend,
|
||||
XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits };
|
||||
int ret;
|
||||
|
||||
if (timestamp != META_CURRENT_TIME)
|
||||
timestamp = MAX (timestamp, priv->latest_evtime);
|
||||
if (timestamp != META_CURRENT_TIME &&
|
||||
XSERVER_TIME_IS_BEFORE (timestamp, priv->latest_evtime))
|
||||
timestamp = priv->latest_evtime;
|
||||
|
||||
XISetMask (mask.mask, XI_ButtonPress);
|
||||
XISetMask (mask.mask, XI_ButtonRelease);
|
||||
|
@@ -1916,6 +1916,15 @@ process_event (MetaDisplay *display,
|
||||
if (meta_compositor_filter_keybinding (display->compositor, binding))
|
||||
goto not_found;
|
||||
|
||||
if (event->flags & CLUTTER_EVENT_FLAG_REPEATED &&
|
||||
binding->flags & META_KEY_BINDING_IGNORE_AUTOREPEAT)
|
||||
{
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Ignore autorepeat for handler %s\n",
|
||||
binding->name);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (binding->handler == NULL)
|
||||
meta_bug ("Binding %s has no handler\n", binding->name);
|
||||
else
|
||||
@@ -3585,73 +3594,85 @@ init_builtin_key_bindings (MetaDisplay *display)
|
||||
add_builtin_keybinding (display,
|
||||
"switch-to-workspace-1",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_NONE,
|
||||
META_KEY_BINDING_NONE |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_WORKSPACE_1,
|
||||
handle_switch_to_workspace, 0);
|
||||
add_builtin_keybinding (display,
|
||||
"switch-to-workspace-2",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_NONE,
|
||||
META_KEY_BINDING_NONE |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_WORKSPACE_2,
|
||||
handle_switch_to_workspace, 1);
|
||||
add_builtin_keybinding (display,
|
||||
"switch-to-workspace-3",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_NONE,
|
||||
META_KEY_BINDING_NONE |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_WORKSPACE_3,
|
||||
handle_switch_to_workspace, 2);
|
||||
add_builtin_keybinding (display,
|
||||
"switch-to-workspace-4",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_NONE,
|
||||
META_KEY_BINDING_NONE |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_WORKSPACE_4,
|
||||
handle_switch_to_workspace, 3);
|
||||
add_builtin_keybinding (display,
|
||||
"switch-to-workspace-5",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_NONE,
|
||||
META_KEY_BINDING_NONE |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_WORKSPACE_5,
|
||||
handle_switch_to_workspace, 4);
|
||||
add_builtin_keybinding (display,
|
||||
"switch-to-workspace-6",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_NONE,
|
||||
META_KEY_BINDING_NONE |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_WORKSPACE_6,
|
||||
handle_switch_to_workspace, 5);
|
||||
add_builtin_keybinding (display,
|
||||
"switch-to-workspace-7",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_NONE,
|
||||
META_KEY_BINDING_NONE |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_WORKSPACE_7,
|
||||
handle_switch_to_workspace, 6);
|
||||
add_builtin_keybinding (display,
|
||||
"switch-to-workspace-8",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_NONE,
|
||||
META_KEY_BINDING_NONE |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_WORKSPACE_8,
|
||||
handle_switch_to_workspace, 7);
|
||||
add_builtin_keybinding (display,
|
||||
"switch-to-workspace-9",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_NONE,
|
||||
META_KEY_BINDING_NONE |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_WORKSPACE_9,
|
||||
handle_switch_to_workspace, 8);
|
||||
add_builtin_keybinding (display,
|
||||
"switch-to-workspace-10",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_NONE,
|
||||
META_KEY_BINDING_NONE |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_WORKSPACE_10,
|
||||
handle_switch_to_workspace, 9);
|
||||
add_builtin_keybinding (display,
|
||||
"switch-to-workspace-11",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_NONE,
|
||||
META_KEY_BINDING_NONE |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_WORKSPACE_11,
|
||||
handle_switch_to_workspace, 10);
|
||||
add_builtin_keybinding (display,
|
||||
"switch-to-workspace-12",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_NONE,
|
||||
META_KEY_BINDING_NONE |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_WORKSPACE_12,
|
||||
handle_switch_to_workspace, 11);
|
||||
|
||||
@@ -3950,189 +3971,216 @@ init_builtin_key_bindings (MetaDisplay *display)
|
||||
add_builtin_keybinding (display,
|
||||
"activate-window-menu",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_ACTIVATE_WINDOW_MENU,
|
||||
handle_activate_window_menu, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"toggle-fullscreen",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_TOGGLE_FULLSCREEN,
|
||||
handle_toggle_fullscreen, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"toggle-maximized",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_TOGGLE_MAXIMIZED,
|
||||
handle_toggle_maximized, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"toggle-tiled-left",
|
||||
mutter_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_TOGGLE_TILED_LEFT,
|
||||
handle_toggle_tiled, META_TILE_LEFT);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"toggle-tiled-right",
|
||||
mutter_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_TOGGLE_TILED_RIGHT,
|
||||
handle_toggle_tiled, META_TILE_RIGHT);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"toggle-above",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_TOGGLE_ABOVE,
|
||||
handle_toggle_above, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"maximize",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MAXIMIZE,
|
||||
handle_maximize, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"unmaximize",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_UNMAXIMIZE,
|
||||
handle_unmaximize, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"toggle-shaded",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_TOGGLE_SHADED,
|
||||
handle_toggle_shaded, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"minimize",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MINIMIZE,
|
||||
handle_minimize, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"close",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_CLOSE,
|
||||
handle_close, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"begin-move",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_BEGIN_MOVE,
|
||||
handle_begin_move, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"begin-resize",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_BEGIN_RESIZE,
|
||||
handle_begin_resize, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"toggle-on-all-workspaces",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_TOGGLE_ON_ALL_WORKSPACES,
|
||||
handle_toggle_on_all_workspaces, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-workspace-1",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_WORKSPACE_1,
|
||||
handle_move_to_workspace, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-workspace-2",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_WORKSPACE_2,
|
||||
handle_move_to_workspace, 1);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-workspace-3",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_WORKSPACE_3,
|
||||
handle_move_to_workspace, 2);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-workspace-4",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_WORKSPACE_4,
|
||||
handle_move_to_workspace, 3);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-workspace-5",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_WORKSPACE_5,
|
||||
handle_move_to_workspace, 4);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-workspace-6",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_WORKSPACE_6,
|
||||
handle_move_to_workspace, 5);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-workspace-7",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_WORKSPACE_7,
|
||||
handle_move_to_workspace, 6);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-workspace-8",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_WORKSPACE_8,
|
||||
handle_move_to_workspace, 7);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-workspace-9",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_WORKSPACE_9,
|
||||
handle_move_to_workspace, 8);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-workspace-10",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_WORKSPACE_10,
|
||||
handle_move_to_workspace, 9);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-workspace-11",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_WORKSPACE_11,
|
||||
handle_move_to_workspace, 10);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-workspace-12",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_WORKSPACE_12,
|
||||
handle_move_to_workspace, 11);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-workspace-last",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_WORKSPACE_LAST,
|
||||
handle_move_to_workspace_last, 0);
|
||||
|
||||
@@ -4195,105 +4243,120 @@ init_builtin_key_bindings (MetaDisplay *display)
|
||||
add_builtin_keybinding (display,
|
||||
"raise-or-lower",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_RAISE_OR_LOWER,
|
||||
handle_raise_or_lower, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"raise",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_RAISE,
|
||||
handle_raise, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"lower",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_LOWER,
|
||||
handle_lower, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"maximize-vertically",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MAXIMIZE_VERTICALLY,
|
||||
handle_maximize_vertically, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"maximize-horizontally",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MAXIMIZE_HORIZONTALLY,
|
||||
handle_maximize_horizontally, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"always-on-top",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_ALWAYS_ON_TOP,
|
||||
handle_always_on_top, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-corner-nw",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_CORNER_NW,
|
||||
handle_move_to_corner_nw, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-corner-ne",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_CORNER_NE,
|
||||
handle_move_to_corner_ne, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-corner-sw",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_CORNER_SW,
|
||||
handle_move_to_corner_sw, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-corner-se",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_CORNER_SE,
|
||||
handle_move_to_corner_se, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-side-n",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_SIDE_N,
|
||||
handle_move_to_side_n, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-side-s",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_SIDE_S,
|
||||
handle_move_to_side_s, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-side-e",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_SIDE_E,
|
||||
handle_move_to_side_e, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-side-w",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_SIDE_W,
|
||||
handle_move_to_side_w, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"move-to-center",
|
||||
common_keybindings,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEY_BINDING_PER_WINDOW |
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT,
|
||||
META_KEYBINDING_ACTION_MOVE_TO_CENTER,
|
||||
handle_move_to_center, 0);
|
||||
|
||||
|
@@ -378,6 +378,7 @@ typedef enum
|
||||
META_KEY_BINDING_BUILTIN = 1 << 1,
|
||||
META_KEY_BINDING_IS_REVERSED = 1 << 2,
|
||||
META_KEY_BINDING_NON_MASKABLE = 1 << 3,
|
||||
META_KEY_BINDING_IGNORE_AUTOREPEAT = 1 << 4,
|
||||
} MetaKeyBindingFlags;
|
||||
|
||||
/**
|
||||
|
@@ -89,7 +89,7 @@ unbind_resource (struct wl_resource *resource)
|
||||
}
|
||||
|
||||
static int
|
||||
create_anonymous_file (off_t size,
|
||||
create_anonymous_file (off_t size,
|
||||
GError **error)
|
||||
{
|
||||
static const char template[] = "mutter-shared-XXXXXX";
|
||||
@@ -126,35 +126,66 @@ create_anonymous_file (off_t size,
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void
|
||||
send_keymap (MetaWaylandKeyboard *keyboard,
|
||||
struct wl_resource *resource)
|
||||
{
|
||||
MetaWaylandXkbInfo *xkb_info = &keyboard->xkb_info;
|
||||
GError *error = NULL;
|
||||
int fd;
|
||||
char *keymap_area;
|
||||
|
||||
if (!xkb_info->keymap_string)
|
||||
return;
|
||||
|
||||
fd = create_anonymous_file (xkb_info->keymap_size, &error);
|
||||
if (fd < 0)
|
||||
{
|
||||
g_warning ("Creating a keymap file for %lu bytes failed: %s",
|
||||
(unsigned long) xkb_info->keymap_size,
|
||||
error->message);
|
||||
g_clear_error (&error);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
keymap_area = mmap (NULL, xkb_info->keymap_size,
|
||||
PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
if (keymap_area == MAP_FAILED)
|
||||
{
|
||||
g_warning ("Failed to mmap() %lu bytes\n",
|
||||
(unsigned long) xkb_info->keymap_size);
|
||||
close (fd);
|
||||
return;
|
||||
}
|
||||
|
||||
strcpy (keymap_area, xkb_info->keymap_string);
|
||||
|
||||
munmap (keymap_area, xkb_info->keymap_size);
|
||||
|
||||
wl_keyboard_send_keymap (resource,
|
||||
WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,
|
||||
fd,
|
||||
keyboard->xkb_info.keymap_size);
|
||||
close (fd);
|
||||
}
|
||||
|
||||
static void
|
||||
inform_clients_of_new_keymap (MetaWaylandKeyboard *keyboard)
|
||||
{
|
||||
struct wl_resource *keyboard_resource;
|
||||
|
||||
wl_resource_for_each (keyboard_resource, &keyboard->resource_list)
|
||||
{
|
||||
wl_keyboard_send_keymap (keyboard_resource,
|
||||
WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,
|
||||
keyboard->xkb_info.keymap_fd,
|
||||
keyboard->xkb_info.keymap_size);
|
||||
}
|
||||
send_keymap (keyboard, keyboard_resource);
|
||||
wl_resource_for_each (keyboard_resource, &keyboard->focus_resource_list)
|
||||
{
|
||||
wl_keyboard_send_keymap (keyboard_resource,
|
||||
WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,
|
||||
keyboard->xkb_info.keymap_fd,
|
||||
keyboard->xkb_info.keymap_size);
|
||||
}
|
||||
send_keymap (keyboard, keyboard_resource);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wayland_keyboard_take_keymap (MetaWaylandKeyboard *keyboard,
|
||||
struct xkb_keymap *keymap)
|
||||
{
|
||||
MetaWaylandXkbInfo *xkb_info = &keyboard->xkb_info;
|
||||
GError *error = NULL;
|
||||
char *keymap_str;
|
||||
size_t previous_size;
|
||||
MetaWaylandXkbInfo *xkb_info = &keyboard->xkb_info;
|
||||
|
||||
if (keymap == NULL)
|
||||
{
|
||||
@@ -162,60 +193,24 @@ meta_wayland_keyboard_take_keymap (MetaWaylandKeyboard *keyboard,
|
||||
return;
|
||||
}
|
||||
|
||||
g_clear_pointer (&xkb_info->keymap_string, g_free);
|
||||
xkb_keymap_unref (xkb_info->keymap);
|
||||
xkb_info->keymap = xkb_keymap_ref (keymap);
|
||||
|
||||
meta_wayland_keyboard_update_xkb_state (keyboard);
|
||||
|
||||
keymap_str = xkb_map_get_as_string (xkb_info->keymap);
|
||||
if (keymap_str == NULL)
|
||||
xkb_info->keymap_string =
|
||||
xkb_keymap_get_as_string (xkb_info->keymap, XKB_KEYMAP_FORMAT_TEXT_V1);
|
||||
if (!xkb_info->keymap_string)
|
||||
{
|
||||
g_warning ("failed to get string version of keymap");
|
||||
g_warning ("Failed to get string version of keymap");
|
||||
return;
|
||||
}
|
||||
previous_size = xkb_info->keymap_size;
|
||||
xkb_info->keymap_size = strlen (keymap_str) + 1;
|
||||
|
||||
if (xkb_info->keymap_fd >= 0)
|
||||
close (xkb_info->keymap_fd);
|
||||
|
||||
xkb_info->keymap_fd = create_anonymous_file (xkb_info->keymap_size, &error);
|
||||
if (xkb_info->keymap_fd < 0)
|
||||
{
|
||||
g_warning ("creating a keymap file for %lu bytes failed: %s",
|
||||
(unsigned long) xkb_info->keymap_size,
|
||||
error->message);
|
||||
g_clear_error (&error);
|
||||
goto err_keymap_str;
|
||||
}
|
||||
|
||||
if (xkb_info->keymap_area)
|
||||
munmap (xkb_info->keymap_area, previous_size);
|
||||
|
||||
xkb_info->keymap_area = mmap (NULL, xkb_info->keymap_size,
|
||||
PROT_READ | PROT_WRITE,
|
||||
MAP_SHARED, xkb_info->keymap_fd, 0);
|
||||
if (xkb_info->keymap_area == MAP_FAILED)
|
||||
{
|
||||
g_warning ("failed to mmap() %lu bytes\n",
|
||||
(unsigned long) xkb_info->keymap_size);
|
||||
goto err_dev_zero;
|
||||
}
|
||||
strcpy (xkb_info->keymap_area, keymap_str);
|
||||
free (keymap_str);
|
||||
xkb_info->keymap_size = strlen (xkb_info->keymap_string) + 1;
|
||||
|
||||
inform_clients_of_new_keymap (keyboard);
|
||||
|
||||
notify_modifiers (keyboard);
|
||||
|
||||
return;
|
||||
|
||||
err_dev_zero:
|
||||
close (xkb_info->keymap_fd);
|
||||
xkb_info->keymap_fd = -1;
|
||||
err_keymap_str:
|
||||
free (keymap_str);
|
||||
return;
|
||||
}
|
||||
|
||||
static xkb_mod_mask_t
|
||||
@@ -298,14 +293,23 @@ meta_wayland_keyboard_broadcast_key (MetaWaylandKeyboard *keyboard,
|
||||
{
|
||||
MetaWaylandInputDevice *input_device =
|
||||
META_WAYLAND_INPUT_DEVICE (keyboard);
|
||||
uint32_t serial;
|
||||
|
||||
keyboard->key_serial =
|
||||
meta_wayland_input_device_next_serial (input_device);
|
||||
serial = meta_wayland_input_device_next_serial (input_device);
|
||||
|
||||
if (state)
|
||||
{
|
||||
keyboard->key_down_serial = serial;
|
||||
keyboard->key_down_keycode = key;
|
||||
}
|
||||
else
|
||||
{
|
||||
keyboard->key_up_serial = serial;
|
||||
keyboard->key_up_keycode = key;
|
||||
}
|
||||
|
||||
wl_resource_for_each (resource, &keyboard->focus_resource_list)
|
||||
{
|
||||
wl_keyboard_send_key (resource, keyboard->key_serial, time, key, state);
|
||||
}
|
||||
wl_keyboard_send_key (resource, serial, time, key, state);
|
||||
}
|
||||
|
||||
/* Eat the key events if we have a focused surface. */
|
||||
@@ -643,10 +647,9 @@ default_grab_key (MetaWaylandKeyboardGrab *grab,
|
||||
MetaBackend *backend = meta_get_backend ();
|
||||
#endif
|
||||
|
||||
/* Synthetic key events are for autorepeat. Ignore those, as
|
||||
* autorepeat in Wayland is done on the client side. */
|
||||
if ((event->key.flags & CLUTTER_EVENT_FLAG_SYNTHETIC) &&
|
||||
!(event->key.flags & CLUTTER_EVENT_FLAG_INPUT_METHOD))
|
||||
/* Ignore autorepeat events, as autorepeat in Wayland is done on the client
|
||||
* side. */
|
||||
if (event->key.flags & CLUTTER_EVENT_FLAG_REPEATED)
|
||||
return FALSE;
|
||||
|
||||
#ifdef HAVE_NATIVE_BACKEND
|
||||
@@ -707,28 +710,12 @@ meta_wayland_keyboard_enable (MetaWaylandKeyboard *keyboard)
|
||||
maybe_restore_numlock_state (keyboard);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wayland_xkb_info_init (MetaWaylandXkbInfo *xkb_info)
|
||||
{
|
||||
xkb_info->keymap_fd = -1;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wayland_xkb_info_destroy (MetaWaylandXkbInfo *xkb_info)
|
||||
{
|
||||
g_clear_pointer (&xkb_info->keymap, xkb_keymap_unref);
|
||||
g_clear_pointer (&xkb_info->state, xkb_state_unref);
|
||||
|
||||
if (xkb_info->keymap_area)
|
||||
{
|
||||
munmap (xkb_info->keymap_area, xkb_info->keymap_size);
|
||||
xkb_info->keymap_area = NULL;
|
||||
}
|
||||
if (xkb_info->keymap_fd >= 0)
|
||||
{
|
||||
close (xkb_info->keymap_fd);
|
||||
xkb_info->keymap_fd = -1;
|
||||
}
|
||||
g_clear_pointer (&xkb_info->keymap_string, g_free);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1001,10 +988,7 @@ meta_wayland_keyboard_create_new_resource (MetaWaylandKeyboard *keyboard,
|
||||
wl_resource_set_implementation (resource, &keyboard_interface,
|
||||
keyboard, unbind_resource);
|
||||
|
||||
wl_keyboard_send_keymap (resource,
|
||||
WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,
|
||||
keyboard->xkb_info.keymap_fd,
|
||||
keyboard->xkb_info.keymap_size);
|
||||
send_keymap (keyboard, resource);
|
||||
|
||||
notify_key_repeat_for_resource (keyboard, resource);
|
||||
|
||||
@@ -1026,7 +1010,9 @@ gboolean
|
||||
meta_wayland_keyboard_can_popup (MetaWaylandKeyboard *keyboard,
|
||||
uint32_t serial)
|
||||
{
|
||||
return keyboard->key_serial == serial;
|
||||
return (keyboard->key_down_serial == serial ||
|
||||
((keyboard->key_down_keycode == keyboard->key_up_keycode) &&
|
||||
keyboard->key_up_serial == serial));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1050,8 +1036,6 @@ meta_wayland_keyboard_init (MetaWaylandKeyboard *keyboard)
|
||||
wl_list_init (&keyboard->resource_list);
|
||||
wl_list_init (&keyboard->focus_resource_list);
|
||||
|
||||
meta_wayland_xkb_info_init (&keyboard->xkb_info);
|
||||
|
||||
keyboard->default_grab.interface = &default_keyboard_grab_interface;
|
||||
keyboard->default_grab.keyboard = keyboard;
|
||||
keyboard->grab = &keyboard->default_grab;
|
||||
|
@@ -74,9 +74,8 @@ typedef struct
|
||||
{
|
||||
struct xkb_keymap *keymap;
|
||||
struct xkb_state *state;
|
||||
int keymap_fd;
|
||||
size_t keymap_size;
|
||||
char *keymap_area;
|
||||
char *keymap_string;
|
||||
} MetaWaylandXkbInfo;
|
||||
|
||||
struct _MetaWaylandKeyboard
|
||||
@@ -89,7 +88,12 @@ struct _MetaWaylandKeyboard
|
||||
MetaWaylandSurface *focus_surface;
|
||||
struct wl_listener focus_surface_listener;
|
||||
uint32_t focus_serial;
|
||||
uint32_t key_serial;
|
||||
|
||||
uint32_t key_down_keycode;
|
||||
uint32_t key_down_serial;
|
||||
|
||||
uint32_t key_up_keycode;
|
||||
uint32_t key_up_serial;
|
||||
|
||||
MetaWaylandXkbInfo xkb_info;
|
||||
enum xkb_state_component mods_changed;
|
||||
|
@@ -226,6 +226,7 @@ meta_wayland_seat_new (MetaWaylandCompositor *compositor,
|
||||
NULL);
|
||||
|
||||
seat->text_input = meta_wayland_text_input_new (seat);
|
||||
seat->gtk_text_input = meta_wayland_gtk_text_input_new (seat);
|
||||
|
||||
meta_wayland_data_device_init (&seat->data_device);
|
||||
|
||||
@@ -262,6 +263,7 @@ meta_wayland_seat_free (MetaWaylandSeat *seat)
|
||||
g_object_unref (seat->pointer);
|
||||
g_object_unref (seat->keyboard);
|
||||
g_object_unref (seat->touch);
|
||||
meta_wayland_gtk_text_input_destroy (seat->gtk_text_input);
|
||||
meta_wayland_text_input_destroy (seat->text_input);
|
||||
|
||||
g_slice_free (MetaWaylandSeat, seat);
|
||||
@@ -385,6 +387,10 @@ meta_wayland_seat_handle_event (MetaWaylandSeat *seat,
|
||||
if (meta_wayland_text_input_handle_event (seat->text_input, event))
|
||||
return TRUE;
|
||||
|
||||
if (meta_wayland_gtk_text_input_handle_event (seat->gtk_text_input,
|
||||
event))
|
||||
return TRUE;
|
||||
|
||||
if (meta_wayland_seat_has_keyboard (seat))
|
||||
return meta_wayland_keyboard_handle_event (seat->keyboard,
|
||||
(const ClutterKeyEvent *) event);
|
||||
@@ -429,6 +435,7 @@ meta_wayland_seat_set_input_focus (MetaWaylandSeat *seat,
|
||||
meta_wayland_tablet_seat_set_pad_focus (tablet_seat, surface);
|
||||
|
||||
meta_wayland_text_input_set_focus (seat->text_input, surface);
|
||||
meta_wayland_gtk_text_input_set_focus (seat->gtk_text_input, surface);
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
@@ -33,6 +33,7 @@
|
||||
#include "meta-wayland-data-device.h"
|
||||
#include "meta-wayland-tablet-tool.h"
|
||||
#include "meta-wayland-text-input.h"
|
||||
#include "meta-wayland-text-input-legacy.h"
|
||||
|
||||
struct _MetaWaylandSeat
|
||||
{
|
||||
@@ -45,6 +46,7 @@ struct _MetaWaylandSeat
|
||||
|
||||
MetaWaylandDataDevice data_device;
|
||||
|
||||
MetaWaylandGtkTextInput *gtk_text_input;
|
||||
MetaWaylandTextInput *text_input;
|
||||
|
||||
guint capabilities;
|
||||
|
626
src/wayland/meta-wayland-text-input-legacy.c
Normal file
626
src/wayland/meta-wayland-text-input-legacy.c
Normal file
@@ -0,0 +1,626 @@
|
||||
/*
|
||||
* Copyright (C) 2017, 2018 Red Hat
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*
|
||||
* Author: Carlos Garnacho <carlosg@gnome.org>
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <wayland-server.h>
|
||||
|
||||
#include "gtk-text-input-server-protocol.h"
|
||||
#include "wayland/meta-wayland-private.h"
|
||||
#include "wayland/meta-wayland-seat.h"
|
||||
#include "wayland/meta-wayland-text-input-legacy.h"
|
||||
#include "wayland/meta-wayland-versions.h"
|
||||
|
||||
#define META_TYPE_WAYLAND_GTK_TEXT_INPUT_FOCUS (meta_wayland_gtk_text_input_focus_get_type ())
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_WAYLAND_PENDING_STATE_NONE = 0,
|
||||
META_WAYLAND_PENDING_STATE_INPUT_RECT = 1 << 0,
|
||||
META_WAYLAND_PENDING_STATE_CONTENT_TYPE = 1 << 1,
|
||||
META_WAYLAND_PENDING_STATE_SURROUNDING_TEXT = 1 << 2,
|
||||
} MetaWaylandTextInputPendingState;
|
||||
|
||||
typedef struct _MetaWaylandGtkTextInput MetaWaylandGtkTextInput;
|
||||
|
||||
struct _MetaWaylandGtkTextInput
|
||||
{
|
||||
MetaWaylandSeat *seat;
|
||||
ClutterInputFocus *input_focus;
|
||||
|
||||
struct wl_list resource_list;
|
||||
struct wl_list focus_resource_list;
|
||||
MetaWaylandSurface *surface;
|
||||
struct wl_listener surface_listener;
|
||||
uint32_t focus_serial;
|
||||
|
||||
MetaWaylandTextInputPendingState pending_state;
|
||||
|
||||
struct
|
||||
{
|
||||
char *text;
|
||||
uint32_t cursor;
|
||||
uint32_t anchor;
|
||||
} surrounding;
|
||||
|
||||
cairo_rectangle_int_t cursor_rect;
|
||||
|
||||
uint32_t content_type_hint;
|
||||
uint32_t content_type_purpose;
|
||||
};
|
||||
|
||||
struct _MetaWaylandGtkTextInputFocus
|
||||
{
|
||||
ClutterInputFocus parent_instance;
|
||||
MetaWaylandGtkTextInput *text_input;
|
||||
};
|
||||
|
||||
G_DECLARE_FINAL_TYPE (MetaWaylandGtkTextInputFocus,
|
||||
meta_wayland_gtk_text_input_focus,
|
||||
META, WAYLAND_GTK_TEXT_INPUT_FOCUS, ClutterInputFocus)
|
||||
G_DEFINE_TYPE (MetaWaylandGtkTextInputFocus, meta_wayland_gtk_text_input_focus,
|
||||
CLUTTER_TYPE_INPUT_FOCUS)
|
||||
|
||||
static void
|
||||
meta_wayland_text_input_focus_request_surrounding (ClutterInputFocus *focus)
|
||||
{
|
||||
MetaWaylandGtkTextInput *text_input;
|
||||
|
||||
text_input = META_WAYLAND_GTK_TEXT_INPUT_FOCUS (focus)->text_input;
|
||||
clutter_input_focus_set_surrounding (focus,
|
||||
text_input->surrounding.text,
|
||||
text_input->surrounding.cursor,
|
||||
text_input->surrounding.anchor);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wayland_text_input_focus_delete_surrounding (ClutterInputFocus *focus,
|
||||
guint cursor,
|
||||
guint len)
|
||||
{
|
||||
MetaWaylandGtkTextInput *text_input;
|
||||
struct wl_resource *resource;
|
||||
|
||||
text_input = META_WAYLAND_GTK_TEXT_INPUT_FOCUS (focus)->text_input;
|
||||
|
||||
wl_resource_for_each (resource, &text_input->focus_resource_list)
|
||||
{
|
||||
gtk_text_input_send_delete_surrounding_text (resource, cursor, len);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wayland_text_input_focus_commit_text (ClutterInputFocus *focus,
|
||||
const gchar *text)
|
||||
{
|
||||
MetaWaylandGtkTextInput *text_input;
|
||||
struct wl_resource *resource;
|
||||
|
||||
text_input = META_WAYLAND_GTK_TEXT_INPUT_FOCUS (focus)->text_input;
|
||||
|
||||
wl_resource_for_each (resource, &text_input->focus_resource_list)
|
||||
{
|
||||
gtk_text_input_send_preedit_string (resource, NULL, 0);
|
||||
gtk_text_input_send_commit_string (resource, text);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wayland_text_input_focus_set_preedit_text (ClutterInputFocus *focus,
|
||||
const gchar *text,
|
||||
guint cursor)
|
||||
{
|
||||
MetaWaylandGtkTextInput *text_input;
|
||||
struct wl_resource *resource;
|
||||
|
||||
text_input = META_WAYLAND_GTK_TEXT_INPUT_FOCUS (focus)->text_input;
|
||||
|
||||
wl_resource_for_each (resource, &text_input->focus_resource_list)
|
||||
{
|
||||
gtk_text_input_send_preedit_string (resource, text, cursor);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wayland_gtk_text_input_focus_class_init (MetaWaylandGtkTextInputFocusClass *klass)
|
||||
{
|
||||
ClutterInputFocusClass *focus_class = CLUTTER_INPUT_FOCUS_CLASS (klass);
|
||||
|
||||
focus_class->request_surrounding = meta_wayland_text_input_focus_request_surrounding;
|
||||
focus_class->delete_surrounding = meta_wayland_text_input_focus_delete_surrounding;
|
||||
focus_class->commit_text = meta_wayland_text_input_focus_commit_text;
|
||||
focus_class->set_preedit_text = meta_wayland_text_input_focus_set_preedit_text;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wayland_gtk_text_input_focus_init (MetaWaylandGtkTextInputFocus *focus)
|
||||
{
|
||||
}
|
||||
|
||||
static ClutterInputFocus *
|
||||
meta_wayland_text_input_focus_new (MetaWaylandGtkTextInput *text_input)
|
||||
{
|
||||
MetaWaylandGtkTextInputFocus *focus;
|
||||
|
||||
focus = g_object_new (META_TYPE_WAYLAND_GTK_TEXT_INPUT_FOCUS, NULL);
|
||||
focus->text_input = text_input;
|
||||
|
||||
return CLUTTER_INPUT_FOCUS (focus);
|
||||
}
|
||||
|
||||
static void
|
||||
text_input_handle_focus_surface_destroy (struct wl_listener *listener,
|
||||
void *data)
|
||||
{
|
||||
MetaWaylandGtkTextInput *text_input = wl_container_of (listener, text_input,
|
||||
surface_listener);
|
||||
|
||||
meta_wayland_gtk_text_input_set_focus (text_input, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
move_resources (struct wl_list *destination, struct wl_list *source)
|
||||
{
|
||||
wl_list_insert_list (destination, source);
|
||||
wl_list_init (source);
|
||||
}
|
||||
|
||||
static void
|
||||
move_resources_for_client (struct wl_list *destination,
|
||||
struct wl_list *source,
|
||||
struct wl_client *client)
|
||||
{
|
||||
struct wl_resource *resource, *tmp;
|
||||
wl_resource_for_each_safe (resource, tmp, source)
|
||||
{
|
||||
if (wl_resource_get_client (resource) == client)
|
||||
{
|
||||
wl_list_remove (wl_resource_get_link (resource));
|
||||
wl_list_insert (destination, wl_resource_get_link (resource));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_gtk_text_input_set_focus (MetaWaylandGtkTextInput *text_input,
|
||||
MetaWaylandSurface *surface)
|
||||
{
|
||||
if (text_input->surface == surface)
|
||||
return;
|
||||
|
||||
text_input->pending_state = META_WAYLAND_PENDING_STATE_NONE;
|
||||
|
||||
if (text_input->surface)
|
||||
{
|
||||
if (!wl_list_empty (&text_input->focus_resource_list))
|
||||
{
|
||||
ClutterInputFocus *focus = text_input->input_focus;
|
||||
ClutterInputMethod *input_method;
|
||||
struct wl_resource *resource;
|
||||
uint32_t serial;
|
||||
|
||||
if (clutter_input_focus_is_focused (focus))
|
||||
{
|
||||
input_method = clutter_backend_get_input_method (clutter_get_default_backend ());
|
||||
clutter_input_method_focus_out (input_method);
|
||||
}
|
||||
|
||||
serial = wl_display_next_serial (text_input->seat->wl_display);
|
||||
|
||||
wl_resource_for_each (resource, &text_input->focus_resource_list)
|
||||
{
|
||||
gtk_text_input_send_leave (resource, serial,
|
||||
text_input->surface->resource);
|
||||
}
|
||||
|
||||
move_resources (&text_input->resource_list,
|
||||
&text_input->focus_resource_list);
|
||||
}
|
||||
|
||||
wl_list_remove (&text_input->surface_listener.link);
|
||||
text_input->surface = NULL;
|
||||
}
|
||||
|
||||
if (surface)
|
||||
{
|
||||
struct wl_resource *focus_surface_resource;
|
||||
|
||||
text_input->surface = surface;
|
||||
focus_surface_resource = text_input->surface->resource;
|
||||
wl_resource_add_destroy_listener (focus_surface_resource,
|
||||
&text_input->surface_listener);
|
||||
|
||||
move_resources_for_client (&text_input->focus_resource_list,
|
||||
&text_input->resource_list,
|
||||
wl_resource_get_client (focus_surface_resource));
|
||||
|
||||
if (!wl_list_empty (&text_input->focus_resource_list))
|
||||
{
|
||||
struct wl_resource *resource;
|
||||
|
||||
text_input->focus_serial =
|
||||
wl_display_next_serial (text_input->seat->wl_display);
|
||||
|
||||
wl_resource_for_each (resource, &text_input->focus_resource_list)
|
||||
{
|
||||
gtk_text_input_send_enter (resource, text_input->focus_serial,
|
||||
surface->resource);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
unbind_resource (struct wl_resource *resource)
|
||||
{
|
||||
wl_list_remove (wl_resource_get_link (resource));
|
||||
}
|
||||
|
||||
static void
|
||||
text_input_destroy (struct wl_client *client,
|
||||
struct wl_resource *resource)
|
||||
{
|
||||
wl_resource_destroy (resource);
|
||||
}
|
||||
|
||||
static void
|
||||
text_input_enable (struct wl_client *client,
|
||||
struct wl_resource *resource,
|
||||
uint32_t serial,
|
||||
uint32_t flags)
|
||||
{
|
||||
MetaWaylandGtkTextInput *text_input = wl_resource_get_user_data (resource);
|
||||
ClutterInputFocus *focus = text_input->input_focus;
|
||||
ClutterInputMethod *input_method;
|
||||
gboolean show_preedit;
|
||||
|
||||
if (serial != text_input->focus_serial)
|
||||
return;
|
||||
|
||||
if (!clutter_input_focus_is_focused (focus))
|
||||
{
|
||||
input_method = clutter_backend_get_input_method (clutter_get_default_backend ());
|
||||
if (input_method)
|
||||
clutter_input_method_focus_in (input_method, focus);
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
show_preedit = (flags & GTK_TEXT_INPUT_ENABLE_FLAGS_CAN_SHOW_PREEDIT) != 0;
|
||||
clutter_input_focus_set_can_show_preedit (focus, show_preedit);
|
||||
|
||||
if (flags & GTK_TEXT_INPUT_ENABLE_FLAGS_TOGGLE_INPUT_PANEL)
|
||||
clutter_input_focus_request_toggle_input_panel (focus);
|
||||
}
|
||||
|
||||
static void
|
||||
text_input_disable (struct wl_client *client,
|
||||
struct wl_resource *resource)
|
||||
{
|
||||
MetaWaylandGtkTextInput *text_input = wl_resource_get_user_data (resource);
|
||||
ClutterInputFocus *focus = text_input->input_focus;
|
||||
ClutterInputMethod *input_method;
|
||||
|
||||
if (!clutter_input_focus_is_focused (focus))
|
||||
return;
|
||||
|
||||
clutter_input_focus_reset (text_input->input_focus);
|
||||
text_input->pending_state = META_WAYLAND_PENDING_STATE_NONE;
|
||||
|
||||
input_method = clutter_backend_get_input_method (clutter_get_default_backend ());
|
||||
clutter_input_method_focus_out (input_method);
|
||||
}
|
||||
|
||||
static void
|
||||
text_input_set_surrounding_text (struct wl_client *client,
|
||||
struct wl_resource *resource,
|
||||
const char *text,
|
||||
int32_t cursor,
|
||||
int32_t anchor)
|
||||
{
|
||||
MetaWaylandGtkTextInput *text_input = wl_resource_get_user_data (resource);
|
||||
|
||||
g_free (text_input->surrounding.text);
|
||||
text_input->surrounding.text = g_strdup (text);
|
||||
text_input->surrounding.cursor = cursor;
|
||||
text_input->surrounding.anchor = anchor;
|
||||
text_input->pending_state |= META_WAYLAND_PENDING_STATE_SURROUNDING_TEXT;
|
||||
}
|
||||
|
||||
static ClutterInputContentHintFlags
|
||||
translate_hints (uint32_t hints)
|
||||
{
|
||||
ClutterInputContentHintFlags clutter_hints = 0;
|
||||
|
||||
if (hints & GTK_TEXT_INPUT_CONTENT_HINT_COMPLETION)
|
||||
clutter_hints |= CLUTTER_INPUT_CONTENT_HINT_COMPLETION;
|
||||
if (hints & GTK_TEXT_INPUT_CONTENT_HINT_SPELLCHECK)
|
||||
clutter_hints |= CLUTTER_INPUT_CONTENT_HINT_SPELLCHECK;
|
||||
if (hints & GTK_TEXT_INPUT_CONTENT_HINT_AUTO_CAPITALIZATION)
|
||||
clutter_hints |= CLUTTER_INPUT_CONTENT_HINT_AUTO_CAPITALIZATION;
|
||||
if (hints & GTK_TEXT_INPUT_CONTENT_HINT_LOWERCASE)
|
||||
clutter_hints |= CLUTTER_INPUT_CONTENT_HINT_LOWERCASE;
|
||||
if (hints & GTK_TEXT_INPUT_CONTENT_HINT_UPPERCASE)
|
||||
clutter_hints |= CLUTTER_INPUT_CONTENT_HINT_UPPERCASE;
|
||||
if (hints & GTK_TEXT_INPUT_CONTENT_HINT_TITLECASE)
|
||||
clutter_hints |= CLUTTER_INPUT_CONTENT_HINT_TITLECASE;
|
||||
if (hints & GTK_TEXT_INPUT_CONTENT_HINT_HIDDEN_TEXT)
|
||||
clutter_hints |= CLUTTER_INPUT_CONTENT_HINT_HIDDEN_TEXT;
|
||||
if (hints & GTK_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA)
|
||||
clutter_hints |= CLUTTER_INPUT_CONTENT_HINT_SENSITIVE_DATA;
|
||||
if (hints & GTK_TEXT_INPUT_CONTENT_HINT_LATIN)
|
||||
clutter_hints |= CLUTTER_INPUT_CONTENT_HINT_LATIN;
|
||||
if (hints & GTK_TEXT_INPUT_CONTENT_HINT_MULTILINE)
|
||||
clutter_hints |= CLUTTER_INPUT_CONTENT_HINT_MULTILINE;
|
||||
|
||||
return clutter_hints;
|
||||
}
|
||||
|
||||
static ClutterInputContentPurpose
|
||||
translate_purpose (uint32_t purpose)
|
||||
{
|
||||
switch (purpose)
|
||||
{
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_NORMAL:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_NORMAL;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_ALPHA:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_ALPHA;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_DIGITS:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_DIGITS;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_NUMBER:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_NUMBER;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_PHONE:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_PHONE;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_URL:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_URL;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_EMAIL:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_EMAIL;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_NAME:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_NAME;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_PASSWORD:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_PASSWORD;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_DATE:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_DATE;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_TIME:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_TIME;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_DATETIME:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_DATETIME;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_TERMINAL:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_TERMINAL;
|
||||
}
|
||||
|
||||
g_warn_if_reached ();
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_NORMAL;
|
||||
}
|
||||
|
||||
static void
|
||||
text_input_set_content_type (struct wl_client *client,
|
||||
struct wl_resource *resource,
|
||||
uint32_t hint,
|
||||
uint32_t purpose)
|
||||
{
|
||||
MetaWaylandGtkTextInput *text_input = wl_resource_get_user_data (resource);
|
||||
|
||||
if (!text_input->surface)
|
||||
return;
|
||||
|
||||
text_input->content_type_hint = hint;
|
||||
text_input->content_type_purpose = purpose;
|
||||
text_input->pending_state |= META_WAYLAND_PENDING_STATE_CONTENT_TYPE;
|
||||
}
|
||||
|
||||
static void
|
||||
text_input_set_cursor_rectangle (struct wl_client *client,
|
||||
struct wl_resource *resource,
|
||||
int32_t x,
|
||||
int32_t y,
|
||||
int32_t width,
|
||||
int32_t height)
|
||||
{
|
||||
MetaWaylandGtkTextInput *text_input = wl_resource_get_user_data (resource);
|
||||
|
||||
if (!text_input->surface)
|
||||
return;
|
||||
|
||||
text_input->cursor_rect = (cairo_rectangle_int_t) { x, y, width, height };
|
||||
text_input->pending_state |= META_WAYLAND_PENDING_STATE_INPUT_RECT;
|
||||
}
|
||||
|
||||
static void
|
||||
text_input_commit_state (struct wl_client *client,
|
||||
struct wl_resource *resource)
|
||||
{
|
||||
MetaWaylandGtkTextInput *text_input = wl_resource_get_user_data (resource);
|
||||
ClutterInputFocus *focus = text_input->input_focus;
|
||||
|
||||
if (!clutter_input_focus_is_focused (focus))
|
||||
return;
|
||||
if (text_input->surface == NULL)
|
||||
return;
|
||||
|
||||
if (text_input->pending_state & META_WAYLAND_PENDING_STATE_CONTENT_TYPE)
|
||||
{
|
||||
clutter_input_focus_set_content_hints (text_input->input_focus,
|
||||
translate_hints (text_input->content_type_hint));
|
||||
clutter_input_focus_set_content_purpose (text_input->input_focus,
|
||||
translate_purpose (text_input->content_type_purpose));
|
||||
}
|
||||
|
||||
if (text_input->pending_state & META_WAYLAND_PENDING_STATE_SURROUNDING_TEXT)
|
||||
{
|
||||
clutter_input_focus_set_surrounding (text_input->input_focus,
|
||||
text_input->surrounding.text,
|
||||
text_input->surrounding.cursor,
|
||||
text_input->surrounding.anchor);
|
||||
}
|
||||
|
||||
if (text_input->pending_state & META_WAYLAND_PENDING_STATE_INPUT_RECT)
|
||||
{
|
||||
ClutterRect cursor_rect;
|
||||
float x1, y1, x2, y2;
|
||||
cairo_rectangle_int_t rect;
|
||||
|
||||
rect = text_input->cursor_rect;
|
||||
meta_wayland_surface_get_absolute_coordinates (text_input->surface,
|
||||
rect.x, rect.y, &x1, &y1);
|
||||
meta_wayland_surface_get_absolute_coordinates (text_input->surface,
|
||||
rect.x + rect.width,
|
||||
rect.y + rect.height,
|
||||
&x2, &y2);
|
||||
|
||||
clutter_rect_init (&cursor_rect, x1, y1, x2 - x1, y2 - y1);
|
||||
clutter_input_focus_set_cursor_location (text_input->input_focus,
|
||||
&cursor_rect);
|
||||
}
|
||||
|
||||
text_input->pending_state = META_WAYLAND_PENDING_STATE_NONE;
|
||||
}
|
||||
|
||||
static struct gtk_text_input_interface meta_text_input_interface = {
|
||||
text_input_destroy,
|
||||
text_input_enable,
|
||||
text_input_disable,
|
||||
text_input_set_surrounding_text,
|
||||
text_input_set_content_type,
|
||||
text_input_set_cursor_rectangle,
|
||||
text_input_commit_state,
|
||||
};
|
||||
|
||||
MetaWaylandGtkTextInput *
|
||||
meta_wayland_gtk_text_input_new (MetaWaylandSeat *seat)
|
||||
{
|
||||
MetaWaylandGtkTextInput *text_input;
|
||||
|
||||
text_input = g_new0 (MetaWaylandGtkTextInput, 1);
|
||||
text_input->input_focus = meta_wayland_text_input_focus_new (text_input);
|
||||
text_input->seat = seat;
|
||||
|
||||
wl_list_init (&text_input->resource_list);
|
||||
wl_list_init (&text_input->focus_resource_list);
|
||||
text_input->surface_listener.notify = text_input_handle_focus_surface_destroy;
|
||||
|
||||
return text_input;
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_gtk_text_input_destroy (MetaWaylandGtkTextInput *text_input)
|
||||
{
|
||||
meta_wayland_gtk_text_input_set_focus (text_input, NULL);
|
||||
g_object_unref (text_input->input_focus);
|
||||
g_free (text_input);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wayland_text_input_create_new_resource (MetaWaylandGtkTextInput *text_input,
|
||||
struct wl_client *client,
|
||||
struct wl_resource *seat_resource,
|
||||
uint32_t id)
|
||||
{
|
||||
struct wl_resource *text_input_resource;
|
||||
|
||||
text_input_resource = wl_resource_create (client,
|
||||
>k_text_input_interface,
|
||||
META_GTK_TEXT_INPUT_VERSION,
|
||||
id);
|
||||
|
||||
wl_resource_set_implementation (text_input_resource,
|
||||
&meta_text_input_interface,
|
||||
text_input, unbind_resource);
|
||||
|
||||
if (text_input->surface &&
|
||||
wl_resource_get_client (text_input->surface->resource) == client)
|
||||
{
|
||||
wl_list_insert (&text_input->focus_resource_list,
|
||||
wl_resource_get_link (text_input_resource));
|
||||
|
||||
gtk_text_input_send_enter (text_input_resource,
|
||||
text_input->focus_serial,
|
||||
text_input->surface->resource);
|
||||
}
|
||||
else
|
||||
{
|
||||
wl_list_insert (&text_input->resource_list,
|
||||
wl_resource_get_link (text_input_resource));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
text_input_manager_destroy (struct wl_client *client,
|
||||
struct wl_resource *resource)
|
||||
{
|
||||
wl_resource_destroy (resource);
|
||||
}
|
||||
|
||||
static void
|
||||
text_input_manager_get_text_input (struct wl_client *client,
|
||||
struct wl_resource *resource,
|
||||
uint32_t id,
|
||||
struct wl_resource *seat_resource)
|
||||
{
|
||||
MetaWaylandSeat *seat = wl_resource_get_user_data (seat_resource);
|
||||
|
||||
meta_wayland_text_input_create_new_resource (seat->gtk_text_input, client,
|
||||
seat_resource, id);
|
||||
}
|
||||
|
||||
static struct gtk_text_input_manager_interface meta_text_input_manager_interface = {
|
||||
text_input_manager_destroy,
|
||||
text_input_manager_get_text_input,
|
||||
};
|
||||
|
||||
static void
|
||||
bind_text_input (struct wl_client *client,
|
||||
void *data,
|
||||
uint32_t version,
|
||||
uint32_t id)
|
||||
{
|
||||
struct wl_resource *resource;
|
||||
|
||||
resource = wl_resource_create (client,
|
||||
>k_text_input_manager_interface,
|
||||
META_GTK_TEXT_INPUT_VERSION,
|
||||
id);
|
||||
wl_resource_set_implementation (resource,
|
||||
&meta_text_input_manager_interface,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_wayland_gtk_text_input_init (MetaWaylandCompositor *compositor)
|
||||
{
|
||||
return (wl_global_create (compositor->wayland_display,
|
||||
>k_text_input_manager_interface,
|
||||
META_GTK_TEXT_INPUT_VERSION,
|
||||
compositor->seat->gtk_text_input,
|
||||
bind_text_input) != NULL);
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_wayland_gtk_text_input_handle_event (MetaWaylandGtkTextInput *text_input,
|
||||
const ClutterEvent *event)
|
||||
{
|
||||
if (!text_input->surface ||
|
||||
!clutter_input_focus_is_focused (text_input->input_focus))
|
||||
return FALSE;
|
||||
|
||||
return clutter_input_focus_filter_key_event (text_input->input_focus,
|
||||
(const ClutterKeyEvent *) event);
|
||||
}
|
42
src/wayland/meta-wayland-text-input-legacy.h
Normal file
42
src/wayland/meta-wayland-text-input-legacy.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Red Hat
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*
|
||||
* Author: Carlos Garnacho <carlosg@gnome.org>
|
||||
*/
|
||||
|
||||
#ifndef META_WAYLAND_GTK_TEXT_INPUT_H
|
||||
#define META_WAYLAND_GTK_TEXT_INPUT_H
|
||||
|
||||
#include <wayland-server.h>
|
||||
#include "wayland/meta-wayland-types.h"
|
||||
#include "meta/window.h"
|
||||
|
||||
typedef struct _MetaWaylandGtkTextInput MetaWaylandGtkTextInput;
|
||||
|
||||
MetaWaylandGtkTextInput * meta_wayland_gtk_text_input_new (MetaWaylandSeat *seat);
|
||||
void meta_wayland_gtk_text_input_destroy (MetaWaylandGtkTextInput *text_input);
|
||||
|
||||
gboolean meta_wayland_gtk_text_input_init (MetaWaylandCompositor *compositor);
|
||||
|
||||
void meta_wayland_gtk_text_input_set_focus (MetaWaylandGtkTextInput *text_input,
|
||||
MetaWaylandSurface *surface);
|
||||
|
||||
gboolean meta_wayland_gtk_text_input_handle_event (MetaWaylandGtkTextInput *text_input,
|
||||
const ClutterEvent *event);
|
||||
|
||||
#endif /* META_WAYLAND_GTK_TEXT_INPUT_H */
|
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <wayland-server.h>
|
||||
|
||||
#include "gtk-text-input-server-protocol.h"
|
||||
#include "text-input-unstable-v3-server-protocol.h"
|
||||
#include "wayland/meta-wayland-private.h"
|
||||
#include "wayland/meta-wayland-seat.h"
|
||||
#include "wayland/meta-wayland-text-input.h"
|
||||
@@ -37,6 +37,8 @@ typedef enum
|
||||
META_WAYLAND_PENDING_STATE_INPUT_RECT = 1 << 0,
|
||||
META_WAYLAND_PENDING_STATE_CONTENT_TYPE = 1 << 1,
|
||||
META_WAYLAND_PENDING_STATE_SURROUNDING_TEXT = 1 << 2,
|
||||
META_WAYLAND_PENDING_STATE_CHANGE_CAUSE = 1 << 3,
|
||||
META_WAYLAND_PENDING_STATE_ENABLED = 1 << 4,
|
||||
} MetaWaylandTextInputPendingState;
|
||||
|
||||
typedef struct _MetaWaylandTextInput MetaWaylandTextInput;
|
||||
@@ -50,10 +52,11 @@ struct _MetaWaylandTextInput
|
||||
struct wl_list focus_resource_list;
|
||||
MetaWaylandSurface *surface;
|
||||
struct wl_listener surface_listener;
|
||||
uint32_t focus_serial;
|
||||
|
||||
MetaWaylandTextInputPendingState pending_state;
|
||||
|
||||
GHashTable *resource_serials;
|
||||
|
||||
struct
|
||||
{
|
||||
char *text;
|
||||
@@ -65,6 +68,8 @@ struct _MetaWaylandTextInput
|
||||
|
||||
uint32_t content_type_hint;
|
||||
uint32_t content_type_purpose;
|
||||
uint32_t text_change_cause;
|
||||
gboolean enabled;
|
||||
};
|
||||
|
||||
struct _MetaWaylandTextInputFocus
|
||||
@@ -90,6 +95,25 @@ meta_wayland_text_input_focus_request_surrounding (ClutterInputFocus *focus)
|
||||
text_input->surrounding.anchor);
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
lookup_serial (MetaWaylandTextInput *text_input,
|
||||
struct wl_resource *resource)
|
||||
{
|
||||
return GPOINTER_TO_UINT (g_hash_table_lookup (text_input->resource_serials,
|
||||
resource));
|
||||
}
|
||||
|
||||
static void
|
||||
increment_serial (MetaWaylandTextInput *text_input,
|
||||
struct wl_resource *resource)
|
||||
{
|
||||
uint32_t serial;
|
||||
|
||||
serial = lookup_serial (text_input, resource);
|
||||
g_hash_table_insert (text_input->resource_serials, resource,
|
||||
GUINT_TO_POINTER (serial + 1));
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wayland_text_input_focus_delete_surrounding (ClutterInputFocus *focus,
|
||||
guint cursor,
|
||||
@@ -102,7 +126,9 @@ meta_wayland_text_input_focus_delete_surrounding (ClutterInputFocus *focus,
|
||||
|
||||
wl_resource_for_each (resource, &text_input->focus_resource_list)
|
||||
{
|
||||
gtk_text_input_send_delete_surrounding_text (resource, cursor, len);
|
||||
zwp_text_input_v3_send_delete_surrounding_text (resource, cursor, len);
|
||||
zwp_text_input_v3_send_done (resource,
|
||||
lookup_serial (text_input, resource));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,8 +143,10 @@ meta_wayland_text_input_focus_commit_text (ClutterInputFocus *focus,
|
||||
|
||||
wl_resource_for_each (resource, &text_input->focus_resource_list)
|
||||
{
|
||||
gtk_text_input_send_preedit_string (resource, NULL, 0);
|
||||
gtk_text_input_send_commit_string (resource, text);
|
||||
zwp_text_input_v3_send_preedit_string (resource, NULL, 0, 0);
|
||||
zwp_text_input_v3_send_commit_string (resource, text);
|
||||
zwp_text_input_v3_send_done (resource,
|
||||
lookup_serial (text_input, resource));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +162,9 @@ meta_wayland_text_input_focus_set_preedit_text (ClutterInputFocus *focus,
|
||||
|
||||
wl_resource_for_each (resource, &text_input->focus_resource_list)
|
||||
{
|
||||
gtk_text_input_send_preedit_string (resource, text, cursor);
|
||||
zwp_text_input_v3_send_preedit_string (resource, text, cursor, cursor);
|
||||
zwp_text_input_v3_send_done (resource,
|
||||
lookup_serial (text_input, resource));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,7 +244,6 @@ meta_wayland_text_input_set_focus (MetaWaylandTextInput *text_input,
|
||||
ClutterInputFocus *focus = text_input->input_focus;
|
||||
ClutterInputMethod *input_method;
|
||||
struct wl_resource *resource;
|
||||
uint32_t serial;
|
||||
|
||||
if (clutter_input_focus_is_focused (focus))
|
||||
{
|
||||
@@ -222,12 +251,10 @@ meta_wayland_text_input_set_focus (MetaWaylandTextInput *text_input,
|
||||
clutter_input_method_focus_out (input_method);
|
||||
}
|
||||
|
||||
serial = wl_display_next_serial (text_input->seat->wl_display);
|
||||
|
||||
wl_resource_for_each (resource, &text_input->focus_resource_list)
|
||||
{
|
||||
gtk_text_input_send_leave (resource, serial,
|
||||
text_input->surface->resource);
|
||||
zwp_text_input_v3_send_leave (resource,
|
||||
text_input->surface->resource);
|
||||
}
|
||||
|
||||
move_resources (&text_input->resource_list,
|
||||
@@ -255,21 +282,20 @@ meta_wayland_text_input_set_focus (MetaWaylandTextInput *text_input,
|
||||
{
|
||||
struct wl_resource *resource;
|
||||
|
||||
text_input->focus_serial =
|
||||
wl_display_next_serial (text_input->seat->wl_display);
|
||||
|
||||
wl_resource_for_each (resource, &text_input->focus_resource_list)
|
||||
{
|
||||
gtk_text_input_send_enter (resource, text_input->focus_serial,
|
||||
surface->resource);
|
||||
zwp_text_input_v3_send_enter (resource, surface->resource);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
unbind_resource (struct wl_resource *resource)
|
||||
text_input_destructor (struct wl_resource *resource)
|
||||
{
|
||||
MetaWaylandTextInput *text_input = wl_resource_get_user_data (resource);
|
||||
|
||||
g_hash_table_remove (text_input->resource_serials, resource);
|
||||
wl_list_remove (wl_resource_get_link (resource));
|
||||
}
|
||||
|
||||
@@ -282,32 +308,12 @@ text_input_destroy (struct wl_client *client,
|
||||
|
||||
static void
|
||||
text_input_enable (struct wl_client *client,
|
||||
struct wl_resource *resource,
|
||||
uint32_t serial,
|
||||
uint32_t flags)
|
||||
struct wl_resource *resource)
|
||||
{
|
||||
MetaWaylandTextInput *text_input = wl_resource_get_user_data (resource);
|
||||
ClutterInputFocus *focus = text_input->input_focus;
|
||||
ClutterInputMethod *input_method;
|
||||
gboolean show_preedit;
|
||||
|
||||
if (serial != text_input->focus_serial)
|
||||
return;
|
||||
|
||||
if (!clutter_input_focus_is_focused (focus))
|
||||
{
|
||||
input_method = clutter_backend_get_input_method (clutter_get_default_backend ());
|
||||
if (input_method)
|
||||
clutter_input_method_focus_in (input_method, focus);
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
show_preedit = (flags & GTK_TEXT_INPUT_ENABLE_FLAGS_CAN_SHOW_PREEDIT) != 0;
|
||||
clutter_input_focus_set_can_show_preedit (focus, show_preedit);
|
||||
|
||||
if (flags & GTK_TEXT_INPUT_ENABLE_FLAGS_TOGGLE_INPUT_PANEL)
|
||||
clutter_input_focus_request_toggle_input_panel (focus);
|
||||
text_input->enabled = TRUE;
|
||||
text_input->pending_state |= META_WAYLAND_PENDING_STATE_ENABLED;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -315,17 +321,9 @@ text_input_disable (struct wl_client *client,
|
||||
struct wl_resource *resource)
|
||||
{
|
||||
MetaWaylandTextInput *text_input = wl_resource_get_user_data (resource);
|
||||
ClutterInputFocus *focus = text_input->input_focus;
|
||||
ClutterInputMethod *input_method;
|
||||
|
||||
if (!clutter_input_focus_is_focused (focus))
|
||||
return;
|
||||
|
||||
clutter_input_focus_reset (text_input->input_focus);
|
||||
text_input->pending_state = META_WAYLAND_PENDING_STATE_NONE;
|
||||
|
||||
input_method = clutter_backend_get_input_method (clutter_get_default_backend ());
|
||||
clutter_input_method_focus_out (input_method);
|
||||
text_input->enabled = FALSE;
|
||||
text_input->pending_state |= META_WAYLAND_PENDING_STATE_ENABLED;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -344,30 +342,41 @@ text_input_set_surrounding_text (struct wl_client *client,
|
||||
text_input->pending_state |= META_WAYLAND_PENDING_STATE_SURROUNDING_TEXT;
|
||||
}
|
||||
|
||||
static void
|
||||
text_input_set_text_change_cause (struct wl_client *client,
|
||||
struct wl_resource *resource,
|
||||
uint32_t cause)
|
||||
{
|
||||
MetaWaylandTextInput *text_input = wl_resource_get_user_data (resource);
|
||||
|
||||
text_input->text_change_cause = cause;
|
||||
text_input->pending_state |= META_WAYLAND_PENDING_STATE_CHANGE_CAUSE;
|
||||
}
|
||||
|
||||
static ClutterInputContentHintFlags
|
||||
translate_hints (uint32_t hints)
|
||||
{
|
||||
ClutterInputContentHintFlags clutter_hints = 0;
|
||||
|
||||
if (hints & GTK_TEXT_INPUT_CONTENT_HINT_COMPLETION)
|
||||
if (hints & ZWP_TEXT_INPUT_V3_CONTENT_HINT_COMPLETION)
|
||||
clutter_hints |= CLUTTER_INPUT_CONTENT_HINT_COMPLETION;
|
||||
if (hints & GTK_TEXT_INPUT_CONTENT_HINT_SPELLCHECK)
|
||||
if (hints & ZWP_TEXT_INPUT_V3_CONTENT_HINT_SPELLCHECK)
|
||||
clutter_hints |= CLUTTER_INPUT_CONTENT_HINT_SPELLCHECK;
|
||||
if (hints & GTK_TEXT_INPUT_CONTENT_HINT_AUTO_CAPITALIZATION)
|
||||
if (hints & ZWP_TEXT_INPUT_V3_CONTENT_HINT_AUTO_CAPITALIZATION)
|
||||
clutter_hints |= CLUTTER_INPUT_CONTENT_HINT_AUTO_CAPITALIZATION;
|
||||
if (hints & GTK_TEXT_INPUT_CONTENT_HINT_LOWERCASE)
|
||||
if (hints & ZWP_TEXT_INPUT_V3_CONTENT_HINT_LOWERCASE)
|
||||
clutter_hints |= CLUTTER_INPUT_CONTENT_HINT_LOWERCASE;
|
||||
if (hints & GTK_TEXT_INPUT_CONTENT_HINT_UPPERCASE)
|
||||
if (hints & ZWP_TEXT_INPUT_V3_CONTENT_HINT_UPPERCASE)
|
||||
clutter_hints |= CLUTTER_INPUT_CONTENT_HINT_UPPERCASE;
|
||||
if (hints & GTK_TEXT_INPUT_CONTENT_HINT_TITLECASE)
|
||||
if (hints & ZWP_TEXT_INPUT_V3_CONTENT_HINT_TITLECASE)
|
||||
clutter_hints |= CLUTTER_INPUT_CONTENT_HINT_TITLECASE;
|
||||
if (hints & GTK_TEXT_INPUT_CONTENT_HINT_HIDDEN_TEXT)
|
||||
if (hints & ZWP_TEXT_INPUT_V3_CONTENT_HINT_HIDDEN_TEXT)
|
||||
clutter_hints |= CLUTTER_INPUT_CONTENT_HINT_HIDDEN_TEXT;
|
||||
if (hints & GTK_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA)
|
||||
if (hints & ZWP_TEXT_INPUT_V3_CONTENT_HINT_SENSITIVE_DATA)
|
||||
clutter_hints |= CLUTTER_INPUT_CONTENT_HINT_SENSITIVE_DATA;
|
||||
if (hints & GTK_TEXT_INPUT_CONTENT_HINT_LATIN)
|
||||
if (hints & ZWP_TEXT_INPUT_V3_CONTENT_HINT_LATIN)
|
||||
clutter_hints |= CLUTTER_INPUT_CONTENT_HINT_LATIN;
|
||||
if (hints & GTK_TEXT_INPUT_CONTENT_HINT_MULTILINE)
|
||||
if (hints & ZWP_TEXT_INPUT_V3_CONTENT_HINT_MULTILINE)
|
||||
clutter_hints |= CLUTTER_INPUT_CONTENT_HINT_MULTILINE;
|
||||
|
||||
return clutter_hints;
|
||||
@@ -378,31 +387,31 @@ translate_purpose (uint32_t purpose)
|
||||
{
|
||||
switch (purpose)
|
||||
{
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_NORMAL:
|
||||
case ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_NORMAL:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_NORMAL;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_ALPHA:
|
||||
case ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_ALPHA:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_ALPHA;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_DIGITS:
|
||||
case ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_DIGITS:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_DIGITS;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_NUMBER:
|
||||
case ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_NUMBER:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_NUMBER;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_PHONE:
|
||||
case ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PHONE:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_PHONE;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_URL:
|
||||
case ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_URL:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_URL;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_EMAIL:
|
||||
case ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_EMAIL:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_EMAIL;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_NAME:
|
||||
case ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_NAME:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_NAME;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_PASSWORD:
|
||||
case ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PASSWORD:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_PASSWORD;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_DATE:
|
||||
case ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_DATE:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_DATE;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_TIME:
|
||||
case ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_TIME:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_TIME;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_DATETIME:
|
||||
case ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_DATETIME:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_DATETIME;
|
||||
case GTK_TEXT_INPUT_CONTENT_PURPOSE_TERMINAL:
|
||||
case ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_TERMINAL:
|
||||
return CLUTTER_INPUT_CONTENT_PURPOSE_TERMINAL;
|
||||
}
|
||||
|
||||
@@ -443,18 +452,60 @@ text_input_set_cursor_rectangle (struct wl_client *client,
|
||||
text_input->pending_state |= META_WAYLAND_PENDING_STATE_INPUT_RECT;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wayland_text_input_reset (MetaWaylandTextInput *text_input)
|
||||
{
|
||||
g_clear_pointer (&text_input->surrounding.text, g_free);
|
||||
text_input->content_type_hint = ZWP_TEXT_INPUT_V3_CONTENT_HINT_NONE;
|
||||
text_input->content_type_purpose = ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_NORMAL;
|
||||
text_input->text_change_cause = ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_INPUT_METHOD;
|
||||
text_input->cursor_rect = (cairo_rectangle_int_t) { 0, 0, 0, 0 };
|
||||
}
|
||||
|
||||
static void
|
||||
text_input_commit_state (struct wl_client *client,
|
||||
struct wl_resource *resource)
|
||||
{
|
||||
MetaWaylandTextInput *text_input = wl_resource_get_user_data (resource);
|
||||
ClutterInputFocus *focus = text_input->input_focus;
|
||||
gboolean toggle_panel = FALSE;
|
||||
|
||||
increment_serial (text_input, resource);
|
||||
|
||||
if (!clutter_input_focus_is_focused (focus))
|
||||
return;
|
||||
if (text_input->surface == NULL)
|
||||
return;
|
||||
|
||||
if (text_input->pending_state & META_WAYLAND_PENDING_STATE_ENABLED)
|
||||
{
|
||||
ClutterInputMethod *input_method;
|
||||
|
||||
input_method = clutter_backend_get_input_method (clutter_get_default_backend ());
|
||||
|
||||
if (text_input->enabled)
|
||||
{
|
||||
meta_wayland_text_input_reset (text_input);
|
||||
|
||||
if (!clutter_input_focus_is_focused (focus))
|
||||
{
|
||||
if (input_method)
|
||||
clutter_input_method_focus_in (input_method, focus);
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
clutter_input_focus_set_can_show_preedit (focus, TRUE);
|
||||
toggle_panel = TRUE;
|
||||
}
|
||||
else if (clutter_input_focus_is_focused (focus))
|
||||
{
|
||||
text_input->pending_state = META_WAYLAND_PENDING_STATE_NONE;
|
||||
clutter_input_focus_reset (text_input->input_focus);
|
||||
clutter_input_method_focus_out (input_method);
|
||||
}
|
||||
}
|
||||
else if (!clutter_input_focus_is_focused (focus))
|
||||
return;
|
||||
|
||||
if (text_input->pending_state & META_WAYLAND_PENDING_STATE_CONTENT_TYPE)
|
||||
{
|
||||
clutter_input_focus_set_content_hints (text_input->input_focus,
|
||||
@@ -491,13 +542,17 @@ text_input_commit_state (struct wl_client *client,
|
||||
}
|
||||
|
||||
text_input->pending_state = META_WAYLAND_PENDING_STATE_NONE;
|
||||
|
||||
if (toggle_panel)
|
||||
clutter_input_focus_request_toggle_input_panel (focus);
|
||||
}
|
||||
|
||||
static struct gtk_text_input_interface meta_text_input_interface = {
|
||||
static struct zwp_text_input_v3_interface meta_text_input_interface = {
|
||||
text_input_destroy,
|
||||
text_input_enable,
|
||||
text_input_disable,
|
||||
text_input_set_surrounding_text,
|
||||
text_input_set_text_change_cause,
|
||||
text_input_set_content_type,
|
||||
text_input_set_cursor_rectangle,
|
||||
text_input_commit_state,
|
||||
@@ -516,6 +571,8 @@ meta_wayland_text_input_new (MetaWaylandSeat *seat)
|
||||
wl_list_init (&text_input->focus_resource_list);
|
||||
text_input->surface_listener.notify = text_input_handle_focus_surface_destroy;
|
||||
|
||||
text_input->resource_serials = g_hash_table_new (NULL, NULL);
|
||||
|
||||
return text_input;
|
||||
}
|
||||
|
||||
@@ -524,6 +581,7 @@ meta_wayland_text_input_destroy (MetaWaylandTextInput *text_input)
|
||||
{
|
||||
meta_wayland_text_input_set_focus (text_input, NULL);
|
||||
g_object_unref (text_input->input_focus);
|
||||
g_hash_table_destroy (text_input->resource_serials);
|
||||
g_free (text_input);
|
||||
}
|
||||
|
||||
@@ -536,13 +594,13 @@ meta_wayland_text_input_create_new_resource (MetaWaylandTextInput *text_input,
|
||||
struct wl_resource *text_input_resource;
|
||||
|
||||
text_input_resource = wl_resource_create (client,
|
||||
>k_text_input_interface,
|
||||
META_GTK_TEXT_INPUT_VERSION,
|
||||
&zwp_text_input_v3_interface,
|
||||
META_ZWP_TEXT_INPUT_V3_VERSION,
|
||||
id);
|
||||
|
||||
wl_resource_set_implementation (text_input_resource,
|
||||
&meta_text_input_interface,
|
||||
text_input, unbind_resource);
|
||||
text_input, text_input_destructor);
|
||||
|
||||
if (text_input->surface &&
|
||||
wl_resource_get_client (text_input->surface->resource) == client)
|
||||
@@ -550,9 +608,8 @@ meta_wayland_text_input_create_new_resource (MetaWaylandTextInput *text_input,
|
||||
wl_list_insert (&text_input->focus_resource_list,
|
||||
wl_resource_get_link (text_input_resource));
|
||||
|
||||
gtk_text_input_send_enter (text_input_resource,
|
||||
text_input->focus_serial,
|
||||
text_input->surface->resource);
|
||||
zwp_text_input_v3_send_enter (text_input_resource,
|
||||
text_input->surface->resource);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -580,7 +637,7 @@ text_input_manager_get_text_input (struct wl_client *client,
|
||||
seat_resource, id);
|
||||
}
|
||||
|
||||
static struct gtk_text_input_manager_interface meta_text_input_manager_interface = {
|
||||
static struct zwp_text_input_manager_v3_interface meta_text_input_manager_interface = {
|
||||
text_input_manager_destroy,
|
||||
text_input_manager_get_text_input,
|
||||
};
|
||||
@@ -594,8 +651,8 @@ bind_text_input (struct wl_client *client,
|
||||
struct wl_resource *resource;
|
||||
|
||||
resource = wl_resource_create (client,
|
||||
>k_text_input_manager_interface,
|
||||
META_GTK_TEXT_INPUT_VERSION,
|
||||
&zwp_text_input_manager_v3_interface,
|
||||
META_ZWP_TEXT_INPUT_V3_VERSION,
|
||||
id);
|
||||
wl_resource_set_implementation (resource,
|
||||
&meta_text_input_manager_interface,
|
||||
@@ -606,8 +663,8 @@ gboolean
|
||||
meta_wayland_text_input_init (MetaWaylandCompositor *compositor)
|
||||
{
|
||||
return (wl_global_create (compositor->wayland_display,
|
||||
>k_text_input_manager_interface,
|
||||
META_GTK_TEXT_INPUT_VERSION,
|
||||
&zwp_text_input_manager_v3_interface,
|
||||
META_ZWP_TEXT_INPUT_V3_VERSION,
|
||||
compositor->seat->text_input,
|
||||
bind_text_input) != NULL);
|
||||
}
|
||||
|
@@ -53,5 +53,6 @@
|
||||
#define META_ZXDG_OUTPUT_V1_VERSION 1
|
||||
#define META_ZWP_XWAYLAND_KEYBOARD_GRAB_V1_VERSION 1
|
||||
#define META_GTK_TEXT_INPUT_VERSION 1
|
||||
#define META_ZWP_TEXT_INPUT_V3_VERSION 1
|
||||
|
||||
#endif
|
||||
|
@@ -393,6 +393,7 @@ meta_wayland_init (void)
|
||||
meta_wayland_keyboard_shortcuts_inhibit_init (compositor);
|
||||
meta_wayland_surface_inhibit_shortcuts_dialog_init ();
|
||||
meta_wayland_text_input_init (compositor);
|
||||
meta_wayland_gtk_text_input_init (compositor);
|
||||
|
||||
/* Xwayland specific protocol, needs to be filtered out for all other clients */
|
||||
if (meta_xwayland_grab_keyboard_init (compositor))
|
||||
|
Reference in New Issue
Block a user