Compare commits

..

17 Commits

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

https://bugzilla.gnome.org/show_bug.cgi?id=706308
2013-09-03 17:13:56 +02:00
bd6536dec3 display: don't report extended barrier support on wayland
Even if the xserver does them, they're useless because it doesn't
get the pointer events.
This is a lame workaround for not having real barriers in wayland,
but it fixes the hot corner and message tray (because it triggers
the old xserver path)
2013-09-03 17:13:56 +02:00
98 changed files with 6796 additions and 7905 deletions

View File

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

100
NEWS
View File

@ -1,103 +1,3 @@
3.11.1
======
* Fix tile previews getting stuck on right click during drags [Lionel; #704759]
* Use new UPower API [Bastien]
* Set hot spot when cursor set from wl_buffer [Jonas; #709593]
* Expose min-backlight-step [Asad; #710380]
* Misc. bug fixes and cleanups [Jasper, Olav, Magdalen; #709776]
Contributors:
Magdalen Berns, Lionel Landwerlin, Asad Mehmood, Bastien Nocera,
Jasper St. Pierre, Olav Vitters, Jonas Ådahl
3.10.1
======
* Don't apply fullscreen workarounds to CSD windows [Giovanni; #708718]
* Fix hangs during DND operations [Adel; #709340]
* Misc bug fixes [Dan, Giovanni, Jasper; #708813, #708420]
Contributors:
Giovanni Campagna, Adel Gadllah, Dan Horák, Hans Petter Jansson,
Jasper St. Pierre
3.10.0.1
========
* Fix bug when a window changed size twice in a single frame - this
can happen with GTK+ client-side decorations [Giovanni, Owen; #708367]
Contributors:
Giovanni Campagna, Owen Taylor
3.10.0
======
* Update dependencies [Giovanni; #708210]
3.9.92
======
* Constrain the pointer position onto visible monitors [Giovanni; #706655]
* Fix keyboard state handling in face of event compression [Giovanni; #706963]
* Extend the MetaCursorTracker API with query pointer and cursor visibility [Giovanni; #707474]
* Be stricter in checking and exposing the wayland protocol version [#707851]
* Don't require plugins to pass event to Clutter [Giovanni; #707482]
* Move the --wayland option from the binary to the library [Giovanni; #707897]
* Implement running from gnome-session (environment variable setting, process group
handling, Clutter backend variables) [Giovanni; #706421]
* Add support for more cursor types [Giovanni; #707919]
* Drop man pages for removed utilities [Kalev; #706579]
* Implement monitor configuration on KMS [Giovanni; #706308]
* Implement HW cursors [Giovanni; #707573]
* Implement minimal support for resizing and maximizing wayland clients [Giovanni; #707401]
* Implement transient hints for wayland clients [Giovanni; #707401]
* Implement popup menu surfaces and grabs [Giovanni; #707863]
* Immediately fire idle watches that are already expired [Giovanni; #707302]
* Remove holes generated by disabling the laptop lid [Giovanni; #707473]
* Misc bug fixes [Giovanni, Pavel, Adel; #707649, #706124, #707584, #707851, #707929,
#708070]
Contributors:
Adel Gadllah, Giovanni Campagna, Kalev Lember, Pavel Vasin
Translations:
Мирослав Николић po/sr, sr@latin.po, Мирослав Николић [sr, sr@latin],
Chao-Hsiung Liao [zh_HK, zh_TW], Yuri Myasoedov [ru],
Ville-Pekka Vainio [fi], Changwoo Ryu [ko], A S Alam [pa],
Mattias Põldaru [et], Rūdolfs Mazurs [lv], Ihar Hrachyshka [be],
Nilamdyuti Goswami [as], Andika Triwidada [id], Baurzhan Muftakhidinov [kk],
Benjamin Steinwender [de]
3.9.91
======
* Drop man pages for removed utilities [Kalev; #706579]
* Add support for idle tracking [Giovanni, Cosimo; #706005, #707250]
* Skip CRTC reconfigurations that have no effect [Giovanni; #706672]
* Ignore skip-taskbar hints on parentless dialogs [Giovanni; #673399]
* Don't save pixbuf data in user data [Tim; #706777]
* Don't queue redraws for obscured regions [Adel; #703332]
* Suppor the opaque region hints for wayland clients [Jasper; #707019]
* Turn blending off when drawing entirely opaque regions [Jasper; #707019]
* Check event timestamps before reconfiguring [Giovanni; #706735]
* Merge the DBus API for display configuration in the wayland branch [Giovanni]
* Install an X IO error handler for XWayland [Giovanni; #706962]
* Use the clutter xkbcommon integration for the wayland keyboard [Giovanni; #705862]
* Add a setuid helper for running on KMS+evdev [Giovanni, Colin; #705861]
* Add keybindings for switching VT [Giovanni; #705861]
* Implement plugin modality when running as a wayland compositor [Giovanni; #705917]
* Add support for the application menu for wayland clients [Giovanni; #707128]
* Several Coverity spotted fixes [Jasper]
* Don't create a dummy texture for the texture template [Neil; #707458]
* Use a more conservative paint volume for obscured windows [Adel]
* Misc bug fixes [Giovanni, Colin, Seán, Jasper, Cosimo; #706582, #706598,
#706787, #706729, #706825, #707081, #707090, #707267, #706982, #706289]
Contributors:
Giovanni Campagna, Cosimo Cecchi, Adel Gadllah, Colin Guthrie, Kalev Lember,
Tim Lunn, Jasper St. Pierre, Neil Roberts, Rico Tzschichholz, Seán de Búrca
Translations:
Piotr Drąg [pl], Alexandre Franke [fr], Kjartan Maraas [nb],
Milo Casagrande [it], Balázs Úr [hu], Seán de Búrca [ga], Fran Diéguez [gl],
Daniel Mustieles [es], Aurimas Černius [lt], Gil Forcada [ca]
3.9.90
======
* First release from the wayland branch, includes basic support for running

View File

@ -1,9 +1,8 @@
AC_PREREQ(2.50)
AC_CONFIG_MACRO_DIR([m4])
m4_define([mutter_major_version], [3])
m4_define([mutter_minor_version], [11])
m4_define([mutter_micro_version], [1])
m4_define([mutter_minor_version], [9])
m4_define([mutter_micro_version], [91])
m4_define([mutter_version],
[mutter_major_version.mutter_minor_version.mutter_micro_version])
@ -78,9 +77,9 @@ MUTTER_PC_MODULES="
cairo >= 1.10.0
gsettings-desktop-schemas >= 3.7.3
xcomposite >= 0.2 xfixes xrender xdamage xi >= 1.6.0
$CLUTTER_PACKAGE >= 1.15.94
$CLUTTER_PACKAGE >= 1.14.3
cogl-1.0 >= 1.13.3
upower-glib >= 0.99.0
upower-glib > 0.9.11
gnome-desktop-3.0
"
@ -210,7 +209,19 @@ if test x$found_introspection != xno; then
AC_SUBST(META_GIR)
fi
MUTTER_PC_MODULES="$MUTTER_PC_MODULES xcursor"
AC_MSG_CHECKING([Xcursor])
if $PKG_CONFIG xcursor; then
have_xcursor=yes
else
have_xcursor=no
fi
AC_MSG_RESULT($have_xcursor)
if test x$have_xcursor = xyes; then
echo "Building with Xcursor"
MUTTER_PC_MODULES="$MUTTER_PC_MODULES xcursor"
AC_DEFINE(HAVE_XCURSOR, , [Building with Xcursor support])
fi
# We always build with wayland enabled
AC_DEFINE(HAVE_WAYLAND, , [Building with Wayland support])
@ -221,7 +232,7 @@ AS_IF([test "x$WAYLAND_SCANNER" = "xno"],
AC_SUBST([WAYLAND_SCANNER])
AC_SUBST(XWAYLAND_PATH)
MUTTER_PC_MODULES="$MUTTER_PC_MODULES clutter-wayland-1.0 clutter-wayland-compositor-1.0 clutter-egl-1.0 wayland-server libdrm"
MUTTER_PC_MODULES="$MUTTER_PC_MODULES wayland-server libdrm"
PKG_CHECK_MODULES(MUTTER, $MUTTER_PC_MODULES)
PKG_CHECK_EXISTS([xi >= 1.6.99.1],
@ -462,6 +473,7 @@ src/Makefile
src/libmutter-wayland.pc
src/compositor/plugins/Makefile
protocol/Makefile
data/Makefile
po/Makefile.in
])

3
data/Makefile.am Normal file
View File

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

BIN
data/left_ptr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 B

View File

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

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

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

View File

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

View File

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

View File

@ -207,6 +207,7 @@ meta_key_binding_get_modifiers
meta_key_binding_get_mask
meta_key_binding_is_builtin
meta_keybindings_set_custom_handler
meta_keybindings_switch_window
meta_screen_ungrab_all_keys
meta_screen_grab_all_keys
</SECTION>

View File

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

View File

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

499
po/as.po

File diff suppressed because it is too large Load Diff

441
po/be.po
View File

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

610
po/de.po

File diff suppressed because it is too large Load Diff

231
po/et.po
View File

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

512
po/fi.po

File diff suppressed because it is too large Load Diff

327
po/id.po
View File

@ -11,15 +11,15 @@ msgstr ""
"Project-Id-Version: mutter master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2013-08-18 20:03+0000\n"
"PO-Revision-Date: 2013-09-14 15:44+0700\n"
"POT-Creation-Date: 2013-03-28 10:28+0000\n"
"PO-Revision-Date: 2013-03-30 11:24+0700\n"
"Last-Translator: Andika Triwidada <andika@gmail.com>\n"
"Language-Team: Indonesian <gnome@i15n.org>\n"
"Language: id\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.5.7\n"
"X-Generator: Poedit 1.5.5\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../src/50-mutter-navigation.xml.in.h:1
@ -212,7 +212,7 @@ msgstr "Tampilan dipisah ke kanan"
#. 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:589
#: ../src/compositor/compositor.c:568
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display \"%s"
@ -220,7 +220,7 @@ msgid ""
msgstr ""
"Manajer komposit lain telah berjalan pada layar %i pada tampilan \"%s\"."
#: ../src/compositor/meta-background.c:1076
#: ../src/compositor/meta-background.c:1065
msgid "background texture could not be created from file"
msgstr "tekstur latar tak bisa dibuat dari berkas"
@ -257,24 +257,24 @@ msgstr "_Tunggu"
msgid "_Force Quit"
msgstr "_Matikan Paksa"
#: ../src/core/display.c:421
#: ../src/core/display.c:401
#, c-format
msgid "Missing %s extension required for compositing"
msgstr "Kehilangan ekstensi %s yang diperlukan untuk pengkomposisian"
#: ../src/core/display.c:513
#: ../src/core/display.c:493
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "Gagal membuka tampilan X Window System '%s'\n"
#: ../src/core/keybindings.c:1136
#: ../src/core/keybindings.c:935
#, c-format
msgid ""
"Some other program is already using the key %s with modifiers %x as a "
"binding\n"
msgstr "Ada program lain yang menggunakan tombol %s dengan kombinasi %x\n"
#: ../src/core/keybindings.c:1333
#: ../src/core/keybindings.c:1135
#, c-format
msgid "\"%s\" is not a valid accelerator\n"
msgstr "\"%s\" bukan akselerator yang valid\n"
@ -314,19 +314,6 @@ msgid ""
"Could not find a theme! Be sure %s exists and contains the usual themes.\n"
msgstr "Tak menemukan tema! Pastikan %s ada dan berisi tema yang biasa.\n"
#: ../src/core/monitor.c:711
msgid "Built-in display"
msgstr "Tampilan bawaan"
#. TRANSLATORS: this is a monitor name (in case we don't know
#. the vendor), it's Unknown followed by a size in inches,
#. like 'Unknown 15"'
#.
#: ../src/core/monitor.c:739
#, c-format
msgid "Unknown %s"
msgstr "%s tidak dikenal"
#: ../src/core/mutter.c:40
#, c-format
msgid ""
@ -351,7 +338,7 @@ msgstr "Cetak versi"
msgid "Mutter plugin to use"
msgstr "Pengaya Mutter yang dipakai"
#: ../src/core/prefs.c:1202
#: ../src/core/prefs.c:1095
msgid ""
"Workarounds for broken applications disabled. Some applications may not "
"behave properly.\n"
@ -359,12 +346,12 @@ msgstr ""
"Pencegahan kesalahan bagi aplikasi yang rusak sedang dinonaktifkan. Mungkin "
"nanti ada beberapa aplikasi yang akan bertingkah aneh.\n"
#: ../src/core/prefs.c:1277
#: ../src/core/prefs.c:1170
#, c-format
msgid "Could not parse font description \"%s\" from GSettings key %s\n"
msgstr "Tak dapat mengurai deskripsi fonta \"%s\" dari kunci GSettings %s\n"
#: ../src/core/prefs.c:1343
#: ../src/core/prefs.c:1236
#, c-format
msgid ""
"\"%s\" found in configuration database is not a valid value for mouse button "
@ -373,7 +360,7 @@ msgstr ""
"\"%s\" yang ada pada database konfigurasi bukanlah nilai yang benar untuk "
"tombol mouse.\n"
#: ../src/core/prefs.c:1909
#: ../src/core/prefs.c:1788
#, c-format
msgid ""
"\"%s\" found in configuration database is not a valid value for keybinding "
@ -382,17 +369,17 @@ msgstr ""
"\"%s\" yang ada pada database konfigurasi bernilai tidak benar untuk "
"kombinasi tombol \"%s\"\n"
#: ../src/core/prefs.c:1999
#: ../src/core/prefs.c:1887
#, c-format
msgid "Workspace %d"
msgstr "Area kerja %d"
#: ../src/core/screen.c:534
#: ../src/core/screen.c:691
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgstr "Layar %d pada tampilan '%s' tidak benar\n"
#: ../src/core/screen.c:550
#: ../src/core/screen.c:707
#, c-format
msgid ""
"Screen %d on display \"%s\" already has a window manager; try using the --"
@ -401,7 +388,7 @@ msgstr ""
"Layar %d pada tampilan \"%s\" sudah memiliki pengatur jendela. Cobalah "
"gunakan pilihan --replace untuk mengganti pengatur jendela yang aktif.\n"
#: ../src/core/screen.c:577
#: ../src/core/screen.c:734
#, c-format
msgid ""
"Could not acquire window manager selection on screen %d display \"%s\"\n"
@ -409,12 +396,12 @@ msgstr ""
"Tidak dapat mendapatkan pilihan pengatur jendela pada layar %d tampilan \"%s"
"\"\n"
#: ../src/core/screen.c:655
#: ../src/core/screen.c:812
#, c-format
msgid "Screen %d on display \"%s\" already has a window manager\n"
msgstr "Layar %d pada tampilan \"%s\" sudah ada pengatur jendelanya\n"
#: ../src/core/screen.c:846
#: ../src/core/screen.c:998
#, c-format
msgid "Could not release screen %d on display \"%s\"\n"
msgstr "Layar %d pada tampilan \"%s\" tidak dapat dilepas\n"
@ -489,7 +476,8 @@ msgstr "Gagal melakukan fdopen pada berkas log %s: %s\n"
msgid "Opened log file %s\n"
msgstr "Berkas log yang dibuka %s\n"
#: ../src/core/util.c:119
#: ../src/core/util.c:119 ../src/tools/mutter-message.c:149
#, c-format
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Muter dikompilasi tanpa dukungan mode riuh\n"
@ -497,20 +485,20 @@ msgstr "Muter dikompilasi tanpa dukungan mode riuh\n"
msgid "Window manager: "
msgstr "Pengatur jendela: "
#: ../src/core/util.c:414
#: ../src/core/util.c:412
msgid "Bug in window manager: "
msgstr "Bug pada pengatur jendela: "
#: ../src/core/util.c:445
#: ../src/core/util.c:443
msgid "Window manager warning: "
msgstr "Peringatan pengatur jendela: "
#: ../src/core/util.c:473
#: ../src/core/util.c:471
msgid "Window manager error: "
msgstr "Eror pengatur jendela: "
#. first time through
#: ../src/core/window.c:7533
#: ../src/core/window.c:7596
#, c-format
msgid ""
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
@ -526,7 +514,7 @@ msgstr ""
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
#. * about these apps but make them work.
#.
#: ../src/core/window.c:8257
#: ../src/core/window.c:8320
#, c-format
msgid ""
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size "
@ -536,22 +524,22 @@ msgstr ""
"ukurannya, sedangkan ukuran minimalnya adalah %d x %d dan maksimal %d x %d "
"yang tidak masuk di akal.\n"
#: ../src/core/window-props.c:347
#: ../src/core/window-props.c:318
#, c-format
msgid "Application set a bogus _NET_WM_PID %lu\n"
msgstr "Aplikasi telah membuat _NET_WM_PID %lu bohongan\n"
#: ../src/core/window-props.c:463
#: ../src/core/window-props.c:434
#, c-format
msgid "%s (on %s)"
msgstr "%s (pada %s)"
#: ../src/core/window-props.c:1546
#: ../src/core/window-props.c:1517
#, c-format
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
msgstr "WM_TRANSIENT_FOR salah jendela 0x%lx ditentukan untuk %s.\n"
#: ../src/core/window-props.c:1557
#: ../src/core/window-props.c:1528
#, c-format
msgid "WM_TRANSIENT_FOR window 0x%lx for %s would create loop.\n"
msgstr "Jendela WM_TRANSIENT_FOR 0x%lx untuk %s akan membuat loop.\n"
@ -715,104 +703,109 @@ msgstr "Pilih jendela dari popup tab"
msgid "Cancel tab popup"
msgstr "Batalkan popup tab"
#: ../src/tools/mutter-message.c:123
#, c-format
msgid "Usage: %s\n"
msgstr "Cara pakai: %s\n"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:67
#: ../src/ui/menu.c:69
msgid "Mi_nimize"
msgstr "Kecilka_n"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:69
#: ../src/ui/menu.c:71
msgid "Ma_ximize"
msgstr "Pe_rbesar"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:71
#: ../src/ui/menu.c:73
msgid "Unma_ximize"
msgstr "Kem_balikan"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:73
#: ../src/ui/menu.c:75
msgid "Roll _Up"
msgstr "G_ulung"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:75
#: ../src/ui/menu.c:77
msgid "_Unroll"
msgstr "B_uka"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:77
#: ../src/ui/menu.c:79
msgid "_Move"
msgstr "_Pindahkan"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:79
#: ../src/ui/menu.c:81
msgid "_Resize"
msgstr "Ganti·Uku_ran"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:81
#: ../src/ui/menu.c:83
msgid "Move Titlebar On_screen"
msgstr "Pindahkan Judul Pada _layar"
#. separator
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:84 ../src/ui/menu.c:86
#: ../src/ui/menu.c:86 ../src/ui/menu.c:88
msgid "Always on _Top"
msgstr "Selalu di A_tas"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:88
#: ../src/ui/menu.c:90
msgid "_Always on Visible Workspace"
msgstr "T_ampak pada Area Kerja Aktif"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:90
#: ../src/ui/menu.c:92
msgid "_Only on This Workspace"
msgstr "_Tampak pada Area Kerja Ini Saja"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:92
#: ../src/ui/menu.c:94
msgid "Move to Workspace _Left"
msgstr "Pindahkan ke Area Kerja _Kiri"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:94
#: ../src/ui/menu.c:96
msgid "Move to Workspace R_ight"
msgstr "Pindahkan ke A_rea Kerja Kanan"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:96
#: ../src/ui/menu.c:98
msgid "Move to Workspace _Up"
msgstr "Pindahkan ke Area Kerja Ata_s"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:98
#: ../src/ui/menu.c:100
msgid "Move to Workspace _Down"
msgstr "Pindahkan ke Area Kerja _Bawah"
#. separator
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:102
#: ../src/ui/menu.c:104
msgid "_Close"
msgstr "_Tutup"
#: ../src/ui/menu.c:202
#: ../src/ui/menu.c:204
#, c-format
msgid "Workspace %d%n"
msgstr "Area Kerja %d%n"
#: ../src/ui/menu.c:212
#: ../src/ui/menu.c:214
#, c-format
msgid "Workspace 1_0"
msgstr "Area Kerja 1_0"
#: ../src/ui/menu.c:214
#: ../src/ui/menu.c:216
#, c-format
msgid "Workspace %s%d"
msgstr "Area Kerja %s%d"
#: ../src/ui/menu.c:384
#: ../src/ui/menu.c:397
msgid "Move to Another _Workspace"
msgstr "Pindahkan ke Area Kerja _Lain"
@ -1170,18 +1163,18 @@ msgid ""
msgstr ""
"<frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/> tidak ada"
#: ../src/ui/theme.c:5082
#: ../src/ui/theme.c:5084
#, c-format
msgid "Failed to load theme \"%s\": %s\n"
msgstr "Gagal membuka tema \"%s\": %s\n"
#: ../src/ui/theme.c:5218 ../src/ui/theme.c:5225 ../src/ui/theme.c:5232
#: ../src/ui/theme.c:5239 ../src/ui/theme.c:5246
#: ../src/ui/theme.c:5220 ../src/ui/theme.c:5227 ../src/ui/theme.c:5234
#: ../src/ui/theme.c:5241 ../src/ui/theme.c:5248
#, c-format
msgid "No <%s> set for theme \"%s\""
msgstr "Tidak ada <%s> yang ditentukan untuk tema \"%s\""
#: ../src/ui/theme.c:5254
#: ../src/ui/theme.c:5256
#, c-format
msgid ""
"No frame style set for window type \"%s\" in theme \"%s\", add a <window "
@ -1190,14 +1183,14 @@ msgstr ""
"Tidak ada gaya frame untuk tipe window \"%s\" pada tema \"%s\". Tambah dulu "
"elemen <window type=\"%s\" style_set=\"whatever\"/>"
#: ../src/ui/theme.c:5661 ../src/ui/theme.c:5723 ../src/ui/theme.c:5786
#: ../src/ui/theme.c:5663 ../src/ui/theme.c:5725 ../src/ui/theme.c:5788
#, c-format
msgid ""
"User-defined constants must begin with a capital letter; \"%s\" does not"
msgstr ""
"Konstanta buatan pengguna harus dimulai dengan huruf besar: \"%s\" tidak"
#: ../src/ui/theme.c:5669 ../src/ui/theme.c:5731 ../src/ui/theme.c:5794
#: ../src/ui/theme.c:5671 ../src/ui/theme.c:5733 ../src/ui/theme.c:5796
#, c-format
msgid "Constant \"%s\" has already been defined"
msgstr "Konstanta \"%s\" telah didefinisikan sebelumnya"
@ -1585,3 +1578,201 @@ msgstr "<%s> disebutkan dua kali pada tema ini"
#, c-format
msgid "Failed to find a valid file for theme %s\n"
msgstr "Gagal menemukan berkas yang sah untuk tema %s\n"
#: ../src/ui/theme-viewer.c:99
msgid "_Windows"
msgstr "_Jendela"
#: ../src/ui/theme-viewer.c:100
msgid "_Dialog"
msgstr "_Dialog"
#: ../src/ui/theme-viewer.c:101
msgid "_Modal dialog"
msgstr "Dialog _modal"
#: ../src/ui/theme-viewer.c:102
msgid "_Utility"
msgstr "_Utilitas"
#: ../src/ui/theme-viewer.c:103
msgid "_Splashscreen"
msgstr "Layar _pembuka"
#: ../src/ui/theme-viewer.c:104
msgid "_Top dock"
msgstr "Dok a_tas"
#: ../src/ui/theme-viewer.c:105
msgid "_Bottom dock"
msgstr "Dok _bawah"
#: ../src/ui/theme-viewer.c:106
msgid "_Left dock"
msgstr "Dok k_iri"
#: ../src/ui/theme-viewer.c:107
msgid "_Right dock"
msgstr "Dok kana_n"
#: ../src/ui/theme-viewer.c:108
msgid "_All docks"
msgstr "Semu_a dok"
#: ../src/ui/theme-viewer.c:109
msgid "Des_ktop"
msgstr "Des_ktop"
#: ../src/ui/theme-viewer.c:115
msgid "Open another one of these windows"
msgstr "Buka lagi jendela semacam ini"
#: ../src/ui/theme-viewer.c:117
msgid "This is a demo button with an 'open' icon"
msgstr "Ini contoh tombol dengan ikon 'open'"
#: ../src/ui/theme-viewer.c:119
msgid "This is a demo button with a 'quit' icon"
msgstr "Ini contoh tombol dengan ikon 'quit'"
#: ../src/ui/theme-viewer.c:248
msgid "This is a sample message in a sample dialog"
msgstr "Ini contoh pesan pada suatu dialog"
#: ../src/ui/theme-viewer.c:328
#, c-format
msgid "Fake menu item %d\n"
msgstr "Item menu %d\n"
#: ../src/ui/theme-viewer.c:363
msgid "Border-only window"
msgstr "Jendela dengan garis pembatas"
#: ../src/ui/theme-viewer.c:365
msgid "Bar"
msgstr "Kotak"
#: ../src/ui/theme-viewer.c:382
msgid "Normal Application Window"
msgstr "Jendela Aplikasi Normal"
#: ../src/ui/theme-viewer.c:386
msgid "Dialog Box"
msgstr "Kotak Dialog"
#: ../src/ui/theme-viewer.c:390
msgid "Modal Dialog Box"
msgstr "Kotak Dialog Modal"
#: ../src/ui/theme-viewer.c:394
msgid "Utility Palette"
msgstr "Kotak Perkakas"
#: ../src/ui/theme-viewer.c:398
msgid "Torn-off Menu"
msgstr "Menu Dapat Dilepas"
#: ../src/ui/theme-viewer.c:402
msgid "Border"
msgstr "Batas"
#: ../src/ui/theme-viewer.c:406
msgid "Attached Modal Dialog"
msgstr "Dialog Modal yang Dilampirkan"
#: ../src/ui/theme-viewer.c:737
#, c-format
msgid "Button layout test %d"
msgstr "Tes komposisi tombol %d"
#: ../src/ui/theme-viewer.c:766
#, c-format
msgid "%g milliseconds to draw one window frame"
msgstr "lama waktu menggambar satu bingkai jendela %g milidetik"
#: ../src/ui/theme-viewer.c:811
#, c-format
msgid "Usage: metacity-theme-viewer [THEMENAME]\n"
msgstr "Cara pakai: metacity-theme-viewer [NAMA TEMA]\n"
#: ../src/ui/theme-viewer.c:818
#, c-format
msgid "Error loading theme: %s\n"
msgstr "Ada error saat membaca tema: %s\n"
#: ../src/ui/theme-viewer.c:824
#, c-format
msgid "Loaded theme \"%s\" in %g seconds\n"
msgstr "Tema \"%s\" dibuka dalam %g detik\n"
#: ../src/ui/theme-viewer.c:869
msgid "Normal Title Font"
msgstr "Judul dengan huruf normal"
#: ../src/ui/theme-viewer.c:875
msgid "Small Title Font"
msgstr "Judul dengan huruf ukuran kecil"
#: ../src/ui/theme-viewer.c:881
msgid "Large Title Font"
msgstr "Judul Raksasa"
#: ../src/ui/theme-viewer.c:886
msgid "Button Layouts"
msgstr "Komposisi Tombol"
#: ../src/ui/theme-viewer.c:891
msgid "Benchmark"
msgstr "Pengukuran"
#: ../src/ui/theme-viewer.c:947
msgid "Window Title Goes Here"
msgstr "Ini tempat judul jendela"
#: ../src/ui/theme-viewer.c:1053
#, c-format
msgid ""
"Drew %d frames in %g client-side seconds (%g milliseconds per frame) and %g "
"seconds wall clock time including X server resources (%g milliseconds per "
"frame)\n"
msgstr ""
"%d frame dibuat dalam %g detik dalam waktu klien (%g milidetik per frame) "
"dan %g detik dalam waktu sebenarnya (%g milidetik per frame)\n"
#: ../src/ui/theme-viewer.c:1273
msgid "position expression test returned TRUE but set error"
msgstr "tes ekspresi posisi berakhir TRUE tapi justru ada error"
#: ../src/ui/theme-viewer.c:1275
msgid "position expression test returned FALSE but didn't set error"
msgstr "tes ekspresi posisi berakhir FALSE tapi tidak ada error"
#: ../src/ui/theme-viewer.c:1279
msgid "Error was expected but none given"
msgstr "Seharusnya ada error, tapi ini kok tidak ada"
#: ../src/ui/theme-viewer.c:1281
#, c-format
msgid "Error %d was expected but %d given"
msgstr "Seharunya ada error %d, tapi yang terjadi %d"
#: ../src/ui/theme-viewer.c:1287
#, c-format
msgid "Error not expected but one was returned: %s"
msgstr "Seharusnya tidak ada error, tapi ini tiba-tiba ada error: %s"
#: ../src/ui/theme-viewer.c:1291
#, c-format
msgid "x value was %d, %d was expected"
msgstr "nilai x sebelumnya %d, padahal seharusnya %d"
#: ../src/ui/theme-viewer.c:1294
#, c-format
msgid "y value was %d, %d was expected"
msgstr "nilai y sebelumnya %d, padahal seharusnya %d"
#: ../src/ui/theme-viewer.c:1359
#, c-format
msgid "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
msgstr "ekspresi koordinat %d diambil dalam %g detik (rata-rata %g detik)\n"

1477
po/kk.po

File diff suppressed because it is too large Load Diff

458
po/ko.po
View File

@ -18,8 +18,8 @@ msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2013-08-18 20:03+0000\n"
"PO-Revision-Date: 2013-09-09 04:46+0900\n"
"POT-Creation-Date: 2013-03-01 15:50+0000\n"
"PO-Revision-Date: 2013-03-13 03:52+0900\n"
"Last-Translator: Changwoo Ryu <cwryu@debian.org>\n"
"Language-Team: GNOME Korea <gnome-kr@googlegroups.com>\n"
"Language: Korean\n"
@ -218,7 +218,7 @@ msgstr "오른쪽 절반 뷰"
#. 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:589
#: ../src/compositor/compositor.c:507
#, c-format
msgid ""
"Another compositing manager is already running on screen %i on display \"%s"
@ -227,11 +227,11 @@ msgstr ""
"다른 창 구성 관리 프로그램이 이미 디스플레이 \"%2$s\" 화면 %1$i번에서 실행 중"
"입니다."
#: ../src/compositor/meta-background.c:1076
#: ../src/compositor/meta-background.c:1111
msgid "background texture could not be created from file"
msgstr "파일에서 배경 텍스처를 만들 수 없습니다"
#: ../src/core/bell.c:322
#: ../src/core/bell.c:320
msgid "Bell event"
msgstr "삑소리 이벤트"
@ -263,17 +263,17 @@ msgstr "기다리기(_W)"
msgid "_Force Quit"
msgstr "강제로 끝내기(_F)"
#: ../src/core/display.c:421
#: ../src/core/display.c:401
#, c-format
msgid "Missing %s extension required for compositing"
msgstr "콤포짓에 필요한 %s 확장 기능이 없습니다"
#: ../src/core/display.c:513
#: ../src/core/display.c:493
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "X 윈도 시스템 디스플레이 '%s'을(를) 여는데 실패하였습니다\n"
#: ../src/core/keybindings.c:1136
#: ../src/core/keybindings.c:929
#, c-format
msgid ""
"Some other program is already using the key %s with modifiers %x as a "
@ -282,41 +282,41 @@ msgstr ""
"다른 프로그램에서 이미 단축키로 변경 키 %2$x와(과) 키 %1$s을(를) 사용하고 있"
"습니다\n"
#: ../src/core/keybindings.c:1333
#: ../src/core/keybindings.c:1129
#, c-format
msgid "\"%s\" is not a valid accelerator\n"
msgstr "\"%s\"은(는) 올바른 단축키가 아닙니다\n"
#: ../src/core/main.c:197
#: ../src/core/main.c:196
msgid "Disable connection to session manager"
msgstr "세션 관리자와 연결 하지 않습니다"
#: ../src/core/main.c:203
#: ../src/core/main.c:202
msgid "Replace the running window manager"
msgstr "실행 중인 창 관리자를 바꿉니다"
#: ../src/core/main.c:209
#: ../src/core/main.c:208
msgid "Specify session management ID"
msgstr "세션 관리 ID를 지정합니다"
#: ../src/core/main.c:214
#: ../src/core/main.c:213
msgid "X Display to use"
msgstr "사용할 X 디스플레이"
#: ../src/core/main.c:220
#: ../src/core/main.c:219
msgid "Initialize session from savefile"
msgstr "저장 파일에서 세션을 초기화 합니다"
#: ../src/core/main.c:226
#: ../src/core/main.c:225
msgid "Make X calls synchronous"
msgstr "동기 X 호출을 합니다"
#: ../src/core/main.c:534
#: ../src/core/main.c:494
#, c-format
msgid "Failed to scan themes directory: %s\n"
msgstr "테마 디렉터리를 읽는 데 실패했습니다: %s\n"
#: ../src/core/main.c:550
#: ../src/core/main.c:510
#, c-format
msgid ""
"Could not find a theme! Be sure %s exists and contains the usual themes.\n"
@ -324,19 +324,6 @@ msgstr ""
"테마를 찾을 수 없습니다! %s이(가) 있고 올바른 테마가 들어 있는지 확인하십시"
"오.\n"
#: ../src/core/monitor.c:711
msgid "Built-in display"
msgstr "내장 디스플레이"
#. TRANSLATORS: this is a monitor name (in case we don't know
#. the vendor), it's Unknown followed by a size in inches,
#. like 'Unknown 15"'
#.
#: ../src/core/monitor.c:739
#, c-format
msgid "Unknown %s"
msgstr "알 수 없는 %s인치"
#: ../src/core/mutter.c:40
#, c-format
msgid ""
@ -360,20 +347,18 @@ msgstr "버전을 출력합니다"
msgid "Mutter plugin to use"
msgstr "사용할 머터 플러그인"
#: ../src/core/prefs.c:1202
#: ../src/core/prefs.c:1087
msgid ""
"Workarounds for broken applications disabled. Some applications may not "
"behave properly.\n"
msgstr ""
"응용 프로그램에 대한 임시 방편을 막았습니다. 몇몇 응용 프로그램이 제대로 동작"
"하지 않을것입니다.\n"
msgstr "응용 프로그램에 대한 임시 방편을 막았습니다. 몇몇 응용 프로그램이 제대로 동작하지 않을것입니다.\n"
#: ../src/core/prefs.c:1277
#: ../src/core/prefs.c:1162
#, c-format
msgid "Could not parse font description \"%s\" from GSettings key %s\n"
msgstr "GSettings 키 %2$s에서 글꼴 지정 \"%1$s\"을(를) 분석할 수 없습니다\n"
#: ../src/core/prefs.c:1343
#: ../src/core/prefs.c:1228
#, c-format
msgid ""
"\"%s\" found in configuration database is not a valid value for mouse button "
@ -382,7 +367,7 @@ msgstr ""
"설정 데이터베이스에서 찾은 \"%s\"이(가) 마우스 단추 변경 키의 올바른 값이 아"
"닙니다\n"
#: ../src/core/prefs.c:1909
#: ../src/core/prefs.c:1780
#, c-format
msgid ""
"\"%s\" found in configuration database is not a valid value for keybinding "
@ -391,17 +376,17 @@ msgstr ""
"설정 데이터베이스에서 찾은 \"%s\"이(가) 단축키 \"%s\"에 대한 올바른 값이 아닙"
"니다\n"
#: ../src/core/prefs.c:1999
#: ../src/core/prefs.c:1879
#, c-format
msgid "Workspace %d"
msgstr "작업 공간 %d"
#: ../src/core/screen.c:534
#: ../src/core/screen.c:673
#, c-format
msgid "Screen %d on display '%s' is invalid\n"
msgstr "디스플레이 '%2$s'의 화면 %1$d은(는) 잘못되었습니다\n"
#: ../src/core/screen.c:550
#: ../src/core/screen.c:689
#, c-format
msgid ""
"Screen %d on display \"%s\" already has a window manager; try using the --"
@ -410,19 +395,19 @@ msgstr ""
"디스플레이 \"%2$s\"의 화면 %1$d에 이미 창 관리자가 실행되고 있습니다. 현재 "
"창 관리자를 무시하는 --replace 옵션을 써보십시오.\n"
#: ../src/core/screen.c:577
#: ../src/core/screen.c:716
#, c-format
msgid ""
"Could not acquire window manager selection on screen %d display \"%s\"\n"
msgstr "디스플레이 \"%2$s\"의 화면 %1$d에 창 관리 선택을 가질 수 없습니다\n"
#: ../src/core/screen.c:655
#: ../src/core/screen.c:794
#, c-format
msgid "Screen %d on display \"%s\" already has a window manager\n"
msgstr ""
"디스플레이 \"%2$s\"의 화면 %1$d은(는) 이미 창 관리자가 실행되고 있습니다\n"
#: ../src/core/screen.c:846
#: ../src/core/screen.c:979
#, c-format
msgid "Could not release screen %d on display \"%s\"\n"
msgstr "디스플레이 \"%2$s\"의 화면 %1$d을(를) 떼어 놓을수 없습니다\n"
@ -482,43 +467,44 @@ msgstr ""
"이 창은 &quot;현재 설정 저장&quot;을 지원하지 않기 때문에 다음 번에 로그인 "
"할 때 수동으로 다시 시작해야 합니다."
#: ../src/core/util.c:84
#: ../src/core/util.c:80
#, c-format
msgid "Failed to open debug log: %s\n"
msgstr "디버그 로그 열기 실패: %s\n"
#: ../src/core/util.c:94
#: ../src/core/util.c:90
#, c-format
msgid "Failed to fdopen() log file %s: %s\n"
msgstr "로그 파일 %s을(를) fdopen()하기 실패: %s\n"
#: ../src/core/util.c:100
#: ../src/core/util.c:96
#, c-format
msgid "Opened log file %s\n"
msgstr "로그 파일 %s을(를) 엽니다\n"
#: ../src/core/util.c:119
#: ../src/core/util.c:115 ../src/tools/mutter-message.c:149
#, c-format
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "머터가 자세한 모드 지원 없이 컴파일 되었습니다\n"
#: ../src/core/util.c:264
#: ../src/core/util.c:259
msgid "Window manager: "
msgstr "창 관리자: "
#: ../src/core/util.c:414
#: ../src/core/util.c:407
msgid "Bug in window manager: "
msgstr "창 관리자의 벌레: "
#: ../src/core/util.c:445
#: ../src/core/util.c:438
msgid "Window manager warning: "
msgstr "창 관리자 주의: "
#: ../src/core/util.c:473
#: ../src/core/util.c:466
msgid "Window manager error: "
msgstr "장 관리자 오류: "
#. first time through
#: ../src/core/window.c:7533
#: ../src/core/window.c:7539
#, c-format
msgid ""
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
@ -534,7 +520,7 @@ msgstr ""
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
#. * about these apps but make them work.
#.
#: ../src/core/window.c:8257
#: ../src/core/window.c:8263
#, c-format
msgid ""
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size "
@ -543,23 +529,23 @@ msgstr ""
"%s 창에서 크기 변경이 불가능하다는 MWM 힌트를 설정했지만, 최소 크기 %d x %d "
"및 최대 크기 %d x %d(으)로 설정했습니다. 앞뒤가 맞지 않습니다.\n"
#: ../src/core/window-props.c:347
#: ../src/core/window-props.c:318
#, c-format
msgid "Application set a bogus _NET_WM_PID %lu\n"
msgstr "응용 프로그램이 가짜 _NET_WM_PID %lu을(를) 설정하였습니다\n"
# <창제목> (on <기계>)
#: ../src/core/window-props.c:463
#: ../src/core/window-props.c:434
#, c-format
msgid "%s (on %s)"
msgstr "%s (%s에서)"
#: ../src/core/window-props.c:1546
#: ../src/core/window-props.c:1517
#, c-format
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
msgstr "%2$s에 대해 WM_TRANSIENT_FOR 0x%1$lx 창이 잘못되었습니다.\n"
#: ../src/core/window-props.c:1557
#: ../src/core/window-props.c:1528
#, c-format
msgid "WM_TRANSIENT_FOR window 0x%lx for %s would create loop.\n"
msgstr "%2$s에 대해 WM_TRANSIENT_FOR 0x%1$lx 창은 무한 반복입니다.\n"
@ -588,7 +574,9 @@ msgstr "창 0x%2$lx의 등록 정보 %1$s은(는) 잘못된 UTF-8이 들어 있
#, c-format
msgid ""
"Property %s on window 0x%lx contained invalid UTF-8 for item %d in the list\n"
msgstr "창 0x%2$lx의 등록 정보 %1$s은(는) 목록안의 항목 %3$d에 잘못된 UTF-8 문자가 들어 있습니다\n"
msgstr ""
"창 0x%2$lx의 등록 정보 %1$s은(는) 목록안의 항목 %3$d에 잘못된 UTF-8을 포함하"
"고 있습니다\n"
#: ../src/mutter.desktop.in.h:1 ../src/mutter-wm.desktop.in.h:1
msgid "Mutter"
@ -717,104 +705,109 @@ msgstr "탭 팝업에서 창 선택"
msgid "Cancel tab popup"
msgstr "탭 팝업 취소"
#: ../src/tools/mutter-message.c:123
#, c-format
msgid "Usage: %s\n"
msgstr "사용법: %s\n"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:67
#: ../src/ui/menu.c:69
msgid "Mi_nimize"
msgstr "최소화(_N)"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:69
#: ../src/ui/menu.c:71
msgid "Ma_ximize"
msgstr "최대화(_X)"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:71
#: ../src/ui/menu.c:73
msgid "Unma_ximize"
msgstr "최대화 취소(_X)"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:73
#: ../src/ui/menu.c:75
msgid "Roll _Up"
msgstr "말아올리기(_U)"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:75
#: ../src/ui/menu.c:77
msgid "_Unroll"
msgstr "펼치기(_U)"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:77
#: ../src/ui/menu.c:79
msgid "_Move"
msgstr "옮기기(_M)"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:79
#: ../src/ui/menu.c:81
msgid "_Resize"
msgstr "크기 조정(_R)"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:81
#: ../src/ui/menu.c:83
msgid "Move Titlebar On_screen"
msgstr "창 제목막대 화면에 표시(_S)"
#. separator
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:84 ../src/ui/menu.c:86
#: ../src/ui/menu.c:86 ../src/ui/menu.c:88
msgid "Always on _Top"
msgstr "항상 위(_T)"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:88
#: ../src/ui/menu.c:90
msgid "_Always on Visible Workspace"
msgstr "항상 현재 작업 공간에 놓기(_A)"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:90
#: ../src/ui/menu.c:92
msgid "_Only on This Workspace"
msgstr "이 작업 공간에만 놓기(_O)"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:92
#: ../src/ui/menu.c:94
msgid "Move to Workspace _Left"
msgstr "왼쪽 작업 공간으로 옮기기(_L)"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:94
#: ../src/ui/menu.c:96
msgid "Move to Workspace R_ight"
msgstr "오른쪽 작업 공간으로 옮기기(_I)"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:96
#: ../src/ui/menu.c:98
msgid "Move to Workspace _Up"
msgstr "위쪽 작업 공간으로 옮기기(_U)"
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:98
#: ../src/ui/menu.c:100
msgid "Move to Workspace _Down"
msgstr "아래쪽 작업 공간으로 옮기기(_D)"
#. separator
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/ui/menu.c:102
#: ../src/ui/menu.c:104
msgid "_Close"
msgstr "닫기(_C)"
#: ../src/ui/menu.c:202
#: ../src/ui/menu.c:204
#, c-format
msgid "Workspace %d%n"
msgstr "작업 공간 %d%n"
#: ../src/ui/menu.c:212
#: ../src/ui/menu.c:214
#, c-format
msgid "Workspace 1_0"
msgstr "작업 공간 1_0"
#: ../src/ui/menu.c:214
#: ../src/ui/menu.c:216
#, c-format
msgid "Workspace %s%d"
msgstr "작업 공간 %s%d"
#: ../src/ui/menu.c:384
#: ../src/ui/menu.c:397
msgid "Move to Another _Workspace"
msgstr "다른 작업 공간으로 옮기기(_W)"
@ -916,50 +909,50 @@ msgstr "Mod5"
msgid "%d x %d"
msgstr "%d x %d"
#: ../src/ui/theme.c:236
#: ../src/ui/theme.c:235
msgid "top"
msgstr "맨 위"
#: ../src/ui/theme.c:238
#: ../src/ui/theme.c:237
msgid "bottom"
msgstr "맨 아래"
#: ../src/ui/theme.c:240
#: ../src/ui/theme.c:239
msgid "left"
msgstr "왼쪽"
#: ../src/ui/theme.c:242
#: ../src/ui/theme.c:241
msgid "right"
msgstr "오른쪽"
#: ../src/ui/theme.c:270
#: ../src/ui/theme.c:269
#, c-format
msgid "frame geometry does not specify \"%s\" dimension"
msgstr "프레임 위치가 \"%s\"차원으로 지정되지 않았습니다"
#: ../src/ui/theme.c:289
#: ../src/ui/theme.c:288
#, c-format
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
msgstr ""
"프레임 위치가 가장자리 \"%2$s\" 가장자리의 \"%1$s\"차원으로 지정되지 않았습니"
"다."
#: ../src/ui/theme.c:326
#: ../src/ui/theme.c:325
#, c-format
msgid "Button aspect ratio %g is not reasonable"
msgstr "단추의 가로세로 비 %g이(가) 적당하지 않습니다"
#: ../src/ui/theme.c:338
#: ../src/ui/theme.c:337
#, c-format
msgid "Frame geometry does not specify size of buttons"
msgstr "프레임 위치가 단추의 크기로 지정되지 않았습니다"
#: ../src/ui/theme.c:1051
#: ../src/ui/theme.c:1050
#, c-format
msgid "Gradients should have at least two colors"
msgstr "서서히 변하는 색으로 지정하려면 최소 2색이 필요합니다"
#: ../src/ui/theme.c:1203
#: ../src/ui/theme.c:1202
#, c-format
msgid ""
"GTK custom color specification must have color name and fallback in "
@ -968,7 +961,7 @@ msgstr ""
"GTK 사용자 지정 색상 지정은 색 이름과 대체할 색을 괄호 안에 써야 합니다. 예"
"를 들어: gtk:custom(foo,bar). \"%s\"을(를) 분석할 수 없습니다"
#: ../src/ui/theme.c:1219
#: ../src/ui/theme.c:1218
#, c-format
msgid ""
"Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-"
@ -977,7 +970,7 @@ msgstr ""
"gtk:custom의 color_name 파라미터 안에 잘못된 문자 '%c'. A-Za-z0-9-_ 문자만 허"
"용합니다."
#: ../src/ui/theme.c:1233
#: ../src/ui/theme.c:1232
#, c-format
msgid ""
"Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not "
@ -986,7 +979,7 @@ msgstr ""
"gtk:custom 형식은 \"gtk:custom(색이름,대체색)\"입니다, \"%s\"(은)는 형식에 맞"
"지 않습니다"
#: ../src/ui/theme.c:1278
#: ../src/ui/theme.c:1277
#, c-format
msgid ""
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
@ -995,7 +988,7 @@ msgstr ""
"GTK 색상 지정은 중괄호안에 있어야 합니다. 예를 들어: gtk:fg[NORMAL], 여기서 "
"NORMAL이 값입니다. \"%s\"을(를) 분석할 수 없습니다."
#: ../src/ui/theme.c:1292
#: ../src/ui/theme.c:1291
#, c-format
msgid ""
"GTK color specification must have a close bracket after the state, e.g. gtk:"
@ -1004,17 +997,17 @@ msgstr ""
"GTK 색상 지정은 값 뒤에 중괄호로 닫혀 있어야 합니다. 예를 들어: gtk:fg"
"[NORMAL], 여기서 NORMAL은 값입니다. \"%s\"을(를) 분석할 수 없습니다."
#: ../src/ui/theme.c:1303
#: ../src/ui/theme.c:1302
#, c-format
msgid "Did not understand state \"%s\" in color specification"
msgstr "색상 지정의 \"%s\" 값을 이해할 수 없습니다"
#: ../src/ui/theme.c:1316
#: ../src/ui/theme.c:1315
#, c-format
msgid "Did not understand color component \"%s\" in color specification"
msgstr "색상 지정의 색상 구성요소 \"%s\"을(를) 이해할 수 없습니다"
#: ../src/ui/theme.c:1345
#: ../src/ui/theme.c:1344
#, c-format
msgid ""
"Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the "
@ -1023,17 +1016,17 @@ msgstr ""
"섞기 형식은 \"blend/bg_color/fg_color/alpha\"입니다, \"%s\"은(는) 형식에 맞"
"지 않습니다"
#: ../src/ui/theme.c:1356
#: ../src/ui/theme.c:1355
#, c-format
msgid "Could not parse alpha value \"%s\" in blended color"
msgstr "색상 섞기에서 알파 값 \"%s\"을(를) 분석할 수 없습니다"
#: ../src/ui/theme.c:1366
#: ../src/ui/theme.c:1365
#, c-format
msgid "Alpha value \"%s\" in blended color is not between 0.0 and 1.0"
msgstr "색상 섞기에서 알파 값 \"%s\"은(는) 0.0과 1.0 사이의 값이 아닙니다"
msgstr "색상 섞기에서 알파 값 \"%s\"은(는) 0.0 과 1.0사이의 값이 아닙니다"
#: ../src/ui/theme.c:1413
#: ../src/ui/theme.c:1412
#, c-format
msgid ""
"Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format"
@ -1041,78 +1034,79 @@ msgstr ""
"그림자 형식은 \"shade/base_color/format\"입니다, \"%s\"(은)는 형식에 맞지 않"
"습니다"
#: ../src/ui/theme.c:1424
#: ../src/ui/theme.c:1423
#, c-format
msgid "Could not parse shade factor \"%s\" in shaded color"
msgstr "그림자색에서 그림자 인자 \"%s\"(을)를 해석할 수 없습니다"
#: ../src/ui/theme.c:1434
#: ../src/ui/theme.c:1433
#, c-format
msgid "Shade factor \"%s\" in shaded color is negative"
msgstr "그림자색에서 그림자 인자 \"%s\"(은)는 음수입니다"
#: ../src/ui/theme.c:1463
#: ../src/ui/theme.c:1462
#, c-format
msgid "Could not parse color \"%s\""
msgstr "색상 \"%s\"을(를) 해석할 수 없습니다"
#: ../src/ui/theme.c:1780
#: ../src/ui/theme.c:1779
#, c-format
msgid "Coordinate expression contains character '%s' which is not allowed"
msgstr "좌표식에 허용되지 않는 문자 '%s'(이)가 어 있습니다"
msgstr "좌표식에 허용되지 않는 문자 '%s'(이)가 포함되어 있습니다"
#: ../src/ui/theme.c:1807
#: ../src/ui/theme.c:1806
#, c-format
msgid ""
"Coordinate expression contains floating point number '%s' which could not be "
"parsed"
msgstr "좌표식에 분석할 수 없는 부동소수점 숫자 '%s'이(가) 포함되어 있습니다"
#: ../src/ui/theme.c:1821
#: ../src/ui/theme.c:1820
#, c-format
msgid "Coordinate expression contains integer '%s' which could not be parsed"
msgstr "좌표식에 분석할 수 없는 정수 '%s'이(가) 포함되어 있습니다"
#: ../src/ui/theme.c:1942
#: ../src/ui/theme.c:1941
#, c-format
msgid ""
"Coordinate expression contained unknown operator at the start of this text: "
"\"%s\""
msgstr "좌표식에 이 글자 시작부분에 알 수 없는 연산자가 들어 있습니다: \"%s\""
msgstr ""
"좌표식에 이 글자 시작부분에 알 수 없는 연산자가 포함되어 있습니다: \"%s\""
#: ../src/ui/theme.c:1999
#: ../src/ui/theme.c:1998
#, c-format
msgid "Coordinate expression was empty or not understood"
msgstr "좌표식이 비어있거나 이해할 수 없습니다"
#: ../src/ui/theme.c:2112 ../src/ui/theme.c:2122 ../src/ui/theme.c:2156
#: ../src/ui/theme.c:2111 ../src/ui/theme.c:2121 ../src/ui/theme.c:2155
#, c-format
msgid "Coordinate expression results in division by zero"
msgstr "좌표식의 결과 값이 0로 나누었습니다"
#: ../src/ui/theme.c:2164
#: ../src/ui/theme.c:2163
#, c-format
msgid ""
"Coordinate expression tries to use mod operator on a floating-point number"
msgstr "좌표식에서 부동소수점 수에 나머지 연산을 하려 합니다"
#: ../src/ui/theme.c:2220
#: ../src/ui/theme.c:2219
#, c-format
msgid ""
"Coordinate expression has an operator \"%s\" where an operand was expected"
msgstr "좌표식에서 피연산자가 들어갈 곳에 연산자 \"%s\"이(가) 있습니다"
#: ../src/ui/theme.c:2229
#: ../src/ui/theme.c:2228
#, c-format
msgid "Coordinate expression had an operand where an operator was expected"
msgstr "좌표식에서 연산자가 들어갈 곳에 피연산자가 있습니다"
#: ../src/ui/theme.c:2237
#: ../src/ui/theme.c:2236
#, c-format
msgid "Coordinate expression ended with an operator instead of an operand"
msgstr "좌표식에서 피연산자 대신에 연산자로 끝나있습니다"
#: ../src/ui/theme.c:2247
#: ../src/ui/theme.c:2246
#, c-format
msgid ""
"Coordinate expression has operator \"%c\" following operator \"%c\" with no "
@ -1121,37 +1115,37 @@ msgstr ""
"좌표식에서 피연산자가 없는 연산자 \"%2$c\"다음에 연산자 \"%1$c\"이(가) 있습니"
"다"
#: ../src/ui/theme.c:2398 ../src/ui/theme.c:2443
#: ../src/ui/theme.c:2397 ../src/ui/theme.c:2442
#, c-format
msgid "Coordinate expression had unknown variable or constant \"%s\""
msgstr "좌표식에 알 수 없는 변수나 상수 \"%s\"이(가) 있습니다"
#: ../src/ui/theme.c:2497
#: ../src/ui/theme.c:2496
#, c-format
msgid "Coordinate expression parser overflowed its buffer."
msgstr "좌표 계산 파서의 버퍼가 크기를 넘어갔습니다."
#: ../src/ui/theme.c:2526
#: ../src/ui/theme.c:2525
#, c-format
msgid "Coordinate expression had a close parenthesis with no open parenthesis"
msgstr "좌표식에 닫는 괄호는 있지만 여는 괄호가 없습니다"
#: ../src/ui/theme.c:2590
#: ../src/ui/theme.c:2589
#, c-format
msgid "Coordinate expression had an open parenthesis with no close parenthesis"
msgstr "좌표식에 여는 괄호는 있지만 닫는 괄호가 없습니다"
#: ../src/ui/theme.c:2601
#: ../src/ui/theme.c:2600
#, c-format
msgid "Coordinate expression doesn't seem to have any operators or operands"
msgstr "좌표식에 어떠한 연산자나 피연산자가 없습니다"
#: ../src/ui/theme.c:2814 ../src/ui/theme.c:2834 ../src/ui/theme.c:2854
#: ../src/ui/theme.c:2813 ../src/ui/theme.c:2833 ../src/ui/theme.c:2853
#, c-format
msgid "Theme contained an expression that resulted in an error: %s\n"
msgstr "테마가 오류 값을 내는 표현식이 들어 있습니다: %s\n"
#: ../src/ui/theme.c:4500
#: ../src/ui/theme.c:4499
#, c-format
msgid ""
"<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be "
@ -1160,7 +1154,7 @@ msgstr ""
"이 프레임 스타일에는 <button function=\"%s\" style=\"%s\" draw_ops=\"whatever"
"\"/>가 지정되어야 합니다"
#: ../src/ui/theme.c:5011 ../src/ui/theme.c:5036
#: ../src/ui/theme.c:5010 ../src/ui/theme.c:5035
#, c-format
msgid ""
"Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
@ -1168,18 +1162,18 @@ msgstr ""
"<frame state=\"%s\" resize=\"%s\" focus=\"%s\" state=\"whatever\"/> 가 없습니"
"다"
#: ../src/ui/theme.c:5082
#: ../src/ui/theme.c:5083
#, c-format
msgid "Failed to load theme \"%s\": %s\n"
msgstr "테마 \"%s\"을(를) 읽을 수 없습니다: %s\n"
#: ../src/ui/theme.c:5218 ../src/ui/theme.c:5225 ../src/ui/theme.c:5232
#: ../src/ui/theme.c:5239 ../src/ui/theme.c:5246
#: ../src/ui/theme.c:5219 ../src/ui/theme.c:5226 ../src/ui/theme.c:5233
#: ../src/ui/theme.c:5240 ../src/ui/theme.c:5247
#, c-format
msgid "No <%s> set for theme \"%s\""
msgstr "테마 \"%2$s\"의 <%1$s>(이)가 설정되지 않았습니다"
#: ../src/ui/theme.c:5254
#: ../src/ui/theme.c:5255
#, c-format
msgid ""
"No frame style set for window type \"%s\" in theme \"%s\", add a <window "
@ -1188,14 +1182,14 @@ msgstr ""
"테마 \"%2$s\"의 창 형식 \"%1$s\"에 대한 프레임 스타일이 없습니다,<window "
"type=\"%3$s\" style_set=\"whatever\"/> 엘리먼트를 추가하십시오"
#: ../src/ui/theme.c:5661 ../src/ui/theme.c:5723 ../src/ui/theme.c:5786
#: ../src/ui/theme.c:5662 ../src/ui/theme.c:5724 ../src/ui/theme.c:5787
#, c-format
msgid ""
"User-defined constants must begin with a capital letter; \"%s\" does not"
msgstr ""
"사용자 정의 상수는 대문자로 시작되어야 합니다. \"%s\"은(는) 그렇지 않습니다."
#: ../src/ui/theme.c:5669 ../src/ui/theme.c:5731 ../src/ui/theme.c:5794
#: ../src/ui/theme.c:5670 ../src/ui/theme.c:5732 ../src/ui/theme.c:5795
#, c-format
msgid "Constant \"%s\" has already been defined"
msgstr "상수 \"%s\"은(는) 이미 지정되어 있습니다"
@ -1330,7 +1324,9 @@ msgstr "<%s> 엘리먼트는 <%s> 아래에 허용되지 않습니다"
msgid ""
"Cannot specify both \"button_width\"/\"button_height\" and \"aspect_ratio\" "
"for buttons"
msgstr "단추의 \"button_width\"/\"button_height\"와 \"aspect_ratio\"를 한꺼번에 지정할 수 없습니다"
msgstr ""
"단추의 button_width/button_height 와 \"aspect_ratio\"를 한꺼번에 지정할 수 없"
"습니다"
#: ../src/ui/theme-parser.c:1450
#, c-format
@ -1391,7 +1387,7 @@ msgstr "\"%s\"라 불리는 <draw_ops>는 정의되지 않았습니다"
#: ../src/ui/theme-parser.c:2706 ../src/ui/theme-parser.c:2802
#, c-format
msgid "Including draw_ops \"%s\" here would create a circular reference"
msgstr "여기서 draw_ops \"%s\"을(를) 포함하면 순환 참조가 됩니다."
msgstr "draw_ops를 포함하는 \"%s\"이(가) 자기 자신을 참조하고 있습니다"
#: ../src/ui/theme-parser.c:2917
#, c-format
@ -1573,7 +1569,205 @@ msgstr "<%s> 엘리먼트 안에 텍스트가 허용되지 않습니다"
msgid "<%s> specified twice for this theme"
msgstr "이 테마에서 <%s> 태그가 두 번 지정되었습니다"
#: ../src/ui/theme-parser.c:4336
#: ../src/ui/theme-parser.c:4334
#, c-format
msgid "Failed to find a valid file for theme %s\n"
msgstr "%s 테마의 올바른 파일을 찾는 데 실패했습니다\n"
#: ../src/ui/theme-viewer.c:99
msgid "_Windows"
msgstr "창(_W)"
#: ../src/ui/theme-viewer.c:100
msgid "_Dialog"
msgstr "대화 상자(_D)"
#: ../src/ui/theme-viewer.c:101
msgid "_Modal dialog"
msgstr "모달 대화 상자(_M)"
#: ../src/ui/theme-viewer.c:102
msgid "_Utility"
msgstr "도구(_U)"
#: ../src/ui/theme-viewer.c:103
msgid "_Splashscreen"
msgstr "스플래시 화면(_S)"
#: ../src/ui/theme-viewer.c:104
msgid "_Top dock"
msgstr "위 도크(_T)"
#: ../src/ui/theme-viewer.c:105
msgid "_Bottom dock"
msgstr "아래 도크(_B)"
#: ../src/ui/theme-viewer.c:106
msgid "_Left dock"
msgstr "왼쪽 도크(_L)"
#: ../src/ui/theme-viewer.c:107
msgid "_Right dock"
msgstr "오른쪽 도크(_R)"
#: ../src/ui/theme-viewer.c:108
msgid "_All docks"
msgstr "모든 도크(_A)"
#: ../src/ui/theme-viewer.c:109
msgid "Des_ktop"
msgstr "데스크톱(_K)"
#: ../src/ui/theme-viewer.c:115
msgid "Open another one of these windows"
msgstr "이 창을 하나 더 엽니다"
#: ../src/ui/theme-viewer.c:117
msgid "This is a demo button with an 'open' icon"
msgstr "'열기' 아이콘이 들어 있는 데모 단추입니다"
#: ../src/ui/theme-viewer.c:119
msgid "This is a demo button with a 'quit' icon"
msgstr "'끝내기' 아이콘이 들어 있는 데모 단추입니다"
#: ../src/ui/theme-viewer.c:248
msgid "This is a sample message in a sample dialog"
msgstr "예제 대화 상자의 예제 메시지입니다"
#: ../src/ui/theme-viewer.c:328
#, c-format
msgid "Fake menu item %d\n"
msgstr "가짜 메뉴 항목 %d\n"
#: ../src/ui/theme-viewer.c:363
msgid "Border-only window"
msgstr "테두리만 있는 창"
#: ../src/ui/theme-viewer.c:365
msgid "Bar"
msgstr "모음"
#: ../src/ui/theme-viewer.c:382
msgid "Normal Application Window"
msgstr "보통 프로그램 창"
#: ../src/ui/theme-viewer.c:386
msgid "Dialog Box"
msgstr "대화 상자"
#: ../src/ui/theme-viewer.c:390
msgid "Modal Dialog Box"
msgstr "모달 대화 상자"
#: ../src/ui/theme-viewer.c:394
msgid "Utility Palette"
msgstr "도구 팔레트"
#: ../src/ui/theme-viewer.c:398
msgid "Torn-off Menu"
msgstr "떼어내기 메뉴"
#: ../src/ui/theme-viewer.c:402
msgid "Border"
msgstr "테두리"
#: ../src/ui/theme-viewer.c:406
msgid "Attached Modal Dialog"
msgstr "부착한 모달 대화 상자"
#: ../src/ui/theme-viewer.c:737
#, c-format
msgid "Button layout test %d"
msgstr "단추 배치 테스트 %d"
#: ../src/ui/theme-viewer.c:766
#, c-format
msgid "%g milliseconds to draw one window frame"
msgstr "창 프레임 하나를 그리는 데 %g ms"
#: ../src/ui/theme-viewer.c:811
#, c-format
msgid "Usage: metacity-theme-viewer [THEMENAME]\n"
msgstr "사용법: metacity-theme-viewer [테마이름]\n"
#: ../src/ui/theme-viewer.c:818
#, c-format
msgid "Error loading theme: %s\n"
msgstr "테마를 읽어들이는 데 오류가 발생했습니다: %s\n"
#: ../src/ui/theme-viewer.c:824
#, c-format
msgid "Loaded theme \"%s\" in %g seconds\n"
msgstr "\"%s\" 테마를 읽어들이는 데 %g초\n"
#: ../src/ui/theme-viewer.c:869
msgid "Normal Title Font"
msgstr "보통 제목 글꼴"
#: ../src/ui/theme-viewer.c:875
msgid "Small Title Font"
msgstr "작은 제목 글꼴"
#: ../src/ui/theme-viewer.c:881
msgid "Large Title Font"
msgstr "큰 제목 글꼴"
#: ../src/ui/theme-viewer.c:886
msgid "Button Layouts"
msgstr "단추 배치"
#: ../src/ui/theme-viewer.c:891
msgid "Benchmark"
msgstr "벤치마크"
#: ../src/ui/theme-viewer.c:947
msgid "Window Title Goes Here"
msgstr "창 제목이 여기에 들어갑니다"
#: ../src/ui/theme-viewer.c:1053
#, c-format
msgid ""
"Drew %d frames in %g client-side seconds (%g milliseconds per frame) and %g "
"seconds wall clock time including X server resources (%g milliseconds per "
"frame)\n"
msgstr ""
"%d개 프레임을 그리는 데 클라이언트 입장에서 %g초가 걸렸습니다(한 프레임에 %g "
"ms). 그리고 X 서버 리소스까지 포함해 실제 시간으로 %g 초가 걸렸습니다(한 프레"
"임에 %g ms).\n"
#: ../src/ui/theme-viewer.c:1273
msgid "position expression test returned TRUE but set error"
msgstr "위치 표현식 테스트가 참을 리턴했지만 오류가 발생했습니다"
#: ../src/ui/theme-viewer.c:1275
msgid "position expression test returned FALSE but didn't set error"
msgstr "위치 표현식 테스트가 거짓을 리턴했지만 오류가 발생하지 않았습니다"
#: ../src/ui/theme-viewer.c:1279
msgid "Error was expected but none given"
msgstr "오류가 발생해야 하지만 발생하지 않았습니다"
#: ../src/ui/theme-viewer.c:1281
#, c-format
msgid "Error %d was expected but %d given"
msgstr "오류 %d번이 발생해야 하지만 오류 %d번이 발생했습니다"
#: ../src/ui/theme-viewer.c:1287
#, c-format
msgid "Error not expected but one was returned: %s"
msgstr "오류가 발생하면 안 되지만 오류 한 개가 발생했습니다: %s"
#: ../src/ui/theme-viewer.c:1291
#, c-format
msgid "x value was %d, %d was expected"
msgstr "가로값이 %d입니다. 와야 하는 값은 %d입니다"
#: ../src/ui/theme-viewer.c:1294
#, c-format
msgid "y value was %d, %d was expected"
msgstr "세로값이 %d입니다. 와야 하는 값은 %d입니다"
#: ../src/ui/theme-viewer.c:1359
#, c-format
msgid "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
msgstr "좌표 표현식 %d개를 %g초에 파싱했습니다(평균 %g초)\n"

498
po/lv.po

File diff suppressed because it is too large Load Diff

493
po/pa.po

File diff suppressed because it is too large Load Diff

921
po/ru.po

File diff suppressed because it is too large Load Diff

View File

@ -10,8 +10,8 @@ msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=mutter"
"&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2013-08-18 20:03+0000\n"
"PO-Revision-Date: 2013-09-06 09:19+0200\n"
"POT-Creation-Date: 2013-03-01 15:50+0000\n"
"PO-Revision-Date: 2013-03-11 11:40+0200\n"
"Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n"
"Language-Team: Serbian <gnom@prevod.org>\n"
"Language: sr\n"
@ -320,20 +320,6 @@ msgstr ""
"Не могу да пронађем тему! Проверите да „%s“ постоји и да садржи уобичајене "
"теме.\n"
#: ../src/core/monitor.c:711
msgid "Built-in display"
msgstr "Уграђени дисплеј"
#. TRANSLATORS: this is a monitor name (in case we don't know
#. the vendor), it's Unknown followed by a size in inches,
#. like 'Unknown 15"'
#.
#: ../src/core/monitor.c:739
#, c-format
#| msgid "Unknown element %s"
msgid "Unknown %s"
msgstr "Непознат %s"
#: ../src/core/mutter.c:40
#, c-format
msgid ""

View File

@ -10,8 +10,8 @@ msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=mutter"
"&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2013-08-18 20:03+0000\n"
"PO-Revision-Date: 2013-09-06 09:19+0200\n"
"POT-Creation-Date: 2013-03-01 15:50+0000\n"
"PO-Revision-Date: 2013-03-11 11:40+0200\n"
"Last-Translator: Miroslav Nikolić <miroslavnikolic@rocketmail.com>\n"
"Language-Team: Serbian <gnom@prevod.org>\n"
"Language: sr\n"
@ -320,20 +320,6 @@ msgstr ""
"Ne mogu da pronađem temu! Proverite da „%s“ postoji i da sadrži uobičajene "
"teme.\n"
#: ../src/core/monitor.c:711
msgid "Built-in display"
msgstr "Ugrađeni displej"
#. TRANSLATORS: this is a monitor name (in case we don't know
#. the vendor), it's Unknown followed by a size in inches,
#. like 'Unknown 15"'
#.
#: ../src/core/monitor.c:739
#, c-format
#| msgid "Unknown element %s"
msgid "Unknown %s"
msgstr "Nepoznat %s"
#: ../src/core/mutter.c:40
#, c-format
msgid ""

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -154,7 +154,6 @@ libmutter_wayland_la_SOURCES = \
core/stack-tracker.h \
core/util.c \
meta/util.h \
core/util-private.h \
core/window-props.c \
core/window-props.h \
core/window.c \
@ -204,7 +203,6 @@ libmutter_wayland_la_SOURCES += \
wayland/meta-wayland-surface.c \
wayland/meta-wayland-surface.h \
wayland/meta-wayland-types.h \
wayland/meta-wayland-versions.h \
wayland/meta-weston-launch.c \
wayland/meta-weston-launch.h
@ -395,6 +393,7 @@ $(dbus_xrandr_built_sources) : Makefile.am xrandr.xml
--generate-c-code meta-dbus-xrandr \
$(srcdir)/xrandr.xml
dbus_idle_built_sources = meta-dbus-idle-monitor.c meta-dbus-idle-monitor.h
$(dbus_idle_built_sources) : Makefile.am idle-monitor.xml
$(AM_V_GEN)gdbus-codegen \

View File

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

View File

@ -84,7 +84,6 @@
#include "meta-window-group.h"
#include "window-private.h" /* to check window->hidden */
#include "display-private.h" /* for meta_display_lookup_x_window() */
#include "util-private.h"
#include "meta-wayland-private.h"
#include "meta-wayland-pointer.h"
#include "meta-wayland-keyboard.h"
@ -1067,7 +1066,10 @@ meta_compositor_process_event (MetaCompositor *compositor,
{
if (compositor->modal_plugin && is_grabbed_event (compositor->display, event))
{
_meta_plugin_xevent_filter (compositor->modal_plugin, event);
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (compositor->modal_plugin);
if (klass->xevent_filter)
klass->xevent_filter (compositor->modal_plugin, event);
/* We always consume events even if the plugin says it didn't handle them;
* exclusive is exclusive */
@ -1273,7 +1275,6 @@ sync_actor_stacking (MetaCompScreen *info)
* we go ahead and do it */
children = clutter_actor_get_children (info->window_group);
has_windows = FALSE;
reordered = FALSE;
/* We allow for actors in the window group other than the actors we

View File

@ -37,7 +37,6 @@
#include "mutter-enum-types.h"
#include <meta/errors.h>
#include <meta/meta-background.h>
#include "util-private.h"
#include "meta-background-actor-private.h"
#define FRAGMENT_SHADER_DECLARATIONS \

View File

@ -192,7 +192,10 @@ meta_module_class_init (MetaModuleClass *klass)
static void
meta_module_init (MetaModule *self)
{
self->priv = META_MODULE_GET_PRIVATE (self);
MetaModulePrivate *priv;
self->priv = priv = META_MODULE_GET_PRIVATE (self);
}
GType

View File

@ -306,13 +306,41 @@ meta_plugin_manager_filter_keybinding (MetaPluginManager *plugin_mgr,
return FALSE;
}
/*
* The public method that the compositor hooks into for desktop switching.
*
* Returns TRUE if the plugin handled the event type (i.e.,
* if the return value is FALSE, there will be no subsequent call to the
* manager completed() callback, and the compositor must ensure that any
* appropriate post-effect cleanup is carried out.
*/
gboolean
meta_plugin_manager_xevent_filter (MetaPluginManager *plugin_mgr,
XEvent *xev)
{
MetaPlugin *plugin = plugin_mgr->plugin;
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
return _meta_plugin_xevent_filter (plugin, xev);
/* We need to make sure that clutter gets certain events, like
* ConfigureNotify on the stage window. If there is a plugin that
* provides an xevent_filter function, then it's the responsibility
* of that plugin to pass events to Clutter. Otherwise, we send the
* event directly to Clutter ourselves.
*/
if (klass->xevent_filter)
return klass->xevent_filter (plugin, xev);
/* When mutter is running as a wayland compositor, things like input
* events just come directly from clutter so it won't have disabled
* clutter's event retrieval and won't need to forward it events (if
* it did it would lead to recursion). Also when running as a
* wayland compositor we shouldn't be assuming that we're running
* with the clutter x11 backend.
*/
if (meta_is_wayland_compositor ())
return FALSE;
return clutter_x11_handle_event (xev) != CLUTTER_X11_FILTER_CONTINUE;
}
void

View File

@ -72,8 +72,6 @@ gboolean meta_plugin_manager_filter_keybinding (MetaPluginManager *mgr,
gboolean meta_plugin_manager_xevent_filter (MetaPluginManager *mgr,
XEvent *xev);
gboolean _meta_plugin_xevent_filter (MetaPlugin *plugin,
XEvent *xev);
void meta_plugin_manager_confirm_display_change (MetaPluginManager *mgr);

View File

@ -138,7 +138,9 @@ meta_plugin_class_init (MetaPluginClass *klass)
static void
meta_plugin_init (MetaPlugin *self)
{
self->priv = META_PLUGIN_GET_PRIVATE (self);
MetaPluginPrivate *priv;
self->priv = priv = META_PLUGIN_GET_PRIVATE (self);
}
gboolean
@ -183,28 +185,6 @@ _meta_plugin_effect_started (MetaPlugin *plugin)
priv->running++;
}
gboolean
_meta_plugin_xevent_filter (MetaPlugin *plugin,
XEvent *xev)
{
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
/* When mutter is running as a wayland compositor, things like input
* events just come directly from clutter so it won't have disabled
* clutter's event retrieval and won't need to forward it events (if
* it did it would lead to recursion). Also when running as a
* wayland compositor we shouldn't be assuming that we're running
* with the clutter x11 backend.
*/
if (klass->xevent_filter && klass->xevent_filter (plugin, xev))
return TRUE;
else if (!meta_is_wayland_compositor ())
return clutter_x11_handle_event (xev) != CLUTTER_X11_FILTER_CONTINUE;
else
return FALSE;
}
void
meta_plugin_switch_workspace_completed (MetaPlugin *plugin)
{

View File

@ -31,7 +31,6 @@
#include <meta/meta-shaped-texture.h>
#include <meta/util.h>
#include "clutter-utils.h"
#include "meta-texture-tower.h"
#include "meta-shaped-texture-private.h"
@ -146,7 +145,6 @@ meta_shaped_texture_dispose (GObject *object)
priv->paint_tower = NULL;
g_clear_pointer (&priv->texture, cogl_object_unref);
g_clear_pointer (&priv->opaque_region, cairo_region_destroy);
meta_shaped_texture_set_mask_texture (self, NULL);
meta_shaped_texture_set_clip_region (self, NULL);
@ -281,7 +279,6 @@ meta_shaped_texture_paint (ClutterActor *actor)
CoglTexture *paint_tex;
ClutterActorBox alloc;
cairo_region_t *blended_region = NULL;
CoglPipelineFilter filter;
if (priv->clip_region && cairo_region_is_empty (priv->clip_region))
return;
@ -318,22 +315,6 @@ meta_shaped_texture_paint (ClutterActor *actor)
if (tex_width == 0 || tex_height == 0) /* no contents yet */
return;
/* Use nearest-pixel interpolation if the texture is unscaled. This
* improves performance, especially with software rendering.
*/
filter = COGL_PIPELINE_FILTER_LINEAR;
if (!clutter_actor_is_in_clone_paint (actor))
{
int x_origin, y_origin;
if (meta_actor_is_untransformed (actor,
&x_origin,
&y_origin))
filter = COGL_PIPELINE_FILTER_NEAREST;
}
ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
fb = cogl_get_draw_framebuffer ();
@ -362,7 +343,6 @@ meta_shaped_texture_paint (ClutterActor *actor)
opaque_pipeline = get_unblended_pipeline (ctx);
cogl_pipeline_set_layer_texture (opaque_pipeline, 0, paint_tex);
cogl_pipeline_set_layer_filters (opaque_pipeline, 0, filter, filter);
n_rects = cairo_region_num_rectangles (region);
for (i = 0; i < n_rects; i++)
@ -404,11 +384,9 @@ meta_shaped_texture_paint (ClutterActor *actor)
{
pipeline = get_masked_pipeline (ctx);
cogl_pipeline_set_layer_texture (pipeline, 1, priv->mask_texture);
cogl_pipeline_set_layer_filters (pipeline, 1, filter, filter);
}
cogl_pipeline_set_layer_texture (pipeline, 0, paint_tex);
cogl_pipeline_set_layer_filters (pipeline, 0, filter, filter);
{
CoglColor color;
@ -712,7 +690,7 @@ wayland_surface_update_area (MetaShapedTexture *stex,
}
}
static gboolean
static void
get_clip (MetaShapedTexture *stex,
int x,
int y,
@ -738,12 +716,15 @@ get_clip (MetaShapedTexture *stex,
* it here.
*/
if (!clutter_actor_has_allocation (self))
return FALSE;
{
clutter_actor_queue_redraw (self);
return;
}
priv = stex->priv;
if (priv->tex_width == 0 || priv->tex_height == 0)
return FALSE;
return;
clutter_actor_get_allocation_box (self, &allocation);
@ -754,8 +735,6 @@ get_clip (MetaShapedTexture *stex,
clip->y = y * scale_y;
clip->width = width * scale_x;
clip->height = height * scale_y;
return TRUE;
}
/**
@ -786,7 +765,6 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
{
MetaShapedTexturePrivate *priv;
cairo_rectangle_int_t clip;
gboolean has_clip;
priv = stex->priv;
@ -806,7 +784,7 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
meta_texture_tower_update_area (priv->paint_tower, x, y, width, height);
has_clip = get_clip (stex, x, y, width, height, &clip);
get_clip (stex, x, y, width, height, &clip);
if (unobscured_region)
{
@ -816,8 +794,7 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
return FALSE;
intersection = cairo_region_copy (unobscured_region);
if (has_clip)
cairo_region_intersect_rectangle (intersection, &clip);
cairo_region_intersect_rectangle (intersection, &clip);
if (!cairo_region_is_empty (intersection))
{
@ -834,10 +811,7 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
return FALSE;
}
if (has_clip)
clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stex), &clip);
else
clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stex), &clip);
return TRUE;
}

View File

@ -767,9 +767,6 @@ meta_window_actor_get_paint_volume (ClutterActor *actor,
gdk_rectangle_union (&bounds, &shadow_bounds, &bounds);
}
if (priv->unobscured_region)
cairo_region_intersect_rectangle (priv->unobscured_region, &bounds);
origin.x = bounds.x;
origin.y = bounds.y;
origin.z = 0.0f;
@ -1007,7 +1004,7 @@ queue_send_frame_messages_timeout (MetaWindowActor *self)
}
interval = (int)(1000000 / refresh_rate) * 6;
offset = MAX (0, priv->frame_drawn_time + interval - current_time) / 1000;
offset = MAX (0, current_time - priv->frame_drawn_time + interval) / 1000;
/* The clutter master clock source has already been added with META_PRIORITY_REDRAW,
* so the timer will run *after* the clutter frame handling, if a frame is ready
@ -1473,22 +1470,6 @@ meta_window_actor_sync_actor_geometry (MetaWindowActor *self,
MetaWindowActorPrivate *priv = self->priv;
MetaRectangle window_rect;
meta_window_get_input_rect (priv->window, &window_rect);
/* When running as a display server we catch size changes when new
buffers are attached */
if (!meta_is_wayland_compositor ())
{
if (priv->last_width != window_rect.width ||
priv->last_height != window_rect.height)
{
priv->x11_size_changed = TRUE;
priv->last_width = window_rect.width;
priv->last_height = window_rect.height;
}
}
/* Normally we want freezing a window to also freeze its position; this allows
* windows to atomically move and resize together, either under app control,
* or because the user is resizing from the left/top. But on initial placement
@ -1499,12 +1480,22 @@ meta_window_actor_sync_actor_geometry (MetaWindowActor *self,
if (is_frozen (self) && !did_placement)
return;
meta_window_get_input_rect (priv->window, &window_rect);
/* When running as a display server then we instead catch size changes when
* new buffers are attached */
if (!meta_is_wayland_compositor ())
{
if (priv->x11_size_changed)
if (priv->last_width != window_rect.width ||
priv->last_height != window_rect.height)
{
priv->x11_size_changed = TRUE;
meta_window_actor_queue_create_x11_pixmap (self);
meta_window_actor_update_shape (self);
priv->last_width = window_rect.width;
priv->last_height = window_rect.height;
}
}

View File

@ -21,14 +21,15 @@
* 02111-1307, USA.
*/
#include <config.h>
#include <meta/meta-plugin.h>
#include <meta/window.h>
#include <meta/util.h>
#include <meta/meta-background-group.h>
#include <meta/meta-background-actor.h>
#include <meta/util.h>
#include <glib/gi18n-lib.h>
#include <libintl.h>
#define _(x) dgettext (GETTEXT_PACKAGE, x)
#define N_(x) x
#include <clutter/clutter.h>
#include <gmodule.h>

View File

@ -366,25 +366,11 @@ meta_barrier_fire_event (MetaBarrier *barrier,
}
gboolean
meta_display_process_barrier_event (MetaDisplay *display,
XIEvent *event)
meta_display_process_barrier_event (MetaDisplay *display,
XIBarrierEvent *xev)
{
MetaBarrier *barrier;
XIBarrierEvent *xev;
if (event == NULL)
return FALSE;
switch (event->evtype)
{
case XI_BarrierHit:
case XI_BarrierLeave:
break;
default:
return FALSE;
}
xev = (XIBarrierEvent *) event;
barrier = g_hash_table_lookup (display->xids, &xev->barrier);
if (barrier != NULL)
{

View File

@ -53,7 +53,6 @@
#include "bell.h"
#include "screen-private.h"
#include "window-private.h"
#include "util-private.h"
#include <meta/prefs.h>
#include <meta/compositor.h>
#ifdef HAVE_LIBCANBERRA

View File

@ -447,14 +447,12 @@ setup_constraint_info (ConstraintInfo *info,
/* Workaround braindead legacy apps that don't know how to
* fullscreen themselves properly - don't get fooled by
* windows which hide their titlebar when maximized or which are
* client decorated; that's not the same as fullscreen, even
* if there are no struts making the workarea smaller than
* the monitor.
* windows which hide their titlebar when maximized; that's
* not the same as fullscreen, even if there are no struts
* making the workarea smaller than the monitor.
*/
if (meta_prefs_get_force_fullscreen() &&
!window->hide_titlebar_when_maximized &&
window->decorated &&
meta_rectangle_equal (new, &monitor_info->rect) &&
window->has_fullscreen_func &&
!window->fullscreen)

View File

@ -29,7 +29,6 @@
#include "workspace-private.h"
#include <meta/prefs.h>
#include <meta/errors.h>
#include "util-private.h"
/* Looks up the MetaWindow representing the frame of the given X window.
* Used as a helper function by a bunch of the functions below.
@ -90,7 +89,7 @@ meta_core_get (Display *xdisplay,
if (request != META_CORE_WINDOW_HAS_FRAME &&
(window == NULL || window->frame == NULL)) {
meta_bug ("No such frame window 0x%lx!\n", xwindow);
goto out;
return;
}
while (request != META_CORE_GET_END) {
@ -100,7 +99,7 @@ meta_core_get (Display *xdisplay,
switch (request) {
case META_CORE_WINDOW_HAS_FRAME:
*((gboolean*)answer) = window != NULL && window->frame != NULL;
if (!*((gboolean*)answer)) goto out; /* see above */
if (!*((gboolean*)answer)) return; /* see above */
break;
case META_CORE_GET_CLIENT_WIDTH:
*((gint*)answer) = window->rect.width;
@ -155,13 +154,12 @@ meta_core_get (Display *xdisplay,
break;
default:
meta_warning("Unknown window information request: %d\n", request);
meta_warning(_("Unknown window information request: %d"), request);
}
request = va_arg (args, MetaCoreGetType);
}
out:
va_end (args);
}
@ -476,6 +474,26 @@ meta_core_change_workspace (Display *xdisplay,
new_workspace));
}
int
meta_core_get_num_workspaces (Screen *xscreen)
{
MetaScreen *screen;
screen = meta_screen_for_x_screen (xscreen);
return meta_screen_get_n_workspaces (screen);
}
int
meta_core_get_active_workspace (Screen *xscreen)
{
MetaScreen *screen;
screen = meta_screen_for_x_screen (xscreen);
return meta_workspace_index (screen->active_workspace);
}
void
meta_core_show_window_menu (Display *xdisplay,
Window frame_xwindow,

View File

@ -153,6 +153,8 @@ void meta_core_change_workspace (Display *xdisplay,
Window frame_xwindow,
int new_workspace);
int meta_core_get_num_workspaces (Screen *xscreen);
int meta_core_get_active_workspace (Screen *xscreen);
int meta_core_get_frame_workspace (Display *xdisplay,
Window frame_xwindow);
const char* meta_core_get_workspace_name_with_index (Display *xdisplay,

View File

@ -25,7 +25,7 @@
#define _XOPEN_SOURCE /* for kill() */
#include <config.h>
#include "util-private.h"
#include <meta/util.h>
#include "window-private.h"
#include <meta/errors.h>
#include <meta/workspace.h>

View File

@ -155,7 +155,6 @@ struct _MetaDisplay
GSList *screens;
MetaScreen *active_screen;
GHashTable *xids;
GHashTable *wayland_windows;
int error_traps;
int (* error_trap_handler) (Display *display,
XErrorEvent *error);
@ -382,11 +381,6 @@ void meta_display_register_x_window (MetaDisplay *display,
void meta_display_unregister_x_window (MetaDisplay *display,
Window xwindow);
void meta_display_register_wayland_window (MetaDisplay *display,
MetaWindow *window);
void meta_display_unregister_wayland_window (MetaDisplay *display,
MetaWindow *window);
#ifdef HAVE_XSYNC
MetaWindow* meta_display_lookup_sync_alarm (MetaDisplay *display,
XSyncAlarm alarm);
@ -474,9 +468,10 @@ void meta_display_queue_autoraise_callback (MetaDisplay *display,
void meta_display_remove_autoraise_callback (MetaDisplay *display);
void meta_display_overlay_key_activate (MetaDisplay *display);
void meta_display_accelerator_activate (MetaDisplay *display,
guint action,
ClutterKeyEvent *event);
void meta_display_accelerator_activate (MetaDisplay *display,
guint action,
guint deviceid,
guint timestamp);
gboolean meta_display_modifiers_accelerator_activate (MetaDisplay *display);
/* In above-tab-keycode.c */
@ -489,8 +484,8 @@ gboolean meta_display_handle_event (MetaDisplay *display,
const ClutterEvent *event);
#ifdef HAVE_XI23
gboolean meta_display_process_barrier_event (MetaDisplay *display,
XIEvent *event);
gboolean meta_display_process_barrier_event (MetaDisplay *display,
XIBarrierEvent *event);
#endif /* HAVE_XI23 */
void meta_display_set_input_focus_xwindow (MetaDisplay *display,

File diff suppressed because it is too large Load Diff

View File

@ -66,9 +66,9 @@ gboolean meta_window_grab_all_keys (MetaWindow *window,
guint32 timestamp);
void meta_window_ungrab_all_keys (MetaWindow *window,
guint32 timestamp);
gboolean meta_display_process_key_event (MetaDisplay *display,
MetaWindow *window,
ClutterKeyEvent *event);
gboolean meta_display_process_key_event (MetaDisplay *display,
MetaWindow *window,
XIDeviceEvent *event);
void meta_display_process_mapping_event (MetaDisplay *display,
XEvent *event);
@ -81,3 +81,7 @@ gboolean meta_prefs_remove_keybinding (const char *name);
#endif

File diff suppressed because it is too large Load Diff

View File

@ -48,7 +48,7 @@
#include <config.h>
#include <meta/main.h>
#include "util-private.h"
#include <meta/util.h>
#include "display-private.h"
#include <meta/errors.h>
#include "ui.h"
@ -191,7 +191,6 @@ static gchar *opt_client_id;
static gboolean opt_replace_wm;
static gboolean opt_disable_sm;
static gboolean opt_sync;
static gboolean opt_wayland;
static GOptionEntry meta_options[] = {
{
@ -229,12 +228,6 @@ static GOptionEntry meta_options[] = {
N_("Make X calls synchronous"),
NULL
},
{
"wayland", 0, 0, G_OPTION_ARG_NONE,
&opt_wayland,
N_("Run as a wayland compositor"),
NULL
},
{NULL}
};
@ -256,13 +249,16 @@ meta_get_option_context (void)
bindtextdomain (GETTEXT_PACKAGE, MUTTER_LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
/* We must set the windowing backend here, because Clutter creates the backend
object when the first call is made.
/* We must set the variables here, because Clutter creates the backend
when the first call is made.
We consider running from mutter-launch equivalent to running from bare metal.
*/
if (getenv ("WESTON_LAUNCHER_SOCK"))
clutter_set_windowing_backend (CLUTTER_WINDOWING_EGL);
{
g_setenv ("CLUTTER_BACKEND", "eglnative", TRUE);
g_setenv ("CLUTTER_INPUT_BACKEND", "evdev", TRUE);
}
ctx = g_option_context_new (NULL);
g_option_context_add_main_entries (ctx, meta_options, GETTEXT_PACKAGE);
@ -401,6 +397,9 @@ meta_init (void)
g_strerror (errno));
#endif
if (getenv ("MUTTER_SLEEP_INIT"))
sleep (60);
g_unix_signal_add (SIGTERM, on_sigterm, NULL);
if (g_getenv ("MUTTER_VERBOSE"))
@ -408,8 +407,6 @@ meta_init (void)
if (g_getenv ("MUTTER_DEBUG"))
meta_set_debugging (TRUE);
meta_set_is_wayland_compositor (opt_wayland);
if (g_get_home_dir ())
if (chdir (g_get_home_dir ()) < 0)
meta_warning ("Could not change to home directory %s.\n",

View File

@ -25,7 +25,6 @@
#define META_CURSOR_TRACKER_PRIVATE_H
#include <meta/meta-cursor-tracker.h>
#include <wayland-server.h>
#include <clutter/clutter.h>
gboolean meta_cursor_tracker_handle_xevent (MetaCursorTracker *tracker,
@ -34,10 +33,10 @@ gboolean meta_cursor_tracker_handle_xevent (MetaCursorTracker *tracker,
void meta_cursor_tracker_set_root_cursor (MetaCursorTracker *tracker,
MetaCursor cursor);
void meta_cursor_tracker_revert_root (MetaCursorTracker *tracker);
void meta_cursor_tracker_set_buffer (MetaCursorTracker *tracker,
struct wl_resource *buffer,
int hot_x,
int hot_y);
void meta_cursor_tracker_set_sprite (MetaCursorTracker *tracker,
CoglTexture2D *texture,
int hot_x,
int hot_y);
void meta_cursor_tracker_update_position (MetaCursorTracker *tracker,
int new_x,

View File

@ -24,65 +24,50 @@
/**
* SECTION:cursor-tracker
* @title: MetaCursorTracker
* @short_description: Mutter cursor tracking helper. Originally only
* tracking the cursor image, now more of a "core
* pointer abstraction"
* @short_description: Mutter cursor tracking helper
*/
#include <config.h>
#include <string.h>
#include <meta/main.h>
#include <meta/util.h>
#include <meta/errors.h>
#include <cogl/cogl.h>
#include <cogl/cogl-wayland-server.h>
#include <clutter/clutter.h>
#include <gbm.h>
#include <gdk/gdk.h>
#include <X11/cursorfont.h>
#include <X11/extensions/Xfixes.h>
#include <X11/Xcursor/Xcursor.h>
#include "meta-cursor-tracker-private.h"
#include "screen-private.h"
#ifdef HAVE_WAYLAND
#include "meta-wayland-private.h"
#include "monitor-private.h"
#endif
#define META_WAYLAND_DEFAULT_CURSOR_HOTSPOT_X 7
#define META_WAYLAND_DEFAULT_CURSOR_HOTSPOT_Y 4
typedef struct {
CoglTexture2D *texture;
struct gbm_bo *bo;
int hot_x, hot_y;
int ref_count;
} MetaCursorReference;
struct _MetaCursorTracker {
GObject parent_instance;
MetaScreen *screen;
gboolean is_showing;
gboolean has_cursor;
gboolean has_hw_cursor;
MetaCursorReference *sprite;
MetaCursorReference *root_cursor;
MetaCursorReference *default_cursors[META_CURSOR_LAST];
CoglTexture2D *sprite;
int hot_x, hot_y;
CoglTexture2D *root_cursor;
int root_hot_x, root_hot_y;
CoglTexture2D *default_cursor;
int current_x, current_y;
MetaRectangle current_rect;
MetaRectangle previous_rect;
cairo_rectangle_int_t current_rect;
cairo_rectangle_int_t previous_rect;
gboolean previous_is_valid;
CoglPipeline *pipeline;
int drm_fd;
struct gbm_device *gbm;
};
struct _MetaCursorTrackerClass {
@ -98,411 +83,6 @@ enum {
static guint signals[LAST_SIGNAL];
static void meta_cursor_tracker_set_sprite (MetaCursorTracker *tracker,
MetaCursorReference *sprite);
static void meta_cursor_tracker_set_crtc_has_hw_cursor (MetaCursorTracker *tracker,
MetaCRTC *crtc,
gboolean has_hw_cursor);
static MetaCursorReference *
meta_cursor_reference_ref (MetaCursorReference *self)
{
g_assert (self->ref_count > 0);
self->ref_count++;
return self;
}
static void
meta_cursor_reference_unref (MetaCursorReference *self)
{
self->ref_count--;
if (self->ref_count == 0)
{
cogl_object_unref (self->texture);
if (self->bo)
gbm_bo_destroy (self->bo);
g_slice_free (MetaCursorReference, self);
}
}
static void
translate_meta_cursor (MetaCursor cursor,
guint *glyph_out,
const char **name_out)
{
guint glyph = XC_num_glyphs;
const char *name = NULL;
switch (cursor)
{
case META_CURSOR_DEFAULT:
glyph = XC_left_ptr;
break;
case META_CURSOR_NORTH_RESIZE:
glyph = XC_top_side;
break;
case META_CURSOR_SOUTH_RESIZE:
glyph = XC_bottom_side;
break;
case META_CURSOR_WEST_RESIZE:
glyph = XC_left_side;
break;
case META_CURSOR_EAST_RESIZE:
glyph = XC_right_side;
break;
case META_CURSOR_SE_RESIZE:
glyph = XC_bottom_right_corner;
break;
case META_CURSOR_SW_RESIZE:
glyph = XC_bottom_left_corner;
break;
case META_CURSOR_NE_RESIZE:
glyph = XC_top_right_corner;
break;
case META_CURSOR_NW_RESIZE:
glyph = XC_top_left_corner;
break;
case META_CURSOR_MOVE_OR_RESIZE_WINDOW:
glyph = XC_fleur;
break;
case META_CURSOR_BUSY:
glyph = XC_watch;
break;
case META_CURSOR_DND_IN_DRAG:
name = "dnd-none";
break;
case META_CURSOR_DND_MOVE:
name = "dnd-move";
break;
case META_CURSOR_DND_COPY:
name = "dnd-copy";
break;
case META_CURSOR_DND_UNSUPPORTED_TARGET:
name = "dnd-none";
break;
case META_CURSOR_POINTING_HAND:
glyph = XC_hand2;
break;
case META_CURSOR_CROSSHAIR:
glyph = XC_crosshair;
break;
case META_CURSOR_IBEAM:
glyph = XC_xterm;
break;
default:
g_assert_not_reached ();
glyph = 0; /* silence compiler */
break;
}
*glyph_out = glyph;
*name_out = name;
}
static Cursor
load_cursor_on_server (MetaDisplay *display,
MetaCursor cursor)
{
Cursor xcursor;
guint glyph;
const char *name;
translate_meta_cursor (cursor, &glyph, &name);
if (name != NULL)
xcursor = XcursorLibraryLoadCursor (display->xdisplay, name);
else
xcursor = XCreateFontCursor (display->xdisplay, glyph);
return xcursor;
}
Cursor
meta_display_create_x_cursor (MetaDisplay *display,
MetaCursor cursor)
{
return load_cursor_on_server (display, cursor);
}
static XcursorImage *
load_cursor_on_client (MetaDisplay *display,
MetaCursor cursor)
{
XcursorImage *image;
guint glyph;
const char *name;
const char *theme = XcursorGetTheme (display->xdisplay);
int size = XcursorGetDefaultSize (display->xdisplay);
translate_meta_cursor (cursor, &glyph, &name);
if (name != NULL)
image = XcursorLibraryLoadImage (name, theme, size);
else
image = XcursorShapeLoadImage (glyph, theme, size);
return image;
}
static MetaCursorReference *
meta_cursor_reference_from_theme (MetaCursorTracker *tracker,
MetaCursor cursor)
{
XcursorImage *image;
int width, height, rowstride;
CoglPixelFormat cogl_format;
uint32_t gbm_format;
ClutterBackend *clutter_backend;
CoglContext *cogl_context;
MetaCursorReference *self;
image = load_cursor_on_client (tracker->screen->display, cursor);
if (!image)
return NULL;
width = image->width;
height = image->height;
rowstride = width * 4;
gbm_format = GBM_FORMAT_ARGB8888;
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
cogl_format = COGL_PIXEL_FORMAT_BGRA_8888;
#else
cogl_format = COGL_PIXEL_FORMAT_ARGB_8888;
#endif
self = g_slice_new0 (MetaCursorReference);
self->ref_count = 1;
self->hot_x = image->xhot;
self->hot_y = image->yhot;
clutter_backend = clutter_get_default_backend ();
cogl_context = clutter_backend_get_cogl_context (clutter_backend);
self->texture = cogl_texture_2d_new_from_data (cogl_context,
width, height,
cogl_format,
COGL_PIXEL_FORMAT_ANY,
rowstride,
(uint8_t*)image->pixels,
NULL);
if (tracker->gbm)
{
if (width > 64 || height > 64)
{
meta_warning ("Invalid theme cursor size (must be at most 64x64)\n");
goto out;
}
if (gbm_device_is_format_supported (tracker->gbm, gbm_format,
GBM_BO_USE_CURSOR_64X64 | GBM_BO_USE_WRITE))
{
uint32_t buf[64 * 64];
int i;
self->bo = gbm_bo_create (tracker->gbm, 64, 64,
gbm_format, GBM_BO_USE_CURSOR_64X64 | GBM_BO_USE_WRITE);
memset (buf, 0, sizeof(buf));
for (i = 0; i < height; i++)
memcpy (buf + i * 64, image->pixels + i * width, width * 4);
gbm_bo_write (self->bo, buf, 64 * 64 * 4);
}
else
meta_warning ("HW cursor for format %d not supported\n", gbm_format);
}
out:
XcursorImageDestroy (image);
return self;
}
static MetaCursorReference *
meta_cursor_reference_take_texture (CoglTexture2D *texture)
{
MetaCursorReference *self;
self = g_slice_new0 (MetaCursorReference);
self->ref_count = 1;
self->texture = texture;
return self;
}
static MetaCursorReference *
meta_cursor_reference_from_buffer (MetaCursorTracker *tracker,
struct wl_resource *buffer,
int hot_x,
int hot_y)
{
ClutterBackend *backend;
CoglContext *cogl_context;
MetaCursorReference *self;
CoglPixelFormat cogl_format, cogl_internal_format;
struct wl_shm_buffer *shm_buffer;
uint32_t gbm_format;
self = g_slice_new0 (MetaCursorReference);
self->ref_count = 1;
self->hot_x = hot_x;
self->hot_y = hot_y;
backend = clutter_get_default_backend ();
cogl_context = clutter_backend_get_cogl_context (backend);
shm_buffer = wl_shm_buffer_get (buffer);
if (shm_buffer)
{
int rowstride = wl_shm_buffer_get_stride (shm_buffer);
int width = wl_shm_buffer_get_width (shm_buffer);
int height = wl_shm_buffer_get_height (shm_buffer);
switch (wl_shm_buffer_get_format (shm_buffer))
{
#if G_BYTE_ORDER == G_BIG_ENDIAN
case WL_SHM_FORMAT_ARGB8888:
cogl_format = COGL_PIXEL_FORMAT_ARGB_8888_PRE;
cogl_internal_format = COGL_PIXEL_FORMAT_ANY;
gbm_format = GBM_FORMAT_ARGB8888;
break;
case WL_SHM_FORMAT_XRGB8888:
cogl_format = COGL_PIXEL_FORMAT_ARGB_8888;
cogl_internal_format = COGL_PIXEL_FORMAT_RGB_888;
gbm_format = GBM_FORMAT_XRGB8888;
break;
#else
case WL_SHM_FORMAT_ARGB8888:
cogl_format = COGL_PIXEL_FORMAT_BGRA_8888_PRE;
cogl_internal_format = COGL_PIXEL_FORMAT_ANY;
gbm_format = GBM_FORMAT_ARGB8888;
break;
case WL_SHM_FORMAT_XRGB8888:
cogl_format = COGL_PIXEL_FORMAT_BGRA_8888;
cogl_internal_format = COGL_PIXEL_FORMAT_BGR_888;
gbm_format = GBM_FORMAT_XRGB8888;
break;
#endif
default:
g_warn_if_reached ();
cogl_format = COGL_PIXEL_FORMAT_ARGB_8888;
cogl_internal_format = COGL_PIXEL_FORMAT_ANY;
gbm_format = GBM_FORMAT_ARGB8888;
}
self->texture = cogl_texture_2d_new_from_data (cogl_context,
width, height,
cogl_format,
cogl_internal_format,
rowstride,
wl_shm_buffer_get_data (shm_buffer),
NULL);
if (width > 64 || height > 64)
{
meta_warning ("Invalid cursor size (must be at most 64x64), falling back to software (GL) cursors\n");
return self;
}
if (tracker->gbm)
{
if (gbm_device_is_format_supported (tracker->gbm, gbm_format,
GBM_BO_USE_CURSOR_64X64 | GBM_BO_USE_WRITE))
{
uint8_t *data;
uint8_t buf[4 * 64 * 64];
int i;
self->bo = gbm_bo_create (tracker->gbm, 64, 64,
gbm_format, GBM_BO_USE_CURSOR_64X64 | GBM_BO_USE_WRITE);
data = wl_shm_buffer_get_data (shm_buffer);
memset (buf, 0, sizeof(buf));
for (i = 0; i < height; i++)
memcpy (buf + i * 4 * 64, data + i * rowstride, 4 * width);
gbm_bo_write (self->bo, buf, 64 * 64 * 4);
}
else
meta_warning ("HW cursor for format %d not supported\n", gbm_format);
}
}
else
{
int width, height;
self->texture = cogl_wayland_texture_2d_new_from_buffer (cogl_context, buffer, NULL);
width = cogl_texture_get_width (COGL_TEXTURE (self->texture));
height = cogl_texture_get_height (COGL_TEXTURE (self->texture));
/* HW cursors must be 64x64, but 64x64 is huge, and no cursor theme actually uses
that, so themed cursors must be padded with transparent pixels to fill the
overlay. This is trivial if we have CPU access to the data, but it's not
possible if the buffer is in GPU memory (and possibly tiled too), so if we
don't get the right size, we fallback to GL.
*/
if (width != 64 || height != 64)
{
meta_warning ("Invalid cursor size (must be 64x64), falling back to software (GL) cursors\n");
return self;
}
if (tracker->gbm)
{
cogl_format = cogl_texture_get_format (COGL_TEXTURE (self->texture));
switch (cogl_format)
{
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
case COGL_PIXEL_FORMAT_ARGB_8888_PRE:
case COGL_PIXEL_FORMAT_ARGB_8888:
gbm_format = GBM_FORMAT_BGRA8888;
break;
case COGL_PIXEL_FORMAT_BGRA_8888_PRE:
case COGL_PIXEL_FORMAT_BGRA_8888:
break;
case COGL_PIXEL_FORMAT_RGB_888:
break;
#else
case COGL_PIXEL_FORMAT_ARGB_8888_PRE:
case COGL_PIXEL_FORMAT_ARGB_8888:
gbm_format = GBM_FORMAT_ARGB8888;
break;
case COGL_PIXEL_FORMAT_BGRA_8888_PRE:
case COGL_PIXEL_FORMAT_BGRA_8888:
gbm_format = GBM_FORMAT_BGRA8888;
break;
case COGL_PIXEL_FORMAT_RGB_888:
gbm_format = GBM_FORMAT_RGB888;
break;
#endif
default:
meta_warning ("Unknown cogl format %d\n", cogl_format);
return self;
}
if (gbm_device_is_format_supported (tracker->gbm, gbm_format,
GBM_BO_USE_CURSOR_64X64))
{
self->bo = gbm_bo_import (tracker->gbm, GBM_BO_IMPORT_WL_BUFFER,
buffer, GBM_BO_USE_CURSOR_64X64);
if (!self->bo)
meta_warning ("Importing HW cursor from wl_buffer failed\n");
}
else
meta_warning ("HW cursor for format %d not supported\n", gbm_format);
}
}
return self;
}
static void
meta_cursor_tracker_init (MetaCursorTracker *self)
{
@ -518,21 +98,15 @@ static void
meta_cursor_tracker_finalize (GObject *object)
{
MetaCursorTracker *self = META_CURSOR_TRACKER (object);
int i;
if (self->sprite)
meta_cursor_reference_unref (self->sprite);
cogl_object_unref (self->sprite);
if (self->root_cursor)
meta_cursor_reference_unref (self->root_cursor);
for (i = 0; i < META_CURSOR_LAST; i++)
if (self->default_cursors[i])
meta_cursor_reference_unref (self->default_cursors[i]);
cogl_object_unref (self->root_cursor);
if (self->default_cursor)
cogl_object_unref (self->default_cursor);
if (self->pipeline)
cogl_object_unref (self->pipeline);
if (self->gbm)
gbm_device_destroy (self->gbm);
G_OBJECT_CLASS (meta_cursor_tracker_parent_class)->finalize (object);
}
@ -552,41 +126,13 @@ meta_cursor_tracker_class_init (MetaCursorTrackerClass *klass)
G_TYPE_NONE, 0);
}
static void
on_monitors_changed (MetaMonitorManager *monitors,
MetaCursorTracker *tracker)
{
MetaCRTC *crtcs;
unsigned int i, n_crtcs;
if (!tracker->has_hw_cursor)
return;
/* Go through the new list of monitors, find out where the cursor is */
meta_monitor_manager_get_resources (monitors, NULL, NULL, &crtcs, &n_crtcs, NULL, NULL);
for (i = 0; i < n_crtcs; i++)
{
MetaRectangle *rect = &crtcs[i].rect;
gboolean has;
has = meta_rectangle_overlap (&tracker->current_rect, rect);
/* Need to do it unconditionally here, our tracking is
wrong because we reloaded the CRTCs */
meta_cursor_tracker_set_crtc_has_hw_cursor (tracker, &crtcs[i], has);
}
}
#ifdef HAVE_WAYLAND
static MetaCursorTracker *
make_wayland_cursor_tracker (MetaScreen *screen)
{
MetaWaylandCompositor *compositor;
CoglContext *ctx;
MetaMonitorManager *monitors;
MetaCursorTracker *self;
self = g_object_new (META_TYPE_CURSOR_TRACKER, NULL);
MetaCursorTracker *self = g_object_new (META_TYPE_CURSOR_TRACKER, NULL);
self->screen = screen;
ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
@ -595,16 +141,9 @@ make_wayland_cursor_tracker (MetaScreen *screen)
compositor = meta_wayland_compositor_get_default ();
compositor->seat->cursor_tracker = self;
self->drm_fd = compositor->drm_fd;
if (self->drm_fd >= 0)
self->gbm = gbm_create_device (compositor->drm_fd);
monitors = meta_monitor_manager_get ();
g_signal_connect_object (monitors, "monitors-changed",
G_CALLBACK (on_monitors_changed), self, 0);
return self;
}
#endif
static MetaCursorTracker *
make_x11_cursor_tracker (MetaScreen *screen)
@ -662,7 +201,7 @@ meta_cursor_tracker_handle_xevent (MetaCursorTracker *tracker,
if (notify_event->subtype != XFixesDisplayCursorNotify)
return FALSE;
g_clear_pointer (&tracker->sprite, meta_cursor_reference_unref);
g_clear_pointer (&tracker->sprite, cogl_object_unref);
g_signal_emit (tracker, signals[CURSOR_CHANGED], 0);
return TRUE;
@ -725,9 +264,9 @@ ensure_xfixes_cursor (MetaCursorTracker *tracker)
if (sprite != NULL)
{
tracker->sprite = meta_cursor_reference_take_texture (sprite);
tracker->sprite->hot_x = cursor_image->xhot;
tracker->sprite->hot_y = cursor_image->yhot;
tracker->sprite = sprite;
tracker->hot_x = cursor_image->xhot;
tracker->hot_y = cursor_image->yhot;
}
XFree (cursor_image);
}
@ -745,10 +284,7 @@ meta_cursor_tracker_get_sprite (MetaCursorTracker *tracker)
if (!meta_is_wayland_compositor ())
ensure_xfixes_cursor (tracker);
if (tracker->sprite)
return COGL_TEXTURE (tracker->sprite->texture);
else
return NULL;
return COGL_TEXTURE (tracker->sprite);
}
/**
@ -768,34 +304,32 @@ meta_cursor_tracker_get_hot (MetaCursorTracker *tracker,
if (!meta_is_wayland_compositor ())
ensure_xfixes_cursor (tracker);
if (tracker->sprite)
{
if (x)
*x = tracker->sprite->hot_x;
if (y)
*y = tracker->sprite->hot_y;
}
else
{
if (x)
*x = 0;
if (y)
*y = 0;
}
if (x)
*x = tracker->hot_x;
if (y)
*y = tracker->hot_y;
}
static MetaCursorReference *
ensure_wayland_cursor (MetaCursorTracker *tracker,
MetaCursor cursor)
static void
ensure_wayland_cursor (MetaCursorTracker *tracker)
{
if (tracker->default_cursors[cursor])
return tracker->default_cursors[cursor];
CoglBitmap *bitmap;
char *filename;
tracker->default_cursors[cursor] = meta_cursor_reference_from_theme (tracker, cursor);
if (!tracker->default_cursors[cursor])
meta_warning ("Failed to load cursor from theme\n");
if (tracker->default_cursor)
return;
return tracker->default_cursors[cursor];
filename = g_build_filename (MUTTER_PKGDATADIR,
"cursors/left_ptr.png",
NULL);
bitmap = cogl_bitmap_new_from_file (filename, NULL);
tracker->default_cursor = cogl_texture_2d_new_from_bitmap (bitmap,
COGL_PIXEL_FORMAT_ANY,
NULL);
cogl_object_unref (bitmap);
g_free (filename);
}
void
@ -815,115 +349,45 @@ meta_cursor_tracker_set_root_cursor (MetaCursorTracker *tracker,
/* Now update the real root cursor */
if (meta_is_wayland_compositor ())
{
MetaCursorReference *ref;
/* FIXME! We need to load all the other cursors too */
ensure_wayland_cursor (tracker);
ref = ensure_wayland_cursor (tracker, cursor);
g_clear_pointer (&tracker->root_cursor, meta_cursor_reference_unref);
tracker->root_cursor = meta_cursor_reference_ref (ref);
g_clear_pointer (&tracker->root_cursor, cogl_object_unref);
tracker->root_cursor = cogl_object_ref (tracker->default_cursor);
tracker->root_hot_x = META_WAYLAND_DEFAULT_CURSOR_HOTSPOT_X;
tracker->root_hot_y = META_WAYLAND_DEFAULT_CURSOR_HOTSPOT_Y;
}
}
void
meta_cursor_tracker_revert_root (MetaCursorTracker *tracker)
{
meta_cursor_tracker_set_sprite (tracker, tracker->root_cursor);
}
static void
update_hw_cursor (MetaCursorTracker *tracker)
{
MetaMonitorManager *monitors;
MetaCRTC *crtcs;
unsigned int i, n_crtcs;
gboolean enabled;
enabled = tracker->has_cursor && tracker->sprite->bo != NULL;
tracker->has_hw_cursor = enabled;
monitors = meta_monitor_manager_get ();
meta_monitor_manager_get_resources (monitors, NULL, NULL, &crtcs, &n_crtcs, NULL, NULL);
for (i = 0; i < n_crtcs; i++)
{
MetaRectangle *rect = &crtcs[i].rect;
gboolean has;
has = enabled && meta_rectangle_overlap (&tracker->current_rect, rect);
if (has || crtcs[i].has_hw_cursor)
meta_cursor_tracker_set_crtc_has_hw_cursor (tracker, &crtcs[i], has);
}
}
static void
move_hw_cursor (MetaCursorTracker *tracker)
{
MetaMonitorManager *monitors;
MetaCRTC *crtcs;
unsigned int i, n_crtcs;
monitors = meta_monitor_manager_get ();
meta_monitor_manager_get_resources (monitors, NULL, NULL, &crtcs, &n_crtcs, NULL, NULL);
g_assert (tracker->has_hw_cursor);
for (i = 0; i < n_crtcs; i++)
{
MetaRectangle *rect = &crtcs[i].rect;
gboolean has;
has = meta_rectangle_overlap (&tracker->current_rect, rect);
if (has != crtcs[i].has_hw_cursor)
meta_cursor_tracker_set_crtc_has_hw_cursor (tracker, &crtcs[i], has);
if (has)
drmModeMoveCursor (tracker->drm_fd, crtcs[i].crtc_id,
tracker->current_rect.x - rect->x,
tracker->current_rect.y - rect->y);
}
meta_cursor_tracker_set_sprite (tracker,
tracker->root_cursor,
tracker->root_hot_x,
tracker->root_hot_y);
}
void
meta_cursor_tracker_set_buffer (MetaCursorTracker *tracker,
struct wl_resource *buffer,
int hot_x,
int hot_y)
{
MetaCursorReference *new_cursor;
if (buffer)
{
new_cursor = meta_cursor_reference_from_buffer (tracker, buffer, hot_x, hot_y);
meta_cursor_tracker_set_sprite (tracker, new_cursor);
meta_cursor_reference_unref (new_cursor);
}
else
meta_cursor_tracker_set_sprite (tracker, NULL);
}
static void
meta_cursor_tracker_set_sprite (MetaCursorTracker *tracker,
MetaCursorReference *sprite)
meta_cursor_tracker_set_sprite (MetaCursorTracker *tracker,
CoglTexture2D *sprite,
int hot_x,
int hot_y)
{
g_assert (meta_is_wayland_compositor ());
if (sprite == tracker->sprite)
return;
g_clear_pointer (&tracker->sprite, meta_cursor_reference_unref);
g_clear_pointer (&tracker->sprite, cogl_object_unref);
if (sprite)
{
tracker->sprite = meta_cursor_reference_ref (sprite);
cogl_pipeline_set_layer_texture (tracker->pipeline, 0, COGL_TEXTURE (tracker->sprite->texture));
tracker->sprite = cogl_object_ref (sprite);
tracker->hot_x = hot_x;
tracker->hot_y = hot_y;
cogl_pipeline_set_layer_texture (tracker->pipeline, 0, COGL_TEXTURE (tracker->sprite));
}
else
cogl_pipeline_set_layer_texture (tracker->pipeline, 0, NULL);
tracker->has_cursor = tracker->sprite != NULL && tracker->is_showing;
update_hw_cursor (tracker);
g_signal_emit (tracker, signals[CURSOR_CHANGED], 0);
meta_cursor_tracker_update_position (tracker, tracker->current_x, tracker->current_y);
@ -938,24 +402,19 @@ meta_cursor_tracker_update_position (MetaCursorTracker *tracker,
tracker->current_x = new_x;
tracker->current_y = new_y;
tracker->current_rect.x = tracker->current_x - tracker->hot_x;
tracker->current_rect.y = tracker->current_y - tracker->hot_y;
if (tracker->sprite)
{
tracker->current_rect.x = tracker->current_x - tracker->sprite->hot_x;
tracker->current_rect.y = tracker->current_y - tracker->sprite->hot_y;
tracker->current_rect.width = cogl_texture_get_width (COGL_TEXTURE (tracker->sprite->texture));
tracker->current_rect.height = cogl_texture_get_height (COGL_TEXTURE (tracker->sprite->texture));
tracker->current_rect.width = cogl_texture_get_width (COGL_TEXTURE (tracker->sprite));
tracker->current_rect.height = cogl_texture_get_height (COGL_TEXTURE (tracker->sprite));
}
else
{
tracker->current_rect.x = 0;
tracker->current_rect.y = 0;
tracker->current_rect.width = 0;
tracker->current_rect.height = 0;
}
if (tracker->has_hw_cursor)
move_hw_cursor (tracker);
}
void
@ -963,9 +422,10 @@ meta_cursor_tracker_paint (MetaCursorTracker *tracker)
{
g_assert (meta_is_wayland_compositor ());
if (tracker->has_hw_cursor || !tracker->has_cursor)
if (tracker->sprite == NULL)
return;
/* FIXME: try to use a DRM cursor when possible */
cogl_framebuffer_draw_rectangle (cogl_get_draw_framebuffer (),
tracker->pipeline,
tracker->current_rect.x,
@ -983,138 +443,16 @@ void
meta_cursor_tracker_queue_redraw (MetaCursorTracker *tracker,
ClutterActor *stage)
{
cairo_rectangle_int_t clip;
g_assert (meta_is_wayland_compositor ());
if (tracker->previous_is_valid)
{
cairo_rectangle_int_t clip = {
.x = tracker->previous_rect.x,
.y = tracker->previous_rect.y,
.width = tracker->previous_rect.width,
.height = tracker->previous_rect.height
};
clutter_actor_queue_redraw_with_clip (stage, &clip);
clutter_actor_queue_redraw_with_clip (stage, &tracker->previous_rect);
tracker->previous_is_valid = FALSE;
}
if (tracker->has_hw_cursor || !tracker->has_cursor)
if (tracker->sprite == NULL)
return;
clip.x = tracker->current_rect.x;
clip.y = tracker->current_rect.y;
clip.width = tracker->current_rect.width;
clip.height = tracker->current_rect.height;
clutter_actor_queue_redraw_with_clip (stage, &clip);
}
static void
meta_cursor_tracker_set_crtc_has_hw_cursor (MetaCursorTracker *tracker,
MetaCRTC *crtc,
gboolean has)
{
if (has)
{
union gbm_bo_handle handle;
int width, height;
int hot_x, hot_y;
handle = gbm_bo_get_handle (tracker->sprite->bo);
width = gbm_bo_get_width (tracker->sprite->bo);
height = gbm_bo_get_height (tracker->sprite->bo);
hot_x = tracker->sprite->hot_x;
hot_y = tracker->sprite->hot_y;
drmModeSetCursor2 (tracker->drm_fd, crtc->crtc_id, handle.u32,
width, height, hot_x, hot_y);
crtc->has_hw_cursor = TRUE;
}
else
{
drmModeSetCursor2 (tracker->drm_fd, crtc->crtc_id, 0, 0, 0, 0, 0);
crtc->has_hw_cursor = FALSE;
}
}
static void
get_pointer_position_gdk (int *x,
int *y,
int *mods)
{
GdkDeviceManager *gmanager;
GdkDevice *gdevice;
GdkScreen *gscreen;
gmanager = gdk_display_get_device_manager (gdk_display_get_default ());
gdevice = gdk_device_manager_get_client_pointer (gmanager);
gdk_device_get_position (gdevice, &gscreen, x, y);
gdk_device_get_state (gdevice,
gdk_screen_get_root_window (gscreen),
NULL, (GdkModifierType*)mods);
}
static void
get_pointer_position_clutter (int *x,
int *y,
int *mods)
{
ClutterDeviceManager *cmanager;
ClutterInputDevice *cdevice;
ClutterPoint point;
cmanager = clutter_device_manager_get_default ();
cdevice = clutter_device_manager_get_core_device (cmanager, CLUTTER_POINTER_DEVICE);
clutter_input_device_get_coords (cdevice, NULL, &point);
*x = point.x;
*y = point.y;
*mods = clutter_input_device_get_modifier_state (cdevice);
}
void
meta_cursor_tracker_get_pointer (MetaCursorTracker *tracker,
int *x,
int *y,
ClutterModifierType *mods)
{
/* We can't use the clutter interface when not running as a wayland compositor,
because we need to query the server, rather than using the last cached value.
OTOH, on wayland we can't use GDK, because that only sees the events
we forward to xwayland.
*/
if (meta_is_wayland_compositor ())
get_pointer_position_clutter (x, y, (int*)mods);
else
get_pointer_position_gdk (x, y, (int*)mods);
}
void
meta_cursor_tracker_set_pointer_visible (MetaCursorTracker *tracker,
gboolean visible)
{
if (visible == tracker->is_showing)
return;
tracker->is_showing = visible;
if (meta_is_wayland_compositor ())
{
MetaWaylandCompositor *compositor;
compositor = meta_wayland_compositor_get_default ();
tracker->has_cursor = tracker->sprite != NULL && visible;
update_hw_cursor (tracker);
meta_cursor_tracker_queue_redraw (tracker, compositor->stage);
}
else
{
if (visible)
XFixesShowCursor (tracker->screen->display->xdisplay,
tracker->screen->xroot);
else
XFixesHideCursor (tracker->screen->display->xdisplay,
tracker->screen->xroot);
}
clutter_actor_queue_redraw_with_clip (stage, &tracker->current_rect);
}

View File

@ -77,8 +77,7 @@ typedef struct
guint64 timeout_msec;
/* x11 */
XSyncAlarm xalarm;
int idle_source_id;
XSyncAlarm xalarm;
/* wayland */
GSource *timeout_source;
@ -117,12 +116,6 @@ fire_watch (MetaIdleMonitorWatch *watch)
monitor = watch->monitor;
g_object_ref (monitor);
if (watch->idle_source_id)
{
g_source_remove (watch->idle_source_id);
watch->idle_source_id = 0;
}
id = watch->id;
is_user_active_watch = (watch->timeout_msec == 0);
@ -293,13 +286,6 @@ idle_monitor_watch_free (MetaIdleMonitorWatch *watch)
return;
monitor = watch->monitor;
g_object_ref (monitor);
if (watch->idle_source_id)
{
g_source_remove (watch->idle_source_id);
watch->idle_source_id = 0;
}
if (watch->notify != NULL)
watch->notify (watch->user_data);
@ -314,7 +300,6 @@ idle_monitor_watch_free (MetaIdleMonitorWatch *watch)
if (watch->timeout_source != NULL)
g_source_destroy (watch->timeout_source);
g_object_unref (monitor);
g_slice_free (MetaIdleMonitorWatch, watch);
}
@ -495,17 +480,6 @@ static GSourceFuncs wayland_source_funcs = {
NULL, /* finalize */
};
static gboolean
fire_watch_idle (gpointer data)
{
MetaIdleMonitorWatch *watch = data;
watch->idle_source_id = 0;
fire_watch (watch);
return FALSE;
}
static MetaIdleMonitorWatch *
make_watch (MetaIdleMonitor *monitor,
guint64 timeout_msec,
@ -544,9 +518,6 @@ make_watch (MetaIdleMonitor *monitor,
watch->xalarm = _xsync_alarm_set (monitor, XSyncPositiveTransition, timeout_msec, TRUE);
g_hash_table_add (monitor->alarms, (gpointer) watch->xalarm);
if (meta_idle_monitor_get_idletime (monitor) > (gint64)timeout_msec)
watch->idle_source_id = g_idle_add (fire_watch_idle, watch);
}
else
{

View File

@ -30,7 +30,7 @@
#define META_XRANDR_SHARED_H
typedef enum {
META_POWER_SAVE_UNSUPPORTED = -1,
META_POWER_SAVE_UNKNOWN = -1,
META_POWER_SAVE_ON = 0,
META_POWER_SAVE_STANDBY,
META_POWER_SAVE_SUSPEND,

View File

@ -99,9 +99,8 @@ static gboolean meta_monitor_config_assign_crtcs (MetaConfiguration *config,
GPtrArray *crtcs,
GPtrArray *outputs);
static void power_client_changed_cb (UpClient *client,
GParamSpec *pspec,
gpointer user_data);
static void power_client_changed_cb (UpClient *client,
gpointer user_data);
static void
free_output_key (MetaOutputKey *key)
@ -233,7 +232,7 @@ meta_monitor_config_init (MetaMonitorConfig *self)
self->up_client = up_client_new ();
self->lid_is_closed = up_client_get_lid_is_closed (self->up_client);
g_signal_connect_object (self->up_client, "notify::lid-is-closed",
g_signal_connect_object (self->up_client, "changed",
G_CALLBACK (power_client_changed_cb), self, 0);
}
@ -750,9 +749,6 @@ meta_monitor_config_load (MetaMonitorConfig *self)
free_output_key (&parser.key);
}
g_markup_parse_context_free (context);
g_free (contents);
}
MetaMonitorConfig *
@ -915,8 +911,6 @@ make_laptop_lid_config (MetaConfiguration *reference)
MetaConfiguration *new;
unsigned int i;
gboolean has_primary;
int x_after, y_after;
int x_offset, y_offset;
g_assert (reference->n_outputs > 1);
@ -925,8 +919,6 @@ make_laptop_lid_config (MetaConfiguration *reference)
new->keys = g_new0 (MetaOutputKey, reference->n_outputs);
new->outputs = g_new0 (MetaOutputConfig, reference->n_outputs);
x_after = G_MAXINT; y_after = G_MAXINT;
x_offset = 0; y_offset = 0;
for (i = 0; i < new->n_outputs; i++)
{
MetaOutputKey *current_key = &reference->keys[i];
@ -939,26 +931,14 @@ make_laptop_lid_config (MetaConfiguration *reference)
if (g_str_has_prefix (current_key->connector, "LVDS") ||
g_str_has_prefix (current_key->connector, "eDP"))
{
new->outputs[i].enabled = FALSE;
x_after = current_output->rect.x;
y_after = current_output->rect.y;
x_offset = current_output->rect.width;
y_offset = current_output->rect.height;
}
new->outputs[i].enabled = FALSE;
else
/* This can potentially leave a "hole" in the screen,
but this is actually a good thing, as it means windows
don't move around.
*/
new->outputs[i] = *current_output;
}
for (i = 0; i < new->n_outputs; i++)
{
if (new->outputs[i].enabled)
{
if (new->outputs[i].rect.x > x_after)
new->outputs[i].rect.x -= x_offset;
if (new->outputs[i].rect.y > y_after)
new->outputs[i].rect.y -= y_offset;
}
}
has_primary = FALSE;
for (i = 0; i < new->n_outputs; i++)
@ -1336,9 +1316,8 @@ turn_off_laptop_display (MetaMonitorConfig *self,
}
static void
power_client_changed_cb (UpClient *client,
GParamSpec *pspec,
gpointer user_data)
power_client_changed_cb (UpClient *client,
gpointer user_data)
{
MetaMonitorManager *manager = meta_monitor_manager_get ();
MetaMonitorConfig *self = user_data;

View File

@ -54,6 +54,8 @@ typedef struct {
uint32_t dpms_prop_id;
uint32_t edid_blob_id;
uint32_t has_dpms_prop : 1;
uint32_t has_edid_blob : 1;
} MetaOutputKms;
struct _MetaMonitorManagerKms
@ -78,20 +80,6 @@ struct _MetaMonitorManagerKmsClass
G_DEFINE_TYPE (MetaMonitorManagerKms, meta_monitor_manager_kms, META_TYPE_MONITOR_MANAGER);
static void
free_resources (MetaMonitorManagerKms *manager_kms)
{
unsigned i;
for (i = 0; i < manager_kms->n_encoders; i++)
drmModeFreeEncoder (manager_kms->encoders[i]);
for (i = 0; i < manager_kms->n_connectors; i++)
drmModeFreeConnector (manager_kms->connectors[i]);
g_free (manager_kms->encoders);
g_free (manager_kms->connectors);
}
static int
compare_outputs (const void *one,
const void *two)
@ -130,7 +118,6 @@ meta_output_destroy_notify (MetaOutput *output)
for (i = 0; i < output_kms->n_encoders; i++)
drmModeFreeEncoder (output_kms->encoders[i]);
g_free (output_kms->encoders);
g_slice_free (MetaOutputKms, output_kms);
}
@ -145,24 +132,7 @@ static gboolean
drm_mode_equal (gconstpointer one,
gconstpointer two)
{
const drmModeModeInfo *m_one = one;
const drmModeModeInfo *m_two = two;
return m_one->clock == m_two->clock &&
m_one->hdisplay == m_two->hdisplay &&
m_one->hsync_start == m_two->hsync_start &&
m_one->hsync_end == m_two->hsync_end &&
m_one->htotal == m_two->htotal &&
m_one->hskew == m_two->hskew &&
m_one->vdisplay == m_two->vdisplay &&
m_one->vsync_start == m_two->vsync_start &&
m_one->vsync_end == m_two->vsync_end &&
m_one->vtotal == m_two->vtotal &&
m_one->vscan == m_two->vscan &&
m_one->vrefresh == m_two->vrefresh &&
m_one->flags == m_two->flags &&
m_one->type == m_two->type &&
strncmp (m_one->name, m_two->name, DRM_DISPLAY_MODE_LEN) == 0;
return memcmp (one, two, sizeof (drmModeModeInfo)) == 0;
}
static guint
@ -171,10 +141,6 @@ drm_mode_hash (gconstpointer ptr)
const drmModeModeInfo *mode = ptr;
guint hash = 0;
/* We don't include the name in the hash because it's generally
derived from the other fields (hdisplay, vdisplay and flags)
*/
hash ^= mode->clock;
hash ^= mode->hdisplay ^ mode->hsync_start ^ mode->hsync_end;
hash ^= mode->vdisplay ^ mode->vsync_start ^ mode->vsync_end;
@ -199,10 +165,21 @@ find_properties (MetaMonitorManagerKms *manager_kms,
if ((prop->flags & DRM_MODE_PROP_ENUM) &&
strcmp(prop->name, "DPMS") == 0)
output_kms->dpms_prop_id = prop->prop_id;
else if ((prop->flags & DRM_MODE_PROP_BLOB) &&
strcmp (prop->name, "EDID") == 0)
output_kms->edid_blob_id = output_kms->connector->prop_values[i];
{
output_kms->dpms_prop_id = prop->prop_id;
output_kms->has_dpms_prop = TRUE;
drmModeFreeProperty(prop);
break;
}
if ((prop->flags & DRM_MODE_PROP_BLOB) &&
strcmp (prop->name, "EDID") == 0)
{
output_kms->edid_blob_id = output_kms->connector->prop_values[i];
output_kms->has_edid_blob = TRUE;
drmModeFreeProperty(prop);
break;
}
drmModeFreeProperty(prop);
}
@ -215,7 +192,7 @@ read_output_edid (MetaMonitorManagerKms *manager_kms,
MetaOutputKms *output_kms = output->driver_private;
drmModePropertyBlobPtr edid_blob = NULL;
if (output_kms->edid_blob_id == 0)
if (!output_kms->has_edid_blob)
return NULL;
edid_blob = drmModeGetPropertyBlob (manager_kms->fd, output_kms->edid_blob_id);
@ -225,42 +202,11 @@ read_output_edid (MetaMonitorManagerKms *manager_kms,
return NULL;
}
if (edid_blob->length > 0)
if (edid_blob->length > 0 && edid_blob->length % 128 == 0)
return g_bytes_new_with_free_func (edid_blob->data, edid_blob->length,
(GDestroyNotify)drmModeFreePropertyBlob, edid_blob);
else
{
drmModeFreePropertyBlob (edid_blob);
return NULL;
}
}
static MetaMonitorMode *
find_meta_mode (MetaMonitorManager *manager,
const drmModeModeInfo *drm_mode)
{
unsigned k;
for (k = 0; k < manager->n_modes; k++)
{
if (drm_mode_equal (drm_mode, manager->modes[k].driver_private))
return &manager->modes[k];
}
g_assert_not_reached ();
return NULL;
}
static MetaOutput *
find_output_by_id (MetaOutput *outputs,
unsigned n_outputs,
glong id)
{
unsigned i;
for (i = 0; i < n_outputs; i++)
if (outputs[i].output_id == id)
return &outputs[i];
drmModeFreePropertyBlob (edid_blob);
return NULL;
}
@ -276,8 +222,6 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
unsigned int i, j, k;
unsigned int n_actual_outputs;
int width, height;
MetaOutput *old_outputs;
unsigned int n_old_outputs;
resources = drmModeGetResources(manager_kms->fd);
modes = g_hash_table_new (drm_mode_hash, drm_mode_equal);
@ -287,15 +231,6 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
manager->power_save_mode = META_POWER_SAVE_ON;
old_outputs = manager->outputs;
n_old_outputs = manager->n_outputs;
/* Note: we must not free the public structures (output, crtc, monitor
mode and monitor info) here, they must be kept alive until the API
users are done with them after we emit monitors-changed, and thus
are freed by the platform-independent layer. */
free_resources (manager_kms);
manager_kms->n_connectors = resources->count_connectors;
manager_kms->connectors = g_new (drmModeConnector *, manager_kms->n_connectors);
for (i = 0; i < manager_kms->n_connectors; i++)
@ -393,7 +328,7 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
for (i = 0; i < manager_kms->n_connectors; i++)
{
MetaOutput *meta_output, *old_output;
MetaOutput *meta_output;
MetaOutputKms *output_kms;
drmModeConnector *connector;
GArray *crtcs;
@ -413,49 +348,37 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
meta_output->width_mm = connector->mmWidth;
meta_output->height_mm = connector->mmHeight;
switch (connector->subpixel)
{
case DRM_MODE_SUBPIXEL_NONE:
meta_output->subpixel_order = COGL_SUBPIXEL_ORDER_NONE;
break;
case DRM_MODE_SUBPIXEL_HORIZONTAL_RGB:
meta_output->subpixel_order = COGL_SUBPIXEL_ORDER_HORIZONTAL_RGB;
break;
case DRM_MODE_SUBPIXEL_HORIZONTAL_BGR:
meta_output->subpixel_order = COGL_SUBPIXEL_ORDER_HORIZONTAL_BGR;
break;
case DRM_MODE_SUBPIXEL_VERTICAL_RGB:
meta_output->subpixel_order = COGL_SUBPIXEL_ORDER_VERTICAL_RGB;
break;
case DRM_MODE_SUBPIXEL_VERTICAL_BGR:
meta_output->subpixel_order = COGL_SUBPIXEL_ORDER_VERTICAL_BGR;
break;
case DRM_MODE_SUBPIXEL_UNKNOWN:
default:
meta_output->subpixel_order = COGL_SUBPIXEL_ORDER_UNKNOWN;
break;
}
if (connector->subpixel == DRM_MODE_SUBPIXEL_UNKNOWN)
meta_output->subpixel_order = COGL_SUBPIXEL_ORDER_UNKNOWN;
else if (connector->subpixel == DRM_MODE_SUBPIXEL_NONE)
meta_output->subpixel_order = COGL_SUBPIXEL_ORDER_NONE;
else
meta_output->subpixel_order = connector->subpixel;
meta_output->n_modes = connector->count_modes;
meta_output->modes = g_new0 (MetaMonitorMode *, meta_output->n_modes);
for (j = 0; j < meta_output->n_modes; j++)
meta_output->modes[j] = find_meta_mode (manager, &connector->modes[j]);
{
for (k = 0; k < manager->n_modes; k++)
{
if (drm_mode_equal (&connector->modes[j], manager->modes[k].driver_private))
{
meta_output->modes[j] = &manager->modes[k];
break;
}
}
}
meta_output->preferred_mode = meta_output->modes[0];
output_kms->connector = connector;
output_kms->n_encoders = connector->count_encoders;
output_kms->encoders = g_new0 (drmModeEncoderPtr, output_kms->n_encoders);
crtc_mask = ~(unsigned int)0;
crtc_mask = 0x7F;
for (j = 0; j < output_kms->n_encoders; j++)
{
output_kms->encoders[j] = drmModeGetEncoder (manager_kms->fd, connector->encoders[j]);
/* We only list CRTCs as supported if they are supported by all encoders
for this connectors.
This is what xf86-video-modesetting does (see drmmode_output_init())
*/
crtc_mask &= output_kms->encoders[j]->possible_crtcs;
if (output_kms->encoders[j]->encoder_id == connector->encoder_id)
@ -472,7 +395,7 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
g_array_append_val (crtcs, crtc);
}
}
meta_output->n_possible_crtcs = crtcs->len;
meta_output->possible_crtcs = (void*)g_array_free (crtcs, FALSE);
@ -490,18 +413,8 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
else
meta_output->crtc = NULL;
old_output = find_output_by_id (old_outputs, n_old_outputs,
meta_output->output_id);
if (old_output)
{
meta_output->is_primary = old_output->is_primary;
meta_output->is_presentation = old_output->is_presentation;
}
else
{
meta_output->is_primary = FALSE;
meta_output->is_presentation = FALSE;
}
meta_output->is_primary = FALSE;
meta_output->is_presentation = FALSE;
find_properties (manager_kms, output_kms);
@ -556,8 +469,8 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
/* Now fix the clones.
Code mostly inspired by xf86-video-modesetting. */
/* XXX: intel hardware doesn't usually have clones, but I only have laptops with
intel cards, so this code was never tested! */
/* XXX: intel hardware doesn't usually have clones, but we only have intel
cards, so this code was never tested! */
for (i = 0; i < manager->n_outputs; i++)
{
MetaOutput *meta_output;
@ -665,7 +578,7 @@ meta_monitor_manager_kms_set_power_save_mode (MetaMonitorManager *manager,
meta_output = &manager->outputs[i];
output_kms = meta_output->driver_private;
if (output_kms->dpms_prop_id != 0)
if (output_kms->has_dpms_prop)
{
int ok = drmModeConnectorSetProperty(manager_kms->fd, meta_output->output_id,
output_kms->dpms_prop_id, state);
@ -732,8 +645,8 @@ meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager,
else
{
MetaMonitorMode *mode;
uint32_t *connectors;
unsigned int j, n_connectors;
uint32_t *outputs;
unsigned int j, n_outputs;
int width, height;
mode = crtc_info->mode;
@ -741,14 +654,14 @@ meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager,
cogl_crtc->id = crtc->crtc_id;
cogl_crtc->x = crtc_info->x;
cogl_crtc->y = crtc_info->y;
cogl_crtc->count = n_connectors = crtc_info->outputs->len;
cogl_crtc->connectors = connectors = g_new (uint32_t, n_connectors);
cogl_crtc->count = n_outputs = crtc_info->outputs->len;
cogl_crtc->connectors = outputs = g_new (uint32_t, n_outputs);
for (j = 0; j < n_connectors; j++)
for (j = 0; j < n_outputs; j++)
{
MetaOutput *output = g_ptr_array_index (crtc_info->outputs, j);
MetaOutput *output = ((MetaOutput**)crtc_info->outputs->pdata)[j];
connectors[j] = output->output_id;
outputs[j] = output->output_id;
output->is_dirty = TRUE;
output->crtc = crtc;
@ -780,8 +693,7 @@ meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager,
}
}
/* Disable CRTCs not mentioned in the list (they have is_dirty == FALSE,
because they weren't seen in the first loop) */
/* Disable CRTCs not mentioned in the list */
for (i = 0; i < manager->n_crtcs; i++)
{
MetaCRTC *crtc = &manager->crtcs[i];
@ -915,8 +827,15 @@ static void
meta_monitor_manager_kms_finalize (GObject *object)
{
MetaMonitorManagerKms *manager_kms = META_MONITOR_MANAGER_KMS (object);
unsigned i;
free_resources (manager_kms);
for (i = 0; i < manager_kms->n_encoders; i++)
drmModeFreeEncoder (manager_kms->encoders[i]);
for (i = 0; i < manager_kms->n_connectors; i++)
drmModeFreeConnector (manager_kms->connectors[i]);
g_free (manager_kms->encoders);
g_free (manager_kms->connectors);
G_OBJECT_CLASS (meta_monitor_manager_kms_parent_class)->finalize (object);
}

View File

@ -136,9 +136,6 @@ struct _MetaCRTC
/* Used when changing configuration */
gboolean is_dirty;
/* Updated by MetaCursorTracker */
gboolean has_hw_cursor;
};
struct _MetaMonitorMode

View File

@ -351,13 +351,13 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
manager->power_save_mode = META_POWER_SAVE_OFF;
break;
default:
manager->power_save_mode = META_POWER_SAVE_UNSUPPORTED;
manager->power_save_mode = META_POWER_SAVE_UNKNOWN;
break;
}
}
else
{
manager->power_save_mode = META_POWER_SAVE_UNSUPPORTED;
manager->power_save_mode = META_POWER_SAVE_UNKNOWN;
}
XRRGetScreenSizeRange (manager_xrandr->xdisplay, DefaultRootWindow (manager_xrandr->xdisplay),

View File

@ -33,7 +33,7 @@
#include <clutter/clutter.h>
#include <meta/main.h>
#include "util-private.h"
#include <meta/util.h>
#include <meta/errors.h>
#include "monitor-private.h"
#include "meta-wayland-private.h"
@ -444,8 +444,11 @@ meta_monitor_manager_set_power_save_mode (MetaMonitorManager *manager,
{
MetaMonitorManagerClass *klass;
if (manager->power_save_mode == META_POWER_SAVE_UNSUPPORTED ||
mode == META_POWER_SAVE_UNSUPPORTED)
if (mode == manager->power_save_mode)
return;
if (manager->power_save_mode == META_POWER_SAVE_UNKNOWN ||
mode == META_POWER_SAVE_UNKNOWN)
return;
klass = META_MONITOR_MANAGER_GET_CLASS (manager);
@ -729,9 +732,6 @@ meta_monitor_manager_handle_get_resources (MetaDBusDisplayConfig *skeleton,
g_variant_new_take_string (make_display_name (manager, output)));
g_variant_builder_add (&properties, "{sv}", "backlight",
g_variant_new_int32 (output->backlight));
g_variant_builder_add (&properties, "{sv}", "min-backlight-step",
g_variant_new_int32 ((output->backlight_max - output->backlight_min) ?
100 / (output->backlight_max - output->backlight_min) : -1));
g_variant_builder_add (&properties, "{sv}", "primary",
g_variant_new_boolean (output->is_primary));
g_variant_builder_add (&properties, "{sv}", "presentation",
@ -1364,21 +1364,12 @@ meta_monitor_manager_get_resources (MetaMonitorManager *manager,
MetaOutput **outputs,
unsigned int *n_outputs)
{
if (modes)
{
*modes = manager->modes;
*n_modes = manager->n_modes;
}
if (crtcs)
{
*crtcs = manager->crtcs;
*n_crtcs = manager->n_crtcs;
}
if (outputs)
{
*outputs = manager->outputs;
*n_outputs = manager->n_outputs;
}
*modes = manager->modes;
*n_modes = manager->n_modes;
*crtcs = manager->crtcs;
*n_crtcs = manager->n_crtcs;
*outputs = manager->outputs;
*n_outputs = manager->n_outputs;
}
int

View File

@ -25,7 +25,6 @@
#include <meta/main.h>
#include <meta/util.h>
#include <glib/gi18n-lib.h>
#include "meta-plugin-manager.h"
#include <glib.h>
@ -47,8 +46,15 @@ print_version (const gchar *option_name,
}
static gchar *plugin = "default";
static gboolean opt_nested = FALSE;
GOptionEntry mutter_options[] = {
{
"nested", 0, 0, G_OPTION_ARG_NONE,
&opt_nested,
N_("Run nested as an application for testing"),
NULL,
},
{
"version", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
print_version,
@ -78,6 +84,8 @@ main (int argc, char **argv)
exit (1);
}
meta_set_is_wayland_compositor (opt_nested);
if (plugin)
meta_plugin_manager_load (plugin);

View File

@ -31,7 +31,7 @@
#include <config.h>
#include <meta/prefs.h>
#include "ui.h"
#include "util-private.h"
#include <meta/util.h>
#include "meta-plugin-manager.h"
#include <glib.h>
#include <gio/gio.h>
@ -1199,8 +1199,8 @@ maybe_give_disable_workarounds_warning (void)
{
first_disable = FALSE;
meta_warning ("Workarounds for broken applications disabled. "
"Some applications may not behave properly.\n");
meta_warning (_("Workarounds for broken applications disabled. "
"Some applications may not behave properly.\n"));
}
}
@ -1274,8 +1274,8 @@ titlebar_handler (GVariant *value,
if (desc == NULL)
{
meta_warning ("Could not parse font description "
"\"%s\" from GSettings key %s\n",
meta_warning (_("Could not parse font description "
"\"%s\" from GSettings key %s\n"),
string_value ? string_value : "(null)",
KEY_TITLEBAR_FONT);
return FALSE;
@ -1340,8 +1340,8 @@ mouse_button_mods_handler (GVariant *value,
meta_topic (META_DEBUG_KEYBINDINGS,
"Failed to parse new GSettings value\n");
meta_warning ("\"%s\" found in configuration database is "
"not a valid value for mouse button modifier\n",
meta_warning (_("\"%s\" found in configuration database is "
"not a valid value for mouse button modifier\n"),
string_value);
return FALSE;
@ -1906,7 +1906,7 @@ update_binding (MetaKeyPref *binding,
{
meta_topic (META_DEBUG_KEYBINDINGS,
"Failed to parse new GSettings value\n");
meta_warning ("\"%s\" found in configuration database is not a valid value for keybinding \"%s\"\n",
meta_warning (_("\"%s\" found in configuration database is not a valid value for keybinding \"%s\"\n"),
strokes[i], binding->name);
/* Value is kept and will thus be removed next time we save the key.

View File

@ -151,6 +151,8 @@ void meta_screen_foreach_window (MetaScreen *scree
MetaScreenWindowFunc func,
gpointer data);
void meta_screen_set_cursor (MetaScreen *screen,
MetaCursor cursor);
void meta_screen_update_cursor (MetaScreen *screen);
void meta_screen_tab_popup_create (MetaScreen *screen,

View File

@ -33,7 +33,7 @@
#include <config.h>
#include "screen-private.h"
#include <meta/main.h>
#include "util-private.h"
#include <meta/util.h>
#include <meta/errors.h>
#include "window-private.h"
#include "frame.h"
@ -579,7 +579,7 @@ meta_screen_new (MetaDisplay *display,
if (XGetSelectionOwner (xdisplay, wm_sn_atom) != new_wm_sn_owner)
{
meta_warning ("Could not acquire window manager selection on screen %d display \"%s\"\n",
meta_warning (_("Could not acquire window manager selection on screen %d display \"%s\"\n"),
number, display->name);
XDestroyWindow (xdisplay, new_wm_sn_owner);
@ -850,7 +850,7 @@ meta_screen_free (MetaScreen *screen,
meta_error_trap_push_with_return (screen->display);
XSelectInput (screen->display->xdisplay, screen->xroot, 0);
if (meta_error_trap_pop_with_return (screen->display) != Success)
meta_warning ("Could not release screen %d on display \"%s\"\n",
meta_warning (_("Could not release screen %d on display \"%s\"\n"),
screen->number, screen->display->name);
unset_wm_check_hint (screen);

View File

@ -25,7 +25,7 @@
#include <config.h>
#include "util-private.h"
#include <meta/util.h>
#include <meta/main.h>
#include "session.h"
#include <X11/Xatom.h>
@ -848,14 +848,14 @@ save_state (void)
if (mkdir (mutter_dir, 0700) < 0 &&
errno != EEXIST)
{
meta_warning ("Could not create directory '%s': %s\n",
meta_warning (_("Could not create directory '%s': %s\n"),
mutter_dir, g_strerror (errno));
}
if (mkdir (session_dir, 0700) < 0 &&
errno != EEXIST)
{
meta_warning ("Could not create directory '%s': %s\n",
meta_warning (_("Could not create directory '%s': %s\n"),
session_dir, g_strerror (errno));
}
@ -865,7 +865,7 @@ save_state (void)
if (outfile == NULL)
{
meta_warning ("Could not open session file '%s' for writing: %s\n",
meta_warning (_("Could not open session file '%s' for writing: %s\n"),
full_save_file (), g_strerror (errno));
goto out;
}
@ -1006,12 +1006,12 @@ save_state (void)
/* FIXME need a dialog for this */
if (ferror (outfile))
{
meta_warning ("Error writing session file '%s': %s\n",
meta_warning (_("Error writing session file '%s': %s\n"),
full_save_file (), g_strerror (errno));
}
if (fclose (outfile))
{
meta_warning ("Error closing session file '%s': %s\n",
meta_warning (_("Error closing session file '%s': %s\n"),
full_save_file (), g_strerror (errno));
}
}
@ -1141,7 +1141,7 @@ load_state (const char *previous_save_file)
error:
meta_warning ("Failed to parse saved session file: %s\n",
meta_warning (_("Failed to parse saved session file: %s\n"),
error->message);
g_error_free (error);
@ -1190,7 +1190,7 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error,
G_MARKUP_ERROR,
G_MARKUP_ERROR_PARSE,
"<mutter_session> attribute seen but we already have the session ID");
_("<mutter_session> attribute seen but we already have the session ID"));
return;
}
@ -1203,7 +1203,7 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error,
G_MARKUP_ERROR,
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
"Unknown attribute %s on <%s> element",
_("Unknown attribute %s on <%s> element"),
name, "mutter_session");
return;
}
@ -1220,7 +1220,7 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error,
G_MARKUP_ERROR,
G_MARKUP_ERROR_PARSE,
"nested <window> tag");
_("nested <window> tag"));
return;
}
@ -1278,7 +1278,7 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error,
G_MARKUP_ERROR,
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
"Unknown attribute %s on <%s> element",
_("Unknown attribute %s on <%s> element"),
name, "window");
session_info_free (pd->info);
pd->info = NULL;
@ -1310,7 +1310,7 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error,
G_MARKUP_ERROR,
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
"Unknown attribute %s on <%s> element",
_("Unknown attribute %s on <%s> element"),
name, "window");
session_info_free (pd->info);
pd->info = NULL;
@ -1382,7 +1382,7 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error,
G_MARKUP_ERROR,
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
"Unknown attribute %s on <%s> element",
_("Unknown attribute %s on <%s> element"),
name, "maximized");
return;
}
@ -1442,7 +1442,7 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error,
G_MARKUP_ERROR,
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
"Unknown attribute %s on <%s> element",
_("Unknown attribute %s on <%s> element"),
name, "geometry");
return;
}
@ -1462,7 +1462,7 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error,
G_MARKUP_ERROR,
G_MARKUP_ERROR_UNKNOWN_ELEMENT,
"Unknown element %s",
_("Unknown element %s"),
element_name);
return;
}

View File

@ -1724,12 +1724,14 @@ get_default_focus_window (MetaStack *stack,
* or top window in same group as not_this_one.
*/
MetaWindow *topmost_dock;
MetaWindow *transient_parent;
MetaWindow *topmost_in_group;
MetaWindow *topmost_overall;
MetaGroup *not_this_one_group;
GList *link;
topmost_dock = NULL;
transient_parent = NULL;
topmost_in_group = NULL;
topmost_overall = NULL;
@ -1755,6 +1757,10 @@ get_default_focus_window (MetaStack *stack,
(workspace == NULL ||
meta_window_located_on_workspace (window, workspace)))
{
if (topmost_dock == NULL &&
window->type == META_WINDOW_DOCK)
topmost_dock = window;
if (not_this_one != NULL)
{
if (transient_parent == NULL &&
@ -1772,6 +1778,10 @@ get_default_focus_window (MetaStack *stack,
topmost_in_group = window;
}
/* Note that DESKTOP windows can be topmost_overall so
* we prefer focusing desktop or other windows over
* focusing dock, even though docks are stacked higher.
*/
if (topmost_overall == NULL &&
window->type != META_WINDOW_DOCK &&
(!must_be_at_point ||
@ -1793,7 +1803,7 @@ get_default_focus_window (MetaStack *stack,
else if (topmost_overall)
return topmost_overall;
else
return NULL;
return topmost_dock;
}
MetaWindow*

View File

@ -1,37 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/* Mutter utilities */
/*
* Copyright (C) 2001 Havoc Pennington
* Copyright (C) 2005 Elijah Newren
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef META_UTIL_PRIVATE_H
#define META_UTIL_PRIVATE_H
#include <meta/util.h>
#include <glib/gi18n-lib.h>
void meta_set_verbose (gboolean setting);
void meta_set_debugging (gboolean setting);
void meta_set_syncing (gboolean setting);
void meta_set_replace_current_wm (gboolean setting);
void meta_set_is_wayland_compositor (gboolean setting);
#endif

View File

@ -31,7 +31,7 @@
#include <config.h>
#include <meta/common.h>
#include "util-private.h"
#include <meta/util.h>
#include <meta/main.h>
#include <clutter/clutter.h> /* For clutter_threads_add_repaint_func() */
@ -82,7 +82,7 @@ ensure_logfile (void)
if (err != NULL)
{
meta_warning ("Failed to open debug log: %s\n",
meta_warning (_("Failed to open debug log: %s\n"),
err->message);
g_error_free (err);
return;
@ -92,13 +92,13 @@ ensure_logfile (void)
if (logfile == NULL)
{
meta_warning ("Failed to fdopen() log file %s: %s\n",
meta_warning (_("Failed to fdopen() log file %s: %s\n"),
filename, strerror (errno));
close (fd);
}
else
{
g_printerr ("Opened log file %s\n", filename);
g_printerr (_("Opened log file %s\n"), filename);
}
g_free (filename);
@ -274,7 +274,7 @@ meta_debug_spew_real (const char *format, ...)
out = logfile ? logfile : stderr;
if (no_prefix == 0)
utf8_fputs ("Window manager: ", out);
utf8_fputs (_("Window manager: "), out);
utf8_fputs (str, out);
fflush (out);
@ -424,7 +424,7 @@ meta_bug (const char *format, ...)
#endif
if (no_prefix == 0)
utf8_fputs ("Bug in window manager: ", out);
utf8_fputs (_("Bug in window manager: "), out);
utf8_fputs (str, out);
fflush (out);
@ -455,7 +455,7 @@ meta_warning (const char *format, ...)
#endif
if (no_prefix == 0)
utf8_fputs ("Window manager warning: ", out);
utf8_fputs (_("Window manager warning: "), out);
utf8_fputs (str, out);
fflush (out);
@ -483,7 +483,7 @@ meta_fatal (const char *format, ...)
#endif
if (no_prefix == 0)
utf8_fputs ("Window manager error: ", out);
utf8_fputs (_("Window manager error: "), out);
utf8_fputs (str, out);
fflush (out);

View File

@ -405,7 +405,7 @@ struct _MetaWindow
*/
MetaRectangle rect;
/* The size and position we want the window to be (i.e. what we last asked
/* The size we want the window to be (i.e. what we last asked
* the client to configure).
* This is only used for wayland clients.
*/
@ -679,9 +679,7 @@ void meta_window_update_layer (MetaWindow *window);
void meta_window_recalc_features (MetaWindow *window);
/* recalc_window_type is x11 only, wayland does its thing and then calls type_changed */
void meta_window_recalc_window_type (MetaWindow *window);
void meta_window_type_changed (MetaWindow *window);
void meta_window_stack_just_below (MetaWindow *window,
MetaWindow *below_this_one);
@ -734,9 +732,4 @@ void meta_window_set_gtk_dbus_properties (MetaWindow *window,
void meta_window_set_transient_for (MetaWindow *window,
MetaWindow *parent);
void meta_window_handle_enter (MetaWindow *window,
guint32 timestamp,
guint root_x,
guint root_y);
#endif

View File

@ -48,7 +48,6 @@
#include <X11/Xatom.h>
#include <unistd.h>
#include <string.h>
#include "util-private.h"
#ifndef HOST_NAME_MAX
/* Solaris headers apparently don't define this so do so manually; #326745 */
@ -345,7 +344,7 @@ reload_net_wm_pid (MetaWindow *window,
gulong cardinal = (int) value->v.cardinal;
if (cardinal <= 0)
meta_warning ("Application set a bogus _NET_WM_PID %lu\n",
meta_warning (_("Application set a bogus _NET_WM_PID %lu\n"),
cardinal);
else
{
@ -1518,7 +1517,7 @@ reload_transient_for (MetaWindow *window,
gboolean initial)
{
MetaWindow *parent = NULL;
Window transient_for;
Window transient_for, old_transient_for;
if (value->type != META_PROP_VALUE_INVALID)
{
@ -1527,7 +1526,8 @@ reload_transient_for (MetaWindow *window,
parent = meta_display_lookup_x_window (window->display, transient_for);
if (!parent)
{
meta_warning ("Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n",
meta_warning (_("Invalid WM_TRANSIENT_FOR window 0x%lx specified "
"for %s.\n"),
transient_for, window->desc);
transient_for = None;
}
@ -1537,7 +1537,8 @@ reload_transient_for (MetaWindow *window,
{
if (parent == window)
{
meta_warning ("WM_TRANSIENT_FOR window 0x%lx for %s would create loop.\n",
meta_warning (_("WM_TRANSIENT_FOR window 0x%lx for %s "
"would create loop.\n"),
transient_for, window->desc);
transient_for = None;
break;
@ -1553,6 +1554,7 @@ reload_transient_for (MetaWindow *window,
if (transient_for == window->xtransient_for)
return;
old_transient_for = window->xtransient_for;
window->xtransient_for = transient_for;
window->transient_parent_is_root_window =

View File

@ -32,7 +32,7 @@
#include "window-private.h"
#include "boxes-private.h"
#include "edge-resistance.h"
#include "util-private.h"
#include <meta/util.h>
#include "frame.h"
#include <meta/errors.h>
#include "workspace-private.h"
@ -237,9 +237,6 @@ meta_window_finalize (GObject *object)
if (window->frame_bounds)
cairo_region_destroy (window->frame_bounds);
if (window->shape_region)
cairo_region_destroy (window->shape_region);
if (window->opaque_region)
cairo_region_destroy (window->opaque_region);
@ -1050,12 +1047,20 @@ meta_window_new_shared (MetaDisplay *display,
if (client_type == META_WINDOW_CLIENT_TYPE_X11)
{
if (window->override_redirect)
{
window->decorated = FALSE;
window->always_sticky = TRUE;
window->has_close_func = FALSE;
window->has_shade_func = FALSE;
window->has_move_func = FALSE;
window->has_resize_func = FALSE;
}
meta_display_register_x_window (display, &window->xwindow, window);
meta_window_update_shape_region_x11 (window);
meta_window_update_input_region_x11 (window);
}
else
meta_display_register_wayland_window (display, window);
/* assign the window to its group, or create a new group if needed
*/
@ -1068,16 +1073,6 @@ meta_window_new_shared (MetaDisplay *display,
else
meta_wayland_surface_set_initial_state (window->surface, window);
if (window->override_redirect)
{
window->decorated = FALSE;
window->always_sticky = TRUE;
window->has_close_func = FALSE;
window->has_shade_func = FALSE;
window->has_move_func = FALSE;
window->has_resize_func = FALSE;
}
if (!window->override_redirect &&
client_type == META_WINDOW_CLIENT_TYPE_X11)
{
@ -1086,8 +1081,7 @@ meta_window_new_shared (MetaDisplay *display,
meta_window_update_role (window);
}
if (client_type == META_WINDOW_CLIENT_TYPE_X11)
meta_window_update_net_wm_type (window);
meta_window_update_net_wm_type (window);
if (!window->override_redirect)
meta_window_update_icon_now (window);
@ -1133,7 +1127,7 @@ meta_window_new_shared (MetaDisplay *display,
*/
window->net_wm_user_time = window->initial_timestamp;
else if (window->transient_for != NULL)
meta_window_set_user_time (window, window->transient_for->net_wm_user_time);
meta_window_set_user_time(window, window->transient_for->net_wm_user_time);
else
/* NOTE: Do NOT toggle net_wm_user_time_set to true; this is just
* being recorded as a fallback for potential transients
@ -2002,8 +1996,6 @@ meta_window_unmanage (MetaWindow *window,
meta_window_ungrab_keys (window);
meta_display_ungrab_window_buttons (window->display, window->xwindow);
meta_display_ungrab_focus_window_button (window->display, window);
if (window->display->autoraise_window == window)
meta_display_remove_autoraise_callback (window->display);
if (window->client_type == META_WINDOW_CLIENT_TYPE_X11)
{
@ -2049,8 +2041,6 @@ meta_window_unmanage (MetaWindow *window,
meta_error_trap_pop (window->display);
}
else
meta_display_unregister_wayland_window (window->display, window);
if (window->surface)
meta_wayland_surface_free (window->surface);
@ -5187,7 +5177,8 @@ meta_window_move_resize_internal (MetaWindow *window,
dx = client_rect.x - old_rect.x;
dy = client_rect.y - old_rect.y;
if (deltax != dx || deltay != dy)
if ((deltax - dx) != 0 ||
(deltay - dy) != 0)
need_move_client = TRUE;
window->rect.x += (deltax - dx);
@ -6839,7 +6830,8 @@ meta_window_property_notify (MetaWindow *window,
void
meta_window_change_workspace_by_index (MetaWindow *window,
gint space_index,
gboolean append)
gboolean append,
guint32 timestamp)
{
MetaWorkspace *workspace;
MetaScreen *screen;
@ -6858,7 +6850,11 @@ meta_window_change_workspace_by_index (MetaWindow *window,
meta_screen_get_workspace_by_index (screen, space_index);
if (!workspace && append)
workspace = meta_screen_append_new_workspace (screen, FALSE, CurrentTime);
{
if (timestamp == CurrentTime)
timestamp = meta_display_get_current_time_roundtrip (window->display);
workspace = meta_screen_append_new_workspace (screen, FALSE, timestamp);
}
if (workspace)
{
@ -7783,7 +7779,7 @@ update_sm_hints (MetaWindow *window)
&str))
{
if (window->sm_client_id == NULL) /* first time through */
meta_warning ("Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER window as specified in the ICCCM.\n",
meta_warning (_("Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER window as specified in the ICCCM.\n"),
window->desc);
window->sm_client_id = g_strdup (str);
@ -8548,40 +8544,36 @@ recalc_window_type (MetaWindow *window)
window->type, window->desc, old_type);
if (old_type != window->type)
meta_window_type_changed (window);
}
{
gboolean old_decorated = window->decorated;
GObject *object = G_OBJECT (window);
void
meta_window_type_changed (MetaWindow *window)
{
gboolean old_decorated = window->decorated;
GObject *object = G_OBJECT (window);
window->attached = meta_window_should_attach_to_parent (window);
recalc_window_features (window);
window->attached = meta_window_should_attach_to_parent (window);
recalc_window_features (window);
if (!window->override_redirect)
set_net_wm_state (window);
if (!window->override_redirect)
set_net_wm_state (window);
/* Update frame */
if (window->decorated)
meta_window_ensure_frame (window);
else
meta_window_destroy_frame (window);
/* Update frame */
if (window->decorated)
meta_window_ensure_frame (window);
else
meta_window_destroy_frame (window);
/* update stacking constraints */
meta_window_update_layer (window);
/* update stacking constraints */
meta_window_update_layer (window);
meta_window_grab_keys (window);
meta_window_grab_keys (window);
g_object_freeze_notify (object);
g_object_freeze_notify (object);
if (old_decorated != window->decorated)
g_object_notify (object, "decorated");
if (old_decorated != window->decorated)
g_object_notify (object, "decorated");
g_object_notify (object, "window-type");
g_object_notify (object, "window-type");
g_object_thaw_notify (object);
g_object_thaw_notify (object);
}
}
static void
@ -8679,10 +8671,7 @@ recalc_window_features (MetaWindow *window)
old_always_sticky = window->always_sticky;
/* Use MWM hints initially */
if (window->client_type == META_WINDOW_CLIENT_TYPE_X11)
window->decorated = window->mwm_decorated;
else
window->decorated = FALSE;
window->decorated = window->mwm_decorated;
window->border_only = window->mwm_border_only;
window->has_close_func = window->mwm_has_close_func;
window->has_minimize_func = window->mwm_has_minimize_func;
@ -8705,7 +8694,7 @@ recalc_window_features (MetaWindow *window)
* about these apps but make them work.
*/
meta_warning ("Window %s sets an MWM hint indicating it isn't resizable, but sets min size %d x %d and max size %d x %d; this doesn't make much sense.\n",
meta_warning (_("Window %s sets an MWM hint indicating it isn't resizable, but sets min size %d x %d and max size %d x %d; this doesn't make much sense.\n"),
window->desc,
window->size_hints.min_width,
window->size_hints.min_height,
@ -10003,51 +9992,49 @@ meta_window_handle_mouse_grab_op_event (MetaWindow *window,
switch (event->type)
{
case CLUTTER_BUTTON_RELEASE:
if (event->button.button == 1)
meta_display_check_threshold_reached (window->display,
event->button.x,
event->button.y);
/* If the user was snap moving then ignore the button release
* because they may have let go of shift before releasing the
* mouse button and they almost certainly do not want a
* non-snapped movement to occur from the button release.
*/
if (!window->display->grab_last_user_action_was_snap)
{
meta_display_check_threshold_reached (window->display,
event->button.x,
event->button.y);
/* If the user was snap moving then ignore the button
* release because they may have let go of shift before
* releasing the mouse button and they almost certainly do
* not want a non-snapped movement to occur from the button
* release.
*/
if (!window->display->grab_last_user_action_was_snap)
if (meta_grab_op_is_moving (window->display->grab_op))
{
if (meta_grab_op_is_moving (window->display->grab_op))
{
if (window->tile_mode != META_TILE_NONE)
meta_window_tile (window);
else if (is_window_root)
update_move (window,
event->button.modifier_state & CLUTTER_SHIFT_MASK,
event->button.x,
event->button.y);
}
else if (meta_grab_op_is_resizing (window->display->grab_op))
{
if (is_window_root)
update_resize (window,
event->button.modifier_state & CLUTTER_SHIFT_MASK,
event->button.x,
event->button.y,
TRUE);
if (window->tile_mode != META_TILE_NONE)
meta_window_tile (window);
else if (is_window_root)
update_move (window,
clutter_event_get_state (event) &
CLUTTER_SHIFT_MASK,
event->button.x,
event->button.y);
}
else if (meta_grab_op_is_resizing (window->display->grab_op))
{
if (is_window_root)
update_resize (window,
clutter_event_get_state (event) &
CLUTTER_SHIFT_MASK,
event->button.x,
event->button.y,
TRUE);
/* If a tiled window has been dragged free with a
* mouse resize without snapping back to the tiled
* state, it will end up with an inconsistent tile
* mode on mouse release; cleaning the mode earlier
* would break the ability to snap back to the tiled
* state, so we wait until mouse release.
*/
update_tile_mode (window);
}
meta_display_end_grab_op (window->display, event->any.time);
/* If a tiled window has been dragged free with a
* mouse resize without snapping back to the tiled
* state, it will end up with an inconsistent tile
* mode on mouse release; cleaning the mode earlier
* would break the ability to snap back to the tiled
* state, so we wait until mouse release.
*/
update_tile_mode (window);
}
}
meta_display_end_grab_op (window->display, event->any.time);
break;
case CLUTTER_MOTION:
@ -10060,7 +10047,8 @@ meta_window_handle_mouse_grab_op_event (MetaWindow *window,
{
if (check_use_this_motion_notify (window, event))
update_move (window,
event->button.modifier_state & CLUTTER_SHIFT_MASK,
clutter_event_get_state (event) &
CLUTTER_SHIFT_MASK,
event->motion.x,
event->motion.y);
}
@ -10071,7 +10059,8 @@ meta_window_handle_mouse_grab_op_event (MetaWindow *window,
{
if (check_use_this_motion_notify (window, event))
update_resize (window,
event->button.modifier_state & CLUTTER_SHIFT_MASK,
clutter_event_get_state (event) &
CLUTTER_SHIFT_MASK,
event->motion.x,
event->motion.y,
FALSE);
@ -11669,185 +11658,3 @@ meta_window_set_transient_for (MetaWindow *window,
if (meta_window_appears_focused (window) && window->transient_for != None)
meta_window_propagate_focus_appearance (window, TRUE);
}
static void
reset_ignored_crossing_serials (MetaDisplay *display)
{
int i;
i = 0;
while (i < N_IGNORED_CROSSING_SERIALS)
{
display->ignored_crossing_serials[i] = 0;
++i;
}
display->ungrab_should_not_cause_focus_window = None;
}
typedef struct
{
MetaWindow *window;
int pointer_x;
int pointer_y;
} MetaFocusData;
static void
mouse_mode_focus (MetaWindow *window,
guint32 timestamp)
{
MetaDisplay *display = window->display;
if (window->type != META_WINDOW_DESKTOP)
{
meta_topic (META_DEBUG_FOCUS,
"Focusing %s at time %u.\n", window->desc, timestamp);
meta_window_focus (window, timestamp);
if (meta_prefs_get_auto_raise ())
meta_display_queue_autoraise_callback (display, window);
else
meta_topic (META_DEBUG_FOCUS, "Auto raise is disabled\n");
}
else
{
/* In mouse focus mode, we defocus when the mouse *enters*
* the DESKTOP window, instead of defocusing on LeaveNotify.
* This is because having the mouse enter override-redirect
* child windows unfortunately causes LeaveNotify events that
* we can't distinguish from the mouse actually leaving the
* toplevel window as we expect. But, since we filter out
* EnterNotify events on override-redirect windows, this
* alternative mechanism works great.
*/
if (meta_prefs_get_focus_mode() == G_DESKTOP_FOCUS_MODE_MOUSE &&
display->focus_window != NULL)
{
meta_topic (META_DEBUG_FOCUS,
"Unsetting focus from %s due to mouse entering "
"the DESKTOP window\n",
display->focus_window->desc);
meta_display_focus_the_no_focus_window (display,
window->screen,
timestamp);
}
}
}
static gboolean
window_focus_on_pointer_rest_callback (gpointer data)
{
MetaFocusData *focus_data = data;
MetaWindow *window = focus_data->window;
MetaDisplay *display = window->display;
MetaScreen *screen = window->screen;
Window root, child;
double root_x, root_y, x, y;
guint32 timestamp;
XIButtonState buttons;
XIModifierState mods;
XIGroupState group;
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK)
goto out;
meta_error_trap_push (display);
XIQueryPointer (display->xdisplay,
META_VIRTUAL_CORE_POINTER_ID,
screen->xroot,
&root, &child,
&root_x, &root_y, &x, &y,
&buttons, &mods, &group);
meta_error_trap_pop (display);
free (buttons.mask);
if (root_x != focus_data->pointer_x ||
root_y != focus_data->pointer_y)
{
focus_data->pointer_x = root_x;
focus_data->pointer_y = root_y;
return TRUE;
}
/* Explicitly check for the overlay window, as get_focus_window_at_point()
* may return windows that extend underneath the chrome (like
* override-redirect or DESKTOP windows)
*/
if (child == meta_get_overlay_window (screen))
goto out;
window =
meta_stack_get_default_focus_window_at_point (screen->stack,
screen->active_workspace,
None, root_x, root_y);
if (window == NULL)
goto out;
timestamp = meta_display_get_current_time_roundtrip (display);
mouse_mode_focus (window, timestamp);
out:
display->focus_timeout_id = 0;
return FALSE;
}
/* The interval, in milliseconds, we use in focus-follows-mouse
* mode to check whether the pointer has stopped moving after a
* crossing event.
*/
#define FOCUS_TIMEOUT_DELAY 25
static void
queue_focus_callback (MetaDisplay *display,
MetaWindow *window,
int pointer_x,
int pointer_y)
{
MetaFocusData *focus_data;
focus_data = g_new (MetaFocusData, 1);
focus_data->window = window;
focus_data->pointer_x = pointer_x;
focus_data->pointer_y = pointer_y;
if (display->focus_timeout_id != 0)
g_source_remove (display->focus_timeout_id);
display->focus_timeout_id =
g_timeout_add_full (G_PRIORITY_DEFAULT,
FOCUS_TIMEOUT_DELAY,
window_focus_on_pointer_rest_callback,
focus_data,
g_free);
}
void
meta_window_handle_enter (MetaWindow *window,
guint32 timestamp,
guint root_x,
guint root_y)
{
MetaDisplay *display = window->display;
switch (meta_prefs_get_focus_mode ())
{
case G_DESKTOP_FOCUS_MODE_SLOPPY:
case G_DESKTOP_FOCUS_MODE_MOUSE:
display->mouse_mode = TRUE;
if (window->type != META_WINDOW_DOCK)
{
if (meta_prefs_get_focus_change_on_pointer_rest())
queue_focus_callback (display, window, root_x, root_y);
else
mouse_mode_focus (window, timestamp);
/* stop ignoring stuff */
reset_ignored_crossing_serials (display);
}
break;
case G_DESKTOP_FOCUS_MODE_CLICK:
break;
}
}

View File

@ -78,7 +78,6 @@ static void
meta_workspace_finalize (GObject *object)
{
/* Actual freeing done in meta_workspace_remove() for now */
G_OBJECT_CLASS (meta_workspace_parent_class)->finalize (object);
}
static void

View File

@ -83,7 +83,7 @@ from The Open Group.
#include <config.h>
#include "xprops.h"
#include <meta/errors.h>
#include "util-private.h"
#include <meta/util.h>
#include "async-getprop.h"
#include "ui.h"
#include "mutter-Xatomtype.h"
@ -152,7 +152,7 @@ validate_or_free_results (GetPropertyResults *results,
if (res_name == NULL)
res_name = "unknown";
meta_warning ("Window 0x%lx has property %s\nthat was expected to have type %s format %d\nand actually has type %s format %d n_items %d.\nThis is most likely an application bug, not a window manager bug.\nThe window has title=\"%s\" class=\"%s\" name=\"%s\"\n",
meta_warning (_("Window 0x%lx has property %s\nthat was expected to have type %s format %d\nand actually has type %s format %d n_items %d.\nThis is most likely an application bug, not a window manager bug.\nThe window has title=\"%s\" class=\"%s\" name=\"%s\"\n"),
results->xwindow,
prop_name ? prop_name : "(bad atom)",
expected_name ? expected_name : "(bad atom)",
@ -408,7 +408,7 @@ utf8_string_from_results (GetPropertyResults *results,
char *name;
name = XGetAtomName (results->display->xdisplay, results->xatom);
meta_warning ("Property %s on window 0x%lx contained invalid UTF-8\n",
meta_warning (_("Property %s on window 0x%lx contained invalid UTF-8\n"),
name, results->xwindow);
meta_XFree (name);
XFree (results->prop);
@ -491,7 +491,7 @@ utf8_list_from_results (GetPropertyResults *results,
meta_error_trap_push (results->display);
name = XGetAtomName (results->display->xdisplay, results->xatom);
meta_error_trap_pop (results->display);
meta_warning ("Property %s on window 0x%lx contained invalid UTF-8 for item %d in the list\n",
meta_warning (_("Property %s on window 0x%lx contained invalid UTF-8 for item %d in the list\n"),
name, results->xwindow, i);
meta_XFree (name);
meta_XFree (results->prop);

View File

@ -31,7 +31,6 @@
#include <X11/Xlib.h>
#include <X11/extensions/XInput.h>
#include <X11/extensions/XInput2.h>
#include <clutter/clutter.h>
#include <glib.h>
#include <gtk/gtk.h>
@ -261,13 +260,6 @@ typedef enum
* @META_CURSOR_NW_RESIZE: Resize north-western corner cursor
* @META_CURSOR_MOVE_OR_RESIZE_WINDOW: Move or resize cursor
* @META_CURSOR_BUSY: Busy cursor
* @META_CURSOR_DND_IN_DRAG: DND in drag cursor
* @META_CURSOR_DND_MOVE: DND move cursor
* @META_CURSOR_DND_COPY: DND copy cursor
* @META_CURSOR_DND_UNSUPPORTED_TARGET: DND unsupported target
* @META_CURSOR_POINTING_HAND: pointing hand
* @META_CURSOR_CROSSHAIR: crosshair (action forbidden)
* @META_CURSOR_IBEAM: I-beam (text input)
*/
typedef enum
{
@ -281,15 +273,8 @@ typedef enum
META_CURSOR_NE_RESIZE,
META_CURSOR_NW_RESIZE,
META_CURSOR_MOVE_OR_RESIZE_WINDOW,
META_CURSOR_BUSY,
META_CURSOR_DND_IN_DRAG,
META_CURSOR_DND_MOVE,
META_CURSOR_DND_COPY,
META_CURSOR_DND_UNSUPPORTED_TARGET,
META_CURSOR_POINTING_HAND,
META_CURSOR_CROSSHAIR,
META_CURSOR_IBEAM,
META_CURSOR_LAST
META_CURSOR_BUSY
} MetaCursor;
/**

View File

@ -35,6 +35,13 @@ gboolean meta_keybindings_set_custom_handler (const gchar *name,
gpointer user_data,
GDestroyNotify free_data);
void meta_keybindings_switch_window (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *event_window,
XIDeviceEvent *event,
MetaKeyBinding *binding);
void meta_screen_ungrab_all_keys (MetaScreen *screen, guint32 timestamp);
gboolean meta_screen_grab_all_keys (MetaScreen *screen, guint32 timestamp);
#endif

View File

@ -28,7 +28,6 @@
#include <meta/types.h>
#include <meta/workspace.h>
#include <cogl/cogl.h>
#include <clutter/clutter.h>
#define META_TYPE_CURSOR_TRACKER (meta_cursor_tracker_get_type ())
#define META_CURSOR_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_CURSOR_TRACKER, MetaCursorTracker))
@ -48,11 +47,4 @@ void meta_cursor_tracker_get_hot (MetaCursorTracker *tracker,
int *y);
CoglTexture *meta_cursor_tracker_get_sprite (MetaCursorTracker *tracker);
void meta_cursor_tracker_get_pointer (MetaCursorTracker *tracker,
int *x,
int *y,
ClutterModifierType *mods);
void meta_cursor_tracker_set_pointer_visible (MetaCursorTracker *tracker,
gboolean visible);
#endif

View File

@ -391,17 +391,17 @@ struct _MetaKeyCombo
* @display: a #MetaDisplay
* @screen: a #MetaScreen
* @window: a #MetaWindow
* @event: a #ClutterKeyEvent
* @event: (type gpointer): a #XIDeviceEvent
* @binding: a #MetaKeyBinding
* @user_data: data passed to the function
*
*/
typedef void (* MetaKeyHandlerFunc) (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
ClutterKeyEvent *event,
MetaKeyBinding *binding,
gpointer user_data);
typedef void (* MetaKeyHandlerFunc) (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XIDeviceEvent *event,
MetaKeyBinding *binding,
gpointer user_data);
typedef struct _MetaKeyHandler MetaKeyHandler;
@ -419,13 +419,13 @@ typedef struct
*/
GSList *bindings;
/* for keybindings that can have shift or not like Alt+Tab */
/** for keybindings that can have shift or not like Alt+Tab */
gboolean add_shift:1;
/* for keybindings that apply only to a window */
/** for keybindings that apply only to a window */
gboolean per_window:1;
/* for keybindings not added with meta_display_add_keybinding() */
/** for keybindings not added with meta_display_add_keybinding() */
gboolean builtin:1;
} MetaKeyPref;

View File

@ -114,8 +114,4 @@ void meta_screen_override_workspace_layout (MetaScreen *screen,
gboolean vertical_layout,
int n_rows,
int n_columns);
void meta_screen_set_cursor (MetaScreen *screen,
MetaCursor cursor);
#endif

View File

@ -31,9 +31,14 @@
#include <meta/common.h>
gboolean meta_is_verbose (void);
void meta_set_verbose (gboolean setting);
gboolean meta_is_debugging (void);
void meta_set_debugging (gboolean setting);
gboolean meta_is_syncing (void);
void meta_set_syncing (gboolean setting);
void meta_set_replace_current_wm (gboolean setting);
gboolean meta_is_wayland_compositor (void);
void meta_set_is_wayland_compositor (gboolean setting);
void meta_debug_spew_real (const char *format,
...) G_GNUC_PRINTF (1, 2);
@ -119,6 +124,10 @@ const char* meta_gravity_to_string (int gravity);
char* meta_external_binding_name_for_action (guint keybinding_action);
#include <libintl.h>
#define _(x) dgettext (GETTEXT_PACKAGE, x)
#define N_(x) x
char* meta_g_utf8_strndup (const gchar *src, gsize n);
void meta_free_gslist_and_elements (GSList *list_to_deep_free);

View File

@ -150,7 +150,8 @@ void meta_window_unset_demands_attention (MetaWindow *window);
const char* meta_window_get_startup_id (MetaWindow *window);
void meta_window_change_workspace_by_index (MetaWindow *window,
gint space_index,
gboolean append);
gboolean append,
guint32 timestamp);
void meta_window_change_workspace (MetaWindow *window,
MetaWorkspace *workspace);
GObject *meta_window_get_compositor_private (MetaWindow *window);

View File

@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
_Name=Mutter (wayland compositor)
Exec=mutter-launch -- mutter --wayland
Exec=mutter-launch -- mutter --nested
NoDisplay=true
# name of loadable control center module
X-GNOME-WMSettingsModule=metacity

View File

@ -28,7 +28,7 @@
#include <string.h>
#include "menu.h"
#include <meta/main.h>
#include "util-private.h"
#include <meta/util.h>
#include "core.h"
#include "metaaccellabel.h"
#include "ui.h"

View File

@ -35,7 +35,7 @@
#include "metaaccellabel.h"
#include <gtk/gtk.h>
#include <string.h>
#include "util-private.h"
#include <meta/util.h>
static void meta_accel_label_destroy (GtkWidget *object);
static void meta_accel_label_finalize (GObject *object);

View File

@ -23,7 +23,7 @@
#include <config.h>
#include "resizepopup.h"
#include "util-private.h"
#include <meta/util.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>

View File

@ -23,7 +23,7 @@
#include <config.h>
#include "theme-private.h"
#include "util-private.h"
#include <meta/util.h>
#include <string.h>
#include <stdlib.h>
@ -430,11 +430,7 @@ locate_attributes (GMarkupParseContext *context,
while (name != NULL)
{
if (retloc == NULL)
{
retval = FALSE;
goto out;
}
g_return_val_if_fail (retloc != NULL, FALSE);
g_assert (n_attrs < MAX_ATTRS);
@ -3216,6 +3212,9 @@ parse_style_set_element (GMarkupParseContext *context,
meta_frame_style_ref (frame_style);
info->style_set->tiled_right_styles[frame_focus] = frame_style;
break;
meta_frame_style_ref (frame_style);
info->style_set->tiled_right_styles[frame_focus] = frame_style;
break;
case META_FRAME_STATE_SHADED:
if (info->style_set->shaded_styles[frame_resize][frame_focus])
{

View File

@ -39,7 +39,7 @@
#include <config.h>
#include "theme-private.h"
#include "frames.h" /* for META_TYPE_FRAMES */
#include "util-private.h"
#include <meta/util.h>
#include <meta/gradient.h>
#include <meta/prefs.h>
#include <gtk/gtk.h>

View File

@ -109,12 +109,12 @@ meta_wayland_data_source_send_offer (MetaWaylandDataSource *source,
offer->source = source;
offer->source_destroy_listener.notify = destroy_offer_data_source;
offer->resource = wl_resource_create (wl_resource_get_client (target),
&wl_data_offer_interface,
MIN (META_WL_DATA_OFFER_VERSION,
wl_resource_get_version (target)), 0);
wl_resource_set_implementation (offer->resource, &data_offer_interface,
offer, destroy_data_offer);
offer->resource = wl_client_add_object (wl_resource_get_client (target),
&wl_data_offer_interface,
&data_offer_interface,
0,
offer);
wl_resource_set_destructor (offer->resource, destroy_data_offer);
wl_resource_add_destroy_listener (source->resource,
&offer->source_destroy_listener);
@ -151,63 +151,42 @@ static struct wl_data_source_interface data_source_interface = {
data_source_destroy
};
typedef struct {
MetaWaylandPointerGrab generic;
MetaWaylandSeat *seat;
struct wl_client *drag_client;
MetaWaylandSurface *drag_focus;
struct wl_resource *drag_focus_data_device;
struct wl_listener drag_focus_listener;
MetaWaylandSurface *drag_surface;
struct wl_listener drag_icon_listener;
MetaWaylandDataSource *drag_data_source;
struct wl_listener drag_data_source_listener;
} MetaWaylandDragGrab;
static void
destroy_drag_focus (struct wl_listener *listener, void *data)
{
MetaWaylandDragGrab *grab = wl_container_of (listener, grab, drag_focus_listener);
MetaWaylandSeat *seat = wl_container_of (listener, seat, drag_focus_listener);
grab->drag_focus_data_device = NULL;
seat->drag_focus_resource = NULL;
}
static void
drag_grab_focus (MetaWaylandPointerGrab *grab,
MetaWaylandSurface *surface,
const ClutterEvent *event)
MetaWaylandSurface *surface,
wl_fixed_t x,
wl_fixed_t y)
{
MetaWaylandDragGrab *drag_grab = (MetaWaylandDragGrab*) grab;
MetaWaylandSeat *seat = drag_grab->seat;
MetaWaylandSeat *seat = wl_container_of (grab, seat, drag_grab);
struct wl_resource *resource, *offer = NULL;
struct wl_display *display;
guint32 serial;
wl_fixed_t sx, sy;
if (drag_grab->drag_focus == surface)
return;
if (drag_grab->drag_focus_data_device)
if (seat->drag_focus_resource)
{
wl_data_device_send_leave (drag_grab->drag_focus_data_device);
wl_list_remove (&drag_grab->drag_focus_listener.link);
drag_grab->drag_focus_data_device = NULL;
drag_grab->drag_focus = NULL;
wl_data_device_send_leave (seat->drag_focus_resource);
wl_list_remove (&seat->drag_focus_listener.link);
seat->drag_focus_resource = NULL;
seat->drag_focus = NULL;
}
if (!surface)
return;
if (!drag_grab->drag_data_source &&
wl_resource_get_client (surface->resource) != drag_grab->drag_client)
if (!seat->drag_data_source &&
wl_resource_get_client (surface->resource) != seat->drag_client)
return;
resource =
wl_resource_find_for_client (&seat->data_device_resource_list,
wl_resource_find_for_client (&seat->drag_resource_list,
wl_resource_get_client (surface->resource));
if (!resource)
return;
@ -215,73 +194,68 @@ drag_grab_focus (MetaWaylandPointerGrab *grab,
display = wl_client_get_display (wl_resource_get_client (resource));
serial = wl_display_next_serial (display);
if (drag_grab->drag_data_source)
offer = meta_wayland_data_source_send_offer (drag_grab->drag_data_source,
if (seat->drag_data_source)
offer = meta_wayland_data_source_send_offer (seat->drag_data_source,
resource);
meta_wayland_pointer_get_relative_coordinates (grab->pointer, surface, &sx, &sy);
wl_data_device_send_enter (resource, serial, surface->resource,
sx, sy, offer);
x, y, offer);
drag_grab->drag_focus = surface;
drag_grab->drag_focus_data_device = resource;
drag_grab->drag_focus_listener.notify = destroy_drag_focus;
wl_resource_add_destroy_listener (resource, &drag_grab->drag_focus_listener);
seat->drag_focus = surface;
seat->drag_focus_listener.notify = destroy_drag_focus;
wl_resource_add_destroy_listener (resource, &seat->drag_focus_listener);
seat->drag_focus_resource = resource;
grab->focus = surface;
}
static void
drag_grab_motion (MetaWaylandPointerGrab *grab,
const ClutterEvent *event)
guint32 time, wl_fixed_t x, wl_fixed_t y)
{
MetaWaylandDragGrab *drag_grab = (MetaWaylandDragGrab*) grab;
wl_fixed_t sx, sy;
MetaWaylandSeat *seat = wl_container_of (grab, seat, drag_grab);
if (drag_grab->drag_focus_data_device)
{
meta_wayland_pointer_get_relative_coordinates (grab->pointer,
drag_grab->drag_focus,
&sx, &sy);
wl_data_device_send_motion (drag_grab->drag_focus_data_device,
clutter_event_get_time (event),
sx, sy);
}
if (seat->drag_focus_resource)
wl_data_device_send_motion (seat->drag_focus_resource, time, x, y);
}
static void
data_device_end_drag_grab (MetaWaylandDragGrab *drag_grab)
data_device_end_drag_grab (MetaWaylandSeat *seat)
{
if (drag_grab->drag_surface)
if (seat->drag_surface)
{
drag_grab->drag_surface = NULL;
wl_list_remove (&drag_grab->drag_icon_listener.link);
seat->drag_surface = NULL;
wl_signal_emit (&seat->drag_icon_signal, NULL);
wl_list_remove (&seat->drag_icon_listener.link);
}
if (drag_grab->drag_data_source)
wl_list_remove (&drag_grab->drag_data_source_listener.link);
drag_grab_focus (&seat->drag_grab, NULL,
wl_fixed_from_int (0), wl_fixed_from_int (0));
drag_grab_focus (&drag_grab->generic, NULL, NULL);
meta_wayland_pointer_end_grab (&seat->pointer);
meta_wayland_pointer_end_grab (drag_grab->generic.pointer);
g_slice_free (MetaWaylandDragGrab, drag_grab);
seat->drag_data_source = NULL;
seat->drag_client = NULL;
}
static void
drag_grab_button (MetaWaylandPointerGrab *grab,
const ClutterEvent *event)
guint32 time, guint32 button, guint32 state_w)
{
MetaWaylandDragGrab *drag_grab = (MetaWaylandDragGrab*) grab;
MetaWaylandSeat *seat = drag_grab->seat;
ClutterEventType event_type = clutter_event_type (event);
MetaWaylandSeat *seat = wl_container_of (grab, seat, drag_grab);
enum wl_pointer_button_state state = state_w;
if (drag_grab->drag_focus_data_device &&
drag_grab->generic.pointer->grab_button == clutter_event_get_button (event) &&
event_type == CLUTTER_BUTTON_RELEASE)
wl_data_device_send_drop (drag_grab->drag_focus_data_device);
if (seat->drag_focus_resource &&
seat->pointer.grab_button == button &&
state == WL_POINTER_BUTTON_STATE_RELEASED)
wl_data_device_send_drop (seat->drag_focus_resource);
if (seat->pointer.button_count == 0 &&
event_type == CLUTTER_BUTTON_RELEASE)
data_device_end_drag_grab (drag_grab);
state == WL_POINTER_BUTTON_STATE_RELEASED)
{
if (seat->drag_data_source)
wl_list_remove (&seat->drag_data_source_listener.link);
data_device_end_drag_grab (seat);
}
}
static const MetaWaylandPointerGrabInterface drag_grab_interface = {
@ -293,20 +267,19 @@ static const MetaWaylandPointerGrabInterface drag_grab_interface = {
static void
destroy_data_device_source (struct wl_listener *listener, void *data)
{
MetaWaylandDragGrab *drag_grab =
wl_container_of (listener, drag_grab, drag_data_source_listener);
MetaWaylandSeat *seat =
wl_container_of (listener, seat, drag_data_source_listener);
drag_grab->drag_data_source = NULL;
data_device_end_drag_grab (drag_grab);
data_device_end_drag_grab (seat);
}
static void
destroy_data_device_icon (struct wl_listener *listener, void *data)
{
MetaWaylandDragGrab *drag_grab =
wl_container_of (listener, drag_grab, drag_data_source_listener);
MetaWaylandSeat *seat =
wl_container_of (listener, seat, drag_icon_listener);
drag_grab->drag_surface = NULL;
seat->drag_surface = NULL;
}
static void
@ -317,40 +290,38 @@ data_device_start_drag (struct wl_client *client,
struct wl_resource *icon_resource, guint32 serial)
{
MetaWaylandSeat *seat = wl_resource_get_user_data (resource);
MetaWaylandDragGrab *drag_grab;
/* FIXME: Check that client has implicit grab on the origin
* surface that matches the given time. */
/* FIXME: Check that the data source type array isn't empty. */
if (seat->pointer.grab != &seat->pointer.default_grab)
return;
seat->drag_grab.interface = &drag_grab_interface;
drag_grab = g_slice_new0 (MetaWaylandDragGrab);
drag_grab->generic.interface = &drag_grab_interface;
drag_grab->generic.pointer = &seat->pointer;
drag_grab->drag_client = client;
seat->drag_client = client;
seat->drag_data_source = NULL;
if (source_resource)
{
drag_grab->drag_data_source = wl_resource_get_user_data (source_resource);
drag_grab->drag_data_source_listener.notify = destroy_data_device_source;
seat->drag_data_source = wl_resource_get_user_data (source_resource);
seat->drag_data_source_listener.notify = destroy_data_device_source;
wl_resource_add_destroy_listener (source_resource,
&drag_grab->drag_data_source_listener);
&seat->drag_data_source_listener);
}
if (icon_resource)
{
drag_grab->drag_surface = wl_resource_get_user_data (icon_resource);
drag_grab->drag_icon_listener.notify = destroy_data_device_icon;
seat->drag_surface = wl_resource_get_user_data (icon_resource);
seat->drag_icon_listener.notify = destroy_data_device_icon;
wl_resource_add_destroy_listener (icon_resource,
&drag_grab->drag_icon_listener);
&seat->drag_icon_listener);
wl_signal_emit (&seat->drag_icon_signal, icon_resource);
}
meta_wayland_pointer_set_focus (&seat->pointer, NULL);
meta_wayland_pointer_start_grab (&seat->pointer, (MetaWaylandPointerGrab*)drag_grab);
meta_wayland_pointer_set_focus (&seat->pointer, NULL,
wl_fixed_from_int (0),
wl_fixed_from_int (0));
meta_wayland_pointer_start_grab (&seat->pointer, &seat->drag_grab);
}
static void
@ -368,11 +339,13 @@ destroy_selection_data_source (struct wl_listener *listener, void *data)
if (focus)
{
data_device =
wl_resource_find_for_client (&seat->data_device_resource_list,
wl_resource_find_for_client (&seat->drag_resource_list,
wl_resource_get_client (focus));
if (data_device)
wl_data_device_send_selection (data_device, NULL);
}
wl_signal_emit (&seat->selection_signal, seat);
}
void
@ -402,7 +375,7 @@ meta_wayland_seat_set_selection (MetaWaylandSeat *seat,
if (focus)
{
data_device =
wl_resource_find_for_client (&seat->data_device_resource_list,
wl_resource_find_for_client (&seat->drag_resource_list,
wl_resource_get_client (focus));
if (data_device && source)
{
@ -417,6 +390,8 @@ meta_wayland_seat_set_selection (MetaWaylandSeat *seat,
}
}
wl_signal_emit (&seat->selection_signal, seat);
if (source)
{
seat->selection_data_source_listener.notify =
@ -491,11 +466,12 @@ create_data_source (struct wl_client *client,
return;
}
source->resource = wl_resource_create (client, &wl_data_source_interface,
MIN (META_WL_DATA_SOURCE_VERSION,
wl_resource_get_version (resource)), id);
wl_resource_set_implementation (source->resource, &data_source_interface,
source, destroy_data_source);
source->resource = wl_client_add_object (client,
&wl_data_source_interface,
&data_source_interface,
id,
source);
wl_resource_set_destructor (source->resource, destroy_data_source);
source->accept = client_source_accept;
source->send = client_source_send;
@ -518,11 +494,11 @@ get_data_device (struct wl_client *client,
MetaWaylandSeat *seat = wl_resource_get_user_data (seat_resource);
struct wl_resource *resource;
resource = wl_resource_create (client, &wl_data_device_interface,
MIN (META_WL_DATA_DEVICE_VERSION,
wl_resource_get_version (manager_resource)), id);
wl_resource_set_implementation (resource, &data_device_interface, seat, unbind_data_device);
wl_list_insert (&seat->data_device_resource_list, wl_resource_get_link (resource));
resource = wl_client_add_object (client, &wl_data_device_interface,
&data_device_interface, id, seat);
wl_list_insert (&seat->drag_resource_list, wl_resource_get_link (resource));
wl_resource_set_destructor (resource, unbind_data_device);
}
static const struct wl_data_device_manager_interface manager_interface = {
@ -534,11 +510,8 @@ static void
bind_manager (struct wl_client *client,
void *data, guint32 version, guint32 id)
{
struct wl_resource *resource;
resource = wl_resource_create (client, &wl_data_device_manager_interface,
MIN (version, META_WL_DATA_DEVICE_MANAGER_VERSION), id);
wl_resource_set_implementation (resource, &manager_interface, NULL, NULL);
wl_client_add_object (client, &wl_data_device_manager_interface,
&manager_interface, id, NULL);
}
void
@ -551,7 +524,7 @@ meta_wayland_data_device_set_keyboard_focus (MetaWaylandSeat *seat)
if (!focus)
return;
data_device = wl_resource_find_for_client (&seat->data_device_resource_list,
data_device = wl_resource_find_for_client (&seat->drag_resource_list,
wl_resource_get_client (focus));
if (!data_device)
return;
@ -567,10 +540,9 @@ meta_wayland_data_device_set_keyboard_focus (MetaWaylandSeat *seat)
int
meta_wayland_data_device_manager_init (struct wl_display *display)
{
if (wl_global_create (display,
&wl_data_device_manager_interface,
META_WL_DATA_DEVICE_MANAGER_VERSION,
NULL, bind_manager) == NULL)
if (wl_display_add_global (display,
&wl_data_device_manager_interface,
NULL, bind_manager) == NULL)
return -1;
return 0;

View File

@ -343,6 +343,7 @@ meta_wayland_keyboard_init (MetaWaylandKeyboard *keyboard,
keyboard->default_grab.interface = &default_keyboard_grab_interface;
keyboard->default_grab.keyboard = keyboard;
keyboard->grab = &keyboard->default_grab;
wl_signal_init (&keyboard->focus_signal);
keyboard->display = display;
@ -412,6 +413,83 @@ set_modifiers (MetaWaylandKeyboard *keyboard,
new_state.group);
}
#define N_BUTTONS 5
static gboolean
process_keybinding (MetaWaylandKeyboard *keyboard,
const ClutterEvent *event)
{
MetaWaylandSurface *surface;
XGenericEventCookie generic_event;
XIDeviceEvent device_event;
unsigned char button_mask[(N_BUTTONS + 7) / 8] = { 0 };
MetaDisplay *display = meta_get_display ();
ClutterModifierType button_state;
int i;
if (!display) /* not initialized yet */
return FALSE;
generic_event.type = GenericEvent;
generic_event.serial = 0;
generic_event.send_event = False;
generic_event.display = display->xdisplay;
generic_event.extension = display->xinput_opcode;
if (clutter_event_type (event) == CLUTTER_KEY_PRESS)
generic_event.evtype = XI_KeyPress;
else
generic_event.evtype = XI_KeyRelease;
/* Mutter assumes the data for the event is already retrieved by GDK
* so we don't need the cookie */
generic_event.cookie = 0;
generic_event.data = &device_event;
memcpy (&device_event, &generic_event, sizeof (XGenericEvent));
/* Can't use clutter_event_get_time() here, because evdev timestamps
have nothing to do with X timestamps */
device_event.time = meta_display_get_current_time_roundtrip (display);
device_event.deviceid = clutter_event_get_device_id (event);
device_event.sourceid = 0; /* not used, not sure what this should be */
device_event.detail = clutter_event_get_key_code (event);
device_event.root = DefaultRootWindow (display->xdisplay);
device_event.flags = 0;
surface = keyboard->focus;
if (surface)
device_event.event = surface->window ? surface->window->xwindow : device_event.root;
else
device_event.event = device_event.root;
/* Mutter doesn't really know about the sub-windows. This assumes it
doesn't care either */
device_event.child = device_event.event;
device_event.root_x = 0;
device_event.root_y = 0;
clutter_event_get_state_full (event,
&button_state,
(ClutterModifierType*)&device_event.mods.base,
(ClutterModifierType*)&device_event.mods.latched,
(ClutterModifierType*)&device_event.mods.locked,
(ClutterModifierType*)&device_event.mods.effective);
device_event.mods.effective &= ~button_state;
memset (&device_event.group, 0, sizeof (device_event.group));
device_event.group.effective = (device_event.mods.effective >> 13) & 0x3;
for (i = 0; i < N_BUTTONS; i++)
if ((button_state & (CLUTTER_BUTTON1_MASK << i)))
XISetMask (button_mask, i + 1);
device_event.buttons.mask_len = N_BUTTONS + 1;
device_event.buttons.mask = button_mask;
device_event.valuators.mask_len = 0;
device_event.valuators.mask = NULL;
device_event.valuators.values = NULL;
return meta_display_process_key_event (display, surface ? surface->window : NULL, &device_event);
}
static gboolean
update_pressed_keys (MetaWaylandKeyboard *keyboard,
uint32_t evdev_code,
@ -460,7 +538,6 @@ update_pressed_keys (MetaWaylandKeyboard *keyboard,
return FALSE;
}
gboolean
meta_wayland_keyboard_handle_event (MetaWaylandKeyboard *keyboard,
const ClutterKeyEvent *event)
@ -484,6 +561,12 @@ meta_wayland_keyboard_handle_event (MetaWaylandKeyboard *keyboard,
autorepeat ? " (autorepeat)" : "",
xkb_keycode);
/* Give a chance to process keybindings */
if (process_keybinding (keyboard, (ClutterEvent*) event))
return TRUE;
meta_verbose ("Keybindings ignored the previous event\n");
if (autorepeat)
return FALSE;
@ -562,6 +645,7 @@ meta_wayland_keyboard_set_focus (MetaWaylandKeyboard *keyboard,
keyboard->focus_resource = resource;
keyboard->focus = surface;
wl_signal_emit (&keyboard->focus_signal, keyboard);
}
void

View File

@ -96,6 +96,7 @@ struct _MetaWaylandKeyboard
struct wl_resource *focus_resource;
struct wl_listener focus_listener;
uint32_t focus_serial;
struct wl_signal focus_signal;
MetaWaylandKeyboardGrab *grab;
MetaWaylandKeyboardGrab default_grab;

View File

@ -45,15 +45,12 @@
#include <clutter/clutter.h>
#include <clutter/evdev/clutter-evdev.h>
#include <linux/input.h>
#include "meta-wayland-pointer.h"
#include "meta-wayland-private.h"
#include <string.h>
static void meta_wayland_pointer_end_popup_grab (MetaWaylandPointer *pointer);
static MetaWaylandSeat *
meta_wayland_pointer_get_seat (MetaWaylandPointer *pointer)
{
@ -74,79 +71,50 @@ lose_pointer_focus (struct wl_listener *listener, void *data)
static void
default_grab_focus (MetaWaylandPointerGrab *grab,
MetaWaylandSurface *surface,
const ClutterEvent *event)
MetaWaylandSurface *surface,
wl_fixed_t x,
wl_fixed_t y)
{
MetaWaylandPointer *pointer = grab->pointer;
if (pointer->button_count > 0)
return;
meta_wayland_pointer_set_focus (pointer, surface);
meta_wayland_pointer_set_focus (pointer, surface, x, y);
}
static void
default_grab_motion (MetaWaylandPointerGrab *grab,
const ClutterEvent *event)
uint32_t time, wl_fixed_t x, wl_fixed_t y)
{
struct wl_resource *resource;
resource = grab->pointer->focus_resource;
if (resource)
{
wl_fixed_t sx, sy;
meta_wayland_pointer_get_relative_coordinates (grab->pointer,
grab->pointer->focus,
&sx, &sy);
wl_pointer_send_motion (resource, clutter_event_get_time (event), sx, sy);
}
wl_pointer_send_motion (resource, time, x, y);
}
static void
default_grab_button (MetaWaylandPointerGrab *grab,
const ClutterEvent *event)
uint32_t time, uint32_t button, uint32_t state_w)
{
MetaWaylandPointer *pointer = grab->pointer;
struct wl_resource *resource;
ClutterEventType event_type;
event_type = clutter_event_type (event);
uint32_t serial;
enum wl_pointer_button_state state = state_w;
resource = pointer->focus_resource;
if (resource)
{
struct wl_client *client = wl_resource_get_client (resource);
struct wl_display *display = wl_client_get_display (client);
uint32_t button;
uint32_t serial;
button = clutter_event_get_button (event);
switch (button)
{
/* The evdev input right and middle button numbers are swapped
relative to how Clutter numbers them */
case 2:
button = BTN_MIDDLE;
break;
case 3:
button = BTN_RIGHT;
break;
default:
button = button + BTN_LEFT - 1;
break;
}
serial = wl_display_next_serial (display);
wl_pointer_send_button (resource, serial,
clutter_event_get_time (event), button,
event_type == CLUTTER_BUTTON_PRESS ? 1 : 0);
wl_pointer_send_button (resource, serial, time, button, state_w);
}
if (pointer->button_count == 0 && event_type == CLUTTER_BUTTON_RELEASE)
meta_wayland_pointer_set_focus (pointer, pointer->current);
if (pointer->button_count == 0 && state == WL_POINTER_BUTTON_STATE_RELEASED)
meta_wayland_pointer_set_focus (pointer, pointer->current,
pointer->current_x, pointer->current_y);
}
static const MetaWaylandPointerGrabInterface default_pointer_grab_interface = {
@ -234,7 +202,6 @@ constrain_all_screen_monitors (ClutterInputDevice *device,
static void
pointer_constrain_callback (ClutterInputDevice *device,
guint32 time,
float *new_x,
float *new_y,
gpointer user_data)
@ -270,6 +237,7 @@ meta_wayland_pointer_init (MetaWaylandPointer *pointer,
pointer->default_grab.interface = &default_pointer_grab_interface;
pointer->default_grab.pointer = pointer;
pointer->grab = &pointer->default_grab;
wl_signal_init (&pointer->focus_signal);
manager = clutter_device_manager_get_default ();
device = clutter_device_manager_get_core_device (manager, CLUTTER_POINTER_DEVICE);
@ -310,7 +278,8 @@ find_resource_for_surface (struct wl_list *list, MetaWaylandSurface *surface)
void
meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
MetaWaylandSurface *surface)
MetaWaylandSurface *surface,
wl_fixed_t sx, wl_fixed_t sy)
{
MetaWaylandSeat *seat = meta_wayland_pointer_get_seat (pointer);
MetaWaylandKeyboard *kbd = &seat->keyboard;
@ -333,10 +302,7 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
{
struct wl_client *client = wl_resource_get_client (resource);
struct wl_display *display = wl_client_get_display (client);
wl_fixed_t sx, sy;
serial = wl_display_next_serial (display);
if (kbd)
{
kr = find_resource_for_surface (&kbd->resource_list, surface);
@ -350,13 +316,6 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
kbd->modifier_state.group);
}
}
meta_wayland_pointer_get_relative_coordinates (pointer, surface, &sx, &sy);
meta_window_handle_enter (surface->window,
/* XXX -- can we reliably get a timestamp for setting focus? */
clutter_get_current_event_time (),
wl_fixed_to_int (pointer->x),
wl_fixed_to_int (pointer->y));
wl_pointer_send_enter (resource, serial, surface->resource, sx, sy);
wl_resource_add_destroy_listener (resource, &pointer->focus_listener);
pointer->focus_serial = serial;
@ -364,6 +323,8 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
pointer->focus_resource = resource;
pointer->focus = surface;
pointer->default_grab.focus = surface;
wl_signal_emit (&pointer->focus_signal, pointer);
}
void
@ -377,7 +338,8 @@ meta_wayland_pointer_start_grab (MetaWaylandPointer *pointer,
grab->pointer = pointer;
if (pointer->current)
interface->focus (pointer->grab, pointer->current, NULL);
interface->focus (pointer->grab, pointer->current,
pointer->current_x, pointer->current_y);
}
void
@ -387,25 +349,57 @@ meta_wayland_pointer_end_grab (MetaWaylandPointer *pointer)
pointer->grab = &pointer->default_grab;
interface = pointer->grab->interface;
interface->focus (pointer->grab, pointer->current, NULL);
interface->focus (pointer->grab, pointer->current,
pointer->current_x, pointer->current_y);
}
static void
current_surface_destroy (struct wl_listener *listener, void *data)
{
MetaWaylandPointer *pointer =
wl_container_of (listener, pointer, current_listener);
pointer->current = NULL;
}
void
meta_wayland_pointer_set_current (MetaWaylandPointer *pointer,
MetaWaylandSurface *surface)
{
if (pointer->current)
wl_list_remove (&pointer->current_listener.link);
pointer->current = surface;
if (!surface)
return;
wl_resource_add_destroy_listener (surface->resource,
&pointer->current_listener);
pointer->current_listener.notify = current_surface_destroy;
}
static void
modal_focus (MetaWaylandPointerGrab *grab,
MetaWaylandSurface *surface,
const ClutterEvent *event)
wl_fixed_t x,
wl_fixed_t y)
{
}
static void
modal_motion (MetaWaylandPointerGrab *grab,
const ClutterEvent *event)
uint32_t time,
wl_fixed_t x,
wl_fixed_t y)
{
}
static void
modal_button (MetaWaylandPointerGrab *grab,
const ClutterEvent *event)
uint32_t time,
uint32_t button,
uint32_t state)
{
}
@ -423,7 +417,9 @@ meta_wayland_pointer_begin_modal (MetaWaylandPointer *pointer)
if (pointer->grab != &pointer->default_grab)
return FALSE;
meta_wayland_pointer_set_focus (pointer, NULL);
meta_wayland_pointer_set_focus (pointer, NULL,
wl_fixed_from_int (0),
wl_fixed_from_int (0));
grab = g_slice_new0 (MetaWaylandPointerGrab);
grab->interface = &modal_grab;
@ -459,175 +455,6 @@ meta_wayland_pointer_destroy_focus (MetaWaylandPointer *pointer)
we have button down, and the clients would be confused if the
pointer enters the surface.
*/
meta_wayland_pointer_set_focus (pointer, NULL);
meta_wayland_pointer_set_focus (pointer, NULL, 0, 0);
}
}
typedef struct {
MetaWaylandPointerGrab generic;
struct wl_client *grab_client;
struct wl_list all_popups;
} MetaWaylandPopupGrab;
typedef struct {
MetaWaylandPopupGrab *grab;
MetaWaylandSurface *surface;
struct wl_listener surface_destroy_listener;
struct wl_list link;
} MetaWaylandPopup;
static void
popup_grab_focus (MetaWaylandPointerGrab *grab,
MetaWaylandSurface *surface,
const ClutterEvent *event)
{
MetaWaylandPopupGrab *popup_grab = (MetaWaylandPopupGrab*)grab;
/* Popup grabs are in owner-events mode (ie, events for the same client
are reported as normal) */
if (wl_resource_get_client (surface->resource) == popup_grab->grab_client)
default_grab_focus (grab, surface, event);
else
meta_wayland_pointer_set_focus (grab->pointer, NULL);
}
static void
popup_grab_motion (MetaWaylandPointerGrab *grab,
const ClutterEvent *event)
{
default_grab_motion (grab, event);
}
static void
popup_grab_button (MetaWaylandPointerGrab *grab,
const ClutterEvent *event)
{
MetaWaylandPopupGrab *popup_grab = (MetaWaylandPopupGrab*)grab;
MetaWaylandPointer *pointer = grab->pointer;
if (pointer->focus_resource)
{
/* This is ensured by popup_grab_focus */
g_assert (wl_resource_get_client (pointer->focus_resource) == popup_grab->grab_client);
default_grab_button (grab, event);
}
else if (clutter_event_type (event) == CLUTTER_BUTTON_RELEASE &&
pointer->button_count == 0)
meta_wayland_pointer_end_popup_grab (grab->pointer);
}
static MetaWaylandPointerGrabInterface popup_grab_interface = {
popup_grab_focus,
popup_grab_motion,
popup_grab_button
};
static void
meta_wayland_pointer_end_popup_grab (MetaWaylandPointer *pointer)
{
MetaWaylandPopupGrab *popup_grab;
MetaWaylandPopup *popup, *tmp;
popup_grab = (MetaWaylandPopupGrab*)pointer->grab;
g_assert (popup_grab->generic.interface == &popup_grab_interface);
wl_list_for_each_safe (popup, tmp, &popup_grab->all_popups, link)
{
MetaWaylandSurfaceExtension *shell_surface = popup->surface->shell_surface;
wl_shell_surface_send_popup_done (shell_surface->resource);
wl_list_remove (&popup->surface_destroy_listener.link);
wl_list_remove (&popup->link);
g_slice_free (MetaWaylandPopup, popup);
}
meta_wayland_pointer_end_grab (pointer);
g_slice_free (MetaWaylandPopupGrab, popup_grab);
}
static void
on_popup_surface_destroy (struct wl_listener *listener,
void *data)
{
MetaWaylandPopup *popup =
wl_container_of (listener, popup, surface_destroy_listener);
MetaWaylandPopupGrab *popup_grab = popup->grab;
wl_list_remove (&popup->link);
g_slice_free (MetaWaylandPopup, popup);
if (wl_list_empty (&popup_grab->all_popups))
meta_wayland_pointer_end_popup_grab (popup_grab->generic.pointer);
}
gboolean
meta_wayland_pointer_start_popup_grab (MetaWaylandPointer *pointer,
MetaWaylandSurface *surface)
{
MetaWaylandPopupGrab *grab;
MetaWaylandPopup *popup;
if (pointer->grab != &pointer->default_grab)
{
if (pointer->grab->interface == &popup_grab_interface)
{
grab = (MetaWaylandPopupGrab*)pointer->grab;
if (wl_resource_get_client (surface->resource) != grab->grab_client)
return FALSE;
}
return FALSE;
}
if (pointer->grab == &pointer->default_grab)
{
grab = g_slice_new0 (MetaWaylandPopupGrab);
grab->generic.interface = &popup_grab_interface;
grab->generic.pointer = pointer;
grab->grab_client = wl_resource_get_client (surface->resource);
wl_list_init (&grab->all_popups);
meta_wayland_pointer_start_grab (pointer, (MetaWaylandPointerGrab*)grab);
}
else
grab = (MetaWaylandPopupGrab*)pointer->grab;
popup = g_slice_new0 (MetaWaylandPopup);
popup->grab = grab;
popup->surface = surface;
popup->surface_destroy_listener.notify = on_popup_surface_destroy;
wl_resource_add_destroy_listener (surface->resource, &popup->surface_destroy_listener);
wl_list_insert (&grab->all_popups, &popup->link);
return TRUE;
}
void
meta_wayland_pointer_get_relative_coordinates (MetaWaylandPointer *pointer,
MetaWaylandSurface *surface,
wl_fixed_t *sx,
wl_fixed_t *sy)
{
float xf = 0.0f, yf = 0.0f;
if (surface->window)
{
ClutterActor *actor =
CLUTTER_ACTOR (meta_window_get_compositor_private (surface->window));
if (actor)
clutter_actor_transform_stage_point (actor,
wl_fixed_to_double (pointer->x),
wl_fixed_to_double (pointer->y),
&xf, &yf);
}
*sx = wl_fixed_from_double (xf);
*sy = wl_fixed_from_double (yf);
}

View File

@ -28,19 +28,20 @@
struct _MetaWaylandPointerGrabInterface
{
void (*focus) (MetaWaylandPointerGrab *grab,
MetaWaylandSurface *surface,
const ClutterEvent *event);
void (*motion) (MetaWaylandPointerGrab *grab,
const ClutterEvent *event);
void (*button) (MetaWaylandPointerGrab *grab,
const ClutterEvent *event);
void (*focus) (MetaWaylandPointerGrab * grab,
MetaWaylandSurface * surface, wl_fixed_t x, wl_fixed_t y);
void (*motion) (MetaWaylandPointerGrab * grab,
uint32_t time, wl_fixed_t x, wl_fixed_t y);
void (*button) (MetaWaylandPointerGrab * grab,
uint32_t time, uint32_t button, uint32_t state);
};
struct _MetaWaylandPointerGrab
{
const MetaWaylandPointerGrabInterface *interface;
MetaWaylandPointer *pointer;
MetaWaylandSurface *focus;
wl_fixed_t x, y;
};
struct _MetaWaylandPointer
@ -50,18 +51,19 @@ struct _MetaWaylandPointer
struct wl_resource *focus_resource;
struct wl_listener focus_listener;
guint32 focus_serial;
guint32 click_serial;
struct wl_signal focus_signal;
MetaWaylandPointerGrab *grab;
MetaWaylandPointerGrab default_grab;
wl_fixed_t grab_x, grab_y;
wl_fixed_t focus_x, focus_y;
guint32 grab_button;
guint32 grab_serial;
guint32 grab_time;
wl_fixed_t x, y; /* TODO: remove, use ClutterInputDevice instead */
MetaWaylandSurface *current;
struct wl_listener current_listener;
wl_fixed_t current_x, current_y;
guint32 button_count;
};
@ -75,7 +77,10 @@ meta_wayland_pointer_release (MetaWaylandPointer *pointer);
void
meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
MetaWaylandSurface *surface);
MetaWaylandSurface *surface,
wl_fixed_t sx,
wl_fixed_t sy);
void
meta_wayland_pointer_destroy_focus (MetaWaylandPointer *pointer);
@ -91,14 +96,8 @@ meta_wayland_pointer_begin_modal (MetaWaylandPointer *pointer);
void
meta_wayland_pointer_end_modal (MetaWaylandPointer *pointer);
gboolean
meta_wayland_pointer_start_popup_grab (MetaWaylandPointer *pointer,
MetaWaylandSurface *popup);
void
meta_wayland_pointer_get_relative_coordinates (MetaWaylandPointer *pointer,
MetaWaylandSurface *surface,
wl_fixed_t *x,
wl_fixed_t *y);
meta_wayland_pointer_set_current (MetaWaylandPointer *pointer,
MetaWaylandSurface *surface);
#endif /* __META_WAYLAND_POINTER_H__ */

View File

@ -32,7 +32,6 @@
#include <meta/meta-cursor-tracker.h>
#include "meta-wayland-types.h"
#include "meta-wayland-versions.h"
#include "meta-wayland-surface.h"
#include "meta-wayland-seat.h"
@ -62,7 +61,6 @@ typedef struct
struct _MetaWaylandCompositor
{
struct wl_display *wayland_display;
char *display_name;
struct wl_event_loop *wayland_loop;
GMainLoop *init_loop;
ClutterActor *stage;
@ -83,6 +81,14 @@ struct _MetaWaylandCompositor
int drm_fd;
MetaWaylandSeat *seat;
/* This surface is only used to keep drag of the implicit grab when
synthesizing XEvents for Mutter */
MetaWaylandSurface *implicit_grab_surface;
/* Button that was pressed to initiate an implicit grab. The
implicit grab will only be released when this button is
released */
guint32 implicit_grab_button;
};
void meta_wayland_init (void);
@ -96,8 +102,6 @@ void meta_wayland_compositor_repick (MetaWaylandComp
void meta_wayland_compositor_set_input_focus (MetaWaylandCompositor *compositor,
MetaWindow *window);
gboolean meta_wayland_compositor_handle_event (MetaWaylandCompositor *compositor,
const ClutterEvent *event);
MetaLauncher *meta_wayland_compositor_get_launcher (MetaWaylandCompositor *compositor);
gboolean meta_wayland_compositor_is_native (MetaWaylandCompositor *compositor);

View File

@ -47,12 +47,37 @@ unbind_resource (struct wl_resource *resource)
wl_list_remove (wl_resource_get_link (resource));
}
static void
transform_stage_point_fixed (MetaWaylandSurface *surface,
wl_fixed_t x,
wl_fixed_t y,
wl_fixed_t *sx,
wl_fixed_t *sy)
{
float xf = 0.0f, yf = 0.0f;
if (surface->window)
{
ClutterActor *actor =
CLUTTER_ACTOR (meta_window_get_compositor_private (surface->window));
if (actor)
clutter_actor_transform_stage_point (actor,
wl_fixed_to_double (x),
wl_fixed_to_double (y),
&xf, &yf);
}
*sx = wl_fixed_from_double (xf);
*sy = wl_fixed_from_double (yf);
}
static void
pointer_unmap_sprite (MetaWaylandSeat *seat)
{
if (seat->cursor_tracker)
{
meta_cursor_tracker_set_buffer (seat->cursor_tracker,
meta_cursor_tracker_set_sprite (seat->cursor_tracker,
NULL, 0, 0);
if (seat->current_stage)
@ -70,20 +95,29 @@ pointer_unmap_sprite (MetaWaylandSeat *seat)
void
meta_wayland_seat_update_sprite (MetaWaylandSeat *seat)
{
ClutterBackend *backend;
CoglContext *context;
struct wl_resource *buffer;
CoglTexture2D *texture;
if (seat->cursor_tracker == NULL)
return;
backend = clutter_get_default_backend ();
context = clutter_backend_get_cogl_context (backend);
buffer = seat->sprite->buffer_ref.buffer->resource;
meta_cursor_tracker_set_buffer (seat->cursor_tracker,
buffer,
texture = cogl_wayland_texture_2d_new_from_buffer (context, buffer, NULL);
meta_cursor_tracker_set_sprite (seat->cursor_tracker,
texture,
seat->hotspot_x,
seat->hotspot_y);
if (seat->current_stage)
meta_cursor_tracker_queue_redraw (seat->cursor_tracker,
CLUTTER_ACTOR (seat->current_stage));
cogl_object_unref (texture);
}
static void
@ -141,14 +175,26 @@ seat_get_pointer (struct wl_client *client,
MetaWaylandSeat *seat = wl_resource_get_user_data (resource);
struct wl_resource *cr;
cr = wl_resource_create (client, &wl_pointer_interface,
MIN (META_WL_POINTER_VERSION, wl_resource_get_version (resource)), id);
wl_resource_set_implementation (cr, &pointer_interface, seat, unbind_resource);
cr = wl_client_add_object (client, &wl_pointer_interface,
&pointer_interface, id, seat);
wl_list_insert (&seat->pointer.resource_list, wl_resource_get_link (cr));
wl_resource_set_destructor (cr, unbind_resource);
if (seat->pointer.focus &&
wl_resource_get_client (seat->pointer.focus->resource) == client)
meta_wayland_pointer_set_focus (&seat->pointer, seat->pointer.focus);
{
MetaWaylandSurface *surface;
wl_fixed_t sx, sy;
surface = (MetaWaylandSurface *) seat->pointer.focus;
transform_stage_point_fixed (surface,
seat->pointer.x,
seat->pointer.y,
&sx, &sy);
meta_wayland_pointer_set_focus (&seat->pointer,
seat->pointer.focus,
sx, sy);
}
}
static void
@ -159,10 +205,9 @@ seat_get_keyboard (struct wl_client *client,
MetaWaylandSeat *seat = wl_resource_get_user_data (resource);
struct wl_resource *cr;
cr = wl_resource_create (client, &wl_keyboard_interface,
MIN (META_WL_KEYBOARD_VERSION, wl_resource_get_version (resource)), id);
wl_resource_set_implementation (cr, NULL, seat, unbind_resource);
cr = wl_client_add_object (client, &wl_keyboard_interface, NULL, id, seat);
wl_list_insert (&seat->keyboard.resource_list, wl_resource_get_link (cr));
wl_resource_set_destructor (cr, unbind_resource);
wl_keyboard_send_keymap (cr,
WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,
@ -172,7 +217,8 @@ seat_get_keyboard (struct wl_client *client,
if (seat->keyboard.focus &&
wl_resource_get_client (seat->keyboard.focus->resource) == client)
{
meta_wayland_keyboard_set_focus (&seat->keyboard, seat->keyboard.focus);
meta_wayland_keyboard_set_focus (&seat->keyboard,
seat->keyboard.focus);
meta_wayland_data_device_set_keyboard_focus (seat);
}
}
@ -202,17 +248,17 @@ bind_seat (struct wl_client *client,
MetaWaylandSeat *seat = data;
struct wl_resource *resource;
resource = wl_resource_create (client, &wl_seat_interface,
MIN (META_WL_SEAT_VERSION, version), id);
wl_resource_set_implementation (resource, &seat_interface, seat, unbind_resource);
resource = wl_client_add_object (client,
&wl_seat_interface,
&seat_interface,
id,
data);
wl_list_insert (&seat->base_resource_list, wl_resource_get_link (resource));
wl_resource_set_destructor (resource, unbind_resource);
wl_seat_send_capabilities (resource,
WL_SEAT_CAPABILITY_POINTER |
WL_SEAT_CAPABILITY_KEYBOARD);
if (version >= META_WL_SEAT_HAS_NAME)
wl_seat_send_name (resource, "seat0");
}
static void
@ -230,9 +276,13 @@ meta_wayland_seat_new (struct wl_display *display,
{
MetaWaylandSeat *seat = g_new0 (MetaWaylandSeat, 1);
wl_signal_init (&seat->destroy_signal);
seat->selection_data_source = NULL;
wl_list_init (&seat->base_resource_list);
wl_list_init (&seat->data_device_resource_list);
wl_signal_init (&seat->selection_signal);
wl_list_init (&seat->drag_resource_list);
wl_signal_init (&seat->drag_icon_signal);
meta_wayland_pointer_init (&seat->pointer, is_native);
@ -247,13 +297,13 @@ meta_wayland_seat_new (struct wl_display *display,
seat->hotspot_x = 16;
seat->hotspot_y = 16;
wl_global_create (display, &wl_seat_interface, META_WL_SEAT_VERSION, seat, bind_seat);
wl_display_add_global (display, &wl_seat_interface, seat, bind_seat);
return seat;
}
static void
notify_motion (MetaWaylandSeat *seat,
notify_motion (MetaWaylandSeat *seat,
const ClutterEvent *event)
{
MetaWaylandPointer *pointer = &seat->pointer;
@ -263,42 +313,85 @@ notify_motion (MetaWaylandSeat *seat,
pointer->x = wl_fixed_from_double (x);
pointer->y = wl_fixed_from_double (y);
meta_wayland_seat_repick (seat, event);
meta_wayland_seat_repick (seat,
clutter_event_get_time (event),
clutter_event_get_source (event));
pointer->grab->interface->motion (pointer->grab, event);
pointer->grab->interface->motion (pointer->grab,
clutter_event_get_time (event),
pointer->grab->x,
pointer->grab->y);
}
static void
handle_motion_event (MetaWaylandSeat *seat,
const ClutterEvent *event)
handle_motion_event (MetaWaylandSeat *seat,
const ClutterMotionEvent *event)
{
notify_motion (seat, event);
notify_motion (seat, (const ClutterEvent *) event);
}
static void
handle_button_event (MetaWaylandSeat *seat,
const ClutterEvent *event)
handle_button_event (MetaWaylandSeat *seat,
const ClutterButtonEvent *event)
{
MetaWaylandPointer *pointer = &seat->pointer;
gboolean state = event->type == CLUTTER_BUTTON_PRESS;
uint32_t button;
notify_motion (seat, event);
notify_motion (seat, (const ClutterEvent *) event);
pointer->grab->interface->button (pointer->grab, event);
switch (event->button)
{
/* The evdev input right and middle button numbers are swapped
relative to how Clutter numbers them */
case 2:
button = BTN_MIDDLE;
break;
case 3:
button = BTN_RIGHT;
break;
default:
button = event->button + BTN_LEFT - 1;
break;
}
/* FIXME: Handle in display.c */
if (state && pointer->button_count == 1)
{
MetaWaylandSurface *surface = pointer->current;
pointer->grab_button = button;
pointer->grab_time = event->time;
pointer->grab_x = pointer->x;
pointer->grab_y = pointer->y;
if (button == BTN_LEFT &&
surface &&
surface->window &&
surface->window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND)
{
meta_window_raise (surface->window);
}
}
pointer->grab->interface->button (pointer->grab, event->time, button, state);
if (pointer->button_count == 1)
pointer->grab_serial = wl_display_get_serial (seat->display);
}
static void
handle_scroll_event (MetaWaylandSeat *seat,
const ClutterEvent *event)
handle_scroll_event (MetaWaylandSeat *seat,
const ClutterScrollEvent *event)
{
enum wl_pointer_axis axis;
wl_fixed_t value;
notify_motion (seat, event);
notify_motion (seat, (const ClutterEvent *) event);
switch (clutter_event_get_scroll_direction (event))
switch (event->direction)
{
case CLUTTER_SCROLL_UP:
axis = WL_POINTER_AXIS_VERTICAL_SCROLL;
@ -326,7 +419,7 @@ handle_scroll_event (MetaWaylandSeat *seat,
if (seat->pointer.focus_resource)
wl_pointer_send_axis (seat->pointer.focus_resource,
clutter_event_get_time (event),
event->time,
axis,
value);
}
@ -359,37 +452,26 @@ meta_wayland_seat_handle_event (MetaWaylandSeat *seat,
{
seat->pointer.button_count = count_buttons (event);
if (seat->cursor_tracker)
{
meta_cursor_tracker_update_position (seat->cursor_tracker,
wl_fixed_to_int (seat->pointer.x),
wl_fixed_to_int (seat->pointer.y));
if (seat->pointer.current == NULL)
meta_cursor_tracker_revert_root (seat->cursor_tracker);
meta_cursor_tracker_queue_redraw (seat->cursor_tracker,
CLUTTER_ACTOR (event->any.stage));
}
switch (event->type)
{
case CLUTTER_MOTION:
handle_motion_event (seat, event);
handle_motion_event (seat,
(const ClutterMotionEvent *) event);
break;
case CLUTTER_BUTTON_PRESS:
case CLUTTER_BUTTON_RELEASE:
handle_button_event (seat, event);
handle_button_event (seat,
(const ClutterButtonEvent *) event);
break;
case CLUTTER_KEY_PRESS:
case CLUTTER_KEY_RELEASE:
return meta_wayland_keyboard_handle_event (&seat->keyboard,
(const ClutterKeyEvent *) event);
(const ClutterKeyEvent *) event);
case CLUTTER_SCROLL:
handle_scroll_event (seat, event);
handle_scroll_event (seat, (const ClutterScrollEvent *) event);
break;
default:
@ -399,24 +481,34 @@ meta_wayland_seat_handle_event (MetaWaylandSeat *seat,
return FALSE;
}
static void
update_pointer_position_for_actor (MetaWaylandPointer *pointer,
ClutterActor *actor)
{
float ax, ay;
clutter_actor_transform_stage_point (actor,
wl_fixed_to_double (pointer->x),
wl_fixed_to_double (pointer->y),
&ax, &ay);
pointer->current_x = wl_fixed_from_double (ax);
pointer->current_y = wl_fixed_from_double (ay);
}
/* The actor argument can be NULL in which case a Clutter pick will be
performed to determine the right actor. An actor should only be
passed if the repick is being performed due to an event in which
case Clutter will have already performed a pick so we can avoid
redundantly doing another one */
void
meta_wayland_seat_repick (MetaWaylandSeat *seat,
const ClutterEvent *for_event)
meta_wayland_seat_repick (MetaWaylandSeat *seat,
uint32_t time,
ClutterActor *actor)
{
ClutterActor *actor = NULL;
MetaWaylandPointer *pointer = &seat->pointer;
MetaWaylandSurface *surface = NULL;
if (for_event)
{
actor = clutter_event_get_source (for_event);
}
else if (seat->current_stage)
if (actor == NULL && seat->current_stage)
{
ClutterStage *stage = CLUTTER_STAGE (seat->current_stage);
actor = clutter_stage_get_actor_at_pos (stage,
@ -435,12 +527,16 @@ meta_wayland_seat_repick (MetaWaylandSeat *seat,
MetaWindow *window =
meta_window_actor_get_meta_window (META_WINDOW_ACTOR (actor));
update_pointer_position_for_actor (pointer, actor);
surface = window->surface;
}
else if (META_IS_SHAPED_TEXTURE (actor))
{
MetaShapedTexture *shaped_texture = META_SHAPED_TEXTURE (actor);
update_pointer_position_for_actor (pointer, actor);
surface = meta_shaped_texture_get_wayland_surface (shaped_texture);
}
@ -450,8 +546,16 @@ meta_wayland_seat_repick (MetaWaylandSeat *seat,
const MetaWaylandPointerGrabInterface *interface =
pointer->grab->interface;
interface->focus (pointer->grab,
surface, for_event);
surface,
pointer->current_x, pointer->current_y);
}
if (pointer->grab->focus)
transform_stage_point_fixed (pointer->grab->focus,
pointer->x,
pointer->y,
&pointer->grab->x,
&pointer->grab->y);
}
void
@ -462,5 +566,7 @@ meta_wayland_seat_free (MetaWaylandSeat *seat)
meta_wayland_pointer_release (&seat->pointer);
meta_wayland_keyboard_release (&seat->keyboard);
wl_signal_emit (&seat->destroy_signal, seat);
g_slice_free (MetaWaylandSeat, seat);
}

View File

@ -54,12 +54,25 @@ struct _MetaWaylandDataSource
struct _MetaWaylandSeat
{
struct wl_list base_resource_list;
struct wl_signal destroy_signal;
uint32_t selection_serial;
MetaWaylandDataSource *selection_data_source;
struct wl_listener selection_data_source_listener;
struct wl_signal selection_signal;
struct wl_list drag_resource_list;
struct wl_client *drag_client;
MetaWaylandDataSource *drag_data_source;
struct wl_listener drag_data_source_listener;
MetaWaylandSurface *drag_focus;
struct wl_resource *drag_focus_resource;
struct wl_listener drag_focus_listener;
MetaWaylandPointerGrab drag_grab;
MetaWaylandSurface *drag_surface;
struct wl_listener drag_icon_listener;
struct wl_signal drag_icon_signal;
struct wl_list data_device_resource_list;
MetaWaylandPointer pointer;
MetaWaylandKeyboard keyboard;
@ -82,8 +95,9 @@ meta_wayland_seat_handle_event (MetaWaylandSeat *seat,
const ClutterEvent *event);
void
meta_wayland_seat_repick (MetaWaylandSeat *seat,
const ClutterEvent *for_event);
meta_wayland_seat_repick (MetaWaylandSeat *seat,
uint32_t time,
ClutterActor *actor);
void
meta_wayland_seat_update_sprite (MetaWaylandSeat *seat);

View File

@ -407,8 +407,12 @@ meta_wayland_surface_free (MetaWaylandSurface *surface)
meta_wayland_pointer_destroy_focus (&compositor->seat->pointer);
g_assert (surface != compositor->seat->pointer.focus);
g_assert (surface != compositor->seat->pointer.grab->focus);
}
if (compositor->implicit_grab_surface == surface)
compositor->implicit_grab_surface = compositor->seat->pointer.current;
if (surface->resource)
wl_resource_set_user_data (surface->resource, NULL);
g_slice_free (MetaWaylandSurface, surface);
@ -489,118 +493,58 @@ shell_surface_pong (struct wl_client *client,
{
}
typedef struct
typedef struct _MetaWaylandGrab
{
MetaWaylandPointerGrab generic;
MetaWaylandSurface *surface;
struct wl_listener surface_destroy_listener;
wl_fixed_t dx, dy;
MetaWaylandPointerGrab grab;
MetaWaylandSurfaceExtension *shell_surface;
struct wl_listener shell_surface_destroy_listener;
MetaWaylandPointer *pointer;
} MetaWaylandGrab;
typedef struct _MetaWaylandMoveGrab
{
MetaWaylandGrab base;
wl_fixed_t dx, dy;
} MetaWaylandMoveGrab;
static void
end_move_grab (MetaWaylandMoveGrab *move_grab)
destroy_shell_surface_grab_listener (struct wl_listener *listener,
void *data)
{
if (move_grab->surface)
{
move_grab->surface = NULL;
wl_list_remove (&move_grab->surface_destroy_listener.link);
}
MetaWaylandGrab *grab = wl_container_of (listener, grab,
shell_surface_destroy_listener);
grab->shell_surface = NULL;
meta_wayland_pointer_end_grab (move_grab->generic.pointer);
g_slice_free (MetaWaylandMoveGrab, move_grab);
/* XXX: Could we perhaps just stop the grab here so we don't have
* to consider grab->shell_surface becoming NULL in grab interface
* callbacks? */
}
static void
move_grab_lose_surface (struct wl_listener *listener, void *data)
typedef enum _GrabCursor
{
MetaWaylandMoveGrab *move_grab =
wl_container_of (listener, move_grab, surface_destroy_listener);
move_grab->surface = NULL;
end_move_grab (move_grab);
}
GRAB_CURSOR_MOVE,
} GrabCursor;
static void
move_grab_focus (MetaWaylandPointerGrab *grab,
MetaWaylandSurface *surface,
const ClutterEvent *event)
grab_pointer (MetaWaylandGrab *grab,
const MetaWaylandPointerGrabInterface *interface,
MetaWaylandSurfaceExtension *shell_surface,
MetaWaylandPointer *pointer,
GrabCursor cursor)
{
}
/* TODO: popup_grab_end (pointer); */
static void
move_grab_motion (MetaWaylandPointerGrab *grab,
const ClutterEvent *event)
{
MetaWaylandMoveGrab *move_grab = (MetaWaylandMoveGrab *)grab;
MetaWaylandPointer *pointer = grab->pointer;
grab->grab.interface = interface;
grab->shell_surface = shell_surface;
grab->shell_surface_destroy_listener.notify =
destroy_shell_surface_grab_listener;
wl_resource_add_destroy_listener (shell_surface->resource,
&grab->shell_surface_destroy_listener);
meta_window_move (move_grab->surface->window,
TRUE,
wl_fixed_to_int (pointer->x + move_grab->dx),
wl_fixed_to_int (pointer->y + move_grab->dy));
}
grab->pointer = pointer;
grab->grab.focus = shell_surface->surface;
static void
move_grab_button (MetaWaylandPointerGrab *grab,
const ClutterEvent *event)
{
MetaWaylandMoveGrab *move_grab = (MetaWaylandMoveGrab *)grab;
MetaWaylandPointer *pointer = grab->pointer;
if (pointer->button_count == 0 &&
clutter_event_type (event) == CLUTTER_BUTTON_RELEASE)
end_move_grab (move_grab);
}
static const MetaWaylandPointerGrabInterface move_grab_interface = {
move_grab_focus,
move_grab_motion,
move_grab_button,
};
static void
shell_surface_move (struct wl_client *client,
struct wl_resource *resource,
struct wl_resource *seat_resource,
guint32 serial)
{
MetaWaylandSeat *seat = wl_resource_get_user_data (seat_resource);
MetaWaylandSurfaceExtension *shell_surface = wl_resource_get_user_data (resource);
MetaWindow *window;
MetaWaylandMoveGrab *move_grab;
MetaRectangle rect;
if (seat->pointer.button_count == 0 ||
seat->pointer.grab_serial != serial ||
seat->pointer.focus != shell_surface->surface)
return;
window = shell_surface->surface->window;
if (!window)
return;
/* small hack, this should be handled by window->shaken_loose when we
move everything to display.c */
if (window->fullscreen)
meta_window_unmake_fullscreen (window);
move_grab = g_slice_new (MetaWaylandMoveGrab);
meta_window_get_input_rect (shell_surface->surface->window,
&rect);
move_grab->generic.interface = &move_grab_interface;
move_grab->generic.pointer = &seat->pointer;
move_grab->surface = shell_surface->surface;
move_grab->surface_destroy_listener.notify = move_grab_lose_surface;
wl_resource_add_destroy_listener (shell_surface->surface->resource,
&move_grab->surface_destroy_listener);
move_grab->dx = wl_fixed_from_int (rect.x) - seat->pointer.grab_x;
move_grab->dy = wl_fixed_from_int (rect.y) - seat->pointer.grab_y;
meta_wayland_pointer_start_grab (&seat->pointer, (MetaWaylandPointerGrab*)move_grab);
meta_wayland_pointer_start_grab (pointer, &grab->grab);
/* TODO: send_grab_cursor (cursor); */
@ -613,7 +557,112 @@ shell_surface_move (struct wl_client *client,
* XXX: For now we just focus the surface directly associated with
* the grab.
*/
meta_wayland_pointer_set_focus (&seat->pointer, shell_surface->surface);
meta_wayland_pointer_set_focus (pointer,
grab->shell_surface->surface,
wl_fixed_from_int (0),
wl_fixed_from_int (0));
}
static void
release_pointer (MetaWaylandGrab *grab)
{
if (grab->shell_surface)
wl_list_remove (&grab->shell_surface_destroy_listener.link);
meta_wayland_pointer_end_grab (grab->pointer);
}
static void
noop_grab_focus (MetaWaylandPointerGrab *grab,
MetaWaylandSurface *surface,
wl_fixed_t x,
wl_fixed_t y)
{
grab->focus = NULL;
}
static void
move_grab_motion (MetaWaylandPointerGrab *grab,
uint32_t time,
wl_fixed_t x,
wl_fixed_t y)
{
MetaWaylandMoveGrab *move = (MetaWaylandMoveGrab *)grab;
MetaWaylandPointer *pointer = move->base.pointer;
MetaWaylandSurfaceExtension *shell_surface = move->base.shell_surface;
if (!shell_surface)
return;
meta_window_move (shell_surface->surface->window,
TRUE,
wl_fixed_to_int (pointer->x + move->dx),
wl_fixed_to_int (pointer->y + move->dy));
}
static void
move_grab_button (MetaWaylandPointerGrab *pointer_grab,
uint32_t time,
uint32_t button,
uint32_t state_w)
{
MetaWaylandGrab *grab =
wl_container_of (pointer_grab, grab, grab);
MetaWaylandMoveGrab *move = (MetaWaylandMoveGrab *)grab;
MetaWaylandPointer *pointer = grab->pointer;
enum wl_pointer_button_state state = state_w;
if (pointer->button_count == 0 && state == WL_POINTER_BUTTON_STATE_RELEASED)
{
release_pointer (grab);
g_slice_free (MetaWaylandMoveGrab, move);
}
}
static const MetaWaylandPointerGrabInterface move_grab_interface = {
noop_grab_focus,
move_grab_motion,
move_grab_button,
};
static void
start_surface_move (MetaWaylandSurfaceExtension *shell_surface,
MetaWaylandSeat *seat)
{
MetaWaylandMoveGrab *move;
MetaRectangle rect;
g_return_if_fail (shell_surface != NULL);
/* TODO: check if the surface is fullscreen when we support fullscreen */
move = g_slice_new (MetaWaylandMoveGrab);
meta_window_get_input_rect (shell_surface->surface->window,
&rect);
move->dx = wl_fixed_from_int (rect.x) - seat->pointer.grab_x;
move->dy = wl_fixed_from_int (rect.y) - seat->pointer.grab_y;
grab_pointer (&move->base, &move_grab_interface, shell_surface,
&seat->pointer, GRAB_CURSOR_MOVE);
}
static void
shell_surface_move (struct wl_client *client,
struct wl_resource *resource,
struct wl_resource *seat_resource,
guint32 serial)
{
MetaWaylandSeat *seat = wl_resource_get_user_data (seat_resource);
MetaWaylandSurfaceExtension *shell_surface = wl_resource_get_user_data (resource);
if (seat->pointer.button_count == 0 ||
seat->pointer.grab_serial != serial ||
seat->pointer.focus != shell_surface->surface)
return;
start_surface_move (shell_surface, seat);
}
static void
@ -709,38 +758,13 @@ shell_surface_set_fullscreen (struct wl_client *client,
static void
shell_surface_set_popup (struct wl_client *client,
struct wl_resource *resource,
struct wl_resource *seat_resource,
struct wl_resource *seat,
guint32 serial,
struct wl_resource *parent,
gint32 x,
gint32 y,
guint32 flags)
{
MetaWaylandSurfaceExtension *shell_surface = wl_resource_get_user_data (resource);
MetaWaylandSurface *surface = shell_surface->surface;
MetaWaylandCompositor *compositor = surface->compositor;
MetaWaylandSeat *seat = compositor->seat;
if (serial < seat->pointer.click_serial)
{
/* stale request */
return;
}
if (surface->window)
{
meta_warning ("Client set_popup() on an already visible window, this is not supported\n");
}
else
{
ensure_initial_state (surface);
surface->initial_state->initial_type = META_WAYLAND_SURFACE_POPUP;
surface->initial_state->transient_for = parent;
surface->initial_state->x = x;
surface->initial_state->y = y;
}
}
static void
@ -847,7 +871,6 @@ static MetaWaylandSurfaceExtension *
create_surface_extension (struct wl_client *client,
struct wl_resource *master_resource,
guint32 id,
int max_version,
MetaWaylandSurface *surface,
const struct wl_interface *interface,
const void *implementation)
@ -857,7 +880,7 @@ create_surface_extension (struct wl_client *client,
extension = g_new0 (MetaWaylandSurfaceExtension, 1);
extension->resource = wl_resource_create (client, interface,
MIN (max_version, wl_resource_get_version (master_resource)), id);
wl_resource_get_version (master_resource), id);
wl_resource_set_implementation (extension->resource, implementation,
extension, destroy_surface_extension);
@ -885,10 +908,9 @@ get_shell_surface (struct wl_client *client,
return;
}
surface->shell_surface = create_surface_extension (client, resource, id,
META_WL_SHELL_SURFACE_VERSION, surface,
&wl_shell_surface_interface,
&meta_wayland_shell_surface_interface);
surface->shell_surface = create_surface_extension (client, resource, id, surface,
&wl_shell_surface_interface,
&meta_wayland_shell_surface_interface);
}
static const struct wl_shell_interface meta_wayland_shell_interface =
@ -904,8 +926,7 @@ bind_shell (struct wl_client *client,
{
struct wl_resource *resource;
resource = wl_resource_create (client, &wl_shell_interface,
MIN (META_WL_SHELL_VERSION, version), id);
resource = wl_resource_create (client, &wl_shell_interface, version, id);
wl_resource_set_implementation (resource, &meta_wayland_shell_interface, data, NULL);
}
@ -988,10 +1009,9 @@ get_gtk_surface (struct wl_client *client,
return;
}
surface->gtk_surface = create_surface_extension (client, resource, id,
META_GTK_SURFACE_VERSION, surface,
&gtk_surface_interface,
&meta_wayland_gtk_surface_interface);
surface->gtk_surface = create_surface_extension (client, resource, id, surface,
&gtk_surface_interface,
&meta_wayland_gtk_surface_interface);
}
static const struct gtk_shell_interface meta_wayland_gtk_shell_interface =
@ -1007,8 +1027,7 @@ bind_gtk_shell (struct wl_client *client,
{
struct wl_resource *resource;
resource = wl_resource_create (client, &gtk_shell_interface,
MIN (META_GTK_SHELL_VERSION, version), id);
resource = wl_resource_create (client, &gtk_shell_interface, version, id);
wl_resource_set_implementation (resource, &meta_wayland_gtk_shell_interface, data, NULL);
/* FIXME: ask the plugin */
@ -1019,14 +1038,12 @@ void
meta_wayland_init_shell (MetaWaylandCompositor *compositor)
{
if (wl_global_create (compositor->wayland_display,
&wl_shell_interface,
META_WL_SHELL_VERSION,
&wl_shell_interface, 1,
compositor, bind_shell) == NULL)
g_error ("Failed to register a global shell object");
if (wl_global_create (compositor->wayland_display,
&gtk_shell_interface,
META_GTK_SHELL_VERSION,
&gtk_shell_interface, 1,
compositor, bind_gtk_shell) == NULL)
g_error ("Failed to register a global gtk-shell object");
}
@ -1036,14 +1053,10 @@ meta_wayland_surface_set_initial_state (MetaWaylandSurface *surface,
MetaWindow *window)
{
MetaWaylandSurfaceInitialState *initial = surface->initial_state;
MetaWaylandCompositor *compositor = surface->compositor;
MetaWaylandSeat *seat = compositor->seat;
if (initial == NULL)
return;
window->type = META_WINDOW_NORMAL;
/* Note that we poke at the bits directly here, because we're
in the middle of meta_window_new_shared() */
switch (initial->initial_type)
@ -1056,15 +1069,6 @@ meta_wayland_surface_set_initial_state (MetaWaylandSurface *surface,
case META_WAYLAND_SURFACE_MAXIMIZED:
window->maximized_horizontally = window->maximized_vertically = TRUE;
break;
case META_WAYLAND_SURFACE_POPUP:
window->override_redirect = TRUE;
window->type = META_WINDOW_DROPDOWN_MENU;
window->mapped = TRUE;
window->showing_for_first_time = FALSE;
window->placed = TRUE;
if (!meta_wayland_pointer_start_popup_grab (&seat->pointer, surface))
wl_shell_surface_send_popup_done (surface->shell_surface->resource);
break;
default:
g_assert_not_reached ();
}
@ -1072,18 +1076,8 @@ meta_wayland_surface_set_initial_state (MetaWaylandSurface *surface,
if (initial->transient_for)
{
MetaWaylandSurface *parent = wl_resource_get_user_data (initial->transient_for);
if (parent && parent->window)
{
window->transient_for = g_object_ref (parent->window);
if (initial->initial_type == META_WAYLAND_SURFACE_POPUP)
{
window->rect.x = parent->window->rect.x + initial->x;
window->rect.y = parent->window->rect.y + initial->y;
}
}
window->type = META_WINDOW_DIALOG;
if (parent)
window->transient_for = g_object_ref (parent->window);
}
if (initial->title)
@ -1100,8 +1094,6 @@ meta_wayland_surface_set_initial_state (MetaWaylandSurface *surface,
initial->gtk_application_object_path,
initial->gtk_window_object_path);
meta_window_type_changed (window);
free_initial_state (initial);
surface->initial_state = NULL;
}

View File

@ -69,15 +69,13 @@ typedef struct
typedef enum {
META_WAYLAND_SURFACE_TOPLEVEL = 0,
META_WAYLAND_SURFACE_MAXIMIZED,
META_WAYLAND_SURFACE_FULLSCREEN,
META_WAYLAND_SURFACE_POPUP,
META_WAYLAND_SURFACE_FULLSCREEN
} MetaWaylandSurfaceType;
typedef struct
{
MetaWaylandSurfaceType initial_type;
struct wl_resource *transient_for;
int x, y;
char *title;
char *wm_class;

View File

@ -1,62 +0,0 @@
/*
* Wayland Support
*
* Copyright (C) 2012,2013 Intel Corporation
* 2013 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef META_WAYLAND_VERSIONS_H
#define META_WAYLAND_VERSIONS_H
/* Protocol objects, will never change version */
/* #define META_WL_DISPLAY_VERSION 1 */
/* #define META_WL_REGISTRY_VERSION 1 */
#define META_WL_CALLBACK_VERSION 1
/* Not handled by mutter-wayland directly */
/* #define META_WL_SHM_VERSION 1 */
/* #define META_WL_SHM_POOL_VERSION 1 */
/* #define META_WL_DRM_VERSION 1 */
/* #define META_WL_BUFFER_VERSION 1 */
/* Global/master objects (version exported by wl_registry and negotiated through bind) */
#define META_WL_COMPOSITOR_VERSION 3
#define META_WL_DATA_DEVICE_MANAGER_VERSION 1
#define META_WL_SHELL_VERSION 1
#define META_WL_SEAT_VERSION 2 /* 3 not implemented yet */
#define META_WL_OUTPUT_VERSION 2
#define META_XSERVER_VERSION 1
#define META_GTK_SHELL_VERSION 1
/* Slave objects (version inherited from a master object) */
#define META_WL_DATA_OFFER_VERSION 1 /* from wl_data_device */
#define META_WL_DATA_SOURCE_VERSION 1 /* from wl_data_device */
#define META_WL_DATA_DEVICE_VERSION 1 /* from wl_data_device_manager */
#define META_WL_SHELL_SURFACE_VERSION 1 /* from wl_shell */
#define META_WL_SURFACE_VERSION 3 /* from wl_compositor */
#define META_WL_POINTER_VERSION 2 /* from wl_seat; 3 not implemented yet */
#define META_WL_KEYBOARD_VERSION 2 /* from wl_seat; 3 not implemented yet */
#define META_WL_TOUCH_VERSION 0 /* from wl_seat; wl_touch not supported */
#define META_WL_REGION_VERSION 1 /* from wl_compositor */
#define META_GTK_SURFACE_VERSION 1 /* from gtk_shell */
/* The first version to implement a specific event */
#define META_WL_SEAT_HAS_NAME 2
#define META_WL_OUTPUT_HAS_DONE 2
#endif

View File

@ -219,7 +219,9 @@ meta_wayland_compositor_set_input_focus (MetaWaylandCompositor *compositor,
void
meta_wayland_compositor_repick (MetaWaylandCompositor *compositor)
{
meta_wayland_seat_repick (compositor->seat, NULL);
meta_wayland_seat_repick (compositor->seat,
get_time (),
NULL);
}
static void
@ -231,10 +233,11 @@ meta_wayland_compositor_create_surface (struct wl_client *wayland_client,
wl_resource_get_user_data (wayland_compositor_resource);
MetaWaylandSurface *surface;
/* a surface inherits the version from the compositor */
surface = meta_wayland_surface_create (compositor,
wayland_client, id,
MIN (META_WL_SURFACE_VERSION,
wl_resource_get_version (wayland_compositor_resource)));
wayland_client,
id,
wl_resource_get_version (wayland_compositor_resource));
compositor->surfaces = g_list_prepend (compositor->surfaces, surface);
}
@ -297,9 +300,7 @@ meta_wayland_compositor_create_region (struct wl_client *wayland_client,
MetaWaylandRegion *region = g_slice_new0 (MetaWaylandRegion);
region->resource = wl_resource_create (wayland_client,
&wl_region_interface,
MIN (META_WL_REGION_VERSION,
wl_resource_get_version (compositor_resource)),
&wl_region_interface, 1,
id);
wl_resource_set_implementation (region->resource,
&meta_wayland_region_interface, region,
@ -337,8 +338,7 @@ bind_output (struct wl_client *client,
struct wl_resource *resource;
guint mode_flags;
resource = wl_resource_create (client, &wl_output_interface,
MIN (META_WL_OUTPUT_VERSION, version), id);
resource = wl_resource_create (client, &wl_output_interface, version, id);
wayland_output->resources = g_list_prepend (wayland_output->resources, resource);
wl_resource_set_user_data (resource, wayland_output);
@ -376,7 +376,7 @@ bind_output (struct wl_client *client,
(int)output->crtc->current_mode->height,
(int)output->crtc->current_mode->refresh_rate);
if (version >= META_WL_OUTPUT_HAS_DONE)
if (version >= 2)
wl_resource_post_event (resource,
WL_OUTPUT_DONE);
}
@ -479,8 +479,7 @@ meta_wayland_compositor_update_outputs (MetaWaylandCompositor *compositor,
{
wayland_output = g_slice_new0 (MetaWaylandOutput);
wayland_output->global = wl_global_create (compositor->wayland_display,
&wl_output_interface,
META_WL_OUTPUT_VERSION,
&wl_output_interface, 2,
wayland_output, bind_output);
}
@ -522,8 +521,7 @@ compositor_bind (struct wl_client *client,
MetaWaylandCompositor *compositor = data;
struct wl_resource *resource;
resource = wl_resource_create (client, &wl_compositor_interface,
MIN (META_WL_COMPOSITOR_VERSION, version), id);
resource = wl_resource_create (client, &wl_compositor_interface, version, id);
wl_resource_set_implementation (resource, &meta_wayland_compositor_interface, compositor, NULL);
}
@ -533,6 +531,8 @@ stage_destroy_cb (void)
meta_quit (META_EXIT_SUCCESS);
}
#define N_BUTTONS 5
static void
reset_idletimes (const ClutterEvent *event)
{
@ -558,13 +558,77 @@ reset_idletimes (const ClutterEvent *event)
}
}
gboolean
meta_wayland_compositor_handle_event (MetaWaylandCompositor *compositor,
const ClutterEvent *event)
static gboolean
event_filter_cb (const ClutterEvent *event,
gpointer user_data)
{
MetaWaylandCompositor *compositor = user_data;
MetaWaylandSeat *seat = compositor->seat;
MetaWaylandPointer *pointer = &seat->pointer;
MetaWaylandSurface *surface;
MetaDisplay *display;
reset_idletimes (event);
return meta_wayland_seat_handle_event (compositor->seat, event);
if (meta_wayland_seat_handle_event (compositor->seat, event))
return TRUE;
/* HACK: for now, the surfaces from Wayland clients aren't
integrated into Mutter's event handling and Mutter won't give them
focus on mouse clicks. As a hack to work around this we can just
give them input focus on mouse clicks so we can at least test the
keyboard support */
if (event->type == CLUTTER_BUTTON_PRESS)
{
surface = pointer->current;
if (surface && surface->window &&
surface->window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND)
{
MetaDisplay *display = meta_get_display ();
guint32 timestamp = meta_display_get_current_time_roundtrip (display);
meta_window_focus (surface->window, timestamp);
}
}
if (seat->cursor_tracker)
{
meta_cursor_tracker_update_position (seat->cursor_tracker,
wl_fixed_to_int (pointer->x),
wl_fixed_to_int (pointer->y));
if (pointer->current == NULL)
meta_cursor_tracker_revert_root (seat->cursor_tracker);
meta_cursor_tracker_queue_redraw (seat->cursor_tracker,
CLUTTER_ACTOR (event->any.stage));
}
display = meta_get_display ();
if (!display)
return FALSE;
switch (event->type)
{
case CLUTTER_BUTTON_PRESS:
if (compositor->implicit_grab_surface == NULL)
{
compositor->implicit_grab_button = event->button.button;
compositor->implicit_grab_surface = pointer->current;
}
return FALSE;
case CLUTTER_BUTTON_RELEASE:
if (event->type == CLUTTER_BUTTON_RELEASE &&
compositor->implicit_grab_surface &&
event->button.button == compositor->implicit_grab_button)
compositor->implicit_grab_surface = NULL;
return FALSE;
default:
return FALSE;
}
}
static void
@ -624,8 +688,7 @@ meta_wayland_init (void)
wl_list_init (&compositor->frame_callbacks);
if (!wl_global_create (compositor->wayland_display,
&wl_compositor_interface,
META_WL_COMPOSITOR_VERSION,
&wl_compositor_interface, 3,
compositor, compositor_bind))
g_error ("Failed to register wayland compositor object");
@ -655,6 +718,9 @@ meta_wayland_init (void)
if (clutter_init (NULL, NULL) != CLUTTER_INIT_SUCCESS)
g_error ("Failed to initialize Clutter");
unsetenv ("CLUTTER_BACKEND");
unsetenv ("CLUTTER_INPUT_BACKEND");
backend = clutter_get_default_backend ();
cogl_context = clutter_backend_get_cogl_context (backend);
cogl_renderer = cogl_display_get_renderer (cogl_context_get_display (cogl_context));
@ -695,13 +761,13 @@ meta_wayland_init (void)
compositor->seat = meta_wayland_seat_new (compositor->wayland_display,
compositor->drm_fd >= 0);
clutter_event_add_filter (event_filter_cb, compositor);
meta_wayland_init_shell (compositor);
clutter_actor_show (compositor->stage);
/* FIXME: find the first free name instead */
compositor->display_name = g_strdup ("wayland-0");
if (wl_display_add_socket (compositor->wayland_display, compositor->display_name))
if (wl_display_add_socket (compositor->wayland_display, "wayland-0"))
g_error ("Failed to create socket");
/* XXX: It's important that we only try and start xwayland after we
@ -721,7 +787,7 @@ meta_wayland_init (void)
set_gnome_env ("DISPLAY", display_name);
g_free (display_name);
set_gnome_env ("WAYLAND_DISPLAY", compositor->display_name);
set_gnome_env ("WAYLAND_DISPLAY", "wayland-0");
}
void
@ -731,6 +797,8 @@ meta_wayland_finalize (void)
compositor = meta_wayland_compositor_get_default ();
clutter_event_remove_filter (event_filter_cb, compositor);
meta_xwayland_stop (compositor);
g_clear_object (&compositor->launcher);
}

View File

@ -83,8 +83,8 @@ bind_xserver (struct wl_client *client,
if (client != compositor->xwayland_client)
return;
compositor->xserver_resource = wl_resource_create (client, &xserver_interface,
MIN (META_XSERVER_VERSION, version), id);
compositor->xserver_resource =
wl_resource_create (client, &xserver_interface, version, id);
wl_resource_set_implementation (compositor->xserver_resource,
&xserver_implementation, compositor, NULL);
@ -315,8 +315,7 @@ meta_xwayland_start (MetaWaylandCompositor *compositor)
GError *error;
wl_global_create (compositor->wayland_display,
&xserver_interface,
META_XSERVER_VERSION,
&xserver_interface, 1,
compositor, bind_xserver);
do

View File

@ -50,6 +50,7 @@
#include <pwd.h>
#include <grp.h>
#include <security/pam_appl.h>
#include <xf86drm.h>
@ -67,6 +68,8 @@ enum vt_state {
};
struct weston_launch {
struct pam_conv pc;
pam_handle_t *ph;
int tty;
int ttynr;
int sock[2];
@ -76,6 +79,7 @@ struct weston_launch {
pid_t child;
int verbose;
char *new_user;
struct termios terminal_attributes;
int kb_mode;
@ -214,7 +218,7 @@ handle_setdrmfd(struct weston_launch *wl, struct msghdr *msg, ssize_t len)
reply.ret = -errno;
if (wl->verbose)
fprintf(stderr, "mutter-launch: set drm FD, ret: %d, fd: %d\n",
fprintf(stderr, "weston-launch: set drm FD, ret: %d, fd: %d\n",
reply.ret, data->fd);
out:
@ -255,7 +259,7 @@ handle_confirm_vt_switch(struct weston_launch *wl, struct msghdr *msg, ssize_t l
ioctl(wl->tty, VT_RELDISP, 1);
if (wl->verbose)
fprintf(stderr, "mutter-launcher: confirmed VT switch\n");
fprintf(stderr, "weston-launcher: confirmed VT switch\n");
reply.ret = 0;
@ -290,7 +294,7 @@ handle_activate_vt(struct weston_launch *wl, struct msghdr *msg, ssize_t len)
reply.ret = -errno;
if (wl->verbose)
fprintf(stderr, "mutter-launch: activate VT, ret: %d\n", reply.ret);
fprintf(stderr, "weston-launch: activate VT, ret: %d\n", reply.ret);
out:
do {
@ -368,7 +372,7 @@ err0:
iov.iov_len = sizeof reply;
if (wl->verbose)
fprintf(stderr, "mutter-launch: opened %s: ret: %d, fd: %d\n",
fprintf(stderr, "weston-launch: opened %s: ret: %d, fd: %d\n",
message->path, reply.ret, fd);
do {
len = sendmsg(wl->sock[0], &nmsg, 0);
@ -449,6 +453,8 @@ tty_reset(struct weston_launch *wl)
static void
quit(struct weston_launch *wl, int status)
{
int err;
if (wl->child > 0)
kill(wl->child, SIGKILL);
@ -460,6 +466,14 @@ quit(struct weston_launch *wl, int status)
tty_reset(wl);
if (wl->new_user) {
err = pam_close_session(wl->ph, 0);
if (err)
fprintf(stderr, "pam_close_session failed: %d: %s\n",
err, pam_strerror(wl->ph, err));
pam_end(wl->ph, err);
}
exit(status);
}
@ -564,24 +578,11 @@ setup_tty(struct weston_launch *wl)
ok = sd_session_get_tty(session, &tty);
if (ok == 0) {
/* Old systemd only has the tty name in the TTY
field, new one has the full char device path.
Check what we have and fix it properly.
*/
if (strncmp(tty, "/dev", strlen("/dev")) == 0) {
strncpy(path, tty, PATH_MAX);
path[PATH_MAX-1] = 0;
} else {
snprintf(path, PATH_MAX, "/dev/%s", tty);
}
snprintf(path, PATH_MAX, "/dev/%s", tty);
wl->tty = open(path, O_RDWR | O_NOCTTY | O_CLOEXEC);
free(tty);
#ifdef HAVE_SD_SESSION_GET_VT
} else if (ok == -ENOENT) {
unsigned vt;
/* Negative errnos are cool, right?
So cool that we can't distinguish "session not found"
from "key does not exist in the session file"!
@ -589,11 +590,11 @@ setup_tty(struct weston_launch *wl)
from sd_pid_get_session()...
*/
ok = sd_session_get_vt(session, &vt);
ok = sd_session_get_vt(session, &tty);
if (ok < 0)
error(1, -ok, "could not determine current TTY");
snprintf(path, PATH_MAX, "/dev/tty%u", vt);
snprintf(path, PATH_MAX, "/dev/tty%s", tty);
wl->tty = open(path, O_RDWR | O_NOCTTY | O_CLOEXEC);
free(tty);
#endif
@ -728,7 +729,7 @@ main(int argc, char *argv[])
wl.verbose = 1;
break;
case 'h':
help("mutter-launch");
help("weston-launch");
exit(EXIT_FAILURE);
}
}