Compare commits
79 Commits
Author | SHA1 | Date | |
---|---|---|---|
f35160c30f | |||
7fad591d6e | |||
a364cea779 | |||
2eb3ff4bfb | |||
796ca6746d | |||
0a79fb8d62 | |||
ac7ec585c8 | |||
264c555af0 | |||
bbbb0e6002 | |||
41ae760454 | |||
9729a99ec5 | |||
d64c5bfc11 | |||
e4ed433e18 | |||
8ab5cc8f19 | |||
35261808a9 | |||
3a4512cd91 | |||
eb0185c1b1 | |||
34f6ffd1ad | |||
baeb9fbc4b | |||
c3d76aead6 | |||
bed9cb1648 | |||
4ca552785f | |||
b26b11c74d | |||
b3114bb9e5 | |||
497f9be61e | |||
a88365df9b | |||
47f98c5528 | |||
0e50287aea | |||
d42a2a3c27 | |||
78849bef04 | |||
b1a69d1e89 | |||
c5468ee391 | |||
7ce7feeb2b | |||
c0432ebb39 | |||
1a51d307c8 | |||
d0910da036 | |||
a2726f41c9 | |||
162213be0d | |||
1596d1af10 | |||
441287dc64 | |||
6e47f0e846 | |||
4fb2fab7f7 | |||
3beb33bb44 | |||
1b04a40dce | |||
8087872130 | |||
3ad25a62cd | |||
7ecd673d23 | |||
331c9aaee4 | |||
ec1979f9f5 | |||
4b411ea241 | |||
70db187c36 | |||
4de3f1d147 | |||
821d4458ea | |||
7f9472a58f | |||
3599917123 | |||
d624e85bc1 | |||
6aa4bfd060 | |||
a26e72c452 | |||
acc4e03482 | |||
e176a9e891 | |||
0b36663ff1 | |||
bb035fe6e0 | |||
6d0c1f08d2 | |||
f700a7be07 | |||
138eb1e3b4 | |||
c39129b6e8 | |||
bf175e72ad | |||
ba31ba4615 | |||
f94f008ed6 | |||
9d4f3c5842 | |||
0b2a9d58e0 | |||
28deea44d4 | |||
f82966adb5 | |||
9f54f1d75d | |||
be9f7d7729 | |||
1b4dce6f84 | |||
3bb17f0671 | |||
19d111a27b | |||
289561ddf3 |
5
.gitignore
vendored
5
.gitignore
vendored
@ -19,6 +19,7 @@ libtool
|
||||
ltmain.sh
|
||||
missing
|
||||
.deps
|
||||
src/50-mutter-windows.xml
|
||||
src/mutter-wm.desktop
|
||||
src/mutter.desktop
|
||||
*.o
|
||||
@ -40,6 +41,7 @@ stamp-h1
|
||||
stamp-it
|
||||
.intltool-merge-cache
|
||||
POTFILES
|
||||
po/*.pot
|
||||
50-metacity-desktop-key.xml
|
||||
50-metacity-key.xml
|
||||
inlinepixbufs.h
|
||||
@ -47,7 +49,8 @@ libmutter.pc
|
||||
mutter
|
||||
mutter-theme-viewer
|
||||
mutter.desktop
|
||||
mutter.schemas
|
||||
org.gnome.mutter.gschema.valid
|
||||
org.gnome.mutter.gschema.xml
|
||||
testasyncgetprop
|
||||
testboxes
|
||||
testgradient
|
||||
|
8
HACKING
8
HACKING
@ -42,10 +42,10 @@ Minimal Building/Testing Environment
|
||||
build a development version of Metacity -- odds are, you may be able
|
||||
to build metacity from CVS without building any other modules.
|
||||
|
||||
As long as you have gtk+ >= 2.10 and GConf with your distro (gtk+ >=
|
||||
2.6 if you manually revert the change from bug 348633), you should
|
||||
be able to install your distro's development packages
|
||||
(e.g. gtk2-devel, GConf2-devel, startup-notification-devel on
|
||||
As long as you have gtk+ >= 3.0 and GIO >= 2.25.10 with your distro
|
||||
(gtk+ >= 2.6 if you manually revert the change from bug 348633), you
|
||||
should be able to install your distro's development packages
|
||||
(e.g. gtk2-devel, glib-devel, startup-notification-devel on
|
||||
Fedora; also, remember to install the gnome-common package which is
|
||||
needed for building cvs versions of Gnome modules like Metacity) as
|
||||
well as the standard development tools (gcc, autoconf, automake,
|
||||
|
68
NEWS
68
NEWS
@ -1,3 +1,71 @@
|
||||
3.3.3
|
||||
=====
|
||||
* Add keybindings for tiling to left or right [Florian; #648700]
|
||||
* Support GTK+'s hide-titlebar-when-maximized hint [Florian; #665617]
|
||||
* Load _DBUS_APPLICATION_ID, _DBUS_UNIQUE_NAME, _DBUS_OBJECT_PATH
|
||||
property [Colin, Ryan; #664851]
|
||||
* Handle changes to workspaces-only-on-primary GSetting [Florian; #664853]
|
||||
* Don't use the Clutter default stage [Jasper; #664028]
|
||||
* Fix compilation with --disable-introspection [Lionel; #661871]
|
||||
* Fix problem where stage could end up mis-sized on startup with
|
||||
multiple monitors [Lionel]
|
||||
* Misc bug fixes [Adel, Lionel, Jasper; #666015]
|
||||
|
||||
Contributors:
|
||||
Adel Gadllah, Lionel Landwerlin, Florian Müllner, Jasper St. Pierre
|
||||
|
||||
Translations:
|
||||
Daniel Mustieles [es], Yaron Shahrabani [he], Kjartan Maraas [nb],
|
||||
Matej Urbančič [sk], Muhammet Kara [tr]
|
||||
|
||||
3.3.2
|
||||
=====
|
||||
|
||||
* Move from GConf to GSettings for preferences [Florian; #635378]
|
||||
* Add meta_display_add_keybinding()/meta_display_remove_keybinding()
|
||||
to allow creating new keybindings at runtime [Florian; #663428]
|
||||
* Add suport for new _NET_WM_STATE_FOCUSED atom in _NET_WM_STATE
|
||||
to allow applications to draw unfocused windows differently
|
||||
[Rui; #661427]
|
||||
* Add meta_window_move_resize_frame() to allow specifying the
|
||||
size and position of a window via the outside dimensions of the
|
||||
window frame.
|
||||
* Don't activate window tiling when moving in snap mode
|
||||
[Rui; #662270]
|
||||
* Remove the ability to resize a window from the inner edge of
|
||||
the titlebar [Jasper; #660129]
|
||||
* Fix for deprecations in GTK+ [Jasper, Rico; #662574, #662895]
|
||||
* Misc bug fixes [Jasper, Rico, Rui; #662895, #642652, #660941, #662225]
|
||||
|
||||
Contributors:
|
||||
Tim Cuthbertson, Rui Matos, Florian Müllner, Jasper St. Pierre, Rico Tzschichholz
|
||||
|
||||
Translations:
|
||||
Jorge González (es), Kjartan Maraas (nb), Krishnababu Krothapalli (te), Nguyễn Thái Ngọc Duy (vi)
|
||||
|
||||
3.2.1
|
||||
=====
|
||||
* Allow keyboard window switching (alt-Tab) during drag-and-drop
|
||||
[Matthias, #660457]
|
||||
* Don't add invisible resize borders to fullscreen windows
|
||||
[Jasper, Owen; #659854]
|
||||
* Fix crash when toplevel windows were set to unexpected window types
|
||||
[Owen; #599988]
|
||||
* Correct problems with windows moving when restarting or switching
|
||||
window managers [Jasper; #660848]
|
||||
* Fix interaction of tiled windows with multiple monitors
|
||||
[Rui; #642580, #657519]
|
||||
* Make meta_display_unmanage_screen() public [Jasper; #660848]
|
||||
* Fix problem with turning off window decorations on the fly [Rui; #660773]
|
||||
* Fix spurious assertion failures with themes such as Nodoka [Sandro; #661286]
|
||||
* Misc bug fixes [Adel, Jasper, Rui; #660464, #660854, #662053]
|
||||
|
||||
Contributors:
|
||||
Matthias Clasen, Sandro Mani, Rui Matos, Jasper St. Pierre, Owen Taylor
|
||||
|
||||
Translations:
|
||||
Tommi Vainikainen [fi], Miroslav Nikolić [sr, sr@latin], Muhammet Kara [tr]
|
||||
|
||||
3.2.0
|
||||
=====
|
||||
* Fix _NET_WM_FRAME_EXTENTS not to include invisible borders [Jasper; #659848]
|
||||
|
29
README
29
README
@ -18,8 +18,7 @@ COMPILING MUTTER
|
||||
You need GTK+ 2.2. For startup notification to work you need
|
||||
libstartup-notification at
|
||||
http://www.freedesktop.org/software/startup-notification/ or on the
|
||||
GNOME ftp site. You also need GConf 1.2 (unless building a funky
|
||||
extra-small embedded metacity with --disable-gconf, see below).
|
||||
GNOME ftp site.
|
||||
You need Clutter 1.0. You need gobject-introspection 0.6.3.
|
||||
|
||||
REPORTING BUGS AND SUBMITTING PATCHES
|
||||
@ -59,25 +58,24 @@ MUTTER FEATURES
|
||||
and should work with KWin, fvwm2, and other EWMH-compliant WMs.)
|
||||
|
||||
- Has a simple theme system and a couple of extra themes come with it.
|
||||
Change themes via gconf-editor or gconftool or GNOME themes control
|
||||
panel:
|
||||
gconftool-2 --type=string --set /apps/metacity/general/theme Crux
|
||||
gconftool-2 --type=string --set /apps/metacity/general/theme Gorilla
|
||||
gconftool-2 --type=string --set /apps/metacity/general/theme Atlanta
|
||||
gconftool-2 --type=string --set /apps/metacity/general/theme Bright
|
||||
Change themes via gsettings:
|
||||
gsettings set org.gnome.desktop.wm.preferences theme Crux
|
||||
gsettings set org.gnome.desktop.wm.preferences theme Gorilla
|
||||
gsettings set org.gnome.desktop.wm.preferences theme Atlanta
|
||||
gsettings set org.gnome.desktop.wm.preferences theme Bright
|
||||
|
||||
See theme-format.txt for docs on the theme format. Use
|
||||
metacity-theme-viewer to preview themes.
|
||||
|
||||
- Change number of workspaces via gconf-editor or gconftool:
|
||||
gconftool-2 --type=int --set /apps/metacity/general/num_workspaces 5
|
||||
- Change number of workspaces via gsettings:
|
||||
gsettings set org.gnome.desktop.wm.preferences num-workspaces 5
|
||||
|
||||
Can also change workspaces from GNOME 2 pager.
|
||||
|
||||
- Change focus mode:
|
||||
gconftool-2 --type=string --set /apps/metacity/general/focus_mode mouse
|
||||
gconftool-2 --type=string --set /apps/metacity/general/focus_mode sloppy
|
||||
gconftool-2 --type=string --set /apps/metacity/general/focus_mode click
|
||||
gsettings set org.gnome.desktop.wm.preferences focus-mode mouse
|
||||
gsettings set org.gnome.desktop.wm.preferences focus-mode sloppy
|
||||
gsettings set org.gnome.desktop.wm.preferences focus-mode click
|
||||
|
||||
- Global keybinding defaults include:
|
||||
|
||||
@ -92,10 +90,9 @@ MUTTER FEATURES
|
||||
|
||||
Change keybindings for example:
|
||||
|
||||
unst gconftool-2 --type=string --set /apps/metacity/global_keybindings/switch_to_workspace_1 '<Alt>F1'
|
||||
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 '[<Alt>F1]'
|
||||
|
||||
Also try the GNOME keyboard shortcuts control panel, or
|
||||
gconf-editor.
|
||||
Also try the GNOME keyboard shortcuts control panel.
|
||||
|
||||
- Window keybindings:
|
||||
|
||||
|
39
configure.in
39
configure.in
@ -1,8 +1,8 @@
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
m4_define([mutter_major_version], [3])
|
||||
m4_define([mutter_minor_version], [2])
|
||||
m4_define([mutter_micro_version], [0])
|
||||
m4_define([mutter_minor_version], [3])
|
||||
m4_define([mutter_micro_version], [3])
|
||||
|
||||
m4_define([mutter_version],
|
||||
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
||||
@ -61,21 +61,14 @@ AC_CHECK_SIZEOF(__int64)
|
||||
## byte order
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
GTK_MIN_VERSION=2.91.7
|
||||
GTK_MIN_VERSION=3.3.3
|
||||
GIO_MIN_VERSION=2.25.10
|
||||
CANBERRA_GTK=libcanberra-gtk3
|
||||
CANBERRA_GTK_VERSION=0.26
|
||||
|
||||
MUTTER_PC_MODULES="gtk+-3.0 >= $GTK_MIN_VERSION pango >= 1.2.0 cairo >= 1.10.0"
|
||||
MUTTER_PC_MODULES="gtk+-3.0 >= $GTK_MIN_VERSION gio-2.0 >= $GIO_MIN_VERSION pango >= 1.2.0 cairo >= 1.10.0 gsettings-desktop-schemas >= 3.3.0"
|
||||
|
||||
AC_ARG_ENABLE(gconf,
|
||||
AC_HELP_STRING([--disable-gconf],
|
||||
[disable gconf usage, for embedded/size-sensitive non-GNOME builds]),,
|
||||
enable_gconf=yes)
|
||||
|
||||
if test x$enable_gconf = xyes; then
|
||||
AC_DEFINE(HAVE_GCONF,1,[Build with gconf support])
|
||||
MUTTER_PC_MODULES="$MUTTER_PC_MODULES gconf-2.0 >= 1.2.0"
|
||||
fi
|
||||
GLIB_GSETTINGS
|
||||
|
||||
AC_ARG_ENABLE(verbose-mode,
|
||||
AC_HELP_STRING([--disable-verbose-mode],
|
||||
@ -400,18 +393,6 @@ fi
|
||||
|
||||
AC_SUBST(GDK_PIXBUF_CSOURCE)
|
||||
|
||||
if test x$enable_gconf = xyes; then
|
||||
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
|
||||
if test x"$GCONFTOOL" = xno; then
|
||||
AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
|
||||
fi
|
||||
|
||||
AM_GCONF_SOURCE_2
|
||||
else
|
||||
GCONF_SCHEMAS_INSTALL_TRUE='#'
|
||||
GCONF_SCHEMAS_INSTALL_FALSE=
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(ZENITY, zenity, no)
|
||||
if test x"$ZENITY" = xno; then
|
||||
AC_MSG_ERROR([zenity not found in your path - needed for dialogs])
|
||||
@ -511,13 +492,6 @@ po/Makefile.in
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
if test x$enable_gconf = xno; then
|
||||
echo "*** WARNING WARNING WARNING WARNING WARNING"
|
||||
echo "*** Building without GConf. This means there's no"
|
||||
echo "*** way to change prefs except hacking source code."
|
||||
echo "*** This is intended for embedded systems etc., not for normal use."
|
||||
fi
|
||||
|
||||
if test x$enable_verbose_mode = xno; then
|
||||
echo "*** WARNING WARNING WARNING WARNING WARNING"
|
||||
echo "*** Building without verbose mode"
|
||||
@ -534,7 +508,6 @@ mutter-$VERSION
|
||||
source code location: ${srcdir}
|
||||
compiler: ${CC}
|
||||
|
||||
GConf: ${enable_gconf}
|
||||
XFree86 Xinerama: ${use_xfree_xinerama}
|
||||
Solaris Xinerama: ${use_solaris_xinerama}
|
||||
Startup notification: ${have_startup_notification}
|
||||
|
@ -46,13 +46,13 @@ because the original program does not have a manual page.
|
||||
Restart \fBmutter\fP(1) which is running.
|
||||
.TP
|
||||
.B reload-theme
|
||||
Reload a theme which is specified on gconf database.
|
||||
Reload a theme which is specified on gsettings database.
|
||||
.TP
|
||||
.B enable-keybindings
|
||||
Enable all of keybindings which is specified on gconf database.
|
||||
Enable all of keybindings which is specified on gsettings database.
|
||||
.TP
|
||||
.B disable-keybindings
|
||||
Disable all of keybindings which is specified on gconf database.
|
||||
Disable all of keybindings which is specified on gsettings database.
|
||||
.SH SEE ALSO
|
||||
.BR mutter (1)
|
||||
.SH AUTHOR
|
||||
|
@ -51,7 +51,7 @@ Print the version number.
|
||||
.B \-?, \-\-help
|
||||
Show summary of options.
|
||||
.SH CONFIGURATION
|
||||
\fBmutter\fP configuration can be found under \fIPreferences\fP->\fIWindows\fP and \fIPreferences\fP->\fIKeyboard Shortcuts\fP on the menu-panel. Advanced configuration can be achieved directly through gconf editing (gconf-editor or gconftool-2).
|
||||
\fBmutter\fP configuration can be found under \fIPreferences\fP->\fIWindows\fP and \fIPreferences\fP->\fIKeyboard Shortcuts\fP on the menu-panel. Advanced configuration can be achieved directly through gsettings.
|
||||
.SH SEE ALSO
|
||||
.BR mutter-message (1)
|
||||
.SH AUTHOR
|
||||
|
@ -1,7 +1,7 @@
|
||||
# List of source files containing translatable strings.
|
||||
# Please keep this file sorted alphabetically.
|
||||
src/50-mutter-windows.xml.in
|
||||
src/compositor/compositor.c
|
||||
src/core/all-keybindings.h
|
||||
src/core/bell.c
|
||||
src/core/core.c
|
||||
src/core/delete.c
|
||||
@ -19,7 +19,7 @@ src/core/window-props.c
|
||||
src/core/xprops.c
|
||||
src/mutter.desktop.in
|
||||
src/mutter-wm.desktop.in
|
||||
src/mutter.schemas.in
|
||||
src/org.gnome.mutter.gschema.xml.in
|
||||
src/tools/mutter-message.c
|
||||
src/ui/frames.c
|
||||
src/ui/menu.c
|
||||
|
568
po/sr@latin.po
568
po/sr@latin.po
File diff suppressed because it is too large
Load Diff
15
src/50-mutter-windows.xml.in
Normal file
15
src/50-mutter-windows.xml.in
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<KeyListEntries schema="org.gnome.mutter.keybindings"
|
||||
group="system"
|
||||
_name="Windows"
|
||||
wm_name="Mutter"
|
||||
package="mutter">
|
||||
|
||||
<KeyListEntry name="toggle-tiled-left"
|
||||
_description="View split on left"/>
|
||||
|
||||
<KeyListEntry name="toggle-tiled-right"
|
||||
_description="View split on right"/>
|
||||
|
||||
</KeyListEntries>
|
||||
|
@ -27,8 +27,6 @@ INCLUDES= \
|
||||
-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"
|
||||
|
||||
mutter_built_sources = \
|
||||
mutter-marshal.h \
|
||||
mutter-marshal.c \
|
||||
mutter-enum-types.h \
|
||||
mutter-enum-types.c
|
||||
|
||||
@ -152,7 +150,6 @@ libmutter_la_SOURCES = \
|
||||
meta/theme.h \
|
||||
ui/theme-private.h \
|
||||
ui/ui.c \
|
||||
core/all-keybindings.h \
|
||||
meta/preview-widget.h \
|
||||
ui/preview-widget.c \
|
||||
$(mutter_built_sources)
|
||||
@ -226,7 +223,7 @@ typelib_DATA = Meta-$(api_version).typelib
|
||||
INTROSPECTION_GIRS = Meta-$(api_version).gir
|
||||
|
||||
Meta-$(api_version).gir: libmutter.la
|
||||
@META_GIR@_INCLUDES = GObject-2.0 Gdk-3.0 Gtk-3.0 Clutter-1.0 xlib-2.0 xfixes-4.0
|
||||
@META_GIR@_INCLUDES = GObject-2.0 GDesktopEnums-3.0 Gdk-3.0 Gtk-3.0 Clutter-1.0 xlib-2.0 xfixes-4.0
|
||||
@META_GIR@_PACKAGES = clutter-1.0 gtk+-3.0
|
||||
@META_GIR@_CFLAGS = $(INCLUDES)
|
||||
@META_GIR@_LIBS = libmutter.la
|
||||
@ -262,20 +259,17 @@ wmproperties_in_files=mutter-wm.desktop.in
|
||||
wmproperties_files=$(wmproperties_in_files:.desktop.in=.desktop)
|
||||
wmproperties_DATA = $(wmproperties_files)
|
||||
|
||||
schemadir = $(GCONF_SCHEMA_FILE_DIR)
|
||||
schema_in_files = mutter.schemas.in
|
||||
schema_DATA = $(schema_in_files:.schemas.in=.schemas)
|
||||
xmldir = @GNOME_KEYBINDINGS_KEYSDIR@
|
||||
xml_in_files = \
|
||||
50-mutter-windows.xml.in
|
||||
xml_DATA = $(xml_in_files:.xml.in=.xml)
|
||||
|
||||
gsettings_SCHEMAS = org.gnome.mutter.gschema.xml
|
||||
@INTLTOOL_XML_NOMERGE_RULE@
|
||||
@GSETTINGS_RULES@
|
||||
|
||||
@INTLTOOL_SCHEMAS_RULE@
|
||||
|
||||
if GCONF_SCHEMAS_INSTALL
|
||||
install-data-local:
|
||||
GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(schema_DATA)
|
||||
else
|
||||
install-data-local:
|
||||
endif
|
||||
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 \
|
||||
@ -287,7 +281,8 @@ CLEANFILES = \
|
||||
inlinepixbufs.h \
|
||||
mutter.desktop \
|
||||
mutter-wm.desktop \
|
||||
mutter.schemas \
|
||||
org.gnome.mutter.gschema.xml \
|
||||
$(xml_DATA) \
|
||||
$(mutter_built_sources) \
|
||||
$(typelib_DATA) \
|
||||
$(gir_DATA)
|
||||
@ -304,37 +299,18 @@ EXTRA_DIST=$(desktopfiles_files) \
|
||||
$(IMAGES) \
|
||||
$(desktopfiles_in_files) \
|
||||
$(wmproperties_in_files) \
|
||||
$(schema_in_files) \
|
||||
$(xml_in_files) \
|
||||
org.gnome.mutter.gschema.xml.in \
|
||||
mutter-schemas.convert \
|
||||
libmutter.pc.in \
|
||||
mutter-plugins.pc.in \
|
||||
mutter-enum-types.h.in \
|
||||
mutter-enum-types.c.in \
|
||||
mutter-marshal.list
|
||||
mutter-enum-types.c.in
|
||||
|
||||
BUILT_SOURCES += $(mutter_built_sources)
|
||||
MUTTER_STAMP_FILES = stamp-mutter-marshal.h stamp-mutter-enum-types.h
|
||||
MUTTER_STAMP_FILES = stamp-mutter-enum-types.h
|
||||
CLEANFILES += $(MUTTER_STAMP_FILES)
|
||||
|
||||
mutter-marshal.h: stamp-mutter-marshal.h
|
||||
@true
|
||||
stamp-mutter-marshal.h: Makefile mutter-marshal.list
|
||||
$(AM_V_GEN) $(GLIB_GENMARSHAL) \
|
||||
--prefix=_mutter_marshal \
|
||||
--header \
|
||||
$(srcdir)/mutter-marshal.list > xgen-tmh && \
|
||||
(cmp -s xgen-tmh mutter-marshal.h || cp -f xgen-tmh mutter-marshal.h) && \
|
||||
rm -f xgen-tmh && \
|
||||
echo timestamp > $(@F)
|
||||
|
||||
mutter-marshal.c: Makefile mutter-marshal.list
|
||||
$(AM_V_GEN) (echo "#include \"mutter-marshal.h\"" ; \
|
||||
$(GLIB_GENMARSHAL) \
|
||||
--prefix=_mutter_marshal \
|
||||
--body \
|
||||
$(srcdir)/mutter-marshal.list ) > xgen-tmc && \
|
||||
cp -f xgen-tmc mutter-marshal.c && \
|
||||
rm -f xgen-tmc
|
||||
|
||||
mutter-enum-types.h: stamp-mutter-enum-types.h Makefile
|
||||
@true
|
||||
stamp-mutter-enum-types.h: $(libmutterinclude_base_headers) mutter-enum-types.h.in
|
||||
|
@ -515,13 +515,15 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
|
||||
meta_screen_set_cm_selection (screen);
|
||||
|
||||
info->stage = clutter_stage_get_default ();
|
||||
info->stage = clutter_stage_new ();
|
||||
|
||||
meta_screen_get_size (screen, &width, &height);
|
||||
clutter_actor_set_size (info->stage, width, height);
|
||||
clutter_actor_realize (info->stage);
|
||||
|
||||
xwin = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage));
|
||||
|
||||
XResizeWindow (xdisplay, xwin, width, height);
|
||||
|
||||
event_mask = FocusChangeMask |
|
||||
ExposureMask |
|
||||
EnterWindowMask | LeaveWindowMask |
|
||||
@ -1139,12 +1141,18 @@ meta_compositor_sync_screen_size (MetaCompositor *compositor,
|
||||
guint width,
|
||||
guint height)
|
||||
{
|
||||
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
||||
MetaDisplay *display = meta_screen_get_display (screen);
|
||||
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
||||
Display *xdisplay;
|
||||
Window xwin;
|
||||
|
||||
DEBUG_TRACE ("meta_compositor_sync_screen_size\n");
|
||||
g_return_if_fail (info);
|
||||
|
||||
clutter_actor_set_size (info->stage, width, height);
|
||||
xdisplay = meta_display_get_xdisplay (display);
|
||||
xwin = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage));
|
||||
|
||||
XResizeWindow (xdisplay, xwin, width, height);
|
||||
|
||||
meta_background_actor_screen_size_changed (screen);
|
||||
|
||||
|
@ -360,7 +360,7 @@ meta_shadow_paint (MetaShadow *shadow,
|
||||
* @window_height: actual height of the region to paint a shadow for
|
||||
*
|
||||
* Computes the bounds of the pixels that will be affected by
|
||||
* meta_shadow_paints()
|
||||
* meta_shadow_paint()
|
||||
*/
|
||||
void
|
||||
meta_shadow_get_bounds (MetaShadow *shadow,
|
||||
@ -442,8 +442,7 @@ meta_shadow_factory_class_init (MetaShadowFactoryClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
|
@ -772,7 +772,7 @@ meta_shaped_texture_set_overlay_path (MetaShapedTexture *stex,
|
||||
|
||||
/**
|
||||
* meta_shaped_texture_set_clip_region:
|
||||
* @frame: a #TidyTextureframe
|
||||
* @frame: a #MetaShapedTexture
|
||||
* @clip_region: (transfer full): the region of the texture that
|
||||
* is visible and should be painted. OWNERSHIP IS ASSUMED BY
|
||||
* THE FUNCTION (for efficiency to avoid a copy.)
|
||||
|
@ -111,8 +111,8 @@ texture_is_rectangle (CoglHandle texture)
|
||||
#endif /* GL_TEXTURE_RECTANGLE_ARB */
|
||||
|
||||
/**
|
||||
* meta_texture_tower_update_area:
|
||||
* @tower: a MetaTextureTower
|
||||
* meta_texture_tower_set_base_texture:
|
||||
* @tower: a #MetaTextureTower
|
||||
* @texture: the new texture used as a base for scaled down versions
|
||||
*
|
||||
* Sets the base texture that is the scaled texture that the
|
||||
@ -175,7 +175,7 @@ meta_texture_tower_set_base_texture (MetaTextureTower *tower,
|
||||
|
||||
/**
|
||||
* meta_texture_tower_update_area:
|
||||
* @tower: a MetaTextureTower
|
||||
* @tower: a #MetaTextureTower
|
||||
* @x: X coordinate of upper left of rectangle that changed
|
||||
* @y: Y coordinate of upper left of rectangle that changed
|
||||
* @width: width of rectangle that changed
|
||||
@ -198,6 +198,9 @@ meta_texture_tower_update_area (MetaTextureTower *tower,
|
||||
|
||||
g_return_if_fail (tower != NULL);
|
||||
|
||||
if (tower->textures[0] == COGL_INVALID_HANDLE)
|
||||
return;
|
||||
|
||||
texture_width = cogl_texture_get_width (tower->textures[0]);
|
||||
texture_height = cogl_texture_get_height (tower->textures[0]);
|
||||
|
||||
@ -579,7 +582,7 @@ texture_tower_revalidate (MetaTextureTower *tower,
|
||||
|
||||
/**
|
||||
* meta_texture_tower_get_paint_texture:
|
||||
* @tower: a MetaTextureTower
|
||||
* @tower: a #MetaTextureTower
|
||||
*
|
||||
* Gets the texture from the tower that best matches the current
|
||||
* rendering scale. (On the assumption here the texture is going to
|
||||
|
@ -232,15 +232,13 @@ meta_window_actor_class_init (MetaWindowActorClass *klass)
|
||||
g_signal_new ("position-changed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0, NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
0, NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
signals[SIZE_CHANGED] =
|
||||
g_signal_new ("size-changed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0, NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
0, NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
@ -828,9 +826,9 @@ meta_window_actor_get_x_window (MetaWindowActor *self)
|
||||
/**
|
||||
* meta_window_actor_get_meta_window:
|
||||
*
|
||||
* Gets the MetaWindow object that the the MetaWindowActor is displaying
|
||||
* Gets the #MetaWindow object that the the #MetaWindowActor is displaying
|
||||
*
|
||||
* Return value: (transfer none): the displayed MetaWindow
|
||||
* Return value: (transfer none): the displayed #MetaWindow
|
||||
*/
|
||||
MetaWindow *
|
||||
meta_window_actor_get_meta_window (MetaWindowActor *self)
|
||||
@ -843,7 +841,7 @@ meta_window_actor_get_meta_window (MetaWindowActor *self)
|
||||
*
|
||||
* Gets the ClutterActor that is used to display the contents of the window
|
||||
*
|
||||
* Return value: (transfer none): the ClutterActor for the contents
|
||||
* Return value: (transfer none): the #ClutterActor for the contents
|
||||
*/
|
||||
ClutterActor *
|
||||
meta_window_actor_get_texture (MetaWindowActor *self)
|
||||
@ -958,6 +956,9 @@ meta_window_actor_damage_all (MetaWindowActor *self)
|
||||
"pixmap-height", &pixmap_height,
|
||||
NULL);
|
||||
|
||||
if (!priv->mapped || priv->needs_pixmap)
|
||||
return;
|
||||
|
||||
clutter_x11_texture_pixmap_update_area (texture_x11,
|
||||
0,
|
||||
0,
|
||||
@ -1217,8 +1218,9 @@ meta_window_actor_should_unredirect (MetaWindowActor *self)
|
||||
{
|
||||
MetaWindow *metaWindow = meta_window_actor_get_meta_window (self);
|
||||
MetaScreen *screen = meta_window_get_screen (metaWindow);
|
||||
MetaWindowActorPrivate *priv = self->priv;
|
||||
|
||||
if (meta_window_is_override_redirect (metaWindow) && self->priv->opacity == 0xff)
|
||||
if (meta_window_is_override_redirect (metaWindow) && priv->opacity == 0xff && !priv->argb32)
|
||||
{
|
||||
int screen_width, screen_height;
|
||||
MetaRectangle window_rect;
|
||||
@ -1251,19 +1253,24 @@ void
|
||||
meta_window_actor_set_redirected (MetaWindowActor *self, gboolean state)
|
||||
{
|
||||
MetaWindow *metaWindow = meta_window_actor_get_meta_window (self);
|
||||
MetaDisplay *display = meta_window_get_display (metaWindow);
|
||||
|
||||
Display *xdisplay = meta_display_get_xdisplay (meta_window_get_display (metaWindow));
|
||||
Display *xdisplay = meta_display_get_xdisplay (display);
|
||||
Window xwin = meta_window_actor_get_x_window (self);
|
||||
|
||||
if (state)
|
||||
{
|
||||
meta_error_trap_push (display);
|
||||
XCompositeRedirectWindow (xdisplay, xwin, CompositeRedirectManual);
|
||||
meta_error_trap_pop (display);
|
||||
meta_window_actor_queue_create_pixmap (self);
|
||||
self->priv->unredirected = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_error_trap_push (display);
|
||||
XCompositeUnredirectWindow (xdisplay, xwin, CompositeRedirectManual);
|
||||
meta_error_trap_pop (display);
|
||||
self->priv->unredirected = TRUE;
|
||||
}
|
||||
}
|
||||
@ -1804,7 +1811,7 @@ meta_window_actor_set_visible_region_beneath (MetaWindowActor *self,
|
||||
* @self: a #MetaWindowActor
|
||||
*
|
||||
* Unsets the regions set by meta_window_actor_reset_visible_region() and
|
||||
*meta_window_actor_reset_visible_region_beneath()
|
||||
* meta_window_actor_reset_visible_region_beneath()
|
||||
*/
|
||||
void
|
||||
meta_window_actor_reset_visible_regions (MetaWindowActor *self)
|
||||
@ -2028,6 +2035,8 @@ meta_window_actor_process_damage (MetaWindowActor *self,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!priv->mapped || priv->needs_pixmap)
|
||||
return;
|
||||
|
||||
clutter_x11_texture_pixmap_update_area (texture_x11,
|
||||
event->area.x,
|
||||
|
@ -101,6 +101,25 @@ actor_is_untransformed (ClutterActor *actor,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if CLUTTER_CHECK_VERSION(1, 9, 0)
|
||||
#define has_effects clutter_actor_has_effects
|
||||
#else
|
||||
|
||||
static gboolean
|
||||
has_effects(ClutterActor *actor)
|
||||
{
|
||||
GList *list;
|
||||
gboolean ret;
|
||||
|
||||
list = clutter_actor_get_effects (actor);
|
||||
ret = list != NULL;
|
||||
g_list_free (list);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
meta_window_group_paint (ClutterActor *actor)
|
||||
{
|
||||
@ -161,13 +180,13 @@ meta_window_group_paint (ClutterActor *actor)
|
||||
* as well for the same reason, but omitted for simplicity in the
|
||||
* hopes that no-one will do that.
|
||||
*/
|
||||
if (clutter_actor_get_effects (l->data) != NULL)
|
||||
if (has_effects (l->data))
|
||||
continue;
|
||||
|
||||
if (META_IS_WINDOW_ACTOR (l->data))
|
||||
{
|
||||
MetaWindowActor *window_actor = l->data;
|
||||
gboolean x, y;
|
||||
int x, y;
|
||||
|
||||
if (!actor_is_untransformed (CLUTTER_ACTOR (window_actor), &x, &y))
|
||||
continue;
|
||||
|
@ -1,400 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2008 Thomas Thurman
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* A list of screen keybinding information.
|
||||
*
|
||||
* Each action which can have a keystroke bound to it is listed below.
|
||||
* To use this file, define keybind() to be a seven-argument macro (you can
|
||||
* throw any of the arguments you please away), include this file,
|
||||
* and then undefine the macro again.
|
||||
*
|
||||
* (If you aren't familiar with this technique, sometimes called "x-macros",
|
||||
* see DDJ of May 2001: <http://www.ddj.com/cpp/184401387>.)
|
||||
*
|
||||
* This makes it possible to keep all information about all the keybindings
|
||||
* in the same place. The only exception is the code to run when an action
|
||||
* is actually invoked; while we *could* have put that in this file, it would
|
||||
* have made debugging ridiculously difficult. Instead, each action should
|
||||
* have a corresponding static function named handle_<name>() in
|
||||
* keybindings.c.
|
||||
*
|
||||
* The arguments to keybind() are:
|
||||
* 1) the name of the binding; a bareword identifier
|
||||
* (it's fine if it happens to clash with a C reserved word)
|
||||
* 2) the name of the function which implements it.
|
||||
* Clearly we could have guessed this from the binding very often,
|
||||
* but we choose to write it in full for the benefit of grep.
|
||||
* 3) an integer parameter to pass to the handler
|
||||
* 4) a set of boolean flags, ORed together:
|
||||
* BINDING_PER_WINDOW - this is a window-based binding.
|
||||
* It is only valid if there is a
|
||||
* current window, and will operate in
|
||||
* some way on that window.
|
||||
* BINDING_REVERSES - the binding can reverse if you hold down Shift
|
||||
* BINDING_IS_REVERSED - the same, but the senses are reversed from the
|
||||
* handler's point of view (let me know if I should
|
||||
* explain this better)
|
||||
* or 0 if no flag applies.
|
||||
*
|
||||
* 5) a string representing the default binding.
|
||||
* If this is NULL, the action is unbound by default.
|
||||
* Please use NULL and not "disabled".
|
||||
* 6) a short description.
|
||||
* It must be marked translatable (i.e. inside "_(...)").
|
||||
*
|
||||
* Don't try to do XML entity escaping anywhere in the strings.
|
||||
*/
|
||||
|
||||
#ifndef keybind
|
||||
#error "keybind () must be defined when you include screen-bindings.h"
|
||||
#endif
|
||||
|
||||
/***********************************/
|
||||
|
||||
#ifndef _BINDINGS_DEFINED_CONSTANTS
|
||||
#define _BINDINGS_DEFINED_CONSTANTS 1
|
||||
|
||||
#define BINDING_PER_WINDOW 0x01
|
||||
#define BINDING_REVERSES 0x02
|
||||
#define BINDING_IS_REVERSED 0x04
|
||||
|
||||
#endif /* _BINDINGS_DEFINED_CONSTANTS */
|
||||
|
||||
/***********************************/
|
||||
|
||||
/* convenience, since in this file they must always be set together */
|
||||
#define REVERSES_AND_REVERSED (BINDING_REVERSES | BINDING_IS_REVERSED)
|
||||
|
||||
keybind (switch_to_workspace_1, handle_switch_to_workspace, 0, 0, NULL,
|
||||
_("Switch to workspace 1"))
|
||||
keybind (switch_to_workspace_2, handle_switch_to_workspace, 1, 0, NULL,
|
||||
_("Switch to workspace 2"))
|
||||
keybind (switch_to_workspace_3, handle_switch_to_workspace, 2, 0, NULL,
|
||||
_("Switch to workspace 3"))
|
||||
keybind (switch_to_workspace_4, handle_switch_to_workspace, 3, 0, NULL,
|
||||
_("Switch to workspace 4"))
|
||||
keybind (switch_to_workspace_5, handle_switch_to_workspace, 4, 0, NULL,
|
||||
_("Switch to workspace 5"))
|
||||
keybind (switch_to_workspace_6, handle_switch_to_workspace, 5, 0, NULL,
|
||||
_("Switch to workspace 6"))
|
||||
keybind (switch_to_workspace_7, handle_switch_to_workspace, 6, 0, NULL,
|
||||
_("Switch to workspace 7"))
|
||||
keybind (switch_to_workspace_8, handle_switch_to_workspace, 7, 0, NULL,
|
||||
_("Switch to workspace 8"))
|
||||
keybind (switch_to_workspace_9, handle_switch_to_workspace, 8, 0, NULL,
|
||||
_("Switch to workspace 9"))
|
||||
keybind (switch_to_workspace_10, handle_switch_to_workspace, 9, 0, NULL,
|
||||
_("Switch to workspace 10"))
|
||||
keybind (switch_to_workspace_11, handle_switch_to_workspace, 10, 0, NULL,
|
||||
_("Switch to workspace 11"))
|
||||
keybind (switch_to_workspace_12, handle_switch_to_workspace, 11, 0, NULL,
|
||||
_("Switch to workspace 12"))
|
||||
|
||||
/* META_MOTION_* are negative, and so distinct from workspace numbers,
|
||||
* which are always zero or positive.
|
||||
* If you make use of these constants, you will need to include workspace.h
|
||||
* (which you're probably using already for other reasons anyway).
|
||||
* If your definition of keybind() throws them away, you don't need to include
|
||||
* workspace.h, of course.
|
||||
*/
|
||||
|
||||
keybind (switch_to_workspace_left, handle_switch_to_workspace,
|
||||
META_MOTION_LEFT, 0, "<Control><Alt>Left",
|
||||
_("Switch to workspace on the left of the current workspace"))
|
||||
|
||||
keybind (switch_to_workspace_right, handle_switch_to_workspace,
|
||||
META_MOTION_RIGHT, 0, "<Control><Alt>Right",
|
||||
_("Switch to workspace on the right of the current workspace"))
|
||||
|
||||
keybind (switch_to_workspace_up, handle_switch_to_workspace,
|
||||
META_MOTION_UP, 0, "<Control><Alt>Up",
|
||||
_("Switch to workspace above the current workspace"))
|
||||
|
||||
keybind (switch_to_workspace_down, handle_switch_to_workspace,
|
||||
META_MOTION_DOWN, 0, "<Control><Alt>Down",
|
||||
_("Switch to workspace below the current workspace"))
|
||||
|
||||
/***********************************/
|
||||
|
||||
/* The ones which have inverses. These can't be bound to any keystroke
|
||||
* containing Shift because Shift will invert their "backward" state.
|
||||
*
|
||||
* TODO: "NORMAL" and "DOCKS" should be renamed to the same name as their
|
||||
* action, for obviousness.
|
||||
*
|
||||
* TODO: handle_switch and handle_cycle should probably really be the
|
||||
* same function checking a bit in the parameter for difference.
|
||||
*/
|
||||
|
||||
keybind (switch_group, handle_switch, META_TAB_LIST_GROUP,
|
||||
BINDING_REVERSES, "<Alt>Above_Tab",
|
||||
_("Move between windows of an application, using a popup window"))
|
||||
keybind (switch_group_backward, handle_switch, META_TAB_LIST_GROUP,
|
||||
REVERSES_AND_REVERSED, NULL,
|
||||
_("Move backward between windows of an application, "
|
||||
"using a popup window"))
|
||||
keybind (switch_windows, handle_switch, META_TAB_LIST_NORMAL,
|
||||
BINDING_REVERSES, "<Alt>Tab",
|
||||
_("Move between windows, using a popup window"))
|
||||
keybind (switch_windows_backward, handle_switch, META_TAB_LIST_NORMAL,
|
||||
REVERSES_AND_REVERSED, NULL,
|
||||
_("Move backward between windows, using a popup window"))
|
||||
keybind (switch_panels, handle_switch, META_TAB_LIST_DOCKS,
|
||||
BINDING_REVERSES, "<Control><Alt>Tab",
|
||||
_("Move between panels and the desktop, using a popup window"))
|
||||
keybind (switch_panels_backward, handle_switch, META_TAB_LIST_DOCKS,
|
||||
REVERSES_AND_REVERSED, NULL,
|
||||
_("Move backward between panels and the desktop, "
|
||||
"using a popup window"))
|
||||
|
||||
keybind (cycle_group, handle_cycle, META_TAB_LIST_GROUP,
|
||||
BINDING_REVERSES, "<Alt>F6",
|
||||
_("Move between windows of an application immediately"))
|
||||
keybind (cycle_group_backward, handle_cycle, META_TAB_LIST_GROUP,
|
||||
REVERSES_AND_REVERSED, NULL,
|
||||
_("Move backward between windows of an application immediately"))
|
||||
keybind (cycle_windows, handle_cycle, META_TAB_LIST_NORMAL,
|
||||
BINDING_REVERSES, "<Alt>Escape",
|
||||
_("Move between windows immediately"))
|
||||
keybind (cycle_windows_backward, handle_cycle, META_TAB_LIST_NORMAL,
|
||||
REVERSES_AND_REVERSED, NULL,
|
||||
_("Move backward between windows immediately"))
|
||||
keybind (cycle_panels, handle_cycle, META_TAB_LIST_DOCKS,
|
||||
BINDING_REVERSES, "<Control><Alt>Escape",
|
||||
_("Move between panels and the desktop immediately"))
|
||||
keybind (cycle_panels_backward, handle_cycle, META_TAB_LIST_DOCKS,
|
||||
REVERSES_AND_REVERSED, NULL,
|
||||
_("Move backward between panels and the desktop immediately"))
|
||||
|
||||
/***********************************/
|
||||
|
||||
/* These two are special pseudo-bindings that are provided for allowing
|
||||
* custom handlers, but will never be bound to a key. While a tab
|
||||
* grab is in effect, they are invoked for releasing the primary modifier
|
||||
* or pressing some unbound key, respectively.
|
||||
*/
|
||||
keybind (tab_popup_select, handle_tab_popup_select, 0, 0, NULL,
|
||||
"Select window from tab popup")
|
||||
keybind (tab_popup_cancel, handle_tab_popup_cancel, 0, 0, NULL,
|
||||
"Cancel tab popup")
|
||||
|
||||
/***********************************/
|
||||
|
||||
keybind (show_desktop, handle_show_desktop, 0, 0, "<Control><Alt>d",
|
||||
_("Hide all normal windows and set focus to the desktop"))
|
||||
keybind (panel_main_menu, handle_panel,
|
||||
META_KEYBINDING_ACTION_PANEL_MAIN_MENU, 0, "<Alt>F1",
|
||||
_("Show the panel's main menu"))
|
||||
keybind (panel_run_dialog, handle_panel,
|
||||
META_KEYBINDING_ACTION_PANEL_RUN_DIALOG, 0, "<Alt>F2",
|
||||
_("Show the panel's \"Run Application\" dialog box"))
|
||||
keybind (toggle_recording, handle_toggle_recording, 0, 0, "<Control><Shift><Alt>r",
|
||||
_("Start or stop recording the session"))
|
||||
|
||||
/* Yes, the param is offset by one. Historical reasons. (Maybe worth fixing
|
||||
* at some point.) The description is NULL here because the stanza is
|
||||
* irregularly shaped in mutter.schemas.in. This will probably be fixed
|
||||
* as well.
|
||||
*/
|
||||
keybind (run_command_1, handle_run_command, 0, 0, NULL, NULL)
|
||||
keybind (run_command_2, handle_run_command, 1, 0, NULL, NULL)
|
||||
keybind (run_command_3, handle_run_command, 2, 0, NULL, NULL)
|
||||
keybind (run_command_4, handle_run_command, 3, 0, NULL, NULL)
|
||||
keybind (run_command_5, handle_run_command, 4, 0, NULL, NULL)
|
||||
keybind (run_command_6, handle_run_command, 5, 0, NULL, NULL)
|
||||
keybind (run_command_7, handle_run_command, 6, 0, NULL, NULL)
|
||||
keybind (run_command_8, handle_run_command, 7, 0, NULL, NULL)
|
||||
keybind (run_command_9, handle_run_command, 8, 0, NULL, NULL)
|
||||
keybind (run_command_10, handle_run_command, 9, 0, NULL, NULL)
|
||||
keybind (run_command_11, handle_run_command, 10, 0, NULL, NULL)
|
||||
keybind (run_command_12, handle_run_command, 11, 0, NULL, NULL)
|
||||
keybind (run_command_13, handle_run_command, 12, 0, NULL, NULL)
|
||||
keybind (run_command_14, handle_run_command, 13, 0, NULL, NULL)
|
||||
keybind (run_command_15, handle_run_command, 14, 0, NULL, NULL)
|
||||
keybind (run_command_16, handle_run_command, 15, 0, NULL, NULL)
|
||||
keybind (run_command_17, handle_run_command, 16, 0, NULL, NULL)
|
||||
keybind (run_command_18, handle_run_command, 17, 0, NULL, NULL)
|
||||
keybind (run_command_19, handle_run_command, 18, 0, NULL, NULL)
|
||||
keybind (run_command_20, handle_run_command, 19, 0, NULL, NULL)
|
||||
keybind (run_command_21, handle_run_command, 20, 0, NULL, NULL)
|
||||
keybind (run_command_22, handle_run_command, 21, 0, NULL, NULL)
|
||||
keybind (run_command_23, handle_run_command, 22, 0, NULL, NULL)
|
||||
keybind (run_command_24, handle_run_command, 23, 0, NULL, NULL)
|
||||
keybind (run_command_25, handle_run_command, 24, 0, NULL, NULL)
|
||||
keybind (run_command_26, handle_run_command, 25, 0, NULL, NULL)
|
||||
keybind (run_command_27, handle_run_command, 26, 0, NULL, NULL)
|
||||
keybind (run_command_28, handle_run_command, 27, 0, NULL, NULL)
|
||||
keybind (run_command_29, handle_run_command, 28, 0, NULL, NULL)
|
||||
keybind (run_command_30, handle_run_command, 29, 0, NULL, NULL)
|
||||
keybind (run_command_31, handle_run_command, 30, 0, NULL, NULL)
|
||||
keybind (run_command_32, handle_run_command, 31, 0, NULL, NULL)
|
||||
|
||||
keybind (run_command_screenshot, handle_run_command, 32, 0, "Print",
|
||||
_("Take a screenshot"))
|
||||
keybind (run_command_window_screenshot, handle_run_command, 33, 0,"<Alt>Print",
|
||||
_("Take a screenshot of a window"))
|
||||
|
||||
keybind (run_command_terminal, handle_run_terminal, 0, 0, NULL, _("Run a terminal"))
|
||||
|
||||
/* No description because this is undocumented */
|
||||
keybind (set_spew_mark, handle_set_spew_mark, 0, 0, NULL, NULL)
|
||||
|
||||
#undef REVERSES_AND_REVERSED
|
||||
|
||||
/************************ PER WINDOW BINDINGS ************************/
|
||||
|
||||
/* These take a window as an extra parameter; they have no effect
|
||||
* if no window is active.
|
||||
*/
|
||||
|
||||
keybind (activate_window_menu, handle_activate_window_menu, 0,
|
||||
BINDING_PER_WINDOW, "<Alt>space",
|
||||
_("Activate the window menu"))
|
||||
keybind (toggle_fullscreen, handle_toggle_fullscreen, 0, BINDING_PER_WINDOW,
|
||||
NULL,
|
||||
_("Toggle fullscreen mode"))
|
||||
keybind (toggle_maximized, handle_toggle_maximized, 0, BINDING_PER_WINDOW, "<Alt>F10",
|
||||
_("Toggle maximization state"))
|
||||
keybind (toggle_above, handle_toggle_above, 0, BINDING_PER_WINDOW, NULL,
|
||||
_("Toggle whether a window will always be visible over other windows"))
|
||||
keybind (maximize, handle_maximize, 0, BINDING_PER_WINDOW, NULL,
|
||||
_("Maximize window"))
|
||||
keybind (unmaximize, handle_unmaximize, 0, BINDING_PER_WINDOW, "<Alt>F5",
|
||||
_("Restore window"))
|
||||
keybind (toggle_shaded, handle_toggle_shaded, 0, BINDING_PER_WINDOW, NULL,
|
||||
_("Toggle shaded state"))
|
||||
keybind (minimize, handle_minimize, 0, BINDING_PER_WINDOW, "<Alt>F9",
|
||||
_("Minimize window"))
|
||||
keybind (close, handle_close, 0, BINDING_PER_WINDOW, "<Alt>F4",
|
||||
_("Close window"))
|
||||
keybind (begin_move, handle_begin_move, 0, BINDING_PER_WINDOW, "<Alt>F7",
|
||||
_("Move window"))
|
||||
keybind (begin_resize, handle_begin_resize, 0, BINDING_PER_WINDOW, "<Alt>F8",
|
||||
_("Resize window"))
|
||||
keybind (toggle_on_all_workspaces, handle_toggle_on_all_workspaces, 0,
|
||||
BINDING_PER_WINDOW, NULL,
|
||||
_("Toggle whether window is on all workspaces or just one"))
|
||||
|
||||
keybind (move_to_workspace_1, handle_move_to_workspace, 0, BINDING_PER_WINDOW,
|
||||
NULL,
|
||||
_("Move window to workspace 1"))
|
||||
keybind (move_to_workspace_2, handle_move_to_workspace, 1, BINDING_PER_WINDOW,
|
||||
NULL,
|
||||
_("Move window to workspace 2"))
|
||||
keybind (move_to_workspace_3, handle_move_to_workspace, 2, BINDING_PER_WINDOW,
|
||||
NULL,
|
||||
_("Move window to workspace 3"))
|
||||
keybind (move_to_workspace_4, handle_move_to_workspace, 3, BINDING_PER_WINDOW,
|
||||
NULL,
|
||||
_("Move window to workspace 4"))
|
||||
keybind (move_to_workspace_5, handle_move_to_workspace, 4, BINDING_PER_WINDOW,
|
||||
NULL,
|
||||
_("Move window to workspace 5"))
|
||||
keybind (move_to_workspace_6, handle_move_to_workspace, 5, BINDING_PER_WINDOW,
|
||||
NULL,
|
||||
_("Move window to workspace 6"))
|
||||
keybind (move_to_workspace_7, handle_move_to_workspace, 6, BINDING_PER_WINDOW,
|
||||
NULL,
|
||||
_("Move window to workspace 7"))
|
||||
keybind (move_to_workspace_8, handle_move_to_workspace, 7, BINDING_PER_WINDOW,
|
||||
NULL,
|
||||
_("Move window to workspace 8"))
|
||||
keybind (move_to_workspace_9, handle_move_to_workspace, 8, BINDING_PER_WINDOW,
|
||||
NULL,
|
||||
_("Move window to workspace 9"))
|
||||
keybind (move_to_workspace_10, handle_move_to_workspace, 9, BINDING_PER_WINDOW,
|
||||
NULL,
|
||||
_("Move window to workspace 10"))
|
||||
keybind (move_to_workspace_11, handle_move_to_workspace, 10, BINDING_PER_WINDOW,
|
||||
NULL,
|
||||
_("Move window to workspace 11"))
|
||||
keybind (move_to_workspace_12, handle_move_to_workspace, 11, BINDING_PER_WINDOW,
|
||||
NULL,
|
||||
_("Move window to workspace 12"))
|
||||
|
||||
/* META_MOTION_* are negative, and so distinct from workspace numbers,
|
||||
* which are always zero or positive.
|
||||
* If you make use of these constants, you will need to include workspace.h
|
||||
* (which you're probably using already for other reasons anyway).
|
||||
* If your definition of keybind() throws them away, you don't need to include
|
||||
* workspace.h, of course.
|
||||
*/
|
||||
|
||||
keybind (move_to_workspace_left, handle_move_to_workspace,
|
||||
META_MOTION_LEFT, BINDING_PER_WINDOW, "<Control><Shift><Alt>Left",
|
||||
_("Move window one workspace to the left"))
|
||||
keybind (move_to_workspace_right, handle_move_to_workspace,
|
||||
META_MOTION_RIGHT, BINDING_PER_WINDOW, "<Control><Shift><Alt>Right",
|
||||
_("Move window one workspace to the right"))
|
||||
keybind (move_to_workspace_up, handle_move_to_workspace,
|
||||
META_MOTION_UP, BINDING_PER_WINDOW, "<Control><Shift><Alt>Up",
|
||||
_("Move window one workspace up"))
|
||||
keybind (move_to_workspace_down, handle_move_to_workspace,
|
||||
META_MOTION_DOWN, BINDING_PER_WINDOW, "<Control><Shift><Alt>Down",
|
||||
_("Move window one workspace down"))
|
||||
|
||||
keybind (raise_or_lower, handle_raise_or_lower, 0, BINDING_PER_WINDOW, NULL,
|
||||
_("Raise window if it's covered by another window, otherwise lower it"))
|
||||
keybind (raise, handle_raise, 0, BINDING_PER_WINDOW, NULL,
|
||||
_("Raise window above other windows"))
|
||||
keybind (lower, handle_lower, 0, BINDING_PER_WINDOW, NULL,
|
||||
_("Lower window below other windows"))
|
||||
|
||||
keybind (maximize_vertically, handle_maximize_vertically, 0,
|
||||
BINDING_PER_WINDOW, NULL,
|
||||
_("Maximize window vertically"))
|
||||
|
||||
keybind (maximize_horizontally, handle_maximize_horizontally, 0,
|
||||
BINDING_PER_WINDOW, NULL,
|
||||
_("Maximize window horizontally"))
|
||||
|
||||
keybind (move_to_corner_nw, handle_move_to_corner_nw, 0,
|
||||
BINDING_PER_WINDOW, NULL,
|
||||
_("Move window to north-west (top left) corner"))
|
||||
keybind (move_to_corner_ne, handle_move_to_corner_ne, 0,
|
||||
BINDING_PER_WINDOW, NULL,
|
||||
_("Move window to north-east (top right) corner"))
|
||||
keybind (move_to_corner_sw, handle_move_to_corner_sw, 0,
|
||||
BINDING_PER_WINDOW, NULL,
|
||||
_("Move window to south-west (bottom left) corner"))
|
||||
keybind (move_to_corner_se, handle_move_to_corner_se, 0,
|
||||
BINDING_PER_WINDOW, NULL,
|
||||
_("Move window to south-east (bottom right) corner"))
|
||||
|
||||
keybind (move_to_side_n, handle_move_to_side_n, 0,
|
||||
BINDING_PER_WINDOW, NULL,
|
||||
_("Move window to north (top) side of screen"))
|
||||
keybind (move_to_side_s, handle_move_to_side_s, 0,
|
||||
BINDING_PER_WINDOW, NULL,
|
||||
_("Move window to south (bottom) side of screen"))
|
||||
keybind (move_to_side_e, handle_move_to_side_e, 0,
|
||||
BINDING_PER_WINDOW, NULL,
|
||||
_("Move window to east (right) side of screen"))
|
||||
keybind (move_to_side_w, handle_move_to_side_w, 0,
|
||||
BINDING_PER_WINDOW, NULL,
|
||||
_("Move window to west (left) side of screen"))
|
||||
keybind (move_to_center, handle_move_to_center, 0,
|
||||
BINDING_PER_WINDOW, NULL,
|
||||
_("Move window to center of screen"))
|
||||
|
||||
/* eof all-keybindings.h */
|
||||
|
@ -130,7 +130,7 @@ bell_flash_screen (MetaDisplay *display,
|
||||
XFreeGC (display->xdisplay, gc);
|
||||
}
|
||||
|
||||
if (meta_prefs_get_focus_mode () != META_FOCUS_MODE_CLICK &&
|
||||
if (meta_prefs_get_focus_mode () != G_DESKTOP_FOCUS_MODE_CLICK &&
|
||||
!display->mouse_mode)
|
||||
meta_display_increment_focus_sentinel (display);
|
||||
XFlush (display->xdisplay);
|
||||
@ -277,15 +277,12 @@ bell_visual_notify (MetaDisplay *display,
|
||||
{
|
||||
switch (meta_prefs_get_visual_bell_type ())
|
||||
{
|
||||
case META_VISUAL_BELL_FULLSCREEN_FLASH:
|
||||
case G_DESKTOP_VISUAL_BELL_FULLSCREEN_FLASH:
|
||||
bell_flash_fullscreen (display, xkb_ev);
|
||||
break;
|
||||
case META_VISUAL_BELL_FRAME_FLASH:
|
||||
case G_DESKTOP_VISUAL_BELL_FRAME_FLASH:
|
||||
bell_flash_frame (display, xkb_ev); /* does nothing yet */
|
||||
break;
|
||||
case META_VISUAL_BELL_INVALID:
|
||||
/* do nothing */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -294,7 +291,7 @@ meta_bell_notify (MetaDisplay *display,
|
||||
XkbAnyEvent *xkb_ev)
|
||||
{
|
||||
/* flash something */
|
||||
if (meta_prefs_get_visual_bell ())
|
||||
if (meta_prefs_get_visual_bell ())
|
||||
bell_visual_notify (display, xkb_ev);
|
||||
|
||||
#ifdef HAVE_LIBCANBERRA
|
||||
|
@ -439,9 +439,13 @@ setup_constraint_info (ConstraintInfo *info,
|
||||
monitor_info->number);
|
||||
|
||||
/* Workaround braindead legacy apps that don't know how to
|
||||
* fullscreen themselves properly.
|
||||
* fullscreen themselves properly - don't get fooled by
|
||||
* 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 &&
|
||||
meta_rectangle_equal (new, &monitor_info->rect) &&
|
||||
window->has_fullscreen_func &&
|
||||
!window->fullscreen)
|
||||
@ -805,8 +809,14 @@ constrain_maximization (MetaWindow *window,
|
||||
return TRUE;
|
||||
|
||||
/* Calculate target_size = maximized size of (window + frame) */
|
||||
if (window->maximized_horizontally && window->maximized_vertically)
|
||||
target_size = info->work_area_monitor;
|
||||
if (META_WINDOW_TILED_MAXIMIZED (window))
|
||||
{
|
||||
meta_window_get_current_tile_area (window, &target_size);
|
||||
}
|
||||
else if (META_WINDOW_MAXIMIZED (window))
|
||||
{
|
||||
target_size = info->work_area_monitor;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Amount of maximization possible in a single direction depends
|
||||
|
@ -212,7 +212,7 @@ lower_window_and_transients (MetaWindow *window,
|
||||
|
||||
meta_window_foreach_transient (window, lower_window_and_transients, NULL);
|
||||
|
||||
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK &&
|
||||
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK &&
|
||||
meta_prefs_get_raise_on_click ())
|
||||
{
|
||||
/* Move window to the back of the focusing workspace's MRU list.
|
||||
@ -538,70 +538,70 @@ meta_core_get_menu_accelerator (MetaMenuOp menu_op,
|
||||
break;
|
||||
case META_MENU_OP_UNSTICK:
|
||||
case META_MENU_OP_STICK:
|
||||
name = "toggle_on_all_workspaces";
|
||||
name = "toggle-on-all-workspaces";
|
||||
break;
|
||||
case META_MENU_OP_ABOVE:
|
||||
case META_MENU_OP_UNABOVE:
|
||||
name = "toggle_above";
|
||||
name = "toggle-above";
|
||||
break;
|
||||
case META_MENU_OP_WORKSPACES:
|
||||
switch (workspace)
|
||||
{
|
||||
case 1:
|
||||
name = "move_to_workspace_1";
|
||||
name = "move-to-workspace-1";
|
||||
break;
|
||||
case 2:
|
||||
name = "move_to_workspace_2";
|
||||
name = "move-to-workspace-2";
|
||||
break;
|
||||
case 3:
|
||||
name = "move_to_workspace_3";
|
||||
name = "move-to-workspace-3";
|
||||
break;
|
||||
case 4:
|
||||
name = "move_to_workspace_4";
|
||||
name = "move-to-workspace-4";
|
||||
break;
|
||||
case 5:
|
||||
name = "move_to_workspace_5";
|
||||
name = "move-to-workspace-5";
|
||||
break;
|
||||
case 6:
|
||||
name = "move_to_workspace_6";
|
||||
name = "move-to-workspace-6";
|
||||
break;
|
||||
case 7:
|
||||
name = "move_to_workspace_7";
|
||||
name = "move-to-workspace-7";
|
||||
break;
|
||||
case 8:
|
||||
name = "move_to_workspace_8";
|
||||
name = "move-to-workspace-8";
|
||||
break;
|
||||
case 9:
|
||||
name = "move_to_workspace_9";
|
||||
name = "move-to-workspace-9";
|
||||
break;
|
||||
case 10:
|
||||
name = "move_to_workspace_10";
|
||||
name = "move-to-workspace-10";
|
||||
break;
|
||||
case 11:
|
||||
name = "move_to_workspace_11";
|
||||
name = "move-to-workspace-11";
|
||||
break;
|
||||
case 12:
|
||||
name = "move_to_workspace_12";
|
||||
name = "move-to-workspace-12";
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case META_MENU_OP_MOVE:
|
||||
name = "begin_move";
|
||||
name = "begin-move";
|
||||
break;
|
||||
case META_MENU_OP_RESIZE:
|
||||
name = "begin_resize";
|
||||
name = "begin-resize";
|
||||
break;
|
||||
case META_MENU_OP_MOVE_LEFT:
|
||||
name = "move_to_workspace_left";
|
||||
name = "move-to-workspace-left";
|
||||
break;
|
||||
case META_MENU_OP_MOVE_RIGHT:
|
||||
name = "move_to_workspace_right";
|
||||
name = "move-to-workspace-right";
|
||||
break;
|
||||
case META_MENU_OP_MOVE_UP:
|
||||
name = "move_to_workspace_up";
|
||||
name = "move-to-workspace-up";
|
||||
break;
|
||||
case META_MENU_OP_MOVE_DOWN:
|
||||
name = "move_to_workspace_down";
|
||||
name = "move-to-workspace-down";
|
||||
break;
|
||||
case META_MENU_OP_RECOVER:
|
||||
/* No keybinding for this one */
|
||||
|
@ -189,6 +189,7 @@ struct _MetaDisplay
|
||||
int grab_anchor_root_y;
|
||||
MetaRectangle grab_anchor_window_pos;
|
||||
MetaTileMode grab_tile_mode;
|
||||
int grab_tile_monitor_number;
|
||||
int grab_latest_motion_x;
|
||||
int grab_latest_motion_y;
|
||||
gulong grab_mask;
|
||||
@ -343,10 +344,6 @@ MetaScreen* meta_display_screen_for_xwindow (MetaDisplay *display,
|
||||
void meta_display_grab (MetaDisplay *display);
|
||||
void meta_display_ungrab (MetaDisplay *display);
|
||||
|
||||
void meta_display_unmanage_screen (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
guint32 timestamp);
|
||||
|
||||
void meta_display_unmanage_windows_for_screen (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
guint32 timestamp);
|
||||
|
@ -230,8 +230,7 @@ meta_display_class_init (MetaDisplayClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
display_signals[WINDOW_CREATED] =
|
||||
@ -239,8 +238,7 @@ meta_display_class_init (MetaDisplayClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1, META_TYPE_WINDOW);
|
||||
|
||||
display_signals[WINDOW_DEMANDS_ATTENTION] =
|
||||
@ -248,8 +246,7 @@ meta_display_class_init (MetaDisplayClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1, META_TYPE_WINDOW);
|
||||
|
||||
display_signals[WINDOW_MARKED_URGENT] =
|
||||
@ -257,8 +254,7 @@ meta_display_class_init (MetaDisplayClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
META_TYPE_WINDOW);
|
||||
|
||||
@ -554,6 +550,7 @@ meta_display_open (void)
|
||||
the_display->grab_screen = NULL;
|
||||
the_display->grab_resize_popup = NULL;
|
||||
the_display->grab_tile_mode = META_TILE_NONE;
|
||||
the_display->grab_tile_monitor_number = -1;
|
||||
|
||||
the_display->grab_edge_resistance_data = NULL;
|
||||
|
||||
@ -1920,7 +1917,7 @@ event_callback (XEvent *event,
|
||||
* in application-based mode, and the different
|
||||
* app is not a dock or desktop, eat the focus click.
|
||||
*/
|
||||
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK &&
|
||||
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK &&
|
||||
meta_prefs_get_application_based () &&
|
||||
!window->has_focus &&
|
||||
window->type != META_WINDOW_DOCK &&
|
||||
@ -2008,8 +2005,8 @@ event_callback (XEvent *event,
|
||||
{
|
||||
switch (meta_prefs_get_focus_mode ())
|
||||
{
|
||||
case META_FOCUS_MODE_SLOPPY:
|
||||
case META_FOCUS_MODE_MOUSE:
|
||||
case G_DESKTOP_FOCUS_MODE_SLOPPY:
|
||||
case G_DESKTOP_FOCUS_MODE_MOUSE:
|
||||
display->mouse_mode = TRUE;
|
||||
if (window->type != META_WINDOW_DOCK &&
|
||||
window->type != META_WINDOW_DESKTOP)
|
||||
@ -2047,7 +2044,7 @@ event_callback (XEvent *event,
|
||||
* alternative mechanism works great.
|
||||
*/
|
||||
if (window->type == META_WINDOW_DESKTOP &&
|
||||
meta_prefs_get_focus_mode() == META_FOCUS_MODE_MOUSE &&
|
||||
meta_prefs_get_focus_mode() == G_DESKTOP_FOCUS_MODE_MOUSE &&
|
||||
display->expected_focus_window != NULL)
|
||||
{
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
@ -2059,7 +2056,7 @@ event_callback (XEvent *event,
|
||||
event->xcrossing.time);
|
||||
}
|
||||
break;
|
||||
case META_FOCUS_MODE_CLICK:
|
||||
case G_DESKTOP_FOCUS_MODE_CLICK:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -3558,7 +3555,7 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
||||
meta_display_set_grab_op_cursor (display, screen, op, FALSE, grab_xwindow,
|
||||
timestamp);
|
||||
|
||||
if (!display->grab_have_pointer)
|
||||
if (!display->grab_have_pointer && !grab_op_is_keyboard (op))
|
||||
{
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"XGrabPointer() failed\n");
|
||||
@ -3593,9 +3590,15 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
||||
display->grab_button = button;
|
||||
display->grab_mask = modmask;
|
||||
if (window)
|
||||
display->grab_tile_mode = window->tile_mode;
|
||||
{
|
||||
display->grab_tile_mode = window->tile_mode;
|
||||
display->grab_tile_monitor_number = window->tile_monitor_number;
|
||||
}
|
||||
else
|
||||
display->grab_tile_mode = META_TILE_NONE;
|
||||
{
|
||||
display->grab_tile_mode = META_TILE_NONE;
|
||||
display->grab_tile_monitor_number = -1;
|
||||
}
|
||||
display->grab_anchor_root_x = root_x;
|
||||
display->grab_anchor_root_y = root_y;
|
||||
display->grab_latest_motion_x = root_x;
|
||||
@ -3793,6 +3796,7 @@ meta_display_end_grab_op (MetaDisplay *display,
|
||||
display->grab_screen = NULL;
|
||||
display->grab_xwindow = None;
|
||||
display->grab_tile_mode = META_TILE_NONE;
|
||||
display->grab_tile_monitor_number = -1;
|
||||
display->grab_op = META_GRAB_OP_NONE;
|
||||
|
||||
if (display->grab_resize_popup)
|
||||
@ -3995,7 +3999,7 @@ meta_display_grab_focus_window_button (MetaDisplay *display,
|
||||
* focus window may not be raised, and who wants to think about
|
||||
* mouse focus anyway.
|
||||
*/
|
||||
if (meta_prefs_get_focus_mode () != META_FOCUS_MODE_CLICK)
|
||||
if (meta_prefs_get_focus_mode () != G_DESKTOP_FOCUS_MODE_CLICK)
|
||||
{
|
||||
meta_verbose (" (well, not grabbing since not in click to focus mode)\n");
|
||||
return;
|
||||
|
@ -173,6 +173,7 @@ void
|
||||
meta_window_destroy_frame (MetaWindow *window)
|
||||
{
|
||||
MetaFrame *frame;
|
||||
MetaFrameBorders borders;
|
||||
|
||||
if (window->frame == NULL)
|
||||
return;
|
||||
@ -180,6 +181,8 @@ meta_window_destroy_frame (MetaWindow *window)
|
||||
meta_verbose ("Unframing window %s\n", window->desc);
|
||||
|
||||
frame = window->frame;
|
||||
|
||||
meta_frame_calc_borders (frame, &borders);
|
||||
|
||||
meta_bell_notify_frame_destroy (frame);
|
||||
|
||||
@ -207,8 +210,8 @@ meta_window_destroy_frame (MetaWindow *window)
|
||||
* coordinates here means we'll need to ensure a configure
|
||||
* notify event is sent; see bug 399552.
|
||||
*/
|
||||
window->frame->rect.x,
|
||||
window->frame->rect.y);
|
||||
window->frame->rect.x + borders.invisible.left,
|
||||
window->frame->rect.y + borders.invisible.top);
|
||||
meta_error_trap_pop (window->display);
|
||||
|
||||
meta_ui_destroy_frame_window (window->screen->ui, frame->xwindow);
|
||||
@ -217,6 +220,11 @@ meta_window_destroy_frame (MetaWindow *window)
|
||||
frame->xwindow);
|
||||
|
||||
window->frame = NULL;
|
||||
if (window->frame_bounds)
|
||||
{
|
||||
cairo_region_destroy (window->frame_bounds);
|
||||
window->frame_bounds = NULL;
|
||||
}
|
||||
|
||||
/* Move keybindings to window instead of frame */
|
||||
meta_window_grab_keys (window);
|
||||
|
@ -31,6 +31,26 @@
|
||||
|
||||
#include <meta/keybindings.h>
|
||||
|
||||
struct _MetaKeyHandler
|
||||
{
|
||||
char *name;
|
||||
MetaKeyHandlerFunc func;
|
||||
MetaKeyHandlerFunc default_func;
|
||||
gint data, flags;
|
||||
gpointer user_data;
|
||||
GDestroyNotify user_data_free_func;
|
||||
};
|
||||
|
||||
struct _MetaKeyBinding
|
||||
{
|
||||
const char *name;
|
||||
KeySym keysym;
|
||||
KeyCode keycode;
|
||||
unsigned int mask;
|
||||
MetaVirtualModifier modifiers;
|
||||
MetaKeyHandler *handler;
|
||||
};
|
||||
|
||||
void meta_display_init_keys (MetaDisplay *display);
|
||||
void meta_display_shutdown_keys (MetaDisplay *display);
|
||||
void meta_screen_grab_keys (MetaScreen *screen);
|
||||
@ -52,6 +72,14 @@ void meta_set_keybindings_disabled (gboolean setting);
|
||||
void meta_display_process_mapping_event (MetaDisplay *display,
|
||||
XEvent *event);
|
||||
|
||||
gboolean meta_prefs_add_keybinding (const char *name,
|
||||
const char *schema,
|
||||
MetaKeyBindingAction action,
|
||||
MetaKeyBindingFlags flags);
|
||||
|
||||
gboolean meta_prefs_remove_keybinding (const char *name);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -25,9 +25,7 @@
|
||||
|
||||
#include <meta/main.h>
|
||||
#include <meta/util.h>
|
||||
#ifdef HAVE_INTROSPECTION
|
||||
#include "meta-plugin-manager.h"
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
|
2563
src/core/prefs.c
2563
src/core/prefs.c
File diff suppressed because it is too large
Load Diff
@ -39,7 +39,6 @@
|
||||
#include "stack.h"
|
||||
#include "xprops.h"
|
||||
#include <meta/compositor.h>
|
||||
#include "mutter-marshal.h"
|
||||
#include "mutter-enum-types.h"
|
||||
|
||||
#ifdef HAVE_SOLARIS_XINERAMA
|
||||
@ -162,8 +161,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaScreenClass, restacked),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
pspec = g_param_spec_int ("n-workspaces",
|
||||
@ -177,8 +175,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__INT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
G_TYPE_INT);
|
||||
@ -188,8 +185,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__INT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
G_TYPE_INT);
|
||||
@ -199,8 +195,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
_mutter_marshal_VOID__INT_INT_ENUM,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE,
|
||||
3,
|
||||
G_TYPE_INT,
|
||||
@ -212,8 +207,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
_mutter_marshal_VOID__INT_OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 2,
|
||||
G_TYPE_INT,
|
||||
META_TYPE_WINDOW);
|
||||
@ -223,8 +217,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
_mutter_marshal_VOID__INT_OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 2,
|
||||
G_TYPE_INT,
|
||||
META_TYPE_WINDOW);
|
||||
@ -234,8 +227,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__POINTER,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
||||
|
||||
screen_signals[TOGGLE_RECORDING] =
|
||||
@ -243,8 +235,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
screen_signals[WORKAREAS_CHANGED] =
|
||||
@ -252,8 +243,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaScreenClass, workareas_changed),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
screen_signals[MONITORS_CHANGED] =
|
||||
@ -261,8 +251,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaScreenClass, monitors_changed),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
@ -1186,7 +1175,7 @@ prefs_changed_callback (MetaPreference pref,
|
||||
|
||||
if (pref == META_PREF_NUM_WORKSPACES)
|
||||
{
|
||||
/* GConf doesn't provide timestamps, but luckily update_num_workspaces
|
||||
/* GSettings doesn't provide timestamps, but luckily update_num_workspaces
|
||||
* often doesn't need it...
|
||||
*/
|
||||
guint32 timestamp =
|
||||
@ -1565,7 +1554,7 @@ static void
|
||||
update_num_workspaces (MetaScreen *screen,
|
||||
guint32 timestamp)
|
||||
{
|
||||
int new_num;
|
||||
int new_num, old_num;
|
||||
GList *tmp;
|
||||
int i;
|
||||
GList *extras;
|
||||
@ -1595,6 +1584,7 @@ update_num_workspaces (MetaScreen *screen,
|
||||
++i;
|
||||
tmp = tmp->next;
|
||||
}
|
||||
old_num = i;
|
||||
|
||||
g_assert (last_remaining);
|
||||
|
||||
@ -1629,22 +1619,22 @@ update_num_workspaces (MetaScreen *screen,
|
||||
|
||||
g_assert (w->windows == NULL);
|
||||
meta_workspace_remove (w);
|
||||
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
|
||||
g_list_free (extras);
|
||||
|
||||
while (i < new_num)
|
||||
{
|
||||
meta_workspace_new (screen);
|
||||
++i;
|
||||
}
|
||||
|
||||
for (i = old_num; i < new_num; i++)
|
||||
meta_workspace_new (screen);
|
||||
|
||||
set_number_of_spaces_hint (screen, new_num);
|
||||
|
||||
meta_screen_queue_workarea_recalc (screen);
|
||||
|
||||
for (i = old_num; i < new_num; i++)
|
||||
g_signal_emit (screen, screen_signals[WORKSPACE_ADDED], 0, i);
|
||||
|
||||
g_object_notify (G_OBJECT (screen), "n-workspaces");
|
||||
}
|
||||
|
||||
@ -3490,6 +3480,14 @@ meta_screen_get_xroot (MetaScreen *screen)
|
||||
return screen->xroot;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_screen_get_size:
|
||||
* @screen: A #MetaScreen
|
||||
* @width: (out): The width of the screen
|
||||
* @height: (out): The height of the screen
|
||||
*
|
||||
* Retrieve the size of the screen.
|
||||
*/
|
||||
void
|
||||
meta_screen_get_size (MetaScreen *screen,
|
||||
int *width,
|
||||
|
@ -916,7 +916,7 @@ meta_later_remove (guint later_id)
|
||||
MetaLater *later = l->data;
|
||||
if (later->id == later_id)
|
||||
{
|
||||
laters = g_slist_remove_link (laters, l);
|
||||
laters = g_slist_delete_link (laters, l);
|
||||
/* If this was a "repaint func" later, we just let the
|
||||
* repaint func run and get removed
|
||||
*/
|
||||
|
@ -97,10 +97,15 @@ struct _MetaWindow
|
||||
char *role;
|
||||
char *sm_client_id;
|
||||
char *wm_client_machine;
|
||||
|
||||
char *startup_id;
|
||||
char *mutter_hints;
|
||||
char *gtk_theme_variant;
|
||||
char *dbus_application_id;
|
||||
char *dbus_unique_name;
|
||||
char *dbus_object_path;
|
||||
|
||||
int hide_titlebar_when_maximized;
|
||||
int net_wm_pid;
|
||||
|
||||
Window xtransient_for;
|
||||
@ -129,6 +134,10 @@ struct _MetaWindow
|
||||
* this is the current mode. If not, it is the mode which will be
|
||||
* requested after the window grab is released */
|
||||
guint tile_mode : 2;
|
||||
/* The last "full" maximized/unmaximized state. We need to keep track of
|
||||
* that to toggle between normal/tiled or maximized/tiled states. */
|
||||
guint saved_maximize : 1;
|
||||
int tile_monitor_number;
|
||||
|
||||
/* Whether we're shaded */
|
||||
guint shaded : 1;
|
||||
@ -425,6 +434,8 @@ struct _MetaWindowClass
|
||||
(w)->tile_mode == META_TILE_LEFT)
|
||||
#define META_WINDOW_TILED_RIGHT(w) (META_WINDOW_TILED_SIDE_BY_SIDE(w) && \
|
||||
(w)->tile_mode == META_TILE_RIGHT)
|
||||
#define META_WINDOW_TILED_MAXIMIZED(w)(META_WINDOW_MAXIMIZED(w) && \
|
||||
(w)->tile_mode == META_TILE_MAXIMIZED)
|
||||
#define META_WINDOW_ALLOWS_MOVE(w) ((w)->has_move_func && !(w)->fullscreen)
|
||||
#define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w) ((w)->has_resize_func && !META_WINDOW_MAXIMIZED (w) && !META_WINDOW_TILED_SIDE_BY_SIDE(w) && !(w)->fullscreen && !(w)->shaded)
|
||||
#define META_WINDOW_ALLOWS_RESIZE(w) (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) && \
|
||||
@ -647,5 +658,6 @@ void meta_window_propagate_focus_appearance (MetaWindow *window,
|
||||
gboolean focused);
|
||||
|
||||
gboolean meta_window_should_attach_to_parent (MetaWindow *window);
|
||||
gboolean meta_window_can_tile_side_by_side (MetaWindow *window);
|
||||
|
||||
#endif
|
||||
|
@ -1578,20 +1578,111 @@ reload_gtk_theme_variant (MetaWindow *window,
|
||||
requested_variant, window->desc);
|
||||
}
|
||||
|
||||
if (g_strcmp0 (requested_variant, current_variant))
|
||||
if (g_strcmp0 (requested_variant, current_variant) != 0)
|
||||
{
|
||||
g_free (current_variant);
|
||||
|
||||
if (requested_variant)
|
||||
window->gtk_theme_variant = g_strdup (requested_variant);
|
||||
else
|
||||
window->gtk_theme_variant = NULL;
|
||||
window->gtk_theme_variant = g_strdup (requested_variant);
|
||||
|
||||
if (window->frame)
|
||||
meta_ui_update_frame_style (window->screen->ui, window->frame->xwindow);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
reload_gtk_hide_titlebar_when_maximized (MetaWindow *window,
|
||||
MetaPropValue *value,
|
||||
gboolean initial)
|
||||
{
|
||||
gboolean requested_value = FALSE;
|
||||
gboolean current_value = window->hide_titlebar_when_maximized;
|
||||
|
||||
if (value->type != META_PROP_VALUE_INVALID)
|
||||
{
|
||||
requested_value = ((int) value->v.cardinal == 1);
|
||||
meta_verbose ("Request to hide titlebar for window %s.\n", window->desc);
|
||||
}
|
||||
|
||||
if (requested_value == current_value)
|
||||
return;
|
||||
|
||||
window->hide_titlebar_when_maximized = requested_value;
|
||||
|
||||
if (META_WINDOW_MAXIMIZED (window))
|
||||
{
|
||||
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
|
||||
|
||||
if (window->frame)
|
||||
meta_ui_update_frame_style (window->screen->ui, window->frame->xwindow);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
reload_dbus_application_id (MetaWindow *window,
|
||||
MetaPropValue *value,
|
||||
gboolean initial)
|
||||
{
|
||||
char *new_id = NULL;
|
||||
char *current_id = window->dbus_application_id;
|
||||
|
||||
if (value->type != META_PROP_VALUE_INVALID)
|
||||
new_id = value->v.str;
|
||||
|
||||
if (g_strcmp0 (new_id, current_id) != 0)
|
||||
{
|
||||
g_free (current_id);
|
||||
|
||||
if (new_id)
|
||||
window->dbus_application_id = g_strdup (new_id);
|
||||
else
|
||||
window->dbus_application_id = NULL;
|
||||
|
||||
g_object_notify ((GObject*)window, "dbus-application-id");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
reload_dbus_unique_name (MetaWindow *window,
|
||||
MetaPropValue *value,
|
||||
gboolean initial)
|
||||
{
|
||||
char *new_id = NULL;
|
||||
char *current_id = window->dbus_unique_name;
|
||||
|
||||
if (value->type != META_PROP_VALUE_INVALID)
|
||||
new_id = value->v.str;
|
||||
|
||||
if (g_strcmp0 (new_id, current_id) != 0)
|
||||
{
|
||||
g_free (current_id);
|
||||
|
||||
window->dbus_unique_name = g_strdup (new_id);
|
||||
|
||||
g_object_notify ((GObject*)window, "dbus-unique-name");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
reload_dbus_object_path (MetaWindow *window,
|
||||
MetaPropValue *value,
|
||||
gboolean initial)
|
||||
{
|
||||
char *new_path = NULL;
|
||||
char *current_path = window->dbus_object_path;
|
||||
|
||||
if (value->type != META_PROP_VALUE_INVALID)
|
||||
new_path = value->v.str;
|
||||
|
||||
if (g_strcmp0 (new_path, current_path) != 0)
|
||||
{
|
||||
g_free (current_path);
|
||||
|
||||
window->dbus_object_path = g_strdup (new_path);
|
||||
|
||||
g_object_notify ((GObject*)window, "dbus-object-path");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialises the property hooks system. Each row in the table named "hooks"
|
||||
* represents an action to take when a property is found on a newly-created
|
||||
@ -1645,6 +1736,10 @@ meta_display_init_window_prop_hooks (MetaDisplay *display)
|
||||
{ display->atom__MOTIF_WM_HINTS, META_PROP_VALUE_MOTIF_HINTS, reload_mwm_hints, TRUE, FALSE },
|
||||
{ XA_WM_TRANSIENT_FOR, META_PROP_VALUE_WINDOW, reload_transient_for, TRUE, FALSE },
|
||||
{ display->atom__GTK_THEME_VARIANT, META_PROP_VALUE_UTF8, reload_gtk_theme_variant, TRUE, FALSE },
|
||||
{ display->atom__GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED, META_PROP_VALUE_CARDINAL, reload_gtk_hide_titlebar_when_maximized, TRUE, FALSE },
|
||||
{ display->atom__DBUS_APPLICATION_ID, META_PROP_VALUE_UTF8, reload_dbus_application_id, TRUE, FALSE },
|
||||
{ display->atom__DBUS_UNIQUE_NAME, META_PROP_VALUE_UTF8, reload_dbus_unique_name, TRUE, FALSE },
|
||||
{ display->atom__DBUS_OBJECT_PATH, META_PROP_VALUE_UTF8, reload_dbus_object_path, TRUE, FALSE },
|
||||
{ display->atom__NET_WM_USER_TIME_WINDOW, META_PROP_VALUE_WINDOW, reload_net_wm_user_time_window, TRUE, FALSE },
|
||||
{ display->atom_WM_STATE, META_PROP_VALUE_INVALID, NULL, FALSE, FALSE },
|
||||
{ display->atom__NET_WM_ICON, META_PROP_VALUE_INVALID, reload_net_wm_icon, FALSE, FALSE },
|
||||
|
@ -164,7 +164,10 @@ enum {
|
||||
PROP_APPEARS_FOCUSED,
|
||||
PROP_RESIZEABLE,
|
||||
PROP_ABOVE,
|
||||
PROP_WM_CLASS
|
||||
PROP_WM_CLASS,
|
||||
PROP_DBUS_APPLICATION_ID,
|
||||
PROP_DBUS_UNIQUE_NAME,
|
||||
PROP_DBUS_OBJECT_PATH
|
||||
};
|
||||
|
||||
enum
|
||||
@ -179,6 +182,20 @@ enum
|
||||
|
||||
static guint window_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static void
|
||||
prefs_changed_callback (MetaPreference pref,
|
||||
gpointer data)
|
||||
{
|
||||
MetaWindow *window = data;
|
||||
|
||||
if (pref != META_PREF_WORKSPACES_ONLY_ON_PRIMARY)
|
||||
return;
|
||||
|
||||
meta_window_update_on_all_workspaces (window);
|
||||
|
||||
meta_window_queue (window, META_QUEUE_CALC_SHOWING);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_window_finalize (GObject *object)
|
||||
{
|
||||
@ -195,6 +212,8 @@ meta_window_finalize (GObject *object)
|
||||
|
||||
meta_icon_cache_free (&window->icon_cache);
|
||||
|
||||
meta_prefs_remove_listener (prefs_changed_callback, window);
|
||||
|
||||
g_free (window->sm_client_id);
|
||||
g_free (window->wm_client_machine);
|
||||
g_free (window->startup_id);
|
||||
@ -205,6 +224,9 @@ meta_window_finalize (GObject *object)
|
||||
g_free (window->icon_name);
|
||||
g_free (window->desc);
|
||||
g_free (window->gtk_theme_variant);
|
||||
g_free (window->dbus_application_id);
|
||||
g_free (window->dbus_unique_name);
|
||||
g_free (window->dbus_object_path);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -268,6 +290,15 @@ meta_window_get_property(GObject *object,
|
||||
case PROP_ABOVE:
|
||||
g_value_set_boolean (value, win->wm_state_above);
|
||||
break;
|
||||
case PROP_DBUS_APPLICATION_ID:
|
||||
g_value_set_string (value, win->dbus_application_id);
|
||||
break;
|
||||
case PROP_DBUS_UNIQUE_NAME:
|
||||
g_value_set_string (value, win->dbus_unique_name);
|
||||
break;
|
||||
case PROP_DBUS_OBJECT_PATH:
|
||||
g_value_set_string (value, win->dbus_object_path);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
@ -434,13 +465,36 @@ meta_window_class_init (MetaWindowClass *klass)
|
||||
NULL,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_DBUS_APPLICATION_ID,
|
||||
g_param_spec_string ("dbus-application-id",
|
||||
"DBusApplicationID",
|
||||
"Contents of the _DBUS_APPLICATION_ID property of this window",
|
||||
NULL,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_DBUS_UNIQUE_NAME,
|
||||
g_param_spec_string ("dbus-unique-name",
|
||||
"_DBUS_UNIQUE_NAME",
|
||||
"Contents of the _DBUS_UNIQUE_NAME property of this window",
|
||||
NULL,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_DBUS_OBJECT_PATH,
|
||||
g_param_spec_string ("dbus-object-path",
|
||||
"_DBUS_OBJECT_PATH",
|
||||
"Contents of the _DBUS_OBJECT_PATH property of this window",
|
||||
NULL,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
window_signals[WORKSPACE_CHANGED] =
|
||||
g_signal_new ("workspace-changed",
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaWindowClass, workspace_changed),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__INT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
G_TYPE_INT);
|
||||
|
||||
@ -449,8 +503,7 @@ meta_window_class_init (MetaWindowClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaWindowClass, focus),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
window_signals[RAISED] =
|
||||
@ -458,8 +511,7 @@ meta_window_class_init (MetaWindowClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaWindowClass, raised),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
window_signals[UNMANAGED] =
|
||||
@ -467,14 +519,14 @@ meta_window_class_init (MetaWindowClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaWindowClass, unmanaged),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_window_init (MetaWindow *self)
|
||||
{
|
||||
meta_prefs_add_listener (prefs_changed_callback, self);
|
||||
}
|
||||
|
||||
#ifdef WITH_VERBOSE_MODE
|
||||
@ -965,6 +1017,7 @@ meta_window_new_with_attrs (MetaDisplay *display,
|
||||
window->on_all_workspaces = FALSE;
|
||||
window->on_all_workspaces_requested = FALSE;
|
||||
window->tile_mode = META_TILE_NONE;
|
||||
window->tile_monitor_number = -1;
|
||||
window->shaded = FALSE;
|
||||
window->initially_iconic = FALSE;
|
||||
window->minimized = FALSE;
|
||||
@ -1896,7 +1949,7 @@ static void
|
||||
set_net_wm_state (MetaWindow *window)
|
||||
{
|
||||
int i;
|
||||
unsigned long data[12];
|
||||
unsigned long data[13];
|
||||
|
||||
i = 0;
|
||||
if (window->shaded)
|
||||
@ -1959,6 +2012,11 @@ set_net_wm_state (MetaWindow *window)
|
||||
data[i] = window->display->atom__NET_WM_STATE_STICKY;
|
||||
++i;
|
||||
}
|
||||
if (meta_window_appears_focused (window))
|
||||
{
|
||||
data[i] = window->display->atom__NET_WM_STATE_FOCUSED;
|
||||
++i;
|
||||
}
|
||||
|
||||
meta_verbose ("Setting _NET_WM_STATE with %d atoms\n", i);
|
||||
|
||||
@ -2271,7 +2329,7 @@ idle_calc_showing (gpointer data)
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
if (meta_prefs_get_focus_mode () != META_FOCUS_MODE_CLICK)
|
||||
if (meta_prefs_get_focus_mode () != G_DESKTOP_FOCUS_MODE_CLICK)
|
||||
{
|
||||
/* When display->mouse_mode is false, we want to ignore
|
||||
* EnterNotify events unless they come from mouse motion. To do
|
||||
@ -2611,7 +2669,7 @@ window_state_on_map (MetaWindow *window,
|
||||
* approximation to enforce so we do that.
|
||||
*/
|
||||
if (*takes_focus &&
|
||||
meta_prefs_get_focus_new_windows () == META_FOCUS_NEW_WINDOWS_STRICT &&
|
||||
meta_prefs_get_focus_new_windows () == G_DESKTOP_FOCUS_NEW_WINDOWS_STRICT &&
|
||||
!window->display->allow_terminal_deactivation &&
|
||||
__window_is_terminal (window->display->focus_window) &&
|
||||
!meta_window_is_ancestor_of_transient (window->display->focus_window,
|
||||
@ -2946,7 +3004,7 @@ meta_window_show (MetaWindow *window)
|
||||
* that new window below a lot of other windows.
|
||||
*/
|
||||
if (overlap ||
|
||||
(meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK &&
|
||||
(meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK &&
|
||||
meta_prefs_get_raise_on_click ()))
|
||||
meta_window_stack_just_below (window, focus_window);
|
||||
|
||||
@ -3396,6 +3454,9 @@ meta_window_maximize_internal (MetaWindow *window,
|
||||
else
|
||||
meta_window_save_rect (window);
|
||||
|
||||
if (maximize_horizontally && maximize_vertically)
|
||||
window->saved_maximize = TRUE;
|
||||
|
||||
window->maximized_horizontally =
|
||||
window->maximized_horizontally || maximize_horizontally;
|
||||
window->maximized_vertically =
|
||||
@ -3558,6 +3619,10 @@ meta_window_tile (MetaWindow *window)
|
||||
window,
|
||||
&old_rect,
|
||||
&new_rect);
|
||||
|
||||
if (window->frame)
|
||||
meta_ui_queue_frame_draw (window->screen->ui,
|
||||
window->frame->xwindow);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3570,16 +3635,10 @@ meta_window_tile (MetaWindow *window)
|
||||
static gboolean
|
||||
meta_window_can_tile_maximized (MetaWindow *window)
|
||||
{
|
||||
if (!META_WINDOW_ALLOWS_RESIZE (window))
|
||||
return FALSE;
|
||||
|
||||
if (!window->has_maximize_func)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
return window->has_maximize_func;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gboolean
|
||||
meta_window_can_tile_side_by_side (MetaWindow *window)
|
||||
{
|
||||
const MetaMonitorInfo *monitor;
|
||||
@ -3658,6 +3717,9 @@ meta_window_unmaximize_internal (MetaWindow *window,
|
||||
unmaximize_vertically = directions & META_MAXIMIZE_VERTICAL;
|
||||
g_assert (unmaximize_horizontally || unmaximize_vertically);
|
||||
|
||||
if (unmaximize_horizontally && unmaximize_vertically)
|
||||
window->saved_maximize = FALSE;
|
||||
|
||||
/* Only do something if the window isn't already maximized in the
|
||||
* given direction(s).
|
||||
*/
|
||||
@ -3906,6 +3968,11 @@ meta_window_unmake_fullscreen (MetaWindow *window)
|
||||
*/
|
||||
ensure_size_hints_satisfied (&target_rect, &window->size_hints);
|
||||
|
||||
/* Need to update window->has_resize_func before we move_resize()
|
||||
*/
|
||||
recalc_window_features (window);
|
||||
set_net_wm_state (window);
|
||||
|
||||
meta_window_move_resize (window,
|
||||
FALSE,
|
||||
target_rect.x,
|
||||
@ -3919,9 +3986,6 @@ meta_window_unmake_fullscreen (MetaWindow *window)
|
||||
|
||||
meta_window_update_layer (window);
|
||||
|
||||
recalc_window_features (window);
|
||||
set_net_wm_state (window);
|
||||
|
||||
g_object_notify (G_OBJECT (window), "fullscreen");
|
||||
}
|
||||
}
|
||||
@ -4356,6 +4420,9 @@ meta_window_update_for_monitors_changed (MetaWindow *window)
|
||||
}
|
||||
}
|
||||
|
||||
if (window->tile_mode != META_TILE_NONE)
|
||||
window->tile_monitor_number = new->number;
|
||||
|
||||
/* This will eventually reach meta_window_update_monitor that
|
||||
* will send leave/enter-monitor events. The old != new monitor
|
||||
* check will always fail (due to the new monitor_infos set) so
|
||||
@ -4990,6 +5057,41 @@ meta_window_move_between_rects (MetaWindow *window,
|
||||
window->user_rect.height);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_move_resize_frame:
|
||||
* @window: a #MetaWindow
|
||||
* @user_op: bool to indicate whether or not this is a user operation
|
||||
* @root_x_nw: new x
|
||||
* @root_y_nw: new y
|
||||
* @w: desired width
|
||||
* @h: desired height
|
||||
*
|
||||
* Resizes the window so that its outer bounds (including frame)
|
||||
* fit within the given rect
|
||||
*/
|
||||
void
|
||||
meta_window_move_resize_frame (MetaWindow *window,
|
||||
gboolean user_op,
|
||||
int root_x_nw,
|
||||
int root_y_nw,
|
||||
int w,
|
||||
int h)
|
||||
{
|
||||
if (window->frame)
|
||||
{
|
||||
MetaFrameBorders borders;
|
||||
meta_frame_calc_borders (window->frame, &borders);
|
||||
/* offset by the distance between the origin of the window
|
||||
* and the origin of the enclosing window decorations ( + border)
|
||||
*/
|
||||
root_x_nw += borders.visible.left;
|
||||
root_y_nw += borders.visible.top;
|
||||
w -= borders.visible.left + borders.visible.right;
|
||||
h -= borders.visible.top + borders.visible.bottom;
|
||||
}
|
||||
meta_window_move_resize (window, user_op, root_x_nw, root_y_nw, w, h);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_move_to_monitor:
|
||||
* @window: a #MetaWindow
|
||||
@ -5014,6 +5116,9 @@ meta_window_move_to_monitor (MetaWindow *window,
|
||||
monitor,
|
||||
&new_area);
|
||||
|
||||
if (window->tile_mode != META_TILE_NONE)
|
||||
window->tile_monitor_number = monitor;
|
||||
|
||||
meta_window_move_between_rects (window, &old_area, &new_area);
|
||||
}
|
||||
|
||||
@ -6585,6 +6690,17 @@ meta_window_client_message (MetaWindow *window,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_window_appears_focused_changed (MetaWindow *window)
|
||||
{
|
||||
set_net_wm_state (window);
|
||||
|
||||
g_object_notify (G_OBJECT (window), "appears-focused");
|
||||
|
||||
if (window->frame)
|
||||
meta_frame_queue_draw (window->frame);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_propagate_focus_appearance:
|
||||
* @window: the window to start propagating from
|
||||
@ -6630,9 +6746,7 @@ meta_window_propagate_focus_appearance (MetaWindow *window,
|
||||
if (child_focus_state_changed && !parent->has_focus &&
|
||||
parent != window->display->expected_focus_window)
|
||||
{
|
||||
g_object_notify (G_OBJECT (parent), "appears-focused");
|
||||
if (parent->frame)
|
||||
meta_frame_queue_draw (parent->frame);
|
||||
meta_window_appears_focused_changed (parent);
|
||||
}
|
||||
|
||||
child = parent;
|
||||
@ -6778,7 +6892,7 @@ meta_window_notify_focus (MetaWindow *window,
|
||||
*
|
||||
* There is dicussion in bugs 102209, 115072, and 461577
|
||||
*/
|
||||
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK ||
|
||||
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK ||
|
||||
!meta_prefs_get_raise_on_click())
|
||||
meta_display_ungrab_focus_window_button (window->display, window);
|
||||
|
||||
@ -6786,11 +6900,8 @@ meta_window_notify_focus (MetaWindow *window,
|
||||
g_object_notify (G_OBJECT (window->display), "focus-window");
|
||||
|
||||
if (!window->attached_focus_window)
|
||||
{
|
||||
g_object_notify (G_OBJECT (window), "appears-focused");
|
||||
if (window->frame)
|
||||
meta_frame_queue_draw (window->frame);
|
||||
}
|
||||
meta_window_appears_focused_changed (window);
|
||||
|
||||
meta_window_propagate_focus_appearance (window, TRUE);
|
||||
}
|
||||
}
|
||||
@ -6823,11 +6934,7 @@ meta_window_notify_focus (MetaWindow *window,
|
||||
window->has_focus = FALSE;
|
||||
|
||||
if (!window->attached_focus_window)
|
||||
{
|
||||
g_object_notify (G_OBJECT (window), "appears-focused");
|
||||
if (window->frame)
|
||||
meta_frame_queue_draw (window->frame);
|
||||
}
|
||||
meta_window_appears_focused_changed (window);
|
||||
|
||||
meta_error_trap_push (window->display);
|
||||
XUninstallColormap (window->display->xdisplay,
|
||||
@ -6838,7 +6945,7 @@ meta_window_notify_focus (MetaWindow *window,
|
||||
meta_window_update_layer (window);
|
||||
|
||||
/* Re-grab for click to focus and raise-on-click, if necessary */
|
||||
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK ||
|
||||
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK ||
|
||||
!meta_prefs_get_raise_on_click ())
|
||||
meta_display_grab_focus_window_button (window->display, window);
|
||||
}
|
||||
@ -6894,11 +7001,15 @@ send_configure_notify (MetaWindow *window)
|
||||
{
|
||||
if (window->withdrawn)
|
||||
{
|
||||
/* WARNING: x & y need to be set to whatever the XReparentWindow
|
||||
* call in meta_window_destroy_frame will use so that the window
|
||||
* has the right coordinates. Currently, that means no change to
|
||||
* x & y.
|
||||
MetaFrameBorders borders;
|
||||
/* We reparent the client window and put it to the position
|
||||
* where the visible top-left of the frame window currently is.
|
||||
*/
|
||||
|
||||
meta_frame_calc_borders (window->frame, &borders);
|
||||
|
||||
event.xconfigure.x = window->frame->rect.x + borders.invisible.left;
|
||||
event.xconfigure.y = window->frame->rect.y + borders.invisible.top;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -7754,10 +7865,8 @@ recalc_window_features (MetaWindow *window)
|
||||
window->override_redirect)
|
||||
window->always_sticky = TRUE;
|
||||
|
||||
if (window->type == META_WINDOW_DESKTOP ||
|
||||
window->type == META_WINDOW_DOCK ||
|
||||
window->type == META_WINDOW_SPLASHSCREEN ||
|
||||
window->override_redirect)
|
||||
if (window->override_redirect ||
|
||||
meta_window_get_frame_type (window) == META_FRAME_TYPE_LAST)
|
||||
{
|
||||
window->decorated = FALSE;
|
||||
window->has_close_func = FALSE;
|
||||
@ -8421,9 +8530,16 @@ update_move (MetaWindow *window,
|
||||
shake_threshold = meta_ui_get_drag_threshold (window->screen->ui) *
|
||||
DRAG_THRESHOLD_TO_SHAKE_THRESHOLD_FACTOR;
|
||||
|
||||
if (meta_prefs_get_edge_tiling () &&
|
||||
!META_WINDOW_MAXIMIZED (window) &&
|
||||
!META_WINDOW_TILED_SIDE_BY_SIDE (window))
|
||||
if (snap)
|
||||
{
|
||||
/* We don't want to tile while snapping. Also, clear any previous tile
|
||||
request. */
|
||||
window->tile_mode = META_TILE_NONE;
|
||||
window->tile_monitor_number = -1;
|
||||
}
|
||||
else if (meta_prefs_get_edge_tiling () &&
|
||||
!META_WINDOW_MAXIMIZED (window) &&
|
||||
!META_WINDOW_TILED_SIDE_BY_SIDE (window))
|
||||
{
|
||||
const MetaMonitorInfo *monitor;
|
||||
MetaRectangle work_area;
|
||||
@ -8431,11 +8547,15 @@ update_move (MetaWindow *window,
|
||||
/* For side-by-side tiling we are interested in the inside vertical
|
||||
* edges of the work area of the monitor where the pointer is located,
|
||||
* and in the outside top edge for maximized tiling.
|
||||
* Also see comment in meta_window_get_current_tile_area().
|
||||
*
|
||||
* For maximized tiling we use the outside edge instead of the
|
||||
* inside edge, because we don't want to force users to maximize
|
||||
* windows they are placing near the top of their screens.
|
||||
*
|
||||
* The "current" idea of meta_window_get_work_area_current_monitor() and
|
||||
* meta_screen_get_current_monitor() is slightly different: the former
|
||||
* refers to the monitor which contains the largest part of the window,
|
||||
* the latter to the one where the pointer is located.
|
||||
*/
|
||||
monitor = meta_screen_get_current_monitor (window->screen);
|
||||
meta_window_get_work_area_for_monitor (window,
|
||||
@ -8457,6 +8577,9 @@ update_move (MetaWindow *window,
|
||||
window->tile_mode = META_TILE_MAXIMIZED;
|
||||
else
|
||||
window->tile_mode = META_TILE_NONE;
|
||||
|
||||
if (window->tile_mode != META_TILE_NONE)
|
||||
window->tile_monitor_number = monitor->number;
|
||||
}
|
||||
|
||||
/* shake loose (unmaximize) maximized or tiled window if dragged beyond
|
||||
@ -9271,17 +9394,18 @@ void
|
||||
meta_window_get_current_tile_area (MetaWindow *window,
|
||||
MetaRectangle *tile_area)
|
||||
{
|
||||
const MetaMonitorInfo *monitor;
|
||||
int tile_monitor_number;
|
||||
|
||||
g_return_if_fail (window->tile_mode != META_TILE_NONE);
|
||||
|
||||
/* The definition of "current" of meta_window_get_work_area_current_monitor()
|
||||
* and meta_screen_get_current_monitor() is slightly different: the former
|
||||
* refers to the monitor which contains the largest part of the window, the
|
||||
* latter to the one where the pointer is located.
|
||||
*/
|
||||
monitor = meta_screen_get_current_monitor (window->screen);
|
||||
meta_window_get_work_area_for_monitor (window, monitor->number, tile_area);
|
||||
tile_monitor_number = window->tile_monitor_number;
|
||||
if (tile_monitor_number < 0)
|
||||
{
|
||||
meta_warning ("%s called with an invalid monitor number; using 0 instead\n", G_STRFUNC);
|
||||
tile_monitor_number = 0;
|
||||
}
|
||||
|
||||
meta_window_get_work_area_for_monitor (window, tile_monitor_number, tile_area);
|
||||
|
||||
if (window->tile_mode == META_TILE_LEFT ||
|
||||
window->tile_mode == META_TILE_RIGHT)
|
||||
@ -9799,7 +9923,7 @@ meta_window_set_user_time (MetaWindow *window,
|
||||
* doesn't want to have focus transferred for now due to new windows.
|
||||
*/
|
||||
if (meta_prefs_get_focus_new_windows () ==
|
||||
META_FOCUS_NEW_WINDOWS_STRICT &&
|
||||
G_DESKTOP_FOCUS_NEW_WINDOWS_STRICT &&
|
||||
__window_is_terminal (window))
|
||||
window->display->allow_terminal_deactivation = FALSE;
|
||||
}
|
||||
@ -10126,6 +10250,42 @@ meta_window_get_wm_class_instance (MetaWindow *window)
|
||||
return window->res_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_dbus_application_id:
|
||||
* @window: a #MetaWindow
|
||||
*
|
||||
* Return value: (transfer none): the application ID
|
||||
**/
|
||||
const char *
|
||||
meta_window_get_dbus_application_id (MetaWindow *window)
|
||||
{
|
||||
return window->dbus_application_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_dbus_unique_name:
|
||||
* @window: a #MetaWindow
|
||||
*
|
||||
* Return value: (transfer none): the unique name
|
||||
**/
|
||||
const char *
|
||||
meta_window_get_dbus_unique_name (MetaWindow *window)
|
||||
{
|
||||
return window->dbus_unique_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_dbus_object_path:
|
||||
* @window: a #MetaWindow
|
||||
*
|
||||
* Return value: (transfer none): the object path
|
||||
**/
|
||||
const char *
|
||||
meta_window_get_dbus_object_path (MetaWindow *window)
|
||||
{
|
||||
return window->dbus_object_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_compositor_private:
|
||||
* @window: a #MetaWindow
|
||||
@ -10379,7 +10539,8 @@ meta_window_get_frame_type (MetaWindow *window)
|
||||
/* can't add border if undecorated */
|
||||
return META_FRAME_TYPE_LAST;
|
||||
}
|
||||
else if (window->border_only && base_type != META_FRAME_TYPE_ATTACHED)
|
||||
else if ((window->border_only && base_type != META_FRAME_TYPE_ATTACHED) ||
|
||||
(window->hide_titlebar_when_maximized && META_WINDOW_MAXIMIZED (window)))
|
||||
{
|
||||
/* override base frame type */
|
||||
return META_FRAME_TYPE_BORDER;
|
||||
|
@ -121,16 +121,14 @@ meta_workspace_class_init (MetaWorkspaceClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
META_TYPE_WINDOW);
|
||||
signals[WINDOW_REMOVED] = g_signal_new ("window-removed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
META_TYPE_WINDOW);
|
||||
|
||||
@ -1201,7 +1199,7 @@ meta_workspace_focus_default_window (MetaWorkspace *workspace,
|
||||
}
|
||||
|
||||
|
||||
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK ||
|
||||
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK ||
|
||||
!workspace->screen->display->mouse_mode)
|
||||
focus_ancestor_or_mru_window (workspace, not_this_one, timestamp);
|
||||
else
|
||||
@ -1239,9 +1237,9 @@ meta_workspace_focus_default_window (MetaWorkspace *workspace,
|
||||
window);
|
||||
}
|
||||
}
|
||||
else if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_SLOPPY)
|
||||
else if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_SLOPPY)
|
||||
focus_ancestor_or_mru_window (workspace, not_this_one, timestamp);
|
||||
else if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_MOUSE)
|
||||
else if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_MOUSE)
|
||||
{
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Setting focus to no_focus_window, since no valid "
|
||||
@ -1300,7 +1298,7 @@ focus_ancestor_or_mru_window (MetaWorkspace *workspace,
|
||||
meta_window_focus (ancestor, timestamp);
|
||||
|
||||
/* Also raise the window if in click-to-focus */
|
||||
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
|
||||
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK)
|
||||
meta_window_raise (ancestor);
|
||||
|
||||
return;
|
||||
@ -1346,7 +1344,7 @@ focus_ancestor_or_mru_window (MetaWorkspace *workspace,
|
||||
meta_window_focus (window, timestamp);
|
||||
|
||||
/* Also raise the window if in click-to-focus */
|
||||
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
|
||||
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK)
|
||||
meta_window_raise (window);
|
||||
}
|
||||
else
|
||||
|
@ -12,7 +12,7 @@ mutter_plugin_api_version=@MUTTER_PLUGIN_API_VERSION@
|
||||
|
||||
Name: libmutter
|
||||
Description: Mutter window manager library
|
||||
Requires: gtk+-3.0 @CLUTTER_PACKAGE@ x11
|
||||
Requires: gsettings-desktop-schemas gtk+-3.0 @CLUTTER_PACKAGE@ x11
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -lmutter
|
||||
Cflags: -I${includedir}/mutter -DMUTTER_MAJOR_VERSION=${mutter_major_version} -DMUTTER_MINOR_VERSION=${mutter_minor_version} -DMUTTER_MICRO_VERSION=${mutter_micro_version} -DMUTTER_PLUGIN_API_VERSION=${mutter_plugin_api_version}
|
||||
|
@ -59,6 +59,10 @@ item(_MUTTER_SET_KEYBINDINGS_MESSAGE)
|
||||
item(_MUTTER_TOGGLE_VERBOSE)
|
||||
item(_MUTTER_HINTS)
|
||||
item(_GTK_THEME_VARIANT)
|
||||
item(_GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED)
|
||||
item(_DBUS_APPLICATION_ID)
|
||||
item(_DBUS_UNIQUE_NAME)
|
||||
item(_DBUS_OBJECT_PATH)
|
||||
item(_GNOME_WM_KEYBINDINGS)
|
||||
item(_GNOME_PANEL_ACTION)
|
||||
item(_GNOME_PANEL_ACTION_MAIN_MENU)
|
||||
@ -164,6 +168,7 @@ item(_NET_WM_ACTION_ABOVE)
|
||||
item(_NET_WM_ACTION_BELOW)
|
||||
item(_NET_WM_STATE_STICKY)
|
||||
item(_NET_WM_FULLSCREEN_MONITORS)
|
||||
item(_NET_WM_STATE_FOCUSED)
|
||||
|
||||
#if 0
|
||||
/* We apparently never use: */
|
||||
|
@ -1,6 +1,9 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Mutter common types shared by core.h and ui.h */
|
||||
/* Mutter common types shared by core.h and ui.h
|
||||
*
|
||||
* PLEASE KEEP IN SYNC WITH GSETTINGS SCHEMAS!
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
@ -164,32 +167,6 @@ typedef enum
|
||||
|
||||
} MetaCursor;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_FOCUS_MODE_CLICK,
|
||||
META_FOCUS_MODE_SLOPPY,
|
||||
META_FOCUS_MODE_MOUSE
|
||||
} MetaFocusMode;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_FOCUS_NEW_WINDOWS_SMART,
|
||||
META_FOCUS_NEW_WINDOWS_STRICT
|
||||
} MetaFocusNewWindows;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_ACTION_TITLEBAR_TOGGLE_SHADE,
|
||||
META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE,
|
||||
META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE_HORIZONTALLY,
|
||||
META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE_VERTICALLY,
|
||||
META_ACTION_TITLEBAR_MINIMIZE,
|
||||
META_ACTION_TITLEBAR_NONE,
|
||||
META_ACTION_TITLEBAR_LOWER,
|
||||
META_ACTION_TITLEBAR_MENU,
|
||||
META_ACTION_TITLEBAR_LAST
|
||||
} MetaActionTitlebar;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_FRAME_TYPE_NORMAL,
|
||||
@ -374,10 +351,8 @@ void meta_frame_borders_clear (MetaFrameBorders *self);
|
||||
|
||||
/* G_PRIORITY_DEFAULT_IDLE:
|
||||
* Mutter plugin unloading
|
||||
* GConf notify idle
|
||||
*/
|
||||
|
||||
/* Chosen to be below the GConf notify idle */
|
||||
#define META_PRIORITY_PREFS_NOTIFY (G_PRIORITY_DEFAULT_IDLE + 10)
|
||||
|
||||
/************************************************************/
|
||||
|
@ -124,6 +124,16 @@ void meta_display_end_grab_op (MetaDisplay *display,
|
||||
|
||||
MetaGrabOp meta_display_get_grab_op (MetaDisplay *display);
|
||||
|
||||
gboolean meta_display_add_keybinding (MetaDisplay *display,
|
||||
const char *name,
|
||||
const char *schema,
|
||||
MetaKeyBindingFlags flags,
|
||||
MetaKeyHandlerFunc handler,
|
||||
gpointer user_data,
|
||||
GDestroyNotify free_data);
|
||||
gboolean meta_display_remove_keybinding (MetaDisplay *display,
|
||||
const char *name);
|
||||
|
||||
MetaKeyBindingAction meta_display_get_keybinding_action (MetaDisplay *display,
|
||||
unsigned int keycode,
|
||||
unsigned long mask);
|
||||
@ -158,4 +168,8 @@ Window meta_display_get_leader_window (MetaDisplay *display);
|
||||
void meta_display_add_ignored_crossing_serial (MetaDisplay *display,
|
||||
unsigned long serial);
|
||||
|
||||
void meta_display_unmanage_screen (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
guint32 timestamp);
|
||||
|
||||
#endif
|
||||
|
@ -23,37 +23,11 @@
|
||||
#include <meta/display.h>
|
||||
#include <meta/common.h>
|
||||
|
||||
/**
|
||||
* MetaKeyHandlerFunc: (skip)
|
||||
*
|
||||
*/
|
||||
typedef void (* MetaKeyHandlerFunc) (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
gpointer user_data);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const char *name;
|
||||
MetaKeyHandlerFunc func;
|
||||
MetaKeyHandlerFunc default_func;
|
||||
gint data, flags;
|
||||
gpointer user_data;
|
||||
GDestroyNotify user_data_free_func;
|
||||
} MetaKeyHandler;
|
||||
|
||||
struct _MetaKeyBinding
|
||||
{
|
||||
const char *name;
|
||||
KeySym keysym;
|
||||
KeyCode keycode;
|
||||
unsigned int mask;
|
||||
MetaVirtualModifier modifiers;
|
||||
MetaKeyHandler *handler;
|
||||
};
|
||||
#define META_TYPE_KEY_BINDING (meta_key_binding_get_type ())
|
||||
|
||||
const char *meta_key_binding_get_name (MetaKeyBinding *binding);
|
||||
MetaVirtualModifier meta_key_binding_get_modifiers (MetaKeyBinding *binding);
|
||||
guint meta_key_binding_get_mask (MetaKeyBinding *binding);
|
||||
|
||||
gboolean meta_keybindings_set_custom_handler (const gchar *name,
|
||||
MetaKeyHandlerFunc handler,
|
||||
|
113
src/meta/prefs.h
113
src/meta/prefs.h
@ -27,8 +27,11 @@
|
||||
|
||||
/* This header is a "common" one between the UI and core side */
|
||||
#include <meta/common.h>
|
||||
#include <meta/types.h>
|
||||
#include <pango/pango-font.h>
|
||||
#include <gdesktop-enums.h>
|
||||
|
||||
/* Keep in sync with GSettings schemas! */
|
||||
typedef enum
|
||||
{
|
||||
META_PREF_MOUSE_BUTTON_MODS,
|
||||
@ -47,8 +50,6 @@ typedef enum
|
||||
META_PREF_APPLICATION_BASED,
|
||||
META_PREF_KEYBINDINGS,
|
||||
META_PREF_DISABLE_WORKAROUNDS,
|
||||
META_PREF_COMMANDS,
|
||||
META_PREF_TERMINAL_COMMAND,
|
||||
META_PREF_BUTTON_LAYOUT,
|
||||
META_PREF_WORKSPACE_NAMES,
|
||||
META_PREF_VISUAL_BELL,
|
||||
@ -77,16 +78,16 @@ void meta_prefs_remove_listener (MetaPrefsChangedFunc func,
|
||||
|
||||
void meta_prefs_init (void);
|
||||
|
||||
void meta_prefs_override_preference_location (const char *original_key,
|
||||
const char *new_key);
|
||||
void meta_prefs_override_preference_schema (const char *key,
|
||||
const char *schema);
|
||||
|
||||
const char* meta_preference_to_string (MetaPreference pref);
|
||||
|
||||
MetaVirtualModifier meta_prefs_get_mouse_button_mods (void);
|
||||
guint meta_prefs_get_mouse_button_resize (void);
|
||||
guint meta_prefs_get_mouse_button_menu (void);
|
||||
MetaFocusMode meta_prefs_get_focus_mode (void);
|
||||
MetaFocusNewWindows meta_prefs_get_focus_new_windows (void);
|
||||
GDesktopFocusMode meta_prefs_get_focus_mode (void);
|
||||
GDesktopFocusNewWindows meta_prefs_get_focus_new_windows (void);
|
||||
gboolean meta_prefs_get_attach_modal_dialogs (void);
|
||||
gboolean meta_prefs_get_raise_on_click (void);
|
||||
const char* meta_prefs_get_theme (void);
|
||||
@ -101,19 +102,18 @@ gboolean meta_prefs_get_gnome_accessibility (void);
|
||||
gboolean meta_prefs_get_gnome_animations (void);
|
||||
gboolean meta_prefs_get_edge_tiling (void);
|
||||
|
||||
const char* meta_prefs_get_command (int i);
|
||||
const char* meta_prefs_get_screenshot_command (void);
|
||||
|
||||
char* meta_prefs_get_gconf_key_for_command (int i);
|
||||
const char* meta_prefs_get_window_screenshot_command (void);
|
||||
|
||||
const char* meta_prefs_get_terminal_command (void);
|
||||
const char* meta_prefs_get_gconf_key_for_terminal_command (void);
|
||||
|
||||
void meta_prefs_get_button_layout (MetaButtonLayout *button_layout);
|
||||
|
||||
/* Double, right, middle click can be configured to any titlebar meta-action */
|
||||
MetaActionTitlebar meta_prefs_get_action_double_click_titlebar (void);
|
||||
MetaActionTitlebar meta_prefs_get_action_middle_click_titlebar (void);
|
||||
MetaActionTitlebar meta_prefs_get_action_right_click_titlebar (void);
|
||||
GDesktopTitlebarAction meta_prefs_get_action_double_click_titlebar (void);
|
||||
GDesktopTitlebarAction meta_prefs_get_action_middle_click_titlebar (void);
|
||||
GDesktopTitlebarAction meta_prefs_get_action_right_click_titlebar (void);
|
||||
|
||||
void meta_prefs_set_num_workspaces (int n_workspaces);
|
||||
|
||||
@ -187,45 +187,12 @@ typedef enum _MetaKeyBindingAction
|
||||
META_KEYBINDING_ACTION_PANEL_MAIN_MENU,
|
||||
META_KEYBINDING_ACTION_PANEL_RUN_DIALOG,
|
||||
META_KEYBINDING_ACTION_TOGGLE_RECORDING,
|
||||
META_KEYBINDING_ACTION_COMMAND_1,
|
||||
META_KEYBINDING_ACTION_COMMAND_2,
|
||||
META_KEYBINDING_ACTION_COMMAND_3,
|
||||
META_KEYBINDING_ACTION_COMMAND_4,
|
||||
META_KEYBINDING_ACTION_COMMAND_5,
|
||||
META_KEYBINDING_ACTION_COMMAND_6,
|
||||
META_KEYBINDING_ACTION_COMMAND_7,
|
||||
META_KEYBINDING_ACTION_COMMAND_8,
|
||||
META_KEYBINDING_ACTION_COMMAND_9,
|
||||
META_KEYBINDING_ACTION_COMMAND_10,
|
||||
META_KEYBINDING_ACTION_COMMAND_11,
|
||||
META_KEYBINDING_ACTION_COMMAND_12,
|
||||
META_KEYBINDING_ACTION_COMMAND_13,
|
||||
META_KEYBINDING_ACTION_COMMAND_14,
|
||||
META_KEYBINDING_ACTION_COMMAND_15,
|
||||
META_KEYBINDING_ACTION_COMMAND_16,
|
||||
META_KEYBINDING_ACTION_COMMAND_17,
|
||||
META_KEYBINDING_ACTION_COMMAND_18,
|
||||
META_KEYBINDING_ACTION_COMMAND_19,
|
||||
META_KEYBINDING_ACTION_COMMAND_20,
|
||||
META_KEYBINDING_ACTION_COMMAND_21,
|
||||
META_KEYBINDING_ACTION_COMMAND_22,
|
||||
META_KEYBINDING_ACTION_COMMAND_23,
|
||||
META_KEYBINDING_ACTION_COMMAND_24,
|
||||
META_KEYBINDING_ACTION_COMMAND_25,
|
||||
META_KEYBINDING_ACTION_COMMAND_26,
|
||||
META_KEYBINDING_ACTION_COMMAND_27,
|
||||
META_KEYBINDING_ACTION_COMMAND_28,
|
||||
META_KEYBINDING_ACTION_COMMAND_29,
|
||||
META_KEYBINDING_ACTION_COMMAND_30,
|
||||
META_KEYBINDING_ACTION_COMMAND_31,
|
||||
META_KEYBINDING_ACTION_COMMAND_32,
|
||||
META_KEYBINDING_ACTION_COMMAND_SCREENSHOT,
|
||||
META_KEYBINDING_ACTION_COMMAND_WINDOW_SCREENSHOT,
|
||||
META_KEYBINDING_ACTION_COMMAND_TERMINAL,
|
||||
META_KEYBINDING_ACTION_SET_SPEW_MARK,
|
||||
META_KEYBINDING_ACTION_ACTIVATE_WINDOW_MENU,
|
||||
META_KEYBINDING_ACTION_TOGGLE_FULLSCREEN,
|
||||
META_KEYBINDING_ACTION_TOGGLE_MAXIMIZED,
|
||||
META_KEYBINDING_ACTION_TOGGLE_TILED_LEFT,
|
||||
META_KEYBINDING_ACTION_TOGGLE_TILED_RIGHT,
|
||||
META_KEYBINDING_ACTION_TOGGLE_ABOVE,
|
||||
META_KEYBINDING_ACTION_MAXIMIZE,
|
||||
META_KEYBINDING_ACTION_UNMAXIMIZE,
|
||||
@ -269,6 +236,15 @@ typedef enum _MetaKeyBindingAction
|
||||
META_KEYBINDING_ACTION_LAST
|
||||
} MetaKeyBindingAction;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_KEY_BINDING_NONE,
|
||||
META_KEY_BINDING_PER_WINDOW = 1 << 0,
|
||||
META_KEY_BINDING_BUILTIN = 1 << 1,
|
||||
META_KEY_BINDING_REVERSES = 1 << 2,
|
||||
META_KEY_BINDING_IS_REVERSED = 1 << 3
|
||||
} MetaKeyBindingFlags;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int keysym;
|
||||
@ -276,16 +252,31 @@ typedef struct
|
||||
MetaVirtualModifier modifiers;
|
||||
} MetaKeyCombo;
|
||||
|
||||
/**
|
||||
* MetaKeyHandlerFunc:
|
||||
* @event: (type gpointer):
|
||||
*
|
||||
*/
|
||||
typedef void (* MetaKeyHandlerFunc) (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
gpointer user_data);
|
||||
|
||||
typedef struct _MetaKeyHandler MetaKeyHandler;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const char *name;
|
||||
const char *default_keybinding;
|
||||
char *name;
|
||||
char *schema;
|
||||
|
||||
MetaKeyBindingAction action;
|
||||
|
||||
/**
|
||||
* A list of MetaKeyCombos. Each of them is bound to
|
||||
* this keypref. If one has keysym==modifiers==0, it is
|
||||
* ignored. For historical reasons, the first entry is
|
||||
* governed by the pref FOO and the remainder are
|
||||
* governed by the pref FOO_list.
|
||||
* ignored.
|
||||
*/
|
||||
GSList *bindings;
|
||||
|
||||
@ -294,10 +285,14 @@ typedef struct
|
||||
|
||||
/** for keybindings that apply only to a window */
|
||||
gboolean per_window:1;
|
||||
|
||||
/** for keybindings not added with meta_display_add_keybinding() */
|
||||
gboolean builtin:1;
|
||||
} MetaKeyPref;
|
||||
|
||||
void meta_prefs_get_key_bindings (const MetaKeyPref **bindings,
|
||||
int *n_bindings);
|
||||
GType meta_key_binding_get_type (void);
|
||||
|
||||
GList *meta_prefs_get_keybindings (void);
|
||||
|
||||
MetaKeyBindingAction meta_prefs_get_keybinding_action (const char *name);
|
||||
|
||||
@ -307,17 +302,9 @@ void meta_prefs_get_window_binding (const char *name,
|
||||
|
||||
void meta_prefs_get_overlay_binding (MetaKeyCombo *combo);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_VISUAL_BELL_INVALID = 0,
|
||||
META_VISUAL_BELL_FULLSCREEN_FLASH,
|
||||
META_VISUAL_BELL_FRAME_FLASH
|
||||
|
||||
} MetaVisualBellType;
|
||||
|
||||
gboolean meta_prefs_get_visual_bell (void);
|
||||
gboolean meta_prefs_bell_is_audible (void);
|
||||
MetaVisualBellType meta_prefs_get_visual_bell_type (void);
|
||||
GDesktopVisualBellType meta_prefs_get_visual_bell_type (void);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -95,8 +95,13 @@ const char * meta_window_get_wm_class (MetaWindow *window);
|
||||
const char * meta_window_get_wm_class_instance (MetaWindow *window);
|
||||
gboolean meta_window_showing_on_its_workspace (MetaWindow *window);
|
||||
|
||||
const char * meta_window_get_dbus_application_id (MetaWindow *window);
|
||||
const char * meta_window_get_dbus_unique_name (MetaWindow *window);
|
||||
const char * meta_window_get_dbus_object_path (MetaWindow *window);
|
||||
|
||||
void meta_window_move(MetaWindow *window, gboolean user_op, int root_x_nw, int root_y_nw);
|
||||
void meta_window_move_frame(MetaWindow *window, gboolean user_op, int root_x_nw, int root_y_nw);
|
||||
void meta_window_move_resize_frame (MetaWindow *window, gboolean user_op, int root_x_nw, int root_y_nw, int w, int h);
|
||||
void meta_window_move_to_monitor (MetaWindow *window, int monitor);
|
||||
void meta_window_resize(MetaWindow *window, gboolean user_op, int w, int h);
|
||||
|
||||
|
@ -1,2 +0,0 @@
|
||||
VOID:INT,INT,ENUM
|
||||
VOID:INT,OBJECT
|
6
src/mutter-schemas.convert
Normal file
6
src/mutter-schemas.convert
Normal file
@ -0,0 +1,6 @@
|
||||
[org.gnome.mutter]
|
||||
overlay-key = /apps/mutter/general/overlay_key
|
||||
attach-modal-dialogs = /apps/mutter/general/attach_modal_dialogs
|
||||
live-hidden-windows = /apps/mutter/general/live_hidden_windows
|
||||
workspaces-only-on-primary = /apps/mutter/general/workspaces_only_on_primary
|
||||
draggable-border-width = /apps/mutter/general/draggable_border_width
|
@ -1,89 +0,0 @@
|
||||
<gconfschemafile>
|
||||
<schemalist>
|
||||
|
||||
<!-- General preferences -->
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/mutter/general/overlay_key</key>
|
||||
<applyto>/apps/mutter/general/overlay_key</applyto>
|
||||
<owner>mutter</owner>
|
||||
<type>string</type>
|
||||
<default>Super_L</default>
|
||||
<locale name="C">
|
||||
<short>Modifier to use for extended window management operations</short>
|
||||
<long>
|
||||
This key will initiate the "overlay", which is a combination window
|
||||
overview and application launching system. The default is intended
|
||||
to be the "Windows key" on PC hardware.
|
||||
|
||||
It's expected that this binding either the default or set to
|
||||
the empty string.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/mutter/general/attach_modal_dialogs</key>
|
||||
<applyto>/apps/mutter/general/attach_modal_dialogs</applyto>
|
||||
<owner>mutter</owner>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
<locale name="C">
|
||||
<short>Attach modal dialogs</short>
|
||||
<long>
|
||||
When true, instead
|
||||
of having independent titlebars, modal dialogs appear attached to the titlebar
|
||||
of the parent window and are moved together with the parent window.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/mutter/general/live_hidden_windows</key>
|
||||
<applyto>/apps/mutter/general/live_hidden_windows</applyto>
|
||||
<owner>mutter</owner>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
<locale name="C">
|
||||
<short>Live Hidden Windows</short>
|
||||
<long>
|
||||
Determines whether hidden windows (i.e., minimized windows and
|
||||
windows on other workspaces than the current one) should be kept
|
||||
alive.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/mutter/general/workspaces_only_on_primary</key>
|
||||
<applyto>/apps/mutter/general/workspaces_only_on_primary</applyto>
|
||||
<owner>mutter</owner>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
<locale name="C">
|
||||
<short>Workspaces only on primary</short>
|
||||
<long>
|
||||
Determines whether workspace switching should happen for windows
|
||||
on all monitors or only for windows on the primary monitor.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/mutter/general/draggable_border_width</key>
|
||||
<applyto>/apps/mutter/general/draggable_border_width</applyto>
|
||||
<owner>mutter</owner>
|
||||
<type>int</type>
|
||||
<default>10</default>
|
||||
<locale name="C">
|
||||
<short>Draggable border width</short>
|
||||
<long>
|
||||
The amount of total draggable borders. If the theme's visible
|
||||
borders are not enough, invisible borders will be added to meet
|
||||
this value.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
</schemalist>
|
||||
</gconfschemafile>
|
105
src/org.gnome.mutter.gschema.xml.in
Normal file
105
src/org.gnome.mutter.gschema.xml.in
Normal file
@ -0,0 +1,105 @@
|
||||
<schemalist>
|
||||
<schema id="org.gnome.mutter" path="/org/gnome/mutter/"
|
||||
gettext-domain="@GETTEXT_DOMAIN">
|
||||
|
||||
<key name="overlay-key" type="s">
|
||||
<default>'Super_L'</default>
|
||||
<_summary>Modifier to use for extended window management operations</_summary>
|
||||
<_description>
|
||||
This key will initiate the "overlay", which is a combination window
|
||||
overview and application launching system. The default is intended
|
||||
to be the "Windows key" on PC hardware.
|
||||
|
||||
It's expected that this binding either the default or set to
|
||||
the empty string.
|
||||
</_description>
|
||||
</key>
|
||||
|
||||
<key name="attach-modal-dialogs" type="b">
|
||||
<default>false</default>
|
||||
<_summary>Attach modal dialogs</_summary>
|
||||
<_description>
|
||||
When true, instead of having independent titlebars, modal dialogs
|
||||
appear attached to the titlebar of the parent window and are moved
|
||||
together with the parent window.
|
||||
</_description>
|
||||
</key>
|
||||
|
||||
<key name="live-hidden-windows" type="b">
|
||||
<default>false</default>
|
||||
<_summary>Live Hidden Windows</_summary>
|
||||
<_description>
|
||||
Determines whether hidden windows (i.e., minimized windows and
|
||||
windows on other workspaces than the current one) should be kept
|
||||
alive.
|
||||
</_description>
|
||||
</key>
|
||||
|
||||
<key name="edge-tiling" type="b">
|
||||
<default>false</default>
|
||||
<_summary>Enable edge tiling when dropping windows on screen edges</_summary>
|
||||
<_description>
|
||||
If enabled, dropping windows on vertical screen edges maximizes them
|
||||
vertically and resizes them horizontally to cover half of the available
|
||||
area. Dropping windows on the top screen edge maximizes them completely.
|
||||
</_description>
|
||||
</key>
|
||||
|
||||
<key name="workspaces-only-on-primary" type="b">
|
||||
<default>false</default>
|
||||
<_summary>Workspaces only on primary</_summary>
|
||||
<_description>
|
||||
Determines whether workspace switching should happen for windows
|
||||
on all monitors or only for windows on the primary monitor.
|
||||
</_description>
|
||||
</key>
|
||||
|
||||
<key name="no-tab-popup" type="b">
|
||||
<default>false</default>
|
||||
<_summary>No tab popup</_summary>
|
||||
<_description>
|
||||
Determines whether the use of popup and highlight frame should
|
||||
be disabled for window cycling.
|
||||
</_description>
|
||||
</key>
|
||||
|
||||
<key name="draggable-border-width" type="i">
|
||||
<default>10</default>
|
||||
<range min="0" max="64"/>
|
||||
<_summary>Draggable border width</_summary>
|
||||
<_description>
|
||||
The amount of total draggable borders. If the theme's visible
|
||||
borders are not enough, invisible borders will be added to meet
|
||||
this value.
|
||||
</_description>
|
||||
</key>
|
||||
|
||||
<child name="keybindings" schema="org.gnome.mutter.keybindings"/>
|
||||
|
||||
</schema>
|
||||
<schema id="org.gnome.mutter.keybindings" path="/org/gnome/mutter/keybindings/">
|
||||
|
||||
<key name="toggle-recording" type="as">
|
||||
<default><![CDATA[['<Control><Shift><Alt>r']]]></default>
|
||||
</key>
|
||||
|
||||
<key name="toggle-tiled-left" type="as">
|
||||
<default><![CDATA[['<Super>Left']]]></default>
|
||||
</key>
|
||||
|
||||
<key name="toggle-tiled-right" type="as">
|
||||
<default><![CDATA[['<Super>Right']]]></default>
|
||||
</key>
|
||||
|
||||
<key name="tab-popup-select" type="as">
|
||||
<default>[]</default>
|
||||
<_summary>Select window from tab popup</_summary>
|
||||
</key>
|
||||
|
||||
<key name="tab-popup-cancel" type="as">
|
||||
<default>[]</default>
|
||||
<_summary>Cancel tab popup</_summary>
|
||||
</key>
|
||||
|
||||
</schema>
|
||||
</schemalist>
|
@ -148,8 +148,15 @@ grab_area_at_mouse (GtkWidget *invisible,
|
||||
static void
|
||||
shutdown_grab (void)
|
||||
{
|
||||
gdk_keyboard_ungrab (gtk_get_current_event_time ());
|
||||
gdk_pointer_ungrab (gtk_get_current_event_time ());
|
||||
GdkDeviceManager *manager;
|
||||
GdkDevice *device;
|
||||
|
||||
manager = gdk_display_get_device_manager (gdk_display_get_default ());
|
||||
device = gdk_device_manager_get_client_pointer (manager);
|
||||
|
||||
gdk_device_ungrab (device, gtk_get_current_event_time ());
|
||||
gdk_device_ungrab (gdk_device_get_associated_device (device),
|
||||
gtk_get_current_event_time ());
|
||||
gtk_grab_remove (grab_widget);
|
||||
}
|
||||
|
||||
@ -197,6 +204,8 @@ key_press (GtkWidget *invisible,
|
||||
g_signal_handlers_disconnect_by_func (invisible, mouse_press, NULL);
|
||||
g_signal_handlers_disconnect_by_func (invisible, key_press, NULL);
|
||||
|
||||
gtk_main_quit ();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -227,6 +236,8 @@ static void
|
||||
begin_area_grab (void)
|
||||
{
|
||||
GdkWindow *window;
|
||||
GdkDeviceManager *manager;
|
||||
GdkDevice *device;
|
||||
|
||||
if (grab_widget == NULL)
|
||||
{
|
||||
@ -239,24 +250,31 @@ begin_area_grab (void)
|
||||
}
|
||||
|
||||
window = gtk_widget_get_window (grab_widget);
|
||||
manager = gdk_display_get_device_manager (gdk_display_get_default ());
|
||||
device = gdk_device_manager_get_client_pointer (manager);
|
||||
|
||||
if (gdk_keyboard_grab (window,
|
||||
FALSE,
|
||||
gtk_get_current_event_time ()) != GDK_GRAB_SUCCESS)
|
||||
if (gdk_device_grab (device,
|
||||
window,
|
||||
GDK_OWNERSHIP_NONE,
|
||||
FALSE,
|
||||
GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK,
|
||||
NULL,
|
||||
gtk_get_current_event_time ()) != GDK_GRAB_SUCCESS)
|
||||
{
|
||||
g_warning ("Failed to grab keyboard to do eyedropper");
|
||||
g_warning ("Failed to grab pointer to do eyedropper");
|
||||
return;
|
||||
}
|
||||
|
||||
if (gdk_pointer_grab (window,
|
||||
FALSE,
|
||||
GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK,
|
||||
NULL,
|
||||
NULL,
|
||||
gtk_get_current_event_time ()) != GDK_GRAB_SUCCESS)
|
||||
|
||||
if (gdk_device_grab (gdk_device_get_associated_device (device),
|
||||
window,
|
||||
GDK_OWNERSHIP_NONE,
|
||||
FALSE,
|
||||
GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK,
|
||||
NULL,
|
||||
gtk_get_current_event_time ()) != GDK_GRAB_SUCCESS)
|
||||
{
|
||||
gdk_keyboard_ungrab (GDK_CURRENT_TIME);
|
||||
g_warning ("Failed to grab pointer to do eyedropper");
|
||||
gdk_device_ungrab (device, gtk_get_current_event_time ());
|
||||
g_warning ("Failed to grab keyboard to do eyedropper");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -353,7 +353,7 @@ utility_cb (GtkAction *action,
|
||||
|
||||
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (callback_data));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
@ -386,7 +386,7 @@ toolbar_cb (GtkAction *action,
|
||||
|
||||
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (callback_data));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
@ -410,7 +410,7 @@ menu_cb (GtkAction *action,
|
||||
|
||||
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (callback_data));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
@ -431,7 +431,7 @@ override_redirect_cb (GtkAction *action,
|
||||
window = gtk_window_new (GTK_WINDOW_POPUP);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Override Redirect");
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
@ -455,7 +455,7 @@ border_only_cb (GtkAction *action,
|
||||
|
||||
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (callback_data));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
@ -477,7 +477,7 @@ changing_icon_cb (GtkAction *action,
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Changing Icon");
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
@ -545,7 +545,7 @@ splashscreen_cb (GtkAction *action,
|
||||
set_gtk_window_type (GTK_WINDOW (window), "_NET_WM_WINDOW_TYPE_SPLASHSCREEN");
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Splashscreen");
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), image, FALSE, FALSE, 0);
|
||||
@ -581,11 +581,11 @@ make_dock (int type)
|
||||
{
|
||||
case DOCK_LEFT:
|
||||
case DOCK_RIGHT:
|
||||
box = gtk_vbox_new (FALSE, 0);
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
break;
|
||||
case DOCK_TOP:
|
||||
case DOCK_BOTTOM:
|
||||
box = gtk_hbox_new (FALSE, 0);
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
break;
|
||||
case DOCK_ALL:
|
||||
break;
|
||||
@ -909,8 +909,7 @@ static GtkWidget *
|
||||
do_appwindow (void)
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *table;
|
||||
GtkWidget *handlebox;
|
||||
GtkWidget *grid;
|
||||
GtkWidget *statusbar;
|
||||
GtkWidget *contents;
|
||||
GtkWidget *sw;
|
||||
@ -931,9 +930,12 @@ do_appwindow (void)
|
||||
g_signal_connect (G_OBJECT (window), "destroy",
|
||||
G_CALLBACK (destroy_cb), NULL);
|
||||
|
||||
table = gtk_table_new (1, 4, FALSE);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), table);
|
||||
grid = gtk_grid_new ();
|
||||
|
||||
gtk_widget_set_vexpand (grid, TRUE);
|
||||
gtk_widget_set_hexpand (grid, TRUE);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), grid);
|
||||
|
||||
/* Create the menubar
|
||||
*/
|
||||
@ -958,12 +960,12 @@ do_appwindow (void)
|
||||
|
||||
gtk_ui_manager_add_ui_from_string (ui_manager, menu_item_string, -1, NULL);
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
gtk_ui_manager_get_widget (ui_manager, "/ui/menubar"),
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 0, 1,
|
||||
GTK_EXPAND | GTK_FILL, 0,
|
||||
0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid),
|
||||
gtk_ui_manager_get_widget (ui_manager, "/ui/menubar"),
|
||||
0, 0, 1, 1);
|
||||
|
||||
gtk_widget_set_hexpand (gtk_ui_manager_get_widget (ui_manager, "/ui/menubar"),
|
||||
TRUE);
|
||||
|
||||
/* Create document
|
||||
*/
|
||||
@ -976,13 +978,13 @@ do_appwindow (void)
|
||||
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_SHADOW_IN);
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
sw,
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 2, 3,
|
||||
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,
|
||||
0, 0);
|
||||
|
||||
gtk_grid_attach (GTK_GRID (grid),
|
||||
sw,
|
||||
0, 2, 1, 1);
|
||||
|
||||
gtk_widget_set_hexpand (sw, TRUE);
|
||||
gtk_widget_set_vexpand (sw, TRUE);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
200, 200);
|
||||
@ -996,27 +998,22 @@ do_appwindow (void)
|
||||
/* Create the toolbar
|
||||
*/
|
||||
|
||||
handlebox = gtk_handle_box_new ();
|
||||
gtk_grid_attach (GTK_GRID (grid),
|
||||
gtk_ui_manager_get_widget (ui_manager, "/ui/toolbar"),
|
||||
0, 1, 1, 1);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (handlebox),
|
||||
gtk_ui_manager_get_widget (ui_manager, "/ui/toolbar"));
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
handlebox,
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 1, 2,
|
||||
GTK_EXPAND | GTK_FILL, 0,
|
||||
0, 0);
|
||||
gtk_widget_set_hexpand (gtk_ui_manager_get_widget (ui_manager, "/ui/toolbar"),
|
||||
TRUE);
|
||||
|
||||
/* Create statusbar */
|
||||
|
||||
statusbar = gtk_statusbar_new ();
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
statusbar,
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 3, 4,
|
||||
GTK_EXPAND | GTK_FILL, 0,
|
||||
0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid),
|
||||
statusbar,
|
||||
0, 3, 1, 1);
|
||||
|
||||
gtk_widget_set_hexpand (statusbar,
|
||||
TRUE);
|
||||
|
||||
/* Show text widget info in the statusbar */
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (contents));
|
||||
|
@ -1299,7 +1299,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
|
||||
|
||||
switch (action)
|
||||
{
|
||||
case META_ACTION_TITLEBAR_TOGGLE_SHADE:
|
||||
case G_DESKTOP_TITLEBAR_ACTION_TOGGLE_SHADE:
|
||||
{
|
||||
meta_core_get (display, frame->xwindow,
|
||||
META_CORE_GET_FRAME_FLAGS, &flags,
|
||||
@ -1319,7 +1319,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
|
||||
}
|
||||
break;
|
||||
|
||||
case META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE:
|
||||
case G_DESKTOP_TITLEBAR_ACTION_TOGGLE_MAXIMIZE:
|
||||
{
|
||||
meta_core_get (display, frame->xwindow,
|
||||
META_CORE_GET_FRAME_FLAGS, &flags,
|
||||
@ -1332,7 +1332,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
|
||||
}
|
||||
break;
|
||||
|
||||
case META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE_HORIZONTALLY:
|
||||
case G_DESKTOP_TITLEBAR_ACTION_TOGGLE_MAXIMIZE_HORIZONTALLY:
|
||||
{
|
||||
meta_core_get (display, frame->xwindow,
|
||||
META_CORE_GET_FRAME_FLAGS, &flags,
|
||||
@ -1345,7 +1345,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
|
||||
}
|
||||
break;
|
||||
|
||||
case META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE_VERTICALLY:
|
||||
case G_DESKTOP_TITLEBAR_ACTION_TOGGLE_MAXIMIZE_VERTICALLY:
|
||||
{
|
||||
meta_core_get (display, frame->xwindow,
|
||||
META_CORE_GET_FRAME_FLAGS, &flags,
|
||||
@ -1358,7 +1358,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
|
||||
}
|
||||
break;
|
||||
|
||||
case META_ACTION_TITLEBAR_MINIMIZE:
|
||||
case G_DESKTOP_TITLEBAR_ACTION_MINIMIZE:
|
||||
{
|
||||
meta_core_get (display, frame->xwindow,
|
||||
META_CORE_GET_FRAME_FLAGS, &flags,
|
||||
@ -1371,17 +1371,17 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
|
||||
}
|
||||
break;
|
||||
|
||||
case META_ACTION_TITLEBAR_NONE:
|
||||
case G_DESKTOP_TITLEBAR_ACTION_NONE:
|
||||
/* Yaay, a sane user that doesn't use that other weird crap! */
|
||||
break;
|
||||
|
||||
case META_ACTION_TITLEBAR_LOWER:
|
||||
case G_DESKTOP_TITLEBAR_ACTION_LOWER:
|
||||
meta_core_user_lower_and_unfocus (display,
|
||||
frame->xwindow,
|
||||
event->time);
|
||||
break;
|
||||
|
||||
case META_ACTION_TITLEBAR_MENU:
|
||||
case G_DESKTOP_TITLEBAR_ACTION_MENU:
|
||||
meta_core_show_window_menu (display,
|
||||
frame->xwindow,
|
||||
event->x_root,
|
||||
@ -1389,9 +1389,6 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
|
||||
event->button,
|
||||
event->time);
|
||||
break;
|
||||
|
||||
case META_ACTION_TITLEBAR_LAST:
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@ -1942,7 +1939,7 @@ meta_frames_motion_notify_event (GtkWidget *widget,
|
||||
Display *display;
|
||||
|
||||
frames = META_FRAMES (widget);
|
||||
display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||
display = GDK_DISPLAY_XDISPLAY (gdk_window_get_display (event->window));
|
||||
|
||||
frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
|
||||
if (frame == NULL)
|
||||
@ -1971,7 +1968,8 @@ meta_frames_motion_notify_event (GtkWidget *widget,
|
||||
MetaFrameControl control;
|
||||
int x, y;
|
||||
|
||||
gdk_window_get_pointer (frame->window, &x, &y, NULL);
|
||||
gdk_window_get_device_position (frame->window, event->device,
|
||||
&x, &y, NULL);
|
||||
|
||||
/* Control is set to none unless it matches
|
||||
* the current grab
|
||||
@ -2012,7 +2010,8 @@ meta_frames_motion_notify_event (GtkWidget *widget,
|
||||
MetaFrameControl control;
|
||||
int x, y;
|
||||
|
||||
gdk_window_get_pointer (frame->window, &x, &y, NULL);
|
||||
gdk_window_get_device_position (frame->window, event->device,
|
||||
&x, &y, NULL);
|
||||
|
||||
control = get_control (frames, frame, x, y);
|
||||
|
||||
@ -2637,7 +2636,6 @@ control_rect (MetaFrameControl control,
|
||||
return rect;
|
||||
}
|
||||
|
||||
#define RESIZE_EXTENDS 15
|
||||
#define TOP_RESIZE_HEIGHT 4
|
||||
static MetaFrameControl
|
||||
get_control (MetaFrames *frames,
|
||||
@ -2726,8 +2724,8 @@ get_control (MetaFrames *frames,
|
||||
* in case of overlap.
|
||||
*/
|
||||
|
||||
if (y >= (fgeom.height - fgeom.borders.total.bottom - RESIZE_EXTENDS) &&
|
||||
x >= (fgeom.width - fgeom.borders.total.right - RESIZE_EXTENDS))
|
||||
if (y >= (fgeom.height - fgeom.borders.total.bottom) &&
|
||||
x >= (fgeom.width - fgeom.borders.total.right))
|
||||
{
|
||||
if (has_vert && has_horiz)
|
||||
return META_FRAME_CONTROL_RESIZE_SE;
|
||||
@ -2736,8 +2734,8 @@ get_control (MetaFrames *frames,
|
||||
else if (has_horiz)
|
||||
return META_FRAME_CONTROL_RESIZE_E;
|
||||
}
|
||||
else if (y >= (fgeom.height - fgeom.borders.total.bottom - RESIZE_EXTENDS) &&
|
||||
x <= (fgeom.borders.total.left + RESIZE_EXTENDS))
|
||||
else if (y >= (fgeom.height - fgeom.borders.total.bottom) &&
|
||||
x <= fgeom.borders.total.left)
|
||||
{
|
||||
if (has_vert && has_horiz)
|
||||
return META_FRAME_CONTROL_RESIZE_SW;
|
||||
@ -2746,8 +2744,8 @@ get_control (MetaFrames *frames,
|
||||
else if (has_horiz)
|
||||
return META_FRAME_CONTROL_RESIZE_W;
|
||||
}
|
||||
else if (y < (fgeom.borders.invisible.top + RESIZE_EXTENDS) &&
|
||||
x <= (fgeom.borders.total.left + RESIZE_EXTENDS) && has_north_resize)
|
||||
else if (y < (fgeom.borders.invisible.top) &&
|
||||
x <= fgeom.borders.total.left && has_north_resize)
|
||||
{
|
||||
if (has_vert && has_horiz)
|
||||
return META_FRAME_CONTROL_RESIZE_NW;
|
||||
@ -2756,8 +2754,8 @@ get_control (MetaFrames *frames,
|
||||
else if (has_horiz)
|
||||
return META_FRAME_CONTROL_RESIZE_W;
|
||||
}
|
||||
else if (y < (fgeom.borders.invisible.top + RESIZE_EXTENDS) &&
|
||||
x >= (fgeom.width - fgeom.borders.total.right - RESIZE_EXTENDS) && has_north_resize)
|
||||
else if (y < (fgeom.borders.invisible.top) &&
|
||||
x >= fgeom.width - fgeom.borders.total.right && has_north_resize)
|
||||
{
|
||||
if (has_vert && has_horiz)
|
||||
return META_FRAME_CONTROL_RESIZE_NE;
|
||||
@ -2771,17 +2769,17 @@ get_control (MetaFrames *frames,
|
||||
if (has_vert && has_north_resize)
|
||||
return META_FRAME_CONTROL_RESIZE_N;
|
||||
}
|
||||
else if (y >= (fgeom.height - fgeom.borders.total.bottom - RESIZE_EXTENDS))
|
||||
else if (y >= (fgeom.height - fgeom.borders.total.bottom))
|
||||
{
|
||||
if (has_vert)
|
||||
return META_FRAME_CONTROL_RESIZE_S;
|
||||
}
|
||||
else if (x <= fgeom.borders.total.left + RESIZE_EXTENDS)
|
||||
else if (x <= fgeom.borders.total.left)
|
||||
{
|
||||
if (has_horiz)
|
||||
return META_FRAME_CONTROL_RESIZE_W;
|
||||
}
|
||||
else if (x >= (fgeom.width - fgeom.borders.total.right - RESIZE_EXTENDS))
|
||||
else if (x >= (fgeom.width - fgeom.borders.total.right))
|
||||
{
|
||||
if (has_horiz)
|
||||
return META_FRAME_CONTROL_RESIZE_E;
|
||||
|
@ -116,7 +116,7 @@ popup_position_func (GtkMenu *menu,
|
||||
|
||||
pos = user_data;
|
||||
|
||||
gtk_widget_size_request (GTK_WIDGET (menu), &req);
|
||||
gtk_widget_get_preferred_size (GTK_WIDGET (menu), &req, NULL);
|
||||
|
||||
*x = pos->x;
|
||||
*y = pos->y;
|
||||
|
@ -217,9 +217,9 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
|
||||
gboolean outline)
|
||||
{
|
||||
MetaTabPopup *popup;
|
||||
int i, left, right, top, bottom;
|
||||
int i, left, top;
|
||||
int height;
|
||||
GtkWidget *table;
|
||||
GtkWidget *grid;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *align;
|
||||
GList *tmp;
|
||||
@ -273,12 +273,12 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
|
||||
if (i % width)
|
||||
height += 1;
|
||||
|
||||
table = gtk_table_new (height, width, FALSE);
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
grid = gtk_grid_new ();
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), 1);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (grid), 1);
|
||||
gtk_container_add (GTK_CONTAINER (popup->window),
|
||||
frame);
|
||||
gtk_container_add (GTK_CONTAINER (frame),
|
||||
@ -289,7 +289,7 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
|
||||
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (align),
|
||||
table);
|
||||
grid);
|
||||
|
||||
popup->label = gtk_label_new ("");
|
||||
|
||||
@ -306,13 +306,11 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
|
||||
|
||||
max_label_width = 0;
|
||||
top = 0;
|
||||
bottom = 1;
|
||||
tmp = popup->entries;
|
||||
|
||||
while (tmp && top < height)
|
||||
{
|
||||
left = 0;
|
||||
right = 1;
|
||||
|
||||
while (tmp && left < width)
|
||||
{
|
||||
@ -351,26 +349,22 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
|
||||
|
||||
te->widget = image;
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
te->widget,
|
||||
left, right, top, bottom,
|
||||
0, 0,
|
||||
0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid),
|
||||
te->widget,
|
||||
left, top, 1, 1);
|
||||
|
||||
/* Efficiency rules! */
|
||||
gtk_label_set_markup (GTK_LABEL (popup->label),
|
||||
te->title);
|
||||
gtk_widget_size_request (popup->label, &req);
|
||||
gtk_widget_get_preferred_size (popup->label, &req, NULL);
|
||||
max_label_width = MAX (max_label_width, req.width);
|
||||
|
||||
tmp = tmp->next;
|
||||
|
||||
++left;
|
||||
++right;
|
||||
}
|
||||
|
||||
++top;
|
||||
++bottom;
|
||||
}
|
||||
|
||||
/* remove all the temporary text */
|
||||
|
@ -723,8 +723,6 @@ typedef enum
|
||||
META_FRAME_PIECE_LAST
|
||||
} MetaFramePiece;
|
||||
|
||||
#define N_GTK_STATES 5
|
||||
|
||||
/**
|
||||
* How to draw a frame in a particular state (say, a focussed, non-maximised,
|
||||
* resizable frame). This corresponds closely to the <frame_style> tag
|
||||
|
@ -122,19 +122,18 @@ static GtkActionEntry tool_items[] =
|
||||
static GtkWidget *
|
||||
normal_contents (void)
|
||||
{
|
||||
GtkWidget *table;
|
||||
GtkWidget *handlebox;
|
||||
GtkWidget *grid;
|
||||
GtkWidget *statusbar;
|
||||
GtkWidget *contents;
|
||||
GtkWidget *sw;
|
||||
GtkActionGroup *action_group;
|
||||
GtkUIManager *ui_manager;
|
||||
|
||||
table = gtk_table_new (1, 4, FALSE);
|
||||
|
||||
grid = gtk_grid_new ();
|
||||
|
||||
/* Create the menubar
|
||||
*/
|
||||
|
||||
|
||||
action_group = gtk_action_group_new ("mainmenu");
|
||||
gtk_action_group_add_actions (action_group,
|
||||
menu_items,
|
||||
@ -152,24 +151,21 @@ normal_contents (void)
|
||||
/* create menu items */
|
||||
gtk_ui_manager_add_ui_from_string (ui_manager, menu_item_string, -1, NULL);
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
gtk_ui_manager_get_widget (ui_manager, "/ui/menubar"),
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 0, 1,
|
||||
GTK_EXPAND | GTK_FILL, 0,
|
||||
0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid),
|
||||
gtk_ui_manager_get_widget (ui_manager, "/ui/menubar"),
|
||||
0, 0, 1, 1);
|
||||
|
||||
handlebox = gtk_handle_box_new ();
|
||||
gtk_widget_set_hexpand (gtk_ui_manager_get_widget (ui_manager, "/ui/menubar"),
|
||||
TRUE);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (handlebox),
|
||||
gtk_ui_manager_get_widget (ui_manager, "/ui/toolbar"));
|
||||
/* Create the toolbar
|
||||
*/
|
||||
gtk_grid_attach (GTK_GRID (grid),
|
||||
gtk_ui_manager_get_widget (ui_manager, "/ui/toolbar"),
|
||||
0, 1, 1, 1);
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
handlebox,
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 1, 2,
|
||||
GTK_EXPAND | GTK_FILL, 0,
|
||||
0, 0);
|
||||
gtk_widget_set_hexpand (gtk_ui_manager_get_widget (ui_manager, "/ui/toolbar"),
|
||||
TRUE);
|
||||
|
||||
/* Create document
|
||||
*/
|
||||
@ -183,12 +179,12 @@ normal_contents (void)
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_SHADOW_IN);
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
sw,
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 2, 3,
|
||||
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,
|
||||
0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid),
|
||||
sw,
|
||||
0, 2, 1, 1);
|
||||
|
||||
gtk_widget_set_hexpand (sw, TRUE);
|
||||
gtk_widget_set_vexpand (sw, TRUE);
|
||||
|
||||
contents = gtk_text_view_new ();
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (contents),
|
||||
@ -200,18 +196,17 @@ normal_contents (void)
|
||||
/* Create statusbar */
|
||||
|
||||
statusbar = gtk_statusbar_new ();
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
statusbar,
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 3, 4,
|
||||
GTK_EXPAND | GTK_FILL, 0,
|
||||
0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid),
|
||||
statusbar,
|
||||
0, 3, 1, 1);
|
||||
|
||||
gtk_widget_show_all (table);
|
||||
gtk_widget_set_hexpand (statusbar, TRUE);
|
||||
|
||||
gtk_widget_show_all (grid);
|
||||
|
||||
g_object_unref (ui_manager);
|
||||
|
||||
return table;
|
||||
return grid;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -233,7 +228,7 @@ dialog_contents (void)
|
||||
GtkWidget *image;
|
||||
GtkWidget *button;
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
action_area = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
|
||||
@ -258,7 +253,7 @@ dialog_contents (void)
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||
gtk_label_set_selectable (GTK_LABEL (label), TRUE);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 6);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox), image,
|
||||
FALSE, FALSE, 0);
|
||||
@ -278,11 +273,11 @@ dialog_contents (void)
|
||||
static GtkWidget*
|
||||
utility_contents (void)
|
||||
{
|
||||
GtkWidget *table;
|
||||
GtkWidget *grid;
|
||||
GtkWidget *button;
|
||||
int i, j;
|
||||
|
||||
table = gtk_table_new (3, 4, FALSE);
|
||||
grid = gtk_grid_new ();
|
||||
|
||||
i = 0;
|
||||
while (i < 3)
|
||||
@ -298,12 +293,9 @@ utility_contents (void)
|
||||
|
||||
g_free (str);
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
button,
|
||||
/* X direction */ /* Y direction */
|
||||
i, i+1, j, j+1,
|
||||
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,
|
||||
0, 0);
|
||||
gtk_grid_attach (GTK_GRID (grid),
|
||||
button,
|
||||
i, j, 1, 1);
|
||||
|
||||
++j;
|
||||
}
|
||||
@ -311,9 +303,9 @@ utility_contents (void)
|
||||
++i;
|
||||
}
|
||||
|
||||
gtk_widget_show_all (table);
|
||||
gtk_widget_show_all (grid);
|
||||
|
||||
return table;
|
||||
return grid;
|
||||
}
|
||||
|
||||
static GtkWidget*
|
||||
@ -328,7 +320,7 @@ menu_contents (void)
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame),
|
||||
GTK_SHADOW_OUT);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
i = 0;
|
||||
while (i < 10)
|
||||
@ -365,7 +357,7 @@ border_only_contents (void)
|
||||
color.alpha = 1.0;
|
||||
gtk_widget_override_background_color (event_box, 0, &color);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 3);
|
||||
|
||||
w = gtk_label_new (_("Border-only window"));
|
||||
@ -487,7 +479,7 @@ preview_collection (int font_size,
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
||||
box = gtk_vbox_new (FALSE, 0);
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_box_set_spacing (GTK_BOX (box), 20);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 20);
|
||||
|
||||
@ -711,7 +703,7 @@ previews_of_button_layouts (void)
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
||||
box = gtk_vbox_new (FALSE, 0);
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_box_set_spacing (GTK_BOX (box), 20);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 20);
|
||||
|
||||
|
@ -406,6 +406,12 @@ meta_frame_layout_get_borders (const MetaFrameLayout *layout,
|
||||
{
|
||||
int buttons_height, title_height, draggable_borders;
|
||||
|
||||
meta_frame_borders_clear (borders);
|
||||
|
||||
/* For a full-screen window, we don't have any borders, visible or not. */
|
||||
if (flags & META_FRAME_FULLSCREEN)
|
||||
return;
|
||||
|
||||
g_return_if_fail (layout != NULL);
|
||||
|
||||
if (!layout->has_title)
|
||||
@ -417,33 +423,29 @@ meta_frame_layout_get_borders (const MetaFrameLayout *layout,
|
||||
layout->title_vertical_pad +
|
||||
layout->title_border.top + layout->title_border.bottom;
|
||||
|
||||
borders->visible.top = MAX (buttons_height, title_height);
|
||||
borders->visible.left = layout->left_width;
|
||||
borders->visible.right = layout->right_width;
|
||||
borders->visible.top = MAX (buttons_height, title_height);
|
||||
borders->visible.left = layout->left_width;
|
||||
borders->visible.right = layout->right_width;
|
||||
borders->visible.bottom = layout->bottom_height;
|
||||
|
||||
if (flags & META_FRAME_FULLSCREEN)
|
||||
{
|
||||
meta_frame_borders_clear (borders);
|
||||
return;
|
||||
}
|
||||
|
||||
draggable_borders = meta_prefs_get_draggable_border_width ();
|
||||
|
||||
borders->invisible.left = MAX (0, draggable_borders - borders->visible.left);
|
||||
borders->invisible.right = MAX (0, draggable_borders - borders->visible.right);
|
||||
borders->invisible.bottom = MAX (0, draggable_borders - borders->visible.bottom);
|
||||
if (flags & META_FRAME_ALLOWS_HORIZONTAL_RESIZE)
|
||||
{
|
||||
borders->invisible.left = MAX (0, draggable_borders - borders->visible.left);
|
||||
borders->invisible.right = MAX (0, draggable_borders - borders->visible.right);
|
||||
}
|
||||
|
||||
/* borders.visible is the height of the *title bar*. We can't do the same
|
||||
* algorithm here, titlebars are expectedly much bigger. Just subtract a couple
|
||||
* pixels to get a proper feel. */
|
||||
borders->invisible.top = MAX (0, draggable_borders - 2);
|
||||
if (flags & META_FRAME_ALLOWS_VERTICAL_RESIZE)
|
||||
{
|
||||
borders->invisible.bottom = MAX (0, draggable_borders - borders->visible.bottom);
|
||||
|
||||
if (type == META_FRAME_TYPE_ATTACHED)
|
||||
borders->invisible.top = 0;
|
||||
|
||||
if (flags & META_FRAME_SHADED)
|
||||
borders->visible.bottom = borders->invisible.bottom = 0;
|
||||
/* borders.visible.top is the height of the *title bar*. We can't do the same
|
||||
* algorithm here, titlebars are expectedly much bigger. Just subtract a couple
|
||||
* pixels to get a proper feel. */
|
||||
if (type != META_FRAME_TYPE_ATTACHED)
|
||||
borders->invisible.top = MAX (0, draggable_borders - 2);
|
||||
}
|
||||
|
||||
borders->total.left = borders->invisible.left + borders->visible.left;
|
||||
borders->total.right = borders->invisible.right + borders->visible.right;
|
||||
@ -1337,7 +1339,6 @@ meta_color_spec_new_from_string (const char *str,
|
||||
spec = meta_color_spec_new (META_COLOR_SPEC_GTK);
|
||||
spec->data.gtk.state = state;
|
||||
spec->data.gtk.component = component;
|
||||
g_assert (spec->data.gtk.state < N_GTK_STATES);
|
||||
g_assert (spec->data.gtk.component < META_GTK_COLOR_LAST);
|
||||
}
|
||||
else if (str[0] == 'b' && str[1] == 'l' && str[2] == 'e' && str[3] == 'n' &&
|
||||
@ -6402,6 +6403,8 @@ meta_gtk_state_from_string (const char *str)
|
||||
return GTK_STATE_FLAG_INCONSISTENT;
|
||||
else if (g_ascii_strcasecmp ("focused", str) == 0)
|
||||
return GTK_STATE_FLAG_FOCUSED;
|
||||
else if (g_ascii_strcasecmp ("window-unfocused", str) == 0)
|
||||
return GTK_STATE_FLAG_WINDOW_UNFOCUSED;
|
||||
else
|
||||
return -1; /* hack */
|
||||
}
|
||||
@ -6425,6 +6428,8 @@ meta_gtk_state_to_string (GtkStateFlags state)
|
||||
return "INCONSISTENT";
|
||||
case GTK_STATE_FLAG_FOCUSED:
|
||||
return "FOCUSED";
|
||||
case GTK_STATE_FLAG_WINDOW_UNFOCUSED:
|
||||
return "WINDOW_UNFOCUSED";
|
||||
}
|
||||
|
||||
return "<unknown>";
|
||||
|
@ -102,6 +102,7 @@ maybe_redirect_mouse_event (XEvent *xevent)
|
||||
{
|
||||
GdkDisplay *gdisplay;
|
||||
GdkDeviceManager *gmanager;
|
||||
GdkDevice *gdevice;
|
||||
MetaUI *ui;
|
||||
GdkEvent *gevent;
|
||||
GdkWindow *gdk_window;
|
||||
@ -133,11 +134,14 @@ maybe_redirect_mouse_event (XEvent *xevent)
|
||||
if (gdk_window == NULL)
|
||||
return FALSE;
|
||||
|
||||
gmanager = gdk_display_get_device_manager (gdisplay);
|
||||
gdevice = gdk_device_manager_get_client_pointer (gmanager);
|
||||
|
||||
/* If GDK already thinks it has a grab, we better let it see events; this
|
||||
* is the menu-navigation case and events need to get sent to the appropriate
|
||||
* (client-side) subwindow for individual menu items.
|
||||
*/
|
||||
if (gdk_display_pointer_is_grabbed (gdisplay))
|
||||
if (gdk_display_device_is_grabbed (gdisplay, gdevice))
|
||||
return FALSE;
|
||||
|
||||
switch (xevent->type)
|
||||
@ -207,8 +211,7 @@ maybe_redirect_mouse_event (XEvent *xevent)
|
||||
}
|
||||
|
||||
/* If we've gotten here, we've created the gdk_event and should send it on */
|
||||
gmanager = gdk_display_get_device_manager (gdisplay);
|
||||
gdk_event_set_device (gevent, gdk_device_manager_get_client_pointer (gmanager));
|
||||
gdk_event_set_device (gevent, gdevice);
|
||||
gtk_main_do_event (gevent);
|
||||
gdk_event_free (gevent);
|
||||
|
||||
|
@ -195,10 +195,6 @@ class test_ansi(BuildTest):
|
||||
def run(self):
|
||||
return self.run_build(c='ansi')
|
||||
|
||||
class test_gconfoff(BuildTest):
|
||||
def run(self):
|
||||
return self.run_build(autogen='--disable-gconf')
|
||||
|
||||
class test_compositoroff(BuildTest):
|
||||
def run(self):
|
||||
return self.run_build(autogen='--disable-compositor')
|
||||
|
Reference in New Issue
Block a user