Compare commits
	
		
			26 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					17185452c6 | ||
| 
						 | 
					534774a72f | ||
| 
						 | 
					efefb40e70 | ||
| 
						 | 
					ca4e1fd4c9 | ||
| 
						 | 
					74fb5a83dd | ||
| 
						 | 
					02ecca502e | ||
| 
						 | 
					e36eb3e91a | ||
| 
						 | 
					de6d9591c4 | ||
| 
						 | 
					a20401782e | ||
| 
						 | 
					79ea9f0b0f | ||
| 
						 | 
					7b36dcf4a0 | ||
| 
						 | 
					edfde6221f | ||
| 
						 | 
					1ad1357745 | ||
| 
						 | 
					fb0999a1a9 | ||
| 
						 | 
					7186ddff49 | ||
| 
						 | 
					d664cfcc90 | ||
| 
						 | 
					056cc16b82 | ||
| 
						 | 
					6c4bcecc00 | ||
| 
						 | 
					f531960b6a | ||
| 
						 | 
					e15792c983 | ||
| 
						 | 
					1627044c39 | ||
| 
						 | 
					5615e36112 | ||
| 
						 | 
					2c210e0e25 | ||
| 
						 | 
					1c06f0dc09 | ||
| 
						 | 
					51d98be1f2 | ||
| 
						 | 
					859d231129 | 
							
								
								
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -46,6 +46,7 @@ POTFILES
 | 
			
		||||
po/*.pot
 | 
			
		||||
50-metacity-desktop-key.xml
 | 
			
		||||
50-metacity-key.xml
 | 
			
		||||
inlinepixbufs.h
 | 
			
		||||
libmutter.pc
 | 
			
		||||
mutter
 | 
			
		||||
mutter-theme-viewer
 | 
			
		||||
@@ -55,14 +56,12 @@ org.gnome.mutter.gschema.xml
 | 
			
		||||
testasyncgetprop
 | 
			
		||||
testboxes
 | 
			
		||||
testgradient
 | 
			
		||||
m4/*
 | 
			
		||||
mutter-grayscale
 | 
			
		||||
mutter-mag
 | 
			
		||||
mutter-message
 | 
			
		||||
mutter-window-demo
 | 
			
		||||
focus-window
 | 
			
		||||
test-attached
 | 
			
		||||
test-focus
 | 
			
		||||
test-gravity
 | 
			
		||||
test-resizing
 | 
			
		||||
test-size-hints
 | 
			
		||||
@@ -75,8 +74,6 @@ src/mutter-enum-types.[ch]
 | 
			
		||||
src/stamp-mutter-enum-types.h
 | 
			
		||||
src/mutter-marshal.[ch]
 | 
			
		||||
src/stamp-mutter-marshal.h
 | 
			
		||||
src/meta-dbus-xrandr.[ch]
 | 
			
		||||
src/meta-dbus-idle-monitor.[ch]
 | 
			
		||||
src/mutter-plugins.pc
 | 
			
		||||
doc/reference/*.args
 | 
			
		||||
doc/reference/*.bak
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										41
									
								
								COPYING
									
									
									
									
									
								
							
							
						
						
									
										41
									
								
								COPYING
									
									
									
									
									
								
							@@ -1,12 +1,12 @@
 | 
			
		||||
                    GNU GENERAL PUBLIC LICENSE
 | 
			
		||||
                       Version 2, June 1991
 | 
			
		||||
		    GNU GENERAL PUBLIC LICENSE
 | 
			
		||||
		       Version 2, June 1991
 | 
			
		||||
 | 
			
		||||
 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
 | 
			
		||||
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 | 
			
		||||
 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
 | 
			
		||||
     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 | 
			
		||||
 Everyone is permitted to copy and distribute verbatim copies
 | 
			
		||||
 of this license document, but changing it is not allowed.
 | 
			
		||||
 | 
			
		||||
                            Preamble
 | 
			
		||||
			    Preamble
 | 
			
		||||
 | 
			
		||||
  The licenses for most software are designed to take away your
 | 
			
		||||
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
 | 
			
		||||
Foundation's software and to any other program whose authors commit to
 | 
			
		||||
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.
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
modification follow.
 | 
			
		||||
 | 
			
		||||
                    GNU GENERAL PUBLIC LICENSE
 | 
			
		||||
 | 
			
		||||
		    GNU GENERAL PUBLIC LICENSE
 | 
			
		||||
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
    does not normally print such an announcement, your work based on
 | 
			
		||||
    the Program is not required to print an announcement.)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
These requirements apply to the modified work as a whole.  If
 | 
			
		||||
identifiable sections of that work are not derived from the Program,
 | 
			
		||||
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
 | 
			
		||||
distribution of the source code, even though third parties are not
 | 
			
		||||
compelled to copy the source along with the object code.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  4. You may not copy, modify, sublicense, or distribute the Program
 | 
			
		||||
except as expressly provided under this License.  Any attempt
 | 
			
		||||
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
 | 
			
		||||
be a consequence of the rest of this License.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  8. If the distribution and/or use of the Program is restricted in
 | 
			
		||||
certain countries either by patents or by copyrighted interfaces, the
 | 
			
		||||
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 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
 | 
			
		||||
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
 | 
			
		||||
POSSIBILITY OF SUCH DAMAGES.
 | 
			
		||||
 | 
			
		||||
                     END OF TERMS AND CONDITIONS
 | 
			
		||||
 | 
			
		||||
            How to Apply These Terms to Your New Programs
 | 
			
		||||
		     END OF TERMS AND CONDITIONS
 | 
			
		||||
 | 
			
		||||
	    How to Apply These Terms to Your New Programs
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
@@ -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
 | 
			
		||||
    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.,
 | 
			
		||||
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 | 
			
		||||
    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
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
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'.
 | 
			
		||||
    This is free software, and you are welcome to redistribute it
 | 
			
		||||
    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
 | 
			
		||||
proprietary programs.  If your program is a subroutine library, you may
 | 
			
		||||
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.
 | 
			
		||||
 
 | 
			
		||||
@@ -1,12 +1,8 @@
 | 
			
		||||
 | 
			
		||||
SUBDIRS=src po doc
 | 
			
		||||
 | 
			
		||||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 | 
			
		||||
 | 
			
		||||
EXTRA_DIST = HACKING MAINTAINERS rationales.txt
 | 
			
		||||
 | 
			
		||||
DISTCLEANFILES = intltool-extract intltool-merge intltool-update po/stamp-it po/.intltool-merge-cache
 | 
			
		||||
 | 
			
		||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
 | 
			
		||||
 | 
			
		||||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										304
									
								
								NEWS
									
									
									
									
									
								
							
							
						
						
									
										304
									
								
								NEWS
									
									
									
									
									
								
							@@ -1,302 +1,38 @@
 | 
			
		||||
3.12.1
 | 
			
		||||
======
 | 
			
		||||
* Fix opacity values from _NET_WM_WINDOW_OPACITY [Nirbheek; #727874]
 | 
			
		||||
* Misc. cleanups [Jasper; #720631]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Nirbheek Chauhan, Jasper St. Pierre
 | 
			
		||||
 | 
			
		||||
Translations:
 | 
			
		||||
  Inaki Larranaga Murgoitio [eu], marablack3 [el]
 | 
			
		||||
 | 
			
		||||
3.12.0
 | 
			
		||||
======
 | 
			
		||||
 | 
			
		||||
Translations:
 | 
			
		||||
  Ask H. Larsen [da], Мирослав Николић [sr, sr@latin], Andika Triwidada [id],
 | 
			
		||||
  Daniel Korostil [uk], Petr Kovar [cs]
 | 
			
		||||
 | 
			
		||||
3.11.92
 | 
			
		||||
=======
 | 
			
		||||
* Fix identification of CSD windows [Owen; #723029]
 | 
			
		||||
* Add minimal handling of touch events [Carlos; #723552]
 | 
			
		||||
* Misc bug fixes and cleanups [Owen, Adel, Jasper; #723580, #726352]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Adel Gadllah, Carlos Garnacho, Rui Matos, Jasper St. Pierre, Owen W. Taylor
 | 
			
		||||
 | 
			
		||||
Translations:
 | 
			
		||||
  Changwoo Ryu [ko], Rūdolfs Mazurs [lv], Wylmer Wang [zh_CN],
 | 
			
		||||
  Chao-Hsiung Liao [zh_HK, zh_TW], Yuri Myasoedov [ru], Tiagosdot [pt],
 | 
			
		||||
  Claude Paroz [fr], Duarte Loreto [pt], A S Alam [pa]
 | 
			
		||||
 | 
			
		||||
3.11.91
 | 
			
		||||
=======
 | 
			
		||||
* Don't use keysym to match keybindings [Rui; #678001]
 | 
			
		||||
* Fix message tray icons showing up blank (again) [Adel; #725180]
 | 
			
		||||
* Improve keybinding lookups [Rui; #725588]
 | 
			
		||||
* Fix dynamic updates of titlebar style properties [Owen; #725751]
 | 
			
		||||
* Fix positioning of manually positioned windows [Owen; #724049]
 | 
			
		||||
* Misc. bug fixes [Carlos, Giovanni, Florian, Jasper; #724969, #724402, #722266,
 | 
			
		||||
  #725338]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Giovanni Campagna, Adel Gadllah, Carlos Garnacho, Rui Matos, Florian Müllner,
 | 
			
		||||
  Jasper St. Pierre
 | 
			
		||||
 | 
			
		||||
Translations:
 | 
			
		||||
  Aurimas Černius [lt], Milo Casagrande [it], Balázs Úr [hu],
 | 
			
		||||
  Matej Urbančič [sl], Enrico Nicoletto [pt_BR], Yosef Or Boczko [he],
 | 
			
		||||
  Piotr Drąg [pl], Fran Diéguez [gl]
 | 
			
		||||
 | 
			
		||||
3.11.90
 | 
			
		||||
=======
 | 
			
		||||
* Use correct output property for backlight control [Robert; #723606]
 | 
			
		||||
* Fix double-scaling on high DPI resolutions [Adel; #723931]
 | 
			
		||||
* Make tile previews a compositor effect [Stefano, Florian; #665758]
 | 
			
		||||
* Misc. bug fixes and cleanups [Ryan, Giovanni, Jasper; #722530, #724257,
 | 
			
		||||
  #724258, #724364, #720631, #707851, #707897]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Robert Ancell, Giovanni Campagna, Stefano Facchini, Adel Gadllah,
 | 
			
		||||
  Ryan Lortie, Florian Müllner, Jasper St. Pierre, Rico Tzschichholz
 | 
			
		||||
 | 
			
		||||
Translations:
 | 
			
		||||
  Shankar Prasad [kn], Khaled Hosny [ar], Marek Černocký [cs],
 | 
			
		||||
  Kjartan Maraas [nb], Daniel Korostil [uk]
 | 
			
		||||
 | 
			
		||||
3.11.5
 | 
			
		||||
======
 | 
			
		||||
* Fix CSD titlebars being placed off-screen [Jasper; #719772]
 | 
			
		||||
* Expose MetaWindow:skip-taskbar property [Florian; #723307]
 | 
			
		||||
* Fix legacy tray icons showing up blank [Adel; #721596]
 | 
			
		||||
* Fix configuration of cloned monitors [Adel; #710610]
 | 
			
		||||
* Misc bug fixes and cleanups [Jasper, Adel, Jonas; #720631, #723468, #723563]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Jonas Ådahl, Marek Ch, Adel Gadllah, Florian Müllner, Jasper St. Pierre
 | 
			
		||||
 | 
			
		||||
Translations:
 | 
			
		||||
  Rafael Ferreira [pt_BR], Enrico Nicoletto [pt_BR], Fran Diéguez [gl],
 | 
			
		||||
  Chao-Hsiung Liao [zh_HK, zh_TW]
 | 
			
		||||
 | 
			
		||||
3.11.4
 | 
			
		||||
======
 | 
			
		||||
* Don't leave focus on windows that are being unmanaged [Owen; #711618]
 | 
			
		||||
* Reduce server grabs [Daniel Drake; #721345, #721709]
 | 
			
		||||
* Improve heuristic to determine display output name [Cosimo Cecchi; #721674]
 | 
			
		||||
* Atomically unmaximize both directions [Jasper; #722108]
 | 
			
		||||
* Misc bug fixes [Debarshi, Andika; #721517, #721674]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Cosimo Cecchi, Daniel Drake, Debarshi Ray, Jasper St. Pierre,
 | 
			
		||||
  Andika Triwidada, Owen W. Taylor
 | 
			
		||||
 | 
			
		||||
Translations:
 | 
			
		||||
  Rafael Ferreira [pt_BR], Dimitris Spingos [el], Daniel Mustieles [es],
 | 
			
		||||
  Milo Casagrande [it], Yosef Or Boczko [he]
 | 
			
		||||
 | 
			
		||||
3.11.3
 | 
			
		||||
======
 | 
			
		||||
* xrandr: Use "hotplug_mode_update" property [Marc-André; #711216]
 | 
			
		||||
* Fix position of attached dialogs for CSD windows [Giovanni, Owen; #707194]
 | 
			
		||||
* Fix focus issues with external OSKs [Jasper; #715030]
 | 
			
		||||
* Add a MetaCullable interface [Jasper; #714706]
 | 
			
		||||
* Fix window group paint volume [Owen; #719669]
 | 
			
		||||
* Fix frame extents problems [Owen; #714707]
 | 
			
		||||
* Add shortcut to move windows between monitors [Florian; #671054]
 | 
			
		||||
* Fix problems with focus tracking [Owen; #720558]
 | 
			
		||||
* Misc. bug fixes and cleanups [Rui, Jasper, Owen; #712833, #678989, #720106,
 | 
			
		||||
  #720417, #720630]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Robert Bragg, Giovanni Campagna, Marc-André Lureau, Rui Matos, Alberto Milone,
 | 
			
		||||
  Florian Müllner, Sindhu S, Jasper St. Pierre, Rico Tzschichholz,
 | 
			
		||||
  Owen W. Taylor
 | 
			
		||||
 | 
			
		||||
Translations:
 | 
			
		||||
  甘露(Gan  Lu) [zh_CN], Khaled Hosny [ar]
 | 
			
		||||
 | 
			
		||||
3.11.2
 | 
			
		||||
======
 | 
			
		||||
* Fix resize operations using mouse-button-modifier [Lionel; #710251]
 | 
			
		||||
* Misc. fixes and cleanups [Jasper, Rico, Florian; #711731]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Lionel Landwerlin, Florian Müllner, Jasper St. Pierre, Rico Tzschichholz
 | 
			
		||||
 | 
			
		||||
3.11.1
 | 
			
		||||
======
 | 
			
		||||
* Don't require at least one output device to be connected [Giovanni; #709009]
 | 
			
		||||
* Name the guard window [Andrew; #710346]
 | 
			
		||||
* Use new UPower API [Bastien]
 | 
			
		||||
* Expose min-backlight-step [Asad; #710380]
 | 
			
		||||
* Don't focus the no-focus-window for globally active windows [Jasper; #710296]
 | 
			
		||||
* Misc. fixes and cleanups [Jasper, Rico, Olav, Magdalen; #709776]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Magdalen Berns, Giovanni Campagna, Asad Mehmood, Bastien Nocera,
 | 
			
		||||
  Jasper St. Pierre, Rico Tzschichholz, Olav Vitters, Andrew Walton
 | 
			
		||||
 | 
			
		||||
Translations:
 | 
			
		||||
  Reinout van Schouwen [nl]
 | 
			
		||||
 | 
			
		||||
3.10.1
 | 
			
		||||
======
 | 
			
		||||
* Don't apply fullscreen workarounds to CSD windows [Giovanni; #708718]
 | 
			
		||||
* Fix hangs during DND operations [Adel; #709340]
 | 
			
		||||
* Use nearest-pixel interpolation when possible [Hans; #708389]
 | 
			
		||||
* Fix tile previews getting stuck on right click during drags [Lionel; #704759]
 | 
			
		||||
* Misc bug fixes [Giovanni, Jasper; #708420]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Giovanni Campagna, Adel Gadllah, Lionel Landwerlin, Hans Petter Jansson,
 | 
			
		||||
  Jasper St. Pierre
 | 
			
		||||
 | 
			
		||||
Translations:
 | 
			
		||||
  Khaled Hosny [ar], Reinout van Schouwen [nl], Carles Ferrando [ca@valencia]
 | 
			
		||||
 | 
			
		||||
3.10.0.1
 | 
			
		||||
========
 | 
			
		||||
* Fix bug when a window changed size twice in a single frame - this
 | 
			
		||||
  can happen with GTK+ client-side decorations [Giovanni, Owen; #708367]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Giovanni Campagna, Owen Taylor
 | 
			
		||||
 | 
			
		||||
3.10.0
 | 
			
		||||
======
 | 
			
		||||
 | 
			
		||||
Translations:
 | 
			
		||||
  Ask H. Larsen [da], Gabor Kelemen [hu], Duarte Loreto [pt],
 | 
			
		||||
  Yosef Or Boczko [he]
 | 
			
		||||
 | 
			
		||||
3.9.92
 | 
			
		||||
======
 | 
			
		||||
* Don't create a dummy texture for the texture pipeline template [Neil; #707458]
 | 
			
		||||
* Remove holes generated by disabling the laptop lid [Giovanni; #707473]
 | 
			
		||||
* https://bugzilla.gnome.org/show_bug.cgi?id=707474 [Giovanni; #707474]
 | 
			
		||||
* Don't require plugins to pass event to Clutter [Giovanni; #707482]
 | 
			
		||||
* Add support for more cursor types [Giovanni; #707919]
 | 
			
		||||
* Immediately fire idle watches that are already expired [Giovanni; #707302]
 | 
			
		||||
* Misc bug fixes [Giovanni, Colin, Pavel; #707649, #707563, #708070]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Giovanni Campagna, Adel Gadllah, Colin Guthrie, Neil Roberts,
 | 
			
		||||
  Jasper St. Pierre, Ray Strode, Pavel Vasin
 | 
			
		||||
 | 
			
		||||
Translations:
 | 
			
		||||
  Мирослав Николић po/sr, sr@latin.po, Мирослав Николић [sr, sr@latin],
 | 
			
		||||
  Chao-Hsiung Liao [zh_HK, zh_TW], Yuri Myasoedov [ru],
 | 
			
		||||
  Ville-Pekka Vainio [fi], Changwoo Ryu [ko], A S Alam [pa],
 | 
			
		||||
  Mattias Põldaru [et], Rūdolfs Mazurs [lv], Ihar Hrachyshka [be],
 | 
			
		||||
  Nilamdyuti Goswami [as], Andika Triwidada [id], Baurzhan Muftakhidinov [kk],
 | 
			
		||||
  Benjamin Steinwender [de]
 | 
			
		||||
 | 
			
		||||
3.9.91
 | 
			
		||||
======
 | 
			
		||||
* Drop man pages for removed utilities [Kalev; #706579]
 | 
			
		||||
* Add support for idle tracking [Giovanni; #706005]
 | 
			
		||||
* Skip CRTC reconfigurations that have no effect [Giovanni; #706672]
 | 
			
		||||
* Ignore skip-taskbar hints on parentless dialogs [Giovanni; #673399]
 | 
			
		||||
* Don't save pixbuf data in user data [Tim; #706777]
 | 
			
		||||
* Don't queue redraws for obscured regions [Adel; #703332]
 | 
			
		||||
* Turn blending off when drawing entirely opaque regions [Jasper; #706930]
 | 
			
		||||
* Check event timestamps before reconfiguring [Giovanni; #706735]
 | 
			
		||||
* Misc bug fixes [Giovanni, Colin, Seán, Jasper, Cosimo; #706582, #706598,
 | 
			
		||||
  #706787, #706729, #706825, #707081, #707090, #707250, #707267]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Giovanni Campagna, Cosimo Cecchi, Adel Gadllah, Colin Guthrie, Kalev Lember,
 | 
			
		||||
  Tim Lunn, Jasper St. Pierre, Rico Tzschichholz, Seán de Búrca
 | 
			
		||||
 | 
			
		||||
Translations:
 | 
			
		||||
  Piotr Drąg [pl], Alexandre Franke [fr], Kjartan Maraas [nb],
 | 
			
		||||
  Milo Casagrande [it], Balázs Úr [hu], Seán de Búrca [ga], Fran Diéguez [gl],
 | 
			
		||||
  Daniel Mustieles [es], Aurimas Černius [lt], Gil Forcada [ca]
 | 
			
		||||
 | 
			
		||||
3.9.90
 | 
			
		||||
======
 | 
			
		||||
* 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.8.4
 | 
			
		||||
=====
 | 
			
		||||
* Don't select for touch events on the stage [Jasper; #697192]
 | 
			
		||||
* Don't queue redraws for obscured regions [Adel; #703332]
 | 
			
		||||
* Export timestamp of global keybinding events [Bastien; #704858]
 | 
			
		||||
* Misc bug fixes and cleanups [Jasper, Rico; #703970]
 | 
			
		||||
* Workaround failure to bring back shell interface after fullscreen game in some situations [Adel; #701224]
 | 
			
		||||
* Fix sluggish and stuck pointers moving windows [Adel, Jasper: #699777]
 | 
			
		||||
* Reduce log spew [Adel, Jasper; #702564, #703970]
 | 
			
		||||
* Touch screen fixes [Jasper: #697192]
 | 
			
		||||
* Fix rendering of large background images [Jasper, Ray: #702283]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Adel Gadllah, Bastien Nocera, Jasper St. Pierre, Rico Tzschichholz
 | 
			
		||||
 Adel Gadllah, Jasper St. Pierre, Ray Strode
 | 
			
		||||
 | 
			
		||||
3.9.4
 | 
			
		||||
=====
 | 
			
		||||
* Tweak window shadows [Allan; #702141]
 | 
			
		||||
* Ignore our own focus events for focus prediction [Jasper; #701017]
 | 
			
		||||
* Add API to query if the stage is focused [Jasper; #700735]
 | 
			
		||||
* Add API to query the monitor for a given position [Adel]
 | 
			
		||||
* Don't force attached dialogs to be border-only [Florian; #702764]
 | 
			
		||||
* Allow slicing of backgrounds to avoid texture size limits [Ray; #702283]
 | 
			
		||||
* Miscellaneous bug fixes and cleanups [Adel; #701224, #702564]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Allan Day, Adel Gadllah, Florian Müllner, Jasper St. Pierre, Ray Strode
 | 
			
		||||
 | 
			
		||||
3.9.3
 | 
			
		||||
3.8.3
 | 
			
		||||
=====
 | 
			
		||||
* Add support for string-array preferences [Florian; #700223]
 | 
			
		||||
* Fix shade window action [Stef; #693714]
 | 
			
		||||
* Add API to freeze/unfreeze the keyboard [Rui; #697001]
 | 
			
		||||
* Grab and emit a signal when XK_ISO_Next_Group is pressed [Rui; #697002]
 | 
			
		||||
* Ensure events are always reported to the grab window [Rui; #701219]
 | 
			
		||||
* Use new clutter_stage_set_paint_callback() function to prevent dropping
 | 
			
		||||
  frames with frame synced toolkits [Owen; #698794]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Rui Matos, Owen W. Taylor
 | 
			
		||||
  Rui Matos, Florian Müllner, Stef Walter, Owen W. Taylor
 | 
			
		||||
 | 
			
		||||
3.9.2
 | 
			
		||||
=====
 | 
			
		||||
* Add meta_window_can_close() function [Jasper; #699269]
 | 
			
		||||
* Add support for string-array preferences [Florian; #700223]
 | 
			
		||||
* Fix a potential race condition with _NET_WM_MOVERESIZE [Jasper; #699777]
 | 
			
		||||
* Fix shade window action [Stef; #693714]
 | 
			
		||||
* Remove overlay_group [Giovanni; #700735]
 | 
			
		||||
* Improve tracking of the focus window [Dan, Jasper; #647706]
 | 
			
		||||
* Add API to freeze/unfreeze the keyboard [Rui; #697001]
 | 
			
		||||
* Grab and emit a signal when XK_ISO_Next_Group is pressed [Rui; #697002]
 | 
			
		||||
* Misc bug fixes and cleanups [Dieter, Jasper, Rui; #699636, #700735, #697000]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Giovanni Campagna, Rui Matos, Florian Müllner, Jasper St. Pierre,
 | 
			
		||||
  Dieter Verfaillie, Stef Walter, Dan Winship
 | 
			
		||||
 | 
			
		||||
Translations:
 | 
			
		||||
  Kjartan Maraas [nb], Ján Kyselica [sk]
 | 
			
		||||
 | 
			
		||||
3.9.1
 | 
			
		||||
3.8.2
 | 
			
		||||
=====
 | 
			
		||||
* Fix miscellaneous memory leaks [Pavel; #698710]
 | 
			
		||||
* Misc fixes and cleanups [Stef, Simon; #698179, #697758]
 | 
			
		||||
* Fix binding remaining grabbed after clearing all strokes [Rui; #697000]
 | 
			
		||||
* Misc fixes [Stef; #698179]
 | 
			
		||||
 | 
			
		||||
Contributors:
 | 
			
		||||
  Simon McVittie, Pavel Vasin, Stef Walter
 | 
			
		||||
  Rui Matos, Pavel Vasin, Stef Walter
 | 
			
		||||
 | 
			
		||||
Translations:
 | 
			
		||||
  Kjartan Maraas [nb]
 | 
			
		||||
 | 
			
		||||
3.8.1
 | 
			
		||||
=====
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
# Run this to generate all the initial makefiles, etc.
 | 
			
		||||
 | 
			
		||||
srcdir=`dirname $0`
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										22
									
								
								configure.ac
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								configure.ac
									
									
									
									
									
								
							@@ -1,9 +1,8 @@
 | 
			
		||||
AC_PREREQ(2.50)
 | 
			
		||||
AC_CONFIG_MACRO_DIR([m4])
 | 
			
		||||
 | 
			
		||||
m4_define([mutter_major_version], [3])
 | 
			
		||||
m4_define([mutter_minor_version], [12])
 | 
			
		||||
m4_define([mutter_micro_version], [1])
 | 
			
		||||
m4_define([mutter_minor_version], [8])
 | 
			
		||||
m4_define([mutter_micro_version], [4])
 | 
			
		||||
 | 
			
		||||
m4_define([mutter_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],
 | 
			
		||||
        [http://bugzilla.gnome.org/enter_bug.cgi?product=mutter])
 | 
			
		||||
 | 
			
		||||
AC_CONFIG_MACRO_DIR([m4])
 | 
			
		||||
AC_CONFIG_SRCDIR(src/core/display.c)
 | 
			
		||||
AC_CONFIG_HEADERS(config.h)
 | 
			
		||||
 | 
			
		||||
@@ -69,16 +67,14 @@ CANBERRA_GTK_VERSION=0.26
 | 
			
		||||
CLUTTER_PACKAGE=clutter-1.0
 | 
			
		||||
 | 
			
		||||
MUTTER_PC_MODULES="
 | 
			
		||||
   gtk+-3.0 >= 3.9.11
 | 
			
		||||
   gtk+-3.0 >= 3.3.7
 | 
			
		||||
   gio-2.0 >= 2.25.10
 | 
			
		||||
   pango >= 1.2.0
 | 
			
		||||
   cairo >= 1.10.0
 | 
			
		||||
   gsettings-desktop-schemas >= 3.7.3
 | 
			
		||||
   xcomposite >= 0.2 xfixes xrender xdamage xi >= 1.6.0
 | 
			
		||||
   $CLUTTER_PACKAGE >= 1.15.90
 | 
			
		||||
   cogl-1.0 >= 1.17.1
 | 
			
		||||
   upower-glib >= 0.99.0
 | 
			
		||||
   gnome-desktop-3.0
 | 
			
		||||
   $CLUTTER_PACKAGE >= 1.14.3
 | 
			
		||||
   cogl-1.0 >= 1.13.3
 | 
			
		||||
"
 | 
			
		||||
 | 
			
		||||
GLIB_GSETTINGS
 | 
			
		||||
@@ -122,6 +118,9 @@ AM_GLIB_GNU_GETTEXT
 | 
			
		||||
## here we get the flags we'll actually use
 | 
			
		||||
# GRegex requires Glib-2.14.0
 | 
			
		||||
PKG_CHECK_MODULES(ALL, glib-2.0 >= 2.14.0)
 | 
			
		||||
# gtk_window_set_icon_name requires gtk2+-2.6.0
 | 
			
		||||
PKG_CHECK_MODULES(MUTTER_MESSAGE, gtk+-3.0)
 | 
			
		||||
PKG_CHECK_MODULES(MUTTER_WINDOW_DEMO, gtk+-3.0)
 | 
			
		||||
 | 
			
		||||
# Unconditionally use this dir to avoid a circular dep with gnomecc
 | 
			
		||||
GNOME_KEYBINDINGS_KEYSDIR="${datadir}/gnome-control-center/keybindings"
 | 
			
		||||
@@ -308,6 +307,9 @@ if test "x$found_xsync" = "xyes"; then
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
MUTTER_LIBS="$MUTTER_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lm"
 | 
			
		||||
MUTTER_MESSAGE_LIBS="$MUTTER_MESSAGE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
 | 
			
		||||
MUTTER_WINDOW_DEMO_LIBS="$MUTTER_WINDOW_DEMO_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lm"
 | 
			
		||||
MUTTER_PROPS_LIBS="$MUTTER_PROPS_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
 | 
			
		||||
 | 
			
		||||
found_sm=no
 | 
			
		||||
case "$MUTTER_LIBS" in
 | 
			
		||||
@@ -437,8 +439,10 @@ doc/man/Makefile
 | 
			
		||||
doc/reference/Makefile
 | 
			
		||||
doc/reference/meta-docs.sgml
 | 
			
		||||
src/Makefile
 | 
			
		||||
src/wm-tester/Makefile
 | 
			
		||||
src/libmutter.pc
 | 
			
		||||
src/mutter-plugins.pc
 | 
			
		||||
src/tools/Makefile
 | 
			
		||||
src/compositor/plugins/Makefile
 | 
			
		||||
po/Makefile.in
 | 
			
		||||
])
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,4 @@
 | 
			
		||||
man_MANS = mutter.1
 | 
			
		||||
man_MANS = mutter.1 mutter-theme-viewer.1 \
 | 
			
		||||
	   mutter-window-demo.1 mutter-message.1
 | 
			
		||||
 | 
			
		||||
EXTRA_DIST = $(man_MANS)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										60
									
								
								doc/man/mutter-message.1
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								doc/man/mutter-message.1
									
									
									
									
									
										Normal 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).
 | 
			
		||||
							
								
								
									
										43
									
								
								doc/man/mutter-theme-viewer.1
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								doc/man/mutter-theme-viewer.1
									
									
									
									
									
										Normal 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).
 | 
			
		||||
							
								
								
									
										25
									
								
								doc/man/mutter-window-demo.1
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								doc/man/mutter-window-demo.1
									
									
									
									
									
										Normal 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).
 | 
			
		||||
@@ -49,8 +49,8 @@ FIXXREF_OPTIONS=
 | 
			
		||||
# Used for dependencies. The docs will be rebuilt if any of these change.
 | 
			
		||||
# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
 | 
			
		||||
# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
 | 
			
		||||
HFILE_GLOB=$(top_srcdir)/src/*/*.h
 | 
			
		||||
CFILE_GLOB=$(top_srcdir)/src/*/*.c
 | 
			
		||||
HFILE_GLOB=$(top_srcdir)/src/*.h
 | 
			
		||||
CFILE_GLOB=$(top_srcdir)/src/*.c
 | 
			
		||||
 | 
			
		||||
# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
 | 
			
		||||
# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
 | 
			
		||||
 
 | 
			
		||||
@@ -96,6 +96,8 @@ meta_compositor_hide_window
 | 
			
		||||
meta_compositor_switch_workspace
 | 
			
		||||
meta_compositor_maximize_window
 | 
			
		||||
meta_compositor_unmaximize_window
 | 
			
		||||
meta_compositor_window_mapped
 | 
			
		||||
meta_compositor_window_unmapped
 | 
			
		||||
meta_compositor_sync_window_geometry
 | 
			
		||||
meta_compositor_set_updates_frozen
 | 
			
		||||
meta_compositor_queue_frame_drawn
 | 
			
		||||
@@ -205,6 +207,7 @@ meta_key_binding_get_modifiers
 | 
			
		||||
meta_key_binding_get_mask
 | 
			
		||||
meta_key_binding_is_builtin
 | 
			
		||||
meta_keybindings_set_custom_handler
 | 
			
		||||
meta_keybindings_switch_window
 | 
			
		||||
meta_screen_ungrab_all_keys
 | 
			
		||||
meta_screen_grab_all_keys
 | 
			
		||||
</SECTION>
 | 
			
		||||
@@ -386,23 +389,6 @@ MetaWindowActorPrivate
 | 
			
		||||
meta_window_actor_get_type
 | 
			
		||||
</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>
 | 
			
		||||
<FILE>prefs</FILE>
 | 
			
		||||
MetaPreference
 | 
			
		||||
@@ -423,6 +409,7 @@ meta_prefs_get_theme
 | 
			
		||||
meta_prefs_get_titlebar_font
 | 
			
		||||
meta_prefs_get_num_workspaces
 | 
			
		||||
meta_prefs_get_dynamic_workspaces
 | 
			
		||||
meta_prefs_get_application_based
 | 
			
		||||
meta_prefs_get_disable_workarounds
 | 
			
		||||
meta_prefs_get_auto_raise
 | 
			
		||||
meta_prefs_get_auto_raise_delay
 | 
			
		||||
@@ -556,10 +543,7 @@ meta_window_is_override_redirect
 | 
			
		||||
meta_window_is_skip_taskbar
 | 
			
		||||
meta_window_get_rect
 | 
			
		||||
meta_window_get_input_rect
 | 
			
		||||
meta_window_get_frame_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_display
 | 
			
		||||
meta_window_get_xwindow
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,6 @@ environment.</description>
 | 
			
		||||
  -->
 | 
			
		||||
  <mailing-list rdf:resource="http://mail.gnome.org/mailman/listinfo/gnome-shell-list" />
 | 
			
		||||
  <download-page rdf:resource="http://download.gnome.org/sources/mutter/" />
 | 
			
		||||
  <download-page rdf:resource="http://download.gnome.org/sources/mutter-wayland/" />
 | 
			
		||||
  <bug-database rdf:resource="http://bugzilla.gnome.org/browse.cgi?product=mutter" />
 | 
			
		||||
 | 
			
		||||
  <category rdf:resource="http://api.gnome.org/doap-extensions#desktop" />
 | 
			
		||||
 
 | 
			
		||||
@@ -44,7 +44,6 @@ is
 | 
			
		||||
it
 | 
			
		||||
ja
 | 
			
		||||
ka
 | 
			
		||||
kk
 | 
			
		||||
kn
 | 
			
		||||
ko
 | 
			
		||||
ku
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,6 @@ src/core/display.c
 | 
			
		||||
src/core/errors.c
 | 
			
		||||
src/core/keybindings.c
 | 
			
		||||
src/core/main.c
 | 
			
		||||
src/core/monitor.c
 | 
			
		||||
src/core/mutter.c
 | 
			
		||||
src/core/prefs.c
 | 
			
		||||
src/core/screen.c
 | 
			
		||||
@@ -24,9 +23,12 @@ src/core/xprops.c
 | 
			
		||||
src/mutter.desktop.in
 | 
			
		||||
src/mutter-wm.desktop.in
 | 
			
		||||
src/org.gnome.mutter.gschema.xml.in
 | 
			
		||||
src/tools/mutter-message.c
 | 
			
		||||
src/ui/frames.c
 | 
			
		||||
src/ui/menu.c
 | 
			
		||||
src/ui/metaaccellabel.c
 | 
			
		||||
src/ui/resizepopup.c
 | 
			
		||||
src/ui/theme.c
 | 
			
		||||
src/ui/theme-parser.c
 | 
			
		||||
src/ui/theme-viewer.c
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										441
									
								
								po/be.po
									
									
									
									
									
								
							
							
						
						
									
										441
									
								
								po/be.po
									
									
									
									
									
								
							@@ -1,10 +1,10 @@
 | 
			
		||||
# Ihar Hrachyshka <ihar.hrachyshka@gmail.com>, 2011, 2013.
 | 
			
		||||
# Ihar Hrachyshka <ihar.hrachyshka@gmail.com>, 2011.
 | 
			
		||||
msgid ""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Project-Id-Version: mutter.master\n"
 | 
			
		||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
 | 
			
		||||
"product=mutter&keywords=I18N+L10N&component=general\n"
 | 
			
		||||
"POT-Creation-Date: 2013-08-18 20:03+0000\n"
 | 
			
		||||
"POT-Creation-Date: 2013-03-01 15:50+0000\n"
 | 
			
		||||
"PO-Revision-Date: 2012-10-13 17:44+0300\n"
 | 
			
		||||
"Last-Translator: Ігар Грачышка <ihar.hrachyshka@gmail.com>\n"
 | 
			
		||||
"Language-Team: Belarusian <i18n-bel-gnome@googlegroups.com>\n"
 | 
			
		||||
@@ -206,7 +206,7 @@ msgstr "Падзяліць прагляд справа"
 | 
			
		||||
 | 
			
		||||
#. This probably means that a non-WM compositor like xcompmgr is running;
 | 
			
		||||
#. * we have no way to get it to exit
 | 
			
		||||
#: ../src/compositor/compositor.c:589
 | 
			
		||||
#: ../src/compositor/compositor.c:507
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"Another compositing manager is already running on screen %i on display \"%s"
 | 
			
		||||
@@ -214,11 +214,11 @@ msgid ""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Іншы кампазітны кіраўнік вокнаў ужо абслугоўвае экран %i дысплея \"%s\"."
 | 
			
		||||
 | 
			
		||||
#: ../src/compositor/meta-background.c:1076
 | 
			
		||||
#: ../src/compositor/meta-background.c:1111
 | 
			
		||||
msgid "background texture could not be created from file"
 | 
			
		||||
msgstr "не ўдалося стварыць фонавую тэкстуру з файла"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/bell.c:322
 | 
			
		||||
#: ../src/core/bell.c:320
 | 
			
		||||
msgid "Bell event"
 | 
			
		||||
msgstr "Падзея з сігналам"
 | 
			
		||||
 | 
			
		||||
@@ -251,18 +251,18 @@ msgstr "_Пачакаць"
 | 
			
		||||
msgid "_Force Quit"
 | 
			
		||||
msgstr "_Змусіць да выхаду"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/display.c:421
 | 
			
		||||
#: ../src/core/display.c:401
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Missing %s extension required for compositing"
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Адсутнічае пашырэнне \"%s\", патрэбнае для ажыццяўлення кампазітнага вываду"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/display.c:513
 | 
			
		||||
#: ../src/core/display.c:493
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Failed to open X Window System display '%s'\n"
 | 
			
		||||
msgstr "Не ўдалося адкрыць X-дысплей аконнай сістэмы \"%s\"\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/keybindings.c:1136
 | 
			
		||||
#: ../src/core/keybindings.c:929
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"Some other program is already using the key %s with modifiers %x as a "
 | 
			
		||||
@@ -271,41 +271,41 @@ msgstr ""
 | 
			
		||||
"Нейкая іншая праграма ўжо выкарыстоўвае як скарот клавішу %s з "
 | 
			
		||||
"мадыфікатарамі %x\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/keybindings.c:1333
 | 
			
		||||
#: ../src/core/keybindings.c:1129
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "\"%s\" is not a valid accelerator\n"
 | 
			
		||||
msgstr "\"%s\" - гэта хібны клавіятурны скарот\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/main.c:197
 | 
			
		||||
#: ../src/core/main.c:196
 | 
			
		||||
msgid "Disable connection to session manager"
 | 
			
		||||
msgstr "Выключыць злучэнне з кіраўніком сеансаў"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/main.c:203
 | 
			
		||||
#: ../src/core/main.c:202
 | 
			
		||||
msgid "Replace the running window manager"
 | 
			
		||||
msgstr "Замяніць дзейнага кіраўніка вокнаў"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/main.c:209
 | 
			
		||||
#: ../src/core/main.c:208
 | 
			
		||||
msgid "Specify session management ID"
 | 
			
		||||
msgstr "Вызначыць ідэнтыфікатар для кіравання сеансам"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/main.c:214
 | 
			
		||||
#: ../src/core/main.c:213
 | 
			
		||||
msgid "X Display to use"
 | 
			
		||||
msgstr "Патрэбны X-дысплей"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/main.c:220
 | 
			
		||||
#: ../src/core/main.c:219
 | 
			
		||||
msgid "Initialize session from savefile"
 | 
			
		||||
msgstr "Ініцыяваць сеанс з файла"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/main.c:226
 | 
			
		||||
#: ../src/core/main.c:225
 | 
			
		||||
msgid "Make X calls synchronous"
 | 
			
		||||
msgstr "Сінхронна выконваць выклікі X-сістэмы"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/main.c:534
 | 
			
		||||
#: ../src/core/main.c:494
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Failed to scan themes directory: %s\n"
 | 
			
		||||
msgstr "Не ўдалося праглядзець каталог з матывамі аздаблення: %s\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/main.c:550
 | 
			
		||||
#: ../src/core/main.c:510
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"Could not find a theme! Be sure %s exists and contains the usual themes.\n"
 | 
			
		||||
@@ -313,19 +313,6 @@ msgstr ""
 | 
			
		||||
"Не ўдалося адшукаць матыў аздаблення! Праверце, каб каталог %s існаваў і "
 | 
			
		||||
"змяшчаў звычайныя матывы.\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/monitor.c:711
 | 
			
		||||
msgid "Built-in display"
 | 
			
		||||
msgstr "Убудаваны дысплей"
 | 
			
		||||
 | 
			
		||||
#. TRANSLATORS: this is a monitor name (in case we don't know
 | 
			
		||||
#. the vendor), it's Unknown followed by a size in inches,
 | 
			
		||||
#. like 'Unknown 15"'
 | 
			
		||||
#.
 | 
			
		||||
#: ../src/core/monitor.c:739
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Unknown %s"
 | 
			
		||||
msgstr "Невядомы %s"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/mutter.c:40
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
@@ -350,7 +337,7 @@ msgstr "Вывесці нумар версіі праграмы"
 | 
			
		||||
msgid "Mutter plugin to use"
 | 
			
		||||
msgstr "Патрэбны плугін Mutter"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/prefs.c:1202
 | 
			
		||||
#: ../src/core/prefs.c:1087
 | 
			
		||||
msgid ""
 | 
			
		||||
"Workarounds for broken applications disabled. Some applications may not "
 | 
			
		||||
"behave properly.\n"
 | 
			
		||||
@@ -358,12 +345,12 @@ msgstr ""
 | 
			
		||||
"Асаблівыя паводзіны для некаторых хібных праграм выключаныя. Некаторыя "
 | 
			
		||||
"праграмы могуць перастаць працаваць, як мае быць.\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/prefs.c:1277
 | 
			
		||||
#: ../src/core/prefs.c:1162
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Could not parse font description \"%s\" from GSettings key %s\n"
 | 
			
		||||
msgstr "Не ўдалося разабраць азначэнне шрыфту \"%s\" з GSettings-ключа %s\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/prefs.c:1343
 | 
			
		||||
#: ../src/core/prefs.c:1228
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"\"%s\" found in configuration database is not a valid value for mouse button "
 | 
			
		||||
@@ -372,7 +359,7 @@ msgstr ""
 | 
			
		||||
"Значэнне \"%s\", знойдзенае ў базе канфігурацыйных даных, не азначае "
 | 
			
		||||
"мадыфікатар мышынай кнопкі\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/prefs.c:1909
 | 
			
		||||
#: ../src/core/prefs.c:1780
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"\"%s\" found in configuration database is not a valid value for keybinding "
 | 
			
		||||
@@ -381,17 +368,17 @@ msgstr ""
 | 
			
		||||
"Значэнне \"%s\", знойдзенае ў базе канфігурацыйных даных, не азначае "
 | 
			
		||||
"клавіятурны скарот \"%s\"\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/prefs.c:1999
 | 
			
		||||
#: ../src/core/prefs.c:1879
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Workspace %d"
 | 
			
		||||
msgstr "Прастора працы %d"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/screen.c:534
 | 
			
		||||
#: ../src/core/screen.c:673
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Screen %d on display '%s' is invalid\n"
 | 
			
		||||
msgstr "Экран %d на дысплеі \"%s\" хібны\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/screen.c:550
 | 
			
		||||
#: ../src/core/screen.c:689
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"Screen %d on display \"%s\" already has a window manager; try using the --"
 | 
			
		||||
@@ -400,19 +387,19 @@ msgstr ""
 | 
			
		||||
"Экран %d на дысплеі \"%s\" ужо мае аконнага кіраўніка. Каб замяніць яго "
 | 
			
		||||
"новым, дадайце опцыю --replace.\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/screen.c:577
 | 
			
		||||
#: ../src/core/screen.c:716
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"Could not acquire window manager selection on screen %d display \"%s\"\n"
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Не ўдалося пераняць вылучэнне кіраўніка вокнаў для экрана %d дысплея \"%s\"\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/screen.c:655
 | 
			
		||||
#: ../src/core/screen.c:794
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Screen %d on display \"%s\" already has a window manager\n"
 | 
			
		||||
msgstr "Экран %d на дысплеі \"%s\" ужо мае кіраўніка вокнаў\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/screen.c:846
 | 
			
		||||
#: ../src/core/screen.c:979
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Could not release screen %d on display \"%s\"\n"
 | 
			
		||||
msgstr "Не ўдалося вызваліць экран %d на дысплеі \"%s\"\n"
 | 
			
		||||
@@ -473,45 +460,46 @@ msgstr ""
 | 
			
		||||
"Гэтыя вокны не падтрымліваюць функцыі захавання дзейнага ладу працы, і таму "
 | 
			
		||||
"іх прыйдзецца запусціць уручную пасля наступнага ўваходу ў сістэму."
 | 
			
		||||
 | 
			
		||||
#: ../src/core/util.c:84
 | 
			
		||||
#: ../src/core/util.c:80
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Failed to open debug log: %s\n"
 | 
			
		||||
msgstr "Не ўдалося адкрыць адладачны журнал: %s\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/util.c:94
 | 
			
		||||
#: ../src/core/util.c:90
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Failed to fdopen() log file %s: %s\n"
 | 
			
		||||
msgstr "Не ўдалося выканаць fdopen() для журнальнага файла %s: %s\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/util.c:100
 | 
			
		||||
#: ../src/core/util.c:96
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Opened log file %s\n"
 | 
			
		||||
msgstr "Журнальны файл %s адкрыты\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/util.c:119
 | 
			
		||||
#: ../src/core/util.c:115 ../src/tools/mutter-message.c:149
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Mutter was compiled without support for verbose mode\n"
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Праграма \"Mutter\" была скампіляваная без падтрымкі падрабязнага "
 | 
			
		||||
"пратакаліравання\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/util.c:264
 | 
			
		||||
#: ../src/core/util.c:259
 | 
			
		||||
msgid "Window manager: "
 | 
			
		||||
msgstr "Кіраўнік вокнаў: "
 | 
			
		||||
 | 
			
		||||
#: ../src/core/util.c:414
 | 
			
		||||
#: ../src/core/util.c:407
 | 
			
		||||
msgid "Bug in window manager: "
 | 
			
		||||
msgstr "Хіба ў кіраўніку вокнаў: "
 | 
			
		||||
 | 
			
		||||
#: ../src/core/util.c:445
 | 
			
		||||
#: ../src/core/util.c:438
 | 
			
		||||
msgid "Window manager warning: "
 | 
			
		||||
msgstr "Перасцярога ад кіраўніка вокнаў: "
 | 
			
		||||
 | 
			
		||||
#: ../src/core/util.c:473
 | 
			
		||||
#: ../src/core/util.c:466
 | 
			
		||||
msgid "Window manager error: "
 | 
			
		||||
msgstr "Памылка кіраўніка вокнаў: "
 | 
			
		||||
 | 
			
		||||
#. first time through
 | 
			
		||||
#: ../src/core/window.c:7533
 | 
			
		||||
#: ../src/core/window.c:7539
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
 | 
			
		||||
@@ -527,7 +515,7 @@ msgstr ""
 | 
			
		||||
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
 | 
			
		||||
#. * about these apps but make them work.
 | 
			
		||||
#.
 | 
			
		||||
#: ../src/core/window.c:8257
 | 
			
		||||
#: ../src/core/window.c:8263
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size "
 | 
			
		||||
@@ -537,22 +525,22 @@ msgstr ""
 | 
			
		||||
"памеру, але разам з гэтым прызначыла для сябе мінімальны памер %d x %d і "
 | 
			
		||||
"максімальны памер %d x %d. Такія паводзіны не маюць сэнсу.\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/window-props.c:347
 | 
			
		||||
#: ../src/core/window-props.c:318
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Application set a bogus _NET_WM_PID %lu\n"
 | 
			
		||||
msgstr "Праграма прызначыла памылковае значэнне _NET_WM_PID %lu\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/window-props.c:463
 | 
			
		||||
#: ../src/core/window-props.c:434
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "%s (on %s)"
 | 
			
		||||
msgstr "%s (на %s)"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/window-props.c:1546
 | 
			
		||||
#: ../src/core/window-props.c:1517
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
 | 
			
		||||
msgstr "Для %2$s вызначана хібнае акно WM_TRANSIENT_FOR 0x%1$lx.\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/window-props.c:1557
 | 
			
		||||
#: ../src/core/window-props.c:1528
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "WM_TRANSIENT_FOR window 0x%lx for %s would create loop.\n"
 | 
			
		||||
msgstr "WM_TRANSIENT_FOR акно 0x%lx для %s стварыла б цыкл.\n"
 | 
			
		||||
@@ -701,8 +689,7 @@ msgstr ""
 | 
			
		||||
 | 
			
		||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:17
 | 
			
		||||
msgid "Auto maximize nearly monitor sized windows"
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Аўтаматычна максімалізаваць вокны, якія расцягнутыя амаль на ўвесь экран"
 | 
			
		||||
msgstr "Аўтаматычна максімалізаваць вокны, якія расцягнутыя амаль на ўвесь экран"
 | 
			
		||||
 | 
			
		||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:18
 | 
			
		||||
msgid ""
 | 
			
		||||
@@ -720,104 +707,109 @@ msgstr "Выбраць акно з выплыўнога акенца"
 | 
			
		||||
msgid "Cancel tab popup"
 | 
			
		||||
msgstr "Закрыць выплыўное акенца"
 | 
			
		||||
 | 
			
		||||
#: ../src/tools/mutter-message.c:123
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Usage: %s\n"
 | 
			
		||||
msgstr "Правілы выкарыстання: %s\n"
 | 
			
		||||
 | 
			
		||||
#. Translators: Translate this string the same way as you do in libwnck!
 | 
			
		||||
#: ../src/ui/menu.c:67
 | 
			
		||||
#: ../src/ui/menu.c:69
 | 
			
		||||
msgid "Mi_nimize"
 | 
			
		||||
msgstr "_Мінімалізаваць"
 | 
			
		||||
 | 
			
		||||
#. Translators: Translate this string the same way as you do in libwnck!
 | 
			
		||||
#: ../src/ui/menu.c:69
 | 
			
		||||
#: ../src/ui/menu.c:71
 | 
			
		||||
msgid "Ma_ximize"
 | 
			
		||||
msgstr "Ма_ксімалізаваць"
 | 
			
		||||
 | 
			
		||||
#. Translators: Translate this string the same way as you do in libwnck!
 | 
			
		||||
#: ../src/ui/menu.c:71
 | 
			
		||||
#: ../src/ui/menu.c:73
 | 
			
		||||
msgid "Unma_ximize"
 | 
			
		||||
msgstr "Скасаваць ма_ксімалізацыю"
 | 
			
		||||
 | 
			
		||||
#. Translators: Translate this string the same way as you do in libwnck!
 | 
			
		||||
#: ../src/ui/menu.c:73
 | 
			
		||||
#: ../src/ui/menu.c:75
 | 
			
		||||
msgid "Roll _Up"
 | 
			
		||||
msgstr "_Скруціць акно ў загаловак"
 | 
			
		||||
 | 
			
		||||
#. Translators: Translate this string the same way as you do in libwnck!
 | 
			
		||||
#: ../src/ui/menu.c:75
 | 
			
		||||
#: ../src/ui/menu.c:77
 | 
			
		||||
msgid "_Unroll"
 | 
			
		||||
msgstr "Рас_круціць акно з загалоўка"
 | 
			
		||||
 | 
			
		||||
#. Translators: Translate this string the same way as you do in libwnck!
 | 
			
		||||
#: ../src/ui/menu.c:77
 | 
			
		||||
#: ../src/ui/menu.c:79
 | 
			
		||||
msgid "_Move"
 | 
			
		||||
msgstr "_Перамясціць акно"
 | 
			
		||||
 | 
			
		||||
#. Translators: Translate this string the same way as you do in libwnck!
 | 
			
		||||
#: ../src/ui/menu.c:79
 | 
			
		||||
#: ../src/ui/menu.c:81
 | 
			
		||||
msgid "_Resize"
 | 
			
		||||
msgstr "_Змяніць памер акна"
 | 
			
		||||
 | 
			
		||||
#. Translators: Translate this string the same way as you do in libwnck!
 | 
			
		||||
#: ../src/ui/menu.c:81
 | 
			
		||||
#: ../src/ui/menu.c:83
 | 
			
		||||
msgid "Move Titlebar On_screen"
 | 
			
		||||
msgstr "Перамясціць загаловак акна па _экране"
 | 
			
		||||
 | 
			
		||||
#. separator
 | 
			
		||||
#. Translators: Translate this string the same way as you do in libwnck!
 | 
			
		||||
#: ../src/ui/menu.c:84 ../src/ui/menu.c:86
 | 
			
		||||
#: ../src/ui/menu.c:86 ../src/ui/menu.c:88
 | 
			
		||||
msgid "Always on _Top"
 | 
			
		||||
msgstr "Заўсёды _наверсе"
 | 
			
		||||
 | 
			
		||||
#. Translators: Translate this string the same way as you do in libwnck!
 | 
			
		||||
#: ../src/ui/menu.c:88
 | 
			
		||||
#: ../src/ui/menu.c:90
 | 
			
		||||
msgid "_Always on Visible Workspace"
 | 
			
		||||
msgstr "Заўсёды на _бачнай прасторы працы"
 | 
			
		||||
 | 
			
		||||
#. Translators: Translate this string the same way as you do in libwnck!
 | 
			
		||||
#: ../src/ui/menu.c:90
 | 
			
		||||
#: ../src/ui/menu.c:92
 | 
			
		||||
msgid "_Only on This Workspace"
 | 
			
		||||
msgstr "_Толькі на гэтай прасторы працы"
 | 
			
		||||
 | 
			
		||||
#. Translators: Translate this string the same way as you do in libwnck!
 | 
			
		||||
#: ../src/ui/menu.c:92
 | 
			
		||||
#: ../src/ui/menu.c:94
 | 
			
		||||
msgid "Move to Workspace _Left"
 | 
			
		||||
msgstr "Перамясціць на прастору працы з_лева"
 | 
			
		||||
 | 
			
		||||
#. Translators: Translate this string the same way as you do in libwnck!
 | 
			
		||||
#: ../src/ui/menu.c:94
 | 
			
		||||
#: ../src/ui/menu.c:96
 | 
			
		||||
msgid "Move to Workspace R_ight"
 | 
			
		||||
msgstr "Перамясціць на прастору працы с_права"
 | 
			
		||||
 | 
			
		||||
#. Translators: Translate this string the same way as you do in libwnck!
 | 
			
		||||
#: ../src/ui/menu.c:96
 | 
			
		||||
#: ../src/ui/menu.c:98
 | 
			
		||||
msgid "Move to Workspace _Up"
 | 
			
		||||
msgstr "Перамясціць на прастору працы з_верху"
 | 
			
		||||
 | 
			
		||||
#. Translators: Translate this string the same way as you do in libwnck!
 | 
			
		||||
#: ../src/ui/menu.c:98
 | 
			
		||||
#: ../src/ui/menu.c:100
 | 
			
		||||
msgid "Move to Workspace _Down"
 | 
			
		||||
msgstr "Перамясціць на прастору працы з_нізу"
 | 
			
		||||
 | 
			
		||||
#. separator
 | 
			
		||||
#. Translators: Translate this string the same way as you do in libwnck!
 | 
			
		||||
#: ../src/ui/menu.c:102
 | 
			
		||||
#: ../src/ui/menu.c:104
 | 
			
		||||
msgid "_Close"
 | 
			
		||||
msgstr "_Закрыць акно"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/menu.c:202
 | 
			
		||||
#: ../src/ui/menu.c:204
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Workspace %d%n"
 | 
			
		||||
msgstr "Прастора працы %d%n"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/menu.c:212
 | 
			
		||||
#: ../src/ui/menu.c:214
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Workspace 1_0"
 | 
			
		||||
msgstr "Прастора працы 1_0"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/menu.c:214
 | 
			
		||||
#: ../src/ui/menu.c:216
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Workspace %s%d"
 | 
			
		||||
msgstr "Прастора працы %s%d"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/menu.c:384
 | 
			
		||||
#: ../src/ui/menu.c:397
 | 
			
		||||
msgid "Move to Another _Workspace"
 | 
			
		||||
msgstr "П_ерамясціць на іншую прастору працы"
 | 
			
		||||
 | 
			
		||||
@@ -919,49 +911,49 @@ msgstr "Mod5"
 | 
			
		||||
msgid "%d x %d"
 | 
			
		||||
msgstr "%d x %d"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:236
 | 
			
		||||
#: ../src/ui/theme.c:235
 | 
			
		||||
msgid "top"
 | 
			
		||||
msgstr "верхнюю"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:238
 | 
			
		||||
#: ../src/ui/theme.c:237
 | 
			
		||||
msgid "bottom"
 | 
			
		||||
msgstr "ніжнюю"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:240
 | 
			
		||||
#: ../src/ui/theme.c:239
 | 
			
		||||
msgid "left"
 | 
			
		||||
msgstr "левую"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:242
 | 
			
		||||
#: ../src/ui/theme.c:241
 | 
			
		||||
msgid "right"
 | 
			
		||||
msgstr "правую"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:270
 | 
			
		||||
#: ../src/ui/theme.c:269
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "frame geometry does not specify \"%s\" dimension"
 | 
			
		||||
msgstr "апісанне геаметрыі рамкі акна не вызначае %s граніцу"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:289
 | 
			
		||||
#: ../src/ui/theme.c:288
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"апісанне геаметрыі рамкі акна не вызначае %s граніцу для аблямоўкі \"%s\""
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:326
 | 
			
		||||
#: ../src/ui/theme.c:325
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Button aspect ratio %g is not reasonable"
 | 
			
		||||
msgstr "Прапорцыі кнопкі %g не маюць сэнсу"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:338
 | 
			
		||||
#: ../src/ui/theme.c:337
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Frame geometry does not specify size of buttons"
 | 
			
		||||
msgstr "Апісанне геаметрыі рамкі акна не вызначае памер кнопак"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:1051
 | 
			
		||||
#: ../src/ui/theme.c:1050
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Gradients should have at least two colors"
 | 
			
		||||
msgstr "Градыент мусіць мець прынамсі два колеры"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:1203
 | 
			
		||||
#: ../src/ui/theme.c:1202
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"GTK custom color specification must have color name and fallback in "
 | 
			
		||||
@@ -970,7 +962,7 @@ msgstr ""
 | 
			
		||||
"Уласная спецыфікацыя колеру GTK мусіць змяшчаць назвы асноўнага і запаснога "
 | 
			
		||||
"колераў у дужках, напрыклад, gtk:custom(foo,bar). Не ўдалося разабраць \"%s\""
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:1219
 | 
			
		||||
#: ../src/ui/theme.c:1218
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-"
 | 
			
		||||
@@ -979,7 +971,7 @@ msgstr ""
 | 
			
		||||
"Хібны знак \"%c\" у параметры color_name спецыфікацыі gtk:custom, дазволеныя "
 | 
			
		||||
"толькі A-Za-z0-9-_"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:1233
 | 
			
		||||
#: ../src/ui/theme.c:1232
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not "
 | 
			
		||||
@@ -988,7 +980,7 @@ msgstr ""
 | 
			
		||||
"Фармат gtk:custom: \"gtk:custom(назва_колеру,запасны_колер)\"; \"%s\" не "
 | 
			
		||||
"адпавядае фармату"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:1278
 | 
			
		||||
#: ../src/ui/theme.c:1277
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
 | 
			
		||||
@@ -997,7 +989,7 @@ msgstr ""
 | 
			
		||||
"Спецыфікацыя колеру GTK мусіць мець стан у квадратных дужках, напрыклад, gtk:"
 | 
			
		||||
"fg[NORMAL], дзе NORMAL - гэта стан. Не ўдалося разабраць \"%s\""
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:1292
 | 
			
		||||
#: ../src/ui/theme.c:1291
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"GTK color specification must have a close bracket after the state, e.g. gtk:"
 | 
			
		||||
@@ -1007,17 +999,17 @@ msgstr ""
 | 
			
		||||
"напрыклад, gtk:fg[NORMAL], дзе NORMAL - гэта стан. Не ўдалося разабраць \"%s"
 | 
			
		||||
"\""
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:1303
 | 
			
		||||
#: ../src/ui/theme.c:1302
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Did not understand state \"%s\" in color specification"
 | 
			
		||||
msgstr "Незразумелы стан \"%s\" у спецыфікацыі колеру"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:1316
 | 
			
		||||
#: ../src/ui/theme.c:1315
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Did not understand color component \"%s\" in color specification"
 | 
			
		||||
msgstr "Незразумелы складнік колеру \"%s\" у спецыфікацыі колеру"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:1345
 | 
			
		||||
#: ../src/ui/theme.c:1344
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the "
 | 
			
		||||
@@ -1026,58 +1018,58 @@ msgstr ""
 | 
			
		||||
"Фармат змяшанага колеру - \"blend/bg_color/fg_color/alpha\". \"%s\" не "
 | 
			
		||||
"адпавядае фармату."
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:1356
 | 
			
		||||
#: ../src/ui/theme.c:1355
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Could not parse alpha value \"%s\" in blended color"
 | 
			
		||||
msgstr "Не ўдалося разабраць значэнне альфа \"%s\" ў змяшаным колеры"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:1366
 | 
			
		||||
#: ../src/ui/theme.c:1365
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Alpha value \"%s\" in blended color is not between 0.0 and 1.0"
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Значэнне альфа \"%s\" у змяшаным колеры не ўваходзіць у дыяпазон ад 0.0 да "
 | 
			
		||||
"1.0"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:1413
 | 
			
		||||
#: ../src/ui/theme.c:1412
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format"
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Фармат ценю - \"shade/base_color/factor\". \"%s\" не адпавядае фармату."
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:1424
 | 
			
		||||
#: ../src/ui/theme.c:1423
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Could not parse shade factor \"%s\" in shaded color"
 | 
			
		||||
msgstr "Не ўдалося разабраць каэфіцыент ценю \"%s\" у зацененым колеры"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:1434
 | 
			
		||||
#: ../src/ui/theme.c:1433
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Shade factor \"%s\" in shaded color is negative"
 | 
			
		||||
msgstr "Каэфіцыент ценю \"%s\" у зацененым колеры адмоўны"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:1463
 | 
			
		||||
#: ../src/ui/theme.c:1462
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Could not parse color \"%s\""
 | 
			
		||||
msgstr "Не ўдалося разабраць колер \"%s\""
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:1780
 | 
			
		||||
#: ../src/ui/theme.c:1779
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Coordinate expression contains character '%s' which is not allowed"
 | 
			
		||||
msgstr "Каардынатны выраз змяшчае забаронены знак \"%s\""
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:1807
 | 
			
		||||
#: ../src/ui/theme.c:1806
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"Coordinate expression contains floating point number '%s' which could not be "
 | 
			
		||||
"parsed"
 | 
			
		||||
msgstr "Каардынатны выраз змяшчае незразумелы лік з нефіксаванай коскай \"%s\""
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:1821
 | 
			
		||||
#: ../src/ui/theme.c:1820
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Coordinate expression contains integer '%s' which could not be parsed"
 | 
			
		||||
msgstr "Каардынатны выраз змяшчае незразумелы цэлы лік \"%s\""
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:1942
 | 
			
		||||
#: ../src/ui/theme.c:1941
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"Coordinate expression contained unknown operator at the start of this text: "
 | 
			
		||||
@@ -1085,17 +1077,17 @@ msgid ""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Каардынатны выраз змяшчае невядомы аператар у пачатку гэтага тэксту: \"%s\""
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:1999
 | 
			
		||||
#: ../src/ui/theme.c:1998
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Coordinate expression was empty or not understood"
 | 
			
		||||
msgstr "Каардынатны выраз пусты ці незразумелы"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:2112 ../src/ui/theme.c:2122 ../src/ui/theme.c:2156
 | 
			
		||||
#: ../src/ui/theme.c:2111 ../src/ui/theme.c:2121 ../src/ui/theme.c:2155
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Coordinate expression results in division by zero"
 | 
			
		||||
msgstr "Каардынатны выраз вымагае дзялення на нуль"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:2164
 | 
			
		||||
#: ../src/ui/theme.c:2163
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"Coordinate expression tries to use mod operator on a floating-point number"
 | 
			
		||||
@@ -1103,24 +1095,24 @@ msgstr ""
 | 
			
		||||
"Каардынатны выраз спрабуе ўжыць аператар дзялення па модулі для ліку з "
 | 
			
		||||
"нефіксаванай коскай"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:2220
 | 
			
		||||
#: ../src/ui/theme.c:2219
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"Coordinate expression has an operator \"%s\" where an operand was expected"
 | 
			
		||||
msgstr ""
 | 
			
		||||
"У каардынатным выразе ўжыты аператар \"%s\" там, дзе мусіў быць аперанд"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:2229
 | 
			
		||||
#: ../src/ui/theme.c:2228
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Coordinate expression had an operand where an operator was expected"
 | 
			
		||||
msgstr "У каардынатным выразе ўжыты аперанд там, дзе мусіў быць аператар"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:2237
 | 
			
		||||
#: ../src/ui/theme.c:2236
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Coordinate expression ended with an operator instead of an operand"
 | 
			
		||||
msgstr "Каардынатны выраз заканчваецца аператарам, а не аперандам"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:2247
 | 
			
		||||
#: ../src/ui/theme.c:2246
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"Coordinate expression has operator \"%c\" following operator \"%c\" with no "
 | 
			
		||||
@@ -1129,41 +1121,41 @@ msgstr ""
 | 
			
		||||
"У каардынатным выразе за аператарам \"%c\" ідзе аператар \"%c\", але паміж "
 | 
			
		||||
"імі няма аперанда"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:2398 ../src/ui/theme.c:2443
 | 
			
		||||
#: ../src/ui/theme.c:2397 ../src/ui/theme.c:2442
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Coordinate expression had unknown variable or constant \"%s\""
 | 
			
		||||
msgstr "У каардынатным выразе невядомая зменная альбо канстанта \"%s\""
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:2497
 | 
			
		||||
#: ../src/ui/theme.c:2496
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Coordinate expression parser overflowed its buffer."
 | 
			
		||||
msgstr "Прылада для разбору каардынатных выразаў перапоўніла свой буфер."
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:2526
 | 
			
		||||
#: ../src/ui/theme.c:2525
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Coordinate expression had a close parenthesis with no open parenthesis"
 | 
			
		||||
msgstr ""
 | 
			
		||||
"У каардынатным выразе ўжытыя дужкі, якія закрываюцца, але няма тых, якія б "
 | 
			
		||||
"адкрываліся"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:2590
 | 
			
		||||
#: ../src/ui/theme.c:2589
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Coordinate expression had an open parenthesis with no close parenthesis"
 | 
			
		||||
msgstr ""
 | 
			
		||||
"У каардынатным выразе ўжытыя дужкі, якія адкрываюцца, але няма тых, якія б "
 | 
			
		||||
"закрываліся"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:2601
 | 
			
		||||
#: ../src/ui/theme.c:2600
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Coordinate expression doesn't seem to have any operators or operands"
 | 
			
		||||
msgstr "У каардынатным выразе няма ні аператараў, ні аперандаў"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:2814 ../src/ui/theme.c:2834 ../src/ui/theme.c:2854
 | 
			
		||||
#: ../src/ui/theme.c:2813 ../src/ui/theme.c:2833 ../src/ui/theme.c:2853
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Theme contained an expression that resulted in an error: %s\n"
 | 
			
		||||
msgstr "Матыў аздаблення змяшчае выраз, які стаў прычынай памылкі: %s\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:4500
 | 
			
		||||
#: ../src/ui/theme.c:4499
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be "
 | 
			
		||||
@@ -1172,25 +1164,25 @@ msgstr ""
 | 
			
		||||
"Для гэтага стылю рамкі трэба вызначыць <button function=\"%s\" state=\"%s\" "
 | 
			
		||||
"draw_ops=\"whatever\"/>"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:5011 ../src/ui/theme.c:5036
 | 
			
		||||
#: ../src/ui/theme.c:5010 ../src/ui/theme.c:5035
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Няма <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"што-небудзь\"/>"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:5082
 | 
			
		||||
#: ../src/ui/theme.c:5083
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Failed to load theme \"%s\": %s\n"
 | 
			
		||||
msgstr "Не ўдалося загрузіць матыў аздаблення \"%s\": %s\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:5218 ../src/ui/theme.c:5225 ../src/ui/theme.c:5232
 | 
			
		||||
#: ../src/ui/theme.c:5239 ../src/ui/theme.c:5246
 | 
			
		||||
#: ../src/ui/theme.c:5219 ../src/ui/theme.c:5226 ../src/ui/theme.c:5233
 | 
			
		||||
#: ../src/ui/theme.c:5240 ../src/ui/theme.c:5247
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "No <%s> set for theme \"%s\""
 | 
			
		||||
msgstr "Для матыву аздаблення \"%2$s\" не прызначана <%1$s>"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:5254
 | 
			
		||||
#: ../src/ui/theme.c:5255
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"No frame style set for window type \"%s\" in theme \"%s\", add a <window "
 | 
			
		||||
@@ -1199,7 +1191,7 @@ msgstr ""
 | 
			
		||||
"Стыль рамкі не вызначаны для вокнаў тыпу \"%s\" для матыву аздаблення \"%s"
 | 
			
		||||
"\". Дадайце <window type=\"%s\" style_set=\"штосьці\"/>."
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:5661 ../src/ui/theme.c:5723 ../src/ui/theme.c:5786
 | 
			
		||||
#: ../src/ui/theme.c:5662 ../src/ui/theme.c:5724 ../src/ui/theme.c:5787
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"User-defined constants must begin with a capital letter; \"%s\" does not"
 | 
			
		||||
@@ -1207,7 +1199,7 @@ msgstr ""
 | 
			
		||||
"Назвы канстантаў, вызначаных карыстальнікам, мусяць пачынацца з вялікай "
 | 
			
		||||
"літары. \"%s\" не адпавядае гэтаму патрабаванню."
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme.c:5669 ../src/ui/theme.c:5731 ../src/ui/theme.c:5794
 | 
			
		||||
#: ../src/ui/theme.c:5670 ../src/ui/theme.c:5732 ../src/ui/theme.c:5795
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Constant \"%s\" has already been defined"
 | 
			
		||||
msgstr "Канстанта \"%s\" ужо азначана"
 | 
			
		||||
@@ -1593,8 +1585,207 @@ msgstr "Выкарыстанне тэксту ўнутры элемента <%s>
 | 
			
		||||
msgid "<%s> specified twice for this theme"
 | 
			
		||||
msgstr "<%s> двойчы вызначаны для гэтага матыву аздаблення"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-parser.c:4336
 | 
			
		||||
#: ../src/ui/theme-parser.c:4334
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Failed to find a valid file for theme %s\n"
 | 
			
		||||
msgstr "Памылка пошуку правільнага файла для матыву аздаблення %s\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:99
 | 
			
		||||
msgid "_Windows"
 | 
			
		||||
msgstr "_Вокны"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:100
 | 
			
		||||
msgid "_Dialog"
 | 
			
		||||
msgstr "_Дыялогавае акенца"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:101
 | 
			
		||||
msgid "_Modal dialog"
 | 
			
		||||
msgstr "_Мадальнае дыялогавае акенца"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:102
 | 
			
		||||
msgid "_Utility"
 | 
			
		||||
msgstr "_Дапаможная праграма"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:103
 | 
			
		||||
msgid "_Splashscreen"
 | 
			
		||||
msgstr "_Экранная застаўка"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:104
 | 
			
		||||
msgid "_Top dock"
 | 
			
		||||
msgstr "_Верхняя ўбудова"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:105
 | 
			
		||||
msgid "_Bottom dock"
 | 
			
		||||
msgstr "_Ніжняя ўбудова"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:106
 | 
			
		||||
msgid "_Left dock"
 | 
			
		||||
msgstr "_Левая ўбудова"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:107
 | 
			
		||||
msgid "_Right dock"
 | 
			
		||||
msgstr "_Правая ўбудова"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:108
 | 
			
		||||
msgid "_All docks"
 | 
			
		||||
msgstr "_Усе ўбудовы"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:109
 | 
			
		||||
msgid "Des_ktop"
 | 
			
		||||
msgstr "_Стол"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:115
 | 
			
		||||
msgid "Open another one of these windows"
 | 
			
		||||
msgstr "Адкрыць чарговае з гэтых вокнаў"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:117
 | 
			
		||||
msgid "This is a demo button with an 'open' icon"
 | 
			
		||||
msgstr "Гэта дэманстрацыйная кнопка са значком \"Адкрыць\""
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:119
 | 
			
		||||
msgid "This is a demo button with a 'quit' icon"
 | 
			
		||||
msgstr "Гэта дэманстрацыйная кнопка са значком \"Выйсці\""
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:248
 | 
			
		||||
msgid "This is a sample message in a sample dialog"
 | 
			
		||||
msgstr "Гэта ўзорнае паведамленне ва ўзорным дыялогавым акенцы"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:328
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Fake menu item %d\n"
 | 
			
		||||
msgstr "Несапраўдны пункт меню %d\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:363
 | 
			
		||||
msgid "Border-only window"
 | 
			
		||||
msgstr "Акно толькі з аблямоўкай"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:365
 | 
			
		||||
msgid "Bar"
 | 
			
		||||
msgstr "Стужка"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:382
 | 
			
		||||
msgid "Normal Application Window"
 | 
			
		||||
msgstr "Звычайнае акно праграмы"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:386
 | 
			
		||||
msgid "Dialog Box"
 | 
			
		||||
msgstr "Дыялогавае акенца"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:390
 | 
			
		||||
msgid "Modal Dialog Box"
 | 
			
		||||
msgstr "Мадальнае дыялогавае акенца"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:394
 | 
			
		||||
msgid "Utility Palette"
 | 
			
		||||
msgstr "Дапаможная палітра"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:398
 | 
			
		||||
msgid "Torn-off Menu"
 | 
			
		||||
msgstr "Адчэпленае меню"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:402
 | 
			
		||||
msgid "Border"
 | 
			
		||||
msgstr "Аблямоўка"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:406
 | 
			
		||||
msgid "Attached Modal Dialog"
 | 
			
		||||
msgstr "Прычапленае мадальнае дыялогавае акенца"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:737
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Button layout test %d"
 | 
			
		||||
msgstr "Выпрабаванне размяшчэння кнопак %d"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:766
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "%g milliseconds to draw one window frame"
 | 
			
		||||
msgstr "%g мілісекунд, каб намаляваць адну рамку акна"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:811
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Usage: metacity-theme-viewer [THEMENAME]\n"
 | 
			
		||||
msgstr "Правілы карыстання: metacity-theme-viewer [НАЗВА_МАТЫВУ]\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:818
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Error loading theme: %s\n"
 | 
			
		||||
msgstr "Памылка загрузкі матыву аздаблення: %s\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:824
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Loaded theme \"%s\" in %g seconds\n"
 | 
			
		||||
msgstr "Матыў аздаблення \"%s\" загружаны за %g секунд\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:869
 | 
			
		||||
msgid "Normal Title Font"
 | 
			
		||||
msgstr "Звычайны шрыфт загалоўка"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:875
 | 
			
		||||
msgid "Small Title Font"
 | 
			
		||||
msgstr "Маленькі шрыфт загалоўка"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:881
 | 
			
		||||
msgid "Large Title Font"
 | 
			
		||||
msgstr "Вялікі шрыфт загалоўка"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:886
 | 
			
		||||
msgid "Button Layouts"
 | 
			
		||||
msgstr "Размяшчэнне кнопак"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:891
 | 
			
		||||
msgid "Benchmark"
 | 
			
		||||
msgstr "Выпрабаванне"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:947
 | 
			
		||||
msgid "Window Title Goes Here"
 | 
			
		||||
msgstr "Месца для загалоўка акна"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:1053
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"Drew %d frames in %g client-side seconds (%g milliseconds per frame) and %g "
 | 
			
		||||
"seconds wall clock time including X server resources (%g milliseconds per "
 | 
			
		||||
"frame)\n"
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Намалявана %d рамак цягам %g секунд кліенцкага часу (%g мілісекунд на рамку) "
 | 
			
		||||
"і %g секунд каляндарнага часу, уключна з рэсурсамі X-сервера (%g мілісекунд "
 | 
			
		||||
"на рамку)\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:1273
 | 
			
		||||
msgid "position expression test returned TRUE but set error"
 | 
			
		||||
msgstr "выпрабаванне выразу пазіцыі вярнула TRUE, але паведаміла аб памылцы"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:1275
 | 
			
		||||
msgid "position expression test returned FALSE but didn't set error"
 | 
			
		||||
msgstr ""
 | 
			
		||||
"выпрабаванне выразу пазіцыі вярнула FALSE, але не паведаміла аб памылцы"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:1279
 | 
			
		||||
msgid "Error was expected but none given"
 | 
			
		||||
msgstr "Чакалася памылка, але звесткі не атрыманыя"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:1281
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Error %d was expected but %d given"
 | 
			
		||||
msgstr "Чакалася памылка %d, але атрымана %d"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:1287
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Error not expected but one was returned: %s"
 | 
			
		||||
msgstr "Атрымана нечаканая памылка: %s"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:1291
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "x value was %d, %d was expected"
 | 
			
		||||
msgstr "X-значэнне было %d, а чакалася %d"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:1294
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "y value was %d, %d was expected"
 | 
			
		||||
msgstr "Y-значэнне было %d, а чакалася %d"
 | 
			
		||||
 | 
			
		||||
#: ../src/ui/theme-viewer.c:1359
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
 | 
			
		||||
msgstr ""
 | 
			
		||||
"%d каардынатных выразаў разабраныя за %g секунд (у сярэднім %g секунд)\n"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2834
									
								
								po/ca@valencia.po
									
									
									
									
									
								
							
							
						
						
									
										2834
									
								
								po/ca@valencia.po
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										231
									
								
								po/et.po
									
									
									
									
									
								
							
							
						
						
									
										231
									
								
								po/et.po
									
									
									
									
									
								
							@@ -14,8 +14,8 @@ msgstr ""
 | 
			
		||||
"Project-Id-Version: mutter MASTER\n"
 | 
			
		||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
 | 
			
		||||
"product=mutter&keywords=I18N+L10N&component=general\n"
 | 
			
		||||
"POT-Creation-Date: 2013-09-10 15:25+0000\n"
 | 
			
		||||
"PO-Revision-Date: 2013-09-11 23:20+0300\n"
 | 
			
		||||
"POT-Creation-Date: 2013-03-12 18:53+0000\n"
 | 
			
		||||
"PO-Revision-Date: 2013-03-12 20:55+0300\n"
 | 
			
		||||
"Last-Translator: Mattias Põldaru <mahfiaz@gmail.com>\n"
 | 
			
		||||
"Language-Team: Estonian <>\n"
 | 
			
		||||
"Language: et\n"
 | 
			
		||||
@@ -23,7 +23,6 @@ msgstr ""
 | 
			
		||||
"Content-Type: text/plain; charset=UTF-8\n"
 | 
			
		||||
"Content-Transfer-Encoding: 8bit\n"
 | 
			
		||||
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
 | 
			
		||||
"X-Generator: Poedit 1.5.4\n"
 | 
			
		||||
 | 
			
		||||
msgid "Navigation"
 | 
			
		||||
msgstr "Navigeerimine"
 | 
			
		||||
@@ -250,17 +249,6 @@ msgid ""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Teemat ei leitud! Veendu, et %s on olemas ja sisaldab harilikke teemasid.\n"
 | 
			
		||||
 | 
			
		||||
msgid "Built-in display"
 | 
			
		||||
msgstr "Sisseehitatud kuva"
 | 
			
		||||
 | 
			
		||||
#. TRANSLATORS: this is a monitor name (in case we don't know
 | 
			
		||||
#. the vendor), it's Unknown followed by a size in inches,
 | 
			
		||||
#. like 'Unknown 15"'
 | 
			
		||||
#.
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Unknown %s"
 | 
			
		||||
msgstr "Tundmatu %s"
 | 
			
		||||
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"mutter %s\n"
 | 
			
		||||
@@ -393,6 +381,7 @@ msgstr "Tõrge logifaili %s avamisel funktsiooniga fdopen(): %s\n"
 | 
			
		||||
msgid "Opened log file %s\n"
 | 
			
		||||
msgstr "Avati logifail %s\n"
 | 
			
		||||
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Mutter was compiled without support for verbose mode\n"
 | 
			
		||||
msgstr "Mutter kompileeriti ilma jutuka režiimi toeta\n"
 | 
			
		||||
 | 
			
		||||
@@ -583,6 +572,10 @@ msgstr "Akna valimine tabulaatori hüpikaknalt"
 | 
			
		||||
msgid "Cancel tab popup"
 | 
			
		||||
msgstr "Tabulaatori hüpikakna katkestamine"
 | 
			
		||||
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Usage: %s\n"
 | 
			
		||||
msgstr "Kasutamine: %s\n"
 | 
			
		||||
 | 
			
		||||
#. Translators: Translate this string the same way as you do in libwnck!
 | 
			
		||||
msgid "Mi_nimize"
 | 
			
		||||
msgstr "_Minimeeri"
 | 
			
		||||
@@ -1288,151 +1281,159 @@ msgstr "Selle teema jaoks on <%s> määratud kaks korda"
 | 
			
		||||
msgid "Failed to find a valid file for theme %s\n"
 | 
			
		||||
msgstr "Tõrge %s teema jaoks korrektse faili leidmisel\n"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Usage: %s\n"
 | 
			
		||||
#~ msgstr "Kasutamine: %s\n"
 | 
			
		||||
msgid "_Windows"
 | 
			
		||||
msgstr "_Aknad"
 | 
			
		||||
 | 
			
		||||
#~ msgid "_Windows"
 | 
			
		||||
#~ msgstr "_Aknad"
 | 
			
		||||
msgid "_Dialog"
 | 
			
		||||
msgstr "_Dialoog"
 | 
			
		||||
 | 
			
		||||
#~ msgid "_Dialog"
 | 
			
		||||
#~ msgstr "_Dialoog"
 | 
			
		||||
msgid "_Modal dialog"
 | 
			
		||||
msgstr "_Modaaldialoog"
 | 
			
		||||
 | 
			
		||||
#~ msgid "_Modal dialog"
 | 
			
		||||
#~ msgstr "_Modaaldialoog"
 | 
			
		||||
msgid "_Utility"
 | 
			
		||||
msgstr "_Utiliit"
 | 
			
		||||
 | 
			
		||||
#~ msgid "_Utility"
 | 
			
		||||
#~ msgstr "_Utiliit"
 | 
			
		||||
msgid "_Splashscreen"
 | 
			
		||||
msgstr "_Käivitusekraan"
 | 
			
		||||
 | 
			
		||||
#~ msgid "_Splashscreen"
 | 
			
		||||
#~ msgstr "_Käivitusekraan"
 | 
			
		||||
msgid "_Top dock"
 | 
			
		||||
msgstr "Ü_lemine dokk"
 | 
			
		||||
 | 
			
		||||
#~ msgid "_Top dock"
 | 
			
		||||
#~ msgstr "Ü_lemine dokk"
 | 
			
		||||
msgid "_Bottom dock"
 | 
			
		||||
msgstr "_Alumine dokk"
 | 
			
		||||
 | 
			
		||||
#~ msgid "_Bottom dock"
 | 
			
		||||
#~ msgstr "_Alumine dokk"
 | 
			
		||||
msgid "_Left dock"
 | 
			
		||||
msgstr "_Vasak dokk"
 | 
			
		||||
 | 
			
		||||
#~ msgid "_Left dock"
 | 
			
		||||
#~ msgstr "_Vasak dokk"
 | 
			
		||||
msgid "_Right dock"
 | 
			
		||||
msgstr "_Parem dokk"
 | 
			
		||||
 | 
			
		||||
#~ msgid "_Right dock"
 | 
			
		||||
#~ msgstr "_Parem dokk"
 | 
			
		||||
msgid "_All docks"
 | 
			
		||||
msgstr "_Kõik dokid"
 | 
			
		||||
 | 
			
		||||
#~ msgid "_All docks"
 | 
			
		||||
#~ msgstr "_Kõik dokid"
 | 
			
		||||
msgid "Des_ktop"
 | 
			
		||||
msgstr "_Töölaud"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Des_ktop"
 | 
			
		||||
#~ msgstr "_Töölaud"
 | 
			
		||||
msgid "Open another one of these windows"
 | 
			
		||||
msgstr "Ava neist akendest järgmine"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Open another one of these windows"
 | 
			
		||||
#~ msgstr "Ava neist akendest järgmine"
 | 
			
		||||
msgid "This is a demo button with an 'open' icon"
 | 
			
		||||
msgstr "See on näidisnupp koos 'ava' ikooniga"
 | 
			
		||||
 | 
			
		||||
#~ msgid "This is a demo button with an 'open' icon"
 | 
			
		||||
#~ msgstr "See on näidisnupp koos 'ava' ikooniga"
 | 
			
		||||
msgid "This is a demo button with a 'quit' icon"
 | 
			
		||||
msgstr "See on näidisnupp koos 'lõpeta' ikooniga"
 | 
			
		||||
 | 
			
		||||
#~ msgid "This is a demo button with a 'quit' icon"
 | 
			
		||||
#~ msgstr "See on näidisnupp koos 'lõpeta' ikooniga"
 | 
			
		||||
msgid "This is a sample message in a sample dialog"
 | 
			
		||||
msgstr "See on näidisteade näidisdialoogis"
 | 
			
		||||
 | 
			
		||||
#~ msgid "This is a sample message in a sample dialog"
 | 
			
		||||
#~ msgstr "See on näidisteade näidisdialoogis"
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Fake menu item %d\n"
 | 
			
		||||
msgstr "Võltsitud menüüpunkt %d\n"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Fake menu item %d\n"
 | 
			
		||||
#~ msgstr "Võltsitud menüüpunkt %d\n"
 | 
			
		||||
msgid "Border-only window"
 | 
			
		||||
msgstr "Ainult raamiga aken"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Border-only window"
 | 
			
		||||
#~ msgstr "Ainult raamiga aken"
 | 
			
		||||
msgid "Bar"
 | 
			
		||||
msgstr "Riba"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Bar"
 | 
			
		||||
#~ msgstr "Riba"
 | 
			
		||||
msgid "Normal Application Window"
 | 
			
		||||
msgstr "Tavaline rakenduseaken"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Normal Application Window"
 | 
			
		||||
#~ msgstr "Tavaline rakenduseaken"
 | 
			
		||||
msgid "Dialog Box"
 | 
			
		||||
msgstr "Dialoogikast"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Dialog Box"
 | 
			
		||||
#~ msgstr "Dialoogikast"
 | 
			
		||||
msgid "Modal Dialog Box"
 | 
			
		||||
msgstr "Modaalne dialoogikast"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Modal Dialog Box"
 | 
			
		||||
#~ msgstr "Modaalne dialoogikast"
 | 
			
		||||
msgid "Utility Palette"
 | 
			
		||||
msgstr "Rakendite palett"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Utility Palette"
 | 
			
		||||
#~ msgstr "Rakendite palett"
 | 
			
		||||
msgid "Torn-off Menu"
 | 
			
		||||
msgstr "Ärarebitav menüü"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Torn-off Menu"
 | 
			
		||||
#~ msgstr "Ärarebitav menüü"
 | 
			
		||||
msgid "Border"
 | 
			
		||||
msgstr "Raam"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Border"
 | 
			
		||||
#~ msgstr "Raam"
 | 
			
		||||
msgid "Attached Modal Dialog"
 | 
			
		||||
msgstr "Kinnistatud modaaldialoog"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Attached Modal Dialog"
 | 
			
		||||
#~ msgstr "Kinnistatud modaaldialoog"
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Button layout test %d"
 | 
			
		||||
msgstr "Nuppude paigutuse test %d"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Button layout test %d"
 | 
			
		||||
#~ msgstr "Nuppude paigutuse test %d"
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "%g milliseconds to draw one window frame"
 | 
			
		||||
msgstr "%g millisekundit kulub ühe akna raami joonistamiseks"
 | 
			
		||||
 | 
			
		||||
#~ msgid "%g milliseconds to draw one window frame"
 | 
			
		||||
#~ msgstr "%g millisekundit kulub ühe akna raami joonistamiseks"
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Usage: metacity-theme-viewer [THEMENAME]\n"
 | 
			
		||||
msgstr "Kasutamine: metacity-theme-viewer [TEEMANIMI]\n"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Usage: metacity-theme-viewer [THEMENAME]\n"
 | 
			
		||||
#~ msgstr "Kasutamine: metacity-theme-viewer [TEEMANIMI]\n"
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Error loading theme: %s\n"
 | 
			
		||||
msgstr "Viga teema laadimisel: %s\n"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Error loading theme: %s\n"
 | 
			
		||||
#~ msgstr "Viga teema laadimisel: %s\n"
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Loaded theme \"%s\" in %g seconds\n"
 | 
			
		||||
msgstr "Teema \"%s\" laaditi %g sekundiga\n"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Loaded theme \"%s\" in %g seconds\n"
 | 
			
		||||
#~ msgstr "Teema \"%s\" laaditi %g sekundiga\n"
 | 
			
		||||
msgid "Normal Title Font"
 | 
			
		||||
msgstr "Tiitli tavasuurusega kirjatüüp"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Normal Title Font"
 | 
			
		||||
#~ msgstr "Tiitli tavasuurusega kirjatüüp"
 | 
			
		||||
msgid "Small Title Font"
 | 
			
		||||
msgstr "Tiitli väike kirjatüüp"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Small Title Font"
 | 
			
		||||
#~ msgstr "Tiitli väike kirjatüüp"
 | 
			
		||||
msgid "Large Title Font"
 | 
			
		||||
msgstr "Tiitli suur kirjatüüp"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Large Title Font"
 | 
			
		||||
#~ msgstr "Tiitli suur kirjatüüp"
 | 
			
		||||
msgid "Button Layouts"
 | 
			
		||||
msgstr "Nuppude paigutus"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Button Layouts"
 | 
			
		||||
#~ msgstr "Nuppude paigutus"
 | 
			
		||||
msgid "Benchmark"
 | 
			
		||||
msgstr "Jõudlus"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Benchmark"
 | 
			
		||||
#~ msgstr "Jõudlus"
 | 
			
		||||
msgid "Window Title Goes Here"
 | 
			
		||||
msgstr "Siia tuleb akna pealkiri"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Window Title Goes Here"
 | 
			
		||||
#~ msgstr "Siia tuleb akna pealkiri"
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid ""
 | 
			
		||||
"Drew %d frames in %g client-side seconds (%g milliseconds per frame) and %g "
 | 
			
		||||
"seconds wall clock time including X server resources (%g milliseconds per "
 | 
			
		||||
"frame)\n"
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Joonistati %d kaadrit %g kliendi-kella sekundiga (%g millisekundit kaadrile) "
 | 
			
		||||
"ja %g sekundiga seinakella järgi, millesse on kaasatud X-serveri "
 | 
			
		||||
"ressursikasutus (%g millisekundit kaadrile)\n"
 | 
			
		||||
 | 
			
		||||
#~ msgid ""
 | 
			
		||||
#~ "Drew %d frames in %g client-side seconds (%g milliseconds per frame) and "
 | 
			
		||||
#~ "%g seconds wall clock time including X server resources (%g milliseconds "
 | 
			
		||||
#~ "per frame)\n"
 | 
			
		||||
#~ msgstr ""
 | 
			
		||||
#~ "Joonistati %d kaadrit %g kliendi-kella sekundiga (%g millisekundit "
 | 
			
		||||
#~ "kaadrile) ja %g sekundiga seinakella järgi, millesse on kaasatud X-"
 | 
			
		||||
#~ "serveri ressursikasutus (%g millisekundit kaadrile)\n"
 | 
			
		||||
msgid "position expression test returned TRUE but set error"
 | 
			
		||||
msgstr "asukoha avaldise kontroll tagastas TÕENE, aga määras vea"
 | 
			
		||||
 | 
			
		||||
#~ msgid "position expression test returned TRUE but set error"
 | 
			
		||||
#~ msgstr "asukoha avaldise kontroll tagastas TÕENE, aga määras vea"
 | 
			
		||||
msgid "position expression test returned FALSE but didn't set error"
 | 
			
		||||
msgstr "asukoha avaldise kontroll tagastas VÄÄR, aga ei määranud viga"
 | 
			
		||||
 | 
			
		||||
#~ msgid "position expression test returned FALSE but didn't set error"
 | 
			
		||||
#~ msgstr "asukoha avaldise kontroll tagastas VÄÄR, aga ei määranud viga"
 | 
			
		||||
msgid "Error was expected but none given"
 | 
			
		||||
msgstr "Oodati viga, aga ühtegi ei edastatud"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Error was expected but none given"
 | 
			
		||||
#~ msgstr "Oodati viga, aga ühtegi ei edastatud"
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Error %d was expected but %d given"
 | 
			
		||||
msgstr "Oodati viga %d, aga edastati viga %d"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Error %d was expected but %d given"
 | 
			
		||||
#~ msgstr "Oodati viga %d, aga edastati viga %d"
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Error not expected but one was returned: %s"
 | 
			
		||||
msgstr "Viga ei oodatud, aga üks edastati: %s"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Error not expected but one was returned: %s"
 | 
			
		||||
#~ msgstr "Viga ei oodatud, aga üks edastati: %s"
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "x value was %d, %d was expected"
 | 
			
		||||
msgstr "x väärtus oli %d, oodati väärtust %d"
 | 
			
		||||
 | 
			
		||||
#~ msgid "x value was %d, %d was expected"
 | 
			
		||||
#~ msgstr "x väärtus oli %d, oodati väärtust %d"
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "y value was %d, %d was expected"
 | 
			
		||||
msgstr "y väärtus oli %d, oodati väärtust %d"
 | 
			
		||||
 | 
			
		||||
#~ msgid "y value was %d, %d was expected"
 | 
			
		||||
#~ msgstr "y väärtus oli %d, oodati väärtust %d"
 | 
			
		||||
 | 
			
		||||
#~ msgid ""
 | 
			
		||||
#~ "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
 | 
			
		||||
#~ msgstr ""
 | 
			
		||||
#~ "%d koordinaatide avaldis töödeldi %g sekundiga (keskmine %g sekundit)\n"
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
 | 
			
		||||
msgstr ""
 | 
			
		||||
"%d koordinaatide avaldis töödeldi %g sekundiga (keskmine %g sekundit)\n"
 | 
			
		||||
 | 
			
		||||
#~ msgid "Minimize window"
 | 
			
		||||
#~ msgstr "Akna minimeerimine"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										32
									
								
								po/ja.po
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								po/ja.po
									
									
									
									
									
								
							@@ -12,8 +12,8 @@ msgid ""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Project-Id-Version: mutter master\n"
 | 
			
		||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=mutter&keywords=I18N+L10N&component=general\n"
 | 
			
		||||
"POT-Creation-Date: 2013-07-30 12:29+0000\n"
 | 
			
		||||
"PO-Revision-Date: 2013-07-30 23:01+0900\n"
 | 
			
		||||
"POT-Creation-Date: 2013-03-22 10:02+0000\n"
 | 
			
		||||
"PO-Revision-Date: 2013-03-25 17:02+0000\n"
 | 
			
		||||
"Last-Translator: Jiro Matsuzawa <jmatsuzawa@gnome.org>\n"
 | 
			
		||||
"Language-Team: Japanese <gnome-translation@gnome.gr.jp>\n"
 | 
			
		||||
"Language: ja\n"
 | 
			
		||||
@@ -133,7 +133,7 @@ msgstr "コマンド実行プロンプトを表示する"
 | 
			
		||||
 | 
			
		||||
#: ../src/50-mutter-system.xml.in.h:3
 | 
			
		||||
msgid "Show the activities overview"
 | 
			
		||||
msgstr "アクティビティ画面を表示する"
 | 
			
		||||
msgstr "アクティビティを表示する"
 | 
			
		||||
 | 
			
		||||
#: ../src/50-mutter-windows.xml.in.h:1
 | 
			
		||||
msgid "Windows"
 | 
			
		||||
@@ -213,12 +213,12 @@ msgstr "画面右半分に表示する"
 | 
			
		||||
 | 
			
		||||
#. This probably means that a non-WM compositor like xcompmgr is running;
 | 
			
		||||
#. * we have no way to get it to exit
 | 
			
		||||
#: ../src/compositor/compositor.c:589
 | 
			
		||||
#: ../src/compositor/compositor.c:568
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Another compositing manager is already running on screen %i on display \"%s\"."
 | 
			
		||||
msgstr "既に別の合成マネージャーがディスプレイ \"%2$s\" 上のスクリーン %1$i で起動中です"
 | 
			
		||||
 | 
			
		||||
#: ../src/compositor/meta-background.c:1076
 | 
			
		||||
#: ../src/compositor/meta-background.c:1191
 | 
			
		||||
msgid "background texture could not be created from file"
 | 
			
		||||
msgstr ""
 | 
			
		||||
 | 
			
		||||
@@ -252,22 +252,22 @@ msgstr "待機する(_W)"
 | 
			
		||||
msgid "_Force Quit"
 | 
			
		||||
msgstr "強制終了する(_F)"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/display.c:421
 | 
			
		||||
#: ../src/core/display.c:401
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Missing %s extension required for compositing"
 | 
			
		||||
msgstr "ウィンドウの合成に必要な %s という拡張モジュールが存在しません"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/display.c:513
 | 
			
		||||
#: ../src/core/display.c:493
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Failed to open X Window System display '%s'\n"
 | 
			
		||||
msgstr "X Window System のディスプレイ '%s' のオープンに失敗しました\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/keybindings.c:1138
 | 
			
		||||
#: ../src/core/keybindings.c:935
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Some other program is already using the key %s with modifiers %x as a binding\n"
 | 
			
		||||
msgstr "既にバインディングとして別のプログラムでキー %s (修飾キー %x) を使っています\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/keybindings.c:1335
 | 
			
		||||
#: ../src/core/keybindings.c:1135
 | 
			
		||||
#, fuzzy, c-format
 | 
			
		||||
msgid "\"%s\" is not a valid accelerator\n"
 | 
			
		||||
msgstr "\"%s\" はフォーカス属性のためには有効な値ではありません"
 | 
			
		||||
@@ -328,26 +328,26 @@ msgstr "バージョンを表示する"
 | 
			
		||||
msgid "Mutter plugin to use"
 | 
			
		||||
msgstr "使用する Mutter のプラグイン"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/prefs.c:1202
 | 
			
		||||
#: ../src/core/prefs.c:1095
 | 
			
		||||
msgid "Workarounds for broken applications disabled. Some applications may not behave properly.\n"
 | 
			
		||||
msgstr "仕様に準拠していないアプリケーションに対する次善策は無効になっています。一部のアプリケーションは正常に動作しない可能性があります\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/prefs.c:1277
 | 
			
		||||
#: ../src/core/prefs.c:1170
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Could not parse font description \"%s\" from GSettings key %s\n"
 | 
			
		||||
msgstr "GSettings の %2$s キーからフォント名 \"%1$s\" を解析できませんでした\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/prefs.c:1343
 | 
			
		||||
#: ../src/core/prefs.c:1236
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "\"%s\" found in configuration database is not a valid value for mouse button modifier\n"
 | 
			
		||||
msgstr "設定データベース中の \"%s\" はマウスボタンの修飾キーとして妥当な値ではありません\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/prefs.c:1909
 | 
			
		||||
#: ../src/core/prefs.c:1788
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "\"%s\" found in configuration database is not a valid value for keybinding \"%s\"\n"
 | 
			
		||||
msgstr "設定データベース中の \"%s\" はキーバインド \"%s\" に有効な値ではありません\n"
 | 
			
		||||
 | 
			
		||||
#: ../src/core/prefs.c:1999
 | 
			
		||||
#: ../src/core/prefs.c:1887
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Workspace %d"
 | 
			
		||||
msgstr "ワークスペース %d"
 | 
			
		||||
@@ -465,7 +465,7 @@ msgid "Window manager error: "
 | 
			
		||||
msgstr "ウィンドウマネージャーのエラー: "
 | 
			
		||||
 | 
			
		||||
#. first time through
 | 
			
		||||
#: ../src/core/window.c:7513
 | 
			
		||||
#: ../src/core/window.c:7596
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER window as specified in the ICCCM.\n"
 | 
			
		||||
msgstr "ウィンドウ %s は ICCCM で指定されていたような WM_CLIENT_LEADER ウィンドウの代わりに自分自身で SM_CLIENT_ID を設定しています\n"
 | 
			
		||||
@@ -477,7 +477,7 @@ msgstr "ウィンドウ %s は ICCCM で指定されていたような WM_CLIENT
 | 
			
		||||
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
 | 
			
		||||
#. * about these apps but make them work.
 | 
			
		||||
#.
 | 
			
		||||
#: ../src/core/window.c:8237
 | 
			
		||||
#: ../src/core/window.c:8320
 | 
			
		||||
#, c-format
 | 
			
		||||
msgid "Window %s sets an MWM hint indicating it isn't resizable, but sets min size %d x %d and max size %d x %d; this doesn't make much sense.\n"
 | 
			
		||||
msgstr "ウィンドウ %s はリサイズ可能ではない MWM ヒント指示を設定していますが、最小サイズ %d x %d と最大サイズ %d x %dも設定しています。これはあまり意味がありません\n"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										805
									
								
								po/pt_BR.po
									
									
									
									
									
								
							
							
						
						
									
										805
									
								
								po/pt_BR.po
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										756
									
								
								po/sr@latin.po
									
									
									
									
									
								
							
							
						
						
									
										756
									
								
								po/sr@latin.po
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										1228
									
								
								po/zh_CN.po
									
									
									
									
									
								
							
							
						
						
									
										1228
									
								
								po/zh_CN.po
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										784
									
								
								po/zh_HK.po
									
									
									
									
									
								
							
							
						
						
									
										784
									
								
								po/zh_HK.po
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										784
									
								
								po/zh_TW.po
									
									
									
									
									
								
							
							
						
						
									
										784
									
								
								po/zh_TW.po
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -29,18 +29,6 @@
 | 
			
		||||
	<KeyListEntry name="move-to-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"
 | 
			
		||||
	              _description="Switch applications"/>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -3,7 +3,7 @@
 | 
			
		||||
 | 
			
		||||
lib_LTLIBRARIES = libmutter.la
 | 
			
		||||
 | 
			
		||||
SUBDIRS=compositor/plugins
 | 
			
		||||
SUBDIRS=wm-tester tools compositor/plugins
 | 
			
		||||
 | 
			
		||||
INCLUDES=								\
 | 
			
		||||
	-DCLUTTER_ENABLE_EXPERIMENTAL_API				\
 | 
			
		||||
@@ -30,9 +30,7 @@ INCLUDES=								\
 | 
			
		||||
	-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"
 | 
			
		||||
 | 
			
		||||
mutter_built_sources = \
 | 
			
		||||
	$(dbus_idle_built_sources)	\
 | 
			
		||||
	$(dbus_xrandr_built_sources)	\
 | 
			
		||||
	mutter-enum-types.h		\
 | 
			
		||||
	mutter-enum-types.h \
 | 
			
		||||
	mutter-enum-types.c
 | 
			
		||||
 | 
			
		||||
libmutter_la_SOURCES =				\
 | 
			
		||||
@@ -55,8 +53,7 @@ libmutter_la_SOURCES =				\
 | 
			
		||||
	compositor/meta-background-actor.c	\
 | 
			
		||||
	compositor/meta-background-actor-private.h	\
 | 
			
		||||
	compositor/meta-background-group.c	\
 | 
			
		||||
	compositor/meta-cullable.c		\
 | 
			
		||||
	compositor/meta-cullable.h		\
 | 
			
		||||
	compositor/meta-background-group-private.h	\
 | 
			
		||||
	compositor/meta-module.c		\
 | 
			
		||||
	compositor/meta-module.h		\
 | 
			
		||||
	compositor/meta-plugin.c		\
 | 
			
		||||
@@ -65,7 +62,6 @@ libmutter_la_SOURCES =				\
 | 
			
		||||
	compositor/meta-shadow-factory.c	\
 | 
			
		||||
	compositor/meta-shadow-factory-private.h	\
 | 
			
		||||
	compositor/meta-shaped-texture.c	\
 | 
			
		||||
	compositor/meta-shaped-texture-private.h	\
 | 
			
		||||
	compositor/meta-texture-rectangle.c	\
 | 
			
		||||
	compositor/meta-texture-rectangle.h	\
 | 
			
		||||
	compositor/meta-texture-tower.c		\
 | 
			
		||||
@@ -94,10 +90,10 @@ libmutter_la_SOURCES =				\
 | 
			
		||||
	core/display.c				\
 | 
			
		||||
	core/display-private.h			\
 | 
			
		||||
	meta/display.h				\
 | 
			
		||||
	ui/draw-workspace.c			\
 | 
			
		||||
	ui/draw-workspace.h			\
 | 
			
		||||
	core/edge-resistance.c			\
 | 
			
		||||
	core/edge-resistance.h			\
 | 
			
		||||
	core/edid-parse.c			\
 | 
			
		||||
	core/edid.h				\
 | 
			
		||||
	core/errors.c				\
 | 
			
		||||
	meta/errors.h				\
 | 
			
		||||
	core/frame.c				\
 | 
			
		||||
@@ -114,15 +110,6 @@ libmutter_la_SOURCES =				\
 | 
			
		||||
	core/keybindings.c			\
 | 
			
		||||
	core/keybindings-private.h		\
 | 
			
		||||
	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/monitor.c				\
 | 
			
		||||
	core/monitor-config.c			\
 | 
			
		||||
	core/monitor-private.h			\
 | 
			
		||||
	core/monitor-xrandr.c			\
 | 
			
		||||
	core/mutter-Xatomtype.h			\
 | 
			
		||||
	core/place.c				\
 | 
			
		||||
	core/place.h				\
 | 
			
		||||
@@ -140,7 +127,6 @@ libmutter_la_SOURCES =				\
 | 
			
		||||
	core/stack-tracker.h			\
 | 
			
		||||
	core/util.c				\
 | 
			
		||||
	meta/util.h				\
 | 
			
		||||
	core/util-private.h			\
 | 
			
		||||
	core/window-props.c			\
 | 
			
		||||
	core/window-props.h			\
 | 
			
		||||
	core/window.c				\
 | 
			
		||||
@@ -153,6 +139,7 @@ libmutter_la_SOURCES =				\
 | 
			
		||||
	meta/common.h				\
 | 
			
		||||
	core/core.h				\
 | 
			
		||||
	ui/ui.h					\
 | 
			
		||||
	inlinepixbufs.h				\
 | 
			
		||||
	ui/frames.c				\
 | 
			
		||||
	ui/frames.h				\
 | 
			
		||||
	ui/menu.c				\
 | 
			
		||||
@@ -161,13 +148,17 @@ libmutter_la_SOURCES =				\
 | 
			
		||||
	ui/metaaccellabel.h			\
 | 
			
		||||
	ui/resizepopup.c			\
 | 
			
		||||
	ui/resizepopup.h			\
 | 
			
		||||
	ui/tabpopup.c				\
 | 
			
		||||
	ui/tabpopup.h				\
 | 
			
		||||
	ui/tile-preview.c			\
 | 
			
		||||
	ui/tile-preview.h			\
 | 
			
		||||
	ui/theme-parser.c			\
 | 
			
		||||
	ui/theme.c				\
 | 
			
		||||
	meta/theme.h				\
 | 
			
		||||
	ui/theme-private.h			\
 | 
			
		||||
	ui/ui.c
 | 
			
		||||
 | 
			
		||||
nodist_libmutter_la_SOURCES =			\
 | 
			
		||||
	ui/ui.c					\
 | 
			
		||||
	meta/preview-widget.h			\
 | 
			
		||||
	ui/preview-widget.c			\
 | 
			
		||||
	$(mutter_built_sources)
 | 
			
		||||
 | 
			
		||||
libmutter_la_LDFLAGS = -no-undefined
 | 
			
		||||
@@ -190,8 +181,6 @@ libmutterinclude_base_headers =		\
 | 
			
		||||
	meta/meta-background-actor.h		\
 | 
			
		||||
	meta/meta-background-group.h		\
 | 
			
		||||
	meta/meta-background.h			\
 | 
			
		||||
	meta/meta-cursor-tracker.h		\
 | 
			
		||||
	meta/meta-idle-monitor.h		\
 | 
			
		||||
	meta/meta-plugin.h			\
 | 
			
		||||
	meta/meta-shaped-texture.h		\
 | 
			
		||||
	meta/meta-shadow-factory.h		\
 | 
			
		||||
@@ -207,6 +196,7 @@ libmutterinclude_base_headers =		\
 | 
			
		||||
# Excluded from scanning for introspection but installed
 | 
			
		||||
# atomnames.h: macros cause problems for scanning process
 | 
			
		||||
libmutterinclude_extra_headers =		\
 | 
			
		||||
	meta/preview-widget.h			\
 | 
			
		||||
	meta/atomnames.h
 | 
			
		||||
 | 
			
		||||
libmutterincludedir = $(includedir)/mutter/meta
 | 
			
		||||
@@ -215,7 +205,10 @@ libmutterinclude_HEADERS =			\
 | 
			
		||||
	$(libmutterinclude_base_headers)	\
 | 
			
		||||
	$(libmutterinclude_extra_headers)
 | 
			
		||||
 | 
			
		||||
bin_PROGRAMS=mutter
 | 
			
		||||
mutter_theme_viewer_SOURCES=  \
 | 
			
		||||
	ui/theme-viewer.c
 | 
			
		||||
 | 
			
		||||
bin_PROGRAMS=mutter mutter-theme-viewer
 | 
			
		||||
 | 
			
		||||
mutter_SOURCES = core/mutter.c
 | 
			
		||||
mutter_LDADD = $(MUTTER_LIBS) libmutter.la
 | 
			
		||||
@@ -248,11 +241,13 @@ Meta-$(api_version).gir: libmutter.la
 | 
			
		||||
@META_GIR@_FILES =				\
 | 
			
		||||
	mutter-enum-types.h			\
 | 
			
		||||
	$(libmutterinclude_base_headers)	\
 | 
			
		||||
	$(filter %.c,$(libmutter_la_SOURCES) $(nodist_libmutter_la_SOURCES))
 | 
			
		||||
	$(filter %.c,$(libmutter_la_SOURCES))
 | 
			
		||||
@META_GIR@_SCANNERFLAGS = --warn-all --warn-error
 | 
			
		||||
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
mutter_theme_viewer_LDADD= $(MUTTER_LIBS) libmutter.la
 | 
			
		||||
 | 
			
		||||
testboxes_SOURCES = core/testboxes.c
 | 
			
		||||
testgradient_SOURCES = ui/testgradient.c
 | 
			
		||||
testasyncgetprop_SOURCES = core/testasyncgetprop.c
 | 
			
		||||
@@ -289,7 +284,14 @@ gsettings_SCHEMAS = org.gnome.mutter.gschema.xml
 | 
			
		||||
convertdir = $(datadir)/GConf/gsettings
 | 
			
		||||
convert_DATA = mutter-schemas.convert
 | 
			
		||||
 | 
			
		||||
IMAGES=stock_maximize.png stock_minimize.png stock_delete.png
 | 
			
		||||
VARIABLES=stock_maximize_data $(srcdir)/stock_maximize.png \
 | 
			
		||||
          stock_minimize_data $(srcdir)/stock_minimize.png \
 | 
			
		||||
          stock_delete_data $(srcdir)/stock_delete.png
 | 
			
		||||
 | 
			
		||||
BUILT_SOURCES = inlinepixbufs.h
 | 
			
		||||
CLEANFILES =					\
 | 
			
		||||
	inlinepixbufs.h				\
 | 
			
		||||
	mutter.desktop				\
 | 
			
		||||
	mutter-wm.desktop			\
 | 
			
		||||
	org.gnome.mutter.gschema.xml		\
 | 
			
		||||
@@ -298,6 +300,9 @@ CLEANFILES =					\
 | 
			
		||||
	$(typelib_DATA)				\
 | 
			
		||||
	$(gir_DATA)
 | 
			
		||||
 | 
			
		||||
inlinepixbufs.h: $(IMAGES)
 | 
			
		||||
	$(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h
 | 
			
		||||
 | 
			
		||||
pkgconfigdir = $(libdir)/pkgconfig
 | 
			
		||||
 | 
			
		||||
pkgconfig_DATA = libmutter.pc mutter-plugins.pc
 | 
			
		||||
@@ -309,15 +314,13 @@ EXTRA_DIST=$(desktopfiles_files) 	\
 | 
			
		||||
	$(wmproperties_in_files)	\
 | 
			
		||||
	$(xml_in_files)			\
 | 
			
		||||
	org.gnome.mutter.gschema.xml.in \
 | 
			
		||||
	idle-monitor.xml \
 | 
			
		||||
	xrandr.xml \
 | 
			
		||||
	mutter-schemas.convert \
 | 
			
		||||
	libmutter.pc.in \
 | 
			
		||||
	mutter-plugins.pc.in  \
 | 
			
		||||
	mutter-enum-types.h.in \
 | 
			
		||||
	mutter-enum-types.c.in
 | 
			
		||||
 | 
			
		||||
BUILT_SOURCES = $(mutter_built_sources)
 | 
			
		||||
BUILT_SOURCES += $(mutter_built_sources)
 | 
			
		||||
MUTTER_STAMP_FILES = stamp-mutter-enum-types.h
 | 
			
		||||
CLEANFILES += $(MUTTER_STAMP_FILES)
 | 
			
		||||
 | 
			
		||||
@@ -339,22 +342,3 @@ mutter-enum-types.c: stamp-mutter-enum-types.h mutter-enum-types.c.in
 | 
			
		||||
	  $(libmutterinclude_base_headers) ) >> xgen-tetc && \
 | 
			
		||||
	cp xgen-tetc mutter-enum-types.c && \
 | 
			
		||||
	rm -f xgen-tetc
 | 
			
		||||
 | 
			
		||||
dbus_xrandr_built_sources = meta-dbus-xrandr.c meta-dbus-xrandr.h
 | 
			
		||||
 | 
			
		||||
$(dbus_xrandr_built_sources) : Makefile.am xrandr.xml
 | 
			
		||||
	$(AM_V_GEN)gdbus-codegen							\
 | 
			
		||||
		--interface-prefix org.gnome.Mutter					\
 | 
			
		||||
		--c-namespace MetaDBus							\
 | 
			
		||||
		--generate-c-code meta-dbus-xrandr					\
 | 
			
		||||
		$(srcdir)/xrandr.xml
 | 
			
		||||
 | 
			
		||||
dbus_idle_built_sources = meta-dbus-idle-monitor.c meta-dbus-idle-monitor.h
 | 
			
		||||
 | 
			
		||||
$(dbus_idle_built_sources) : Makefile.am idle-monitor.xml
 | 
			
		||||
	$(AM_V_GEN)gdbus-codegen							\
 | 
			
		||||
		--interface-prefix org.gnome.Mutter					\
 | 
			
		||||
		--c-namespace MetaDBus							\
 | 
			
		||||
		--generate-c-code meta-dbus-idle-monitor				\
 | 
			
		||||
		--c-generate-object-manager						\
 | 
			
		||||
		$(srcdir)/idle-monitor.xml
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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"
 | 
			
		||||
@@ -93,10 +95,8 @@ meta_actor_vertices_are_untransformed (ClutterVertex *verts,
 | 
			
		||||
      v3x != v1x || v3y != v2y)
 | 
			
		||||
    return FALSE;
 | 
			
		||||
 | 
			
		||||
  if (x_origin)
 | 
			
		||||
    *x_origin = x;
 | 
			
		||||
  if (y_origin)
 | 
			
		||||
    *y_origin = y;
 | 
			
		||||
  *x_origin = x;
 | 
			
		||||
  *y_origin = y;
 | 
			
		||||
 | 
			
		||||
  return TRUE;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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__
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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>
 | 
			
		||||
@@ -48,7 +50,7 @@ meta_create_color_texture_4ub (guint8           red,
 | 
			
		||||
  CoglColor color;
 | 
			
		||||
  guint8 pixel[4];
 | 
			
		||||
 | 
			
		||||
  cogl_color_init_from_4ub (&color, red, green, blue, alpha);
 | 
			
		||||
  cogl_color_set_from_4ub (&color, red, green, blue, alpha);
 | 
			
		||||
  cogl_color_premultiply (&color);
 | 
			
		||||
 | 
			
		||||
  pixel[0] = cogl_color_get_red_byte (&color);
 | 
			
		||||
@@ -71,8 +73,10 @@ meta_create_color_texture_4ub (guint8           red,
 | 
			
		||||
 * @src_texture: (allow-none): texture to use initially for the layer
 | 
			
		||||
 *
 | 
			
		||||
 * Creates a pipeline with a single layer. Using a common template
 | 
			
		||||
 * makes it easier for Cogl to share a shader for different uses in
 | 
			
		||||
 * Mutter.
 | 
			
		||||
 * allows sharing a shader for different uses in Mutter. To share the same
 | 
			
		||||
 * shader with all other pipelines that are just texture plus opacity
 | 
			
		||||
 * would require Cogl fixes.
 | 
			
		||||
 * (See http://bugzilla.clutter-project.org/show_bug.cgi?id=2425)
 | 
			
		||||
 *
 | 
			
		||||
 * Return value: (transfer full): a newly created #CoglPipeline
 | 
			
		||||
 */
 | 
			
		||||
@@ -82,21 +86,22 @@ meta_create_texture_pipeline (CoglTexture *src_texture)
 | 
			
		||||
  static CoglPipeline *texture_pipeline_template = NULL;
 | 
			
		||||
  CoglPipeline *pipeline;
 | 
			
		||||
 | 
			
		||||
  /* The only state used in the pipeline that would affect the shader
 | 
			
		||||
     generation is the texture type on the layer. Therefore we create
 | 
			
		||||
     a template pipeline which sets this state and all texture
 | 
			
		||||
     pipelines are created as a copy of this. That way Cogl can find
 | 
			
		||||
     the shader state for the pipeline more quickly by looking at the
 | 
			
		||||
     pipeline ancestry instead of resorting to the shader cache. */
 | 
			
		||||
  /* We use a pipeline that has a dummy texture as a base for all
 | 
			
		||||
     texture pipelines. The idea is that only the Cogl texture object
 | 
			
		||||
     would be different in the children so it is likely that Cogl will
 | 
			
		||||
     be able to share GL programs between all the textures. */
 | 
			
		||||
  if (G_UNLIKELY (texture_pipeline_template == NULL))
 | 
			
		||||
    {
 | 
			
		||||
      CoglContext *ctx =
 | 
			
		||||
        clutter_backend_get_cogl_context (clutter_get_default_backend ());
 | 
			
		||||
      CoglTexture *dummy_texture;
 | 
			
		||||
      CoglContext *ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
 | 
			
		||||
 | 
			
		||||
      dummy_texture = meta_create_color_texture_4ub (0xff, 0xff, 0xff, 0xff,
 | 
			
		||||
                                                     COGL_TEXTURE_NONE);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      texture_pipeline_template = cogl_pipeline_new (ctx);
 | 
			
		||||
      cogl_pipeline_set_layer_null_texture (texture_pipeline_template,
 | 
			
		||||
                                            0, /* layer */
 | 
			
		||||
                                            COGL_TEXTURE_TYPE_2D);
 | 
			
		||||
      cogl_pipeline_set_layer_texture (texture_pipeline_template, 0, dummy_texture);
 | 
			
		||||
      cogl_object_unref (dummy_texture);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  pipeline = cogl_pipeline_copy (texture_pipeline_template);
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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__
 | 
			
		||||
 
 | 
			
		||||
@@ -17,6 +17,8 @@ struct _MetaCompositor
 | 
			
		||||
{
 | 
			
		||||
  MetaDisplay    *display;
 | 
			
		||||
 | 
			
		||||
  Atom            atom_x_root_pixmap;
 | 
			
		||||
  Atom            atom_net_wm_window_opacity;
 | 
			
		||||
  guint           repaint_func_id;
 | 
			
		||||
 | 
			
		||||
  ClutterActor   *shadow_src;
 | 
			
		||||
@@ -46,8 +48,11 @@ struct _MetaCompScreen
 | 
			
		||||
  CoglFrameClosure      *frame_closure;
 | 
			
		||||
 | 
			
		||||
  /* Used for unredirecting fullscreen windows */
 | 
			
		||||
  guint                  disable_unredirect_count;
 | 
			
		||||
  MetaWindow            *unredirected_window;
 | 
			
		||||
  guint                   disable_unredirect_count;
 | 
			
		||||
  MetaWindowActor             *unredirected_window;
 | 
			
		||||
 | 
			
		||||
  /* Before we create the output window */
 | 
			
		||||
  XserverRegion     pending_input_region;
 | 
			
		||||
 | 
			
		||||
  gint                   switch_workspace_in_progress;
 | 
			
		||||
 | 
			
		||||
@@ -61,6 +66,8 @@ void meta_switch_workspace_completed (MetaScreen    *screen);
 | 
			
		||||
 | 
			
		||||
gboolean meta_begin_modal_for_plugin (MetaScreen       *screen,
 | 
			
		||||
                                      MetaPlugin       *plugin,
 | 
			
		||||
                                      Window            grab_window,
 | 
			
		||||
                                      Cursor            cursor,
 | 
			
		||||
                                      MetaModalOptions  options,
 | 
			
		||||
                                      guint32           timestamp);
 | 
			
		||||
void     meta_end_modal_for_plugin   (MetaScreen       *screen,
 | 
			
		||||
 
 | 
			
		||||
@@ -42,17 +42,28 @@
 | 
			
		||||
 * the call, so it may be necessary to readjust the display based on the
 | 
			
		||||
 * 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 #
 | 
			
		||||
 *
 | 
			
		||||
 * There's two containers in the stage that are used to place window actors, here
 | 
			
		||||
 * There's three containers in the stage that can be used to place actors, here
 | 
			
		||||
 * are listed in the order in which they are painted:
 | 
			
		||||
 *
 | 
			
		||||
 * - window group, accessible with meta_get_window_group_for_screen()
 | 
			
		||||
 * - top window group, accessible with meta_get_top_window_group_for_screen()
 | 
			
		||||
 * - overlay group, accessible with meta_get_overlay_group_for_screen()
 | 
			
		||||
 *
 | 
			
		||||
 * Mutter will place actors representing windows in the window group, except for
 | 
			
		||||
 * override-redirect windows (ie. popups and menus) which will be placed in the
 | 
			
		||||
 * top window group.
 | 
			
		||||
 * top window group. Mutter won't put any actors in the overlay group, but it's
 | 
			
		||||
 * intended for compositors to place there panel, dashes, status bars, etc.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <config.h>
 | 
			
		||||
@@ -75,7 +86,6 @@
 | 
			
		||||
#include "meta-window-group.h"
 | 
			
		||||
#include "window-private.h" /* to check window->hidden */
 | 
			
		||||
#include "display-private.h" /* for meta_display_lookup_x_window() */
 | 
			
		||||
#include "util-private.h"
 | 
			
		||||
#include <X11/extensions/shape.h>
 | 
			
		||||
#include <X11/extensions/Xcomposite.h>
 | 
			
		||||
 | 
			
		||||
@@ -167,6 +177,31 @@ process_damage (MetaCompositor     *compositor,
 | 
			
		||||
  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
 | 
			
		||||
get_output_window (MetaScreen *screen)
 | 
			
		||||
{
 | 
			
		||||
@@ -220,6 +255,23 @@ meta_get_stage_for_screen (MetaScreen *screen)
 | 
			
		||||
  return info->stage;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * meta_get_overlay_group_for_screen:
 | 
			
		||||
 * @screen: a #MetaScreen
 | 
			
		||||
 *
 | 
			
		||||
 * Returns: (transfer none): The overlay group corresponding to @screen
 | 
			
		||||
 */
 | 
			
		||||
ClutterActor *
 | 
			
		||||
meta_get_overlay_group_for_screen (MetaScreen *screen)
 | 
			
		||||
{
 | 
			
		||||
  MetaCompScreen *info = meta_screen_get_compositor_data (screen);
 | 
			
		||||
 | 
			
		||||
  if (!info)
 | 
			
		||||
    return NULL;
 | 
			
		||||
 | 
			
		||||
  return info->overlay_group;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * meta_get_window_group_for_screen:
 | 
			
		||||
 * @screen: a #MetaScreen
 | 
			
		||||
@@ -271,14 +323,14 @@ meta_get_window_actors (MetaScreen *screen)
 | 
			
		||||
  return info->windows;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
meta_set_stage_input_region (MetaScreen   *screen,
 | 
			
		||||
                             XserverRegion region)
 | 
			
		||||
static void
 | 
			
		||||
do_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);
 | 
			
		||||
  Window          xstage  = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage));
 | 
			
		||||
  MetaCompScreen *info = meta_screen_get_compositor_data (screen);
 | 
			
		||||
  MetaDisplay *display = meta_screen_get_display (screen);
 | 
			
		||||
  Display        *xdpy = meta_display_get_xdisplay (display);
 | 
			
		||||
  Window        xstage = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage));
 | 
			
		||||
 | 
			
		||||
  XFixesSetWindowShapeRegion (xdpy, xstage, ShapeInput, 0, 0, region);
 | 
			
		||||
 | 
			
		||||
@@ -290,6 +342,35 @@ meta_set_stage_input_region (MetaScreen   *screen,
 | 
			
		||||
  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
 | 
			
		||||
meta_empty_stage_input_region (MetaScreen *screen)
 | 
			
		||||
{
 | 
			
		||||
@@ -307,49 +388,11 @@ meta_empty_stage_input_region (MetaScreen *screen)
 | 
			
		||||
  meta_set_stage_input_region (screen, region);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
meta_focus_stage_window (MetaScreen *screen,
 | 
			
		||||
                         guint32     timestamp)
 | 
			
		||||
{
 | 
			
		||||
  ClutterStage *stage;
 | 
			
		||||
  Window window;
 | 
			
		||||
 | 
			
		||||
  stage = CLUTTER_STAGE (meta_get_stage_for_screen (screen));
 | 
			
		||||
  if (!stage)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  window = clutter_x11_get_stage_window (stage);
 | 
			
		||||
 | 
			
		||||
  if (window == None)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  meta_display_set_input_focus_xwindow (screen->display,
 | 
			
		||||
                                        screen,
 | 
			
		||||
                                        window,
 | 
			
		||||
                                        timestamp);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
gboolean
 | 
			
		||||
meta_stage_is_focused (MetaScreen *screen)
 | 
			
		||||
{
 | 
			
		||||
  ClutterStage *stage;
 | 
			
		||||
  Window window;
 | 
			
		||||
 | 
			
		||||
  stage = CLUTTER_STAGE (meta_get_stage_for_screen (screen));
 | 
			
		||||
  if (!stage)
 | 
			
		||||
    return FALSE;
 | 
			
		||||
 | 
			
		||||
  window = clutter_x11_get_stage_window (stage);
 | 
			
		||||
 | 
			
		||||
  if (window == None)
 | 
			
		||||
    return FALSE;
 | 
			
		||||
 | 
			
		||||
  return (screen->display->focus_xwindow == window);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
gboolean
 | 
			
		||||
meta_begin_modal_for_plugin (MetaScreen       *screen,
 | 
			
		||||
                             MetaPlugin       *plugin,
 | 
			
		||||
                             Window            grab_window,
 | 
			
		||||
                             Cursor            cursor,
 | 
			
		||||
                             MetaModalOptions  options,
 | 
			
		||||
                             guint32           timestamp)
 | 
			
		||||
{
 | 
			
		||||
@@ -360,19 +403,10 @@ meta_begin_modal_for_plugin (MetaScreen       *screen,
 | 
			
		||||
  MetaDisplay    *display    = meta_screen_get_display (screen);
 | 
			
		||||
  Display        *xdpy       = meta_display_get_xdisplay (display);
 | 
			
		||||
  MetaCompositor *compositor = display->compositor;
 | 
			
		||||
  ClutterStage *stage;
 | 
			
		||||
  Window grab_window;
 | 
			
		||||
  Cursor cursor = None;
 | 
			
		||||
  gboolean pointer_grabbed = FALSE;
 | 
			
		||||
  gboolean keyboard_grabbed = FALSE;
 | 
			
		||||
  int result;
 | 
			
		||||
 | 
			
		||||
  stage = CLUTTER_STAGE (meta_get_stage_for_screen (screen));
 | 
			
		||||
  if (!stage)
 | 
			
		||||
    return FALSE;
 | 
			
		||||
 | 
			
		||||
  grab_window = clutter_x11_get_stage_window (stage);
 | 
			
		||||
 | 
			
		||||
  if (compositor->modal_plugin != NULL || display->grab_op != META_GRAB_OP_NONE)
 | 
			
		||||
    return FALSE;
 | 
			
		||||
 | 
			
		||||
@@ -555,6 +589,14 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  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;
 | 
			
		||||
 | 
			
		||||
  meta_screen_set_compositor_data (screen, info);
 | 
			
		||||
@@ -611,10 +653,21 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
 | 
			
		||||
 | 
			
		||||
  info->window_group = meta_window_group_new (screen);
 | 
			
		||||
  info->top_window_group = meta_window_group_new (screen);
 | 
			
		||||
  info->overlay_group = clutter_actor_new ();
 | 
			
		||||
 | 
			
		||||
  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->overlay_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);
 | 
			
		||||
  XReparentWindow (xdisplay, xwin, info->output, 0, 0);
 | 
			
		||||
 | 
			
		||||
@@ -628,20 +681,14 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
 | 
			
		||||
  */
 | 
			
		||||
  XFixesSetWindowShapeRegion (xdisplay, info->output, ShapeBounding, 0, 0, None);
 | 
			
		||||
 | 
			
		||||
  info->output = get_output_window (screen);
 | 
			
		||||
  XReparentWindow (xdisplay, xwin, info->output, 0, 0);
 | 
			
		||||
  do_set_stage_input_region (screen, info->pending_input_region);
 | 
			
		||||
  if (info->pending_input_region != None)
 | 
			
		||||
    {
 | 
			
		||||
      XFixesDestroyRegion (xdisplay, info->pending_input_region);
 | 
			
		||||
      info->pending_input_region = None;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  meta_empty_stage_input_region (screen);
 | 
			
		||||
 | 
			
		||||
  /* 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);
 | 
			
		||||
  clutter_actor_show (info->overlay_group);
 | 
			
		||||
 | 
			
		||||
  /* Map overlay window before redirecting windows offscreen so we catch their
 | 
			
		||||
   * contents until we show the stage.
 | 
			
		||||
@@ -649,8 +696,6 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
 | 
			
		||||
  XMapWindow (xdisplay, info->output);
 | 
			
		||||
 | 
			
		||||
  redirect_windows (compositor, screen);
 | 
			
		||||
 | 
			
		||||
  info->plugin_mgr = meta_plugin_manager_new (screen);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
@@ -687,7 +732,7 @@ meta_shape_cow_for_window (MetaScreen *screen,
 | 
			
		||||
      int width, height;
 | 
			
		||||
      MetaRectangle rect;
 | 
			
		||||
 | 
			
		||||
      meta_window_get_frame_rect (metaWindow, &rect);
 | 
			
		||||
      meta_window_get_outer_rect (metaWindow, &rect);
 | 
			
		||||
 | 
			
		||||
      window_bounds.x = rect.x;
 | 
			
		||||
      window_bounds.y = rect.y;
 | 
			
		||||
@@ -708,30 +753,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
 | 
			
		||||
meta_compositor_add_window (MetaCompositor    *compositor,
 | 
			
		||||
                            MetaWindow        *window)
 | 
			
		||||
@@ -763,8 +784,13 @@ meta_compositor_remove_window (MetaCompositor *compositor,
 | 
			
		||||
  screen = meta_window_get_screen (window);
 | 
			
		||||
  info = meta_screen_get_compositor_data (screen);
 | 
			
		||||
 | 
			
		||||
  if (info->unredirected_window == window)
 | 
			
		||||
    set_unredirected_window (info, NULL);
 | 
			
		||||
  if (window_actor == info->unredirected_window)
 | 
			
		||||
    {
 | 
			
		||||
      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);
 | 
			
		||||
}
 | 
			
		||||
@@ -834,18 +860,6 @@ meta_compositor_window_shape_changed (MetaCompositor *compositor,
 | 
			
		||||
  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
 | 
			
		||||
 * per stage, which is a valid assumption to make for a generic
 | 
			
		||||
 * application toolkit. As such, it will ignore any events sent
 | 
			
		||||
@@ -906,7 +920,10 @@ meta_compositor_process_event (MetaCompositor *compositor,
 | 
			
		||||
{
 | 
			
		||||
  if (compositor->modal_plugin && is_grabbed_event (compositor->display, event))
 | 
			
		||||
    {
 | 
			
		||||
      _meta_plugin_xevent_filter (compositor->modal_plugin, event);
 | 
			
		||||
      MetaPluginClass *klass = META_PLUGIN_GET_CLASS (compositor->modal_plugin);
 | 
			
		||||
 | 
			
		||||
      if (klass->xevent_filter)
 | 
			
		||||
        klass->xevent_filter (compositor->modal_plugin, event);
 | 
			
		||||
 | 
			
		||||
      /* We always consume events even if the plugin says it didn't handle them;
 | 
			
		||||
       * exclusive is exclusive */
 | 
			
		||||
@@ -952,19 +969,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
 | 
			
		||||
       * ourselves
 | 
			
		||||
       */
 | 
			
		||||
      if (window == NULL)
 | 
			
		||||
        {
 | 
			
		||||
          Window xwin = ((XDamageNotifyEvent *) event)->drawable;
 | 
			
		||||
          window = meta_display_lookup_x_window (compositor->display, xwin);
 | 
			
		||||
        }
 | 
			
		||||
    case PropertyNotify:
 | 
			
		||||
      process_property_notify (compositor, (XPropertyEvent *) event, window);
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
      DEBUG_TRACE ("meta_compositor_process_event (process_damage)\n");
 | 
			
		||||
      process_damage (compositor, (XDamageNotifyEvent *) event, window);
 | 
			
		||||
    default:
 | 
			
		||||
      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
 | 
			
		||||
@@ -1102,7 +1128,6 @@ sync_actor_stacking (MetaCompScreen *info)
 | 
			
		||||
   * we go ahead and do it */
 | 
			
		||||
 | 
			
		||||
  children = clutter_actor_get_children (info->window_group);
 | 
			
		||||
  has_windows = FALSE;
 | 
			
		||||
  reordered = FALSE;
 | 
			
		||||
 | 
			
		||||
  /* We allow for actors in the window group other than the actors we
 | 
			
		||||
@@ -1264,6 +1289,30 @@ meta_compositor_sync_stack (MetaCompositor  *compositor,
 | 
			
		||||
  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
 | 
			
		||||
meta_compositor_sync_window_geometry (MetaCompositor *compositor,
 | 
			
		||||
				      MetaWindow *window,
 | 
			
		||||
@@ -1353,6 +1402,7 @@ pre_paint_windows (MetaCompScreen *info)
 | 
			
		||||
{
 | 
			
		||||
  GList *l;
 | 
			
		||||
  MetaWindowActor *top_window;
 | 
			
		||||
  MetaWindowActor *expected_unredirected_window = NULL;
 | 
			
		||||
 | 
			
		||||
  if (info->onscreen == NULL)
 | 
			
		||||
    {
 | 
			
		||||
@@ -1370,9 +1420,26 @@ pre_paint_windows (MetaCompScreen *info)
 | 
			
		||||
 | 
			
		||||
  if (meta_window_actor_should_unredirect (top_window) &&
 | 
			
		||||
      info->disable_unredirect_count == 0)
 | 
			
		||||
    set_unredirected_window (info, meta_window_actor_get_meta_window (top_window));
 | 
			
		||||
  else
 | 
			
		||||
    set_unredirected_window (info, NULL);
 | 
			
		||||
    expected_unredirected_window = top_window;
 | 
			
		||||
 | 
			
		||||
  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)
 | 
			
		||||
    meta_window_actor_pre_paint (l->data);
 | 
			
		||||
@@ -1426,7 +1493,13 @@ on_shadow_factory_changed (MetaShadowFactory *factory,
 | 
			
		||||
MetaCompositor *
 | 
			
		||||
meta_compositor_new (MetaDisplay *display)
 | 
			
		||||
{
 | 
			
		||||
  char *atom_names[] = {
 | 
			
		||||
    "_XROOTPMAP_ID",
 | 
			
		||||
    "_NET_WM_WINDOW_OPACITY",
 | 
			
		||||
  };
 | 
			
		||||
  Atom                   atoms[G_N_ELEMENTS(atom_names)];
 | 
			
		||||
  MetaCompositor        *compositor;
 | 
			
		||||
  Display               *xdisplay = meta_display_get_xdisplay (display);
 | 
			
		||||
 | 
			
		||||
  if (!composite_at_least_version (display, 0, 3))
 | 
			
		||||
    return NULL;
 | 
			
		||||
@@ -1438,11 +1511,18 @@ meta_compositor_new (MetaDisplay *display)
 | 
			
		||||
  if (g_getenv("META_DISABLE_MIPMAPS"))
 | 
			
		||||
    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 (),
 | 
			
		||||
                    "changed",
 | 
			
		||||
                    G_CALLBACK (on_shadow_factory_changed),
 | 
			
		||||
                    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,
 | 
			
		||||
                                                                  NULL);
 | 
			
		||||
@@ -1587,31 +1667,3 @@ meta_compositor_monotonic_time_to_server_time (MetaDisplay *display,
 | 
			
		||||
  else
 | 
			
		||||
    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);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -6,6 +6,9 @@
 | 
			
		||||
#include <meta/screen.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 */
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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
 | 
			
		||||
 */
 | 
			
		||||
@@ -39,35 +41,20 @@
 | 
			
		||||
#include <meta/errors.h>
 | 
			
		||||
#include <meta/meta-background.h>
 | 
			
		||||
#include "meta-background-actor-private.h"
 | 
			
		||||
#include "meta-cullable.h"
 | 
			
		||||
 | 
			
		||||
struct _MetaBackgroundActorPrivate
 | 
			
		||||
{
 | 
			
		||||
  cairo_region_t *clip_region;
 | 
			
		||||
  cairo_region_t *visible_region;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static void cullable_iface_init (MetaCullableInterface *iface);
 | 
			
		||||
 | 
			
		||||
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);
 | 
			
		||||
}
 | 
			
		||||
G_DEFINE_TYPE (MetaBackgroundActor, meta_background_actor, CLUTTER_TYPE_ACTOR);
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
meta_background_actor_dispose (GObject *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);
 | 
			
		||||
}
 | 
			
		||||
@@ -117,6 +104,26 @@ meta_background_actor_get_preferred_height (ClutterActor *actor,
 | 
			
		||||
    *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
 | 
			
		||||
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_height = meta_background_actor_get_preferred_height;
 | 
			
		||||
  actor_class->get_paint_volume = meta_background_actor_get_paint_volume;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
@@ -158,31 +166,35 @@ meta_background_actor_new (void)
 | 
			
		||||
  return CLUTTER_ACTOR (self);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
meta_background_actor_cull_out (MetaCullable   *cullable,
 | 
			
		||||
                                cairo_region_t *unobscured_region,
 | 
			
		||||
                                cairo_region_t *clip_region)
 | 
			
		||||
/**
 | 
			
		||||
 * meta_background_actor_set_visible_region:
 | 
			
		||||
 * @self: a #MetaBackgroundActor
 | 
			
		||||
 * @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);
 | 
			
		||||
  set_clip_region (self, clip_region);
 | 
			
		||||
}
 | 
			
		||||
  MetaBackgroundActorPrivate *priv;
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
meta_background_actor_reset_culling (MetaCullable *cullable)
 | 
			
		||||
{
 | 
			
		||||
  MetaBackgroundActor *self = META_BACKGROUND_ACTOR (cullable);
 | 
			
		||||
  set_clip_region (self, NULL);
 | 
			
		||||
}
 | 
			
		||||
  g_return_if_fail (META_IS_BACKGROUND_ACTOR (self));
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
cullable_iface_init (MetaCullableInterface *iface)
 | 
			
		||||
{
 | 
			
		||||
  iface->cull_out = meta_background_actor_cull_out;
 | 
			
		||||
  iface->reset_culling = meta_background_actor_reset_culling;
 | 
			
		||||
  priv = self->priv;
 | 
			
		||||
 | 
			
		||||
  g_clear_pointer (&priv->visible_region,
 | 
			
		||||
                   (GDestroyNotify)
 | 
			
		||||
                   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
 | 
			
		||||
 *
 | 
			
		||||
 * Return value (transfer full): a #cairo_region_t that represents the part of
 | 
			
		||||
@@ -190,16 +202,16 @@ cullable_iface_init (MetaCullableInterface *iface)
 | 
			
		||||
 * #MetaWindowActor objects.
 | 
			
		||||
 */
 | 
			
		||||
cairo_region_t *
 | 
			
		||||
meta_background_actor_get_clip_region (MetaBackgroundActor *self)
 | 
			
		||||
meta_background_actor_get_visible_region (MetaBackgroundActor *self)
 | 
			
		||||
{
 | 
			
		||||
  MetaBackgroundActorPrivate *priv = self->priv;
 | 
			
		||||
  ClutterActorBox content_box;
 | 
			
		||||
  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);
 | 
			
		||||
 | 
			
		||||
  if (!priv->clip_region)
 | 
			
		||||
  if (!priv->visible_region)
 | 
			
		||||
      return NULL;
 | 
			
		||||
 | 
			
		||||
  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.height = content_box.y2 - content_box.y1;
 | 
			
		||||
 | 
			
		||||
  clip_region = cairo_region_create_rectangle (&content_area);
 | 
			
		||||
  cairo_region_intersect (clip_region, priv->clip_region);
 | 
			
		||||
  visible_region = cairo_region_create_rectangle (&content_area);
 | 
			
		||||
  cairo_region_intersect (visible_region, priv->visible_region);
 | 
			
		||||
 | 
			
		||||
  return clip_region;
 | 
			
		||||
  return visible_region;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								src/compositor/meta-background-group-private.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/compositor/meta-background-group-private.h
									
									
									
									
									
										Normal 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 */
 | 
			
		||||
@@ -16,43 +16,87 @@
 | 
			
		||||
 | 
			
		||||
#include <config.h>
 | 
			
		||||
 | 
			
		||||
#include <meta/meta-background-group.h>
 | 
			
		||||
#include "meta-cullable.h"
 | 
			
		||||
#include "compositor-private.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,
 | 
			
		||||
                         G_IMPLEMENT_INTERFACE (META_TYPE_CULLABLE, cullable_iface_init));
 | 
			
		||||
struct _MetaBackgroundGroupPrivate
 | 
			
		||||
{
 | 
			
		||||
  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
 | 
			
		||||
meta_background_group_class_init (MetaBackgroundGroupClass *klass)
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
 | 
			
		||||
  ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
meta_background_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);
 | 
			
		||||
}
 | 
			
		||||
  actor_class->get_paint_volume = meta_background_group_get_paint_volume;
 | 
			
		||||
  object_class->dispose = meta_background_group_dispose;
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
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;
 | 
			
		||||
  g_type_class_add_private (klass, sizeof (MetaBackgroundGroupPrivate));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
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)
 | 
			
		||||
{
 | 
			
		||||
  GList *children, *l;
 | 
			
		||||
 | 
			
		||||
  children = clutter_actor_get_children (CLUTTER_ACTOR (self));
 | 
			
		||||
  for (l = children; l; l = l->next)
 | 
			
		||||
    {
 | 
			
		||||
      ClutterActor *actor = l->data;
 | 
			
		||||
 | 
			
		||||
      if (META_IS_BACKGROUND_ACTOR (actor))
 | 
			
		||||
        {
 | 
			
		||||
          meta_background_actor_set_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);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
  g_list_free (children);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ClutterActor *
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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 <meta/errors.h>
 | 
			
		||||
#include <meta/meta-background.h>
 | 
			
		||||
#include "util-private.h"
 | 
			
		||||
#include "meta-background-actor-private.h"
 | 
			
		||||
 | 
			
		||||
#define FRAGMENT_SHADER_DECLARATIONS                                           \
 | 
			
		||||
@@ -411,13 +412,13 @@ meta_background_paint_content (ClutterContent   *content,
 | 
			
		||||
   */
 | 
			
		||||
  if (META_IS_BACKGROUND_ACTOR (actor))
 | 
			
		||||
    {
 | 
			
		||||
      cairo_region_t *clip_region;
 | 
			
		||||
      clip_region = meta_background_actor_get_clip_region (META_BACKGROUND_ACTOR (actor));
 | 
			
		||||
      cairo_region_t *visible_region;
 | 
			
		||||
      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_destroy (clip_region);
 | 
			
		||||
          cairo_region_intersect (paintable_region, visible_region);
 | 
			
		||||
          cairo_region_destroy (visible_region);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -890,7 +891,7 @@ meta_background_load_gradient (MetaBackground             *self,
 | 
			
		||||
  pixels[7] = second_color->alpha;
 | 
			
		||||
 | 
			
		||||
  texture = cogl_texture_new_from_data (width, height,
 | 
			
		||||
                                        COGL_TEXTURE_NO_SLICING,
 | 
			
		||||
                                        COGL_TEXTURE_NONE,
 | 
			
		||||
                                        COGL_PIXEL_FORMAT_RGBA_8888,
 | 
			
		||||
                                        COGL_PIXEL_FORMAT_ANY,
 | 
			
		||||
                                        4,
 | 
			
		||||
@@ -1030,6 +1031,7 @@ meta_background_load_file_finish (MetaBackground  *self,
 | 
			
		||||
                                  GAsyncResult    *result,
 | 
			
		||||
                                  GError         **error)
 | 
			
		||||
{
 | 
			
		||||
  static CoglUserDataKey key;
 | 
			
		||||
  GTask *task;
 | 
			
		||||
  LoadFileTaskData *task_data;
 | 
			
		||||
  CoglTexture *texture;
 | 
			
		||||
@@ -1058,7 +1060,7 @@ meta_background_load_file_finish (MetaBackground  *self,
 | 
			
		||||
 | 
			
		||||
  texture = cogl_texture_new_from_data (width,
 | 
			
		||||
                                        height,
 | 
			
		||||
                                        COGL_TEXTURE_NO_ATLAS,
 | 
			
		||||
                                        COGL_TEXTURE_NO_SLICING,
 | 
			
		||||
                                        has_alpha ?
 | 
			
		||||
                                        COGL_PIXEL_FORMAT_RGBA_8888 :
 | 
			
		||||
                                        COGL_PIXEL_FORMAT_RGB_888,
 | 
			
		||||
@@ -1075,6 +1077,12 @@ meta_background_load_file_finish (MetaBackground  *self,
 | 
			
		||||
      goto out;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  cogl_object_set_user_data (COGL_OBJECT (texture),
 | 
			
		||||
                             &key,
 | 
			
		||||
                             g_object_ref (pixbuf),
 | 
			
		||||
                             (CoglUserDataDestroyCallback)
 | 
			
		||||
                             g_object_unref);
 | 
			
		||||
 | 
			
		||||
  ensure_pipeline (self);
 | 
			
		||||
  unset_texture (self);
 | 
			
		||||
  set_style (self, task_data->style);
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
}
 | 
			
		||||
@@ -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__ */
 | 
			
		||||
 | 
			
		||||
@@ -16,7 +16,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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>
 | 
			
		||||
@@ -190,7 +192,10 @@ meta_module_class_init (MetaModuleClass *klass)
 | 
			
		||||
static void
 | 
			
		||||
meta_module_init (MetaModule *self)
 | 
			
		||||
{
 | 
			
		||||
  self->priv = META_MODULE_GET_PRIVATE (self);
 | 
			
		||||
  MetaModulePrivate *priv;
 | 
			
		||||
 | 
			
		||||
  self->priv = priv = META_MODULE_GET_PRIVATE (self);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
GType
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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_
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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"
 | 
			
		||||
@@ -83,20 +85,12 @@ meta_plugin_manager_load (const gchar       *plugin_name)
 | 
			
		||||
  g_free (path);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
on_confirm_display_change (MetaMonitorManager *monitors,
 | 
			
		||||
                           MetaPluginManager  *plugin_mgr)
 | 
			
		||||
{
 | 
			
		||||
  meta_plugin_manager_confirm_display_change (plugin_mgr);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
MetaPluginManager *
 | 
			
		||||
meta_plugin_manager_new (MetaScreen *screen)
 | 
			
		||||
{
 | 
			
		||||
  MetaPluginManager *plugin_mgr;
 | 
			
		||||
  MetaPluginClass *klass;
 | 
			
		||||
  MetaPlugin *plugin;
 | 
			
		||||
  MetaMonitorManager *monitors;
 | 
			
		||||
 | 
			
		||||
  plugin_mgr = g_new0 (MetaPluginManager, 1);
 | 
			
		||||
  plugin_mgr->screen = screen;
 | 
			
		||||
@@ -107,10 +101,6 @@ meta_plugin_manager_new (MetaScreen *screen)
 | 
			
		||||
  if (klass->start)
 | 
			
		||||
    klass->start (plugin);
 | 
			
		||||
 | 
			
		||||
  monitors = meta_monitor_manager_get ();
 | 
			
		||||
  g_signal_connect (monitors, "confirm-display-change",
 | 
			
		||||
                    G_CALLBACK (on_confirm_display_change), plugin_mgr);
 | 
			
		||||
 | 
			
		||||
  return plugin_mgr;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -304,64 +294,29 @@ meta_plugin_manager_filter_keybinding (MetaPluginManager *plugin_mgr,
 | 
			
		||||
  return FALSE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * The public method that the compositor hooks into for desktop switching.
 | 
			
		||||
 *
 | 
			
		||||
 * Returns TRUE if the plugin handled the event type (i.e.,
 | 
			
		||||
 * if the return value is FALSE, there will be no subsequent call to the
 | 
			
		||||
 * manager completed() callback, and the compositor must ensure that any
 | 
			
		||||
 * appropriate post-effect cleanup is carried out.
 | 
			
		||||
 */
 | 
			
		||||
gboolean
 | 
			
		||||
meta_plugin_manager_xevent_filter (MetaPluginManager *plugin_mgr,
 | 
			
		||||
                                   XEvent            *xev)
 | 
			
		||||
{
 | 
			
		||||
  MetaPlugin *plugin = plugin_mgr->plugin;
 | 
			
		||||
 | 
			
		||||
  return _meta_plugin_xevent_filter (plugin, xev);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
meta_plugin_manager_confirm_display_change (MetaPluginManager *plugin_mgr)
 | 
			
		||||
{
 | 
			
		||||
  MetaPlugin *plugin = plugin_mgr->plugin;
 | 
			
		||||
  MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
 | 
			
		||||
 | 
			
		||||
  if (klass->confirm_display_change)
 | 
			
		||||
    return klass->confirm_display_change (plugin);
 | 
			
		||||
  /* 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 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;
 | 
			
		||||
    return clutter_x11_handle_event (xev) != CLUTTER_X11_FILTER_CONTINUE;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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_
 | 
			
		||||
@@ -70,14 +72,5 @@ gboolean meta_plugin_manager_filter_keybinding (MetaPluginManager  *mgr,
 | 
			
		||||
 | 
			
		||||
gboolean meta_plugin_manager_xevent_filter (MetaPluginManager *mgr,
 | 
			
		||||
                                            XEvent            *xev);
 | 
			
		||||
gboolean _meta_plugin_xevent_filter (MetaPlugin *plugin,
 | 
			
		||||
                                     XEvent     *xev);
 | 
			
		||||
 | 
			
		||||
void     meta_plugin_manager_confirm_display_change (MetaPluginManager *mgr);
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * along with this program; if not, write to the Free Software
 | 
			
		||||
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 | 
			
		||||
 * 02111-1307, USA.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -39,7 +41,6 @@
 | 
			
		||||
 | 
			
		||||
#include "compositor-private.h"
 | 
			
		||||
#include "meta-window-actor-private.h"
 | 
			
		||||
#include "monitor-private.h"
 | 
			
		||||
 | 
			
		||||
G_DEFINE_ABSTRACT_TYPE (MetaPlugin, meta_plugin, G_TYPE_OBJECT);
 | 
			
		||||
 | 
			
		||||
@@ -136,7 +137,9 @@ meta_plugin_class_init (MetaPluginClass *klass)
 | 
			
		||||
static void
 | 
			
		||||
meta_plugin_init (MetaPlugin *self)
 | 
			
		||||
{
 | 
			
		||||
  self->priv = META_PLUGIN_GET_PRIVATE (self);
 | 
			
		||||
  MetaPluginPrivate *priv;
 | 
			
		||||
 | 
			
		||||
  self->priv = priv = META_PLUGIN_GET_PRIVATE (self);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
gboolean
 | 
			
		||||
@@ -181,18 +184,6 @@ _meta_plugin_effect_started (MetaPlugin *plugin)
 | 
			
		||||
  priv->running++;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
gboolean
 | 
			
		||||
_meta_plugin_xevent_filter (MetaPlugin *plugin,
 | 
			
		||||
                            XEvent     *xev)
 | 
			
		||||
{
 | 
			
		||||
  MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
 | 
			
		||||
 | 
			
		||||
  if (klass->xevent_filter && klass->xevent_filter (plugin, xev))
 | 
			
		||||
    return TRUE;
 | 
			
		||||
  else
 | 
			
		||||
    return clutter_x11_handle_event (xev) != CLUTTER_X11_FILTER_CONTINUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
meta_plugin_switch_workspace_completed (MetaPlugin *plugin)
 | 
			
		||||
{
 | 
			
		||||
@@ -275,6 +266,10 @@ meta_plugin_destroy_completed (MetaPlugin      *plugin,
 | 
			
		||||
/**
 | 
			
		||||
 * meta_plugin_begin_modal:
 | 
			
		||||
 * @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
 | 
			
		||||
 * @timestamp: the timestamp used for establishing grabs
 | 
			
		||||
 *
 | 
			
		||||
@@ -295,13 +290,15 @@ meta_plugin_destroy_completed (MetaPlugin      *plugin,
 | 
			
		||||
 */
 | 
			
		||||
gboolean
 | 
			
		||||
meta_plugin_begin_modal (MetaPlugin       *plugin,
 | 
			
		||||
                         Window            grab_window,
 | 
			
		||||
                         Cursor            cursor,
 | 
			
		||||
                         MetaModalOptions  options,
 | 
			
		||||
                         guint32           timestamp)
 | 
			
		||||
{
 | 
			
		||||
  MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
 | 
			
		||||
 | 
			
		||||
  return meta_begin_modal_for_plugin (priv->screen, plugin,
 | 
			
		||||
                                      options, timestamp);
 | 
			
		||||
                                      grab_window, cursor, options, timestamp);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -341,13 +338,3 @@ meta_plugin_get_screen (MetaPlugin *plugin)
 | 
			
		||||
 | 
			
		||||
  return priv->screen;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
meta_plugin_complete_display_change (MetaPlugin *plugin,
 | 
			
		||||
                                     gboolean    ok)
 | 
			
		||||
{
 | 
			
		||||
  MetaMonitorManager *manager;
 | 
			
		||||
 | 
			
		||||
  manager = meta_monitor_manager_get ();
 | 
			
		||||
  meta_monitor_manager_confirm_configuration (manager, ok);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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__
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * along with this program; if not, write to the Free Software
 | 
			
		||||
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 | 
			
		||||
 * 02111-1307, USA.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -121,12 +123,12 @@ static guint signals[LAST_SIGNAL] = { 0 };
 | 
			
		||||
/* The first element in this array also defines the default parameters
 | 
			
		||||
 * for newly created classes */
 | 
			
		||||
MetaShadowClassInfo default_shadow_classes[] = {
 | 
			
		||||
  { "normal",       { 6, -1, 0, 3, 128 }, { 3, -1, 0, 3, 32 } },
 | 
			
		||||
  { "dialog",       { 6, -1, 0, 3, 128 }, { 3, -1, 0, 3, 32 } },
 | 
			
		||||
  { "modal_dialog", { 6, -1, 0, 1, 128 }, { 3, -1, 0, 3, 32 } },
 | 
			
		||||
  { "utility",      { 3, -1, 0, 1, 128 }, { 3, -1, 0, 1, 32 } },
 | 
			
		||||
  { "border",       { 6, -1, 0, 3, 128 }, { 3, -1, 0, 3, 32 } },
 | 
			
		||||
  { "menu",         { 6, -1, 0, 3, 128 }, { 3, -1, 0, 0, 32 } },
 | 
			
		||||
  { "normal",       { 6, -1, 0, 3, 255 }, { 3, -1, 0, 3, 128 } },
 | 
			
		||||
  { "dialog",       { 6, -1, 0, 3, 255 }, { 3, -1, 0, 3, 128 } },
 | 
			
		||||
  { "modal_dialog", { 6, -1, 0, 1, 255 }, { 3, -1, 0, 3, 128 } },
 | 
			
		||||
  { "utility",      { 3, -1, 0, 1, 255 }, { 3, -1, 0, 1, 128 } },
 | 
			
		||||
  { "border",       { 6, -1, 0, 3, 255 }, { 3, -1, 0, 3, 128 } },
 | 
			
		||||
  { "menu",         { 6, -1, 0, 3, 255 }, { 3, -1, 0, 0, 128 } },
 | 
			
		||||
 | 
			
		||||
  { "popup-menu",    { 1, -1, 0, 1, 128 }, { 1, -1, 0, 1, 128 } },
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
@@ -16,7 +16,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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 <meta/meta-shaped-texture.h>
 | 
			
		||||
#include "clutter-utils.h"
 | 
			
		||||
#include "meta-texture-tower.h"
 | 
			
		||||
 | 
			
		||||
#include "meta-shaped-texture-private.h"
 | 
			
		||||
#include "meta-window-actor-private.h"
 | 
			
		||||
 | 
			
		||||
#include <clutter/clutter.h>
 | 
			
		||||
#include <cogl/cogl.h>
 | 
			
		||||
#include <cogl/cogl-texture-pixmap-x11.h>
 | 
			
		||||
#include <gdk/gdk.h> /* for gdk_rectangle_intersect() */
 | 
			
		||||
#include "meta-cullable.h"
 | 
			
		||||
 | 
			
		||||
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 void cullable_iface_init (MetaCullableInterface *iface);
 | 
			
		||||
 | 
			
		||||
G_DEFINE_TYPE_WITH_CODE (MetaShapedTexture, meta_shaped_texture, CLUTTER_TYPE_ACTOR,
 | 
			
		||||
                         G_IMPLEMENT_INTERFACE (META_TYPE_CULLABLE, cullable_iface_init));
 | 
			
		||||
G_DEFINE_TYPE (MetaShapedTexture, meta_shaped_texture,
 | 
			
		||||
               CLUTTER_TYPE_ACTOR);
 | 
			
		||||
 | 
			
		||||
#define META_SHAPED_TEXTURE_GET_PRIVATE(obj) \
 | 
			
		||||
  (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
 | 
			
		||||
{
 | 
			
		||||
  MetaTextureTower *paint_tower;
 | 
			
		||||
 | 
			
		||||
  CoglTexture *texture;
 | 
			
		||||
  Pixmap pixmap;
 | 
			
		||||
  CoglTexturePixmapX11 *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 *unobscured_region;
 | 
			
		||||
 | 
			
		||||
  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->paint_tower = meta_texture_tower_new ();
 | 
			
		||||
 | 
			
		||||
  priv->texture = NULL;
 | 
			
		||||
  priv->mask_texture = NULL;
 | 
			
		||||
  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
 | 
			
		||||
meta_shaped_texture_dispose (GObject *object)
 | 
			
		||||
{
 | 
			
		||||
@@ -154,98 +118,29 @@ meta_shaped_texture_dispose (GObject *object)
 | 
			
		||||
    meta_texture_tower_free (priv->paint_tower);
 | 
			
		||||
  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->opaque_region, cairo_region_destroy);
 | 
			
		||||
 | 
			
		||||
  meta_shaped_texture_set_mask_texture (self, NULL);
 | 
			
		||||
  set_unobscured_region (self, NULL);
 | 
			
		||||
  set_clip_region (self, NULL);
 | 
			
		||||
  meta_shaped_texture_set_clip_region (self, NULL);
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
meta_shaped_texture_paint (ClutterActor *actor)
 | 
			
		||||
{
 | 
			
		||||
  MetaShapedTexture *stex = (MetaShapedTexture *) actor;
 | 
			
		||||
  MetaShapedTexturePrivate *priv = stex->priv;
 | 
			
		||||
  guint tex_width, tex_height;
 | 
			
		||||
  guchar opacity;
 | 
			
		||||
  CoglContext *ctx;
 | 
			
		||||
  CoglFramebuffer *fb;
 | 
			
		||||
  CoglPipeline *pipeline = NULL;
 | 
			
		||||
  CoglTexture *paint_tex;
 | 
			
		||||
  guint tex_width, tex_height;
 | 
			
		||||
  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))
 | 
			
		||||
    return;
 | 
			
		||||
@@ -282,137 +177,105 @@ meta_shaped_texture_paint (ClutterActor *actor)
 | 
			
		||||
  if (tex_width == 0 || tex_height == 0) /* no contents yet */
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  /* Use nearest-pixel interpolation if the texture is unscaled. This
 | 
			
		||||
   * improves performance, especially with software rendering.
 | 
			
		||||
   */
 | 
			
		||||
 | 
			
		||||
  filter = COGL_PIPELINE_FILTER_LINEAR;
 | 
			
		||||
 | 
			
		||||
  if (!clutter_actor_is_in_clone_paint (actor) && 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)
 | 
			
		||||
    {
 | 
			
		||||
      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
 | 
			
		||||
    {
 | 
			
		||||
      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_filters (pipeline, 1, filter, filter);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  cogl_pipeline_set_layer_texture (pipeline, 0, paint_tex);
 | 
			
		||||
  cogl_pipeline_set_layer_filters (pipeline, 0, filter, filter);
 | 
			
		||||
 | 
			
		||||
  {
 | 
			
		||||
    CoglColor color;
 | 
			
		||||
    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);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (blended_region != NULL)
 | 
			
		||||
  cogl_set_source (pipeline);
 | 
			
		||||
 | 
			
		||||
  clutter_actor_get_allocation_box (actor, &alloc);
 | 
			
		||||
 | 
			
		||||
  if (priv->clip_region)
 | 
			
		||||
    {
 | 
			
		||||
      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
 | 
			
		||||
       * fall back and draw the whole thing */
 | 
			
		||||
#     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)
 | 
			
		||||
	{
 | 
			
		||||
          int i;
 | 
			
		||||
          cairo_rectangle_int_t tex_rect = { 0, 0, tex_width, tex_height };
 | 
			
		||||
	  float coords[8];
 | 
			
		||||
          float x1, y1, x2, y2;
 | 
			
		||||
 | 
			
		||||
	  for (i = 0; i < n_rects; i++)
 | 
			
		||||
	    {
 | 
			
		||||
	      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))
 | 
			
		||||
		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,
 | 
			
		||||
                                   0, 0,
 | 
			
		||||
                                   alloc.x2 - alloc.x1,
 | 
			
		||||
                                   alloc.y2 - alloc.y1);
 | 
			
		||||
 | 
			
		||||
 out:
 | 
			
		||||
  if (pipeline != NULL)
 | 
			
		||||
    cogl_object_unref (pipeline);
 | 
			
		||||
  if (blended_region != NULL)
 | 
			
		||||
    cairo_region_destroy (blended_region);
 | 
			
		||||
  cogl_rectangle (0, 0,
 | 
			
		||||
		  alloc.x2 - alloc.x1,
 | 
			
		||||
		  alloc.y2 - alloc.y1);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
@@ -422,61 +285,38 @@ meta_shaped_texture_pick (ClutterActor       *actor,
 | 
			
		||||
  MetaShapedTexture *stex = (MetaShapedTexture *) actor;
 | 
			
		||||
  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 (priv->input_shape_region == NULL)
 | 
			
		||||
    CLUTTER_ACTOR_CLASS (meta_shaped_texture_parent_class)->pick (actor, color);
 | 
			
		||||
  else
 | 
			
		||||
  if (priv->mask_texture == NULL)
 | 
			
		||||
    CLUTTER_ACTOR_CLASS (meta_shaped_texture_parent_class)
 | 
			
		||||
      ->pick (actor, color);
 | 
			
		||||
  else if (clutter_actor_should_pick_paint (actor))
 | 
			
		||||
    {
 | 
			
		||||
      int n_rects;
 | 
			
		||||
      float *rectangles;
 | 
			
		||||
      int i;
 | 
			
		||||
      CoglPipeline *pipeline;
 | 
			
		||||
      CoglContext *ctx;
 | 
			
		||||
      CoglFramebuffer *fb;
 | 
			
		||||
      CoglColor cogl_color;
 | 
			
		||||
      CoglTexture *paint_tex;
 | 
			
		||||
      ClutterActorBox alloc;
 | 
			
		||||
      guint tex_width, tex_height;
 | 
			
		||||
 | 
			
		||||
      /* Note: We don't bother trying to intersect the pick and clip regions
 | 
			
		||||
       * 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.
 | 
			
		||||
       */
 | 
			
		||||
      paint_tex = COGL_TEXTURE (priv->texture);
 | 
			
		||||
 | 
			
		||||
      n_rects = cairo_region_num_rectangles (priv->input_shape_region);
 | 
			
		||||
      rectangles = g_alloca (sizeof (float) * 4 * n_rects);
 | 
			
		||||
      if (paint_tex == NULL)
 | 
			
		||||
        return;
 | 
			
		||||
 | 
			
		||||
      for (i = 0; i < n_rects; i++)
 | 
			
		||||
        {
 | 
			
		||||
          cairo_rectangle_int_t rect;
 | 
			
		||||
          int pos = i * 4;
 | 
			
		||||
      tex_width = cogl_texture_get_width (paint_tex);
 | 
			
		||||
      tex_height = cogl_texture_get_height (paint_tex);
 | 
			
		||||
 | 
			
		||||
          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;
 | 
			
		||||
          rectangles[pos + 1] = rect.y;
 | 
			
		||||
          rectangles[pos + 2] = rect.x + rect.width;
 | 
			
		||||
          rectangles[pos + 3] = rect.y + rect.height;
 | 
			
		||||
        }
 | 
			
		||||
      cogl_set_source_color4ub (color->red, color->green, color->blue,
 | 
			
		||||
                                 color->alpha);
 | 
			
		||||
 | 
			
		||||
      ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
 | 
			
		||||
      fb = cogl_get_draw_framebuffer ();
 | 
			
		||||
      clutter_actor_get_allocation_box (actor, &alloc);
 | 
			
		||||
 | 
			
		||||
      cogl_color_init_from_4ub (&cogl_color, color->red, color->green, color->blue, color->alpha);
 | 
			
		||||
 | 
			
		||||
      pipeline = cogl_pipeline_new (ctx);
 | 
			
		||||
      cogl_pipeline_set_color (pipeline, &cogl_color);
 | 
			
		||||
 | 
			
		||||
      cogl_framebuffer_draw_rectangles (fb, pipeline,
 | 
			
		||||
                                        rectangles, n_rects);
 | 
			
		||||
      cogl_object_unref (pipeline);
 | 
			
		||||
      /* Paint the mask rectangle in the given color */
 | 
			
		||||
      cogl_set_source_texture (priv->mask_texture);
 | 
			
		||||
      cogl_rectangle_with_texture_coords (0, 0,
 | 
			
		||||
                                          alloc.x2 - alloc.x1,
 | 
			
		||||
                                          alloc.y2 - alloc.y1,
 | 
			
		||||
                                          0, 0, 1, 1);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -519,37 +359,18 @@ meta_shaped_texture_get_preferred_height (ClutterActor *self,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static gboolean
 | 
			
		||||
meta_shaped_texture_get_paint_volume (ClutterActor *actor,
 | 
			
		||||
meta_shaped_texture_get_paint_volume (ClutterActor *self,
 | 
			
		||||
                                      ClutterPaintVolume *volume)
 | 
			
		||||
{
 | 
			
		||||
  MetaShapedTexture *self = META_SHAPED_TEXTURE (actor);
 | 
			
		||||
  cairo_rectangle_int_t unobscured_bounds;
 | 
			
		||||
  return clutter_paint_volume_set_from_allocation (volume, self);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  if (!clutter_paint_volume_set_from_allocation (volume, actor))
 | 
			
		||||
    return FALSE;
 | 
			
		||||
ClutterActor *
 | 
			
		||||
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))
 | 
			
		||||
    {
 | 
			
		||||
      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;
 | 
			
		||||
  return self;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
@@ -568,7 +389,8 @@ meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *stex,
 | 
			
		||||
    {
 | 
			
		||||
      CoglTexture *base_texture;
 | 
			
		||||
      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);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -594,64 +416,7 @@ meta_shaped_texture_set_mask_texture (MetaShapedTexture *stex,
 | 
			
		||||
  clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static cairo_region_t *
 | 
			
		||||
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
 | 
			
		||||
void
 | 
			
		||||
meta_shaped_texture_update_area (MetaShapedTexture *stex,
 | 
			
		||||
				 int                x,
 | 
			
		||||
				 int                y,
 | 
			
		||||
@@ -659,49 +424,24 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
 | 
			
		||||
				 int                height)
 | 
			
		||||
{
 | 
			
		||||
  MetaShapedTexturePrivate *priv;
 | 
			
		||||
  cairo_region_t *unobscured_region;
 | 
			
		||||
  const cairo_rectangle_int_t clip = { x, y, width, height };
 | 
			
		||||
 | 
			
		||||
  priv = stex->priv;
 | 
			
		||||
 | 
			
		||||
  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);
 | 
			
		||||
 | 
			
		||||
  unobscured_region = effective_unobscured_region (stex);
 | 
			
		||||
  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;
 | 
			
		||||
    }
 | 
			
		||||
  clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stex), &clip);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
set_cogl_texture (MetaShapedTexture *stex,
 | 
			
		||||
                  CoglTexture       *cogl_tex)
 | 
			
		||||
set_cogl_texture (MetaShapedTexture    *stex,
 | 
			
		||||
                  CoglTexturePixmapX11 *cogl_tex)
 | 
			
		||||
{
 | 
			
		||||
  MetaShapedTexturePrivate *priv;
 | 
			
		||||
  guint width, height;
 | 
			
		||||
@@ -715,6 +455,12 @@ set_cogl_texture (MetaShapedTexture *stex,
 | 
			
		||||
 | 
			
		||||
  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)
 | 
			
		||||
    {
 | 
			
		||||
      width = cogl_texture_get_width (COGL_TEXTURE (cogl_tex));
 | 
			
		||||
@@ -731,33 +477,47 @@ set_cogl_texture (MetaShapedTexture *stex,
 | 
			
		||||
    }
 | 
			
		||||
  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_height = 0;
 | 
			
		||||
      clutter_actor_queue_relayout (CLUTTER_ACTOR (stex));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  /* NB: We don't queue a redraw of the actor here because we don't
 | 
			
		||||
   * know how much of the buffer has changed with respect to the
 | 
			
		||||
   * previous buffer. We only queue a redraw in response to surface
 | 
			
		||||
   * damage. */
 | 
			
		||||
 | 
			
		||||
  if (priv->create_mipmaps)
 | 
			
		||||
    meta_texture_tower_set_base_texture (priv->paint_tower, cogl_tex);
 | 
			
		||||
  clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * meta_shaped_texture_set_texture:
 | 
			
		||||
 * meta_shaped_texture_set_pixmap:
 | 
			
		||||
 * @stex: The #MetaShapedTexture
 | 
			
		||||
 * @pixmap: The #CoglTexture to display
 | 
			
		||||
 * @pixmap: The pixmap you want the stex to assume
 | 
			
		||||
 */
 | 
			
		||||
void
 | 
			
		||||
meta_shaped_texture_set_texture (MetaShapedTexture *stex,
 | 
			
		||||
                                 CoglTexture       *texture)
 | 
			
		||||
meta_shaped_texture_set_pixmap (MetaShapedTexture *stex,
 | 
			
		||||
                                Pixmap             pixmap)
 | 
			
		||||
{
 | 
			
		||||
  MetaShapedTexturePrivate *priv;
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
 * @shape_region: the region of the texture that should respond to
 | 
			
		||||
 *    input.
 | 
			
		||||
 * @clip_region: (transfer full): the region of the texture that
 | 
			
		||||
 *   is visible and should be painted.
 | 
			
		||||
 *
 | 
			
		||||
 * Determines what region of the texture should accept input. For
 | 
			
		||||
 * X based windows this is defined by the ShapeInput region of the
 | 
			
		||||
 * window.
 | 
			
		||||
 * Provides a hint to the texture about what areas of the texture
 | 
			
		||||
 * are not completely obscured and thus need to be painted. This
 | 
			
		||||
 * is an optimization and is not supposed to have any effect on
 | 
			
		||||
 * the output.
 | 
			
		||||
 *
 | 
			
		||||
 * Typically a parent container will set the clip region before
 | 
			
		||||
 * painting its children, and then unset it afterwards.
 | 
			
		||||
 */
 | 
			
		||||
void
 | 
			
		||||
meta_shaped_texture_set_input_shape_region (MetaShapedTexture *stex,
 | 
			
		||||
                                            cairo_region_t    *shape_region)
 | 
			
		||||
meta_shaped_texture_set_clip_region (MetaShapedTexture *stex,
 | 
			
		||||
				     cairo_region_t    *clip_region)
 | 
			
		||||
{
 | 
			
		||||
  MetaShapedTexturePrivate *priv;
 | 
			
		||||
 | 
			
		||||
@@ -793,49 +557,16 @@ meta_shaped_texture_set_input_shape_region (MetaShapedTexture *stex,
 | 
			
		||||
 | 
			
		||||
  priv = stex->priv;
 | 
			
		||||
 | 
			
		||||
  if (priv->input_shape_region != NULL)
 | 
			
		||||
  if (priv->clip_region)
 | 
			
		||||
    {
 | 
			
		||||
      cairo_region_destroy (priv->input_shape_region);
 | 
			
		||||
      priv->input_shape_region = NULL;
 | 
			
		||||
      cairo_region_destroy (priv->clip_region);
 | 
			
		||||
      priv->clip_region = NULL;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  if (shape_region != NULL)
 | 
			
		||||
    {
 | 
			
		||||
      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);
 | 
			
		||||
  if (clip_region)
 | 
			
		||||
    priv->clip_region = cairo_region_copy (clip_region);
 | 
			
		||||
  else
 | 
			
		||||
    priv->opaque_region = NULL;
 | 
			
		||||
    priv->clip_region = NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -935,46 +666,3 @@ meta_shaped_texture_get_image (MetaShapedTexture     *stex,
 | 
			
		||||
 | 
			
		||||
  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);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -18,7 +18,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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>
 | 
			
		||||
@@ -26,6 +28,41 @@
 | 
			
		||||
#include <clutter/clutter.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
 | 
			
		||||
texture_rectangle_check_cb (CoglTexture *sub_texture,
 | 
			
		||||
                            const float *sub_texture_coords,
 | 
			
		||||
 
 | 
			
		||||
@@ -18,7 +18,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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__
 | 
			
		||||
@@ -28,6 +30,15 @@
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
meta_texture_rectangle_check (CoglTexture *texture);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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>
 | 
			
		||||
@@ -60,7 +62,6 @@ struct _MetaTextureTower
 | 
			
		||||
  CoglTexture *textures[MAX_TEXTURE_LEVELS];
 | 
			
		||||
  CoglOffscreen *fbos[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);
 | 
			
		||||
 | 
			
		||||
  if (tower->pipeline_template != NULL)
 | 
			
		||||
    cogl_object_unref (tower->pipeline_template);
 | 
			
		||||
 | 
			
		||||
  meta_texture_tower_set_base_texture (tower, NULL);
 | 
			
		||||
 | 
			
		||||
  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)) &&
 | 
			
		||||
      meta_texture_rectangle_check (tower->textures[level - 1]))
 | 
			
		||||
    {
 | 
			
		||||
      ClutterBackend *backend = clutter_get_default_backend ();
 | 
			
		||||
      CoglContext *context = clutter_backend_get_cogl_context (backend);
 | 
			
		||||
 | 
			
		||||
      tower->textures[level] = cogl_texture_rectangle_new_with_size (context, width, height);
 | 
			
		||||
      tower->textures[level] =
 | 
			
		||||
        meta_texture_rectangle_new (width, height,
 | 
			
		||||
                                    /* data format */
 | 
			
		||||
                                    TEXTURE_FORMAT,
 | 
			
		||||
                                    /* internal cogl format */
 | 
			
		||||
                                    TEXTURE_FORMAT,
 | 
			
		||||
                                    /* rowstride */
 | 
			
		||||
                                    width * 4,
 | 
			
		||||
                                    /* data */
 | 
			
		||||
                                    NULL,
 | 
			
		||||
                                    /* error */
 | 
			
		||||
                                    NULL);
 | 
			
		||||
    }
 | 
			
		||||
  else
 | 
			
		||||
    {
 | 
			
		||||
@@ -377,7 +383,7 @@ texture_tower_create_texture (MetaTextureTower *tower,
 | 
			
		||||
  tower->invalid[level].y2 = height;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
static gboolean
 | 
			
		||||
texture_tower_revalidate_fbo (MetaTextureTower *tower,
 | 
			
		||||
                              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_height = cogl_texture_get_height (dest_texture);
 | 
			
		||||
  Box *invalid = &tower->invalid[level];
 | 
			
		||||
  CoglFramebuffer *fb;
 | 
			
		||||
  CoglError *catch_error = NULL;
 | 
			
		||||
  CoglPipeline *pipeline;
 | 
			
		||||
  CoglMatrix modelview;
 | 
			
		||||
 | 
			
		||||
  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);
 | 
			
		||||
      return;
 | 
			
		||||
      buf[0] = (source[0] + source[4]) / 2;
 | 
			
		||||
      buf[1] = (source[1] + source[5]) / 2;
 | 
			
		||||
      buf[2] = (source[2] + source[6]) / 2;
 | 
			
		||||
      buf[3] = (source[3] + source[7]) / 2;
 | 
			
		||||
 | 
			
		||||
      buf += 4;
 | 
			
		||||
      source += 8;
 | 
			
		||||
      width -= 2;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  cogl_framebuffer_orthographic (fb, 0, 0, dest_texture_width, dest_texture_height, -1., 1.);
 | 
			
		||||
 | 
			
		||||
  if (!tower->pipeline_template)
 | 
			
		||||
  if (width > 0)
 | 
			
		||||
    {
 | 
			
		||||
      CoglContext *ctx =
 | 
			
		||||
        clutter_backend_get_cogl_context (clutter_get_default_backend ());
 | 
			
		||||
      tower->pipeline_template = cogl_pipeline_new (ctx);
 | 
			
		||||
      cogl_pipeline_set_blend (tower->pipeline_template, "RGBA = ADD (SRC_COLOR, 0)", NULL);
 | 
			
		||||
      buf[0] = source[0] / 2;
 | 
			
		||||
      buf[1] = source[1] / 2;
 | 
			
		||||
      buf[2] = source[2] / 2;
 | 
			
		||||
      buf[3] = source[3] / 2;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
texture_tower_revalidate_client (MetaTextureTower *tower,
 | 
			
		||||
                                 int               level)
 | 
			
		||||
{
 | 
			
		||||
  CoglTexture *source_texture = tower->textures[level - 1];
 | 
			
		||||
  int source_texture_width = cogl_texture_get_width (source_texture);
 | 
			
		||||
  int source_texture_height = cogl_texture_get_height (source_texture);
 | 
			
		||||
  guint source_rowstride;
 | 
			
		||||
  guchar *source_data;
 | 
			
		||||
  CoglTexture *dest_texture = tower->textures[level];
 | 
			
		||||
  int dest_texture_width = cogl_texture_get_width (dest_texture);
 | 
			
		||||
  int dest_texture_height = cogl_texture_get_height (dest_texture);
 | 
			
		||||
  int dest_x = tower->invalid[level].x1;
 | 
			
		||||
  int dest_y = tower->invalid[level].y1;
 | 
			
		||||
  int dest_width = tower->invalid[level].x2 - tower->invalid[level].x1;
 | 
			
		||||
  int dest_height = tower->invalid[level].y2 - tower->invalid[level].y1;
 | 
			
		||||
  guchar *dest_data;
 | 
			
		||||
  guchar *source_tmp1 = NULL, *source_tmp2 = NULL;
 | 
			
		||||
  int i, j;
 | 
			
		||||
 | 
			
		||||
  source_rowstride = source_texture_width * 4;
 | 
			
		||||
 | 
			
		||||
  source_data = g_malloc (source_texture_height * source_rowstride);
 | 
			
		||||
  cogl_texture_get_data (source_texture, TEXTURE_FORMAT, source_rowstride,
 | 
			
		||||
                         source_data);
 | 
			
		||||
 | 
			
		||||
  dest_data = g_malloc (dest_height * dest_width * 4);
 | 
			
		||||
 | 
			
		||||
  if (dest_texture_height < source_texture_height)
 | 
			
		||||
    {
 | 
			
		||||
      source_tmp1 = g_malloc (dest_width * 4);
 | 
			
		||||
      source_tmp2 = g_malloc (dest_width * 4);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  pipeline = cogl_pipeline_copy (tower->pipeline_template);
 | 
			
		||||
  cogl_pipeline_set_layer_texture (pipeline, 0, tower->textures[level - 1]);
 | 
			
		||||
  for (i = 0; i < dest_height; i++)
 | 
			
		||||
    {
 | 
			
		||||
      guchar *dest_row = dest_data + i * dest_width * 4;
 | 
			
		||||
      if (dest_texture_height < source_texture_height)
 | 
			
		||||
        {
 | 
			
		||||
          guchar *source1, *source2;
 | 
			
		||||
          guchar *dest;
 | 
			
		||||
 | 
			
		||||
  cogl_framebuffer_draw_textured_rectangle (fb, pipeline,
 | 
			
		||||
                                            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);
 | 
			
		||||
          if (dest_texture_width < source_texture_width)
 | 
			
		||||
            {
 | 
			
		||||
              fill_scale_down (source_tmp1,
 | 
			
		||||
                               source_data + ((i + dest_y) * 2) * source_rowstride + dest_x * 2 * 4,
 | 
			
		||||
                               dest_width * 2);
 | 
			
		||||
              fill_scale_down (source_tmp2,
 | 
			
		||||
                               source_data + ((i + dest_y) * 2 + 1) * source_rowstride + dest_x * 2 * 4,
 | 
			
		||||
                               dest_width * 2);
 | 
			
		||||
            }
 | 
			
		||||
          else
 | 
			
		||||
            {
 | 
			
		||||
              fill_copy (source_tmp1,
 | 
			
		||||
                         source_data + ((i + dest_y) * 2) * source_rowstride + dest_x * 4,
 | 
			
		||||
                         dest_width);
 | 
			
		||||
              fill_copy (source_tmp2,
 | 
			
		||||
                         source_data + ((i + dest_y) * 2 + 1) * source_rowstride + dest_x * 4,
 | 
			
		||||
                         dest_width);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
texture_tower_revalidate (MetaTextureTower *tower,
 | 
			
		||||
                          int               level)
 | 
			
		||||
{
 | 
			
		||||
  texture_tower_revalidate_fbo (tower, level);
 | 
			
		||||
  if (!texture_tower_revalidate_fbo (tower, level))
 | 
			
		||||
    texture_tower_revalidate_client (tower, level);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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__
 | 
			
		||||
 
 | 
			
		||||
@@ -35,13 +35,13 @@ void meta_window_actor_frame_complete (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,
 | 
			
		||||
                                          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);
 | 
			
		||||
void     meta_window_actor_sync_actor_geometry (MetaWindowActor *self,
 | 
			
		||||
                                                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,
 | 
			
		||||
                                                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,
 | 
			
		||||
                                         gulong           event);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -11,8 +11,8 @@
 | 
			
		||||
#include "compositor-private.h"
 | 
			
		||||
#include "meta-window-actor-private.h"
 | 
			
		||||
#include "meta-window-group.h"
 | 
			
		||||
#include "window-private.h"
 | 
			
		||||
#include "meta-cullable.h"
 | 
			
		||||
#include "meta-background-actor-private.h"
 | 
			
		||||
#include "meta-background-group-private.h"
 | 
			
		||||
 | 
			
		||||
struct _MetaWindowGroupClass
 | 
			
		||||
{
 | 
			
		||||
@@ -26,10 +26,7 @@ struct _MetaWindowGroup
 | 
			
		||||
  MetaScreen *screen;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static void cullable_iface_init (MetaCullableInterface *iface);
 | 
			
		||||
 | 
			
		||||
G_DEFINE_TYPE_WITH_CODE (MetaWindowGroup, meta_window_group, CLUTTER_TYPE_ACTOR,
 | 
			
		||||
                         G_IMPLEMENT_INTERFACE (META_TYPE_CULLABLE, cullable_iface_init));
 | 
			
		||||
G_DEFINE_TYPE (MetaWindowGroup, meta_window_group, CLUTTER_TYPE_ACTOR);
 | 
			
		||||
 | 
			
		||||
/* Help macros to scale from OpenGL <-1,1> coordinates system to
 | 
			
		||||
 * window coordinates ranging [0,window-size]. Borrowed from clutter-utils.c
 | 
			
		||||
@@ -89,39 +86,18 @@ painting_untransformed (MetaWindowGroup *window_group,
 | 
			
		||||
  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
 | 
			
		||||
meta_window_group_paint (ClutterActor *actor)
 | 
			
		||||
{
 | 
			
		||||
  cairo_region_t *clip_region;
 | 
			
		||||
  cairo_region_t *unobscured_region;
 | 
			
		||||
  cairo_rectangle_int_t visible_rect, clip_rect;
 | 
			
		||||
  int paint_x_offset, paint_y_offset;
 | 
			
		||||
  cairo_region_t *visible_region;
 | 
			
		||||
  ClutterActor *stage;
 | 
			
		||||
  cairo_rectangle_int_t visible_rect;
 | 
			
		||||
  GList *children, *l;
 | 
			
		||||
  int paint_x_origin, paint_y_origin;
 | 
			
		||||
  int actor_x_origin, actor_y_origin;
 | 
			
		||||
  int paint_x_offset, paint_y_offset;
 | 
			
		||||
 | 
			
		||||
  MetaWindowGroup *window_group = META_WINDOW_GROUP (actor);
 | 
			
		||||
  ClutterActor *stage = clutter_actor_get_stage (actor);
 | 
			
		||||
  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.
 | 
			
		||||
@@ -144,11 +120,15 @@ meta_window_group_paint (ClutterActor *actor)
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  visible_rect.x = visible_rect.y = 0;
 | 
			
		||||
  visible_rect.width = clutter_actor_get_width (CLUTTER_ACTOR (stage));
 | 
			
		||||
  visible_rect.height = clutter_actor_get_height (CLUTTER_ACTOR (stage));
 | 
			
		||||
  paint_x_offset = paint_x_origin - actor_x_origin;
 | 
			
		||||
  paint_y_offset = paint_y_origin - actor_y_origin;
 | 
			
		||||
 | 
			
		||||
  unobscured_region = cairo_region_create_rectangle (&visible_rect);
 | 
			
		||||
  /* 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.
 | 
			
		||||
   */
 | 
			
		||||
  children = clutter_actor_get_children (actor);
 | 
			
		||||
  children = g_list_reverse (children);
 | 
			
		||||
 | 
			
		||||
  /* 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
 | 
			
		||||
@@ -156,58 +136,125 @@ meta_window_group_paint (ClutterActor *actor)
 | 
			
		||||
   * sizes, we could intersect this with an accurate union of the
 | 
			
		||||
   * monitors to avoid painting shadows that are visible only in the
 | 
			
		||||
   * holes. */
 | 
			
		||||
  stage = clutter_actor_get_stage (actor);
 | 
			
		||||
  clutter_stage_get_redraw_clip_bounds (CLUTTER_STAGE (stage),
 | 
			
		||||
                                        &clip_rect);
 | 
			
		||||
                                        &visible_rect);
 | 
			
		||||
 | 
			
		||||
  clip_region = cairo_region_create_rectangle (&clip_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);
 | 
			
		||||
  visible_region = cairo_region_create_rectangle (&visible_rect);
 | 
			
		||||
 | 
			
		||||
  if (info->unredirected_window != NULL)
 | 
			
		||||
    {
 | 
			
		||||
      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);
 | 
			
		||||
      cairo_region_subtract_rectangle (unobscured_region, &unredirected_rect);
 | 
			
		||||
      cairo_region_subtract_rectangle (clip_region, &unredirected_rect);
 | 
			
		||||
      meta_window_get_outer_rect (window, (MetaRectangle *)&unredirected_rect);
 | 
			
		||||
      cairo_region_subtract_rectangle (visible_region, &unredirected_rect);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  meta_cullable_cull_out (META_CULLABLE (window_group), unobscured_region, clip_region);
 | 
			
		||||
  for (l = children; l; l = l->next)
 | 
			
		||||
    {
 | 
			
		||||
      if (!CLUTTER_ACTOR_IS_VISIBLE (l->data))
 | 
			
		||||
        continue;
 | 
			
		||||
 | 
			
		||||
  cairo_region_destroy (unobscured_region);
 | 
			
		||||
  cairo_region_destroy (clip_region);
 | 
			
		||||
      if (l->data == 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 (l->data))
 | 
			
		||||
        continue;
 | 
			
		||||
 | 
			
		||||
      if (META_IS_WINDOW_ACTOR (l->data))
 | 
			
		||||
        {
 | 
			
		||||
          MetaWindowActor *window_actor = l->data;
 | 
			
		||||
          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 (l->data) ||
 | 
			
		||||
               META_IS_BACKGROUND_GROUP (l->data))
 | 
			
		||||
        {
 | 
			
		||||
          ClutterActor *background_actor = l->data;
 | 
			
		||||
          int x, y;
 | 
			
		||||
 | 
			
		||||
          if (!meta_actor_is_untransformed (CLUTTER_ACTOR (background_actor), &x, &y))
 | 
			
		||||
            continue;
 | 
			
		||||
 | 
			
		||||
          x += paint_x_offset;
 | 
			
		||||
          y += paint_y_offset;
 | 
			
		||||
 | 
			
		||||
          cairo_region_translate (visible_region, - x, - y);
 | 
			
		||||
 | 
			
		||||
          if (META_IS_BACKGROUND_GROUP (background_actor))
 | 
			
		||||
            meta_background_group_set_visible_region (META_BACKGROUND_GROUP (background_actor), visible_region);
 | 
			
		||||
          else
 | 
			
		||||
            meta_background_actor_set_visible_region (META_BACKGROUND_ACTOR (background_actor), visible_region);
 | 
			
		||||
          cairo_region_translate (visible_region, x, y);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  cairo_region_destroy (visible_region);
 | 
			
		||||
 | 
			
		||||
  CLUTTER_ACTOR_CLASS (meta_window_group_parent_class)->paint (actor);
 | 
			
		||||
 | 
			
		||||
  meta_cullable_reset_culling (META_CULLABLE (window_group));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Adapted from clutter_actor_update_default_paint_volume() */
 | 
			
		||||
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))
 | 
			
		||||
  /* Now that we are done painting, unset the visible regions (they will
 | 
			
		||||
   * mess up painting clones of our actors)
 | 
			
		||||
   */
 | 
			
		||||
  for (l = children; l; l = l->next)
 | 
			
		||||
    {
 | 
			
		||||
      const ClutterPaintVolume *child_volume;
 | 
			
		||||
 | 
			
		||||
      if (!CLUTTER_ACTOR_IS_MAPPED (child))
 | 
			
		||||
        continue;
 | 
			
		||||
 | 
			
		||||
      child_volume = clutter_actor_get_transformed_paint_volume (child, self);
 | 
			
		||||
      if (child_volume == NULL)
 | 
			
		||||
        return FALSE;
 | 
			
		||||
 | 
			
		||||
      clutter_paint_volume_union (volume, child_volume);
 | 
			
		||||
      if (META_IS_WINDOW_ACTOR (l->data))
 | 
			
		||||
        {
 | 
			
		||||
          MetaWindowActor *window_actor = l->data;
 | 
			
		||||
          meta_window_actor_reset_visible_regions (window_actor);
 | 
			
		||||
        }
 | 
			
		||||
      else if (META_IS_BACKGROUND_ACTOR (l->data))
 | 
			
		||||
        {
 | 
			
		||||
          MetaBackgroundActor *background_actor = l->data;
 | 
			
		||||
          meta_background_actor_set_visible_region (background_actor, NULL);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  return TRUE;
 | 
			
		||||
  g_list_free (children);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static gboolean
 | 
			
		||||
meta_window_group_get_paint_volume (ClutterActor       *actor,
 | 
			
		||||
                                    ClutterPaintVolume *volume)
 | 
			
		||||
{
 | 
			
		||||
  return clutter_paint_volume_set_from_allocation (volume, actor);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
 
 | 
			
		||||
@@ -11,9 +11,29 @@
 | 
			
		||||
 * MetaWindowGroup:
 | 
			
		||||
 *
 | 
			
		||||
 * This class is a subclass of ClutterActor with special handling for
 | 
			
		||||
 * #MetaCullable when painting children. It uses code similar to
 | 
			
		||||
 * meta_cullable_cull_out_children(), but also has additional special
 | 
			
		||||
 * cases for the undirected window, and similar.
 | 
			
		||||
 * MetaWindowActor/MetaBackgroundActor/MetaBackgroundGroup when painting
 | 
			
		||||
 * children.
 | 
			
		||||
 *
 | 
			
		||||
 * 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 ())
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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__
 | 
			
		||||
 
 | 
			
		||||
@@ -16,17 +16,18 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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/window.h>
 | 
			
		||||
#include <meta/meta-background-group.h>
 | 
			
		||||
#include <meta/meta-background-actor.h>
 | 
			
		||||
#include <meta/util.h>
 | 
			
		||||
#include <glib/gi18n-lib.h>
 | 
			
		||||
 | 
			
		||||
#include <libintl.h>
 | 
			
		||||
#define _(x) dgettext (GETTEXT_PACKAGE, x)
 | 
			
		||||
#define N_(x) x
 | 
			
		||||
 | 
			
		||||
#include <clutter/clutter.h>
 | 
			
		||||
#include <gmodule.h>
 | 
			
		||||
@@ -39,7 +40,6 @@
 | 
			
		||||
#define SWITCH_TIMEOUT    500
 | 
			
		||||
 | 
			
		||||
#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_DEFAULT_PLUGIN(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_DEFAULT_PLUGIN, MetaDefaultPlugin))
 | 
			
		||||
@@ -68,7 +68,6 @@ struct _MetaDefaultPluginClass
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static GQuark actor_data_quark = 0;
 | 
			
		||||
static GQuark screen_tile_preview_data_quark = 0;
 | 
			
		||||
 | 
			
		||||
static void start      (MetaPlugin      *plugin);
 | 
			
		||||
static void minimize   (MetaPlugin      *plugin,
 | 
			
		||||
@@ -99,14 +98,6 @@ static void kill_window_effects   (MetaPlugin      *plugin,
 | 
			
		||||
                                   MetaWindowActor *actor);
 | 
			
		||||
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 const MetaPluginInfo * plugin_info (MetaPlugin *plugin);
 | 
			
		||||
 | 
			
		||||
META_PLUGIN_DECLARE(MetaDefaultPlugin, meta_default_plugin);
 | 
			
		||||
@@ -122,8 +113,6 @@ struct _MetaDefaultPluginPrivate
 | 
			
		||||
  ClutterActor          *desktop1;
 | 
			
		||||
  ClutterActor          *desktop2;
 | 
			
		||||
 | 
			
		||||
  ClutterActor          *background_group;
 | 
			
		||||
 | 
			
		||||
  MetaPluginInfo         info;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@@ -151,15 +140,6 @@ typedef struct
 | 
			
		||||
} EffectCompleteData;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct _ScreenTilePreview
 | 
			
		||||
{
 | 
			
		||||
  ClutterActor   *actor;
 | 
			
		||||
 | 
			
		||||
  GdkRGBA        *preview_color;
 | 
			
		||||
 | 
			
		||||
  MetaRectangle   tile_rect;
 | 
			
		||||
} ScreenTilePreview;
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
meta_default_plugin_dispose (GObject *object)
 | 
			
		||||
{
 | 
			
		||||
@@ -220,12 +200,9 @@ meta_default_plugin_class_init (MetaDefaultPluginClass *klass)
 | 
			
		||||
  plugin_class->unmaximize       = unmaximize;
 | 
			
		||||
  plugin_class->destroy          = destroy;
 | 
			
		||||
  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->kill_window_effects   = kill_window_effects;
 | 
			
		||||
  plugin_class->kill_switch_workspace = kill_switch_workspace;
 | 
			
		||||
  plugin_class->confirm_display_change = confirm_display_change;
 | 
			
		||||
 | 
			
		||||
  g_type_class_add_private (gobject_class, sizeof (MetaDefaultPluginPrivate));
 | 
			
		||||
}
 | 
			
		||||
@@ -308,62 +285,27 @@ on_switch_workspace_effect_complete (ClutterTimeline *timeline, gpointer data)
 | 
			
		||||
  meta_plugin_switch_workspace_completed (plugin);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
on_monitors_changed (MetaScreen *screen,
 | 
			
		||||
                     MetaPlugin *plugin)
 | 
			
		||||
static gboolean
 | 
			
		||||
show_stage (MetaPlugin *plugin)
 | 
			
		||||
{
 | 
			
		||||
  MetaDefaultPlugin *self = META_DEFAULT_PLUGIN (plugin);
 | 
			
		||||
  int i, n;
 | 
			
		||||
  GRand *rand = g_rand_new_with_seed (12345);
 | 
			
		||||
  MetaScreen *screen;
 | 
			
		||||
  ClutterActor *stage;
 | 
			
		||||
 | 
			
		||||
  clutter_actor_destroy_all_children (self->priv->background_group);
 | 
			
		||||
  screen = meta_plugin_get_screen (plugin);
 | 
			
		||||
  stage = meta_get_stage_for_screen (screen);
 | 
			
		||||
 | 
			
		||||
  n = meta_screen_get_n_monitors (screen);
 | 
			
		||||
  for (i = 0; i < n; i++)
 | 
			
		||||
    {
 | 
			
		||||
      MetaRectangle rect;
 | 
			
		||||
      ClutterActor *background;
 | 
			
		||||
      ClutterColor color;
 | 
			
		||||
  clutter_actor_show (stage);
 | 
			
		||||
 | 
			
		||||
      meta_screen_get_monitor_geometry (screen, i, &rect);
 | 
			
		||||
 | 
			
		||||
      background = meta_background_actor_new ();
 | 
			
		||||
 | 
			
		||||
      clutter_actor_set_position (background, rect.x, rect.y);
 | 
			
		||||
      clutter_actor_set_size (background, rect.width, rect.height);
 | 
			
		||||
 | 
			
		||||
      /* Don't use rand() here, mesa calls srand() internally when
 | 
			
		||||
         parsing the driconf XML, but it's nice if the colors are
 | 
			
		||||
         reproducible.
 | 
			
		||||
      */
 | 
			
		||||
      clutter_color_init (&color,
 | 
			
		||||
                          g_rand_int_range (rand, 0, 255),
 | 
			
		||||
                          g_rand_int_range (rand, 0, 255),
 | 
			
		||||
                          g_rand_int_range (rand, 0, 255),
 | 
			
		||||
                          255);
 | 
			
		||||
      clutter_actor_set_background_color (background, &color);
 | 
			
		||||
 | 
			
		||||
      clutter_actor_add_child (self->priv->background_group, background);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  g_rand_free (rand);
 | 
			
		||||
  return FALSE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
start (MetaPlugin *plugin)
 | 
			
		||||
{
 | 
			
		||||
  MetaDefaultPlugin *self = META_DEFAULT_PLUGIN (plugin);
 | 
			
		||||
  MetaScreen *screen = meta_plugin_get_screen (plugin);
 | 
			
		||||
 | 
			
		||||
  self->priv->background_group = meta_background_group_new ();
 | 
			
		||||
  clutter_actor_insert_child_below (meta_get_window_group_for_screen (screen),
 | 
			
		||||
                                    self->priv->background_group, NULL);
 | 
			
		||||
 | 
			
		||||
  g_signal_connect (screen, "monitors-changed",
 | 
			
		||||
                    G_CALLBACK (on_monitors_changed), 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
 | 
			
		||||
@@ -412,11 +354,9 @@ switch_workspace (MetaPlugin *plugin,
 | 
			
		||||
      MetaWindowActor *window_actor = l->data;
 | 
			
		||||
      ActorPrivate    *apriv	    = get_actor_private (window_actor);
 | 
			
		||||
      ClutterActor    *actor	    = CLUTTER_ACTOR (window_actor);
 | 
			
		||||
      MetaWorkspace   *workspace;
 | 
			
		||||
      gint             win_workspace;
 | 
			
		||||
 | 
			
		||||
      workspace = meta_window_get_workspace (meta_window_actor_get_meta_window (window_actor));
 | 
			
		||||
      win_workspace = meta_workspace_index (workspace);
 | 
			
		||||
      win_workspace = meta_window_actor_get_workspace (window_actor);
 | 
			
		||||
 | 
			
		||||
      if (win_workspace == to || win_workspace == from)
 | 
			
		||||
        {
 | 
			
		||||
@@ -709,15 +649,15 @@ map (MetaPlugin *plugin, MetaWindowActor *window_actor)
 | 
			
		||||
      EffectCompleteData *data = g_new0 (EffectCompleteData, 1);
 | 
			
		||||
      ActorPrivate *apriv = get_actor_private (window_actor);
 | 
			
		||||
 | 
			
		||||
      clutter_actor_set_pivot_point (actor, 0.5, 0.5);
 | 
			
		||||
      clutter_actor_set_opacity (actor, 0);
 | 
			
		||||
      clutter_actor_set_scale (actor, 0.5, 0.5);
 | 
			
		||||
      clutter_actor_move_anchor_point_from_gravity (actor,
 | 
			
		||||
                                                    CLUTTER_GRAVITY_CENTER);
 | 
			
		||||
 | 
			
		||||
      clutter_actor_set_scale (actor, 0.0, 0.0);
 | 
			
		||||
      clutter_actor_show (actor);
 | 
			
		||||
 | 
			
		||||
      animation = clutter_actor_animate (actor,
 | 
			
		||||
                                         CLUTTER_EASE_OUT_QUAD,
 | 
			
		||||
                                         CLUTTER_EASE_IN_SINE,
 | 
			
		||||
                                         MAP_TIMEOUT,
 | 
			
		||||
                                         "opacity", 255,
 | 
			
		||||
                                         "scale-x", 1.0,
 | 
			
		||||
                                         "scale-y", 1.0,
 | 
			
		||||
                                         NULL);
 | 
			
		||||
@@ -789,82 +729,6 @@ destroy (MetaPlugin *plugin, MetaWindowActor *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
 | 
			
		||||
kill_switch_workspace (MetaPlugin     *plugin)
 | 
			
		||||
{
 | 
			
		||||
@@ -918,33 +782,3 @@ plugin_info (MetaPlugin *plugin)
 | 
			
		||||
 | 
			
		||||
  return &priv->info;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
on_dialog_closed (GPid     pid,
 | 
			
		||||
                  gint     status,
 | 
			
		||||
                  gpointer user_data)
 | 
			
		||||
{
 | 
			
		||||
  MetaPlugin *plugin = user_data;
 | 
			
		||||
  gboolean ok;
 | 
			
		||||
 | 
			
		||||
  ok = g_spawn_check_exit_status (status, NULL);
 | 
			
		||||
  meta_plugin_complete_display_change (plugin, ok);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
confirm_display_change (MetaPlugin *plugin)
 | 
			
		||||
{
 | 
			
		||||
  GPid pid;
 | 
			
		||||
 | 
			
		||||
  pid = meta_show_dialog ("--question",
 | 
			
		||||
                          "Does the display look OK?",
 | 
			
		||||
                          "20",
 | 
			
		||||
                          NULL,
 | 
			
		||||
                          "_Keep This Configuration",
 | 
			
		||||
                          "_Restore Previous Configuration",
 | 
			
		||||
                          "preferences-desktop-display",
 | 
			
		||||
                          0,
 | 
			
		||||
                          NULL, NULL);
 | 
			
		||||
 | 
			
		||||
  g_child_watch_add (pid, on_dialog_closed, plugin);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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"
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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__
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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 "screen-private.h"
 | 
			
		||||
#include "window-private.h"
 | 
			
		||||
#include "util-private.h"
 | 
			
		||||
#include <meta/prefs.h>
 | 
			
		||||
#include <meta/compositor.h>
 | 
			
		||||
#ifdef HAVE_LIBCANBERRA
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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>
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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"
 | 
			
		||||
 
 | 
			
		||||
@@ -18,7 +18,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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>
 | 
			
		||||
@@ -116,6 +118,8 @@ typedef struct
 | 
			
		||||
{
 | 
			
		||||
  MetaRectangle        orig;
 | 
			
		||||
  MetaRectangle        current;
 | 
			
		||||
  MetaFrameBorders    *borders;
 | 
			
		||||
  gboolean             must_free_borders;
 | 
			
		||||
  ActionType           action_type;
 | 
			
		||||
  gboolean             is_user_action;
 | 
			
		||||
 | 
			
		||||
@@ -191,6 +195,7 @@ static gboolean constrain_partially_onscreen (MetaWindow         *window,
 | 
			
		||||
 | 
			
		||||
static void setup_constraint_info        (ConstraintInfo      *info,
 | 
			
		||||
                                          MetaWindow          *window,
 | 
			
		||||
                                          MetaFrameBorders    *orig_borders,
 | 
			
		||||
                                          MetaMoveResizeFlags  flags,
 | 
			
		||||
                                          int                  resize_gravity,
 | 
			
		||||
                                          const MetaRectangle *orig,
 | 
			
		||||
@@ -199,12 +204,13 @@ static void place_window_if_needed       (MetaWindow     *window,
 | 
			
		||||
                                          ConstraintInfo *info);
 | 
			
		||||
static void update_onscreen_requirements (MetaWindow     *window,
 | 
			
		||||
                                          ConstraintInfo *info);
 | 
			
		||||
static void extend_by_frame              (MetaWindow     *window,
 | 
			
		||||
                                          MetaRectangle  *rect);
 | 
			
		||||
static void unextend_by_frame            (MetaWindow     *window,
 | 
			
		||||
                                          MetaRectangle  *rect);
 | 
			
		||||
static inline void get_size_limits       (MetaWindow    *window,
 | 
			
		||||
                                          gboolean       include_frame,
 | 
			
		||||
static void extend_by_frame              (MetaRectangle           *rect,
 | 
			
		||||
                                          const MetaFrameBorders  *borders);
 | 
			
		||||
static void unextend_by_frame            (MetaRectangle           *rect,
 | 
			
		||||
                                          const MetaFrameBorders  *borders);
 | 
			
		||||
static inline void get_size_limits       (const MetaWindow        *window,
 | 
			
		||||
                                          const MetaFrameBorders  *borders,
 | 
			
		||||
                                          gboolean include_frame,
 | 
			
		||||
                                          MetaRectangle *min_size,
 | 
			
		||||
                                          MetaRectangle *max_size);
 | 
			
		||||
 | 
			
		||||
@@ -274,6 +280,7 @@ do_all_constraints (MetaWindow         *window,
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
meta_window_constrain (MetaWindow          *window,
 | 
			
		||||
                       MetaFrameBorders    *orig_borders,
 | 
			
		||||
                       MetaMoveResizeFlags  flags,
 | 
			
		||||
                       int                  resize_gravity,
 | 
			
		||||
                       const MetaRectangle *orig,
 | 
			
		||||
@@ -296,6 +303,7 @@ meta_window_constrain (MetaWindow          *window,
 | 
			
		||||
 | 
			
		||||
  setup_constraint_info (&info,
 | 
			
		||||
                         window, 
 | 
			
		||||
                         orig_borders,
 | 
			
		||||
                         flags,
 | 
			
		||||
                         resize_gravity,
 | 
			
		||||
                         orig,
 | 
			
		||||
@@ -325,11 +333,19 @@ meta_window_constrain (MetaWindow          *window,
 | 
			
		||||
   * if this was a user move or user move-and-resize operation.
 | 
			
		||||
   */
 | 
			
		||||
  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
 | 
			
		||||
setup_constraint_info (ConstraintInfo      *info,
 | 
			
		||||
                       MetaWindow          *window,
 | 
			
		||||
                       MetaFrameBorders    *orig_borders,
 | 
			
		||||
                       MetaMoveResizeFlags  flags,
 | 
			
		||||
                       int                  resize_gravity,
 | 
			
		||||
                       const MetaRectangle *orig,
 | 
			
		||||
@@ -341,6 +357,18 @@ setup_constraint_info (ConstraintInfo      *info,
 | 
			
		||||
  info->orig    = *orig;
 | 
			
		||||
  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)
 | 
			
		||||
    info->action_type = ACTION_MOVE_AND_RESIZE;
 | 
			
		||||
  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
 | 
			
		||||
   * fullscreen themselves properly - don't get fooled by
 | 
			
		||||
   * windows which hide their titlebar when maximized or which are
 | 
			
		||||
   * client decorated; that's not the same as fullscreen, even
 | 
			
		||||
   * if there are no struts making the workarea smaller than
 | 
			
		||||
   * the monitor.
 | 
			
		||||
   * windows which hide their titlebar when maximized; that's
 | 
			
		||||
   * not the same as fullscreen, even if there are no struts
 | 
			
		||||
   * making the workarea smaller than the monitor.
 | 
			
		||||
   */
 | 
			
		||||
  if (meta_prefs_get_force_fullscreen() &&
 | 
			
		||||
      !window->hide_titlebar_when_maximized &&
 | 
			
		||||
      (window->decorated || !meta_window_is_client_decorated (window)) &&
 | 
			
		||||
      meta_rectangle_equal (new, &monitor_info->rect) &&
 | 
			
		||||
      window->has_fullscreen_func &&
 | 
			
		||||
      !window->fullscreen)
 | 
			
		||||
@@ -491,17 +517,11 @@ place_window_if_needed(MetaWindow     *window,
 | 
			
		||||
      !window->minimized &&
 | 
			
		||||
      !window->fullscreen)
 | 
			
		||||
    {
 | 
			
		||||
      MetaRectangle orig_rect;
 | 
			
		||||
      MetaRectangle placed_rect;
 | 
			
		||||
      MetaRectangle placed_rect = info->orig;
 | 
			
		||||
      MetaWorkspace *cur_workspace;
 | 
			
		||||
      const MetaMonitorInfo *monitor_info;
 | 
			
		||||
 | 
			
		||||
      meta_window_get_frame_rect (window, &placed_rect);
 | 
			
		||||
 | 
			
		||||
      orig_rect = info->orig;
 | 
			
		||||
      extend_by_frame (window, &orig_rect);
 | 
			
		||||
 | 
			
		||||
      meta_window_place (window, orig_rect.x, orig_rect.y,
 | 
			
		||||
      meta_window_place (window, info->borders, info->orig.x, info->orig.y,
 | 
			
		||||
                         &placed_rect.x, &placed_rect.y);
 | 
			
		||||
      did_placement = TRUE;
 | 
			
		||||
 | 
			
		||||
@@ -519,7 +539,6 @@ place_window_if_needed(MetaWindow     *window,
 | 
			
		||||
        meta_workspace_get_onmonitor_region (cur_workspace, 
 | 
			
		||||
                                             monitor_info->number);
 | 
			
		||||
 | 
			
		||||
      meta_window_frame_rect_to_client_rect (window, &placed_rect, &placed_rect);
 | 
			
		||||
 | 
			
		||||
      info->current.x = placed_rect.x;
 | 
			
		||||
      info->current.y = placed_rect.y;
 | 
			
		||||
@@ -565,6 +584,10 @@ place_window_if_needed(MetaWindow     *window,
 | 
			
		||||
                (window->maximize_vertically_after_placement ?
 | 
			
		||||
                 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)
 | 
			
		||||
            {
 | 
			
		||||
              window->saved_rect = info->current;
 | 
			
		||||
@@ -624,7 +647,7 @@ update_onscreen_requirements (MetaWindow     *window,
 | 
			
		||||
  /* The require onscreen/on-single-monitor and titlebar_visible
 | 
			
		||||
   * 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
 | 
			
		||||
   * window to be on fully onscreen.
 | 
			
		||||
@@ -657,13 +680,10 @@ update_onscreen_requirements (MetaWindow     *window,
 | 
			
		||||
   */
 | 
			
		||||
  if (window->frame && window->decorated)
 | 
			
		||||
    {
 | 
			
		||||
      MetaFrameBorders borders;
 | 
			
		||||
      MetaRectangle titlebar_rect;
 | 
			
		||||
 | 
			
		||||
      meta_frame_calc_borders (window->frame, &borders);
 | 
			
		||||
 | 
			
		||||
      titlebar_rect = info->current;
 | 
			
		||||
      titlebar_rect.height = borders.visible.top;
 | 
			
		||||
      titlebar_rect.height = info->borders->visible.top;
 | 
			
		||||
      old = window->require_titlebar_visible;
 | 
			
		||||
      window->require_titlebar_visible =
 | 
			
		||||
        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 */
 | 
			
		||||
  unextend_by_frame (window, &info->current);
 | 
			
		||||
  unextend_by_frame (&info->current, info->borders);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
extend_by_frame (MetaWindow    *window,
 | 
			
		||||
                 MetaRectangle *rect)
 | 
			
		||||
extend_by_frame (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
 | 
			
		||||
unextend_by_frame (MetaWindow    *window,
 | 
			
		||||
                   MetaRectangle *rect)
 | 
			
		||||
unextend_by_frame (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
 | 
			
		||||
get_size_limits (MetaWindow    *window,
 | 
			
		||||
                 gboolean       include_frame,
 | 
			
		||||
get_size_limits (const MetaWindow        *window,
 | 
			
		||||
                 const MetaFrameBorders *borders,
 | 
			
		||||
                 gboolean                 include_frame,
 | 
			
		||||
                 MetaRectangle *min_size,
 | 
			
		||||
                 MetaRectangle *max_size)
 | 
			
		||||
{
 | 
			
		||||
  /* We pack the results into MetaRectangle structs just for convienience; we
 | 
			
		||||
   * 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->height = window->size_hints.min_height;
 | 
			
		||||
  max_size->width  = window->size_hints.max_width;
 | 
			
		||||
@@ -710,8 +736,22 @@ get_size_limits (MetaWindow    *window,
 | 
			
		||||
 | 
			
		||||
  if (include_frame)
 | 
			
		||||
    {
 | 
			
		||||
      meta_window_client_rect_to_frame_rect (window, min_size, min_size);
 | 
			
		||||
      meta_window_client_rect_to_frame_rect (window, max_size, max_size);
 | 
			
		||||
      int fw = borders->visible.left + borders->visible.right;
 | 
			
		||||
      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;
 | 
			
		||||
  MetaWindow *parent = meta_window_get_transient_for (window);
 | 
			
		||||
  MetaRectangle child_rect, parent_rect;
 | 
			
		||||
  gboolean constraint_already_satisfied;
 | 
			
		||||
 | 
			
		||||
  if (!meta_window_is_attached_dialog (window))
 | 
			
		||||
    return TRUE;
 | 
			
		||||
 | 
			
		||||
  /* We want to center the dialog on the parent, including the decorations
 | 
			
		||||
     for both of them. info->current is in client X window coordinates, so we need
 | 
			
		||||
     to convert them to frame coordinates, apply the centering and then
 | 
			
		||||
     convert back to client.
 | 
			
		||||
  */
 | 
			
		||||
 | 
			
		||||
  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;
 | 
			
		||||
  x = parent->rect.x + (parent->rect.width / 2  - info->current.width / 2);
 | 
			
		||||
  y = parent->rect.y + (parent->rect.height / 2 - info->current.height / 2);
 | 
			
		||||
  if (parent->frame)
 | 
			
		||||
    {
 | 
			
		||||
      x += parent->frame->rect.x;
 | 
			
		||||
      y += parent->frame->rect.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;
 | 
			
		||||
 | 
			
		||||
      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,
 | 
			
		||||
                                                &info->entire_monitor,
 | 
			
		||||
                                                direction,
 | 
			
		||||
                                                active_workspace_struts);
 | 
			
		||||
   }
 | 
			
		||||
  /* 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
 | 
			
		||||
   * 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;
 | 
			
		||||
  vminbad = target_size.height < min_size.height && window->maximized_vertically;
 | 
			
		||||
  if (hminbad || vminbad)
 | 
			
		||||
@@ -875,12 +905,12 @@ constrain_tiling (MetaWindow         *window,
 | 
			
		||||
   * use an external function for the actual calculation
 | 
			
		||||
   */
 | 
			
		||||
  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
 | 
			
		||||
   * 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;
 | 
			
		||||
  vminbad = target_size.height < min_size.height;
 | 
			
		||||
  if (hminbad || vminbad)
 | 
			
		||||
@@ -923,7 +953,7 @@ constrain_fullscreen (MetaWindow         *window,
 | 
			
		||||
 | 
			
		||||
  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_small = !meta_rectangle_could_fit_rect (&max_size, &monitor);
 | 
			
		||||
  if (too_big || too_small)
 | 
			
		||||
@@ -1032,7 +1062,7 @@ constrain_size_limits (MetaWindow         *window,
 | 
			
		||||
    return TRUE;
 | 
			
		||||
 | 
			
		||||
  /* 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 */
 | 
			
		||||
  if (window->maximized_horizontally)
 | 
			
		||||
    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 */
 | 
			
		||||
  how_far_it_can_be_smushed = info->current;
 | 
			
		||||
  get_size_limits (window, TRUE, &min_size, &max_size);
 | 
			
		||||
  extend_by_frame (window, &info->current);
 | 
			
		||||
  get_size_limits (window, info->borders, TRUE, &min_size, &max_size);
 | 
			
		||||
  extend_by_frame (&info->current, info->borders);
 | 
			
		||||
 | 
			
		||||
  if (info->action_type != ACTION_MOVE)
 | 
			
		||||
    {
 | 
			
		||||
@@ -1245,7 +1275,7 @@ do_screen_and_monitor_relative_constraints (
 | 
			
		||||
                                        &info->current);
 | 
			
		||||
  if (exit_early || constraint_satisfied || check_only)
 | 
			
		||||
    {
 | 
			
		||||
      unextend_by_frame (window, &info->current);
 | 
			
		||||
      unextend_by_frame (&info->current, info->borders);
 | 
			
		||||
      return constraint_satisfied;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -1269,7 +1299,7 @@ do_screen_and_monitor_relative_constraints (
 | 
			
		||||
                                      info->fixed_directions,
 | 
			
		||||
                                      &info->current);
 | 
			
		||||
 | 
			
		||||
  unextend_by_frame (window, &info->current);
 | 
			
		||||
  unextend_by_frame (&info->current, info->borders);
 | 
			
		||||
  return TRUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1358,6 +1388,7 @@ constrain_titlebar_visible (MetaWindow         *window,
 | 
			
		||||
      window->type == META_WINDOW_DOCK    ||
 | 
			
		||||
      window->fullscreen                  ||
 | 
			
		||||
      !window->require_titlebar_visible   ||
 | 
			
		||||
      !window->decorated                  ||
 | 
			
		||||
      unconstrained_user_action)
 | 
			
		||||
    return TRUE;
 | 
			
		||||
 | 
			
		||||
@@ -1381,11 +1412,8 @@ constrain_titlebar_visible (MetaWindow         *window,
 | 
			
		||||
   */
 | 
			
		||||
  if (window->frame)
 | 
			
		||||
    {
 | 
			
		||||
      MetaFrameBorders borders;
 | 
			
		||||
      meta_frame_calc_borders (window->frame, &borders);
 | 
			
		||||
 | 
			
		||||
      bottom_amount = info->current.height + borders.visible.bottom;
 | 
			
		||||
      vert_amount_onscreen = borders.visible.top;
 | 
			
		||||
      bottom_amount = info->current.height + info->borders->visible.bottom;
 | 
			
		||||
      vert_amount_onscreen = info->borders->visible.top;
 | 
			
		||||
    }
 | 
			
		||||
  else
 | 
			
		||||
    bottom_amount = vert_amount_offscreen;
 | 
			
		||||
@@ -1459,11 +1487,8 @@ constrain_partially_onscreen (MetaWindow         *window,
 | 
			
		||||
   */
 | 
			
		||||
  if (window->frame)
 | 
			
		||||
    {
 | 
			
		||||
      MetaFrameBorders borders;
 | 
			
		||||
      meta_frame_calc_borders (window->frame, &borders);
 | 
			
		||||
 | 
			
		||||
      bottom_amount = info->current.height + borders.visible.bottom;
 | 
			
		||||
      vert_amount_onscreen = borders.visible.top;
 | 
			
		||||
      bottom_amount = info->current.height + info->borders->visible.bottom;
 | 
			
		||||
      vert_amount_onscreen = info->borders->visible.top;
 | 
			
		||||
    }
 | 
			
		||||
  else
 | 
			
		||||
    bottom_amount = vert_amount_offscreen;
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,9 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * 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
 | 
			
		||||
@@ -37,6 +39,7 @@ typedef enum
 | 
			
		||||
} MetaMoveResizeFlags;
 | 
			
		||||
 | 
			
		||||
void meta_window_constrain (MetaWindow          *window,
 | 
			
		||||
                            MetaFrameBorders    *orig_borders,
 | 
			
		||||
                            MetaMoveResizeFlags  flags,
 | 
			
		||||
                            int                  resize_gravity,
 | 
			
		||||
                            const MetaRectangle *orig,
 | 
			
		||||
 
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user