Compare commits

..

33 Commits

Author SHA1 Message Date
Giovanni Campagna
78b41e542b MonitorXrandr: follow the right order in applying the new configuration
First disable CRTCs that should be off in the new configuration,
then resize the framebuffer, then enable the new CRTCs.
If we don't do that, and we're making the screen smaller, X complains
with a BadMatch.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:57:33 +02:00
Giovanni Campagna
13557b39d0 MonitorXrandr: resize the framebuffer prior to setting the CRTC configuration
Otherwise X11 will trim the new configuration and disable outputs
outside the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:57:33 +02:00
Giovanni Campagna
39aecd2dde Monitor: restore correct display name handling
Now that we have the right values from the EDID, we can load
the PNP database and find the proper vendor name, to show in
the control center UI.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:57:33 +02:00
Giovanni Campagna
c564515ef6 MonitorXrandr: implement correct EDID parsing
To provide valid values for the vendor, product and serial fields
we need to read the EDID and parse it.
Parser kindly provided by gnome-desktop.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:57:33 +02:00
Giovanni Campagna
d7b2ea37b1 MonitorManager: add EDID properties to the output DBus description
Add "edid-file", if we have one (in the KMS case, where we can point
people to the right sysfs file), or "edid" with inline data.
These are needed by colord to build the default ICC profile for
uncalibrated displays.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:57:33 +02:00
Giovanni Campagna
0a1e0fe132 MonitorManager: split the XRandR parts in a subclass
Instead of keeping a forest of if backend else ..., use a subclass
and virtual functions to discriminate between XRandR and the
dummy backend (which lives in the parent class togheter with the
common code)

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:57:32 +02:00
Giovanni Campagna
1a0513ea61 MetaPlugin: add a UI hook for confirming display changes
We want to show a dialog when a display change happens from the
control center. To do so, add a new vfunc to MetaPlugin and
call it when a configuration change is requested via DBus.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:56:58 +02:00
Giovanni Campagna
028fa6cd4e MonitorConfig: handle changes in the laptop lid
This way we don't need to track the current and previous
configuration in gnome-settings-daemon, when we already do so
in mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:56:58 +02:00
Giovanni Campagna
194b11186c MonitorManager: add gamma support
Add GetCrtcGamma() and SetCrtcGamma(), that wrap the similarly
named XRandR API. These are used by GnomeRR inside the color
plugin of the control center (and may go away if the color
plugin decides to do something different under wayland)

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:56:58 +02:00
Giovanni Campagna
40f064abc3 MonitorManager: ignore configuration changes that disable all outputs
If we compute a screen size of 0 in either direction, we crash
later on, as it is invalid for clutter, cogl and X.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:56:58 +02:00
Giovanni Campagna
27b8716795 MonitorManager: add support for backlight
GnomeRR needs that too.
The backlight is exported as a normalized 0-100 value, or -1 if not
supported. Clamping to HW limits is handled by the backend.
Changing backlight uses a different method call, to avoid recomputing
the full display configuration every time the user presses the
backlight keys.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:56:58 +02:00
Giovanni Campagna
50b44d0445 MonitorManager: further extend the dummy backend
The default configuration is extended, which is only possible
if there are as many CRTCs as outputs, so make sure that's true.

Also, add more and bigger modes, so that different sizes will
be chosen for the three outputs.
A nice side effect of this is that with a real 1920x1080 + 1600x900
layout, if you disable the VGA you get a stage that matches the
screen size, which triggers the legacy fullscreen path in the
outside mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:56:58 +02:00
Giovanni Campagna
c74d40ac41 MonitorManager: store the presentation mode bit in XRandR
Use a private output property to store if the output is in
presentation mode or not, so that this information is not lost
after the configuration read back from the server.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:56:58 +02:00
Giovanni Campagna
c21f7d43bd MonitorConfig: add support for default configurations
Activate the presentation bit on new hotplugged monitors, while
making a fully extended setup when running for the first time.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:56:58 +02:00
Giovanni Campagna
80e0b4aac9 MonitorConfig: add CRTC assignment
Ripped off libgnome-desktop, trimming the parts that checked
that the configuration was plausible, as that should be done
in gnome-control-center before asking mutter for a change.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:56:57 +02:00
Giovanni Campagna
12cd4c216b MonitorManager: add support for persistent monitor configurations
Add a new object, MetaMonitorConfig, that takes care of converting
between the logical configurations stored in monitors.xml and
the HW resources exposed by MonitorManager.
This commit includes loading and saving of configurations, but
still missing is the actual CRTC assignments and a default
configuration when none is found in the file.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:51:03 +02:00
Giovanni Campagna
91d193e5e8 MonitorManager: add support for DPMS levels
To the XRandR and dummy backend (and as usual the dummy backend
has no effect)

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:50:26 +02:00
Giovanni Campagna
f82f3ef67b MonitorManager: inherit directly from DisplayConfig instead of handling signals
This way we can handle properties too.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:50:26 +02:00
Giovanni Campagna
6125b3fa7e MonitorManager: fix handling of output transform
Read the current transform from XRandR, and expose the transforms
that are really supported on the bus.
The dummy backend now advertises all transforms, since it doesn't
actually apply them.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:50:23 +02:00
Giovanni Campagna
169780346b default plugin: add a random color background on each monitor
Instead of a full white background, make one with a random color.
This way the different "monitors" are visible and it's easier
to debug the DBus API.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:36:46 +02:00
Giovanni Campagna
9b255f9292 DisplayConfig: make the dummy backend writable
Add a number of dummy outputs and modes to the dummy backend,
and implement the writing bits.
The only visible effect is that you can change the screen size,
which resizes the output window.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:36:46 +02:00
Giovanni Campagna
60e11fbae3 Reverse handling of XRandR events between Screen and MonitorManager
Now MonitorManager does its own handling of XRandR events, which
means we no longer handle ConfigureNotify on the root window.
MetaScreen reacts to MonitorManager::monitor-changed and updates
its internal state, including the new size.

This paves the way for doing display configuration using only
the dummy backend, which would allow testing wl_output interfaces.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:36:45 +02:00
Giovanni Campagna
355f0258b1 DisplayConfig: add the write side of the API
Implement ApplyConfiguration in terms of XRandR calls.
Error checking is done before actually committing the configuration.

If mutter is using one of the other monitor config backends, an
error is reported and nothing happens.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:36:39 +02:00
Giovanni Campagna
09984bb56d Extend the DBus XRandR protocol to expose cloning restriction
Turns out that even if two outputs say that they can be controlled
by a given CRTC, you can't configure them in the same CRTC unless
they are marked as "possible clones" one of the other.
This can further restrict the configuration options, so we need
to expose this limitation in the DBus API.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:26:32 +02:00
Giovanni Campagna
f48ddb3683 Add the write side of the DBus protocol too
This is just in the documentation for now, to attract wider feedback
before we start looking at how to implement this for real.

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:26:31 +02:00
Giovanni Campagna
9ac92336c9 Introduce a new DBus interface for display configuration
This new interface will be used by the control center and possibly
the settings daemon to configure the screens. It is designed to
resemble a simplified XRandR, while still exposing all the quirks
of the hardware, so that the panel can limit the user choices
appropriately.

To do so, MetaMonitorMode needs to track CRTCs, outputs and modes,
so the low level objects have been decoupled from the high-level
MetaMonitorInfo, which is used by core and API and offers a simplified
view of HW, that hides away the details of what is cloned and how.
This is still not efficient as it should be, because on every
HW change we drop all data structures and rebuild them from scratch
(which is not expensive because there aren't many of them, but
at least in the XRandR path it involves a few sync X calls)

https://bugzilla.gnome.org/show_bug.cgi?id=705670
2013-08-17 16:24:01 +02:00
Giovanni Campagna
2bc5e89a5e Rework and consolidate monitor handling in MetaScreen
Consolidate all places that deal with output configuration in
MetaScreen, which gets it either from XRandR or from a dummy static configuration.
We still need to read the Xinerama config, even when running xwayland,
because we need the indices for _NET_WM_FULLSCREEN_MONITORS, but
now we do it only when needed.

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

https://bugzilla.gnome.org/show_bug.cgi?id=706207
2013-08-17 15:56:09 +02:00
Giovanni Campagna
b04ac57f02 Strip whitespace in warnings and errors
The old log system did not add a newline at the end, but the new
one does, so don't add another one.
2013-08-14 21:36:34 +02:00
Giovanni Campagna
c3a08ee589 main: use glib to handle sigterm
We can remove a lot of code with that
2013-08-14 21:36:34 +02:00
Giovanni Campagna
1fdb161f54 main: remove a lot of code to handle wrong theme config
mutter has a hard dependency on gnome-themes-standard, which
provides the Adwaita theme. If that is not satisfied, it is
a distribution problem, so we can just fail (and let the
automatic smoketests notice it)
2013-08-14 21:36:34 +02:00
Giovanni Campagna
f3d1653f13 Improve handling of warnings and criticals
Instead of squash everything into "window manager warnings",
let the glib log framework handle Mutter (and other) warnings.
META_USE_LOGFILE support is preserved by rerouting warnings
in our domain.
This way we get process name and PID, nice CRITICAL/WARNING/ERROR
instead of a number, and the ability for plugins to override
the log handler. For example gnome-shell uses this to output
a JS backtrace.
2013-08-14 21:31:45 +02:00
Giovanni Campagna
3093b5c95d MetaBackgroundGroup: don't use clutter_actor_get_children()
In C code we can use ClutterActorIter and avoid allocating a GList.
2013-08-14 21:24:11 +02:00
207 changed files with 30791 additions and 21347 deletions

3
.gitignore vendored
View File

@@ -55,7 +55,6 @@ org.gnome.mutter.gschema.xml
testasyncgetprop testasyncgetprop
testboxes testboxes
testgradient testgradient
m4/*
mutter-grayscale mutter-grayscale
mutter-mag mutter-mag
mutter-message mutter-message
@@ -75,8 +74,6 @@ src/mutter-enum-types.[ch]
src/stamp-mutter-enum-types.h src/stamp-mutter-enum-types.h
src/mutter-marshal.[ch] src/mutter-marshal.[ch]
src/stamp-mutter-marshal.h src/stamp-mutter-marshal.h
src/meta-dbus-xrandr.[ch]
src/meta-dbus-idle-monitor.[ch]
src/mutter-plugins.pc src/mutter-plugins.pc
doc/reference/*.args doc/reference/*.args
doc/reference/*.bak doc/reference/*.bak

41
COPYING
View File

@@ -1,12 +1,12 @@
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 2, June 1991 Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc., Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
Preamble Preamble
The licenses for most software are designed to take away your The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public freedom to share and change it. By contrast, the GNU General Public
@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to the GNU Library General Public License instead.) You can apply it to
your programs, too. your programs, too.
When we speak of free software, we are referring to freedom, not When we speak of free software, we are referring to freedom, not
@@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and The precise terms and conditions for copying, distribution and
modification follow. modification follow.
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains 0. This License applies to any program or other work which contains
@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on does not normally print such an announcement, your work based on
the Program is not required to print an announcement.) the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program, identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in and can be reasonably considered independent and separate works in
@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not distribution of the source code, even though third parties are not
compelled to copy the source along with the object code. compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program 4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is otherwise to copy, modify, sublicense or distribute the Program is
@@ -225,7 +225,7 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License. be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in 8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License original copyright holder who places the Program under this License
@@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally. of promoting the sharing and reuse of software generally.
NO WARRANTY NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES. POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it possible use to the public, the best way to achieve this is to make it
@@ -303,16 +303,17 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License
with this program; if not, write to the Free Software Foundation, Inc., along with this program; if not, write to the Free Software
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail. Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this If the program is interactive, make it output a short notice like this
when it starts in an interactive mode: when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details. under certain conditions; type `show c' for details.
@@ -335,5 +336,5 @@ necessary. Here is a sample; alter the names:
This General Public License does not permit incorporating your program into This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General library. If this is what you want to do, use the GNU Library General
Public License instead of this License. Public License instead of this License.

View File

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

230
NEWS
View File

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

View File

@@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
# Run this to generate all the initial makefiles, etc. # Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0` srcdir=`dirname $0`

View File

@@ -1,9 +1,8 @@
AC_PREREQ(2.50) AC_PREREQ(2.50)
AC_CONFIG_MACRO_DIR([m4])
m4_define([mutter_major_version], [3]) m4_define([mutter_major_version], [3])
m4_define([mutter_minor_version], [12]) m4_define([mutter_minor_version], [9])
m4_define([mutter_micro_version], [0]) m4_define([mutter_micro_version], [5])
m4_define([mutter_version], m4_define([mutter_version],
[mutter_major_version.mutter_minor_version.mutter_micro_version]) [mutter_major_version.mutter_minor_version.mutter_micro_version])
@@ -13,7 +12,6 @@ m4_define([mutter_plugin_api_version], [3])
AC_INIT([mutter], [mutter_version], AC_INIT([mutter], [mutter_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=mutter]) [http://bugzilla.gnome.org/enter_bug.cgi?product=mutter])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR(src/core/display.c) AC_CONFIG_SRCDIR(src/core/display.c)
AC_CONFIG_HEADERS(config.h) AC_CONFIG_HEADERS(config.h)
@@ -69,15 +67,15 @@ CANBERRA_GTK_VERSION=0.26
CLUTTER_PACKAGE=clutter-1.0 CLUTTER_PACKAGE=clutter-1.0
MUTTER_PC_MODULES=" MUTTER_PC_MODULES="
gtk+-3.0 >= 3.9.11 gtk+-3.0 >= 3.3.7
gio-2.0 >= 2.25.10 gio-2.0 >= 2.25.10
pango >= 1.2.0 pango >= 1.2.0
cairo >= 1.10.0 cairo >= 1.10.0
gsettings-desktop-schemas >= 3.7.3 gsettings-desktop-schemas >= 3.7.3
xcomposite >= 0.2 xfixes xrender xdamage xi >= 1.6.0 xcomposite >= 0.2 xfixes xrender xdamage xi >= 1.6.0
$CLUTTER_PACKAGE >= 1.15.90 $CLUTTER_PACKAGE >= 1.14.3
cogl-1.0 >= 1.17.1 cogl-1.0 >= 1.13.3
upower-glib >= 0.99.0 upower-glib > 0.9.11
gnome-desktop-3.0 gnome-desktop-3.0
" "

View File

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

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

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

View File

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

View File

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

View File

@@ -49,8 +49,8 @@ FIXXREF_OPTIONS=
# Used for dependencies. The docs will be rebuilt if any of these change. # Used for dependencies. The docs will be rebuilt if any of these change.
# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
HFILE_GLOB=$(top_srcdir)/src/*/*.h HFILE_GLOB=$(top_srcdir)/src/*.h
CFILE_GLOB=$(top_srcdir)/src/*/*.c CFILE_GLOB=$(top_srcdir)/src/*.c
# Extra header to include when scanning, which are not under DOC_SOURCE_DIR # Extra header to include when scanning, which are not under DOC_SOURCE_DIR
# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h # e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h

View File

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

View File

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

View File

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

View File

@@ -12,7 +12,6 @@ src/core/display.c
src/core/errors.c src/core/errors.c
src/core/keybindings.c src/core/keybindings.c
src/core/main.c src/core/main.c
src/core/monitor.c
src/core/mutter.c src/core/mutter.c
src/core/prefs.c src/core/prefs.c
src/core/screen.c src/core/screen.c

733
po/ar.po

File diff suppressed because it is too large Load Diff

499
po/as.po

File diff suppressed because it is too large Load Diff

441
po/be.po
View File

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

2680
po/ca.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

735
po/cs.po

File diff suppressed because it is too large Load Diff

771
po/da.po

File diff suppressed because it is too large Load Diff

610
po/de.po

File diff suppressed because it is too large Load Diff

745
po/el.po

File diff suppressed because it is too large Load Diff

1247
po/es.po

File diff suppressed because it is too large Load Diff

231
po/et.po
View File

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

512
po/fi.po

File diff suppressed because it is too large Load Diff

756
po/fr.po

File diff suppressed because it is too large Load Diff

3214
po/ga.po

File diff suppressed because it is too large Load Diff

783
po/gl.po

File diff suppressed because it is too large Load Diff

1210
po/he.po

File diff suppressed because it is too large Load Diff

790
po/hu.po

File diff suppressed because it is too large Load Diff

720
po/id.po

File diff suppressed because it is too large Load Diff

737
po/it.po

File diff suppressed because it is too large Load Diff

1477
po/kk.po

File diff suppressed because it is too large Load Diff

2012
po/kn.po

File diff suppressed because it is too large Load Diff

747
po/ko.po

File diff suppressed because it is too large Load Diff

730
po/lt.po

File diff suppressed because it is too large Load Diff

790
po/lv.po

File diff suppressed because it is too large Load Diff

716
po/nb.po

File diff suppressed because it is too large Load Diff

1194
po/nl.po

File diff suppressed because it is too large Load Diff

781
po/pa.po

File diff suppressed because it is too large Load Diff

725
po/pl.po

File diff suppressed because it is too large Load Diff

797
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

777
po/ru.po

File diff suppressed because it is too large Load Diff

417
po/sk.po
View File

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

789
po/sl.po

File diff suppressed because it is too large Load Diff

756
po/sr.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1132
po/uk.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -19,7 +19,7 @@ INCLUDES= \
-DMUTTER_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" \ -DMUTTER_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" \
-DMUTTER_PKGDATADIR=\"$(pkgdatadir)\" \ -DMUTTER_PKGDATADIR=\"$(pkgdatadir)\" \
-DMUTTER_DATADIR=\"$(datadir)\" \ -DMUTTER_DATADIR=\"$(datadir)\" \
-DG_LOG_DOMAIN=\"mutter\" \ -DG_LOG_DOMAIN=\"Mutter\" \
-DSN_API_NOT_YET_FROZEN=1 \ -DSN_API_NOT_YET_FROZEN=1 \
-DMUTTER_MAJOR_VERSION=$(MUTTER_MAJOR_VERSION) \ -DMUTTER_MAJOR_VERSION=$(MUTTER_MAJOR_VERSION) \
-DMUTTER_MINOR_VERSION=$(MUTTER_MINOR_VERSION) \ -DMUTTER_MINOR_VERSION=$(MUTTER_MINOR_VERSION) \
@@ -30,9 +30,8 @@ INCLUDES= \
-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"
mutter_built_sources = \ mutter_built_sources = \
$(dbus_idle_built_sources) \
$(dbus_xrandr_built_sources) \ $(dbus_xrandr_built_sources) \
mutter-enum-types.h \ mutter-enum-types.h \
mutter-enum-types.c mutter-enum-types.c
libmutter_la_SOURCES = \ libmutter_la_SOURCES = \
@@ -55,8 +54,7 @@ libmutter_la_SOURCES = \
compositor/meta-background-actor.c \ compositor/meta-background-actor.c \
compositor/meta-background-actor-private.h \ compositor/meta-background-actor-private.h \
compositor/meta-background-group.c \ compositor/meta-background-group.c \
compositor/meta-cullable.c \ compositor/meta-background-group-private.h \
compositor/meta-cullable.h \
compositor/meta-module.c \ compositor/meta-module.c \
compositor/meta-module.h \ compositor/meta-module.h \
compositor/meta-plugin.c \ compositor/meta-plugin.c \
@@ -65,7 +63,6 @@ libmutter_la_SOURCES = \
compositor/meta-shadow-factory.c \ compositor/meta-shadow-factory.c \
compositor/meta-shadow-factory-private.h \ compositor/meta-shadow-factory-private.h \
compositor/meta-shaped-texture.c \ compositor/meta-shaped-texture.c \
compositor/meta-shaped-texture-private.h \
compositor/meta-texture-rectangle.c \ compositor/meta-texture-rectangle.c \
compositor/meta-texture-rectangle.h \ compositor/meta-texture-rectangle.h \
compositor/meta-texture-tower.c \ compositor/meta-texture-tower.c \
@@ -94,6 +91,8 @@ libmutter_la_SOURCES = \
core/display.c \ core/display.c \
core/display-private.h \ core/display-private.h \
meta/display.h \ meta/display.h \
ui/draw-workspace.c \
ui/draw-workspace.h \
core/edge-resistance.c \ core/edge-resistance.c \
core/edge-resistance.h \ core/edge-resistance.h \
core/edid-parse.c \ core/edid-parse.c \
@@ -114,10 +113,6 @@ libmutter_la_SOURCES = \
core/keybindings.c \ core/keybindings.c \
core/keybindings-private.h \ core/keybindings-private.h \
core/main.c \ core/main.c \
core/meta-cursor-tracker.c \
core/meta-cursor-tracker-private.h \
core/meta-idle-monitor.c \
core/meta-idle-monitor-private.h \
core/meta-xrandr-shared.h \ core/meta-xrandr-shared.h \
core/monitor.c \ core/monitor.c \
core/monitor-config.c \ core/monitor-config.c \
@@ -140,7 +135,6 @@ libmutter_la_SOURCES = \
core/stack-tracker.h \ core/stack-tracker.h \
core/util.c \ core/util.c \
meta/util.h \ meta/util.h \
core/util-private.h \
core/window-props.c \ core/window-props.c \
core/window-props.h \ core/window-props.h \
core/window.c \ core/window.c \
@@ -161,13 +155,15 @@ libmutter_la_SOURCES = \
ui/metaaccellabel.h \ ui/metaaccellabel.h \
ui/resizepopup.c \ ui/resizepopup.c \
ui/resizepopup.h \ ui/resizepopup.h \
ui/tabpopup.c \
ui/tabpopup.h \
ui/tile-preview.c \
ui/tile-preview.h \
ui/theme-parser.c \ ui/theme-parser.c \
ui/theme.c \ ui/theme.c \
meta/theme.h \ meta/theme.h \
ui/theme-private.h \ ui/theme-private.h \
ui/ui.c ui/ui.c \
nodist_libmutter_la_SOURCES = \
$(mutter_built_sources) $(mutter_built_sources)
libmutter_la_LDFLAGS = -no-undefined libmutter_la_LDFLAGS = -no-undefined
@@ -190,8 +186,6 @@ libmutterinclude_base_headers = \
meta/meta-background-actor.h \ meta/meta-background-actor.h \
meta/meta-background-group.h \ meta/meta-background-group.h \
meta/meta-background.h \ meta/meta-background.h \
meta/meta-cursor-tracker.h \
meta/meta-idle-monitor.h \
meta/meta-plugin.h \ meta/meta-plugin.h \
meta/meta-shaped-texture.h \ meta/meta-shaped-texture.h \
meta/meta-shadow-factory.h \ meta/meta-shadow-factory.h \
@@ -248,7 +242,7 @@ Meta-$(api_version).gir: libmutter.la
@META_GIR@_FILES = \ @META_GIR@_FILES = \
mutter-enum-types.h \ mutter-enum-types.h \
$(libmutterinclude_base_headers) \ $(libmutterinclude_base_headers) \
$(filter %.c,$(libmutter_la_SOURCES) $(nodist_libmutter_la_SOURCES)) $(filter %.c,$(libmutter_la_SOURCES))
@META_GIR@_SCANNERFLAGS = --warn-all --warn-error @META_GIR@_SCANNERFLAGS = --warn-all --warn-error
endif endif
@@ -309,8 +303,6 @@ EXTRA_DIST=$(desktopfiles_files) \
$(wmproperties_in_files) \ $(wmproperties_in_files) \
$(xml_in_files) \ $(xml_in_files) \
org.gnome.mutter.gschema.xml.in \ org.gnome.mutter.gschema.xml.in \
idle-monitor.xml \
xrandr.xml \
mutter-schemas.convert \ mutter-schemas.convert \
libmutter.pc.in \ libmutter.pc.in \
mutter-plugins.pc.in \ mutter-plugins.pc.in \
@@ -343,18 +335,8 @@ mutter-enum-types.c: stamp-mutter-enum-types.h mutter-enum-types.c.in
dbus_xrandr_built_sources = meta-dbus-xrandr.c meta-dbus-xrandr.h dbus_xrandr_built_sources = meta-dbus-xrandr.c meta-dbus-xrandr.h
$(dbus_xrandr_built_sources) : Makefile.am xrandr.xml $(dbus_xrandr_built_sources) : Makefile.am xrandr.xml
$(AM_V_GEN)gdbus-codegen \ $(AM_V_GEN)gdbus-codegen \
--interface-prefix org.gnome.Mutter \ --interface-prefix org.gnome.Mutter \
--c-namespace MetaDBus \ --c-namespace MetaDBus \
--generate-c-code meta-dbus-xrandr \ --generate-c-code meta-dbus-xrandr \
$(srcdir)/xrandr.xml 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 \
--interface-prefix org.gnome.Mutter \
--c-namespace MetaDBus \
--generate-c-code meta-dbus-idle-monitor \
--c-generate-object-manager \
$(srcdir)/idle-monitor.xml

View File

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

View File

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

View File

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

View File

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

View File

@@ -17,6 +17,8 @@ struct _MetaCompositor
{ {
MetaDisplay *display; MetaDisplay *display;
Atom atom_x_root_pixmap;
Atom atom_net_wm_window_opacity;
guint repaint_func_id; guint repaint_func_id;
ClutterActor *shadow_src; ClutterActor *shadow_src;
@@ -46,8 +48,11 @@ struct _MetaCompScreen
CoglFrameClosure *frame_closure; CoglFrameClosure *frame_closure;
/* Used for unredirecting fullscreen windows */ /* Used for unredirecting fullscreen windows */
guint disable_unredirect_count; guint disable_unredirect_count;
MetaWindow *unredirected_window; MetaWindowActor *unredirected_window;
/* Before we create the output window */
XserverRegion pending_input_region;
gint switch_workspace_in_progress; gint switch_workspace_in_progress;
@@ -61,6 +66,8 @@ void meta_switch_workspace_completed (MetaScreen *screen);
gboolean meta_begin_modal_for_plugin (MetaScreen *screen, gboolean meta_begin_modal_for_plugin (MetaScreen *screen,
MetaPlugin *plugin, MetaPlugin *plugin,
Window grab_window,
Cursor cursor,
MetaModalOptions options, MetaModalOptions options,
guint32 timestamp); guint32 timestamp);
void meta_end_modal_for_plugin (MetaScreen *screen, void meta_end_modal_for_plugin (MetaScreen *screen,

View File

@@ -42,6 +42,15 @@
* the call, so it may be necessary to readjust the display based on the * the call, so it may be necessary to readjust the display based on the
* old_rect to start the animation. * old_rect to start the animation.
* *
* meta_compositor_window_mapped() and meta_compositor_window_unmapped() are
* notifications when the toplevel window (frame or client window) is mapped or
* unmapped. That is, when the result of meta_window_toplevel_is_mapped()
* changes. The main use of this is to drop resources when a window is unmapped.
* A window will always be mapped before meta_compositor_show_window()
* is called and will not be unmapped until after meta_compositor_hide_window()
* is called. If the live_hidden_windows preference is set, windows will never
* be unmapped.
*
* # Containers # * # Containers #
* *
* There's two containers in the stage that are used to place window actors, here * There's two containers in the stage that are used to place window actors, here
@@ -75,7 +84,6 @@
#include "meta-window-group.h" #include "meta-window-group.h"
#include "window-private.h" /* to check window->hidden */ #include "window-private.h" /* to check window->hidden */
#include "display-private.h" /* for meta_display_lookup_x_window() */ #include "display-private.h" /* for meta_display_lookup_x_window() */
#include "util-private.h"
#include <X11/extensions/shape.h> #include <X11/extensions/shape.h>
#include <X11/extensions/Xcomposite.h> #include <X11/extensions/Xcomposite.h>
@@ -167,6 +175,31 @@ process_damage (MetaCompositor *compositor,
meta_window_actor_process_damage (window_actor, event); meta_window_actor_process_damage (window_actor, event);
} }
static void
process_property_notify (MetaCompositor *compositor,
XPropertyEvent *event,
MetaWindow *window)
{
MetaWindowActor *window_actor;
if (window == NULL)
return;
window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
if (window_actor == NULL)
return;
/* Check for the opacity changing */
if (event->atom == compositor->atom_net_wm_window_opacity)
{
meta_window_actor_update_opacity (window_actor);
DEBUG_TRACE ("process_property_notify: net_wm_window_opacity\n");
return;
}
DEBUG_TRACE ("process_property_notify: unknown\n");
}
static Window static Window
get_output_window (MetaScreen *screen) get_output_window (MetaScreen *screen)
{ {
@@ -271,14 +304,14 @@ meta_get_window_actors (MetaScreen *screen)
return info->windows; return info->windows;
} }
void static void
meta_set_stage_input_region (MetaScreen *screen, do_set_stage_input_region (MetaScreen *screen,
XserverRegion region) XserverRegion region)
{ {
MetaCompScreen *info = meta_screen_get_compositor_data (screen); MetaCompScreen *info = meta_screen_get_compositor_data (screen);
MetaDisplay *display = meta_screen_get_display (screen); MetaDisplay *display = meta_screen_get_display (screen);
Display *xdpy = meta_display_get_xdisplay (display); Display *xdpy = meta_display_get_xdisplay (display);
Window xstage = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage)); Window xstage = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage));
XFixesSetWindowShapeRegion (xdpy, xstage, ShapeInput, 0, 0, region); XFixesSetWindowShapeRegion (xdpy, xstage, ShapeInput, 0, 0, region);
@@ -290,6 +323,35 @@ meta_set_stage_input_region (MetaScreen *screen,
XFixesSetWindowShapeRegion (xdpy, info->output, ShapeInput, 0, 0, region); XFixesSetWindowShapeRegion (xdpy, info->output, ShapeInput, 0, 0, region);
} }
void
meta_set_stage_input_region (MetaScreen *screen,
XserverRegion region)
{
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
MetaDisplay *display = meta_screen_get_display (screen);
Display *xdpy = meta_display_get_xdisplay (display);
if (info->stage && info->output)
{
do_set_stage_input_region (screen, region);
}
else
{
/* Reset info->pending_input_region if one existed before and set the new
* one to use it later. */
if (info->pending_input_region)
{
XFixesDestroyRegion (xdpy, info->pending_input_region);
info->pending_input_region = None;
}
if (region != None)
{
info->pending_input_region = XFixesCreateRegion (xdpy, NULL, 0);
XFixesCopyRegion (xdpy, info->pending_input_region, region);
}
}
}
void void
meta_empty_stage_input_region (MetaScreen *screen) meta_empty_stage_input_region (MetaScreen *screen)
{ {
@@ -350,6 +412,8 @@ meta_stage_is_focused (MetaScreen *screen)
gboolean gboolean
meta_begin_modal_for_plugin (MetaScreen *screen, meta_begin_modal_for_plugin (MetaScreen *screen,
MetaPlugin *plugin, MetaPlugin *plugin,
Window grab_window,
Cursor cursor,
MetaModalOptions options, MetaModalOptions options,
guint32 timestamp) guint32 timestamp)
{ {
@@ -360,19 +424,10 @@ meta_begin_modal_for_plugin (MetaScreen *screen,
MetaDisplay *display = meta_screen_get_display (screen); MetaDisplay *display = meta_screen_get_display (screen);
Display *xdpy = meta_display_get_xdisplay (display); Display *xdpy = meta_display_get_xdisplay (display);
MetaCompositor *compositor = display->compositor; MetaCompositor *compositor = display->compositor;
ClutterStage *stage;
Window grab_window;
Cursor cursor = None;
gboolean pointer_grabbed = FALSE; gboolean pointer_grabbed = FALSE;
gboolean keyboard_grabbed = FALSE; gboolean keyboard_grabbed = FALSE;
int result; int result;
stage = CLUTTER_STAGE (meta_get_stage_for_screen (screen));
if (!stage)
return FALSE;
grab_window = clutter_x11_get_stage_window (stage);
if (compositor->modal_plugin != NULL || display->grab_op != META_GRAB_OP_NONE) if (compositor->modal_plugin != NULL || display->grab_op != META_GRAB_OP_NONE)
return FALSE; return FALSE;
@@ -555,6 +610,14 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
return; return;
info = g_new0 (MetaCompScreen, 1); info = g_new0 (MetaCompScreen, 1);
/*
* We use an empty input region for Clutter as a default because that allows
* the user to interact with all the windows displayed on the screen.
* We have to initialize info->pending_input_region to an empty region explicitly,
* because None value is used to mean that the whole screen is an input region.
*/
info->pending_input_region = XFixesCreateRegion (xdisplay, NULL, 0);
info->screen = screen; info->screen = screen;
meta_screen_set_compositor_data (screen, info); meta_screen_set_compositor_data (screen, info);
@@ -615,6 +678,15 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
clutter_actor_add_child (info->stage, info->window_group); clutter_actor_add_child (info->stage, info->window_group);
clutter_actor_add_child (info->stage, info->top_window_group); clutter_actor_add_child (info->stage, info->top_window_group);
info->plugin_mgr = meta_plugin_manager_new (screen);
/*
* Delay the creation of the overlay window as long as we can, to avoid
* blanking out the screen. This means that during the plugin loading, the
* overlay window is not accessible; if the plugin needs to access it
* directly, it should hook into the "show" signal on stage, and do
* its stuff there.
*/
info->output = get_output_window (screen); info->output = get_output_window (screen);
XReparentWindow (xdisplay, xwin, info->output, 0, 0); XReparentWindow (xdisplay, xwin, info->output, 0, 0);
@@ -628,20 +700,12 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
*/ */
XFixesSetWindowShapeRegion (xdisplay, info->output, ShapeBounding, 0, 0, None); XFixesSetWindowShapeRegion (xdisplay, info->output, ShapeBounding, 0, 0, None);
info->output = get_output_window (screen); do_set_stage_input_region (screen, info->pending_input_region);
XReparentWindow (xdisplay, xwin, info->output, 0, 0); if (info->pending_input_region != None)
{
meta_empty_stage_input_region (screen); XFixesDestroyRegion (xdisplay, info->pending_input_region);
info->pending_input_region = None;
/* Make sure there isn't any left-over output shape on the }
* overlay window by setting the whole screen to be an
* output region.
*
* Note: there doesn't seem to be any real chance of that
* because the X server will destroy the overlay window
* when the last client using it exits.
*/
XFixesSetWindowShapeRegion (xdisplay, info->output, ShapeBounding, 0, 0, None);
/* Map overlay window before redirecting windows offscreen so we catch their /* Map overlay window before redirecting windows offscreen so we catch their
* contents until we show the stage. * contents until we show the stage.
@@ -649,8 +713,6 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
XMapWindow (xdisplay, info->output); XMapWindow (xdisplay, info->output);
redirect_windows (compositor, screen); redirect_windows (compositor, screen);
info->plugin_mgr = meta_plugin_manager_new (screen);
} }
void void
@@ -687,7 +749,7 @@ meta_shape_cow_for_window (MetaScreen *screen,
int width, height; int width, height;
MetaRectangle rect; MetaRectangle rect;
meta_window_get_frame_rect (metaWindow, &rect); meta_window_get_outer_rect (metaWindow, &rect);
window_bounds.x = rect.x; window_bounds.x = rect.x;
window_bounds.y = rect.y; window_bounds.y = rect.y;
@@ -708,30 +770,6 @@ meta_shape_cow_for_window (MetaScreen *screen,
} }
} }
static void
set_unredirected_window (MetaCompScreen *info,
MetaWindow *window)
{
if (info->unredirected_window == window)
return;
if (info->unredirected_window != NULL)
{
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (info->unredirected_window));
meta_window_actor_set_unredirected (window_actor, FALSE);
}
info->unredirected_window = window;
if (info->unredirected_window != NULL)
{
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (info->unredirected_window));
meta_window_actor_set_unredirected (window_actor, TRUE);
}
meta_shape_cow_for_window (info->screen, info->unredirected_window);
}
void void
meta_compositor_add_window (MetaCompositor *compositor, meta_compositor_add_window (MetaCompositor *compositor,
MetaWindow *window) MetaWindow *window)
@@ -763,8 +801,13 @@ meta_compositor_remove_window (MetaCompositor *compositor,
screen = meta_window_get_screen (window); screen = meta_window_get_screen (window);
info = meta_screen_get_compositor_data (screen); info = meta_screen_get_compositor_data (screen);
if (info->unredirected_window == window) if (window_actor == info->unredirected_window)
set_unredirected_window (info, NULL); {
meta_window_actor_set_redirected (window_actor, TRUE);
meta_shape_cow_for_window (meta_window_get_screen (meta_window_actor_get_meta_window (info->unredirected_window)),
NULL);
info->unredirected_window = NULL;
}
meta_window_actor_destroy (window_actor); meta_window_actor_destroy (window_actor);
} }
@@ -834,18 +877,6 @@ meta_compositor_window_shape_changed (MetaCompositor *compositor,
meta_window_actor_update_shape (window_actor); meta_window_actor_update_shape (window_actor);
} }
void
meta_compositor_window_opacity_changed (MetaCompositor *compositor,
MetaWindow *window)
{
MetaWindowActor *window_actor;
window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
if (!window_actor)
return;
meta_window_actor_update_opacity (window_actor);
}
/* Clutter makes the assumption that there is only one X window /* Clutter makes the assumption that there is only one X window
* per stage, which is a valid assumption to make for a generic * per stage, which is a valid assumption to make for a generic
* application toolkit. As such, it will ignore any events sent * application toolkit. As such, it will ignore any events sent
@@ -906,7 +937,10 @@ meta_compositor_process_event (MetaCompositor *compositor,
{ {
if (compositor->modal_plugin && is_grabbed_event (compositor->display, event)) if (compositor->modal_plugin && is_grabbed_event (compositor->display, event))
{ {
_meta_plugin_xevent_filter (compositor->modal_plugin, event); MetaPluginClass *klass = META_PLUGIN_GET_CLASS (compositor->modal_plugin);
if (klass->xevent_filter)
klass->xevent_filter (compositor->modal_plugin, event);
/* We always consume events even if the plugin says it didn't handle them; /* We always consume events even if the plugin says it didn't handle them;
* exclusive is exclusive */ * exclusive is exclusive */
@@ -952,19 +986,28 @@ meta_compositor_process_event (MetaCompositor *compositor,
} }
} }
if (event->type == meta_display_get_damage_event_base (compositor->display) + XDamageNotify) switch (event->type)
{ {
/* Core code doesn't handle damage events, so we need to extract the MetaWindow case PropertyNotify:
* ourselves process_property_notify (compositor, (XPropertyEvent *) event, window);
*/ break;
if (window == NULL)
{
Window xwin = ((XDamageNotifyEvent *) event)->drawable;
window = meta_display_lookup_x_window (compositor->display, xwin);
}
DEBUG_TRACE ("meta_compositor_process_event (process_damage)\n"); default:
process_damage (compositor, (XDamageNotifyEvent *) event, window); if (event->type == meta_display_get_damage_event_base (compositor->display) + XDamageNotify)
{
/* Core code doesn't handle damage events, so we need to extract the MetaWindow
* ourselves
*/
if (window == NULL)
{
Window xwin = ((XDamageNotifyEvent *) event)->drawable;
window = meta_display_lookup_x_window (compositor->display, xwin);
}
DEBUG_TRACE ("meta_compositor_process_event (process_damage)\n");
process_damage (compositor, (XDamageNotifyEvent *) event, window);
}
break;
} }
/* Clutter needs to know about MapNotify events otherwise it will /* Clutter needs to know about MapNotify events otherwise it will
@@ -1102,7 +1145,6 @@ sync_actor_stacking (MetaCompScreen *info)
* we go ahead and do it */ * we go ahead and do it */
children = clutter_actor_get_children (info->window_group); children = clutter_actor_get_children (info->window_group);
has_windows = FALSE;
reordered = FALSE; reordered = FALSE;
/* We allow for actors in the window group other than the actors we /* We allow for actors in the window group other than the actors we
@@ -1264,6 +1306,30 @@ meta_compositor_sync_stack (MetaCompositor *compositor,
sync_actor_stacking (info); sync_actor_stacking (info);
} }
void
meta_compositor_window_mapped (MetaCompositor *compositor,
MetaWindow *window)
{
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
DEBUG_TRACE ("meta_compositor_window_mapped\n");
if (!window_actor)
return;
meta_window_actor_mapped (window_actor);
}
void
meta_compositor_window_unmapped (MetaCompositor *compositor,
MetaWindow *window)
{
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
DEBUG_TRACE ("meta_compositor_window_unmapped\n");
if (!window_actor)
return;
meta_window_actor_unmapped (window_actor);
}
void void
meta_compositor_sync_window_geometry (MetaCompositor *compositor, meta_compositor_sync_window_geometry (MetaCompositor *compositor,
MetaWindow *window, MetaWindow *window,
@@ -1353,6 +1419,7 @@ pre_paint_windows (MetaCompScreen *info)
{ {
GList *l; GList *l;
MetaWindowActor *top_window; MetaWindowActor *top_window;
MetaWindowActor *expected_unredirected_window = NULL;
if (info->onscreen == NULL) if (info->onscreen == NULL)
{ {
@@ -1370,9 +1437,26 @@ pre_paint_windows (MetaCompScreen *info)
if (meta_window_actor_should_unredirect (top_window) && if (meta_window_actor_should_unredirect (top_window) &&
info->disable_unredirect_count == 0) info->disable_unredirect_count == 0)
set_unredirected_window (info, meta_window_actor_get_meta_window (top_window)); expected_unredirected_window = top_window;
else
set_unredirected_window (info, NULL); if (info->unredirected_window != expected_unredirected_window)
{
if (info->unredirected_window != NULL)
{
meta_window_actor_set_redirected (info->unredirected_window, TRUE);
meta_shape_cow_for_window (meta_window_get_screen (meta_window_actor_get_meta_window (info->unredirected_window)),
NULL);
}
if (expected_unredirected_window != NULL)
{
meta_shape_cow_for_window (meta_window_get_screen (meta_window_actor_get_meta_window (top_window)),
meta_window_actor_get_meta_window (top_window));
meta_window_actor_set_redirected (top_window, FALSE);
}
info->unredirected_window = expected_unredirected_window;
}
for (l = info->windows; l; l = l->next) for (l = info->windows; l; l = l->next)
meta_window_actor_pre_paint (l->data); meta_window_actor_pre_paint (l->data);
@@ -1426,7 +1510,13 @@ on_shadow_factory_changed (MetaShadowFactory *factory,
MetaCompositor * MetaCompositor *
meta_compositor_new (MetaDisplay *display) meta_compositor_new (MetaDisplay *display)
{ {
char *atom_names[] = {
"_XROOTPMAP_ID",
"_NET_WM_WINDOW_OPACITY",
};
Atom atoms[G_N_ELEMENTS(atom_names)];
MetaCompositor *compositor; MetaCompositor *compositor;
Display *xdisplay = meta_display_get_xdisplay (display);
if (!composite_at_least_version (display, 0, 3)) if (!composite_at_least_version (display, 0, 3))
return NULL; return NULL;
@@ -1438,11 +1528,18 @@ meta_compositor_new (MetaDisplay *display)
if (g_getenv("META_DISABLE_MIPMAPS")) if (g_getenv("META_DISABLE_MIPMAPS"))
compositor->no_mipmaps = TRUE; compositor->no_mipmaps = TRUE;
meta_verbose ("Creating %d atoms\n", (int) G_N_ELEMENTS (atom_names));
XInternAtoms (xdisplay, atom_names, G_N_ELEMENTS (atom_names),
False, atoms);
g_signal_connect (meta_shadow_factory_get_default (), g_signal_connect (meta_shadow_factory_get_default (),
"changed", "changed",
G_CALLBACK (on_shadow_factory_changed), G_CALLBACK (on_shadow_factory_changed),
compositor); compositor);
compositor->atom_x_root_pixmap = atoms[0];
compositor->atom_net_wm_window_opacity = atoms[1];
compositor->repaint_func_id = clutter_threads_add_repaint_func (meta_repaint_func, compositor->repaint_func_id = clutter_threads_add_repaint_func (meta_repaint_func,
compositor, compositor,
NULL); NULL);
@@ -1587,31 +1684,3 @@ meta_compositor_monotonic_time_to_server_time (MetaDisplay *display,
else else
return monotonic_time + compositor->server_time_offset; return monotonic_time + compositor->server_time_offset;
} }
void
meta_compositor_show_tile_preview (MetaCompositor *compositor,
MetaScreen *screen,
MetaWindow *window,
MetaRectangle *tile_rect,
int tile_monitor_number)
{
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
if (!info->plugin_mgr)
return;
meta_plugin_manager_show_tile_preview (info->plugin_mgr,
window, tile_rect, tile_monitor_number);
}
void
meta_compositor_hide_tile_preview (MetaCompositor *compositor,
MetaScreen *screen)
{
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
if (!info->plugin_mgr)
return;
meta_plugin_manager_hide_tile_preview (info->plugin_mgr);
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -14,7 +14,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
/** /**
@@ -35,7 +37,6 @@
#include "mutter-enum-types.h" #include "mutter-enum-types.h"
#include <meta/errors.h> #include <meta/errors.h>
#include <meta/meta-background.h> #include <meta/meta-background.h>
#include "util-private.h"
#include "meta-background-actor-private.h" #include "meta-background-actor-private.h"
#define FRAGMENT_SHADER_DECLARATIONS \ #define FRAGMENT_SHADER_DECLARATIONS \
@@ -411,13 +412,13 @@ meta_background_paint_content (ClutterContent *content,
*/ */
if (META_IS_BACKGROUND_ACTOR (actor)) if (META_IS_BACKGROUND_ACTOR (actor))
{ {
cairo_region_t *clip_region; cairo_region_t *visible_region;
clip_region = meta_background_actor_get_clip_region (META_BACKGROUND_ACTOR (actor)); visible_region = meta_background_actor_get_visible_region (META_BACKGROUND_ACTOR (actor));
if (clip_region != NULL) if (visible_region != NULL)
{ {
cairo_region_intersect (paintable_region, clip_region); cairo_region_intersect (paintable_region, visible_region);
cairo_region_destroy (clip_region); cairo_region_destroy (visible_region);
} }
} }
@@ -1030,6 +1031,7 @@ meta_background_load_file_finish (MetaBackground *self,
GAsyncResult *result, GAsyncResult *result,
GError **error) GError **error)
{ {
static CoglUserDataKey key;
GTask *task; GTask *task;
LoadFileTaskData *task_data; LoadFileTaskData *task_data;
CoglTexture *texture; CoglTexture *texture;
@@ -1075,6 +1077,12 @@ meta_background_load_file_finish (MetaBackground *self,
goto out; goto out;
} }
cogl_object_set_user_data (COGL_OBJECT (texture),
&key,
g_object_ref (pixbuf),
(CoglUserDataDestroyCallback)
g_object_unref);
ensure_pipeline (self); ensure_pipeline (self);
unset_texture (self); unset_texture (self);
set_style (self, task_data->style); set_style (self, task_data->style);

View File

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

View File

@@ -1,66 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2013 Red Hat
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*
* Written by:
* Owen Taylor <otaylor@redhat.com>
* Ray Strode <rstrode@redhat.com>
* Jasper St. Pierre <jstpierre@mecheye.net>
*/
#ifndef __META_CULLABLE_H__
#define __META_CULLABLE_H__
#include <clutter/clutter.h>
G_BEGIN_DECLS
#define META_TYPE_CULLABLE (meta_cullable_get_type ())
#define META_CULLABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_CULLABLE, MetaCullable))
#define META_IS_CULLABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_CULLABLE))
#define META_CULLABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), META_TYPE_CULLABLE, MetaCullableInterface))
typedef struct _MetaCullable MetaCullable;
typedef struct _MetaCullableInterface MetaCullableInterface;
struct _MetaCullableInterface
{
GTypeInterface g_iface;
void (* cull_out) (MetaCullable *cullable,
cairo_region_t *unobscured_region,
cairo_region_t *clip_region);
void (* reset_culling) (MetaCullable *cullable);
};
GType meta_cullable_get_type (void);
void meta_cullable_cull_out (MetaCullable *cullable,
cairo_region_t *unobscured_region,
cairo_region_t *clip_region);
void meta_cullable_reset_culling (MetaCullable *cullable);
/* Utility methods for implementations */
void meta_cullable_cull_out_children (MetaCullable *cullable,
cairo_region_t *unobscured_region,
cairo_region_t *clip_region);
void meta_cullable_reset_culling_children (MetaCullable *cullable);
G_END_DECLS
#endif /* __META_CULLABLE_H__ */

View File

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

View File

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

View File

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

View File

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

View File

@@ -16,7 +16,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
/** /**
@@ -136,7 +138,9 @@ meta_plugin_class_init (MetaPluginClass *klass)
static void static void
meta_plugin_init (MetaPlugin *self) meta_plugin_init (MetaPlugin *self)
{ {
self->priv = META_PLUGIN_GET_PRIVATE (self); MetaPluginPrivate *priv;
self->priv = priv = META_PLUGIN_GET_PRIVATE (self);
} }
gboolean gboolean
@@ -181,18 +185,6 @@ _meta_plugin_effect_started (MetaPlugin *plugin)
priv->running++; priv->running++;
} }
gboolean
_meta_plugin_xevent_filter (MetaPlugin *plugin,
XEvent *xev)
{
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
if (klass->xevent_filter && klass->xevent_filter (plugin, xev))
return TRUE;
else
return clutter_x11_handle_event (xev) != CLUTTER_X11_FILTER_CONTINUE;
}
void void
meta_plugin_switch_workspace_completed (MetaPlugin *plugin) meta_plugin_switch_workspace_completed (MetaPlugin *plugin)
{ {
@@ -275,6 +267,10 @@ meta_plugin_destroy_completed (MetaPlugin *plugin,
/** /**
* meta_plugin_begin_modal: * meta_plugin_begin_modal:
* @plugin: a #MetaPlugin * @plugin: a #MetaPlugin
* @grab_window: the X window to grab the keyboard and mouse on
* @cursor: the cursor to use for the pointer grab, or None,
* to use the normal cursor for the grab window and
* its descendants.
* @options: flags that modify the behavior of the modal grab * @options: flags that modify the behavior of the modal grab
* @timestamp: the timestamp used for establishing grabs * @timestamp: the timestamp used for establishing grabs
* *
@@ -295,13 +291,15 @@ meta_plugin_destroy_completed (MetaPlugin *plugin,
*/ */
gboolean gboolean
meta_plugin_begin_modal (MetaPlugin *plugin, meta_plugin_begin_modal (MetaPlugin *plugin,
Window grab_window,
Cursor cursor,
MetaModalOptions options, MetaModalOptions options,
guint32 timestamp) guint32 timestamp)
{ {
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv; MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
return meta_begin_modal_for_plugin (priv->screen, plugin, return meta_begin_modal_for_plugin (priv->screen, plugin,
options, timestamp); grab_window, cursor, options, timestamp);
} }
/** /**

View File

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

View File

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

View File

@@ -1,39 +0,0 @@
/*
* shaped texture
*
* An actor to draw a texture clipped to a list of rectangles
*
* Authored By Neil Roberts <neil@linux.intel.com>
*
* Copyright (C) 2008 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_SHAPED_TEXTURE_PRIVATE_H__
#define __META_SHAPED_TEXTURE_PRIVATE_H__
#include <meta/meta-shaped-texture.h>
ClutterActor *meta_shaped_texture_new (void);
void meta_shaped_texture_set_texture (MetaShapedTexture *stex,
CoglTexture *texture);
gboolean meta_shaped_texture_get_unobscured_bounds (MetaShapedTexture *stex,
cairo_rectangle_int_t *unobscured_bounds);
gboolean meta_shaped_texture_is_obscured (MetaShapedTexture *self);
#endif

View File

@@ -16,7 +16,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
/** /**
@@ -28,16 +30,12 @@
#include <config.h> #include <config.h>
#include <meta/meta-shaped-texture.h> #include <meta/meta-shaped-texture.h>
#include "clutter-utils.h"
#include "meta-texture-tower.h" #include "meta-texture-tower.h"
#include "meta-shaped-texture-private.h"
#include "meta-window-actor-private.h"
#include <clutter/clutter.h> #include <clutter/clutter.h>
#include <cogl/cogl.h> #include <cogl/cogl.h>
#include <cogl/cogl-texture-pixmap-x11.h>
#include <gdk/gdk.h> /* for gdk_rectangle_intersect() */ #include <gdk/gdk.h> /* for gdk_rectangle_intersect() */
#include "meta-cullable.h"
static void meta_shaped_texture_dispose (GObject *object); static void meta_shaped_texture_dispose (GObject *object);
@@ -57,10 +55,8 @@ static void meta_shaped_texture_get_preferred_height (ClutterActor *self,
static gboolean meta_shaped_texture_get_paint_volume (ClutterActor *self, ClutterPaintVolume *volume); static gboolean meta_shaped_texture_get_paint_volume (ClutterActor *self, ClutterPaintVolume *volume);
static void cullable_iface_init (MetaCullableInterface *iface); G_DEFINE_TYPE (MetaShapedTexture, meta_shaped_texture,
CLUTTER_TYPE_ACTOR);
G_DEFINE_TYPE_WITH_CODE (MetaShapedTexture, meta_shaped_texture, CLUTTER_TYPE_ACTOR,
G_IMPLEMENT_INTERFACE (META_TYPE_CULLABLE, cullable_iface_init));
#define META_SHAPED_TEXTURE_GET_PRIVATE(obj) \ #define META_SHAPED_TEXTURE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), META_TYPE_SHAPED_TEXTURE, \ (G_TYPE_INSTANCE_GET_PRIVATE ((obj), META_TYPE_SHAPED_TEXTURE, \
@@ -69,18 +65,13 @@ G_DEFINE_TYPE_WITH_CODE (MetaShapedTexture, meta_shaped_texture, CLUTTER_TYPE_AC
struct _MetaShapedTexturePrivate struct _MetaShapedTexturePrivate
{ {
MetaTextureTower *paint_tower; MetaTextureTower *paint_tower;
Pixmap pixmap;
CoglTexture *texture; CoglTexturePixmapX11 *texture;
CoglTexture *mask_texture; CoglTexture *mask_texture;
CoglPipeline *pipeline;
CoglPipeline *pipeline_unshaped;
cairo_region_t *input_shape_region;
/* The region containing only fully opaque pixels */
cairo_region_t *opaque_region;
/* MetaCullable regions, see that documentation for more details */
cairo_region_t *clip_region; cairo_region_t *clip_region;
cairo_region_t *unobscured_region;
guint tex_width, tex_height; guint tex_width, tex_height;
@@ -112,38 +103,11 @@ meta_shaped_texture_init (MetaShapedTexture *self)
priv = self->priv = META_SHAPED_TEXTURE_GET_PRIVATE (self); priv = self->priv = META_SHAPED_TEXTURE_GET_PRIVATE (self);
priv->paint_tower = meta_texture_tower_new (); priv->paint_tower = meta_texture_tower_new ();
priv->texture = NULL; priv->texture = NULL;
priv->mask_texture = NULL; priv->mask_texture = NULL;
priv->create_mipmaps = TRUE; priv->create_mipmaps = TRUE;
} }
static void
set_unobscured_region (MetaShapedTexture *self,
cairo_region_t *unobscured_region)
{
MetaShapedTexturePrivate *priv = self->priv;
g_clear_pointer (&priv->unobscured_region, (GDestroyNotify) cairo_region_destroy);
if (unobscured_region)
{
cairo_rectangle_int_t bounds = { 0, 0, priv->tex_width, priv->tex_height };
priv->unobscured_region = cairo_region_copy (unobscured_region);
cairo_region_intersect_rectangle (priv->unobscured_region, &bounds);
}
}
static void
set_clip_region (MetaShapedTexture *self,
cairo_region_t *clip_region)
{
MetaShapedTexturePrivate *priv = self->priv;
g_clear_pointer (&priv->clip_region, (GDestroyNotify) cairo_region_destroy);
if (clip_region)
priv->clip_region = cairo_region_copy (clip_region);
}
static void static void
meta_shaped_texture_dispose (GObject *object) meta_shaped_texture_dispose (GObject *object)
{ {
@@ -154,98 +118,29 @@ meta_shaped_texture_dispose (GObject *object)
meta_texture_tower_free (priv->paint_tower); meta_texture_tower_free (priv->paint_tower);
priv->paint_tower = NULL; priv->paint_tower = NULL;
g_clear_pointer (&priv->pipeline, cogl_object_unref);
g_clear_pointer (&priv->pipeline_unshaped, cogl_object_unref);
g_clear_pointer (&priv->texture, cogl_object_unref); 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_mask_texture (self, NULL);
set_unobscured_region (self, NULL); meta_shaped_texture_set_clip_region (self, NULL);
set_clip_region (self, NULL);
G_OBJECT_CLASS (meta_shaped_texture_parent_class)->dispose (object); G_OBJECT_CLASS (meta_shaped_texture_parent_class)->dispose (object);
} }
static CoglPipeline *
get_unmasked_pipeline (CoglContext *ctx)
{
return cogl_pipeline_new (ctx);
}
static CoglPipeline *
get_masked_pipeline (CoglContext *ctx)
{
static CoglPipeline *template = NULL;
if (G_UNLIKELY (template == NULL))
{
template = cogl_pipeline_new (ctx);
cogl_pipeline_set_layer_combine (template, 1,
"RGBA = MODULATE (PREVIOUS, TEXTURE[A])",
NULL);
}
return cogl_pipeline_copy (template);
}
static CoglPipeline *
get_unblended_pipeline (CoglContext *ctx)
{
static CoglPipeline *template = NULL;
if (G_UNLIKELY (template == NULL))
{
CoglColor color;
template = cogl_pipeline_new (ctx);
cogl_color_init_from_4ub (&color, 255, 255, 255, 255);
cogl_pipeline_set_blend (template,
"RGBA = ADD (SRC_COLOR, 0)",
NULL);
cogl_pipeline_set_color (template, &color);
}
return cogl_pipeline_copy (template);
}
static void
paint_clipped_rectangle (CoglFramebuffer *fb,
CoglPipeline *pipeline,
cairo_rectangle_int_t *rect,
ClutterActorBox *alloc)
{
float coords[8];
float x1, y1, x2, y2;
x1 = rect->x;
y1 = rect->y;
x2 = rect->x + rect->width;
y2 = rect->y + rect->height;
coords[0] = rect->x / (alloc->x2 - alloc->x1);
coords[1] = rect->y / (alloc->y2 - alloc->y1);
coords[2] = (rect->x + rect->width) / (alloc->x2 - alloc->x1);
coords[3] = (rect->y + rect->height) / (alloc->y2 - alloc->y1);
coords[4] = coords[0];
coords[5] = coords[1];
coords[6] = coords[2];
coords[7] = coords[3];
cogl_framebuffer_draw_multitextured_rectangle (fb, pipeline,
x1, y1, x2, y2,
&coords[0], 8);
}
static void static void
meta_shaped_texture_paint (ClutterActor *actor) meta_shaped_texture_paint (ClutterActor *actor)
{ {
MetaShapedTexture *stex = (MetaShapedTexture *) actor; MetaShapedTexture *stex = (MetaShapedTexture *) actor;
MetaShapedTexturePrivate *priv = stex->priv; MetaShapedTexturePrivate *priv = stex->priv;
guint tex_width, tex_height;
guchar opacity;
CoglContext *ctx;
CoglFramebuffer *fb;
CoglPipeline *pipeline = NULL;
CoglTexture *paint_tex; CoglTexture *paint_tex;
guint tex_width, tex_height;
ClutterActorBox alloc; ClutterActorBox alloc;
cairo_region_t *blended_region = NULL;
CoglPipelineFilter filter; static CoglPipeline *pipeline_template = NULL;
static CoglPipeline *pipeline_unshaped_template = NULL;
CoglPipeline *pipeline;
if (priv->clip_region && cairo_region_is_empty (priv->clip_region)) if (priv->clip_region && cairo_region_is_empty (priv->clip_region))
return; return;
@@ -282,137 +177,105 @@ meta_shaped_texture_paint (ClutterActor *actor)
if (tex_width == 0 || tex_height == 0) /* no contents yet */ if (tex_width == 0 || tex_height == 0) /* no contents yet */
return; return;
/* Use nearest-pixel interpolation if the texture is unscaled. This
* improves performance, especially with software rendering.
*/
filter = COGL_PIPELINE_FILTER_LINEAR;
if (!clutter_actor_is_in_clone_paint (actor) && meta_actor_is_untransformed (actor, NULL, NULL))
filter = COGL_PIPELINE_FILTER_NEAREST;
ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
fb = cogl_get_draw_framebuffer ();
opacity = clutter_actor_get_paint_opacity (actor);
clutter_actor_get_allocation_box (actor, &alloc);
if (priv->opaque_region != NULL && opacity == 255)
{
CoglPipeline *opaque_pipeline;
cairo_region_t *region;
int n_rects;
int i;
if (priv->clip_region != NULL)
{
region = cairo_region_copy (priv->clip_region);
cairo_region_intersect (region, priv->opaque_region);
}
else
{
region = cairo_region_reference (priv->opaque_region);
}
if (cairo_region_is_empty (region))
goto paint_blended;
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++)
{
cairo_rectangle_int_t rect;
cairo_region_get_rectangle (region, i, &rect);
paint_clipped_rectangle (fb, opaque_pipeline, &rect, &alloc);
}
cogl_object_unref (opaque_pipeline);
if (priv->clip_region != NULL)
{
blended_region = cairo_region_copy (priv->clip_region);
}
else
{
cairo_rectangle_int_t rect = { 0, 0, tex_width, tex_height };
blended_region = cairo_region_create_rectangle (&rect);
}
cairo_region_subtract (blended_region, priv->opaque_region);
paint_blended:
cairo_region_destroy (region);
}
if (blended_region == NULL && priv->clip_region != NULL)
blended_region = cairo_region_reference (priv->clip_region);
if (blended_region != NULL && cairo_region_is_empty (blended_region))
goto out;
if (priv->mask_texture == NULL) if (priv->mask_texture == NULL)
{ {
pipeline = get_unmasked_pipeline (ctx); /* Use a single-layer texture if we don't have a mask. */
if (priv->pipeline_unshaped == NULL)
{
if (G_UNLIKELY (pipeline_unshaped_template == NULL))
{
CoglContext *ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
pipeline_unshaped_template = cogl_pipeline_new (ctx);
}
priv->pipeline_unshaped = cogl_pipeline_copy (pipeline_unshaped_template);
}
pipeline = priv->pipeline_unshaped;
} }
else else
{ {
pipeline = get_masked_pipeline (ctx); if (priv->pipeline == NULL)
{
if (G_UNLIKELY (pipeline_template == NULL))
{
CoglContext *ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
pipeline_template = cogl_pipeline_new (ctx);
cogl_pipeline_set_layer_combine (pipeline_template, 1,
"RGBA = MODULATE (PREVIOUS, TEXTURE[A])",
NULL);
}
priv->pipeline = cogl_pipeline_copy (pipeline_template);
}
pipeline = priv->pipeline;
cogl_pipeline_set_layer_texture (pipeline, 1, priv->mask_texture); cogl_pipeline_set_layer_texture (pipeline, 1, priv->mask_texture);
cogl_pipeline_set_layer_filters (pipeline, 1, filter, filter);
} }
cogl_pipeline_set_layer_texture (pipeline, 0, paint_tex); cogl_pipeline_set_layer_texture (pipeline, 0, paint_tex);
cogl_pipeline_set_layer_filters (pipeline, 0, filter, filter);
{ {
CoglColor color; CoglColor color;
cogl_color_init_from_4ub (&color, opacity, opacity, opacity, opacity); guchar opacity = clutter_actor_get_paint_opacity (actor);
cogl_color_set_from_4ub (&color, opacity, opacity, opacity, opacity);
cogl_pipeline_set_color (pipeline, &color); cogl_pipeline_set_color (pipeline, &color);
} }
if (blended_region != NULL) cogl_set_source (pipeline);
clutter_actor_get_allocation_box (actor, &alloc);
if (priv->clip_region)
{ {
int n_rects; int n_rects;
int i;
cairo_rectangle_int_t tex_rect = { 0, 0, tex_width, tex_height };
/* Limit to how many separate rectangles we'll draw; beyond this just /* Limit to how many separate rectangles we'll draw; beyond this just
* fall back and draw the whole thing */ * fall back and draw the whole thing */
# define MAX_RECTS 16 # define MAX_RECTS 16
n_rects = cairo_region_num_rectangles (blended_region); n_rects = cairo_region_num_rectangles (priv->clip_region);
if (n_rects <= MAX_RECTS) if (n_rects <= MAX_RECTS)
{ {
int i; float coords[8];
cairo_rectangle_int_t tex_rect = { 0, 0, tex_width, tex_height }; float x1, y1, x2, y2;
for (i = 0; i < n_rects; i++) for (i = 0; i < n_rects; i++)
{ {
cairo_rectangle_int_t rect; cairo_rectangle_int_t rect;
cairo_region_get_rectangle (blended_region, i, &rect); cairo_region_get_rectangle (priv->clip_region, i, &rect);
if (!gdk_rectangle_intersect (&tex_rect, &rect, &rect)) if (!gdk_rectangle_intersect (&tex_rect, &rect, &rect))
continue; continue;
paint_clipped_rectangle (fb, pipeline, &rect, &alloc); x1 = rect.x;
y1 = rect.y;
x2 = rect.x + rect.width;
y2 = rect.y + rect.height;
coords[0] = rect.x / (alloc.x2 - alloc.x1);
coords[1] = rect.y / (alloc.y2 - alloc.y1);
coords[2] = (rect.x + rect.width) / (alloc.x2 - alloc.x1);
coords[3] = (rect.y + rect.height) / (alloc.y2 - alloc.y1);
coords[4] = coords[0];
coords[5] = coords[1];
coords[6] = coords[2];
coords[7] = coords[3];
cogl_rectangle_with_multitexture_coords (x1, y1, x2, y2,
&coords[0], 8);
} }
goto out; return;
} }
} }
cogl_framebuffer_draw_rectangle (fb, pipeline, cogl_rectangle (0, 0,
0, 0, alloc.x2 - alloc.x1,
alloc.x2 - alloc.x1, alloc.y2 - alloc.y1);
alloc.y2 - alloc.y1);
out:
if (pipeline != NULL)
cogl_object_unref (pipeline);
if (blended_region != NULL)
cairo_region_destroy (blended_region);
} }
static void static void
@@ -422,61 +285,38 @@ meta_shaped_texture_pick (ClutterActor *actor,
MetaShapedTexture *stex = (MetaShapedTexture *) actor; MetaShapedTexture *stex = (MetaShapedTexture *) actor;
MetaShapedTexturePrivate *priv = stex->priv; MetaShapedTexturePrivate *priv = stex->priv;
if (!clutter_actor_should_pick_paint (actor) ||
(priv->clip_region && cairo_region_is_empty (priv->clip_region)))
return;
/* If there is no region then use the regular pick */ /* If there is no region then use the regular pick */
if (priv->input_shape_region == NULL) if (priv->mask_texture == NULL)
CLUTTER_ACTOR_CLASS (meta_shaped_texture_parent_class)->pick (actor, color); CLUTTER_ACTOR_CLASS (meta_shaped_texture_parent_class)
else ->pick (actor, color);
else if (clutter_actor_should_pick_paint (actor))
{ {
int n_rects; CoglTexture *paint_tex;
float *rectangles; ClutterActorBox alloc;
int i; guint tex_width, tex_height;
CoglPipeline *pipeline;
CoglContext *ctx;
CoglFramebuffer *fb;
CoglColor cogl_color;
/* Note: We don't bother trying to intersect the pick and clip regions paint_tex = COGL_TEXTURE (priv->texture);
* since needing to copy the region, do the intersection, and probably
* increase the number of rectangles seems more likely to have a negative
* effect.
*
* NB: Most of the time when just using rectangles for picking then
* picking shouldn't involve any rendering, and minimizing the number of
* rectangles has more benefit than reducing the area of the pick
* region.
*/
n_rects = cairo_region_num_rectangles (priv->input_shape_region); if (paint_tex == NULL)
rectangles = g_alloca (sizeof (float) * 4 * n_rects); return;
for (i = 0; i < n_rects; i++) tex_width = cogl_texture_get_width (paint_tex);
{ tex_height = cogl_texture_get_height (paint_tex);
cairo_rectangle_int_t rect;
int pos = i * 4;
cairo_region_get_rectangle (priv->input_shape_region, i, &rect); if (tex_width == 0 || tex_height == 0) /* no contents yet */
return;
rectangles[pos] = rect.x; cogl_set_source_color4ub (color->red, color->green, color->blue,
rectangles[pos + 1] = rect.y; color->alpha);
rectangles[pos + 2] = rect.x + rect.width;
rectangles[pos + 3] = rect.y + rect.height;
}
ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ()); clutter_actor_get_allocation_box (actor, &alloc);
fb = cogl_get_draw_framebuffer ();
cogl_color_init_from_4ub (&cogl_color, color->red, color->green, color->blue, color->alpha); /* Paint the mask rectangle in the given color */
cogl_set_source_texture (priv->mask_texture);
pipeline = cogl_pipeline_new (ctx); cogl_rectangle_with_texture_coords (0, 0,
cogl_pipeline_set_color (pipeline, &cogl_color); alloc.x2 - alloc.x1,
alloc.y2 - alloc.y1,
cogl_framebuffer_draw_rectangles (fb, pipeline, 0, 0, 1, 1);
rectangles, n_rects);
cogl_object_unref (pipeline);
} }
} }
@@ -519,37 +359,18 @@ meta_shaped_texture_get_preferred_height (ClutterActor *self,
} }
static gboolean static gboolean
meta_shaped_texture_get_paint_volume (ClutterActor *actor, meta_shaped_texture_get_paint_volume (ClutterActor *self,
ClutterPaintVolume *volume) ClutterPaintVolume *volume)
{ {
MetaShapedTexture *self = META_SHAPED_TEXTURE (actor); return clutter_paint_volume_set_from_allocation (volume, self);
cairo_rectangle_int_t unobscured_bounds; }
if (!clutter_paint_volume_set_from_allocation (volume, actor)) ClutterActor *
return FALSE; meta_shaped_texture_new (void)
{
ClutterActor *self = g_object_new (META_TYPE_SHAPED_TEXTURE, NULL);
if (meta_shaped_texture_get_unobscured_bounds (self, &unobscured_bounds)) return self;
{
ClutterVertex origin;
cairo_rectangle_int_t bounds;
/* I hate ClutterPaintVolume so much... */
clutter_paint_volume_get_origin (volume, &origin);
bounds.x = origin.x;
bounds.y = origin.y;
bounds.width = clutter_paint_volume_get_width (volume);
bounds.height = clutter_paint_volume_get_height (volume);
gdk_rectangle_intersect (&bounds, &unobscured_bounds, &bounds);
origin.x = bounds.x;
origin.y = bounds.y;
clutter_paint_volume_set_origin (volume, &origin);
clutter_paint_volume_set_width (volume, bounds.width);
clutter_paint_volume_set_height (volume, bounds.height);
}
return TRUE;
} }
void void
@@ -568,7 +389,8 @@ meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *stex,
{ {
CoglTexture *base_texture; CoglTexture *base_texture;
priv->create_mipmaps = create_mipmaps; priv->create_mipmaps = create_mipmaps;
base_texture = create_mipmaps ? priv->texture : NULL; base_texture = create_mipmaps ?
COGL_TEXTURE (priv->texture) : NULL;
meta_texture_tower_set_base_texture (priv->paint_tower, base_texture); meta_texture_tower_set_base_texture (priv->paint_tower, base_texture);
} }
} }
@@ -594,64 +416,7 @@ meta_shaped_texture_set_mask_texture (MetaShapedTexture *stex,
clutter_actor_queue_redraw (CLUTTER_ACTOR (stex)); clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
} }
static cairo_region_t * void
effective_unobscured_region (MetaShapedTexture *self)
{
MetaShapedTexturePrivate *priv = self->priv;
ClutterActor *parent = clutter_actor_get_parent (CLUTTER_ACTOR (self));
if (clutter_actor_has_mapped_clones (CLUTTER_ACTOR (self)))
return NULL;
while (parent && !META_IS_WINDOW_ACTOR (parent))
parent = clutter_actor_get_parent (parent);
if (parent && clutter_actor_has_mapped_clones (parent))
return NULL;
return priv->unobscured_region;
}
gboolean
meta_shaped_texture_get_unobscured_bounds (MetaShapedTexture *self,
cairo_rectangle_int_t *unobscured_bounds)
{
cairo_region_t *unobscured_region = effective_unobscured_region (self);
if (unobscured_region)
{
cairo_region_get_extents (unobscured_region, unobscured_bounds);
return TRUE;
}
else
return FALSE;
}
gboolean
meta_shaped_texture_is_obscured (MetaShapedTexture *self)
{
cairo_region_t *unobscured_region = effective_unobscured_region (self);
if (unobscured_region)
return cairo_region_is_empty (unobscured_region);
else
return FALSE;
}
/**
* meta_shaped_texture_update_area:
* @stex: #MetaShapedTexture
* @x: the x coordinate of the damaged area
* @y: the y coordinate of the damaged area
* @width: the width of the damaged area
* @height: the height of the damaged area
*
* Repairs the damaged area indicated by @x, @y, @width and @height
* and potentially queues a redraw.
*
* Return value: Whether a redraw have been queued or not
*/
gboolean
meta_shaped_texture_update_area (MetaShapedTexture *stex, meta_shaped_texture_update_area (MetaShapedTexture *stex,
int x, int x,
int y, int y,
@@ -659,49 +424,24 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
int height) int height)
{ {
MetaShapedTexturePrivate *priv; MetaShapedTexturePrivate *priv;
cairo_region_t *unobscured_region;
const cairo_rectangle_int_t clip = { x, y, width, height }; const cairo_rectangle_int_t clip = { x, y, width, height };
priv = stex->priv; priv = stex->priv;
if (priv->texture == NULL) if (priv->texture == NULL)
return FALSE; return;
cogl_texture_pixmap_x11_update_area (priv->texture,
x, y, width, height);
meta_texture_tower_update_area (priv->paint_tower, x, y, width, height); meta_texture_tower_update_area (priv->paint_tower, x, y, width, height);
unobscured_region = effective_unobscured_region (stex); clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stex), &clip);
if (unobscured_region)
{
cairo_region_t *intersection;
if (cairo_region_is_empty (unobscured_region))
return FALSE;
intersection = cairo_region_copy (unobscured_region);
cairo_region_intersect_rectangle (intersection, &clip);
if (!cairo_region_is_empty (intersection))
{
cairo_rectangle_int_t damage_rect;
cairo_region_get_extents (intersection, &damage_rect);
clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stex), &damage_rect);
cairo_region_destroy (intersection);
return TRUE;
}
cairo_region_destroy (intersection);
return FALSE;
}
else
{
clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stex), &clip);
return TRUE;
}
} }
static void static void
set_cogl_texture (MetaShapedTexture *stex, set_cogl_texture (MetaShapedTexture *stex,
CoglTexture *cogl_tex) CoglTexturePixmapX11 *cogl_tex)
{ {
MetaShapedTexturePrivate *priv; MetaShapedTexturePrivate *priv;
guint width, height; guint width, height;
@@ -715,6 +455,12 @@ set_cogl_texture (MetaShapedTexture *stex,
priv->texture = cogl_tex; priv->texture = cogl_tex;
if (priv->pipeline != NULL)
cogl_pipeline_set_layer_texture (priv->pipeline, 0, COGL_TEXTURE (cogl_tex));
if (priv->pipeline_unshaped != NULL)
cogl_pipeline_set_layer_texture (priv->pipeline_unshaped, 0, COGL_TEXTURE (cogl_tex));
if (cogl_tex != NULL) if (cogl_tex != NULL)
{ {
width = cogl_texture_get_width (COGL_TEXTURE (cogl_tex)); width = cogl_texture_get_width (COGL_TEXTURE (cogl_tex));
@@ -731,33 +477,47 @@ set_cogl_texture (MetaShapedTexture *stex,
} }
else else
{ {
/* size changed to 0 going to an invalid texture */ /* size changed to 0 going to an inavlid texture */
priv->tex_width = 0; priv->tex_width = 0;
priv->tex_height = 0; priv->tex_height = 0;
clutter_actor_queue_relayout (CLUTTER_ACTOR (stex)); clutter_actor_queue_relayout (CLUTTER_ACTOR (stex));
} }
/* NB: We don't queue a redraw of the actor here because we don't clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
* know how much of the buffer has changed with respect to the
* previous buffer. We only queue a redraw in response to surface
* damage. */
if (priv->create_mipmaps)
meta_texture_tower_set_base_texture (priv->paint_tower, cogl_tex);
} }
/** /**
* meta_shaped_texture_set_texture: * meta_shaped_texture_set_pixmap:
* @stex: The #MetaShapedTexture * @stex: The #MetaShapedTexture
* @pixmap: The #CoglTexture to display * @pixmap: The pixmap you want the stex to assume
*/ */
void void
meta_shaped_texture_set_texture (MetaShapedTexture *stex, meta_shaped_texture_set_pixmap (MetaShapedTexture *stex,
CoglTexture *texture) Pixmap pixmap)
{ {
MetaShapedTexturePrivate *priv;
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex)); g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
set_cogl_texture (stex, texture); priv = stex->priv;
if (priv->pixmap == pixmap)
return;
priv->pixmap = pixmap;
if (pixmap != None)
{
CoglContext *ctx =
clutter_backend_get_cogl_context (clutter_get_default_backend ());
set_cogl_texture (stex, cogl_texture_pixmap_x11_new (ctx, pixmap, FALSE, NULL));
}
else
set_cogl_texture (stex, NULL);
if (priv->create_mipmaps)
meta_texture_tower_set_base_texture (priv->paint_tower,
COGL_TEXTURE (priv->texture));
} }
/** /**
@@ -774,18 +534,22 @@ meta_shaped_texture_get_texture (MetaShapedTexture *stex)
} }
/** /**
* meta_shaped_texture_set_input_shape_region: * meta_shaped_texture_set_clip_region:
* @stex: a #MetaShapedTexture * @stex: a #MetaShapedTexture
* @shape_region: the region of the texture that should respond to * @clip_region: (transfer full): the region of the texture that
* input. * is visible and should be painted.
* *
* Determines what region of the texture should accept input. For * Provides a hint to the texture about what areas of the texture
* X based windows this is defined by the ShapeInput region of the * are not completely obscured and thus need to be painted. This
* window. * is an optimization and is not supposed to have any effect on
* the output.
*
* Typically a parent container will set the clip region before
* painting its children, and then unset it afterwards.
*/ */
void void
meta_shaped_texture_set_input_shape_region (MetaShapedTexture *stex, meta_shaped_texture_set_clip_region (MetaShapedTexture *stex,
cairo_region_t *shape_region) cairo_region_t *clip_region)
{ {
MetaShapedTexturePrivate *priv; MetaShapedTexturePrivate *priv;
@@ -793,49 +557,16 @@ meta_shaped_texture_set_input_shape_region (MetaShapedTexture *stex,
priv = stex->priv; priv = stex->priv;
if (priv->input_shape_region != NULL) if (priv->clip_region)
{ {
cairo_region_destroy (priv->input_shape_region); cairo_region_destroy (priv->clip_region);
priv->input_shape_region = NULL; priv->clip_region = NULL;
} }
if (shape_region != NULL) if (clip_region)
{ priv->clip_region = cairo_region_copy (clip_region);
cairo_region_reference (shape_region);
priv->input_shape_region = shape_region;
}
clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
}
/**
* meta_shaped_texture_set_opaque_region:
* @stex: a #MetaShapedTexture
* @opaque_region: (transfer full): the region of the texture that
* can have blending turned off.
*
* As most windows have a large portion that does not require blending,
* we can easily turn off blending if we know the areas that do not
* require blending. This sets the region where we will not blend for
* optimization purposes.
*/
void
meta_shaped_texture_set_opaque_region (MetaShapedTexture *stex,
cairo_region_t *opaque_region)
{
MetaShapedTexturePrivate *priv;
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
priv = stex->priv;
if (priv->opaque_region)
cairo_region_destroy (priv->opaque_region);
if (opaque_region)
priv->opaque_region = cairo_region_reference (opaque_region);
else else
priv->opaque_region = NULL; priv->clip_region = NULL;
} }
/** /**
@@ -935,46 +666,3 @@ meta_shaped_texture_get_image (MetaShapedTexture *stex,
return surface; return surface;
} }
static void
meta_shaped_texture_cull_out (MetaCullable *cullable,
cairo_region_t *unobscured_region,
cairo_region_t *clip_region)
{
MetaShapedTexture *self = META_SHAPED_TEXTURE (cullable);
MetaShapedTexturePrivate *priv = self->priv;
set_unobscured_region (self, unobscured_region);
set_clip_region (self, clip_region);
if (clutter_actor_get_paint_opacity (CLUTTER_ACTOR (self)) == 0xff)
{
if (priv->opaque_region)
{
if (unobscured_region)
cairo_region_subtract (unobscured_region, priv->opaque_region);
if (clip_region)
cairo_region_subtract (clip_region, priv->opaque_region);
}
}
}
static void
meta_shaped_texture_reset_culling (MetaCullable *cullable)
{
MetaShapedTexture *self = META_SHAPED_TEXTURE (cullable);
set_clip_region (self, NULL);
}
static void
cullable_iface_init (MetaCullableInterface *iface)
{
iface->cull_out = meta_shaped_texture_cull_out;
iface->reset_culling = meta_shaped_texture_reset_culling;
}
ClutterActor *
meta_shaped_texture_new (void)
{
return g_object_new (META_TYPE_SHAPED_TEXTURE, NULL);
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -35,13 +35,13 @@ void meta_window_actor_frame_complete (MetaWindowActor *self,
void meta_window_actor_invalidate_shadow (MetaWindowActor *self); void meta_window_actor_invalidate_shadow (MetaWindowActor *self);
void meta_window_actor_set_redirected (MetaWindowActor *self, gboolean state);
gboolean meta_window_actor_should_unredirect (MetaWindowActor *self);
void meta_window_actor_get_shape_bounds (MetaWindowActor *self, void meta_window_actor_get_shape_bounds (MetaWindowActor *self,
cairo_rectangle_int_t *bounds); cairo_rectangle_int_t *bounds);
gboolean meta_window_actor_should_unredirect (MetaWindowActor *self);
void meta_window_actor_set_unredirected (MetaWindowActor *self,
gboolean unredirected);
gboolean meta_window_actor_effect_in_progress (MetaWindowActor *self); gboolean meta_window_actor_effect_in_progress (MetaWindowActor *self);
void meta_window_actor_sync_actor_geometry (MetaWindowActor *self, void meta_window_actor_sync_actor_geometry (MetaWindowActor *self,
gboolean did_placement); gboolean did_placement);
@@ -55,6 +55,14 @@ void meta_window_actor_set_updates_frozen (MetaWindowActor *self,
void meta_window_actor_queue_frame_drawn (MetaWindowActor *self, void meta_window_actor_queue_frame_drawn (MetaWindowActor *self,
gboolean no_delay_frame); gboolean no_delay_frame);
cairo_region_t *meta_window_actor_get_obscured_region (MetaWindowActor *self);
void meta_window_actor_set_visible_region (MetaWindowActor *self,
cairo_region_t *visible_region);
void meta_window_actor_set_visible_region_beneath (MetaWindowActor *self,
cairo_region_t *beneath_region);
void meta_window_actor_reset_visible_regions (MetaWindowActor *self);
void meta_window_actor_effect_completed (MetaWindowActor *actor, void meta_window_actor_effect_completed (MetaWindowActor *actor,
gulong event); gulong event);

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -18,7 +18,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#include <config.h> #include <config.h>
@@ -116,6 +118,8 @@ typedef struct
{ {
MetaRectangle orig; MetaRectangle orig;
MetaRectangle current; MetaRectangle current;
MetaFrameBorders *borders;
gboolean must_free_borders;
ActionType action_type; ActionType action_type;
gboolean is_user_action; gboolean is_user_action;
@@ -191,6 +195,7 @@ static gboolean constrain_partially_onscreen (MetaWindow *window,
static void setup_constraint_info (ConstraintInfo *info, static void setup_constraint_info (ConstraintInfo *info,
MetaWindow *window, MetaWindow *window,
MetaFrameBorders *orig_borders,
MetaMoveResizeFlags flags, MetaMoveResizeFlags flags,
int resize_gravity, int resize_gravity,
const MetaRectangle *orig, const MetaRectangle *orig,
@@ -199,12 +204,13 @@ static void place_window_if_needed (MetaWindow *window,
ConstraintInfo *info); ConstraintInfo *info);
static void update_onscreen_requirements (MetaWindow *window, static void update_onscreen_requirements (MetaWindow *window,
ConstraintInfo *info); ConstraintInfo *info);
static void extend_by_frame (MetaWindow *window, static void extend_by_frame (MetaRectangle *rect,
MetaRectangle *rect); const MetaFrameBorders *borders);
static void unextend_by_frame (MetaWindow *window, static void unextend_by_frame (MetaRectangle *rect,
MetaRectangle *rect); const MetaFrameBorders *borders);
static inline void get_size_limits (MetaWindow *window, static inline void get_size_limits (const MetaWindow *window,
gboolean include_frame, const MetaFrameBorders *borders,
gboolean include_frame,
MetaRectangle *min_size, MetaRectangle *min_size,
MetaRectangle *max_size); MetaRectangle *max_size);
@@ -274,6 +280,7 @@ do_all_constraints (MetaWindow *window,
void void
meta_window_constrain (MetaWindow *window, meta_window_constrain (MetaWindow *window,
MetaFrameBorders *orig_borders,
MetaMoveResizeFlags flags, MetaMoveResizeFlags flags,
int resize_gravity, int resize_gravity,
const MetaRectangle *orig, const MetaRectangle *orig,
@@ -296,6 +303,7 @@ meta_window_constrain (MetaWindow *window,
setup_constraint_info (&info, setup_constraint_info (&info,
window, window,
orig_borders,
flags, flags,
resize_gravity, resize_gravity,
orig, orig,
@@ -325,11 +333,19 @@ meta_window_constrain (MetaWindow *window,
* if this was a user move or user move-and-resize operation. * if this was a user move or user move-and-resize operation.
*/ */
update_onscreen_requirements (window, &info); update_onscreen_requirements (window, &info);
/* Ew, what an ugly way to do things. Destructors (in a real OOP language,
* not gobject-style--gobject would be more pain than it's worth) or
* smart pointers would be so much nicer here. *shrug*
*/
if (info.must_free_borders)
g_free (info.borders);
} }
static void static void
setup_constraint_info (ConstraintInfo *info, setup_constraint_info (ConstraintInfo *info,
MetaWindow *window, MetaWindow *window,
MetaFrameBorders *orig_borders,
MetaMoveResizeFlags flags, MetaMoveResizeFlags flags,
int resize_gravity, int resize_gravity,
const MetaRectangle *orig, const MetaRectangle *orig,
@@ -341,6 +357,18 @@ setup_constraint_info (ConstraintInfo *info,
info->orig = *orig; info->orig = *orig;
info->current = *new; info->current = *new;
/* Create a fake frame geometry if none really exists */
if (orig_borders && !window->fullscreen)
{
info->borders = orig_borders;
info->must_free_borders = FALSE;
}
else
{
info->borders = g_new0 (MetaFrameBorders, 1);
info->must_free_borders = TRUE;
}
if (flags & META_IS_MOVE_ACTION && flags & META_IS_RESIZE_ACTION) if (flags & META_IS_MOVE_ACTION && flags & META_IS_RESIZE_ACTION)
info->action_type = ACTION_MOVE_AND_RESIZE; info->action_type = ACTION_MOVE_AND_RESIZE;
else if (flags & META_IS_RESIZE_ACTION) else if (flags & META_IS_RESIZE_ACTION)
@@ -419,14 +447,12 @@ setup_constraint_info (ConstraintInfo *info,
/* Workaround braindead legacy apps that don't know how to /* Workaround braindead legacy apps that don't know how to
* fullscreen themselves properly - don't get fooled by * fullscreen themselves properly - don't get fooled by
* windows which hide their titlebar when maximized or which are * windows which hide their titlebar when maximized; that's
* client decorated; that's not the same as fullscreen, even * not the same as fullscreen, even if there are no struts
* if there are no struts making the workarea smaller than * making the workarea smaller than the monitor.
* the monitor.
*/ */
if (meta_prefs_get_force_fullscreen() && if (meta_prefs_get_force_fullscreen() &&
!window->hide_titlebar_when_maximized && !window->hide_titlebar_when_maximized &&
(window->decorated || !meta_window_is_client_decorated (window)) &&
meta_rectangle_equal (new, &monitor_info->rect) && meta_rectangle_equal (new, &monitor_info->rect) &&
window->has_fullscreen_func && window->has_fullscreen_func &&
!window->fullscreen) !window->fullscreen)
@@ -491,17 +517,11 @@ place_window_if_needed(MetaWindow *window,
!window->minimized && !window->minimized &&
!window->fullscreen) !window->fullscreen)
{ {
MetaRectangle orig_rect; MetaRectangle placed_rect = info->orig;
MetaRectangle placed_rect;
MetaWorkspace *cur_workspace; MetaWorkspace *cur_workspace;
const MetaMonitorInfo *monitor_info; const MetaMonitorInfo *monitor_info;
meta_window_get_frame_rect (window, &placed_rect); meta_window_place (window, info->borders, info->orig.x, info->orig.y,
orig_rect = info->orig;
extend_by_frame (window, &orig_rect);
meta_window_place (window, orig_rect.x, orig_rect.y,
&placed_rect.x, &placed_rect.y); &placed_rect.x, &placed_rect.y);
did_placement = TRUE; did_placement = TRUE;
@@ -519,7 +539,6 @@ place_window_if_needed(MetaWindow *window,
meta_workspace_get_onmonitor_region (cur_workspace, meta_workspace_get_onmonitor_region (cur_workspace,
monitor_info->number); monitor_info->number);
meta_window_frame_rect_to_client_rect (window, &placed_rect, &placed_rect);
info->current.x = placed_rect.x; info->current.x = placed_rect.x;
info->current.y = placed_rect.y; info->current.y = placed_rect.y;
@@ -565,6 +584,10 @@ place_window_if_needed(MetaWindow *window,
(window->maximize_vertically_after_placement ? (window->maximize_vertically_after_placement ?
META_MAXIMIZE_VERTICAL : 0), &info->current); META_MAXIMIZE_VERTICAL : 0), &info->current);
/* maximization may have changed frame geometry */
if (!window->fullscreen)
meta_frame_calc_borders (window->frame, info->borders);
if (window->fullscreen_after_placement) if (window->fullscreen_after_placement)
{ {
window->saved_rect = info->current; window->saved_rect = info->current;
@@ -624,7 +647,7 @@ update_onscreen_requirements (MetaWindow *window,
/* The require onscreen/on-single-monitor and titlebar_visible /* The require onscreen/on-single-monitor and titlebar_visible
* stuff is relative to the outer window, not the inner * stuff is relative to the outer window, not the inner
*/ */
extend_by_frame (window, &info->current); extend_by_frame (&info->current, info->borders);
/* Update whether we want future constraint runs to require the /* Update whether we want future constraint runs to require the
* window to be on fully onscreen. * window to be on fully onscreen.
@@ -657,13 +680,10 @@ update_onscreen_requirements (MetaWindow *window,
*/ */
if (window->frame && window->decorated) if (window->frame && window->decorated)
{ {
MetaFrameBorders borders;
MetaRectangle titlebar_rect; MetaRectangle titlebar_rect;
meta_frame_calc_borders (window->frame, &borders);
titlebar_rect = info->current; titlebar_rect = info->current;
titlebar_rect.height = borders.visible.top; titlebar_rect.height = info->borders->visible.top;
old = window->require_titlebar_visible; old = window->require_titlebar_visible;
window->require_titlebar_visible = window->require_titlebar_visible =
meta_rectangle_overlaps_with_region (info->usable_screen_region, meta_rectangle_overlaps_with_region (info->usable_screen_region,
@@ -676,33 +696,39 @@ update_onscreen_requirements (MetaWindow *window,
} }
/* Don't forget to restore the position of the window */ /* Don't forget to restore the position of the window */
unextend_by_frame (window, &info->current); unextend_by_frame (&info->current, info->borders);
} }
static void static void
extend_by_frame (MetaWindow *window, extend_by_frame (MetaRectangle *rect,
MetaRectangle *rect) const MetaFrameBorders *borders)
{ {
meta_window_client_rect_to_frame_rect (window, rect, rect); rect->x -= borders->visible.left;
rect->y -= borders->visible.top;
rect->width += borders->visible.left + borders->visible.right;
rect->height += borders->visible.top + borders->visible.bottom;
} }
static void static void
unextend_by_frame (MetaWindow *window, unextend_by_frame (MetaRectangle *rect,
MetaRectangle *rect) const MetaFrameBorders *borders)
{ {
meta_window_frame_rect_to_client_rect (window, rect, rect); rect->x += borders->visible.left;
rect->y += borders->visible.top;
rect->width -= borders->visible.left + borders->visible.right;
rect->height -= borders->visible.top + borders->visible.bottom;
} }
static inline void static inline void
get_size_limits (MetaWindow *window, get_size_limits (const MetaWindow *window,
gboolean include_frame, const MetaFrameBorders *borders,
gboolean include_frame,
MetaRectangle *min_size, MetaRectangle *min_size,
MetaRectangle *max_size) MetaRectangle *max_size)
{ {
/* We pack the results into MetaRectangle structs just for convienience; we /* We pack the results into MetaRectangle structs just for convienience; we
* don't actually use the position of those rects. * don't actually use the position of those rects.
*/ */
min_size->x = min_size->y = max_size->x = max_size->y = 0;
min_size->width = window->size_hints.min_width; min_size->width = window->size_hints.min_width;
min_size->height = window->size_hints.min_height; min_size->height = window->size_hints.min_height;
max_size->width = window->size_hints.max_width; max_size->width = window->size_hints.max_width;
@@ -710,8 +736,22 @@ get_size_limits (MetaWindow *window,
if (include_frame) if (include_frame)
{ {
meta_window_client_rect_to_frame_rect (window, min_size, min_size); int fw = borders->visible.left + borders->visible.right;
meta_window_client_rect_to_frame_rect (window, max_size, max_size); int fh = borders->visible.top + borders->visible.bottom;
min_size->width += fw;
min_size->height += fh;
/* Do check to avoid overflow (e.g. max_size->width & max_size->height
* may be set to G_MAXINT by meta_set_normal_hints()).
*/
if (max_size->width < (G_MAXINT - fw))
max_size->width += fw;
else
max_size->width = G_MAXINT;
if (max_size->height < (G_MAXINT - fh))
max_size->height += fh;
else
max_size->height = G_MAXINT;
} }
} }
@@ -723,28 +763,18 @@ constrain_modal_dialog (MetaWindow *window,
{ {
int x, y; int x, y;
MetaWindow *parent = meta_window_get_transient_for (window); MetaWindow *parent = meta_window_get_transient_for (window);
MetaRectangle child_rect, parent_rect;
gboolean constraint_already_satisfied; gboolean constraint_already_satisfied;
if (!meta_window_is_attached_dialog (window)) if (!meta_window_is_attached_dialog (window))
return TRUE; return TRUE;
/* We want to center the dialog on the parent, including the decorations x = parent->rect.x + (parent->rect.width / 2 - info->current.width / 2);
for both of them. info->current is in client X window coordinates, so we need y = parent->rect.y + (parent->rect.height / 2 - info->current.height / 2);
to convert them to frame coordinates, apply the centering and then if (parent->frame)
convert back to client. {
*/ x += parent->frame->rect.x;
y += parent->frame->rect.y;
child_rect = info->current; }
extend_by_frame (window, &child_rect);
meta_window_get_frame_rect (parent, &parent_rect);
child_rect.x = parent_rect.x + (parent_rect.width / 2 - child_rect.width / 2);
child_rect.y = parent_rect.y + (parent_rect.height / 2 - child_rect.height / 2);
unextend_by_frame (window, &child_rect);
x = child_rect.x;
y = child_rect.y;
constraint_already_satisfied = (x == info->current.x) && (y == info->current.y); constraint_already_satisfied = (x == info->current.x) && (y == info->current.y);
@@ -809,19 +839,19 @@ constrain_maximization (MetaWindow *window,
active_workspace_struts = window->screen->active_workspace->all_struts; active_workspace_struts = window->screen->active_workspace->all_struts;
target_size = info->current; target_size = info->current;
extend_by_frame (window, &target_size); extend_by_frame (&target_size, info->borders);
meta_rectangle_expand_to_avoiding_struts (&target_size, meta_rectangle_expand_to_avoiding_struts (&target_size,
&info->entire_monitor, &info->entire_monitor,
direction, direction,
active_workspace_struts); active_workspace_struts);
} }
/* Now make target_size = maximized size of client window */ /* Now make target_size = maximized size of client window */
unextend_by_frame (window, &target_size); unextend_by_frame (&target_size, info->borders);
/* Check min size constraints; max size constraints are ignored for maximized /* Check min size constraints; max size constraints are ignored for maximized
* windows, as per bug 327543. * windows, as per bug 327543.
*/ */
get_size_limits (window, FALSE, &min_size, &max_size); get_size_limits (window, info->borders, FALSE, &min_size, &max_size);
hminbad = target_size.width < min_size.width && window->maximized_horizontally; hminbad = target_size.width < min_size.width && window->maximized_horizontally;
vminbad = target_size.height < min_size.height && window->maximized_vertically; vminbad = target_size.height < min_size.height && window->maximized_vertically;
if (hminbad || vminbad) if (hminbad || vminbad)
@@ -875,12 +905,12 @@ constrain_tiling (MetaWindow *window,
* use an external function for the actual calculation * use an external function for the actual calculation
*/ */
meta_window_get_current_tile_area (window, &target_size); meta_window_get_current_tile_area (window, &target_size);
unextend_by_frame (window, &target_size); unextend_by_frame (&target_size, info->borders);
/* Check min size constraints; max size constraints are ignored as for /* Check min size constraints; max size constraints are ignored as for
* maximized windows. * maximized windows.
*/ */
get_size_limits (window, FALSE, &min_size, &max_size); get_size_limits (window, info->borders, FALSE, &min_size, &max_size);
hminbad = target_size.width < min_size.width; hminbad = target_size.width < min_size.width;
vminbad = target_size.height < min_size.height; vminbad = target_size.height < min_size.height;
if (hminbad || vminbad) if (hminbad || vminbad)
@@ -923,7 +953,7 @@ constrain_fullscreen (MetaWindow *window,
monitor = info->entire_monitor; monitor = info->entire_monitor;
get_size_limits (window, FALSE, &min_size, &max_size); get_size_limits (window, info->borders, FALSE, &min_size, &max_size);
too_big = !meta_rectangle_could_fit_rect (&monitor, &min_size); too_big = !meta_rectangle_could_fit_rect (&monitor, &min_size);
too_small = !meta_rectangle_could_fit_rect (&max_size, &monitor); too_small = !meta_rectangle_could_fit_rect (&max_size, &monitor);
if (too_big || too_small) if (too_big || too_small)
@@ -1032,7 +1062,7 @@ constrain_size_limits (MetaWindow *window,
return TRUE; return TRUE;
/* Determine whether constraint is already satisfied; exit if it is */ /* Determine whether constraint is already satisfied; exit if it is */
get_size_limits (window, FALSE, &min_size, &max_size); get_size_limits (window, info->borders, FALSE, &min_size, &max_size);
/* We ignore max-size limits for maximized windows; see #327543 */ /* We ignore max-size limits for maximized windows; see #327543 */
if (window->maximized_horizontally) if (window->maximized_horizontally)
max_size.width = MAX (max_size.width, info->current.width); max_size.width = MAX (max_size.width, info->current.width);
@@ -1224,8 +1254,8 @@ do_screen_and_monitor_relative_constraints (
/* Determine whether constraint applies; exit if it doesn't */ /* Determine whether constraint applies; exit if it doesn't */
how_far_it_can_be_smushed = info->current; how_far_it_can_be_smushed = info->current;
get_size_limits (window, TRUE, &min_size, &max_size); get_size_limits (window, info->borders, TRUE, &min_size, &max_size);
extend_by_frame (window, &info->current); extend_by_frame (&info->current, info->borders);
if (info->action_type != ACTION_MOVE) if (info->action_type != ACTION_MOVE)
{ {
@@ -1245,7 +1275,7 @@ do_screen_and_monitor_relative_constraints (
&info->current); &info->current);
if (exit_early || constraint_satisfied || check_only) if (exit_early || constraint_satisfied || check_only)
{ {
unextend_by_frame (window, &info->current); unextend_by_frame (&info->current, info->borders);
return constraint_satisfied; return constraint_satisfied;
} }
@@ -1269,7 +1299,7 @@ do_screen_and_monitor_relative_constraints (
info->fixed_directions, info->fixed_directions,
&info->current); &info->current);
unextend_by_frame (window, &info->current); unextend_by_frame (&info->current, info->borders);
return TRUE; return TRUE;
} }
@@ -1358,6 +1388,7 @@ constrain_titlebar_visible (MetaWindow *window,
window->type == META_WINDOW_DOCK || window->type == META_WINDOW_DOCK ||
window->fullscreen || window->fullscreen ||
!window->require_titlebar_visible || !window->require_titlebar_visible ||
!window->decorated ||
unconstrained_user_action) unconstrained_user_action)
return TRUE; return TRUE;
@@ -1381,11 +1412,8 @@ constrain_titlebar_visible (MetaWindow *window,
*/ */
if (window->frame) if (window->frame)
{ {
MetaFrameBorders borders; bottom_amount = info->current.height + info->borders->visible.bottom;
meta_frame_calc_borders (window->frame, &borders); vert_amount_onscreen = info->borders->visible.top;
bottom_amount = info->current.height + borders.visible.bottom;
vert_amount_onscreen = borders.visible.top;
} }
else else
bottom_amount = vert_amount_offscreen; bottom_amount = vert_amount_offscreen;
@@ -1459,11 +1487,8 @@ constrain_partially_onscreen (MetaWindow *window,
*/ */
if (window->frame) if (window->frame)
{ {
MetaFrameBorders borders; bottom_amount = info->current.height + info->borders->visible.bottom;
meta_frame_calc_borders (window->frame, &borders); vert_amount_onscreen = info->borders->visible.top;
bottom_amount = info->current.height + borders.visible.bottom;
vert_amount_onscreen = borders.visible.top;
} }
else else
bottom_amount = vert_amount_offscreen; bottom_amount = vert_amount_offscreen;

View File

@@ -17,7 +17,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#ifndef META_CONSTRAINTS_H #ifndef META_CONSTRAINTS_H
@@ -37,6 +39,7 @@ typedef enum
} MetaMoveResizeFlags; } MetaMoveResizeFlags;
void meta_window_constrain (MetaWindow *window, void meta_window_constrain (MetaWindow *window,
MetaFrameBorders *orig_borders,
MetaMoveResizeFlags flags, MetaMoveResizeFlags flags,
int resize_gravity, int resize_gravity,
const MetaRectangle *orig, const MetaRectangle *orig,

View File

@@ -18,7 +18,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#include <config.h> #include <config.h>
@@ -27,7 +29,6 @@
#include "workspace-private.h" #include "workspace-private.h"
#include <meta/prefs.h> #include <meta/prefs.h>
#include <meta/errors.h> #include <meta/errors.h>
#include "util-private.h"
/* Looks up the MetaWindow representing the frame of the given X window. /* Looks up the MetaWindow representing the frame of the given X window.
* Used as a helper function by a bunch of the functions below. * Used as a helper function by a bunch of the functions below.
@@ -88,7 +89,7 @@ meta_core_get (Display *xdisplay,
if (request != META_CORE_WINDOW_HAS_FRAME && if (request != META_CORE_WINDOW_HAS_FRAME &&
(window == NULL || window->frame == NULL)) { (window == NULL || window->frame == NULL)) {
meta_bug ("No such frame window 0x%lx!\n", xwindow); meta_bug ("No such frame window 0x%lx!\n", xwindow);
goto out; return;
} }
while (request != META_CORE_GET_END) { while (request != META_CORE_GET_END) {
@@ -98,7 +99,7 @@ meta_core_get (Display *xdisplay,
switch (request) { switch (request) {
case META_CORE_WINDOW_HAS_FRAME: case META_CORE_WINDOW_HAS_FRAME:
*((gboolean*)answer) = window != NULL && window->frame != NULL; *((gboolean*)answer) = window != NULL && window->frame != NULL;
if (!*((gboolean*)answer)) goto out; /* see above */ if (!*((gboolean*)answer)) return; /* see above */
break; break;
case META_CORE_GET_CLIENT_WIDTH: case META_CORE_GET_CLIENT_WIDTH:
*((gint*)answer) = window->rect.width; *((gint*)answer) = window->rect.width;
@@ -159,7 +160,6 @@ meta_core_get (Display *xdisplay,
request = va_arg (args, MetaCoreGetType); request = va_arg (args, MetaCoreGetType);
} }
out:
va_end (args); va_end (args);
} }
@@ -170,7 +170,6 @@ meta_core_queue_frame_resize (Display *xdisplay,
MetaWindow *window = get_window (xdisplay, frame_xwindow); MetaWindow *window = get_window (xdisplay, frame_xwindow);
meta_window_queue (window, META_QUEUE_MOVE_RESIZE); meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
meta_window_frame_size_changed (window);
} }
void void
@@ -279,7 +278,8 @@ meta_core_lower_beneath_grab_window (Display *xdisplay,
return; return;
changes.stack_mode = Below; changes.stack_mode = Below;
changes.sibling = meta_window_get_toplevel_xwindow (grab_window); changes.sibling = grab_window->frame ? grab_window->frame->xwindow
: grab_window->xwindow;
meta_stack_tracker_record_lower_below (screen->stack_tracker, meta_stack_tracker_record_lower_below (screen->stack_tracker,
xwindow, xwindow,
@@ -322,7 +322,8 @@ meta_core_maximize (Display *xdisplay,
if (meta_prefs_get_raise_on_click ()) if (meta_prefs_get_raise_on_click ())
meta_window_raise (window); meta_window_raise (window);
meta_window_maximize (window, META_MAXIMIZE_BOTH); meta_window_maximize (window,
META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
} }
void void
@@ -335,9 +336,11 @@ meta_core_toggle_maximize_vertically (Display *xdisplay,
meta_window_raise (window); meta_window_raise (window);
if (META_WINDOW_MAXIMIZED_VERTICALLY (window)) if (META_WINDOW_MAXIMIZED_VERTICALLY (window))
meta_window_unmaximize (window, META_MAXIMIZE_VERTICAL); meta_window_unmaximize (window,
META_MAXIMIZE_VERTICAL);
else else
meta_window_maximize (window, META_MAXIMIZE_VERTICAL); meta_window_maximize (window,
META_MAXIMIZE_VERTICAL);
} }
void void
@@ -350,9 +353,11 @@ meta_core_toggle_maximize_horizontally (Display *xdisplay,
meta_window_raise (window); meta_window_raise (window);
if (META_WINDOW_MAXIMIZED_HORIZONTALLY (window)) if (META_WINDOW_MAXIMIZED_HORIZONTALLY (window))
meta_window_unmaximize (window, META_MAXIMIZE_HORIZONTAL); meta_window_unmaximize (window,
META_MAXIMIZE_HORIZONTAL);
else else
meta_window_maximize (window, META_MAXIMIZE_HORIZONTAL); meta_window_maximize (window,
META_MAXIMIZE_HORIZONTAL);
} }
void void
@@ -365,9 +370,11 @@ meta_core_toggle_maximize (Display *xdisplay,
meta_window_raise (window); meta_window_raise (window);
if (META_WINDOW_MAXIMIZED (window)) if (META_WINDOW_MAXIMIZED (window))
meta_window_unmaximize (window, META_MAXIMIZE_BOTH); meta_window_unmaximize (window,
META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
else else
meta_window_maximize (window, META_MAXIMIZE_BOTH); meta_window_maximize (window,
META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
} }
void void
@@ -379,7 +386,8 @@ meta_core_unmaximize (Display *xdisplay,
if (meta_prefs_get_raise_on_click ()) if (meta_prefs_get_raise_on_click ())
meta_window_raise (window); meta_window_raise (window);
meta_window_unmaximize (window, META_MAXIMIZE_BOTH); meta_window_unmaximize (window,
META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
} }
void void
@@ -460,6 +468,26 @@ meta_core_change_workspace (Display *xdisplay,
new_workspace)); 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 void
meta_core_show_window_menu (Display *xdisplay, meta_core_show_window_menu (Display *xdisplay,
Window frame_xwindow, Window frame_xwindow,

View File

@@ -17,7 +17,9 @@
* General Public License for more details. * General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/ */
#ifndef META_CORE_H #ifndef META_CORE_H
@@ -151,6 +153,8 @@ void meta_core_change_workspace (Display *xdisplay,
Window frame_xwindow, Window frame_xwindow,
int new_workspace); 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, int meta_core_get_frame_workspace (Display *xdisplay,
Window frame_xwindow); Window frame_xwindow);
const char* meta_core_get_workspace_name_with_index (Display *xdisplay, const char* meta_core_get_workspace_name_with_index (Display *xdisplay,

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