mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 12:32:05 +00:00
Merge branch 'next-generation' into clutter
This commit is contained in:
commit
9ebb135ccb
476
ChangeLog
476
ChangeLog
@ -1,3 +1,479 @@
|
|||||||
|
2008-12-16 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* NEWS: 2.25.55 release.
|
||||||
|
|
||||||
|
2008-12-15 Erwann Chenede <erwann.chenede@sun.com>
|
||||||
|
|
||||||
|
* configure.in: fix build on Solaris. Closes #564123.
|
||||||
|
|
||||||
|
2008-12-02 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* configure.in: Post-release bump to 2.25.55.
|
||||||
|
|
||||||
|
2008-12-02 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* NEWS: 2.25.34 release.
|
||||||
|
|
||||||
|
2008-12-02 Matt Kraai <kraai@ftbfs.org>
|
||||||
|
|
||||||
|
* src/core/iconcache.c: patches to fixes for -Wall. Closes #562939.
|
||||||
|
|
||||||
|
2008-12-01 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* configure.in: Post-release bump to 2.25.34.
|
||||||
|
|
||||||
|
2008-12-01 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* NEWS: 2.25.21 release.
|
||||||
|
|
||||||
|
2008-12-01 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* configure.in: gnome-doc-tools version doesn't need to be so high.
|
||||||
|
* src/compositor/compositor-xrender.c: disable the entire file if the
|
||||||
|
compositor is disabled.
|
||||||
|
* src/core/async-getprop.[ch]: fixes for -Wall
|
||||||
|
* src/core/iconcache.c: fixes for -Wall
|
||||||
|
* src/core/testasyncgetprop.c: fixes for -Wall
|
||||||
|
* src/core/xprops.c: fixes for -Wall
|
||||||
|
|
||||||
|
2008-11-26 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* tools/announce-wrangler.py: linked language codes to po files
|
||||||
|
* tools/commit-wrangler.py: print revision url
|
||||||
|
|
||||||
|
2008-11-26 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* tools/announce-wrangler.py: renamed ini file
|
||||||
|
* tools/commit-wrangler.py: rewriting in terms of moap
|
||||||
|
|
||||||
|
2008-11-25 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* configure.in: Post-release bump to 2.25.21.
|
||||||
|
|
||||||
|
2008-11-25 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* NEWS: 2.25.13 release.
|
||||||
|
|
||||||
|
2008-11-26 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* tools/announce-wrangler.py (added): script to produce announcements
|
||||||
|
|
||||||
|
2008-11-26 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* src/core/xprops.c: add casts (#562106)
|
||||||
|
|
||||||
|
2008-11-25 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* metacity.doap: change to standard description.
|
||||||
|
|
||||||
|
2008-11-23 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* configure.in: Post-release bump to 2.25.13.
|
||||||
|
|
||||||
|
2008-11-23 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* NEWS: 2.25.8 release.
|
||||||
|
|
||||||
|
2008-11-23 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* po/POTFILES.in: add new bindings file
|
||||||
|
|
||||||
|
2008-11-23 Daniel Macks <dmacks@netspace.org>
|
||||||
|
|
||||||
|
reviewed by: Thomas Thurman
|
||||||
|
|
||||||
|
* src/Makefile.am: reorder compiler flags so local includes come last.
|
||||||
|
Closes #562033.
|
||||||
|
|
||||||
|
2008-11-23 Daniel Macks <dmacks@netspace.org>
|
||||||
|
|
||||||
|
reviewed by: Thomas Thurman
|
||||||
|
|
||||||
|
* configure.in: only accept --enable-compositor if we find we can
|
||||||
|
actually composite. Closes #560990.
|
||||||
|
|
||||||
|
2008-11-23 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* src/core/display.c: remove apparently spurious warnings about
|
||||||
|
operations on window "none"
|
||||||
|
|
||||||
|
2008-11-23 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* src/core/util.c: Set _POSIX_C_SOURCE to 200112L as it should always
|
||||||
|
have been, in an attempt to close #561962.
|
||||||
|
|
||||||
|
2008-11-22 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* configure.in: Set -ansi so people stop complaining about C99.
|
||||||
|
|
||||||
|
2008-11-22 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* src/core/prefs.c: fix stupid infinite loop when GConf is turned off.
|
||||||
|
|
||||||
|
2008-11-22 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* src/core/prefs.c: fix two places where there was a warning
|
||||||
|
if GConf was turned off.
|
||||||
|
|
||||||
|
2008-11-22 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* src/core/all-keybindings.h: "backward", not "backwards" throughout.
|
||||||
|
|
||||||
|
2008-11-20 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* configure.in: turned on -Wall and -Werror in order to
|
||||||
|
trap as many problems as possible.
|
||||||
|
* src/ui/resizepopup.c: added correct #include.
|
||||||
|
* src/ui/theme-viewer.c: initialised variable.
|
||||||
|
* src/core/xprops.c: corrected cast.
|
||||||
|
* src/core/main.c: added warning if chdir() fails.
|
||||||
|
* src/core/schema-bindings.c: checking the return
|
||||||
|
result of fgets().
|
||||||
|
|
||||||
|
2008-11-20 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
Merged screen and window keybinding tables so that
|
||||||
|
we can use just one file for the both. Also incidentally
|
||||||
|
closes #528337. Further efficiencies of scale to come.
|
||||||
|
|
||||||
|
* src/include/prefs.h: replace META_PREF_*_KEYBINDINGS
|
||||||
|
with META_PREF_KEYBINDINGS
|
||||||
|
* src/core/keybindings.c: replace *_bindings with key_bindings
|
||||||
|
and similar throughout; all window-based functions are now
|
||||||
|
guaranteed to receive a window so don't need to check for
|
||||||
|
themselves
|
||||||
|
(find_handler): moved so it can also be called from
|
||||||
|
rebuild_binding_table
|
||||||
|
* src/core/display-private.h: replace *_bindings with key_bindings
|
||||||
|
* src/core/prefs.c: update_*_binding becomes update_key_binding;
|
||||||
|
(change_notify): tidy up references to "enormous if statement"
|
||||||
|
since it's almost entirely gone now
|
||||||
|
* src/core/all-keybindings.h: new merged version of
|
||||||
|
screen-bindings.h and window-bindings.h.
|
||||||
|
|
||||||
|
2008-11-16 David Trowbridge <trowbrds@gmail.com>
|
||||||
|
|
||||||
|
This change adds support for the new _NET_WM_FULLSCREEN_MONITORS
|
||||||
|
property and client message. This allows client applications to request
|
||||||
|
that a fullscreen window cover more than one monitor.
|
||||||
|
|
||||||
|
* src/include/boxes.h:
|
||||||
|
* src/core/boxes.c: Add meta_rectangle_union
|
||||||
|
|
||||||
|
* src/core/window-private.h:
|
||||||
|
* src/core/window.c:
|
||||||
|
(meta_window_new_with_attrs, meta_window_free, set_net_wm_state,
|
||||||
|
meta_window_update_fullscreen_monitors, meta_window_client_message): Add
|
||||||
|
MetaWindow property to store fullscreen monitors field, update
|
||||||
|
_NET_WM_FULLSCREEN_MONITORS property on windows, and handle client
|
||||||
|
message.
|
||||||
|
|
||||||
|
* src/core/atomnames.h: Add _NET_WM_FULLSCREEN_MONITORS atom.
|
||||||
|
|
||||||
|
* src/core/constraints.c (setup_constraint_info): If
|
||||||
|
_NET_WM_FULLSCREEN_MONITORS is interesting, use the data stored in
|
||||||
|
MetaWindow::fullscreen_monitors to determine the fullscreen area instead
|
||||||
|
of the basic xinerama_info area.
|
||||||
|
|
||||||
|
2008-11-11 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
Removed deprecated calls. Closes #560445.
|
||||||
|
|
||||||
|
* src/core/delete.c: remove deprecated g_strcasecmp.
|
||||||
|
* src/include/main.h: no actual deprecated call, but
|
||||||
|
a mention of one which was out of date.
|
||||||
|
|
||||||
|
2008-11-11 Maxim Ermilov <zaspire@rambler.ru>
|
||||||
|
|
||||||
|
Clean up #includes according to the GNOME Goal.
|
||||||
|
Closes #560449. Patch is 122467.
|
||||||
|
|
||||||
|
* src/core/place.c:
|
||||||
|
* src/ui/draw-workspace.h:
|
||||||
|
* src/ui/gradient.h:
|
||||||
|
* src/ui/metaaccellabel.c:
|
||||||
|
* src/ui/metaaccellabel.h:
|
||||||
|
* src/ui/preview-widget.c:
|
||||||
|
* src/ui/preview-widget.h:
|
||||||
|
* src/ui/resizepopup.c:
|
||||||
|
* src/ui/theme.c:
|
||||||
|
* src/ui/theme.h:
|
||||||
|
* src/ui/themewidget.h:
|
||||||
|
|
||||||
|
2008-11-10 Elijah Newren <newren gmail com>
|
||||||
|
|
||||||
|
* src/metacity.schemas.in.in: updated description of
|
||||||
|
raise_on_click:
|
||||||
|
http://bugzilla.gnome.org/show_bug.cgi?id=445447#c6
|
||||||
|
|
||||||
|
2008-11-08 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* configure.in: added dependency on Zenity
|
||||||
|
* src/core/keybindings.c: remove error_on_generic_command() and
|
||||||
|
error_on_terminal_command(); rewrite error_on_command
|
||||||
|
in terms of meta_show_dialog()
|
||||||
|
* src/core/util.c: add meta_show_dialog() to call Zenity
|
||||||
|
* src/include/util.h: ditto
|
||||||
|
|
||||||
|
2008-11-03 Olav Vitters <olav@bkor.dhs.org>
|
||||||
|
|
||||||
|
* src/ui/theme-parser.c: Fix build by readding accidentally removed
|
||||||
|
'}'.
|
||||||
|
|
||||||
|
2008-10-29 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* src/ui/theme-parser.c: variable names in messages should be
|
||||||
|
double-quoted. Closes #558309.
|
||||||
|
|
||||||
|
2008-10-28 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* src/include/screen-bindings.h: fix accidental name change of
|
||||||
|
run_command_terminal. Closes #557943.
|
||||||
|
|
||||||
|
2008-10-27 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* src/core/prefs.c (titlebar_handler, handle_preference_update_enum):
|
||||||
|
Add initialisation which I missed on the previous checkin. Also
|
||||||
|
an extra comment.
|
||||||
|
|
||||||
|
2008-10-27 Brian Cameron <brian.cameron@sun.com>
|
||||||
|
|
||||||
|
Fix some crashes with the new GDM 2.24. Closes #558058.
|
||||||
|
|
||||||
|
* src/ui/ui.c (meta_ui_parse_modifier): another null check
|
||||||
|
* src/core/prefs.c (titlebar_handler, button_layout_handler):
|
||||||
|
more null checks.
|
||||||
|
|
||||||
|
2008-10-26 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* src/core/prefs.c (mouse_button_mods_handler): Ignore values
|
||||||
|
of .../mouse_button_modifier key if the key's missing.
|
||||||
|
Closes Launchpad bug #258054, Launchpad bug #266929.
|
||||||
|
|
||||||
|
2008-10-23 Frederic Peters <fpeters@0d.be>
|
||||||
|
|
||||||
|
* doc/creating_themes/C/creating-metacity-themes.xml: added missing @id
|
||||||
|
on <book> top element.
|
||||||
|
|
||||||
|
2008-10-23 Frederic Peters <fpeters@0d.be>
|
||||||
|
|
||||||
|
* doc/creating_themes/Makefile.am:
|
||||||
|
* doc/creating_themes/C/creating_metacity_themes.xml: renamed document
|
||||||
|
to creating-metacity-themes to match other manuals usage of dashes.
|
||||||
|
|
||||||
|
2008-10-23 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* configure.in: Post-release bump to 2.25.8.
|
||||||
|
|
||||||
|
2008-10-23 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* NEWS: 2.25.5 release.
|
||||||
|
|
||||||
|
2008-10-23 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* src/core/schema-bindings.c: fix stupid thinko which
|
||||||
|
caused defaults to be incorrect
|
||||||
|
* src/include/window-bindings.h: "space" needs to be
|
||||||
|
lowercase
|
||||||
|
|
||||||
|
2008-10-23 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
Support _NET_WM_STATE_STICKY (i.e. allow third-party apps to decide
|
||||||
|
whether a window is on all workspaces). Bug found by Ka-Hing
|
||||||
|
Cheung. Closes #557536.
|
||||||
|
|
||||||
|
* src/core/window.c (set_net_wm_state): report it
|
||||||
|
* src/core/window.c (meta_window_client_message): set sticky
|
||||||
|
if we receive it
|
||||||
|
* src/core/window-props.c: set sticky if we find it
|
||||||
|
* src/core/atomnames.h: add _NET_WM_STATE_STICKY
|
||||||
|
|
||||||
|
2008-10-22 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* src/core/schema-bindings.c: support builds outside tree properly.
|
||||||
|
* src/Makefile.am: ditto.
|
||||||
|
* po/POTFILES.skip: ditto.
|
||||||
|
|
||||||
|
2008-10-22 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* configure.in: Post-release bump to 2.25.5.
|
||||||
|
|
||||||
|
2008-10-22 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* NEWS: 2.25.3 release.
|
||||||
|
|
||||||
|
2008-10-22 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* configure.in: bump to 2.25.3 (thought the release script
|
||||||
|
had already done this)
|
||||||
|
|
||||||
|
2008-10-22 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
Fixes to make distcheck work again.
|
||||||
|
|
||||||
|
* src/Makefile.am: include *-binding.h, and make the schema
|
||||||
|
building work when builddir != srcdir
|
||||||
|
* po/POTFILES.in (src/core/keybindings.): include *-binding.h
|
||||||
|
|
||||||
|
2008-10-22 Götz Waschk <waschk@mandriva.org>
|
||||||
|
|
||||||
|
* configure.in: add libm reference. Closes #557357.
|
||||||
|
|
||||||
|
2008-10-22 Murray Cumming <murrayc@murrayc.com>
|
||||||
|
|
||||||
|
* doc/creating_themes/C/creating_metacity_themes.xml:
|
||||||
|
Fixed various tags to make this validate.
|
||||||
|
Bug #557337
|
||||||
|
|
||||||
|
2008-10-22 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* NEWS: 2.25.2 release.
|
||||||
|
|
||||||
|
2008-10-22 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* NEWS: 2.25.2 release.
|
||||||
|
|
||||||
|
2008-10-22 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* NEWS: 2.25.2 release.
|
||||||
|
|
||||||
|
2008-10-22 Joe Marcus Clarke <marcus@freebsd.org>
|
||||||
|
|
||||||
|
* src/core/main.c (meta_finalize, sigterm_handler): new functions
|
||||||
|
* src/core/main.c (main): add sigterm_handler in case we receive
|
||||||
|
a SIGTERM. Closes #553980.
|
||||||
|
|
||||||
|
2008-10-22 Matthew Martin <mtt.martin@gmail.com>
|
||||||
|
|
||||||
|
* src/core/window.c (meta_window_set_demands_attention): minimised
|
||||||
|
windows are necessarily obscured. Closes #528927.
|
||||||
|
|
||||||
|
2008-10-22 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
Slight transformation of the x-macros used in keybindings
|
||||||
|
to make them clearer: write handler names out in full
|
||||||
|
because the old suffix system was confusing to people
|
||||||
|
skim-reading, and switched the order of the last two
|
||||||
|
parameters so more would generally fit on a screen.
|
||||||
|
|
||||||
|
* src/core/keybindings.c, src/core/schema-bindings.c
|
||||||
|
src/core/prefs.c: sympathy changes
|
||||||
|
* src/core/window-bindings.h, src/core/screen-bindings.h:
|
||||||
|
transformation as above
|
||||||
|
|
||||||
|
2008-10-21 Christian Persch <chpe@gnome.org>
|
||||||
|
|
||||||
|
* src/Makefile.am: fix build when schemas are not installed.
|
||||||
|
Closes #557335.
|
||||||
|
|
||||||
|
2008-10-21 Tomas Frydrych <tf@linux.intel.com>
|
||||||
|
|
||||||
|
* src/core/screen-bindings.h: Fix off-by-one error.
|
||||||
|
* src/core/window-bindings.h: Fix off-by-one error.
|
||||||
|
Closes #557201.
|
||||||
|
|
||||||
|
2008-10-18 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
During a discussion with Rodney Dawes about making life easier
|
||||||
|
for the translators, he pointed out that the short and long
|
||||||
|
forms of almost all the keybindings say much the same thing
|
||||||
|
in different words. I believe this is an unconscionable burden
|
||||||
|
to place on translators, and have therefore merged the short
|
||||||
|
and long descriptions into the short description. The long
|
||||||
|
is now a general explanation of the format, plus possibly a
|
||||||
|
notice about reversibility. Closes #469361, and should solve
|
||||||
|
the l10n issue previously mentioned.
|
||||||
|
|
||||||
|
* src/core/keybindings.c: reflect changes in *-bindings.h
|
||||||
|
* src/core/schema-bindings.c: reflect changes in *-bindings.h
|
||||||
|
* src/core/prefs.c: reflect changes in *-bindings.h
|
||||||
|
* src/core/window-bindings.h: Add flags field, always the same
|
||||||
|
currently, so that it's the same as screen-bindings.h.
|
||||||
|
Also, lose ONLY_BOUND_BY_DEFAULT, since we already had a
|
||||||
|
rather more elegant way to perform the same effect.
|
||||||
|
And merge the long and short descriptions.
|
||||||
|
* src/core/screen-bindings.h (, item): Merge the long and
|
||||||
|
short descriptions.
|
||||||
|
|
||||||
|
2008-10-17 Murray Cumming <murrayc@murrayc.com>
|
||||||
|
|
||||||
|
* configure.in: Call GNOME_DOC_INIT() so we can use the gnome-doc-utils
|
||||||
|
variables in our Makefile.am:
|
||||||
|
* doc/Makefile.am:
|
||||||
|
* doc/creating_themes/Makefile.am
|
||||||
|
* doc/creating_themes/C/creating_metacity_themes.xml:
|
||||||
|
Added this new DocBook document, converted from the HTML here
|
||||||
|
http://blogs.gnome.org/metacity/2008/05/30/themes/
|
||||||
|
This will be installed for yelp and can be translated and hosted on
|
||||||
|
library.gnome.org.
|
||||||
|
|
||||||
|
2008-10-15 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
Since Patrick Niklaus's checkin of 2008-08-14 dealt with windows with
|
||||||
|
no icons not using fallback icons, we don't need fallback icons.
|
||||||
|
|
||||||
|
* src/ui/theme.h: remove fallback icons from struct.
|
||||||
|
* src/core/iconcache.c (meta_read_icons): don't look for fallbacks.
|
||||||
|
* src/*/ui.[ch] (meta_ui_get_fallback_icons): removed
|
||||||
|
* src/ui/theme-parser.c (typedef, parse_toplevel_element): don't
|
||||||
|
parse fallback specifications.
|
||||||
|
|
||||||
|
2008-10-13 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* po/POTFILES.in: add screen-bindings.h
|
||||||
|
|
||||||
|
2008-10-13 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* po/POTFILES.in: raw schemas is now .in.in
|
||||||
|
* po/LINGUAS: add Latin
|
||||||
|
|
||||||
|
2008-10-12 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
Make the bindings in src/core/*-bindings.h generate
|
||||||
|
GConf schemas too. Note that there's an i18n issue
|
||||||
|
(documented in schema-bindings.c) which will be fixed
|
||||||
|
next checkin.
|
||||||
|
|
||||||
|
* src/core/schema-bindings.c: major fixup to make it
|
||||||
|
ready for use as part of the actual build process.
|
||||||
|
* src/Makefile.am: added magic to make it call schema-bindings
|
||||||
|
after it builds it.
|
||||||
|
* src/core/window-bindings.h: added comments;
|
||||||
|
also, window menu was listed variously as alt-Space
|
||||||
|
and alt-Print; it should have been alt-Space.
|
||||||
|
* src/metacity.schemas.in.in: renamed from s/\.in$//,
|
||||||
|
sentinel added for the generated bindings,
|
||||||
|
warning at the top now untrue, and removed.
|
||||||
|
|
||||||
|
2008-10-12 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
Fix annoying bug where alt-tab and friends would jump
|
||||||
|
backwards a space on initial movement.
|
||||||
|
|
||||||
|
* src/core/screen-bindings.h: although reversed bindings
|
||||||
|
are necessarily reversible, don't set both bits in the
|
||||||
|
constant, or when we test for them we'll get confused.
|
||||||
|
|
||||||
|
2008-10-12 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
An attempt to make life a little easier for our beloved translators;
|
||||||
|
this has the same behaviour as before, but removes over thirty
|
||||||
|
translation strings.
|
||||||
|
|
||||||
|
* src/core/session.c (start_element_handler): all "attribute not found
|
||||||
|
on element" strings are identical
|
||||||
|
* src/ui/theme-parser.c (locate_attributes): allow attribute names to
|
||||||
|
be preceded with "!" (in the code) to show they're required.
|
||||||
|
(parse_aspect_ratio, parse_distance, parse_toplevel_element,
|
||||||
|
parse_style_element, parse_gradient_element, static, parse_border,
|
||||||
|
parse_style_set_element, parse_draw_op_element): use the new "!"
|
||||||
|
prefix for locate_attributes(), or in some cases just the identical
|
||||||
|
constant, for generating this error.
|
||||||
|
* src/ui/theme.c (check_state, meta_theme_validate): add
|
||||||
|
translator comments
|
||||||
|
* src/ui/resizepopup.c (update_size_window): add
|
||||||
|
translator comments
|
||||||
|
|
||||||
2008-10-06 William Lachance <wrlach@gmail.com>
|
2008-10-06 William Lachance <wrlach@gmail.com>
|
||||||
|
|
||||||
Pass modified mouse button events down to panel windows
|
Pass modified mouse button events down to panel windows
|
||||||
|
131
NEWS
131
NEWS
@ -1,3 +1,134 @@
|
|||||||
|
2.25.55
|
||||||
|
=======
|
||||||
|
|
||||||
|
Thanks to Erwann Chenede for improvements in this version.
|
||||||
|
|
||||||
|
- Fix build on Solaris (Erwann) (#564123)
|
||||||
|
|
||||||
|
Translations
|
||||||
|
Mattias Põldaru (et), Luca Ferretti (it)
|
||||||
|
|
||||||
|
2.25.34
|
||||||
|
=======
|
||||||
|
|
||||||
|
Thanks to Matt Kraai for improvements in this version.
|
||||||
|
|
||||||
|
- Fixes to Thomas's earlier fixes (Matt) (#562939)
|
||||||
|
|
||||||
|
Translations
|
||||||
|
None
|
||||||
|
|
||||||
|
2.25.21
|
||||||
|
=======
|
||||||
|
|
||||||
|
Thanks to Thomas Thurman for improvements in this version.
|
||||||
|
|
||||||
|
- Fixes to allow building without compositor again (Thomas)
|
||||||
|
- Fixes for -Wall problems (Thomas)
|
||||||
|
- Various tool updates (Thomas)
|
||||||
|
|
||||||
|
Translations: none
|
||||||
|
|
||||||
|
|
||||||
|
2.25.13
|
||||||
|
=======
|
||||||
|
|
||||||
|
Thanks to Thomas Thurman for improvements in this version.
|
||||||
|
|
||||||
|
- Add casts to fix failure to build from source on 64bit hosts (Thomas) (#562106)
|
||||||
|
- Added script to produce annoucements (Thomas)
|
||||||
|
|
||||||
|
Translations
|
||||||
|
Jorge González (es)
|
||||||
|
|
||||||
|
2.25.8
|
||||||
|
======
|
||||||
|
|
||||||
|
Thanks to Brian Cameron, Maxim Ermilov, Daniel Macks, Elijah Newren, Frederic
|
||||||
|
Peters, Thomas Thurman, David Trowbridge, and Olav Vitters for improvements in
|
||||||
|
this version.
|
||||||
|
|
||||||
|
- Reorder compiler flags (Daniel) (#562033)
|
||||||
|
- Fix compositor switch (Daniel) (#560990)
|
||||||
|
- Remove spurious warnings about operations on window "none" (Thomas)
|
||||||
|
- Fix _POSIX_C_SOURCE which was breaking OS X builds (Thomas) (#561962)
|
||||||
|
- -Werror -Wall and -ansi are now standard compile flags (Thomas)
|
||||||
|
- Merge screen and window keybindings files; fix minor alt-tab bug
|
||||||
|
in the process (Thomas) (#528337)
|
||||||
|
- Support _NET_WM_FULLSCREEN_MONITORS (David)
|
||||||
|
- Remove some deprecated calls (Thomas) (#560445)
|
||||||
|
- Clean up #includes (Maxim) (#560449)
|
||||||
|
- Update description of raise_on_click (Elijah)
|
||||||
|
- First dialogue delegated to zenity (Thomas)
|
||||||
|
- fix theme-parser typo (Olav)
|
||||||
|
- double-quote variable names in messages (Thomas) (#558309)
|
||||||
|
- fix accidental renaming of run_command_terminal (Thomas) (#557943)
|
||||||
|
- some null checks; problems exposed by new GDM (Brian) (#558058)
|
||||||
|
- ignore mouse button modifier if it's missing (Thomas) (Launchpad 258054, Launchpad 266929)
|
||||||
|
- fix docbook markup (Frederic)
|
||||||
|
|
||||||
|
Translations
|
||||||
|
Astur (ast), Jorge González (es), Thomas Thurman (la), Leonardo Ferreira
|
||||||
|
Fontenelle (pt_BR), Daniel Nylander (sv)
|
||||||
|
|
||||||
|
2.25.5
|
||||||
|
======
|
||||||
|
|
||||||
|
Thanks to Thomas Thurman for improvements in this version.
|
||||||
|
|
||||||
|
- Allow third-party apps to decide whether a window appears
|
||||||
|
on all workspaces (Thomas) (#557536)
|
||||||
|
- Fixed keybindings script (again) (Thomas)
|
||||||
|
|
||||||
|
Translations
|
||||||
|
David Planella (ca), Robert Millan (ca@valencia)
|
||||||
|
|
||||||
|
2.25.3
|
||||||
|
======
|
||||||
|
|
||||||
|
Brown paper bag release which fixes numerous build problems from last night's
|
||||||
|
release of 2.25.2. Apologies.
|
||||||
|
|
||||||
|
Thanks to Murray Cumming, Thomas Thurman, and Götz Waschk for improvements
|
||||||
|
in this version.
|
||||||
|
|
||||||
|
- Fix distcheck (Thomas) (#557356)
|
||||||
|
- add libm reference (Götz) (#557357)
|
||||||
|
- fix docbook tags (Murray) (#557337)
|
||||||
|
|
||||||
|
Translations
|
||||||
|
Yavor Doganov (bg), David Planella (ca), Robert Millan (ca@valencia), Kenneth
|
||||||
|
Nielsen (da), Hendrik Richter (de), Ivar Smolin (et), Claude Paroz (fr), Seán de
|
||||||
|
Búrca (ga), Launchpad Translations Administrators (hr), Gabor Kelemen (hu),
|
||||||
|
Thomas Thurman (la), Žygimantas Beručka (lt), Kjartan Maraas (nb), Duarte
|
||||||
|
Loreto (pt), Djavan Fagundes (pt_BR), Mugurel Tudor (ro), Pavol Šimo (sk),
|
||||||
|
Laurent Dhima (sq), Горан Ракић (sr), Theppitak Karoonboonyanan (th),
|
||||||
|
Funda Wang (zh_CN)
|
||||||
|
|
||||||
|
2.25.2
|
||||||
|
======
|
||||||
|
|
||||||
|
Thanks to Joe Marcus Clarke, Murray Cumming, Tomas Frydrych, William Lachance,
|
||||||
|
Matthew Martin, Christian Persch, Thomas Thurman, and Vincent Untz for
|
||||||
|
improvements in this version.
|
||||||
|
|
||||||
|
- Add handler for SIGTERM (Joe) (#553980)
|
||||||
|
- Minimised windows are necessarily obscured (Matthew) (#528927)
|
||||||
|
- Build fixes with the above (Christian, Tomas, Thomas) (#557335)
|
||||||
|
(#557201) (#469361)
|
||||||
|
- Changed keybindings to be in a single place (Thomas) (#469361)
|
||||||
|
- Add new document about themes (Murray)
|
||||||
|
- Remove obsolete support for fallback icons (Thomas)
|
||||||
|
- Pass modified mouse events to panels (William) (#554428)
|
||||||
|
- Change where desktop files should go (Vincent) (#549479)
|
||||||
|
|
||||||
|
Translations
|
||||||
|
Yavor Doganov (bg), David Planella (ca), Kenneth Nielsen (da), Hendrik
|
||||||
|
Richter (de), Ivar Smolin (et), Claude Paroz (fr), Seán de Búrca (ga), Launchpad
|
||||||
|
Translations Administrators (hr), Gabor Kelemen (hu), Thomas Thurman (la),
|
||||||
|
Žygimantas Beručka (lt), Kjartan Maraas (nb), Duarte Loreto (pt), Djavan
|
||||||
|
Fagundes (pt_BR), Mugurel Tudor (ro), Pavol Šimo (sk), Laurent Dhima (sq),
|
||||||
|
Горан Ракић (sr), Theppitak Karoonboonyanan (th), Funda Wang (zh_CN)
|
||||||
2.25.1
|
2.25.1
|
||||||
======
|
======
|
||||||
|
|
||||||
|
44
configure.in
44
configure.in
@ -4,12 +4,12 @@ m4_define([metacity_major_version], [2])
|
|||||||
m4_define([metacity_minor_version], [25])
|
m4_define([metacity_minor_version], [25])
|
||||||
# Fibonacci sequence for micro version numbering:
|
# Fibonacci sequence for micro version numbering:
|
||||||
# 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987
|
# 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987
|
||||||
m4_define([metacity_micro_version], [2])
|
m4_define([metacity_micro_version], [55])
|
||||||
|
|
||||||
m4_define([metacity_version],
|
m4_define([metacity_version],
|
||||||
[metacity_major_version.metacity_minor_version.metacity_micro_version])
|
[metacity_major_version.metacity_minor_version.metacity_micro_version])
|
||||||
|
|
||||||
m4_define([metacity_clutter_plugin_api_version], [1])
|
m4_define([metacity_clutter_plugin_api_version], [2])
|
||||||
|
|
||||||
AC_INIT([metacity], [metacity_version],
|
AC_INIT([metacity], [metacity_version],
|
||||||
[http://bugzilla.gnome.org/enter_bug.cgi?product=metacity])
|
[http://bugzilla.gnome.org/enter_bug.cgi?product=metacity])
|
||||||
@ -231,17 +231,8 @@ fi
|
|||||||
have_xrender=no
|
have_xrender=no
|
||||||
|
|
||||||
XCOMPOSITE_VERSION=0.2
|
XCOMPOSITE_VERSION=0.2
|
||||||
AC_MSG_CHECKING([Xcomposite >= $XCOMPOSITE_VERSION])
|
|
||||||
if $PKG_CONFIG --atleast-version $XCOMPOSITE_VERSION xcomposite; then
|
|
||||||
have_xcomposite=yes
|
|
||||||
else
|
|
||||||
have_xcomposite=no
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT($have_xcomposite)
|
|
||||||
|
|
||||||
if test x$enable_compositor = xyes; then
|
if test x$enable_compositor = xyes; then
|
||||||
have_xcomposite=yes
|
have_xcomposite=yes
|
||||||
echo "CompositeExt support forced on"
|
|
||||||
elif test x$enable_compositor = xauto; then
|
elif test x$enable_compositor = xauto; then
|
||||||
echo "Building compositing manager by default now."
|
echo "Building compositing manager by default now."
|
||||||
have_xcomposite=yes
|
have_xcomposite=yes
|
||||||
@ -262,9 +253,18 @@ fi
|
|||||||
AM_CONDITIONAL(WITH_CLUTTER, test "$have_clutter" = "yes")
|
AM_CONDITIONAL(WITH_CLUTTER, test "$have_clutter" = "yes")
|
||||||
|
|
||||||
if test x$have_xcomposite = xyes; then
|
if test x$have_xcomposite = xyes; then
|
||||||
echo "Building with CompositeExt"
|
AC_MSG_CHECKING([Xcomposite >= $XCOMPOSITE_VERSION])
|
||||||
|
if $PKG_CONFIG --atleast-version $XCOMPOSITE_VERSION xcomposite; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([no. Use --disable-compositor to disable.])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x$have_xcomposite = xyes; then
|
||||||
METACITY_PC_MODULES="$METACITY_PC_MODULES xcomposite >= $XCOMPOSITE_VERSION xfixes xrender xdamage"
|
METACITY_PC_MODULES="$METACITY_PC_MODULES xcomposite >= $XCOMPOSITE_VERSION xfixes xrender xdamage"
|
||||||
AC_DEFINE(HAVE_COMPOSITE_EXTENSIONS, , [Building with compositing manager support])
|
AC_DEFINE(HAVE_COMPOSITE_EXTENSIONS, 1, [Building with compositing manager support])
|
||||||
|
echo "Building with compositing manager"
|
||||||
|
|
||||||
## force on render also
|
## force on render also
|
||||||
have_xrender=yes
|
have_xrender=yes
|
||||||
@ -466,7 +466,7 @@ if test "x$found_xsync" = "xyes"; then
|
|||||||
AC_DEFINE(HAVE_XSYNC, , [Have the Xsync extension library])
|
AC_DEFINE(HAVE_XSYNC, , [Have the Xsync extension library])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
METACITY_LIBS="$METACITY_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
METACITY_LIBS="$METACITY_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lm"
|
||||||
METACITY_MESSAGE_LIBS="$METACITY_MESSAGE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
METACITY_MESSAGE_LIBS="$METACITY_MESSAGE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
||||||
METACITY_WINDOW_DEMO_LIBS="$METACITY_WINDOW_DEMO_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
METACITY_WINDOW_DEMO_LIBS="$METACITY_WINDOW_DEMO_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
||||||
METACITY_PROPS_LIBS="$METACITY_PROPS_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
METACITY_PROPS_LIBS="$METACITY_PROPS_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
||||||
@ -524,16 +524,30 @@ else
|
|||||||
GCONF_SCHEMAS_INSTALL_FALSE=
|
GCONF_SCHEMAS_INSTALL_FALSE=
|
||||||
fi
|
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])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_ARG_ENABLE(debug,
|
AC_ARG_ENABLE(debug,
|
||||||
[ --enable-debug enable debugging],,
|
[ --enable-debug enable debugging],,
|
||||||
enable_debug=no)
|
enable_debug=no)
|
||||||
if test "x$enable_debug" = "xyes"; then
|
if test "x$enable_debug" = "xyes"; then
|
||||||
CFLAGS="$CFLAGS -g -O -Wall"
|
CFLAGS="$CFLAGS -g -O"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Warnings are there for a reason
|
||||||
|
if test "x$GCC" = "xyes"; then
|
||||||
|
CFLAGS="$CFLAGS -Wall -Werror -ansi"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use gnome-doc-utils:
|
||||||
|
GNOME_DOC_INIT([0.8.0])
|
||||||
|
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
Makefile
|
Makefile
|
||||||
doc/Makefile
|
doc/Makefile
|
||||||
|
doc/creating_themes/Makefile
|
||||||
doc/man/Makefile
|
doc/man/Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/wm-tester/Makefile
|
src/wm-tester/Makefile
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
SUBDIRS = man
|
SUBDIRS = man creating_themes
|
||||||
|
|
||||||
EXTRA_DIST=theme-format.txt metacity-theme.dtd dialogs.txt code-overview.txt \
|
EXTRA_DIST=theme-format.txt metacity-theme.dtd dialogs.txt code-overview.txt \
|
||||||
how-to-get-focus-right.txt
|
how-to-get-focus-right.txt
|
||||||
|
286
doc/creating_themes/C/creating-metacity-themes.xml
Normal file
286
doc/creating_themes/C/creating-metacity-themes.xml
Normal file
@ -0,0 +1,286 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||||
|
"http://docbook.org/docbook/xml/4.5/docbookx.dtd" [
|
||||||
|
]>
|
||||||
|
|
||||||
|
<book id="index">
|
||||||
|
|
||||||
|
<bookinfo>
|
||||||
|
|
||||||
|
<title>Understanding Metacity Themes</title>
|
||||||
|
|
||||||
|
<authorgroup>
|
||||||
|
<author>
|
||||||
|
<firstname>Thomas</firstname>
|
||||||
|
<surname>Thurman</surname>
|
||||||
|
</author>
|
||||||
|
</authorgroup>
|
||||||
|
|
||||||
|
<abstract>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
We very much appreciate any reports of inaccuracies or other errors in
|
||||||
|
this document. Contributions are also most welcome. Post your
|
||||||
|
suggestions, critiques or addenda to the <ulink
|
||||||
|
url="mailto:tthurman@gnome.org">team</ulink>.</para>
|
||||||
|
|
||||||
|
</abstract>
|
||||||
|
|
||||||
|
<copyright>
|
||||||
|
<year>2008</year>
|
||||||
|
<holder>Thomas Thurman</holder>
|
||||||
|
</copyright>
|
||||||
|
|
||||||
|
<legalnotice>
|
||||||
|
<para>
|
||||||
|
Permission is granted to copy, distribute and/or modify this document
|
||||||
|
under the terms of the GNU Free Documentation License, Version 1.2
|
||||||
|
or any later version published by the Free Software Foundation;
|
||||||
|
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||||
|
You may obtain a copy of the GNU Free Documentation License from the Free Software Foundation by visiting their Web site or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
</para>
|
||||||
|
</legalnotice>
|
||||||
|
|
||||||
|
</bookinfo>
|
||||||
|
|
||||||
|
<chapter id="sec-introduction">
|
||||||
|
<title>Introduction</title>
|
||||||
|
|
||||||
|
<para>This is an article about how to theme Metacity. It is a work in progress, and I have had to dig deeply to find some answers; I may well have made mistakes and I welcome corrections and suggestions.</para>
|
||||||
|
<para>GNOME lets you theme a bunch of different things, but we're only talking about <literal>window border</literal> themes here, which some people call Metacity themes; <ulink url="http://en.wikipedia.org/wiki/Metacity#Themes">Wikipedia begins a sentence</ulink> with "Despite the incomplete state of Metacity theme development documentation", and though there <emphasis>is</emphasis> <ulink url="http://svn.gnome.org/viewvc/metacity/trunk/doc/theme-format.txt?view=markup">documentation in the source</ulink>, apparently not many people find it, and it's written more for programmers than theme designers. Glynn Foster also wrote <ulink url="http://developer.gnome.org/doc/tutorials/metacity/metacity-themes.html">a very good introduction to Metacity themes</ulink> (<ulink url="http://home.arcor.de/rybaczyk/documents/tutorials/metacity/metacity-themes.de.html">[de]</ulink>) six years ago, but things have changed a little since then. <ulink url="http://lists.freedesktop.org/archives/compiz/2006-September/000445.html">Metacity themes can also be used by Compiz</ulink>, and perhaps by other window managers for all I know.</para>
|
||||||
|
|
||||||
|
<para>So, a Metacity theme is a set of instructions about how to "decorate" (draw the borders around) a window. Presumably you don't want to style all windows identically, so the format lets you specify details for different kinds of window:</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term>state:</term><listitem><para>Every window must be in exactly one of these states: <literal>normal</literal>, <literal>dialog</literal>, <literal>modal dialog</literal> (i.e. a dialogue which means you can't interact with the rest of the program while it's up), <literal>menu</literal> (torn off from the main application, not that people do that much these days), <literal>utility</literal> (that is, palettes and toolboxes and things), and <literal>border</literal>. X also allows a window to explicitly ask to be undecorated, but of course we don't provide for those in a list of decoration instructions.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>focused</term><listitem><para>Every window is either the active window (which X people call "focused"), or it isn't.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>maximized</term><listitem><para>Every window is either (fully) maximised (horizontal and vertical only don't count), or it isn't.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>shaded</term><listitem><para>Every window is either rolled up to show just its titlebar (which techies call "shaded" for some reason I can't fathom), or it isn't.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><emphasis>If a window is not fully maximised and not shaded,</emphasis> it either allows horizontal resizing, or it doesn't.</para></listitem>
|
||||||
|
<listitem><para><emphasis>If a window is not fully maximised and not shaded,</emphasis> it either allows vertical resizing, or it doesn't.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter>
|
||||||
|
<title>What's in the file</title>
|
||||||
|
|
||||||
|
<para>The files must be called either</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>~/.themes/<varname>N</varname>/metacity-1/metacity-theme-<varname>V</varname>.xml
|
||||||
|
for a theme used only by you, or</para></listitem>
|
||||||
|
<listitem><para>/usr/share/themes/<varname>N</varname>/metacity-1/metacity-theme-<varname>V</varname>.xml
|
||||||
|
for a theme installed for all users.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>where <varname>N</varname> is the name of the theme and <varname>V</varname> is the version of the format. Version 2, <ulink url="http://svn.gnome.org/viewvc/metacity?view=revision&revision=2973">introduced in October 2006</ulink>, adds a few extra features, but it's rarely used. Version 1 is the original format. The formats are fixed once they're stable for both backwards and forwards compatibility; <ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=482165">new features</ulink> can't be added without introducing a new version number, which is why improvements come out rarely and in large clumps. <literal>metacity-1</literal> in the names is a fossil and doesn't mean version 1 of anything.</para>
|
||||||
|
|
||||||
|
<para>The metacity-theme-V.xml files are <ulink url="http://blogs.gnome.org/tthurman/2008/02/14/gmarkup/">GMarkup files</ulink>, which are very similar to XML. For now, you actually have to write these in a text editor or something; you can either start with a blank page, or modify a theme someone else has made. (I am thinking of writing a general theme editor program, but that'll have to wait until I've reduced Metacity's open bug queue a little.) If you want to see a fully-fledged one, you can look at <ulink url="http://svn.gnome.org/viewvc/metacity/trunk/src/themes/Atlanta/metacity-theme-1.xml?view=markup">the current version of "Atlanta"</ulink>, one of the simplest themes, but even that is quite complicated-looking at first.</para>
|
||||||
|
<para>So, let's talk about what actually goes inside the files. As in any XML file, <!-<!-- x -->- … <!-- x -->> are comments. At its most basic, it would go:</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<programlisting>
|
||||||
|
<metacity_theme>
|
||||||
|
<!-<!-- x -->- Helper stuff: -<!-- x -->->
|
||||||
|
<info …> <!-<!-- x -->- to be explained -<!-- x -->->
|
||||||
|
<constant …> <!-<!-- x -->- maybe; to be explained -<!-- x -->->
|
||||||
|
|
||||||
|
<draw_ops …> <!-<!-- x -->- maybe; to be explained -<!-- x -->->
|
||||||
|
|
||||||
|
<!-<!-- x -->- Things we build the top level onto: -<!-- x -->->
|
||||||
|
<frame_geometry …> <!-<!-- x -->- to be explained -<!-- x -->->
|
||||||
|
|
||||||
|
<frame_style …> <!-<!-- x -->- to be explained -<!-- x -->->
|
||||||
|
<frame_style_set …> <!-<!-- x -->- to be explained -<!-- x -->->
|
||||||
|
|
||||||
|
<!-<!-- x -->- And the top level: -<!-- x -->->
|
||||||
|
|
||||||
|
<window type="normal" style_set="…" />
|
||||||
|
<window type="dialog" style_set="…" />
|
||||||
|
<window type="modal_dialog" style_set="…" />
|
||||||
|
|
||||||
|
<window type="menu" style_set="…" />
|
||||||
|
<window type="utility" style_set="…" />
|
||||||
|
<window type="border" style_set="…" />
|
||||||
|
|
||||||
|
</metacity_theme>
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter>
|
||||||
|
<title>Matching windows</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term>window</term><listitem><para>You see that at the top level we have a list of <window> tags, one for each window state we discussed above. The style_set argument of each of these gives the name of a frame_style_set.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>frame_style_set:</term><listitem><para>tells Metacity how to draw windows according to whether they're focused or not, maximised or not, shaded or not, and allowing resizing vertically, horizontally, both, or neither. It looks like this:</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<programlisting>
|
||||||
|
<frame_style_set>
|
||||||
|
<frame focus="F" state="S" resize="R" style="N"/>
|
||||||
|
<frame… />
|
||||||
|
|
||||||
|
…
|
||||||
|
</frame_style_set>
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>where:</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term>F</term><listitem><para>is yes for focused, no for unfocused.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>S</term><listitem><para>combines the shaded and maximized flags: normal, maximized, shaded, or maximized_and_shaded.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>R</term><listitem><para>represents resize permissions that the window gives us: none, vertical, horizontal, or both. Frame settings for maximised windows, which can't be resized, don't have this attribute.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<varname>N</varname> is the name of a <literal>frame_style</literal> to apply to a window which has these attributes.</para>
|
||||||
|
|
||||||
|
<para>A <literal>frame_style_set</literal> tag may also have a "parent" tag, which should be the name of another <literal>frame_style_set</literal>. This means that if Metacity wants to know about a kind of window which that <literal>frame_style_set</literal> doesn't describe, it should look in the parent. Most of the more complicated tags in Metacity theme files also have a "parent" attribute which work the same way. This is particularly useful because, taken together, all the <literal>frame_style_set</literal>s in a theme file must be capable of matching every possible kind of window; if a window turns up that they can't match, there will be an error at runtime.</para>
|
||||||
|
|
||||||
|
<para>Let's recap what we've seen so far. The combination of a <literal>window</literal>, which matches a window's state (normal, dialog, and so forth), with an entry in the corresponding <literal>frame_style_set</literal>, which matches its focus, shadedness, maximisedness, and resize permissions where relevant, will allow you to make a list of rules to match any window against. The next piece of this puzzle lets you specify what Metacity should do with such windows once it's matched them.</para>
|
||||||
|
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter>
|
||||||
|
<title>Actually drawing stuff</title>
|
||||||
|
|
||||||
|
<para><literal>frame_style:</literal> This is probably the most complicated part of the whole system. A <literal>frame_style</literal> a series of <emphasis><literal>piece</literal></emphasis>s and <emphasis><literal>button</literal></emphasis>s. It looks like this:</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<programlisting>
|
||||||
|
<frame_style name="…" geometry="G">
|
||||||
|
<piece position="P">
|
||||||
|
<draw_ops>
|
||||||
|
</draw_ops>
|
||||||
|
</piece>
|
||||||
|
…
|
||||||
|
<button function="F" state="S" draw_ops="D"/>
|
||||||
|
|
||||||
|
<draw_ops>
|
||||||
|
</draw_ops>
|
||||||
|
</button>
|
||||||
|
…
|
||||||
|
</frame_style>
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>The <literal>pieces</literal> are pieces of the window frame. When Metacity draws a window frame, it renders its various pieces always in the same order. The bolded parts are all the possible values of P:</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>the <literal>entire_background</literal>, covering the whole frame</para></listitem>
|
||||||
|
|
||||||
|
<listitem><para>the <literal>titlebar</literal>, covering the entire background of the titlebar</para></listitem>
|
||||||
|
<listitem><para>the <literal>titlebar_middle</literal>, the part of the titlebar that doesn't touch its edges</para></listitem>
|
||||||
|
<listitem><para>the <literal>left_titlebar_edge</literal>, <literal>right_titlebar_edge</literal>, <literal>top_titlebar_edge</literal>, and <literal>bottom_titlebar_edge</literal></para></listitem>
|
||||||
|
|
||||||
|
<listitem><para>the <literal>title</literal>, just exactly that area which is covered by the text on the titlebar</para></listitem>
|
||||||
|
<listitem><para>the <literal>left_edge</literal>, <literal>right_edge</literal>, and <literal>bottom_edge</literal> of the frame (yes, there is no top_edge: it's identical to top_titlebar_edge, isn't it?)</para></listitem>
|
||||||
|
<listitem><para>the <literal>overlay</literal>, which covers everything– the same as entire_background, but done last instead of first.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para><emphasis>What</emphasis> Metacity draws in these pieces is decided by the theme. If a <literal>frame_style</literal> or its parents don't specify a particular piece, nothing will be drawn for that piece. You have two ways to specify what to draw: one is that the <literal>piece</literal> tag can have a <literal>draw_ops</literal> tag inside it which lists a sequence of drawing operations in Metacity's custom format. <ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=107012">You might ask why we don't use SVG</ulink>; one answer is that SVG support wasn't very strong when this format was designed, and another answer is that these days you can use SVG all you like; just include it as an image and Metacity will know what to do.</para>
|
||||||
|
|
||||||
|
<para>An alternative to including a draw_ops tag inside a piece tag is to add a draw_ops attribute to the piece tag. Then you can add a draw_ops tag at top level (inside the metacity_theme tag) with a name attribute, and Metacity will use that. This is useful if you use similar draw_ops over and over.</para>
|
||||||
|
<para>I'm not going to document draw_ops at present, because this is already very long. I will write it up later and link it from here.</para>
|
||||||
|
<para>The <literal>button</literal> tag tells Metacity how, but not where, to draw buttons. Buttons are drawn after all the pieces are finished, and the way to draw them is also given using draw_ops. You ought to provide buttons for all the possible kinds of button; if you don't give one it won't be drawn, which is unfortunate for the user who wants to use it:</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><literal>left_left_background</literal>, <literal>left_middle_background</literal>, and <literal>left_right_background</literal> don't represent buttons as such, but the background behind them, assuming there can be at most three buttons on the left. These days there can be more, so the extra ones also use left_middle_background.</para></listitem>
|
||||||
|
|
||||||
|
<listitem><para><literal>right_left_background</literal>, <literal>right_middle_background</literal>, and <literal>right_right_background</literal> similarly.</para></listitem>
|
||||||
|
<listitem><para><literal>close</literal>, <literal>minimize</literal>, <literal>maximize</literal> are the obvious original three buttons.</para></listitem>
|
||||||
|
<listitem><para><literal>menu</literal> is the menu button you can click to get a list of actions you can perform on the window.</para></listitem>
|
||||||
|
|
||||||
|
<listitem><para><literal>shade</literal>, <literal>above</literal>, <literal>stick</literal> are similar to the original buttons but only allowed in version 2</para></listitem>
|
||||||
|
<listitem><para><literal>unshade</literal>, <literal>unabove</literal>, <literal>unstick</literal> are the toggled versions of these buttons. Again, version 2 only.</para></listitem>
|
||||||
|
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>The reason there are toggled versions of shade, above, and stick, and not maximize, is that by the time you get this far you've probably already decided whether you're drawing a maximised window. So if you <emphasis>are</emphasis> drawing a maximised window, you can make the button called "maximize" look how you want the restore button to be; otherwise, make it look like you want the maximise button to be.</para>
|
||||||
|
<para>For each button tag you should also set a "state" attribute; this time the state is either <literal>normal</literal> (the way you see it most of the time), <literal>pressed</literal>, or <literal>prelight</literal> (this makes the buttons subtly light up when you hover over them). You only really need "normal", but the others are good to have too.</para>
|
||||||
|
|
||||||
|
<para>The "geometry" attribute of a <literal>frame_style</literal> tag is the name of a…</para>
|
||||||
|
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter>
|
||||||
|
<title>Geometry</title>
|
||||||
|
|
||||||
|
<para>The <literal>geometry</literal> tag defines the sizes of things around the window. It is important, but not easy to explain, and again this file has gone on too long. I'll write it up later.</para>
|
||||||
|
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter>
|
||||||
|
<title>Other things which lie around a file</title>
|
||||||
|
|
||||||
|
<para>The most important other thing in a theme file is the metadata held in the <literal>info</literal> tag. This contains a set of tags each of which contains some text explaining something about the theme itself, in a sort of <ulink url="http://en.wikipedia.org/wiki/Dublin_Core">Dublin Core</ulink> sort of way. (Next time around, we should probably use the actual Dublin Core.) The tags are <literal>name</literal>, <literal>author</literal>, <literal>copyright</literal>, <literal>date</literal>, and <literal>description</literal>.</para>
|
||||||
|
|
||||||
|
<para>Version 1 of the format had a <literal>menu_icon</literal> tag at top level, which let themes specify the icons beside options in the menu you get from the menu icon. This has become redundant; the icons are taken from the icon theme! The tag can still be used in all formats, but does nothing and is deprecated.</para>
|
||||||
|
<para>Version 2 of the format has a <literal>fallback</literal> tag at top level, which let the theme specify what icon a window should be considered to have if it doesn't provide an icon of its own. This should also be taken from the icon theme, <ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=524343">if anyone fancies fixing it</ulink>, and the tag should also then be deprecated. It shouldn't be hard.</para>
|
||||||
|
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter>
|
||||||
|
<title>When you're working on a theme</title>
|
||||||
|
|
||||||
|
<para>When you're editing a theme, you can view it without using it on the whole desktop using
|
||||||
|
<command>metacity-theme-viewer YourThemeName</command></para>
|
||||||
|
<para>and view it on the whole desktop using
|
||||||
|
<command>gconftool -<!-- x -->-type=string -<!-- x -->-set /apps/metacity/general/theme YourThemeName</command></para>
|
||||||
|
|
||||||
|
<para>Whenever you change the selected theme in GConf, Metacity will load the newly-chosen theme. This is how control-center does it. But when you change a theme, as you're working on it, you might want to ask Metacity to reload the theme which is currently used on the whole desktop to reflect your changes. You can do this using the little-known <command>metacity-message</command> program, with the command <literal>metacity-message reload-theme</literal>. This works by sending the ClientMessage <literal>_METACITY_RELOAD_THEME_MESSAGE</literal> to the root window, in case you're interested.</para>
|
||||||
|
|
||||||
|
<para>Once you're done with your theme, consider submitting it to <ulink url="http://art.gnome.org/themes/metacity/">the art.gnome.org site</ulink>, or <ulink url="http://www.gnome-look.org/index.php?xcontentmode=101">the gnome-look site</ulink>.</para>
|
||||||
|
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter>
|
||||||
|
<title>The future</title>
|
||||||
|
|
||||||
|
<para>Please feel free to link to this so people don't have to keep asking the basic questions and can start asking the deeper ones. One of the important deeper ones is: where should we go in the future? Since this format is becoming something of a de facto standard between window managers, should we set up some kind of freedesktop.org standards discussion? Would it be useful to spin off Metacity's theme parsing code into a separate, LGPL-licensed library so that other applications could use it more easily?</para>
|
||||||
|
<para>What would a version 3 of this format look like? Could we simplify the window / frame_style_set system? (I can imagine abolishing both, and being able to write <literal><frame_style for="normal+unfocused+maximized">…</literal> and having Metacity assume it applied to all resize permissions and shadednesses.) Maybe we should try to do everything with SVG we can? Getting more wild and handwavey, is it worth keeping XML-like? Maybe if other window managers were dealing with the files, .ini-style files would be more universally useful? Or perhaps not. And then of course we need a decent graphical editor for it. I have a few ideas, but if anyone fancies jumping in...</para>
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
</book>
|
||||||
|
|
||||||
|
|
24
doc/creating_themes/Makefile.am
Normal file
24
doc/creating_themes/Makefile.am
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
### This part of Makefile.am can be customized by you.
|
||||||
|
|
||||||
|
# gnome-doc-utils standard variables:
|
||||||
|
include $(top_srcdir)/gnome-doc-utils.make
|
||||||
|
dist-hook: doc-dist-hook
|
||||||
|
|
||||||
|
# The name of the directory in /usr/share/gnome/help/,
|
||||||
|
# and the name of the main .xml file:
|
||||||
|
DOC_MODULE = creating-metacity-themes
|
||||||
|
|
||||||
|
# The names of any files included via entity declarations.
|
||||||
|
DOC_ENTITIES =
|
||||||
|
|
||||||
|
# The names of any files included by xincluded (preferred):
|
||||||
|
DOC_INCLUDES =
|
||||||
|
|
||||||
|
# The names of any pictures:
|
||||||
|
DOC_FIGURES =
|
||||||
|
|
||||||
|
# The names of any locales for which documentation translations exist:
|
||||||
|
DOC_LINGUAS =
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
<created>2001-05-30</created>
|
<created>2001-05-30</created>
|
||||||
|
|
||||||
<shortdesc xml:lang="en">
|
<shortdesc xml:lang="en">
|
||||||
A simple GTK+ window manager that tries not to get in your way.
|
Metacity is a simple compositing window manager that integrates nicely with GNOME 2.
|
||||||
</shortdesc>
|
</shortdesc>
|
||||||
<description xml:lang="en">
|
<description xml:lang="en">
|
||||||
A window manager for GNOME, with a focus on simplicity and usability
|
A window manager for GNOME, with a focus on simplicity and usability
|
||||||
|
86
po/ChangeLog
86
po/ChangeLog
@ -1,3 +1,89 @@
|
|||||||
|
2008-12-12 Luca Ferretti <elle.uca@libero.it>
|
||||||
|
|
||||||
|
* it.po: Imported updated translation from gnome-2-24 branch.
|
||||||
|
|
||||||
|
2008-12-08 Priit Laes <plaes at svn dot gnome dot org>
|
||||||
|
|
||||||
|
* et.po: Translation updated by Mattias Põldaru
|
||||||
|
|
||||||
|
2008-11-23 Jorge Gonzalez <jorgegonz@svn.gnome.org>
|
||||||
|
|
||||||
|
* es.po: Updated Spanish translation
|
||||||
|
|
||||||
|
2008-11-14 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* la.po: Updated Latin translation
|
||||||
|
|
||||||
|
2008-11-14 Jorge Gonzalez <jorgegonz@svn.gnome.org>
|
||||||
|
|
||||||
|
* es.po: Updated Spanish translation
|
||||||
|
|
||||||
|
2008-11-09 Jorge Gonzalez <jorgegonz@svn.gnome.org>
|
||||||
|
|
||||||
|
* es.po: Updated Spanish translation
|
||||||
|
|
||||||
|
2008-11-08 Jorge Gonzalez <jorgegonz@svn.gnome.org>
|
||||||
|
|
||||||
|
* es.po: Updated Spanish translation
|
||||||
|
|
||||||
|
2008-11-03 Leonardo Ferreira Fontenelle <leonardof@gnome.org>
|
||||||
|
|
||||||
|
* pt_BR.po: Merged from branch gnome-2-24. Minor capitalization fix in
|
||||||
|
the Brazilian Portuguese translation.
|
||||||
|
|
||||||
|
2008-10-27 Og Maciel <ogmaciel@gnome.org>
|
||||||
|
|
||||||
|
* pt_BR.po: Updated Brazilian Portuguese translation by
|
||||||
|
Og Maciel.
|
||||||
|
|
||||||
|
2008-10-27 Daniel Nylander <po@danielnylander.se>
|
||||||
|
|
||||||
|
* sv.po: Updated Swedish translation.
|
||||||
|
|
||||||
|
2008-10-23 Gil Forcada <gforcada@gnome.org>
|
||||||
|
|
||||||
|
* LINGUAS: Added ast.
|
||||||
|
* ast.po: Added Asturian translation on behalf of Mikel González.
|
||||||
|
|
||||||
|
2008-10-22 Jordi Mallach <jordi@sindominio.net>
|
||||||
|
|
||||||
|
* ca@valencia.po: New Valencian (Southern Catalan) translation
|
||||||
|
based on the Catalan file.
|
||||||
|
* LINGUAS: Added Valencian (Southern Catalan) (ca@valencia).
|
||||||
|
|
||||||
|
2008-10-22 Jordi Mallach <jordi@sindominio.net>
|
||||||
|
|
||||||
|
* ca.po: Apply Catalan fixes from Robert Millan.
|
||||||
|
|
||||||
|
2008-10-17 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* la.po: Updated Latin translation.
|
||||||
|
|
||||||
|
2008-10-16 Marcel Telka <marcel@telka.sk>
|
||||||
|
|
||||||
|
* sk.po: Updated Slovak translation by Pavol Šimo.
|
||||||
|
|
||||||
|
2008-10-15 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* la.po: Updated Latin translation.
|
||||||
|
|
||||||
|
2008-10-15 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* la.po: Updated Latin translation.
|
||||||
|
|
||||||
|
2008-10-12 Kjartan Maraas <kmaraas@gnome.org>
|
||||||
|
|
||||||
|
* nb.po: Updated Norwegian bokmål translation.
|
||||||
|
|
||||||
|
2008-10-12 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
||||||
|
|
||||||
|
* th.po: Updated Thai translation (merged from gnome-2-24 branch).
|
||||||
|
|
||||||
|
2008-10-11 Claude Paroz <claude@2xlibre.net>
|
||||||
|
|
||||||
|
* fr.po: Fixed minimize/unmaximize French translation (sync with 2.24) and
|
||||||
|
complete some other translations.
|
||||||
|
|
||||||
2008-09-30 Og Maciel <ogmaciel@gnome.org>
|
2008-09-30 Og Maciel <ogmaciel@gnome.org>
|
||||||
|
|
||||||
* pt_BR.po: Updated Brazilian Portuguese translation by Vladimir Melo.
|
* pt_BR.po: Updated Brazilian Portuguese translation by Vladimir Melo.
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
am
|
am
|
||||||
ar
|
ar
|
||||||
as
|
as
|
||||||
|
ast
|
||||||
az
|
az
|
||||||
be
|
be
|
||||||
be@latin
|
be@latin
|
||||||
@ -11,6 +12,7 @@ bn
|
|||||||
bn_IN
|
bn_IN
|
||||||
bs
|
bs
|
||||||
ca
|
ca
|
||||||
|
ca@valencia
|
||||||
cs
|
cs
|
||||||
cy
|
cy
|
||||||
da
|
da
|
||||||
@ -41,6 +43,7 @@ ka
|
|||||||
kn
|
kn
|
||||||
ko
|
ko
|
||||||
ku
|
ku
|
||||||
|
la
|
||||||
lt
|
lt
|
||||||
lv
|
lv
|
||||||
mg
|
mg
|
||||||
|
@ -13,12 +13,12 @@ src/core/screen.c
|
|||||||
src/core/schema-bindings.c
|
src/core/schema-bindings.c
|
||||||
src/core/session.c
|
src/core/session.c
|
||||||
src/core/util.c
|
src/core/util.c
|
||||||
src/core/window-bindings.h
|
|
||||||
src/core/window.c
|
src/core/window.c
|
||||||
src/core/window-props.c
|
src/core/window-props.c
|
||||||
src/core/xprops.c
|
src/core/xprops.c
|
||||||
|
src/include/all-keybindings.h
|
||||||
src/metacity.desktop.in
|
src/metacity.desktop.in
|
||||||
src/metacity.schemas.in
|
src/metacity.schemas.in.in
|
||||||
src/metacity-wm.desktop.in
|
src/metacity-wm.desktop.in
|
||||||
src/tools/metacity-message.c
|
src/tools/metacity-message.c
|
||||||
src/ui/frames.c
|
src/ui/frames.c
|
||||||
|
2
po/POTFILES.skip
Normal file
2
po/POTFILES.skip
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
src/metacity.schemas.in
|
||||||
|
|
11
po/ca.po
11
po/ca.po
@ -1,13 +1,14 @@
|
|||||||
# Catalan translation of Metacity.
|
# Catalan translation of Metacity.
|
||||||
# Copyright © 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
# Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||||
# This file is distributed under the same license as the metacity package.
|
# This file is distributed under the same license as the metacity package.
|
||||||
# Softcatala <info@softcatala.org>, 2002.
|
# Softcatala <info@softcatala.org>, 2002.
|
||||||
# Jesús Moreno <jmmolas@wanadoo.es>, 2002.
|
# Jesús Moreno <jmmolas@wanadoo.es>, 2002.
|
||||||
# Jordi Mallach <jordi@sindominio.net>, 2003, 2004, 2005, 2006, 2007.
|
# Jordi Mallach <jordi@sindominio.net>, 2003, 2004, 2005, 2006, 2007, 2008.
|
||||||
|
# David Planella <david.planella@gmail.com>, 2008.
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: metacity 2.18\n"
|
"Project-Id-Version: metacity 2.24\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2008-09-27 18:26+0200\n"
|
"POT-Creation-Date: 2008-09-27 18:26+0200\n"
|
||||||
"PO-Revision-Date: 2008-09-27 18:27+0200\n"
|
"PO-Revision-Date: 2008-09-27 18:27+0200\n"
|
||||||
@ -1229,7 +1230,7 @@ msgstr "Canvia a l'espai de treball sota aquest"
|
|||||||
|
|
||||||
#: ../src/metacity.schemas.in.h:97
|
#: ../src/metacity.schemas.in.h:97
|
||||||
msgid "Switch to workspace on the left"
|
msgid "Switch to workspace on the left"
|
||||||
msgstr "Canvia a l'espai de treball de la esquerra"
|
msgstr "Canvia a l'espai de treball de l'esquerra"
|
||||||
|
|
||||||
#: ../src/metacity.schemas.in.h:98
|
#: ../src/metacity.schemas.in.h:98
|
||||||
msgid "Switch to workspace on the right"
|
msgid "Switch to workspace on the right"
|
||||||
@ -2890,7 +2891,7 @@ msgid ""
|
|||||||
"These windows do not support \"save current setup\" and will have to be "
|
"These windows do not support \"save current setup\" and will have to be "
|
||||||
"restarted manually next time you log in."
|
"restarted manually next time you log in."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Aquestes finestres no suporten «desa la configuració actual» i es tindràn que "
|
"Aquestes finestres no suporten «desa la configuració actual» i s'hauran de "
|
||||||
"reiniciar manualment la pròxima vegada que entreu."
|
"reiniciar manualment la pròxima vegada que entreu."
|
||||||
|
|
||||||
#: ../src/ui/metacity-dialog.c:310
|
#: ../src/ui/metacity-dialog.c:310
|
||||||
|
4079
po/ca@valencia.po
Normal file
4079
po/ca@valencia.po
Normal file
File diff suppressed because it is too large
Load Diff
3976
po/pt_BR.po
3976
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
266
po/th.po
266
po/th.po
@ -11,8 +11,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: metacity\n"
|
"Project-Id-Version: metacity\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2008-09-21 16:07+0700\n"
|
"POT-Creation-Date: 2008-10-12 09:49+0700\n"
|
||||||
"PO-Revision-Date: 2008-09-21 16:35+0700\n"
|
"PO-Revision-Date: 2008-10-12 11:50+0700\n"
|
||||||
"Last-Translator: Theppitak Karoonboonyanan <thep@linux.thai.net>\n"
|
"Last-Translator: Theppitak Karoonboonyanan <thep@linux.thai.net>\n"
|
||||||
"Language-Team: Thai <thai-l10n@googlegroups.com>\n"
|
"Language-Team: Thai <thai-l10n@googlegroups.com>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -92,24 +92,24 @@ msgstr ""
|
|||||||
msgid "Fatal IO error %d (%s) on display '%s'.\n"
|
msgid "Fatal IO error %d (%s) on display '%s'.\n"
|
||||||
msgstr "เกิดข้อผิดพลาดร้ายแรง %d (%s) ในการอ่านเขียนข้อมูลจากดิสเพลย์'%s'\n"
|
msgstr "เกิดข้อผิดพลาดร้ายแรง %d (%s) ในการอ่านเขียนข้อมูลจากดิสเพลย์'%s'\n"
|
||||||
|
|
||||||
#: ../src/core/keybindings.c:924
|
#: ../src/core/keybindings.c:754
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Some other program is already using the key %s with modifiers %x as a "
|
"Some other program is already using the key %s with modifiers %x as a "
|
||||||
"binding\n"
|
"binding\n"
|
||||||
msgstr "โปรแกรมอื่นกำลังใช้ปุ่ม %s ร่วมกับปุ่ม %x เป็นปุ่มลัดอยู่แล้ว\n"
|
msgstr "โปรแกรมอื่นกำลังใช้ปุ่ม %s ร่วมกับปุ่ม %x เป็นปุ่มลัดอยู่แล้ว\n"
|
||||||
|
|
||||||
#: ../src/core/keybindings.c:2563
|
#: ../src/core/keybindings.c:2398
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error launching metacity-dialog to print an error about a command: %s\n"
|
msgid "Error launching metacity-dialog to print an error about a command: %s\n"
|
||||||
msgstr "ไม่สามารถเปิดกล่องโต้ตอบ เพื่อแสดงข้อผิดพลาดของคำสั่ง: %s\n"
|
msgstr "ไม่สามารถเปิดกล่องโต้ตอบ เพื่อแสดงข้อผิดพลาดของคำสั่ง: %s\n"
|
||||||
|
|
||||||
#: ../src/core/keybindings.c:2668
|
#: ../src/core/keybindings.c:2501
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No command %d has been defined.\n"
|
msgid "No command %d has been defined.\n"
|
||||||
msgstr "คำสั่ง %d ยังไม่ได้ถูกกำหนด\n"
|
msgstr "คำสั่ง %d ยังไม่ได้ถูกกำหนด\n"
|
||||||
|
|
||||||
#: ../src/core/keybindings.c:3705
|
#: ../src/core/keybindings.c:3514
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No terminal command has been defined.\n"
|
msgid "No terminal command has been defined.\n"
|
||||||
msgstr "คำสั่งเปิดเทอร์มินัลยังไม่ได้ถูกกำหนด\n"
|
msgstr "คำสั่งเปิดเทอร์มินัลยังไม่ได้ถูกกำหนด\n"
|
||||||
@ -233,24 +233,24 @@ msgstr "\"%s\" ที่พบในฐานข้อมูลข้อปร
|
|||||||
msgid "Error setting number of workspaces to %d: %s\n"
|
msgid "Error setting number of workspaces to %d: %s\n"
|
||||||
msgstr "ไม่สามารถตั้งจำนวนพื้นที่ทำงานเป็น %d: %s\n"
|
msgstr "ไม่สามารถตั้งจำนวนพื้นที่ทำงานเป็น %d: %s\n"
|
||||||
|
|
||||||
#: ../src/core/prefs.c:2131 ../src/core/prefs.c:2643
|
#: ../src/core/prefs.c:2067 ../src/core/prefs.c:2579
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Workspace %d"
|
msgid "Workspace %d"
|
||||||
msgstr "พื้นที่ทำงาน %d"
|
msgstr "พื้นที่ทำงาน %d"
|
||||||
|
|
||||||
#: ../src/core/prefs.c:2161 ../src/core/prefs.c:2334
|
#: ../src/core/prefs.c:2097 ../src/core/prefs.c:2270
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\"%s\" found in configuration database is not a valid value for keybinding "
|
"\"%s\" found in configuration database is not a valid value for keybinding "
|
||||||
"\"%s\"\n"
|
"\"%s\"\n"
|
||||||
msgstr "\"%s\" ที่พบในฐานข้อมูลค่าปรับแต่ง ไม่สามารถใช้เป็นปุ่มลัด \"%s\"\n"
|
msgstr "\"%s\" ที่พบในฐานข้อมูลค่าปรับแต่ง ไม่สามารถใช้เป็นปุ่มลัด \"%s\"\n"
|
||||||
|
|
||||||
#: ../src/core/prefs.c:2724
|
#: ../src/core/prefs.c:2660
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error setting name for workspace %d to \"%s\": %s\n"
|
msgid "Error setting name for workspace %d to \"%s\": %s\n"
|
||||||
msgstr "ไม่สามารถตั้งชื่อพื้นที่ทำงาน %d เป็น %s: %s\n"
|
msgstr "ไม่สามารถตั้งชื่อพื้นที่ทำงาน %d เป็น %s: %s\n"
|
||||||
|
|
||||||
#: ../src/core/prefs.c:2917
|
#: ../src/core/prefs.c:2853
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error setting compositor status: %s\n"
|
msgid "Error setting compositor status: %s\n"
|
||||||
msgstr "เกิดข้อผิดพลาดขณะกำหนดสถานะ compositor: %s\n"
|
msgstr "เกิดข้อผิดพลาดขณะกำหนดสถานะ compositor: %s\n"
|
||||||
@ -285,7 +285,10 @@ msgstr "สกรีน %d บนดิสเพลย์ \"%s\" มีโปร
|
|||||||
msgid "Could not release screen %d on display \"%s\"\n"
|
msgid "Could not release screen %d on display \"%s\"\n"
|
||||||
msgstr "ไม่สามารถปล่อยการควบคุมสกรีน %d บนดิสเพลย์ \"%s\"\n"
|
msgstr "ไม่สามารถปล่อยการควบคุมสกรีน %d บนดิสเพลย์ \"%s\"\n"
|
||||||
|
|
||||||
#: ../src/core/schema-bindings.c:77
|
#. XXX: TODO: find out what/how gdk i18ns the keycaps as, and add a
|
||||||
|
#. * translator comment
|
||||||
|
#.
|
||||||
|
#: ../src/core/schema-bindings.c:138
|
||||||
msgid ""
|
msgid ""
|
||||||
"The parser is fairly liberal and allows lower or upper case, and also "
|
"The parser is fairly liberal and allows lower or upper case, and also "
|
||||||
"abbreviations such as \"<Ctl>\" and \"<Ctrl>\". If you set the option to the "
|
"abbreviations such as \"<Ctl>\" and \"<Ctrl>\". If you set the option to the "
|
||||||
@ -295,6 +298,21 @@ msgstr ""
|
|||||||
"ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ เช่น \"<Ctl>\" และ \"<Ctrl>\" "
|
"ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ เช่น \"<Ctl>\" และ \"<Ctrl>\" "
|
||||||
"คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" ได้ ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
|
"คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" ได้ ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
|
||||||
|
|
||||||
|
#. These were more dissimilar at some point but have been regularised
|
||||||
|
#. * for the translators' benefit.
|
||||||
|
#.
|
||||||
|
#: ../src/core/schema-bindings.c:146
|
||||||
|
msgid ""
|
||||||
|
"Holding the \"shift\" key while using this binding reverses the direction of "
|
||||||
|
"movement."
|
||||||
|
msgstr "กดปุ่ม \"shift\" ค้างไว้ขณะกดปุ่มลัดนี้ จะเคลื่อนที่ในทิศย้อนกลับ"
|
||||||
|
|
||||||
|
#: ../src/core/schema-bindings.c:149
|
||||||
|
msgid ""
|
||||||
|
"Holding the \"shift\" key while using this binding makes the direction go "
|
||||||
|
"forward again."
|
||||||
|
msgstr "กดปุ่ม \"shift\" ค้างไว้ขณะกดปุ่มลัดนี้ จะเคลื่อนที่ในทิศเดิมอีกครั้ง"
|
||||||
|
|
||||||
#: ../src/core/session.c:837 ../src/core/session.c:844
|
#: ../src/core/session.c:837 ../src/core/session.c:844
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not create directory '%s': %s\n"
|
msgid "Could not create directory '%s': %s\n"
|
||||||
@ -334,7 +352,7 @@ msgstr "พบแอตทริบิวต์ <metacity_session> แต่ว
|
|||||||
#: ../src/core/session.c:1194
|
#: ../src/core/session.c:1194
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unknown attribute %s on <metacity_session> element"
|
msgid "Unknown attribute %s on <metacity_session> element"
|
||||||
msgstr "ไม่รู้จักแอตทริบิวต์ %s ในอีลิเมนต์ <metacity_session>"
|
msgstr "ไม่รู้จักแอตทริบิวต์ %s ในอิลิเมนต์ <metacity_session>"
|
||||||
|
|
||||||
#: ../src/core/session.c:1211
|
#: ../src/core/session.c:1211
|
||||||
#, c-format
|
#, c-format
|
||||||
@ -344,22 +362,22 @@ msgstr "มีแท็ก <window> ซ้อนด้านใน"
|
|||||||
#: ../src/core/session.c:1269 ../src/core/session.c:1301
|
#: ../src/core/session.c:1269 ../src/core/session.c:1301
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unknown attribute %s on <window> element"
|
msgid "Unknown attribute %s on <window> element"
|
||||||
msgstr "ไม่รู้จักแอตทริบิวต์ %s ในอีลิเมนต์ <window>"
|
msgstr "ไม่รู้จักแอตทริบิวต์ %s ในอิลิเมนต์ <window>"
|
||||||
|
|
||||||
#: ../src/core/session.c:1373
|
#: ../src/core/session.c:1373
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unknown attribute %s on <maximized> element"
|
msgid "Unknown attribute %s on <maximized> element"
|
||||||
msgstr "ไม่รู้จักแอตทริบิวต์ %s ในอีลิเมนต์ <maximized>"
|
msgstr "ไม่รู้จักแอตทริบิวต์ %s ในอิลิเมนต์ <maximized>"
|
||||||
|
|
||||||
#: ../src/core/session.c:1433
|
#: ../src/core/session.c:1433
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unknown attribute %s on <geometry> element"
|
msgid "Unknown attribute %s on <geometry> element"
|
||||||
msgstr "ไม่รู้จักแอตทริบิวต์ %s ในอีลิเมนต์ <geometry>"
|
msgstr "ไม่รู้จักแอตทริบิวต์ %s ในอิลิเมนต์ <geometry>"
|
||||||
|
|
||||||
#: ../src/core/session.c:1453
|
#: ../src/core/session.c:1453
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unknown element %s"
|
msgid "Unknown element %s"
|
||||||
msgstr "ไม่รู้จักอีลิเมนต์ %s"
|
msgstr "ไม่รู้จักอิลิเมนต์ %s"
|
||||||
|
|
||||||
#: ../src/core/session.c:1879
|
#: ../src/core/session.c:1879
|
||||||
#, c-format
|
#, c-format
|
||||||
@ -422,7 +440,7 @@ msgstr "ปุ่มลัดสำหรับสลับโหมดเต็
|
|||||||
|
|
||||||
#: ../src/core/window-bindings.h:80 ../src/metacity.schemas.in.h:195
|
#: ../src/core/window-bindings.h:80 ../src/metacity.schemas.in.h:195
|
||||||
msgid "Toggle maximization state"
|
msgid "Toggle maximization state"
|
||||||
msgstr "สลับสถานะขยายเต็ม"
|
msgstr "สลับสถานะขยายแผ่"
|
||||||
|
|
||||||
#: ../src/core/window-bindings.h:81
|
#: ../src/core/window-bindings.h:81
|
||||||
msgid "The keybinding used to toggle maximization."
|
msgid "The keybinding used to toggle maximization."
|
||||||
@ -441,7 +459,7 @@ msgstr ""
|
|||||||
|
|
||||||
#: ../src/core/window-bindings.h:92 ../src/metacity.schemas.in.h:29
|
#: ../src/core/window-bindings.h:92 ../src/metacity.schemas.in.h:29
|
||||||
msgid "Maximize window"
|
msgid "Maximize window"
|
||||||
msgstr "ขยายหน้าต่างเต็มจอ"
|
msgstr "ขยายแผ่หน้าต่างเต็มพื้นโต๊ะ"
|
||||||
|
|
||||||
#: ../src/core/window-bindings.h:93
|
#: ../src/core/window-bindings.h:93
|
||||||
msgid "The keybinding used to maximize a window."
|
msgid "The keybinding used to maximize a window."
|
||||||
@ -449,7 +467,7 @@ msgstr "ปุ่มลัดสำหรับขยายหน้าต่า
|
|||||||
|
|
||||||
#: ../src/core/window-bindings.h:96 ../src/metacity.schemas.in.h:199
|
#: ../src/core/window-bindings.h:96 ../src/metacity.schemas.in.h:199
|
||||||
msgid "Unmaximize window"
|
msgid "Unmaximize window"
|
||||||
msgstr "เลิกขยายหน้าต่างเต็ม"
|
msgstr "เลิกขยายแผ่หน้าต่าง"
|
||||||
|
|
||||||
#: ../src/core/window-bindings.h:97
|
#: ../src/core/window-bindings.h:97
|
||||||
msgid "The keybinding used to unmaximize a window."
|
msgid "The keybinding used to unmaximize a window."
|
||||||
@ -668,7 +686,7 @@ msgstr "ปุ่มลัดนี้ถอยหน้าต่างลงไ
|
|||||||
|
|
||||||
#: ../src/core/window-bindings.h:232 ../src/metacity.schemas.in.h:31
|
#: ../src/core/window-bindings.h:232 ../src/metacity.schemas.in.h:31
|
||||||
msgid "Maximize window vertically"
|
msgid "Maximize window vertically"
|
||||||
msgstr "ขยายหน้าต่างเต็มด้านสูง"
|
msgstr "ขยายแผ่หน้าต่างเต็มด้านสูง"
|
||||||
|
|
||||||
#: ../src/core/window-bindings.h:233
|
#: ../src/core/window-bindings.h:233
|
||||||
msgid "This keybinding resizes a window to fill available vertical space."
|
msgid "This keybinding resizes a window to fill available vertical space."
|
||||||
@ -676,7 +694,7 @@ msgstr "ปุ่มลัดนี้ขยายหน้าต่างเพ
|
|||||||
|
|
||||||
#: ../src/core/window-bindings.h:237 ../src/metacity.schemas.in.h:30
|
#: ../src/core/window-bindings.h:237 ../src/metacity.schemas.in.h:30
|
||||||
msgid "Maximize window horizontally"
|
msgid "Maximize window horizontally"
|
||||||
msgstr "ขยายหน้าต่างเต็มด้านกว้าง"
|
msgstr "ขยายแผ่หน้าต่างเต็มด้านกว้าง"
|
||||||
|
|
||||||
#: ../src/core/window-bindings.h:238
|
#: ../src/core/window-bindings.h:238
|
||||||
msgid "This keybinding resizes a window to fill available horizontal space."
|
msgid "This keybinding resizes a window to fill available horizontal space."
|
||||||
@ -767,7 +785,7 @@ msgid "This keybinding moves a window into the center of the screen."
|
|||||||
msgstr "ปุ่มลัดนี้ย้ายหน้าต่างไปที่กลางหน้าจอ"
|
msgstr "ปุ่มลัดนี้ย้ายหน้าต่างไปที่กลางหน้าจอ"
|
||||||
|
|
||||||
#. first time through
|
#. first time through
|
||||||
#: ../src/core/window.c:5643
|
#: ../src/core/window.c:5646
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
|
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
|
||||||
@ -783,7 +801,7 @@ msgstr ""
|
|||||||
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
||||||
#. * about these apps but make them work.
|
#. * about these apps but make them work.
|
||||||
#.
|
#.
|
||||||
#: ../src/core/window.c:6208
|
#: ../src/core/window.c:6211
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size %"
|
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size %"
|
||||||
@ -1532,8 +1550,8 @@ msgid ""
|
|||||||
"Ctl>\" and \"<Ctrl>\". If you set the option to the special string "
|
"Ctl>\" and \"<Ctrl>\". If you set the option to the special string "
|
||||||
"\"disabled\", then there will be no keybinding for this action."
|
"\"disabled\", then there will be no keybinding for this action."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"ปุ่มลัดสำหรับขยายหน้าต่างให้เต็มจอ รูปแบบคือ \"<Control>a\" หรือ \"<Shift>"
|
"ปุ่มลัดสำหรับขยายแผ่หน้าต่าง รูปแบบคือ \"<Control>a\" หรือ \"<Shift><"
|
||||||
"<Alt>F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ เช่น \"<"
|
"Alt>F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ เช่น \"<"
|
||||||
"Ctl>\" และ \"<Ctrl>\" คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" ได้ "
|
"Ctl>\" และ \"<Ctrl>\" คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" ได้ "
|
||||||
"ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
|
"ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
|
||||||
|
|
||||||
@ -1990,8 +2008,8 @@ msgid ""
|
|||||||
"Ctl>\" and \"<Ctrl>\". If you set the option to the special string "
|
"Ctl>\" and \"<Ctrl>\". If you set the option to the special string "
|
||||||
"\"disabled\", then there will be no keybinding for this action."
|
"\"disabled\", then there will be no keybinding for this action."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"ปุ่มลัดสำหรับสลับสถานะขยายเต็ม รูปแบบคือ \"<Control>a\" หรือ \"<Shift>"
|
"ปุ่มลัดสำหรับสลับสถานะขยายแผ่ รูปแบบคือ \"<Control>a\" หรือ \"<Shift><"
|
||||||
"<Alt>F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ เช่น \"<"
|
"Alt>F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ เช่น \"<"
|
||||||
"Ctl>\" และ \"<Ctrl>\" คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" ได้ "
|
"Ctl>\" และ \"<Ctrl>\" คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" ได้ "
|
||||||
"ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
|
"ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
|
||||||
|
|
||||||
@ -2031,10 +2049,10 @@ msgid ""
|
|||||||
"Ctl>\" and \"<Ctrl>\". If you set the option to the special string "
|
"Ctl>\" and \"<Ctrl>\". If you set the option to the special string "
|
||||||
"\"disabled\", then there will be no keybinding for this action."
|
"\"disabled\", then there will be no keybinding for this action."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"ปุ่มลัดสำหรับยกเลิกการขยายหน้าต่างเต็มพื้นโต๊ะ รูปแบบคือ \"<Control>a\" หรือ \"<"
|
"ปุ่มลัดสำหรับยกเลิกการขยายแผ่หน้าต่างเต็มพื้นโต๊ะ รูปแบบคือ \"<Control>a\" หรือ "
|
||||||
"Shift><Alt>F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ "
|
"\"<Shift><Alt>F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก "
|
||||||
"เช่น \"<Ctl>\" และ \"<Ctrl>\" คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" "
|
"และเข้าใจชื่อย่อ เช่น \"<Ctl>\" และ \"<Ctrl>\" คุณสามารถตั้งค่าตัวเลือกเป็น "
|
||||||
"ได้ ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
|
"\"disabled\" ได้ ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
|
||||||
|
|
||||||
#: ../src/metacity.schemas.in.h:164
|
#: ../src/metacity.schemas.in.h:164
|
||||||
msgid ""
|
msgid ""
|
||||||
@ -2197,10 +2215,10 @@ msgid ""
|
|||||||
"option to the special string \"disabled\", then there will be no keybinding "
|
"option to the special string \"disabled\", then there will be no keybinding "
|
||||||
"for this action."
|
"for this action."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"ปุ่มลัดนี้ย้ายหน้าต่างไปที่กลางหน้าจอ รูปแบบคือ \"<Control>a\" หรือ "
|
"ปุ่มลัดนี้ย้ายหน้าต่างไปที่กลางหน้าจอ รูปแบบคือ \"<Control>a\" หรือ \"<Shift>"
|
||||||
"\"<Shift><Alt>F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก "
|
"<Alt>F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ เช่น \"<"
|
||||||
"และเข้าใจชื่อย่อ เช่น \"<Ctl>\" และ \"<Ctrl>\" คุณสามารถตั้งค่าตัวเลือกเป็น "
|
"Ctl>\" และ \"<Ctrl>\" คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" ได้ "
|
||||||
"\"disabled\" ได้ ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
|
"ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
|
||||||
|
|
||||||
#: ../src/metacity.schemas.in.h:179
|
#: ../src/metacity.schemas.in.h:179
|
||||||
msgid ""
|
msgid ""
|
||||||
@ -2326,10 +2344,10 @@ msgid ""
|
|||||||
"option to the special string \"disabled\", then there will be no keybinding "
|
"option to the special string \"disabled\", then there will be no keybinding "
|
||||||
"for this action."
|
"for this action."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"ปุ่มลัดนี้ใช้ขยายหน้าต่างเต็มความกว้างของพื้นโต๊ะ รูปแบบคือ \"<Control>a\" หรือ \"<"
|
"ปุ่มลัดนี้ใช้ขยายแผ่หน้าต่างเต็มความกว้างของพื้นโต๊ะ รูปแบบคือ \"<Control>a\" หรือ "
|
||||||
"Shift><Alt>F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ "
|
"\"<Shift><Alt>F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก "
|
||||||
"เช่น \"<Ctl>\" และ \"<Ctrl>\" คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" "
|
"และเข้าใจชื่อย่อ เช่น \"<Ctl>\" และ \"<Ctrl>\" คุณสามารถตั้งค่าตัวเลือกเป็น "
|
||||||
"ได้ ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
|
"\"disabled\" ได้ ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
|
||||||
|
|
||||||
#: ../src/metacity.schemas.in.h:188
|
#: ../src/metacity.schemas.in.h:188
|
||||||
msgid ""
|
msgid ""
|
||||||
@ -2340,7 +2358,7 @@ msgid ""
|
|||||||
"option to the special string \"disabled\", then there will be no keybinding "
|
"option to the special string \"disabled\", then there will be no keybinding "
|
||||||
"for this action."
|
"for this action."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"ปุ่มลัดนี้ใช้ขยายหน้าต่างเต็มความสูงของพื้นโต๊ะ รูปแบบคือ \"<Control>a\" หรือ \"<"
|
"ปุ่มลัดนี้ใช้ขยายแผ่หน้าต่างเต็มความสูงของพื้นโต๊ะ รูปแบบคือ \"<Control>a\" หรือ \"<"
|
||||||
"Shift><Alt>F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ "
|
"Shift><Alt>F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ "
|
||||||
"เช่น \"<Ctl>\" และ \"<Ctrl>\" คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" "
|
"เช่น \"<Ctl>\" และ \"<Ctrl>\" คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" "
|
||||||
"ได้ ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
|
"ได้ ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
|
||||||
@ -2358,10 +2376,10 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"ตัวเลือกนี้เลือกการปฏิบัติเมื่อดับเบิลคลิกที่แถบหัวหน้าต่าง ค่าตัวเลือกที่เป็นไปได้ในขณะนี้คือ "
|
"ตัวเลือกนี้เลือกการปฏิบัติเมื่อดับเบิลคลิกที่แถบหัวหน้าต่าง ค่าตัวเลือกที่เป็นไปได้ในขณะนี้คือ "
|
||||||
"'toggle_shade' ซึ่งจะม้วนหรือคลี่หน้าต่าง, 'toggle_maximize' "
|
"'toggle_shade' ซึ่งจะม้วนหรือคลี่หน้าต่าง, 'toggle_maximize' "
|
||||||
"ซึ่งจะขยายหรือยกเลิกการขยายหน้าต่างให้เต็มพื้นโต๊ะ, 'toggle_maximize_horizontally' และ "
|
"ซึ่งจะขยายแผ่หรือยกเลิกการขยายแผ่หน้าต่างให้เต็มพื้นโต๊ะ, 'toggle_maximize_horizontally' "
|
||||||
"'toggle_maximize_vertically' "
|
"และ 'toggle_maximize_vertically' "
|
||||||
"ซึ่งจะขยายหรือยกเลิกการขยายหน้าต่างในทิศทางที่กำหนดเท่านั้น, 'minimize' ซึ่งจะย่อหน้าต่างเก็บ, "
|
"ซึ่งจะขยายแผ่หรือยกเลิกการขยายแผ่หน้าต่างในทิศทางที่กำหนดเท่านั้น, 'minimize' "
|
||||||
"'shade' ซึ่งจะม้วนหน้าต่างเก็บ, 'menu' ซึ่งจะแสดงเมนูหน้าต่าง, 'lower' "
|
"ซึ่งจะย่อเก็บหน้าต่าง, 'shade' ซึ่งจะม้วนเก็บหน้าต่าง, 'menu' ซึ่งจะแสดงเมนูหน้าต่าง, 'lower' "
|
||||||
"ซึ่งจะนำหน้าต่างลงไปอยู่หลังหน้าต่างอื่นทั้งหมด, และ 'none' ซึ่งจะไม่ทำอะไรเลย"
|
"ซึ่งจะนำหน้าต่างลงไปอยู่หลังหน้าต่างอื่นทั้งหมด, และ 'none' ซึ่งจะไม่ทำอะไรเลย"
|
||||||
|
|
||||||
#: ../src/metacity.schemas.in.h:190
|
#: ../src/metacity.schemas.in.h:190
|
||||||
@ -2377,10 +2395,10 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"ตัวเลือกนี้เลือกการปฏิบัติเมื่อคลิกเมาส์ปุ่มกลางที่แถบหัวหน้าต่าง ค่าตัวเลือกที่เป็นไปได้ในขณะนี้คือ "
|
"ตัวเลือกนี้เลือกการปฏิบัติเมื่อคลิกเมาส์ปุ่มกลางที่แถบหัวหน้าต่าง ค่าตัวเลือกที่เป็นไปได้ในขณะนี้คือ "
|
||||||
"'toggle_shade' ซึ่งจะม้วนหรือคลี่หน้าต่าง, 'toggle_maximize' "
|
"'toggle_shade' ซึ่งจะม้วนหรือคลี่หน้าต่าง, 'toggle_maximize' "
|
||||||
"ซึ่งจะขยายหรือยกเลิกการขยายหน้าต่างให้เต็มพื้นโต๊ะ, 'toggle_maximize_horizontally' และ "
|
"ซึ่งจะขยายแผ่หรือยกเลิกการขยายแผ่หน้าต่างให้เต็มพื้นโต๊ะ, 'toggle_maximize_horizontally' "
|
||||||
"'toggle_maximize_vertically' "
|
"และ 'toggle_maximize_vertically' "
|
||||||
"ซึ่งจะขยายหรือยกเลิกการขยายหน้าต่างในทิศทางที่กำหนดเท่านั้น, 'minimize' ซึ่งจะย่อหน้าต่างเก็บ, "
|
"ซึ่งจะขยายแผ่หรือยกเลิกการขยายแผ่หน้าต่างในทิศทางที่กำหนดเท่านั้น, 'minimize' "
|
||||||
"'shade' ซึ่งจะม้วนหน้าต่างเก็บ, 'menu' ซึ่งจะแสดงเมนูหน้าต่าง, 'lower' "
|
"ซึ่งจะย่อเก็บหน้าต่าง, 'shade' ซึ่งจะม้วนเก็บหน้าต่าง, 'menu' ซึ่งจะแสดงเมนูหน้าต่าง, 'lower' "
|
||||||
"ซึ่งจะนำหน้าต่างลงไปอยู่หลังหน้าต่างอื่นทั้งหมด, และ 'none' ซึ่งจะไม่ทำอะไรเลย"
|
"ซึ่งจะนำหน้าต่างลงไปอยู่หลังหน้าต่างอื่นทั้งหมด, และ 'none' ซึ่งจะไม่ทำอะไรเลย"
|
||||||
|
|
||||||
#: ../src/metacity.schemas.in.h:191
|
#: ../src/metacity.schemas.in.h:191
|
||||||
@ -2396,10 +2414,10 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"ตัวเลือกนี้เลือกการปฏิบัติเมื่อคลิกเมาส์ปุ่มขวาที่แถบหัวหน้าต่าง ค่าตัวเลือกที่เป็นไปได้ในขณะนี้คือ "
|
"ตัวเลือกนี้เลือกการปฏิบัติเมื่อคลิกเมาส์ปุ่มขวาที่แถบหัวหน้าต่าง ค่าตัวเลือกที่เป็นไปได้ในขณะนี้คือ "
|
||||||
"'toggle_shade' ซึ่งจะม้วนหรือคลี่หน้าต่าง, 'toggle_maximize' "
|
"'toggle_shade' ซึ่งจะม้วนหรือคลี่หน้าต่าง, 'toggle_maximize' "
|
||||||
"ซึ่งจะขยายหรือยกเลิกการขยายหน้าต่างให้เต็มพื้นโต๊ะ, 'toggle_maximize_horizontally' และ "
|
"ซึ่งจะขยายแผ่หรือยกเลิกการขยายแผ่หน้าต่างให้เต็มพื้นโต๊ะ, 'toggle_maximize_horizontally' "
|
||||||
"'toggle_maximize_vertically' "
|
"และ 'toggle_maximize_vertically' "
|
||||||
"ซึ่งจะขยายหรือยกเลิกการขยายหน้าต่างในทิศทางที่กำหนดเท่านั้น, 'minimize' ซึ่งจะย่อหน้าต่างเก็บ, "
|
"ซึ่งจะขยายแผ่หรือยกเลิกการขยายแผ่หน้าต่างในทิศทางที่กำหนดเท่านั้น, 'minimize' "
|
||||||
"'shade' ซึ่งจะม้วนหน้าต่างเก็บ, 'menu' ซึ่งจะแสดงเมนูหน้าต่าง, 'lower' "
|
"ซึ่งจะย่อเก็บหน้าต่าง, 'shade' ซึ่งจะม้วนเก็บหน้าต่าง, 'menu' ซึ่งจะแสดงเมนูหน้าต่าง, 'lower' "
|
||||||
"ซึ่งจะนำหน้าต่างลงไปอยู่หลังหน้าต่างอื่นทั้งหมด, และ 'none' ซึ่งจะไม่ทำอะไรเลย"
|
"ซึ่งจะนำหน้าต่างลงไปอยู่หลังหน้าต่างอื่นทั้งหมด, และ 'none' ซึ่งจะไม่ทำอะไรเลย"
|
||||||
|
|
||||||
#: ../src/metacity.schemas.in.h:192
|
#: ../src/metacity.schemas.in.h:192
|
||||||
@ -2460,11 +2478,11 @@ msgstr "ย่อเก็บหน้าต่าง"
|
|||||||
|
|
||||||
#: ../src/ui/frames.c:1086
|
#: ../src/ui/frames.c:1086
|
||||||
msgid "Maximize Window"
|
msgid "Maximize Window"
|
||||||
msgstr "ขยายหน้าต่างเต็ม"
|
msgstr "ขยายแผ่หน้าต่าง"
|
||||||
|
|
||||||
#: ../src/ui/frames.c:1089
|
#: ../src/ui/frames.c:1089
|
||||||
msgid "Unmaximize Window"
|
msgid "Unmaximize Window"
|
||||||
msgstr "เลิกขยายหน้าต่างเต็ม"
|
msgstr "เลิกขยายแผ่หน้าต่าง"
|
||||||
|
|
||||||
#: ../src/ui/frames.c:1092
|
#: ../src/ui/frames.c:1092
|
||||||
msgid "Roll Up Window"
|
msgid "Roll Up Window"
|
||||||
@ -2498,12 +2516,12 @@ msgstr "ย่_อเก็บ"
|
|||||||
#. Translators: Translate this string the same way as you do in libwnck!
|
#. Translators: Translate this string the same way as you do in libwnck!
|
||||||
#: ../src/ui/menu.c:72
|
#: ../src/ui/menu.c:72
|
||||||
msgid "Ma_ximize"
|
msgid "Ma_ximize"
|
||||||
msgstr "ขย_ายเต็ม"
|
msgstr "ขย_ายแผ่"
|
||||||
|
|
||||||
#. Translators: Translate this string the same way as you do in libwnck!
|
#. Translators: Translate this string the same way as you do in libwnck!
|
||||||
#: ../src/ui/menu.c:74
|
#: ../src/ui/menu.c:74
|
||||||
msgid "Unma_ximize"
|
msgid "Unma_ximize"
|
||||||
msgstr "เลิกขย_ายเต็ม"
|
msgstr "เลิกขย_ายแผ่"
|
||||||
|
|
||||||
#. Translators: Translate this string the same way as you do in libwnck!
|
#. Translators: Translate this string the same way as you do in libwnck!
|
||||||
#: ../src/ui/menu.c:76
|
#: ../src/ui/menu.c:76
|
||||||
@ -2753,7 +2771,7 @@ msgstr "ค่าเรขาคณิตของเฟรมไม่ได้
|
|||||||
#: ../src/ui/theme.c:308
|
#: ../src/ui/theme.c:308
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
|
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
|
||||||
msgstr "ค่าเรขาคณิตของเฟรมไม่ได้ระบุขนาด·\"%s\" สำหรับกรอบ \"%s\""
|
msgstr "ค่าเรขาคณิตของเฟรมไม่ได้ระบุขนาด \"%s\" สำหรับกรอบ \"%s\""
|
||||||
|
|
||||||
#: ../src/ui/theme.c:345
|
#: ../src/ui/theme.c:345
|
||||||
#, c-format
|
#, c-format
|
||||||
@ -2847,19 +2865,19 @@ msgstr "นิพจน์พิกัดมีอักขระ'%s' ซึ่
|
|||||||
msgid ""
|
msgid ""
|
||||||
"Coordinate expression contains floating point number '%s' which could not be "
|
"Coordinate expression contains floating point number '%s' which could not be "
|
||||||
"parsed"
|
"parsed"
|
||||||
msgstr "นิพจน์พิกัดมีเลขจุดทศนิยม '%s'·ที่แจงค่าไม่ได้"
|
msgstr "นิพจน์พิกัดมีเลขจุดทศนิยม '%s' ที่แจงค่าไม่ได้"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1625
|
#: ../src/ui/theme.c:1625
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression contains integer '%s' which could not be parsed"
|
msgid "Coordinate expression contains integer '%s' which could not be parsed"
|
||||||
msgstr "นิพจน์พิกัดมีเลขจำนวนเต็ม·'%s' ที่แจงค่าไม่ได้"
|
msgstr "นิพจน์พิกัดมีเลขจำนวนเต็ม '%s' ที่แจงค่าไม่ได้"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1747
|
#: ../src/ui/theme.c:1747
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Coordinate expression contained unknown operator at the start of this text: "
|
"Coordinate expression contained unknown operator at the start of this text: "
|
||||||
"\"%s\""
|
"\"%s\""
|
||||||
msgstr "นิพจน์พิกัดมีเครื่องหมายดำเนินการที่ไม่รู้จัก เริ่มจากตำแหน่ง·\"%s\""
|
msgstr "นิพจน์พิกัดมีเครื่องหมายดำเนินการที่ไม่รู้จัก เริ่มจากตำแหน่ง \"%s\""
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1804
|
#: ../src/ui/theme.c:1804
|
||||||
#, c-format
|
#, c-format
|
||||||
@ -2964,7 +2982,7 @@ msgid ""
|
|||||||
"No frame style set for window type \"%s\" in theme \"%s\", add a <window "
|
"No frame style set for window type \"%s\" in theme \"%s\", add a <window "
|
||||||
"type=\"%s\" style_set=\"whatever\"/> element"
|
"type=\"%s\" style_set=\"whatever\"/> element"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"ไม่ได้กำหนดรูปแบบเฟรมสำหรับชนิดหน้าต่าง \"%s\" ในชุดตกแต่ง \"%s\", กรุณาเพิ่มอีลิเมนต์ "
|
"ไม่ได้กำหนดรูปแบบเฟรมสำหรับชนิดหน้าต่าง \"%s\" ในชุดตกแต่ง \"%s\", กรุณาเพิ่มอิลิเมนต์ "
|
||||||
"<window type=\"%s\" style_set=\"อะไรก็ตามแต่\"/>"
|
"<window type=\"%s\" style_set=\"อะไรก็ตามแต่\"/>"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:5231 ../src/ui/theme.c:5293 ../src/ui/theme.c:5356
|
#: ../src/ui/theme.c:5231 ../src/ui/theme.c:5293 ../src/ui/theme.c:5356
|
||||||
@ -2986,12 +3004,12 @@ msgstr "บรรทัด %d อักขระ %d: %s"
|
|||||||
#: ../src/ui/theme-parser.c:396
|
#: ../src/ui/theme-parser.c:396
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Attribute \"%s\" repeated twice on the same <%s> element"
|
msgid "Attribute \"%s\" repeated twice on the same <%s> element"
|
||||||
msgstr "มีแอตทริบิวต์ \"%s\" ซ้ำสองอันในอีลิเมนต์ <%s> เดียวกัน"
|
msgstr "มีแอตทริบิวต์ \"%s\" ซ้ำสองอันในอิลิเมนต์ <%s> เดียวกัน"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:414 ../src/ui/theme-parser.c:439
|
#: ../src/ui/theme-parser.c:414 ../src/ui/theme-parser.c:439
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Attribute \"%s\" is invalid on <%s> element in this context"
|
msgid "Attribute \"%s\" is invalid on <%s> element in this context"
|
||||||
msgstr "ใช้แอตทริบิวต์ \"%s\" ในอีลิเมนต์ <%s> ไม่ได้ตรงนี้"
|
msgstr "ใช้แอตทริบิวต์ \"%s\" ในอิลิเมนต์ <%s> ไม่ได้ตรงนี้"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:500
|
#: ../src/ui/theme-parser.c:500
|
||||||
#, c-format
|
#, c-format
|
||||||
@ -3040,7 +3058,7 @@ msgstr ""
|
|||||||
#: ../src/ui/theme-parser.c:3191 ../src/ui/theme-parser.c:3198
|
#: ../src/ui/theme-parser.c:3191 ../src/ui/theme-parser.c:3198
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"%s\" attribute on <%s> element"
|
msgid "No \"%s\" attribute on <%s> element"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"%s\" ในอีลิเมนต์ <%s>"
|
msgstr "ขาดแอตทริบิวต์ \"%s\" ในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:919 ../src/ui/theme-parser.c:990
|
#: ../src/ui/theme-parser.c:919 ../src/ui/theme-parser.c:990
|
||||||
#: ../src/ui/theme-parser.c:1032 ../src/ui/theme-parser.c:1143
|
#: ../src/ui/theme-parser.c:1032 ../src/ui/theme-parser.c:1143
|
||||||
@ -3071,12 +3089,12 @@ msgstr "คุณต้องกำหนดสีพื้นหลังเพ
|
|||||||
#: ../src/ui/theme-parser.c:1203
|
#: ../src/ui/theme-parser.c:1203
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unknown type \"%s\" on <%s> element"
|
msgid "Unknown type \"%s\" on <%s> element"
|
||||||
msgstr "ไม่รู้จักชนิด \"%s\" บนอีลิเมนต์ <%s>"
|
msgstr "ไม่รู้จักชนิด \"%s\" สำหรับอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:1214
|
#: ../src/ui/theme-parser.c:1214
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unknown style_set \"%s\" on <%s> element"
|
msgid "Unknown style_set \"%s\" on <%s> element"
|
||||||
msgstr "ไม่รู้จัก style_set \"%s\" บนอีลิเมนต์ <%s>"
|
msgstr "ไม่รู้จัก style_set \"%s\" สำหรับอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:1222
|
#: ../src/ui/theme-parser.c:1222
|
||||||
#, c-format
|
#, c-format
|
||||||
@ -3098,18 +3116,18 @@ msgstr "ชุดตกแต่งมีไอคอนเล็กสำรอ
|
|||||||
#: ../src/ui/theme-parser.c:3803 ../src/ui/theme-parser.c:3841
|
#: ../src/ui/theme-parser.c:3803 ../src/ui/theme-parser.c:3841
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Element <%s> is not allowed below <%s>"
|
msgid "Element <%s> is not allowed below <%s>"
|
||||||
msgstr "ไม่อนุญาตให้มีอีลิเมนต์ <%s> ภายใน <%s>"
|
msgstr "ไม่อนุญาตให้มีอิลิเมนต์ <%s> ภายใน <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:1373 ../src/ui/theme-parser.c:1460
|
#: ../src/ui/theme-parser.c:1373 ../src/ui/theme-parser.c:1460
|
||||||
#: ../src/ui/theme-parser.c:1530
|
#: ../src/ui/theme-parser.c:1530
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"name\" attribute on element <%s>"
|
msgid "No \"name\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"name\" ในอีลิเมนต์ <%s>"
|
msgstr "ขาดแอตทริบิวต์ \"name\" ในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:1380 ../src/ui/theme-parser.c:1467
|
#: ../src/ui/theme-parser.c:1380 ../src/ui/theme-parser.c:1467
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"value\" attribute on element <%s>"
|
msgid "No \"value\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"value\" ในอีลิเมนต์ <%s>"
|
msgstr "ขาดแอตทริบิวต์ \"value\" ในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:1411 ../src/ui/theme-parser.c:1425
|
#: ../src/ui/theme-parser.c:1411 ../src/ui/theme-parser.c:1425
|
||||||
#: ../src/ui/theme-parser.c:1484
|
#: ../src/ui/theme-parser.c:1484
|
||||||
@ -3131,22 +3149,22 @@ msgstr "ไม่รู้จัก aspect ratio \"%s\""
|
|||||||
#: ../src/ui/theme-parser.c:1537
|
#: ../src/ui/theme-parser.c:1537
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"top\" attribute on element <%s>"
|
msgid "No \"top\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"top\" ในอีลิเมนต์ <%s>"
|
msgstr "ขาดแอตทริบิวต์ \"top\" ในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:1544
|
#: ../src/ui/theme-parser.c:1544
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"bottom\" attribute on element <%s>"
|
msgid "No \"bottom\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"bottom\" ในอีลิเมนต์<%s>"
|
msgstr "ขาดแอตทริบิวต์ \"bottom\" ในอิลิเมนต์<%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:1551
|
#: ../src/ui/theme-parser.c:1551
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"left\" attribute on element <%s>"
|
msgid "No \"left\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"left\" ในอีลิเมนต์<%s>"
|
msgstr "ขาดแอตทริบิวต์ \"left\" ในอิลิเมนต์<%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:1558
|
#: ../src/ui/theme-parser.c:1558
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"right\" attribute on element <%s>"
|
msgid "No \"right\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"right\" ในอีลิเมนต์<%s>"
|
msgstr "ขาดแอตทริบิวต์ \"right\" ในอิลิเมนต์<%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:1590
|
#: ../src/ui/theme-parser.c:1590
|
||||||
#, c-format
|
#, c-format
|
||||||
@ -3158,27 +3176,27 @@ msgstr "ไม่รู้จักเส้นขอบ \"%s\""
|
|||||||
#: ../src/ui/theme-parser.c:3023
|
#: ../src/ui/theme-parser.c:3023
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"color\" attribute on element <%s>"
|
msgid "No \"color\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"color\" ในอีลิเมนต์<%s>"
|
msgstr "ขาดแอตทริบิวต์ \"color\" ในอิลิเมนต์<%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:1743
|
#: ../src/ui/theme-parser.c:1743
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"x1\" attribute on element <%s>"
|
msgid "No \"x1\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"x1\" ในอีลิเมนต์<%s>"
|
msgstr "ขาดแอตทริบิวต์ \"x1\" ในอิลิเมนต์<%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:1750 ../src/ui/theme-parser.c:2864
|
#: ../src/ui/theme-parser.c:1750 ../src/ui/theme-parser.c:2864
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"y1\" attribute on element <%s>"
|
msgid "No \"y1\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"y1\" ในอีลิเมนต์<%s>"
|
msgstr "ขาดแอตทริบิวต์ \"y1\" ในอิลิเมนต์<%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:1757
|
#: ../src/ui/theme-parser.c:1757
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"x2\" attribute on element <%s>"
|
msgid "No \"x2\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"x2\" ในอีลิเมนต์<%s>"
|
msgstr "ขาดแอตทริบิวต์ \"x2\" ในอิลิเมนต์<%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:1764 ../src/ui/theme-parser.c:2871
|
#: ../src/ui/theme-parser.c:1764 ../src/ui/theme-parser.c:2871
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"y2\" attribute on element <%s>"
|
msgid "No \"y2\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"y2\" ในอีลิเมนต์<%s>"
|
msgstr "ขาดแอตทริบิวต์ \"y2\" ในอิลิเมนต์<%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:1857 ../src/ui/theme-parser.c:1968
|
#: ../src/ui/theme-parser.c:1857 ../src/ui/theme-parser.c:1968
|
||||||
#: ../src/ui/theme-parser.c:2117 ../src/ui/theme-parser.c:2199
|
#: ../src/ui/theme-parser.c:2117 ../src/ui/theme-parser.c:2199
|
||||||
@ -3188,7 +3206,7 @@ msgstr "ขาดแอตทริบิวต์ \"y2\" ในอีลิเ
|
|||||||
#: ../src/ui/theme-parser.c:3030
|
#: ../src/ui/theme-parser.c:3030
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"x\" attribute on element <%s>"
|
msgid "No \"x\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"x\" ในอีลิเมนต์<%s>"
|
msgstr "ขาดแอตทริบิวต์ \"x\" ในอิลิเมนต์<%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:1864 ../src/ui/theme-parser.c:1975
|
#: ../src/ui/theme-parser.c:1864 ../src/ui/theme-parser.c:1975
|
||||||
#: ../src/ui/theme-parser.c:2124 ../src/ui/theme-parser.c:2206
|
#: ../src/ui/theme-parser.c:2124 ../src/ui/theme-parser.c:2206
|
||||||
@ -3197,7 +3215,7 @@ msgstr "ขาดแอตทริบิวต์ \"x\" ในอีลิเ
|
|||||||
#: ../src/ui/theme-parser.c:2941 ../src/ui/theme-parser.c:3037
|
#: ../src/ui/theme-parser.c:2941 ../src/ui/theme-parser.c:3037
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"y\" attribute on element <%s>"
|
msgid "No \"y\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"y\" ในอีลิเมนต์<%s>"
|
msgstr "ขาดแอตทริบิวต์ \"y\" ในอิลิเมนต์<%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:1871 ../src/ui/theme-parser.c:1982
|
#: ../src/ui/theme-parser.c:1871 ../src/ui/theme-parser.c:1982
|
||||||
#: ../src/ui/theme-parser.c:2131 ../src/ui/theme-parser.c:2213
|
#: ../src/ui/theme-parser.c:2131 ../src/ui/theme-parser.c:2213
|
||||||
@ -3206,7 +3224,7 @@ msgstr "ขาดแอตทริบิวต์ \"y\" ในอีลิเ
|
|||||||
#: ../src/ui/theme-parser.c:2948
|
#: ../src/ui/theme-parser.c:2948
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"width\" attribute on element <%s>"
|
msgid "No \"width\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"width\" ในอีลิเมนต์<%s>"
|
msgstr "ขาดแอตทริบิวต์ \"width\" ในอิลิเมนต์<%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:1878 ../src/ui/theme-parser.c:1989
|
#: ../src/ui/theme-parser.c:1878 ../src/ui/theme-parser.c:1989
|
||||||
#: ../src/ui/theme-parser.c:2138 ../src/ui/theme-parser.c:2220
|
#: ../src/ui/theme-parser.c:2138 ../src/ui/theme-parser.c:2220
|
||||||
@ -3215,37 +3233,37 @@ msgstr "ขาดแอตทริบิวต์ \"width\" ในอีลิ
|
|||||||
#: ../src/ui/theme-parser.c:2955
|
#: ../src/ui/theme-parser.c:2955
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"height\" attribute on element <%s>"
|
msgid "No \"height\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"height\" ในอีลิเมนต์<%s>"
|
msgstr "ขาดแอตทริบิวต์ \"height\" ในอิลิเมนต์<%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:1998
|
#: ../src/ui/theme-parser.c:1998
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"start_angle\" or \"from\" attribute on element <%s>"
|
msgid "No \"start_angle\" or \"from\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"start_angle\" หรือ \"from\" ในอีลิเมนต์ <%s>"
|
msgstr "ขาดแอตทริบิวต์ \"start_angle\" หรือ \"from\" ในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:2005
|
#: ../src/ui/theme-parser.c:2005
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"extent_angle\" or \"to\" attribute on element <%s>"
|
msgid "No \"extent_angle\" or \"to\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"extent_angle\" หรือ \"to\" ในอีลิเมนต์ <%s>"
|
msgstr "ขาดแอตทริบิวต์ \"extent_angle\" หรือ \"to\" ในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:2014
|
#: ../src/ui/theme-parser.c:2014
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"start_angle\" attribute on element <%s>"
|
msgid "No \"start_angle\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"start_angle\" ในอีลิเมนต์ <%s>"
|
msgstr "ขาดแอตทริบิวต์ \"start_angle\" ในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:2021
|
#: ../src/ui/theme-parser.c:2021
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"extent_angle\" attribute on element <%s>"
|
msgid "No \"extent_angle\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"extent_angle\" ในอีลิเมนต์ <%s>"
|
msgstr "ขาดแอตทริบิวต์ \"extent_angle\" ในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:2227
|
#: ../src/ui/theme-parser.c:2227
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"alpha\" attribute on element <%s>"
|
msgid "No \"alpha\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"alpha\" ในอีลิเมนต์<%s>"
|
msgstr "ขาดแอตทริบิวต์ \"alpha\" ในอิลิเมนต์<%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:2299
|
#: ../src/ui/theme-parser.c:2299
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"type\" attribute on element <%s>"
|
msgid "No \"type\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"type\" ในอีลิเมนต์<%s>"
|
msgstr "ขาดแอตทริบิวต์ \"type\" ในอิลิเมนต์<%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:2349
|
#: ../src/ui/theme-parser.c:2349
|
||||||
#, c-format
|
#, c-format
|
||||||
@ -3255,44 +3273,44 @@ msgstr "ไม่เข้าใจค่า \"%s\" สำหรับชนิ
|
|||||||
#: ../src/ui/theme-parser.c:2436
|
#: ../src/ui/theme-parser.c:2436
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"filename\" attribute on element <%s>"
|
msgid "No \"filename\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"filename\" ในอีลิเมนต์ <%s>"
|
msgstr "ขาดแอตทริบิวต์ \"filename\" ในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:2461 ../src/ui/theme-parser.c:2980
|
#: ../src/ui/theme-parser.c:2461 ../src/ui/theme-parser.c:2980
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Did not understand fill type \"%s\" for <%s> element"
|
msgid "Did not understand fill type \"%s\" for <%s> element"
|
||||||
msgstr "ไม่เข้าใจชนิดการเติม \"%s\" สำหรับอีลิเมนต์ <%s>"
|
msgstr "ไม่เข้าใจชนิดการเติม \"%s\" สำหรับอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:2609 ../src/ui/theme-parser.c:2744
|
#: ../src/ui/theme-parser.c:2609 ../src/ui/theme-parser.c:2744
|
||||||
#: ../src/ui/theme-parser.c:2850
|
#: ../src/ui/theme-parser.c:2850
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"state\" attribute on element <%s>"
|
msgid "No \"state\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"state\" ในอีลิเมนต์ <%s>"
|
msgstr "ขาดแอตทริบิวต์ \"state\" ในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:2616 ../src/ui/theme-parser.c:2751
|
#: ../src/ui/theme-parser.c:2616 ../src/ui/theme-parser.c:2751
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"shadow\" attribute on element <%s>"
|
msgid "No \"shadow\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"shadow\" ในอีลิเมนต์ <%s>"
|
msgstr "ขาดแอตทริบิวต์ \"shadow\" ในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:2623
|
#: ../src/ui/theme-parser.c:2623
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"arrow\" attribute on element <%s>"
|
msgid "No \"arrow\" attribute on element <%s>"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"arrow\" ในอีลิเมนต์ <%s>"
|
msgstr "ขาดแอตทริบิวต์ \"arrow\" ในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:2676 ../src/ui/theme-parser.c:2800
|
#: ../src/ui/theme-parser.c:2676 ../src/ui/theme-parser.c:2800
|
||||||
#: ../src/ui/theme-parser.c:2891
|
#: ../src/ui/theme-parser.c:2891
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Did not understand state \"%s\" for <%s> element"
|
msgid "Did not understand state \"%s\" for <%s> element"
|
||||||
msgstr "ไม่เข้าใจค่า state \"%s\" สำหรับอีลิเมนต์ <%s>"
|
msgstr "ไม่เข้าใจค่า state \"%s\" สำหรับอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:2686 ../src/ui/theme-parser.c:2810
|
#: ../src/ui/theme-parser.c:2686 ../src/ui/theme-parser.c:2810
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Did not understand shadow \"%s\" for <%s> element"
|
msgid "Did not understand shadow \"%s\" for <%s> element"
|
||||||
msgstr "ไม่เข้าใจค่า shadow \"%s\" สำหรับอีลิเมนต์ <%s>"
|
msgstr "ไม่เข้าใจค่า shadow \"%s\" สำหรับอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:2696
|
#: ../src/ui/theme-parser.c:2696
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Did not understand arrow \"%s\" for <%s> element"
|
msgid "Did not understand arrow \"%s\" for <%s> element"
|
||||||
msgstr "ไม่เข้าใจค่า arrow \"%s\" สำหรับอีลิเมนต์ <%s>"
|
msgstr "ไม่เข้าใจค่า arrow \"%s\" สำหรับอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:3120 ../src/ui/theme-parser.c:3237
|
#: ../src/ui/theme-parser.c:3120 ../src/ui/theme-parser.c:3237
|
||||||
#, c-format
|
#, c-format
|
||||||
@ -3307,12 +3325,12 @@ msgstr "การรวม draw_ops \"%s\" ที่นี่จะทำให
|
|||||||
#: ../src/ui/theme-parser.c:3314
|
#: ../src/ui/theme-parser.c:3314
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"value\" attribute on <%s> element"
|
msgid "No \"value\" attribute on <%s> element"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"value\" ในอีลิเมนต์ <%s>"
|
msgstr "ขาดแอตทริบิวต์ \"value\" ในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:3371
|
#: ../src/ui/theme-parser.c:3371
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"position\" attribute on <%s> element"
|
msgid "No \"position\" attribute on <%s> element"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"position\" ในอีลิเมนต์ <%s>"
|
msgstr "ขาดแอตทริบิวต์ \"position\" ในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:3380
|
#: ../src/ui/theme-parser.c:3380
|
||||||
#, c-format
|
#, c-format
|
||||||
@ -3332,12 +3350,12 @@ msgstr "ยังไม่ได้กำหนด <draw_ops> ชื่อ \"%s\
|
|||||||
#: ../src/ui/theme-parser.c:3433
|
#: ../src/ui/theme-parser.c:3433
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"function\" attribute on <%s> element"
|
msgid "No \"function\" attribute on <%s> element"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"function\" ในอีลิเมนต์ <%s>"
|
msgstr "ขาดแอตทริบิวต์ \"function\" ในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:3441 ../src/ui/theme-parser.c:3557
|
#: ../src/ui/theme-parser.c:3441 ../src/ui/theme-parser.c:3557
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"state\" attribute on <%s> element"
|
msgid "No \"state\" attribute on <%s> element"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"state\" ในอีลิเมนต์ <%s>"
|
msgstr "ขาดแอตทริบิวต์ \"state\" ในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:3450
|
#: ../src/ui/theme-parser.c:3450
|
||||||
#, c-format
|
#, c-format
|
||||||
@ -3362,12 +3380,12 @@ msgstr "รูปแบบเฟรมมีปุ่มสำหรับฟั
|
|||||||
#: ../src/ui/theme-parser.c:3549
|
#: ../src/ui/theme-parser.c:3549
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"focus\" attribute on <%s> element"
|
msgid "No \"focus\" attribute on <%s> element"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"focus\" ในอีลิเมนต์ <%s>"
|
msgstr "ขาดแอตทริบิวต์ \"focus\" ในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:3565
|
#: ../src/ui/theme-parser.c:3565
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"style\" attribute on <%s> element"
|
msgid "No \"style\" attribute on <%s> element"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"style\" ในอีลิเมนต์ <%s>"
|
msgstr "ขาดแอตทริบิวต์ \"style\" ในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:3574
|
#: ../src/ui/theme-parser.c:3574
|
||||||
#, c-format
|
#, c-format
|
||||||
@ -3377,7 +3395,7 @@ msgstr "\"%s\" ไม่ใช่ค่าที่ใช้ได้สำห
|
|||||||
#: ../src/ui/theme-parser.c:3583
|
#: ../src/ui/theme-parser.c:3583
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "\"%s\" is not a valid value for state attribute"
|
msgid "\"%s\" is not a valid value for state attribute"
|
||||||
msgstr "\"%s\" ไม่ใช่ค่าที่ใช้ได้สำหรับแอตทริบิวต์·state"
|
msgstr "\"%s\" ไม่ใช่ค่าที่ใช้ได้สำหรับแอตทริบิวต์ state"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:3593
|
#: ../src/ui/theme-parser.c:3593
|
||||||
#, c-format
|
#, c-format
|
||||||
@ -3387,7 +3405,7 @@ msgstr "ไม่มีรูปแบบที่ชื่อ \"%s\" กำห
|
|||||||
#: ../src/ui/theme-parser.c:3604
|
#: ../src/ui/theme-parser.c:3604
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No \"resize\" attribute on <%s> element"
|
msgid "No \"resize\" attribute on <%s> element"
|
||||||
msgstr "ขาดแอตทริบิวต์ \"resize\" ในอีลิเมนต์ <%s>"
|
msgstr "ขาดแอตทริบิวต์ \"resize\" ในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:3614 ../src/ui/theme-parser.c:3637
|
#: ../src/ui/theme-parser.c:3614 ../src/ui/theme-parser.c:3637
|
||||||
#, c-format
|
#, c-format
|
||||||
@ -3399,13 +3417,13 @@ msgstr "\"%s\" ไม่ใช่ค่าที่ใช้ได้สำห
|
|||||||
msgid ""
|
msgid ""
|
||||||
"Should not have \"resize\" attribute on <%s> element for maximized/shaded "
|
"Should not have \"resize\" attribute on <%s> element for maximized/shaded "
|
||||||
"states"
|
"states"
|
||||||
msgstr "ไม่ควรมีแอตทริบิวต์ \"resize\" ในอีลิเมนต์ <%s> สำหรับสถานะขยายใหญ่สุด/พับเก็บ"
|
msgstr "ไม่ควรมีแอตทริบิวต์ \"resize\" ในอิลิเมนต์ <%s> สำหรับสถานะขยายแผ่/ม้วนเก็บ"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:3662
|
#: ../src/ui/theme-parser.c:3662
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Should not have \"resize\" attribute on <%s> element for maximized states"
|
"Should not have \"resize\" attribute on <%s> element for maximized states"
|
||||||
msgstr "ไม่ควรมีแอตทริบิวต์ \"resize\" ในอีลิเมนต์ <%s> สำหรับสถานะขยายใหญ่สุด"
|
msgstr "ไม่ควรมีแอตทริบิวต์ \"resize\" ในอิลิเมนต์ <%s> สำหรับสถานะขยายแผ่"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:3676 ../src/ui/theme-parser.c:3698
|
#: ../src/ui/theme-parser.c:3676 ../src/ui/theme-parser.c:3698
|
||||||
#, c-format
|
#, c-format
|
||||||
@ -3422,58 +3440,60 @@ msgid ""
|
|||||||
"Can't have a two draw_ops for a <piece> element (theme specified a draw_ops "
|
"Can't have a two draw_ops for a <piece> element (theme specified a draw_ops "
|
||||||
"attribute and also a <draw_ops> element, or specified two elements)"
|
"attribute and also a <draw_ops> element, or specified two elements)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"ไม่สามารถมี draw_ops ซ้อนกันสองค่าสำหรับอีลิเมนต์ <piece> "
|
"ไม่สามารถมี draw_ops ซ้อนกันสองค่าสำหรับอิลิเมนต์ <piece> "
|
||||||
"(ชุดตกแต่งอาจมีการกำหนดทั้งแอตทริบิวต์ draw_ops และอีลิเมนต์ <draw_ops> "
|
"(ชุดตกแต่งอาจมีการกำหนดทั้งแอตทริบิวต์ draw_ops และอิลิเมนต์ <draw_ops> "
|
||||||
"หรือไม่ก็กำหนดอีลิเมนต์ซ้อนกันสองตัว)"
|
"หรือไม่ก็กำหนดอิลิเมนต์ซ้อนกันสองตัว)"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:3786
|
#: ../src/ui/theme-parser.c:3786
|
||||||
msgid ""
|
msgid ""
|
||||||
"Can't have a two draw_ops for a <button> element (theme specified a draw_ops "
|
"Can't have a two draw_ops for a <button> element (theme specified a draw_ops "
|
||||||
"attribute and also a <draw_ops> element, or specified two elements)"
|
"attribute and also a <draw_ops> element, or specified two elements)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"ไม่สามารถมี·draw_ops·ซ้อนกันสองค่าสำหรับอีลิเมนต์·<button>·"
|
"ไม่สามารถมี draw_ops ซ้อนกันสองค่าสำหรับอิลิเมนต์ <button> "
|
||||||
"(ชุดตกแต่งอาจมีการกำหนดทั้งแอตทริบิวต์·draw_ops·และอีลิเมนต์·<draw_ops>·หรือไม่ก็กำหนดอีลิเมนต์ซ้อนกันสองตัว)"
|
"(ชุดตกแต่งอาจมีการกำหนดทั้งแอตทริบิวต์ draw_ops และอิลิเมนต์ <draw_ops> "
|
||||||
|
"หรือไม่ก็กำหนดอิลิเมนต์ซ้อนกันสองตัว)"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:3824
|
#: ../src/ui/theme-parser.c:3824
|
||||||
msgid ""
|
msgid ""
|
||||||
"Can't have a two draw_ops for a <menu_icon> element (theme specified a "
|
"Can't have a two draw_ops for a <menu_icon> element (theme specified a "
|
||||||
"draw_ops attribute and also a <draw_ops> element, or specified two elements)"
|
"draw_ops attribute and also a <draw_ops> element, or specified two elements)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"ไม่สามารถมี·draw_ops·ซ้อนกันสองค่าสำหรับอีลิเมนต์·<menu_icon>·"
|
"ไม่สามารถมี draw_ops ซ้อนกันสองค่าสำหรับอิลิเมนต์ <menu_icon> "
|
||||||
"(ชุดตกแต่งอาจมีการกำหนดทั้งแอตทริบิวต์·draw_ops·และอีลิเมนต์·<draw_ops>·หรือไม่ก็กำหนดอีลิเมนต์ซ้อนกันสองตัว)"
|
"(ชุดตกแต่งอาจมีการกำหนดทั้งแอตทริบิวต์ draw_ops และอิลิเมนต์ <draw_ops> "
|
||||||
|
"หรือไม่ก็กำหนดอิลิเมนต์ซ้อนกันสองตัว)"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:3872
|
#: ../src/ui/theme-parser.c:3872
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Outermost element in theme must be <metacity_theme> not <%s>"
|
msgid "Outermost element in theme must be <metacity_theme> not <%s>"
|
||||||
msgstr "อีลิเมนต์ชั้นนอกสุดของชุดตกแต่งต้องเป็น <metacity_theme> ไม่ใช่ <%s>"
|
msgstr "อิลิเมนต์ชั้นนอกสุดของชุดตกแต่งต้องเป็น <metacity_theme> ไม่ใช่ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:3892
|
#: ../src/ui/theme-parser.c:3892
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Element <%s> is not allowed inside a name/author/date/description element"
|
"Element <%s> is not allowed inside a name/author/date/description element"
|
||||||
msgstr "ไม่อนุญาตให้มีอีลิเมนต์·<%s>·ภายในอีลิเมนต์ name/author/date/description"
|
msgstr "ไม่อนุญาตให้มีอิลิเมนต์ <%s> ภายในอิลิเมนต์ name/author/date/description"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:3897
|
#: ../src/ui/theme-parser.c:3897
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Element <%s> is not allowed inside a <constant> element"
|
msgid "Element <%s> is not allowed inside a <constant> element"
|
||||||
msgstr "ไม่อนุญาตให้มีอีลิเมนต์·<%s>·ภายในอีลิเมนต์ <constant>"
|
msgstr "ไม่อนุญาตให้มีอิลิเมนต์ <%s> ภายในอิลิเมนต์ <constant>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:3909
|
#: ../src/ui/theme-parser.c:3909
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Element <%s> is not allowed inside a distance/border/aspect_ratio element"
|
"Element <%s> is not allowed inside a distance/border/aspect_ratio element"
|
||||||
msgstr "ไม่อนุญาตให้มีอีลิเมนต์·<%s>·ภายในอีลิเมนต์ distance/border/aspect_ratio"
|
msgstr "ไม่อนุญาตให้มีอิลิเมนต์ <%s> ภายในอิลิเมนต์ distance/border/aspect_ratio"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:3931
|
#: ../src/ui/theme-parser.c:3931
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Element <%s> is not allowed inside a draw operation element"
|
msgid "Element <%s> is not allowed inside a draw operation element"
|
||||||
msgstr "ไม่อนุญาตให้มีอีลิเมนต์·<%s>·ภายในอีลิเมนต์เกี่ยวกับคำสั่งวาด"
|
msgstr "ไม่อนุญาตให้มีอิลิเมนต์ <%s> ภายในอิลิเมนต์เกี่ยวกับคำสั่งวาด"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:3941 ../src/ui/theme-parser.c:3971
|
#: ../src/ui/theme-parser.c:3941 ../src/ui/theme-parser.c:3971
|
||||||
#: ../src/ui/theme-parser.c:3976 ../src/ui/theme-parser.c:3981
|
#: ../src/ui/theme-parser.c:3976 ../src/ui/theme-parser.c:3981
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Element <%s> is not allowed inside a <%s> element"
|
msgid "Element <%s> is not allowed inside a <%s> element"
|
||||||
msgstr "ไม่อนุญาตให้มีอีลิเมนต์·<%s>·ภายในอีลิเมนต์·<%s>"
|
msgstr "ไม่อนุญาตให้มีอิลิเมนต์ <%s> ภายในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:4203
|
#: ../src/ui/theme-parser.c:4203
|
||||||
msgid "No draw_ops provided for frame piece"
|
msgid "No draw_ops provided for frame piece"
|
||||||
@ -3486,7 +3506,7 @@ msgstr "ขาด draw_ops สำหรับปุ่ม"
|
|||||||
#: ../src/ui/theme-parser.c:4270
|
#: ../src/ui/theme-parser.c:4270
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No text is allowed inside element <%s>"
|
msgid "No text is allowed inside element <%s>"
|
||||||
msgstr "ไม่อนุญาตให้มีข้อความภายในอีลิเมนต์ <%s>"
|
msgstr "ไม่อนุญาตให้มีข้อความภายในอิลิเมนต์ <%s>"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:4325
|
#: ../src/ui/theme-parser.c:4325
|
||||||
msgid "<name> specified twice for this theme"
|
msgid "<name> specified twice for this theme"
|
||||||
@ -3516,7 +3536,7 @@ msgstr "หาแฟ้มที่ใช้การได้สำหรับ
|
|||||||
#: ../src/ui/theme-parser.c:4692
|
#: ../src/ui/theme-parser.c:4692
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Theme file %s did not contain a root <metacity_theme> element"
|
msgid "Theme file %s did not contain a root <metacity_theme> element"
|
||||||
msgstr "แฟ้มชุดตกแต่ง %s ไม่มีอีลิเมนต์ราก <metacity_theme>"
|
msgstr "แฟ้มชุดตกแต่ง %s ไม่มีอิลิเมนต์ราก <metacity_theme>"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:75
|
#: ../src/ui/theme-viewer.c:75
|
||||||
msgid "/_Windows"
|
msgid "/_Windows"
|
||||||
@ -3684,7 +3704,7 @@ msgstr "การทดสอบนิพจน์ตำแหน่งให้
|
|||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:1246
|
#: ../src/ui/theme-viewer.c:1246
|
||||||
msgid "position expression test returned FALSE but didn't set error"
|
msgid "position expression test returned FALSE but didn't set error"
|
||||||
msgstr "การทดสอบนิพจน์ตำแหน่งให้ค่าเท็จ·แต่ไม่มีรหัสข้อผิดพลาด"
|
msgstr "การทดสอบนิพจน์ตำแหน่งให้ค่าเท็จ แต่ไม่มีรหัสข้อผิดพลาด"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:1250
|
#: ../src/ui/theme-viewer.c:1250
|
||||||
msgid "Error was expected but none given"
|
msgid "Error was expected but none given"
|
||||||
@ -3708,7 +3728,7 @@ msgstr "ค่าของ x เป็น %d แต่ที่คาดหว
|
|||||||
#: ../src/ui/theme-viewer.c:1265
|
#: ../src/ui/theme-viewer.c:1265
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "y value was %d, %d was expected"
|
msgid "y value was %d, %d was expected"
|
||||||
msgstr "ค่าของ·y·เป็น·%d·แต่ที่คาดหวังไว้น่าจะเป็น·%d"
|
msgstr "ค่าของ y เป็น %d แต่ที่คาดหวังไว้น่าจะเป็น %d"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:1330
|
#: ../src/ui/theme-viewer.c:1330
|
||||||
#, c-format
|
#, c-format
|
||||||
|
@ -47,7 +47,7 @@ metacity_SOURCES= \
|
|||||||
core/group-props.c \
|
core/group-props.c \
|
||||||
core/group-props.h \
|
core/group-props.h \
|
||||||
core/group.c \
|
core/group.c \
|
||||||
core/group.h \
|
include/group.h \
|
||||||
core/iconcache.c \
|
core/iconcache.c \
|
||||||
core/iconcache.h \
|
core/iconcache.h \
|
||||||
core/keybindings.c \
|
core/keybindings.c \
|
||||||
@ -100,7 +100,8 @@ metacity_SOURCES= \
|
|||||||
ui/theme.h \
|
ui/theme.h \
|
||||||
ui/themewidget.c \
|
ui/themewidget.c \
|
||||||
ui/themewidget.h \
|
ui/themewidget.h \
|
||||||
ui/ui.c
|
ui/ui.c \
|
||||||
|
include/all-keybindings.h
|
||||||
|
|
||||||
if WITH_CLUTTER
|
if WITH_CLUTTER
|
||||||
metacity_SOURCES += \
|
metacity_SOURCES += \
|
||||||
@ -112,6 +113,9 @@ metacity_SOURCES += \
|
|||||||
compositor/mutter/mutter-plugin-manager.h \
|
compositor/mutter/mutter-plugin-manager.h \
|
||||||
compositor/mutter/tidy/tidy-texture-frame.c \
|
compositor/mutter/tidy/tidy-texture-frame.c \
|
||||||
compositor/mutter/tidy/tidy-texture-frame.h \
|
compositor/mutter/tidy/tidy-texture-frame.h \
|
||||||
|
compositor/mutter/mutter-module.c \
|
||||||
|
compositor/mutter/mutter-module.h \
|
||||||
|
compositor/mutter/mutter-plugin.c \
|
||||||
include/mutter-plugin.h
|
include/mutter-plugin.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -155,6 +159,7 @@ libmetacityinclude_HEADERS = \
|
|||||||
include/types.h \
|
include/types.h \
|
||||||
include/screen.h \
|
include/screen.h \
|
||||||
include/display.h \
|
include/display.h \
|
||||||
|
include/group.h \
|
||||||
include/mutter-plugin.h
|
include/mutter-plugin.h
|
||||||
|
|
||||||
metacity_theme_viewer_SOURCES= \
|
metacity_theme_viewer_SOURCES= \
|
||||||
@ -163,6 +168,15 @@ metacity_theme_viewer_SOURCES= \
|
|||||||
metacity_dialog_SOURCES= \
|
metacity_dialog_SOURCES= \
|
||||||
ui/metacity-dialog.c
|
ui/metacity-dialog.c
|
||||||
|
|
||||||
|
schema_bindings_SOURCES = \
|
||||||
|
core/schema-bindings.c \
|
||||||
|
metacity.schemas.in.in
|
||||||
|
|
||||||
|
schema_bindings_LDADD = @METACITY_LIBS@
|
||||||
|
metacity.schemas.in: schema_bindings ${srcdir}/metacity.schemas.in.in
|
||||||
|
@echo Generating keybinding schemas... ${srcdir}/metacity.schemas.in.in
|
||||||
|
${builddir}/schema_bindings ${srcdir}/metacity.schemas.in.in ${builddir}/metacity.schemas.in
|
||||||
|
|
||||||
bin_PROGRAMS=metacity metacity-theme-viewer
|
bin_PROGRAMS=metacity metacity-theme-viewer
|
||||||
libexec_PROGRAMS=metacity-dialog
|
libexec_PROGRAMS=metacity-dialog
|
||||||
|
|
||||||
@ -176,7 +190,7 @@ testboxes_SOURCES=include/util.h core/util.c include/boxes.h core/boxes.c core/t
|
|||||||
testgradient_SOURCES=ui/gradient.h ui/gradient.c ui/testgradient.c
|
testgradient_SOURCES=ui/gradient.h ui/gradient.c ui/testgradient.c
|
||||||
testasyncgetprop_SOURCES=core/async-getprop.h core/async-getprop.c core/testasyncgetprop.c
|
testasyncgetprop_SOURCES=core/async-getprop.h core/async-getprop.c core/testasyncgetprop.c
|
||||||
|
|
||||||
noinst_PROGRAMS=testboxes testgradient testasyncgetprop
|
noinst_PROGRAMS=testboxes testgradient testasyncgetprop schema_bindings
|
||||||
|
|
||||||
testboxes_LDADD= @METACITY_LIBS@
|
testboxes_LDADD= @METACITY_LIBS@
|
||||||
testgradient_LDADD= @METACITY_LIBS@
|
testgradient_LDADD= @METACITY_LIBS@
|
||||||
@ -219,7 +233,7 @@ VARIABLES=stock_maximize_data $(srcdir)/stock_maximize.png \
|
|||||||
stock_delete_data $(srcdir)/stock_delete.png
|
stock_delete_data $(srcdir)/stock_delete.png
|
||||||
|
|
||||||
BUILT_SOURCES = inlinepixbufs.h
|
BUILT_SOURCES = inlinepixbufs.h
|
||||||
CLEANFILES = inlinepixbufs.h metacity.desktop metacity-wm.desktop metacity.schemas 50-metacity-desktop-key.xml 50-metacity-key.xml
|
CLEANFILES = inlinepixbufs.h metacity.desktop metacity-wm.desktop metacity.schemas metacity.schemas.in 50-metacity-desktop-key.xml 50-metacity-key.xml
|
||||||
|
|
||||||
inlinepixbufs.h: $(IMAGES)
|
inlinepixbufs.h: $(IMAGES)
|
||||||
$(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h
|
$(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h
|
||||||
|
@ -33,60 +33,58 @@ struct _MetaCompositor
|
|||||||
void (*unmanage_screen) (MetaCompositor *compositor,
|
void (*unmanage_screen) (MetaCompositor *compositor,
|
||||||
MetaScreen *screen);
|
MetaScreen *screen);
|
||||||
void (*add_window) (MetaCompositor *compositor,
|
void (*add_window) (MetaCompositor *compositor,
|
||||||
MetaWindow *window,
|
MetaWindow *window);
|
||||||
Window xwindow,
|
|
||||||
XWindowAttributes *attrs);
|
|
||||||
void (*remove_window) (MetaCompositor *compositor,
|
void (*remove_window) (MetaCompositor *compositor,
|
||||||
Window xwindow);
|
MetaWindow *window);
|
||||||
void (*set_updates) (MetaCompositor *compositor,
|
void (*set_updates) (MetaCompositor *compositor,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
gboolean update);
|
gboolean update);
|
||||||
void (*process_event) (MetaCompositor *compositor,
|
gboolean (*process_event) (MetaCompositor *compositor,
|
||||||
XEvent *event,
|
XEvent *event,
|
||||||
MetaWindow *window);
|
MetaWindow *window);
|
||||||
Pixmap (*get_window_pixmap) (MetaCompositor *compositor,
|
Pixmap (*get_window_pixmap) (MetaCompositor *compositor,
|
||||||
MetaWindow *window);
|
MetaWindow *window);
|
||||||
void (*set_active_window) (MetaCompositor *compositor,
|
void (*set_active_window) (MetaCompositor *compositor,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window);
|
MetaWindow *window);
|
||||||
/* local additions */
|
void (*map_window) (MetaCompositor *compositor,
|
||||||
void (*destroy_window) (MetaCompositor *compositor,
|
MetaWindow *window);
|
||||||
MetaWindow *window);
|
void (*unmap_window) (MetaCompositor *compositor,
|
||||||
|
MetaWindow *window);
|
||||||
void (*minimize_window) (MetaCompositor *compositor,
|
void (*minimize_window) (MetaCompositor *compositor,
|
||||||
MetaWindow *window);
|
MetaWindow *window,
|
||||||
|
MetaRectangle *window_rect,
|
||||||
|
MetaRectangle *icon_rect);
|
||||||
|
void (*unminimize_window) (MetaCompositor *compositor,
|
||||||
|
MetaWindow *window,
|
||||||
|
MetaRectangle *window_rect,
|
||||||
|
MetaRectangle *icon_rect);
|
||||||
void (*maximize_window) (MetaCompositor *compositor,
|
void (*maximize_window) (MetaCompositor *compositor,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
int x,
|
MetaRectangle *window_rect);
|
||||||
int y,
|
|
||||||
int width,
|
|
||||||
int height);
|
|
||||||
|
|
||||||
void (*unmaximize_window) (MetaCompositor *compositor,
|
void (*unmaximize_window) (MetaCompositor *compositor,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
int x,
|
MetaRectangle *window_rect);
|
||||||
int y,
|
|
||||||
int width,
|
|
||||||
int height);
|
|
||||||
|
|
||||||
void (*update_workspace_geometry) (MetaCompositor *compositor,
|
void (*update_workspace_geometry) (MetaCompositor *compositor,
|
||||||
MetaWorkspace *workspace);
|
MetaWorkspace *workspace);
|
||||||
|
|
||||||
void (*switch_workspace) (MetaCompositor *compositor,
|
void (*switch_workspace) (MetaCompositor *compositor,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWorkspace *from,
|
MetaWorkspace *from,
|
||||||
MetaWorkspace *to,
|
MetaWorkspace *to,
|
||||||
MetaMotionDirection direction);
|
MetaMotionDirection direction);
|
||||||
|
|
||||||
void (*sync_stack) (MetaCompositor *compositor,
|
void (*sync_stack) (MetaCompositor *compositor,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
GList *stack);
|
GList *stack);
|
||||||
|
|
||||||
void (*set_window_hidden) (MetaCompositor *compositor,
|
void (*set_window_hidden) (MetaCompositor *compositor,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
gboolean hidden);
|
gboolean hidden);
|
||||||
|
void (*sync_window_geometry) (MetaCompositor *compositor,
|
||||||
|
MetaWindow *window);
|
||||||
|
void (*sync_screen_size) (MetaCompositor *compositor,
|
||||||
|
MetaScreen *screen,
|
||||||
|
guint width,
|
||||||
|
guint height);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
@ -911,7 +913,7 @@ window_has_shadow (MetaCompWindow *cw)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (cw->type == META_COMP_WINDOW_MENU ||
|
if (cw->type == META_COMP_WINDOW_MENU ||
|
||||||
cw->type == META_COMP_WINDOW_DROP_DOWN_MENU) {
|
cw->type == META_COMP_WINDOW_DROPDOWN_MENU) {
|
||||||
meta_verbose ("Window has shadow as it is a menu\n");
|
meta_verbose ("Window has shadow as it is a menu\n");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -1776,7 +1778,7 @@ get_window_type (MetaDisplay *display,
|
|||||||
else if (type_atom == compositor->atom_net_wm_window_type_menu)
|
else if (type_atom == compositor->atom_net_wm_window_type_menu)
|
||||||
cw->type = META_COMP_WINDOW_MENU;
|
cw->type = META_COMP_WINDOW_MENU;
|
||||||
else if (type_atom == compositor->atom_net_wm_window_type_dropdown_menu)
|
else if (type_atom == compositor->atom_net_wm_window_type_dropdown_menu)
|
||||||
cw->type = META_COMP_WINDOW_DROP_DOWN_MENU;
|
cw->type = META_COMP_WINDOW_DROPDOWN_MENU;
|
||||||
else if (type_atom == compositor->atom_net_wm_window_type_tooltip)
|
else if (type_atom == compositor->atom_net_wm_window_type_tooltip)
|
||||||
cw->type = META_COMP_WINDOW_TOOLTIP;
|
cw->type = META_COMP_WINDOW_TOOLTIP;
|
||||||
else
|
else
|
||||||
@ -2389,14 +2391,14 @@ process_destroy (MetaCompositorXRender *compositor,
|
|||||||
destroy_win (compositor->display, event->window, FALSE);
|
destroy_win (compositor->display, event->window, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static gboolean
|
||||||
process_damage (MetaCompositorXRender *compositor,
|
process_damage (MetaCompositorXRender *compositor,
|
||||||
XDamageNotifyEvent *event)
|
XDamageNotifyEvent *event)
|
||||||
{
|
{
|
||||||
MetaCompWindow *cw = find_window_in_display (compositor->display,
|
MetaCompWindow *cw = find_window_in_display (compositor->display,
|
||||||
event->drawable);
|
event->drawable);
|
||||||
if (cw == NULL)
|
if (cw == NULL)
|
||||||
return;
|
return FALSE;
|
||||||
|
|
||||||
repair_win (cw);
|
repair_win (cw);
|
||||||
|
|
||||||
@ -2404,6 +2406,8 @@ process_damage (MetaCompositorXRender *compositor,
|
|||||||
if (event->more == FALSE)
|
if (event->more == FALSE)
|
||||||
add_repair (compositor->display);
|
add_repair (compositor->display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -2441,23 +2445,21 @@ timeout_debug (MetaCompositorXRender *compositor)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
xrender_add_window (MetaCompositor *compositor,
|
xrender_add_window (MetaCompositor *compositor,
|
||||||
MetaWindow *window,
|
MetaWindow *window)
|
||||||
Window xwindow,
|
|
||||||
XWindowAttributes *attrs)
|
|
||||||
{
|
{
|
||||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||||
MetaCompositorXRender *xrc = (MetaCompositorXRender *) compositor;
|
MetaCompositorXRender *xrc = (MetaCompositorXRender *) compositor;
|
||||||
MetaScreen *screen = meta_screen_for_x_screen (attrs->screen);
|
MetaScreen *screen = meta_window_get_screen (window);
|
||||||
|
|
||||||
meta_error_trap_push (xrc->display);
|
meta_error_trap_push (xrc->display);
|
||||||
add_win (screen, window, xwindow);
|
add_win (screen, window, meta_window_get_xwindow (window));
|
||||||
meta_error_trap_pop (xrc->display, FALSE);
|
meta_error_trap_pop (xrc->display, FALSE);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xrender_remove_window (MetaCompositor *compositor,
|
xrender_remove_window (MetaCompositor *compositor,
|
||||||
Window xwindow)
|
MetaWindow *window)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||||
#endif
|
#endif
|
||||||
@ -2737,7 +2739,7 @@ xrender_free_window (MetaCompositor *compositor,
|
|||||||
}
|
}
|
||||||
#endif /* 0 */
|
#endif /* 0 */
|
||||||
|
|
||||||
static void
|
static gboolean
|
||||||
xrender_process_event (MetaCompositor *compositor,
|
xrender_process_event (MetaCompositor *compositor,
|
||||||
XEvent *event,
|
XEvent *event,
|
||||||
MetaWindow *window)
|
MetaWindow *window)
|
||||||
@ -2798,7 +2800,7 @@ xrender_process_event (MetaCompositor *compositor,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
meta_error_trap_pop (xrc->display, FALSE);
|
meta_error_trap_pop (xrc->display, FALSE);
|
||||||
return;
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2808,7 +2810,7 @@ xrender_process_event (MetaCompositor *compositor,
|
|||||||
repair_display (xrc->display);
|
repair_display (xrc->display);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return;
|
return FALSE;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3060,3 +3062,6 @@ meta_compositor_xrender_new (MetaDisplay *display)
|
|||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||||
|
|
||||||
|
@ -57,23 +57,21 @@ meta_compositor_destroy (MetaCompositor *compositor)
|
|||||||
|
|
||||||
void
|
void
|
||||||
meta_compositor_add_window (MetaCompositor *compositor,
|
meta_compositor_add_window (MetaCompositor *compositor,
|
||||||
MetaWindow *window,
|
MetaWindow *window)
|
||||||
Window xwindow,
|
|
||||||
XWindowAttributes *attrs)
|
|
||||||
{
|
{
|
||||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||||
if (compositor && compositor->add_window)
|
if (compositor && compositor->add_window)
|
||||||
compositor->add_window (compositor, window, xwindow, attrs);
|
compositor->add_window (compositor, window);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_compositor_remove_window (MetaCompositor *compositor,
|
meta_compositor_remove_window (MetaCompositor *compositor,
|
||||||
Window xwindow)
|
MetaWindow *window)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||||
if (compositor && compositor->remove_window)
|
if (compositor && compositor->remove_window)
|
||||||
compositor->remove_window (compositor, xwindow);
|
compositor->remove_window (compositor, window);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,14 +106,16 @@ meta_compositor_set_updates (MetaCompositor *compositor,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
gboolean
|
||||||
meta_compositor_process_event (MetaCompositor *compositor,
|
meta_compositor_process_event (MetaCompositor *compositor,
|
||||||
XEvent *event,
|
XEvent *event,
|
||||||
MetaWindow *window)
|
MetaWindow *window)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||||
if (compositor && compositor->process_event)
|
if (compositor && compositor->process_event)
|
||||||
compositor->process_event (compositor, event, window);
|
return compositor->process_event (compositor, event, window);
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,57 +165,69 @@ void meta_compositor_end_move (MetaCompositor *compositor,
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void meta_compositor_free_window (MetaCompositor *compositor,
|
void
|
||||||
MetaWindow *window)
|
meta_compositor_map_window (MetaCompositor *compositor,
|
||||||
|
MetaWindow *window)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||||
|
if (compositor && compositor->map_window)
|
||||||
|
compositor->map_window (compositor, window);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_compositor_destroy_window (MetaCompositor *compositor,
|
meta_compositor_unmap_window (MetaCompositor *compositor,
|
||||||
MetaWindow *window)
|
MetaWindow *window)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||||
if (compositor && compositor->destroy_window)
|
if (compositor && compositor->unmap_window)
|
||||||
compositor->destroy_window (compositor, window);
|
compositor->unmap_window (compositor, window);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_compositor_minimize_window (MetaCompositor *compositor,
|
meta_compositor_minimize_window (MetaCompositor *compositor,
|
||||||
MetaWindow *window)
|
MetaWindow *window,
|
||||||
|
MetaRectangle *window_rect,
|
||||||
|
MetaRectangle *icon_rect)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||||
if (compositor && compositor->minimize_window)
|
if (compositor && compositor->minimize_window)
|
||||||
compositor->minimize_window (compositor, window);
|
compositor->minimize_window (compositor, window, window_rect, icon_rect);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_compositor_unminimize_window (MetaCompositor *compositor,
|
||||||
|
MetaWindow *window,
|
||||||
|
MetaRectangle *window_rect,
|
||||||
|
MetaRectangle *icon_rect)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||||
|
if (compositor && compositor->unminimize_window)
|
||||||
|
compositor->unminimize_window (compositor, window, window_rect, icon_rect);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_compositor_maximize_window (MetaCompositor *compositor,
|
meta_compositor_maximize_window (MetaCompositor *compositor,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
int x,
|
MetaRectangle *window_rect)
|
||||||
int y,
|
|
||||||
int width,
|
|
||||||
int height)
|
|
||||||
{
|
{
|
||||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||||
if (compositor && compositor->maximize_window)
|
if (compositor && compositor->maximize_window)
|
||||||
compositor->maximize_window (compositor, window, x, y, width, height);
|
compositor->maximize_window (compositor, window, window_rect);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_compositor_unmaximize_window (MetaCompositor *compositor,
|
meta_compositor_unmaximize_window (MetaCompositor *compositor,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
int x,
|
MetaRectangle *window_rect)
|
||||||
int y,
|
|
||||||
int width,
|
|
||||||
int height)
|
|
||||||
|
|
||||||
{
|
{
|
||||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||||
if (compositor && compositor->unmaximize_window)
|
if (compositor && compositor->unmaximize_window)
|
||||||
compositor->unmaximize_window (compositor, window, x, y, width, height);
|
compositor->unmaximize_window (compositor, window, window_rect);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -265,3 +277,25 @@ meta_compositor_set_window_hidden (MetaCompositor *compositor,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_compositor_sync_window_geometry (MetaCompositor *compositor,
|
||||||
|
MetaWindow *window)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||||
|
if (compositor && compositor->sync_window_geometry)
|
||||||
|
compositor->sync_window_geometry (compositor, window);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_compositor_sync_screen_size (MetaCompositor *compositor,
|
||||||
|
MetaScreen *screen,
|
||||||
|
guint width,
|
||||||
|
guint height)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||||
|
if (compositor && compositor->sync_screen_size)
|
||||||
|
compositor->sync_screen_size (compositor, screen, width, height);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
207
src/compositor/mutter/mutter-module.c
Normal file
207
src/compositor/mutter/mutter-module.c
Normal file
@ -0,0 +1,207 @@
|
|||||||
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2008 Intel Corp.
|
||||||
|
*
|
||||||
|
* Author: Tomas Frydrych <tf@linux.intel.com>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "mutter-plugin.h"
|
||||||
|
#include "mutter-module.h"
|
||||||
|
|
||||||
|
#include <gmodule.h>
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
PROP_0,
|
||||||
|
PROP_PATH,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _MutterModulePrivate
|
||||||
|
{
|
||||||
|
GModule *lib;
|
||||||
|
gchar *path;
|
||||||
|
GType plugin_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define MUTTER_MODULE_GET_PRIVATE(obj) \
|
||||||
|
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), MUTTER_TYPE_MODULE, MutterModulePrivate))
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (MutterModule, mutter_module, G_TYPE_TYPE_MODULE);
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
mutter_module_load (GTypeModule *gmodule)
|
||||||
|
{
|
||||||
|
MutterModulePrivate *priv = MUTTER_MODULE (gmodule)->priv;
|
||||||
|
MutterPluginVersion *info = NULL;
|
||||||
|
GType (*register_type) (GTypeModule *) = NULL;
|
||||||
|
|
||||||
|
if (priv->lib && priv->plugin_type)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
g_assert (priv->path);
|
||||||
|
|
||||||
|
if (!priv->lib &&
|
||||||
|
!(priv->lib = g_module_open (priv->path, G_MODULE_BIND_LOCAL)))
|
||||||
|
{
|
||||||
|
g_warning ("Could not load library [%s (%s)]",
|
||||||
|
priv->path, g_module_error ());
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_module_symbol (priv->lib, "mutter_plugin_version", (gpointer *)&info) &&
|
||||||
|
g_module_symbol (priv->lib, "mutter_plugin_register_type",
|
||||||
|
(gpointer *)®ister_type) &&
|
||||||
|
info && register_type)
|
||||||
|
{
|
||||||
|
if (info->version_api != METACITY_CLUTTER_PLUGIN_API_VERSION)
|
||||||
|
g_warning ("Plugin API mismatch for [%s]", priv->path);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GType plugin_type;
|
||||||
|
|
||||||
|
if (!(plugin_type = register_type (gmodule)))
|
||||||
|
{
|
||||||
|
g_warning ("Could not register type for plugin %s",
|
||||||
|
priv->path);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
priv->plugin_type = plugin_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
g_warning ("Broken plugin module [%s]", priv->path);
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_module_unload (GTypeModule *gmodule)
|
||||||
|
{
|
||||||
|
MutterModulePrivate *priv = MUTTER_MODULE (gmodule)->priv;
|
||||||
|
|
||||||
|
g_module_close (priv->lib);
|
||||||
|
|
||||||
|
priv->lib = NULL;
|
||||||
|
priv->plugin_type = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_module_dispose (GObject *object)
|
||||||
|
{
|
||||||
|
G_OBJECT_CLASS (mutter_module_parent_class)->dispose (object);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_module_finalize (GObject *object)
|
||||||
|
{
|
||||||
|
MutterModulePrivate *priv = MUTTER_MODULE (object)->priv;
|
||||||
|
|
||||||
|
g_free (priv->path);
|
||||||
|
priv->path = NULL;
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (mutter_module_parent_class)->finalize (object);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_module_set_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
const GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
MutterModulePrivate *priv = MUTTER_MODULE (object)->priv;
|
||||||
|
|
||||||
|
switch (prop_id)
|
||||||
|
{
|
||||||
|
case PROP_PATH:
|
||||||
|
g_free (priv->path);
|
||||||
|
priv->path = g_value_dup_string (value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_module_get_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
MutterModulePrivate *priv = MUTTER_MODULE (object)->priv;
|
||||||
|
|
||||||
|
switch (prop_id)
|
||||||
|
{
|
||||||
|
case PROP_PATH:
|
||||||
|
g_value_set_string (value, priv->path);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_module_class_init (MutterModuleClass *klass)
|
||||||
|
{
|
||||||
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||||
|
GTypeModuleClass *gmodule_class = G_TYPE_MODULE_CLASS (klass);
|
||||||
|
|
||||||
|
gobject_class->finalize = mutter_module_finalize;
|
||||||
|
gobject_class->dispose = mutter_module_dispose;
|
||||||
|
gobject_class->set_property = mutter_module_set_property;
|
||||||
|
gobject_class->get_property = mutter_module_get_property;
|
||||||
|
|
||||||
|
gmodule_class->load = mutter_module_load;
|
||||||
|
gmodule_class->unload = mutter_module_unload;
|
||||||
|
|
||||||
|
g_object_class_install_property (gobject_class,
|
||||||
|
PROP_PATH,
|
||||||
|
g_param_spec_string ("path",
|
||||||
|
"Path",
|
||||||
|
"Load path",
|
||||||
|
NULL,
|
||||||
|
G_PARAM_READWRITE |
|
||||||
|
G_PARAM_CONSTRUCT_ONLY));
|
||||||
|
|
||||||
|
g_type_class_add_private (gobject_class, sizeof (MutterModulePrivate));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_module_init (MutterModule *self)
|
||||||
|
{
|
||||||
|
MutterModulePrivate *priv;
|
||||||
|
|
||||||
|
self->priv = priv = MUTTER_MODULE_GET_PRIVATE (self);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
GType
|
||||||
|
mutter_module_get_plugin_type (MutterModule *module)
|
||||||
|
{
|
||||||
|
MutterModulePrivate *priv = MUTTER_MODULE (module)->priv;
|
||||||
|
|
||||||
|
return priv->plugin_type;
|
||||||
|
}
|
||||||
|
|
57
src/compositor/mutter/mutter-module.h
Normal file
57
src/compositor/mutter/mutter-module.h
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2008 Intel Corp.
|
||||||
|
*
|
||||||
|
* Author: Tomas Frydrych <tf@linux.intel.com>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
* 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MUTTER_MODULE_H_
|
||||||
|
#define MUTTER_MODULE_H_
|
||||||
|
|
||||||
|
#include <glib-object.h>
|
||||||
|
|
||||||
|
#define MUTTER_TYPE_MODULE (mutter_module_get_type ())
|
||||||
|
#define MUTTER_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MUTTER_TYPE_MODULE, MutterModule))
|
||||||
|
#define MUTTER_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MUTTER_TYPE_MODULE, MutterModuleClass))
|
||||||
|
#define MUTTER_IS_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MUTTER_MODULE_TYPE))
|
||||||
|
#define MUTTER_IS_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MUTTER_TYPE_MODULE))
|
||||||
|
#define MUTTER_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MUTTER_TYPE_MODULE, MutterModuleClass))
|
||||||
|
|
||||||
|
typedef struct _MutterModule MutterModule;
|
||||||
|
typedef struct _MutterModuleClass MutterModuleClass;
|
||||||
|
typedef struct _MutterModulePrivate MutterModulePrivate;
|
||||||
|
|
||||||
|
struct _MutterModule
|
||||||
|
{
|
||||||
|
GTypeModule parent;
|
||||||
|
|
||||||
|
MutterModulePrivate *priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _MutterModuleClass
|
||||||
|
{
|
||||||
|
GTypeModuleClass parent_class;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
GType mutter_module_get_type (void);
|
||||||
|
|
||||||
|
GType mutter_module_get_plugin_type (MutterModule *module);
|
||||||
|
|
||||||
|
#endif
|
@ -26,215 +26,52 @@
|
|||||||
#include "prefs.h"
|
#include "prefs.h"
|
||||||
#include "errors.h"
|
#include "errors.h"
|
||||||
#include "workspace.h"
|
#include "workspace.h"
|
||||||
|
#include "mutter-module.h"
|
||||||
|
|
||||||
#include <gmodule.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <X11/extensions/Xfixes.h>
|
|
||||||
#include <X11/extensions/shape.h>
|
|
||||||
#include <clutter/x11/clutter-x11.h>
|
|
||||||
|
|
||||||
static gboolean mutter_plugin_manager_reload (
|
/*
|
||||||
MutterPluginManager *plugin_mgr);
|
* There is only one instace of each module per the process.
|
||||||
|
*/
|
||||||
|
static GHashTable *plugin_modules = NULL;
|
||||||
|
|
||||||
|
static gboolean mutter_plugin_manager_reload (MutterPluginManager *plugin_mgr);
|
||||||
|
|
||||||
struct MutterPluginManager
|
struct MutterPluginManager
|
||||||
{
|
{
|
||||||
MetaScreen *screen;
|
MetaScreen *screen;
|
||||||
|
|
||||||
GList *plugins; /* TODO -- maybe use hash table */
|
GList *plugins;
|
||||||
GList *unload; /* Plugins that are disabled and pending unload */
|
GList *unload; /* Plugins that are disabled and pending unload */
|
||||||
|
|
||||||
guint idle_unload_id;
|
guint idle_unload_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct MutterPluginPrivate
|
|
||||||
{
|
|
||||||
char *name;
|
|
||||||
MutterPluginManager *self;
|
|
||||||
GModule *module;
|
|
||||||
gulong features;
|
|
||||||
/* We use this to track the number of effects currently being managed
|
|
||||||
* by a plugin. Currently this is used to block unloading while effects
|
|
||||||
* are in progress. */
|
|
||||||
gint running;
|
|
||||||
|
|
||||||
gboolean disabled : 1;
|
|
||||||
} MutterPluginPrivate;
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
free_plugin_workspaces (MutterPlugin *plugin)
|
|
||||||
{
|
|
||||||
GList *l;
|
|
||||||
|
|
||||||
l = plugin->work_areas;
|
|
||||||
|
|
||||||
while (l)
|
|
||||||
{
|
|
||||||
g_free (l->data);
|
|
||||||
l = l->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (plugin->work_areas)
|
|
||||||
g_list_free (plugin->work_areas);
|
|
||||||
|
|
||||||
plugin->work_areas = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Gets work area geometry and stores it in list in the plugin.
|
|
||||||
*
|
|
||||||
* If the plugin list is already populated, we simply replace it (we are
|
|
||||||
* dealing with a small number of items in the list and unfrequent changes).
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
update_plugin_workspaces (MetaScreen *screen,
|
|
||||||
MutterPlugin *plugin)
|
|
||||||
{
|
|
||||||
GList *l, *l2 = NULL;
|
|
||||||
|
|
||||||
l = meta_screen_get_workspaces (screen);
|
|
||||||
|
|
||||||
while (l)
|
|
||||||
{
|
|
||||||
MetaWorkspace *w = l->data;
|
|
||||||
MetaRectangle *r;
|
|
||||||
|
|
||||||
r = g_new0 (MetaRectangle, 1);
|
|
||||||
|
|
||||||
meta_workspace_get_work_area_all_xineramas (w, (MetaRectangle*)r);
|
|
||||||
|
|
||||||
l2 = g_list_append (l2, r);
|
|
||||||
|
|
||||||
l = l->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
free_plugin_workspaces (plugin);
|
|
||||||
|
|
||||||
plugin->work_areas = l2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* parse_disable_params:
|
|
||||||
* @params: as read from gconf, a ':' seperated list of plugin options
|
|
||||||
* @features: The mask of features the plugin advertises
|
|
||||||
*
|
|
||||||
* This function returns a new mask of features removing anything that
|
|
||||||
* the user has disabled.
|
|
||||||
*/
|
|
||||||
static gulong
|
|
||||||
parse_disable_params (const char *params, MutterPlugin *plugin)
|
|
||||||
{
|
|
||||||
char *p;
|
|
||||||
gulong features = 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Feature flags: identify events that the plugin can handle; a plugin can
|
|
||||||
* handle one or more events.
|
|
||||||
*/
|
|
||||||
if (plugin->minimize)
|
|
||||||
features |= MUTTER_PLUGIN_MINIMIZE;
|
|
||||||
|
|
||||||
if (plugin->maximize)
|
|
||||||
features |= MUTTER_PLUGIN_MAXIMIZE;
|
|
||||||
|
|
||||||
if (plugin->unmaximize)
|
|
||||||
features |= MUTTER_PLUGIN_UNMAXIMIZE;
|
|
||||||
|
|
||||||
if (plugin->map)
|
|
||||||
features |= MUTTER_PLUGIN_MAP;
|
|
||||||
|
|
||||||
if (plugin->destroy)
|
|
||||||
features |= MUTTER_PLUGIN_DESTROY;
|
|
||||||
|
|
||||||
if (plugin->switch_workspace)
|
|
||||||
features |= MUTTER_PLUGIN_SWITCH_WORKSPACE;
|
|
||||||
|
|
||||||
if (!params)
|
|
||||||
return features;
|
|
||||||
|
|
||||||
if ((p = strstr (params, "disable:")))
|
|
||||||
{
|
|
||||||
gchar *d = g_strdup (p+8);
|
|
||||||
|
|
||||||
p = strchr (d, ';');
|
|
||||||
|
|
||||||
if (p)
|
|
||||||
*p = 0;
|
|
||||||
|
|
||||||
if (strstr (d, "minimize"))
|
|
||||||
features &= ~ MUTTER_PLUGIN_MINIMIZE;
|
|
||||||
|
|
||||||
if (strstr (d, "maximize"))
|
|
||||||
features &= ~ MUTTER_PLUGIN_MAXIMIZE;
|
|
||||||
|
|
||||||
if (strstr (d, "unmaximize"))
|
|
||||||
features &= ~ MUTTER_PLUGIN_UNMAXIMIZE;
|
|
||||||
|
|
||||||
if (strstr (d, "map"))
|
|
||||||
features &= ~ MUTTER_PLUGIN_MAP;
|
|
||||||
|
|
||||||
if (strstr (d, "destroy"))
|
|
||||||
features &= ~ MUTTER_PLUGIN_DESTROY;
|
|
||||||
|
|
||||||
if (strstr (d, "switch-workspace"))
|
|
||||||
features &= ~MUTTER_PLUGIN_SWITCH_WORKSPACE;
|
|
||||||
|
|
||||||
g_free (d);
|
|
||||||
}
|
|
||||||
return features;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Checks that the plugin is compatible with the WM and sets up the plugin
|
* Checks that the plugin is compatible with the WM and sets up the plugin
|
||||||
* struct.
|
* struct.
|
||||||
*/
|
*/
|
||||||
static MutterPlugin *
|
static MutterPlugin *
|
||||||
mutter_plugin_load (MutterPluginManager *plugin_mgr,
|
mutter_plugin_load (MutterPluginManager *mgr,
|
||||||
GModule *module,
|
MutterModule *module,
|
||||||
const gchar *params)
|
const gchar *params)
|
||||||
{
|
{
|
||||||
MutterPlugin *plugin;
|
MutterPlugin *plugin = NULL;
|
||||||
|
GType plugin_type = mutter_module_get_plugin_type (module);
|
||||||
|
|
||||||
if (g_module_symbol (module, "mutter_plugin", (gpointer *)&plugin))
|
if (!plugin_type)
|
||||||
{
|
{
|
||||||
if (plugin->version_api == METACITY_CLUTTER_PLUGIN_API_VERSION)
|
g_warning ("Plugin type not registered !!!");
|
||||||
{
|
return NULL;
|
||||||
MutterPluginPrivate *priv;
|
|
||||||
|
|
||||||
priv = g_new0 (MutterPluginPrivate, 1);
|
|
||||||
priv->name = _(plugin->name);
|
|
||||||
priv->module = module;
|
|
||||||
priv->self = plugin_mgr;
|
|
||||||
|
|
||||||
/* FIXME: instead of hanging private data of the plugin descriptor
|
|
||||||
* we could make the descriptor const if we were to hang it off
|
|
||||||
* a plugin manager structure */
|
|
||||||
plugin->manager_private = priv;
|
|
||||||
|
|
||||||
update_plugin_workspaces (plugin_mgr->screen, plugin);
|
|
||||||
|
|
||||||
priv->features = parse_disable_params (params, plugin);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Check for and run the plugin init function.
|
|
||||||
*/
|
|
||||||
if (!plugin->do_init || !(plugin->do_init (params)))
|
|
||||||
{
|
|
||||||
g_free (priv);
|
|
||||||
|
|
||||||
free_plugin_workspaces (plugin);
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
meta_verbose ("Loaded plugin [%s]\n", priv->name);
|
|
||||||
|
|
||||||
return plugin;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
plugin = g_object_new (plugin_type,
|
||||||
|
"screen", mgr->screen,
|
||||||
|
"params", params,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
return plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -245,22 +82,13 @@ mutter_plugin_load (MutterPluginManager *plugin_mgr,
|
|||||||
static gboolean
|
static gboolean
|
||||||
mutter_plugin_unload (MutterPlugin *plugin)
|
mutter_plugin_unload (MutterPlugin *plugin)
|
||||||
{
|
{
|
||||||
MutterPluginPrivate *priv;
|
if (mutter_plugin_running (plugin))
|
||||||
GModule *module;
|
|
||||||
|
|
||||||
priv = plugin->manager_private;
|
|
||||||
module = priv->module;
|
|
||||||
|
|
||||||
if (priv->running)
|
|
||||||
{
|
{
|
||||||
priv->disabled = TRUE;
|
g_object_set (plugin, "disabled", TRUE, NULL);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (priv);
|
g_object_unref (plugin);
|
||||||
plugin->manager_private = NULL;
|
|
||||||
|
|
||||||
g_module_close (module);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -353,10 +181,20 @@ prefs_changed_callback (MetaPreference pref,
|
|||||||
{
|
{
|
||||||
mutter_plugin_manager_reload (plugin_mgr);
|
mutter_plugin_manager_reload (plugin_mgr);
|
||||||
}
|
}
|
||||||
else if (pref == META_PREF_NUM_WORKSPACES)
|
}
|
||||||
|
|
||||||
|
static MutterModule *
|
||||||
|
mutter_plugin_manager_get_module (const gchar *path)
|
||||||
|
{
|
||||||
|
MutterModule *module = g_hash_table_lookup (plugin_modules, path);
|
||||||
|
|
||||||
|
if (!module &&
|
||||||
|
(module = g_object_new (MUTTER_TYPE_MODULE, "path", path, NULL)))
|
||||||
{
|
{
|
||||||
mutter_plugin_manager_update_workspaces (plugin_mgr);
|
g_hash_table_insert (plugin_modules, g_strdup (path), module);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return module;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -388,8 +226,8 @@ mutter_plugin_manager_load (MutterPluginManager *plugin_mgr)
|
|||||||
|
|
||||||
if (plugin_string)
|
if (plugin_string)
|
||||||
{
|
{
|
||||||
GModule *plugin;
|
MutterModule *module;
|
||||||
gchar *path;
|
gchar *path;
|
||||||
|
|
||||||
params = strchr (plugin_string, ':');
|
params = strchr (plugin_string, ':');
|
||||||
|
|
||||||
@ -404,20 +242,38 @@ mutter_plugin_manager_load (MutterPluginManager *plugin_mgr)
|
|||||||
else
|
else
|
||||||
path = g_strconcat (dpath, plugin_string, ".so", NULL);
|
path = g_strconcat (dpath, plugin_string, ".so", NULL);
|
||||||
|
|
||||||
if ((plugin = g_module_open (path, G_MODULE_BIND_LOCAL)))
|
module = mutter_plugin_manager_get_module (path);
|
||||||
|
|
||||||
|
if (module)
|
||||||
{
|
{
|
||||||
MutterPlugin *p;
|
MutterPlugin *p;
|
||||||
|
gboolean use_succeeded;
|
||||||
|
|
||||||
if ((p = mutter_plugin_load (plugin_mgr, plugin, params)))
|
/*
|
||||||
plugin_mgr->plugins = g_list_prepend (plugin_mgr->plugins, p);
|
* This dlopens the module and registers the plugin type with the
|
||||||
|
* GType system, if the module is not already loaded. When we
|
||||||
|
* create a plugin, the type system also calls g_type_module_use()
|
||||||
|
* to guarantee the module will not be unloaded during the plugin
|
||||||
|
* life time. Consequently we can unuse() the module again.
|
||||||
|
*/
|
||||||
|
use_succeeded = g_type_module_use (G_TYPE_MODULE (module));
|
||||||
|
|
||||||
|
if (use_succeeded &&
|
||||||
|
(p = mutter_plugin_load (plugin_mgr, module, params)))
|
||||||
|
{
|
||||||
|
plugin_mgr->plugins = g_list_prepend (plugin_mgr->plugins, p);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_message ("Plugin load for [%s] failed", path);
|
g_warning ("Plugin load for [%s] failed", path);
|
||||||
g_module_close (plugin);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (use_succeeded)
|
||||||
|
g_type_module_unuse (G_TYPE_MODULE (module));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
g_message ("Unable to load plugin [%s]: %s", path, g_module_error());
|
g_warning ("Unable to load plugin module [%s]: %s",
|
||||||
|
path, g_module_error());
|
||||||
|
|
||||||
g_free (path);
|
g_free (path);
|
||||||
g_free (plugin_string);
|
g_free (plugin_string);
|
||||||
@ -459,57 +315,17 @@ mutter_plugin_manager_init (MutterPluginManager *plugin_mgr)
|
|||||||
return mutter_plugin_manager_load (plugin_mgr);
|
return mutter_plugin_manager_load (plugin_mgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
mutter_plugin_manager_update_workspace (MutterPluginManager *plugin_mgr,
|
|
||||||
MetaWorkspace *workspace)
|
|
||||||
{
|
|
||||||
GList *l;
|
|
||||||
gint index;
|
|
||||||
|
|
||||||
index = meta_workspace_index (workspace);
|
|
||||||
l = plugin_mgr->plugins;
|
|
||||||
|
|
||||||
while (l)
|
|
||||||
{
|
|
||||||
MutterPlugin *plugin = l->data;
|
|
||||||
MetaRectangle *rect = g_list_nth_data (plugin->work_areas, index);
|
|
||||||
|
|
||||||
if (rect)
|
|
||||||
{
|
|
||||||
meta_workspace_get_work_area_all_xineramas (workspace, rect);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Something not entirely right; redo the whole thing */
|
|
||||||
update_plugin_workspaces (plugin_mgr->screen, plugin);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
l = l->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
mutter_plugin_manager_update_workspaces (MutterPluginManager *plugin_mgr)
|
|
||||||
{
|
|
||||||
GList *l;
|
|
||||||
|
|
||||||
l = plugin_mgr->plugins;
|
|
||||||
while (l)
|
|
||||||
{
|
|
||||||
MutterPlugin *plugin = l->data;
|
|
||||||
|
|
||||||
update_plugin_workspaces (plugin_mgr->screen, plugin);
|
|
||||||
|
|
||||||
l = l->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MutterPluginManager *
|
MutterPluginManager *
|
||||||
mutter_plugin_manager_new (MetaScreen *screen)
|
mutter_plugin_manager_new (MetaScreen *screen)
|
||||||
{
|
{
|
||||||
MutterPluginManager *plugin_mgr;
|
MutterPluginManager *plugin_mgr;
|
||||||
|
|
||||||
|
if (!plugin_modules)
|
||||||
|
{
|
||||||
|
plugin_modules = g_hash_table_new_full (g_str_hash, g_str_equal, g_free,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
|
||||||
plugin_mgr = g_new0 (MutterPluginManager, 1);
|
plugin_mgr = g_new0 (MutterPluginManager, 1);
|
||||||
|
|
||||||
plugin_mgr->screen = screen;
|
plugin_mgr->screen = screen;
|
||||||
@ -533,12 +349,12 @@ mutter_plugin_manager_kill_effect (MutterPluginManager *plugin_mgr,
|
|||||||
while (l)
|
while (l)
|
||||||
{
|
{
|
||||||
MutterPlugin *plugin = l->data;
|
MutterPlugin *plugin = l->data;
|
||||||
MutterPluginPrivate *priv = plugin->manager_private;
|
MutterPluginClass *klass = MUTTER_PLUGIN_GET_CLASS (plugin);
|
||||||
|
|
||||||
if (!priv->disabled
|
if (!mutter_plugin_disabled (plugin)
|
||||||
&& (priv->features & events)
|
&& (mutter_plugin_features (plugin) & events)
|
||||||
&& plugin->kill_effect)
|
&& klass->kill_effect)
|
||||||
plugin->kill_effect (actor, events);
|
klass->kill_effect (plugin, actor, events);
|
||||||
|
|
||||||
l = l->next;
|
l = l->next;
|
||||||
}
|
}
|
||||||
@ -567,43 +383,44 @@ mutter_plugin_manager_event_simple (MutterPluginManager *plugin_mgr,
|
|||||||
while (l)
|
while (l)
|
||||||
{
|
{
|
||||||
MutterPlugin *plugin = l->data;
|
MutterPlugin *plugin = l->data;
|
||||||
MutterPluginPrivate *priv = plugin->manager_private;
|
MutterPluginClass *klass = MUTTER_PLUGIN_GET_CLASS (plugin);
|
||||||
|
|
||||||
if (!priv->disabled && (priv->features & event))
|
if (!mutter_plugin_disabled (plugin) &&
|
||||||
|
(mutter_plugin_features (plugin) & event))
|
||||||
{
|
{
|
||||||
retval = TRUE;
|
retval = TRUE;
|
||||||
|
|
||||||
switch (event)
|
switch (event)
|
||||||
{
|
{
|
||||||
case MUTTER_PLUGIN_MINIMIZE:
|
case MUTTER_PLUGIN_MINIMIZE:
|
||||||
if (plugin->minimize)
|
if (klass->minimize)
|
||||||
{
|
{
|
||||||
mutter_plugin_manager_kill_effect (
|
mutter_plugin_manager_kill_effect (
|
||||||
plugin_mgr,
|
plugin_mgr,
|
||||||
actor,
|
actor,
|
||||||
ALL_BUT_SWITCH);
|
ALL_BUT_SWITCH);
|
||||||
|
|
||||||
priv->running++;
|
_mutter_plugin_effect_started (plugin);
|
||||||
plugin->minimize (actor);
|
klass->minimize (plugin, actor);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MUTTER_PLUGIN_MAP:
|
case MUTTER_PLUGIN_MAP:
|
||||||
if (plugin->map)
|
if (klass->map)
|
||||||
{
|
{
|
||||||
mutter_plugin_manager_kill_effect (
|
mutter_plugin_manager_kill_effect (
|
||||||
plugin_mgr,
|
plugin_mgr,
|
||||||
actor,
|
actor,
|
||||||
ALL_BUT_SWITCH);
|
ALL_BUT_SWITCH);
|
||||||
|
|
||||||
priv->running++;
|
_mutter_plugin_effect_started (plugin);
|
||||||
plugin->map (actor);
|
klass->map (plugin, actor);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MUTTER_PLUGIN_DESTROY:
|
case MUTTER_PLUGIN_DESTROY:
|
||||||
if (plugin->destroy)
|
if (klass->destroy)
|
||||||
{
|
{
|
||||||
priv->running++;
|
_mutter_plugin_effect_started (plugin);
|
||||||
plugin->destroy (actor);
|
klass->destroy (plugin, actor);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -641,37 +458,41 @@ mutter_plugin_manager_event_maximize (MutterPluginManager *plugin_mgr,
|
|||||||
while (l)
|
while (l)
|
||||||
{
|
{
|
||||||
MutterPlugin *plugin = l->data;
|
MutterPlugin *plugin = l->data;
|
||||||
MutterPluginPrivate *priv = plugin->manager_private;
|
MutterPluginClass *klass = MUTTER_PLUGIN_GET_CLASS (plugin);
|
||||||
|
|
||||||
if (!priv->disabled && (priv->features & event))
|
if (!mutter_plugin_disabled (plugin) &&
|
||||||
|
(mutter_plugin_features (plugin) & event))
|
||||||
{
|
{
|
||||||
retval = TRUE;
|
retval = TRUE;
|
||||||
|
|
||||||
switch (event)
|
switch (event)
|
||||||
{
|
{
|
||||||
case MUTTER_PLUGIN_MAXIMIZE:
|
case MUTTER_PLUGIN_MAXIMIZE:
|
||||||
if (plugin->maximize)
|
if (klass->maximize)
|
||||||
{
|
{
|
||||||
mutter_plugin_manager_kill_effect (
|
mutter_plugin_manager_kill_effect (
|
||||||
plugin_mgr,
|
plugin_mgr,
|
||||||
actor,
|
actor,
|
||||||
ALL_BUT_SWITCH);
|
ALL_BUT_SWITCH);
|
||||||
|
|
||||||
plugin->maximize (actor,
|
_mutter_plugin_effect_started (plugin);
|
||||||
target_x, target_y,
|
klass->maximize (plugin, actor,
|
||||||
target_width, target_height);
|
target_x, target_y,
|
||||||
|
target_width, target_height);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MUTTER_PLUGIN_UNMAXIMIZE:
|
case MUTTER_PLUGIN_UNMAXIMIZE:
|
||||||
if (plugin->unmaximize)
|
if (klass->unmaximize)
|
||||||
{
|
{
|
||||||
mutter_plugin_manager_kill_effect (
|
mutter_plugin_manager_kill_effect (
|
||||||
plugin_mgr,
|
plugin_mgr,
|
||||||
actor,
|
actor,
|
||||||
ALL_BUT_SWITCH);
|
ALL_BUT_SWITCH);
|
||||||
plugin->unmaximize (actor,
|
|
||||||
target_x, target_y,
|
_mutter_plugin_effect_started (plugin);
|
||||||
target_width, target_height);
|
klass->unmaximize (plugin, actor,
|
||||||
|
target_x, target_y,
|
||||||
|
target_width, target_height);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -706,13 +527,13 @@ mutter_plugin_manager_switch_workspace (MutterPluginManager *plugin_mgr,
|
|||||||
while (l)
|
while (l)
|
||||||
{
|
{
|
||||||
MutterPlugin *plugin = l->data;
|
MutterPlugin *plugin = l->data;
|
||||||
MutterPluginPrivate *priv = plugin->manager_private;
|
MutterPluginClass *klass = MUTTER_PLUGIN_GET_CLASS (plugin);
|
||||||
|
|
||||||
if (!priv->disabled &&
|
if (!mutter_plugin_disabled (plugin) &&
|
||||||
(priv->features & MUTTER_PLUGIN_SWITCH_WORKSPACE) &&
|
(mutter_plugin_features (plugin) & MUTTER_PLUGIN_SWITCH_WORKSPACE) &&
|
||||||
(actors && *actors))
|
(actors && *actors))
|
||||||
{
|
{
|
||||||
if (plugin->switch_workspace)
|
if (klass->switch_workspace)
|
||||||
{
|
{
|
||||||
retval = TRUE;
|
retval = TRUE;
|
||||||
mutter_plugin_manager_kill_effect (
|
mutter_plugin_manager_kill_effect (
|
||||||
@ -720,7 +541,8 @@ mutter_plugin_manager_switch_workspace (MutterPluginManager *plugin_mgr,
|
|||||||
MUTTER_WINDOW ((*actors)->data),
|
MUTTER_WINDOW ((*actors)->data),
|
||||||
MUTTER_PLUGIN_SWITCH_WORKSPACE);
|
MUTTER_PLUGIN_SWITCH_WORKSPACE);
|
||||||
|
|
||||||
plugin->switch_workspace (actors, from, to, direction);
|
_mutter_plugin_effect_started (plugin);
|
||||||
|
klass->switch_workspace (plugin, actors, from, to, direction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -751,11 +573,12 @@ mutter_plugin_manager_xevent_filter (MutterPluginManager *plugin_mgr,
|
|||||||
|
|
||||||
while (l)
|
while (l)
|
||||||
{
|
{
|
||||||
MutterPlugin *plugin = l->data;
|
MutterPlugin *plugin = l->data;
|
||||||
|
MutterPluginClass *klass = MUTTER_PLUGIN_GET_CLASS (plugin);
|
||||||
|
|
||||||
if (plugin->xevent_filter)
|
if (klass->xevent_filter)
|
||||||
{
|
{
|
||||||
if (plugin->xevent_filter (xev) == TRUE)
|
if (klass->xevent_filter (plugin, xev) == TRUE)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -765,176 +588,3 @@ mutter_plugin_manager_xevent_filter (MutterPluginManager *plugin_mgr,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Public accessors for plugins, exposed from mutter-plugin.h
|
|
||||||
*/
|
|
||||||
ClutterActor *
|
|
||||||
mutter_plugin_get_overlay_group (MutterPlugin *plugin)
|
|
||||||
{
|
|
||||||
MutterPluginPrivate *priv = plugin->manager_private;
|
|
||||||
MutterPluginManager *plugin_mgr = priv->self;
|
|
||||||
|
|
||||||
return mutter_get_overlay_group_for_screen (plugin_mgr->screen);
|
|
||||||
}
|
|
||||||
|
|
||||||
ClutterActor *
|
|
||||||
mutter_plugin_get_stage (MutterPlugin *plugin)
|
|
||||||
{
|
|
||||||
MutterPluginPrivate *priv = plugin->manager_private;
|
|
||||||
MutterPluginManager *plugin_mgr = priv->self;
|
|
||||||
|
|
||||||
return mutter_get_stage_for_screen (plugin_mgr->screen);
|
|
||||||
}
|
|
||||||
|
|
||||||
ClutterActor *
|
|
||||||
mutter_plugin_get_window_group (MutterPlugin *plugin)
|
|
||||||
{
|
|
||||||
MutterPluginPrivate *priv = plugin->manager_private;
|
|
||||||
MutterPluginManager *plugin_mgr = priv->self;
|
|
||||||
|
|
||||||
return mutter_get_window_group_for_screen (plugin_mgr->screen);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
mutter_plugin_effect_completed (MutterPlugin *plugin,
|
|
||||||
MutterWindow *actor,
|
|
||||||
unsigned long event)
|
|
||||||
{
|
|
||||||
MutterPluginPrivate *priv = plugin->manager_private;
|
|
||||||
|
|
||||||
priv->running--;
|
|
||||||
|
|
||||||
if (!actor)
|
|
||||||
{
|
|
||||||
g_warning ("Plugin [%s] passed NULL for actor!",
|
|
||||||
(plugin && plugin->name) ? plugin->name : "unknown");
|
|
||||||
}
|
|
||||||
|
|
||||||
mutter_window_effect_completed (actor, event);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
mutter_plugin_query_screen_size (MutterPlugin *plugin,
|
|
||||||
int *width,
|
|
||||||
int *height)
|
|
||||||
{
|
|
||||||
MutterPluginPrivate *priv = plugin->manager_private;
|
|
||||||
MutterPluginManager *plugin_mgr = priv->self;
|
|
||||||
|
|
||||||
meta_screen_get_size (plugin_mgr->screen, width, height);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
mutter_plugin_set_stage_reactive (MutterPlugin *plugin,
|
|
||||||
gboolean reactive)
|
|
||||||
{
|
|
||||||
MutterPluginPrivate *priv = plugin->manager_private;
|
|
||||||
MutterPluginManager *mgr = priv->self;
|
|
||||||
MetaDisplay *display = meta_screen_get_display (mgr->screen);
|
|
||||||
Display *xdpy = meta_display_get_xdisplay (display);
|
|
||||||
Window xstage, xoverlay;
|
|
||||||
ClutterActor *stage;
|
|
||||||
|
|
||||||
stage = mutter_get_stage_for_screen (mgr->screen);
|
|
||||||
xstage = clutter_x11_get_stage_window (CLUTTER_STAGE (stage));
|
|
||||||
xoverlay = mutter_get_overlay_window (mgr->screen);
|
|
||||||
|
|
||||||
static XserverRegion region = None;
|
|
||||||
|
|
||||||
if (region == None)
|
|
||||||
region = XFixesCreateRegion (xdpy, NULL, 0);
|
|
||||||
|
|
||||||
if (reactive)
|
|
||||||
{
|
|
||||||
XFixesSetWindowShapeRegion (xdpy, xstage,
|
|
||||||
ShapeInput, 0, 0, None);
|
|
||||||
XFixesSetWindowShapeRegion (xdpy, xoverlay,
|
|
||||||
ShapeInput, 0, 0, None);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
XFixesSetWindowShapeRegion (xdpy, xstage,
|
|
||||||
ShapeInput, 0, 0, region);
|
|
||||||
XFixesSetWindowShapeRegion (xdpy, xoverlay,
|
|
||||||
ShapeInput, 0, 0, region);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
mutter_plugin_set_stage_input_area (MutterPlugin *plugin,
|
|
||||||
gint x, gint y, gint width, gint height)
|
|
||||||
{
|
|
||||||
MutterPluginPrivate *priv = plugin->manager_private;
|
|
||||||
MutterPluginManager *mgr = priv->self;
|
|
||||||
MetaDisplay *display = meta_screen_get_display (mgr->screen);
|
|
||||||
Display *xdpy = meta_display_get_xdisplay (display);
|
|
||||||
Window xstage, xoverlay;
|
|
||||||
ClutterActor *stage;
|
|
||||||
XRectangle rect;
|
|
||||||
XserverRegion region;
|
|
||||||
|
|
||||||
stage = mutter_get_stage_for_screen (mgr->screen);
|
|
||||||
xstage = clutter_x11_get_stage_window (CLUTTER_STAGE (stage));
|
|
||||||
xoverlay = mutter_get_overlay_window (mgr->screen);
|
|
||||||
|
|
||||||
rect.x = x;
|
|
||||||
rect.y = y;
|
|
||||||
rect.width = width;
|
|
||||||
rect.height = height;
|
|
||||||
|
|
||||||
region = XFixesCreateRegion (xdpy, &rect, 1);
|
|
||||||
|
|
||||||
XFixesSetWindowShapeRegion (xdpy, xstage, ShapeInput, 0, 0, region);
|
|
||||||
XFixesSetWindowShapeRegion (xdpy, xoverlay, ShapeInput, 0, 0, region);
|
|
||||||
|
|
||||||
XFixesDestroyRegion (xdpy, region);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
mutter_plugin_set_stage_input_region (MutterPlugin *plugin,
|
|
||||||
XserverRegion region)
|
|
||||||
{
|
|
||||||
MutterPluginPrivate *priv = plugin->manager_private;
|
|
||||||
MutterPluginManager *mgr = priv->self;
|
|
||||||
MetaDisplay *display = meta_screen_get_display (mgr->screen);
|
|
||||||
Display *xdpy = meta_display_get_xdisplay (display);
|
|
||||||
Window xstage, xoverlay;
|
|
||||||
ClutterActor *stage;
|
|
||||||
|
|
||||||
stage = mutter_get_stage_for_screen (mgr->screen);
|
|
||||||
xstage = clutter_x11_get_stage_window (CLUTTER_STAGE (stage));
|
|
||||||
xoverlay = mutter_get_overlay_window (mgr->screen);
|
|
||||||
|
|
||||||
XFixesSetWindowShapeRegion (xdpy, xstage, ShapeInput, 0, 0, region);
|
|
||||||
XFixesSetWindowShapeRegion (xdpy, xoverlay, ShapeInput, 0, 0, region);
|
|
||||||
}
|
|
||||||
|
|
||||||
GList *
|
|
||||||
mutter_plugin_get_windows (MutterPlugin *plugin)
|
|
||||||
{
|
|
||||||
MutterPluginPrivate *priv = plugin->manager_private;
|
|
||||||
MutterPluginManager *plugin_mgr = priv->self;
|
|
||||||
|
|
||||||
return mutter_get_windows (plugin_mgr->screen);
|
|
||||||
}
|
|
||||||
|
|
||||||
Display *
|
|
||||||
mutter_plugin_get_xdisplay (MutterPlugin *plugin)
|
|
||||||
{
|
|
||||||
MutterPluginPrivate *priv = plugin->manager_private;
|
|
||||||
MutterPluginManager *mgr = priv->self;
|
|
||||||
MetaDisplay *display = meta_screen_get_display (mgr->screen);
|
|
||||||
Display *xdpy = meta_display_get_xdisplay (display);
|
|
||||||
|
|
||||||
return xdpy;
|
|
||||||
}
|
|
||||||
|
|
||||||
MetaScreen *
|
|
||||||
mutter_plugin_get_screen (MutterPlugin *plugin)
|
|
||||||
{
|
|
||||||
MutterPluginPrivate *priv = plugin->manager_private;
|
|
||||||
MutterPluginManager *mgr = priv->self;
|
|
||||||
|
|
||||||
return mgr->screen;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
515
src/compositor/mutter/mutter-plugin.c
Normal file
515
src/compositor/mutter/mutter-plugin.c
Normal file
@ -0,0 +1,515 @@
|
|||||||
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2008 Intel Corp.
|
||||||
|
*
|
||||||
|
* Author: Tomas Frydrych <tf@linux.intel.com>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "mutter-plugin.h"
|
||||||
|
#include "screen.h"
|
||||||
|
#include "display.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/extensions/Xfixes.h>
|
||||||
|
#include <X11/extensions/shape.h>
|
||||||
|
#include <clutter/x11/clutter-x11.h>
|
||||||
|
|
||||||
|
G_DEFINE_ABSTRACT_TYPE (MutterPlugin, mutter_plugin, G_TYPE_OBJECT);
|
||||||
|
|
||||||
|
#define MUTTER_PLUGIN_GET_PRIVATE(obj) \
|
||||||
|
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), MUTTER_TYPE_PLUGIN, MutterPluginPrivate))
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
PROP_0,
|
||||||
|
PROP_SCREEN,
|
||||||
|
PROP_PARAMS,
|
||||||
|
PROP_FEATURES,
|
||||||
|
PROP_DISABLED,
|
||||||
|
PROP_DEBUG_MODE,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _MutterPluginPrivate
|
||||||
|
{
|
||||||
|
MetaScreen *screen;
|
||||||
|
gchar *params;
|
||||||
|
gulong features;
|
||||||
|
|
||||||
|
gint running;
|
||||||
|
|
||||||
|
gboolean disabled : 1;
|
||||||
|
gboolean debug : 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_plugin_dispose (GObject *object)
|
||||||
|
{
|
||||||
|
G_OBJECT_CLASS (mutter_plugin_parent_class)->dispose (object);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_plugin_finalize (GObject *object)
|
||||||
|
{
|
||||||
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (object)->priv;
|
||||||
|
|
||||||
|
g_free (priv->params);
|
||||||
|
priv->params = NULL;
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (mutter_plugin_parent_class)->finalize (object);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_plugin_parse_params (MutterPlugin *plugin)
|
||||||
|
{
|
||||||
|
char *p;
|
||||||
|
gulong features = 0;
|
||||||
|
MutterPluginPrivate *priv = plugin->priv;
|
||||||
|
MutterPluginClass *klass = MUTTER_PLUGIN_GET_CLASS (plugin);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature flags: identify events that the plugin can handle; a plugin can
|
||||||
|
* handle one or more events.
|
||||||
|
*/
|
||||||
|
if (klass->minimize)
|
||||||
|
features |= MUTTER_PLUGIN_MINIMIZE;
|
||||||
|
|
||||||
|
if (klass->maximize)
|
||||||
|
features |= MUTTER_PLUGIN_MAXIMIZE;
|
||||||
|
|
||||||
|
if (klass->unmaximize)
|
||||||
|
features |= MUTTER_PLUGIN_UNMAXIMIZE;
|
||||||
|
|
||||||
|
if (klass->map)
|
||||||
|
features |= MUTTER_PLUGIN_MAP;
|
||||||
|
|
||||||
|
if (klass->destroy)
|
||||||
|
features |= MUTTER_PLUGIN_DESTROY;
|
||||||
|
|
||||||
|
if (klass->switch_workspace)
|
||||||
|
features |= MUTTER_PLUGIN_SWITCH_WORKSPACE;
|
||||||
|
|
||||||
|
if (priv->params)
|
||||||
|
{
|
||||||
|
gboolean debug = FALSE;
|
||||||
|
|
||||||
|
if ((p = strstr (priv->params, "disable:")))
|
||||||
|
{
|
||||||
|
gchar *d = g_strdup (p+8);
|
||||||
|
|
||||||
|
p = strchr (d, ';');
|
||||||
|
|
||||||
|
if (p)
|
||||||
|
*p = 0;
|
||||||
|
|
||||||
|
if (strstr (d, "minimize"))
|
||||||
|
features &= ~ MUTTER_PLUGIN_MINIMIZE;
|
||||||
|
|
||||||
|
if (strstr (d, "maximize"))
|
||||||
|
features &= ~ MUTTER_PLUGIN_MAXIMIZE;
|
||||||
|
|
||||||
|
if (strstr (d, "unmaximize"))
|
||||||
|
features &= ~ MUTTER_PLUGIN_UNMAXIMIZE;
|
||||||
|
|
||||||
|
if (strstr (d, "map"))
|
||||||
|
features &= ~ MUTTER_PLUGIN_MAP;
|
||||||
|
|
||||||
|
if (strstr (d, "destroy"))
|
||||||
|
features &= ~ MUTTER_PLUGIN_DESTROY;
|
||||||
|
|
||||||
|
if (strstr (d, "switch-workspace"))
|
||||||
|
features &= ~MUTTER_PLUGIN_SWITCH_WORKSPACE;
|
||||||
|
|
||||||
|
g_free (d);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strstr (priv->params, "debug"))
|
||||||
|
debug = TRUE;
|
||||||
|
|
||||||
|
if (debug != priv->debug)
|
||||||
|
{
|
||||||
|
priv->debug = debug;
|
||||||
|
|
||||||
|
g_object_notify (G_OBJECT (plugin), "debug-mode");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (features != priv->features)
|
||||||
|
{
|
||||||
|
priv->features = features;
|
||||||
|
|
||||||
|
g_object_notify (G_OBJECT (plugin), "features");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_plugin_set_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
const GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (object)->priv;
|
||||||
|
|
||||||
|
switch (prop_id)
|
||||||
|
{
|
||||||
|
case PROP_SCREEN:
|
||||||
|
priv->screen = g_value_get_object (value);
|
||||||
|
break;
|
||||||
|
case PROP_PARAMS:
|
||||||
|
priv->params = g_value_dup_string (value);
|
||||||
|
mutter_plugin_parse_params (MUTTER_PLUGIN (object));
|
||||||
|
break;
|
||||||
|
case PROP_DISABLED:
|
||||||
|
priv->disabled = g_value_get_boolean (value);
|
||||||
|
break;
|
||||||
|
case PROP_DEBUG_MODE:
|
||||||
|
priv->debug = g_value_get_boolean (value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_plugin_get_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (object)->priv;
|
||||||
|
|
||||||
|
switch (prop_id)
|
||||||
|
{
|
||||||
|
case PROP_SCREEN:
|
||||||
|
g_value_set_object (value, priv->screen);
|
||||||
|
break;
|
||||||
|
case PROP_PARAMS:
|
||||||
|
g_value_set_string (value, priv->params);
|
||||||
|
break;
|
||||||
|
case PROP_DISABLED:
|
||||||
|
g_value_set_boolean (value, priv->disabled);
|
||||||
|
break;
|
||||||
|
case PROP_DEBUG_MODE:
|
||||||
|
g_value_set_boolean (value, priv->debug);
|
||||||
|
break;
|
||||||
|
case PROP_FEATURES:
|
||||||
|
g_value_set_ulong (value, priv->features);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_plugin_class_init (MutterPluginClass *klass)
|
||||||
|
{
|
||||||
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
|
gobject_class->finalize = mutter_plugin_finalize;
|
||||||
|
gobject_class->dispose = mutter_plugin_dispose;
|
||||||
|
gobject_class->set_property = mutter_plugin_set_property;
|
||||||
|
gobject_class->get_property = mutter_plugin_get_property;
|
||||||
|
|
||||||
|
g_object_class_install_property (gobject_class,
|
||||||
|
PROP_SCREEN,
|
||||||
|
g_param_spec_object ("screen",
|
||||||
|
"MetaScreen",
|
||||||
|
"MetaScreen",
|
||||||
|
META_TYPE_SCREEN,
|
||||||
|
G_PARAM_READWRITE |
|
||||||
|
G_PARAM_CONSTRUCT_ONLY));
|
||||||
|
|
||||||
|
g_object_class_install_property (gobject_class,
|
||||||
|
PROP_PARAMS,
|
||||||
|
g_param_spec_string ("params",
|
||||||
|
"Parameters",
|
||||||
|
"Plugin Parameters",
|
||||||
|
NULL,
|
||||||
|
G_PARAM_READWRITE |
|
||||||
|
G_PARAM_CONSTRUCT));
|
||||||
|
|
||||||
|
g_object_class_install_property (gobject_class,
|
||||||
|
PROP_FEATURES,
|
||||||
|
g_param_spec_ulong ("features",
|
||||||
|
"Features",
|
||||||
|
"Plugin Features",
|
||||||
|
0 , G_MAXULONG, 0,
|
||||||
|
G_PARAM_READABLE));
|
||||||
|
|
||||||
|
g_object_class_install_property (gobject_class,
|
||||||
|
PROP_DISABLED,
|
||||||
|
g_param_spec_boolean ("disabled",
|
||||||
|
"Plugin disabled",
|
||||||
|
"Plugin disabled",
|
||||||
|
FALSE,
|
||||||
|
G_PARAM_READWRITE));
|
||||||
|
|
||||||
|
g_object_class_install_property (gobject_class,
|
||||||
|
PROP_DEBUG_MODE,
|
||||||
|
g_param_spec_boolean ("debug-mode",
|
||||||
|
"Debug Mode",
|
||||||
|
"Debug Mode",
|
||||||
|
FALSE,
|
||||||
|
G_PARAM_READABLE));
|
||||||
|
|
||||||
|
g_type_class_add_private (gobject_class, sizeof (MutterPluginPrivate));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_plugin_init (MutterPlugin *self)
|
||||||
|
{
|
||||||
|
MutterPluginPrivate *priv;
|
||||||
|
|
||||||
|
self->priv = priv = MUTTER_PLUGIN_GET_PRIVATE (self);
|
||||||
|
}
|
||||||
|
|
||||||
|
gulong
|
||||||
|
mutter_plugin_features (MutterPlugin *plugin)
|
||||||
|
{
|
||||||
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
|
||||||
|
|
||||||
|
return priv->features;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
mutter_plugin_disabled (MutterPlugin *plugin)
|
||||||
|
{
|
||||||
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
|
||||||
|
|
||||||
|
return priv->disabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
mutter_plugin_running (MutterPlugin *plugin)
|
||||||
|
{
|
||||||
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
|
||||||
|
|
||||||
|
return (priv->running > 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
mutter_plugin_debug_mode (MutterPlugin *plugin)
|
||||||
|
{
|
||||||
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
|
||||||
|
|
||||||
|
return priv->debug;
|
||||||
|
}
|
||||||
|
|
||||||
|
const MutterPluginInfo *
|
||||||
|
mutter_plugin_get_info (MutterPlugin *plugin)
|
||||||
|
{
|
||||||
|
MutterPluginClass *klass = MUTTER_PLUGIN_GET_CLASS (plugin);
|
||||||
|
|
||||||
|
if (klass && klass->plugin_info)
|
||||||
|
return klass->plugin_info (plugin);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
ClutterActor *
|
||||||
|
mutter_plugin_get_overlay_group (MutterPlugin *plugin)
|
||||||
|
{
|
||||||
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
|
||||||
|
|
||||||
|
return mutter_get_overlay_group_for_screen (priv->screen);
|
||||||
|
}
|
||||||
|
|
||||||
|
ClutterActor *
|
||||||
|
mutter_plugin_get_stage (MutterPlugin *plugin)
|
||||||
|
{
|
||||||
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
|
||||||
|
|
||||||
|
return mutter_get_stage_for_screen (priv->screen);
|
||||||
|
}
|
||||||
|
|
||||||
|
ClutterActor *
|
||||||
|
mutter_plugin_get_window_group (MutterPlugin *plugin)
|
||||||
|
{
|
||||||
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
|
||||||
|
|
||||||
|
return mutter_get_window_group_for_screen (priv->screen);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* _mutter_plugin_effect_started:
|
||||||
|
* @plugin: the plugin
|
||||||
|
*
|
||||||
|
* Mark that an effect has started for the plugin. This is called
|
||||||
|
* internally by MutterPluginManager.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
_mutter_plugin_effect_started (MutterPlugin *plugin)
|
||||||
|
{
|
||||||
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
|
||||||
|
|
||||||
|
priv->running++;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
mutter_plugin_effect_completed (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor,
|
||||||
|
unsigned long event)
|
||||||
|
{
|
||||||
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
|
||||||
|
|
||||||
|
if (priv->running-- < 0)
|
||||||
|
{
|
||||||
|
g_warning ("Error in running effect accounting, adjusting.");
|
||||||
|
priv->running = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!actor)
|
||||||
|
{
|
||||||
|
const MutterPluginInfo *info;
|
||||||
|
const gchar *name = NULL;
|
||||||
|
|
||||||
|
if (plugin && (info = mutter_plugin_get_info (plugin)))
|
||||||
|
name = info->name;
|
||||||
|
|
||||||
|
g_warning ("Plugin [%s] passed NULL for actor!",
|
||||||
|
name ? name : "unknown");
|
||||||
|
}
|
||||||
|
|
||||||
|
mutter_window_effect_completed (actor, event);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
mutter_plugin_query_screen_size (MutterPlugin *plugin,
|
||||||
|
int *width,
|
||||||
|
int *height)
|
||||||
|
{
|
||||||
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
|
||||||
|
|
||||||
|
meta_screen_get_size (priv->screen, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
mutter_plugin_set_stage_reactive (MutterPlugin *plugin,
|
||||||
|
gboolean reactive)
|
||||||
|
{
|
||||||
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
|
||||||
|
MetaScreen *screen = priv->screen;
|
||||||
|
MetaDisplay *display = meta_screen_get_display (screen);
|
||||||
|
Display *xdpy = meta_display_get_xdisplay (display);
|
||||||
|
Window xstage, xoverlay;
|
||||||
|
ClutterActor *stage;
|
||||||
|
|
||||||
|
stage = mutter_get_stage_for_screen (screen);
|
||||||
|
xstage = clutter_x11_get_stage_window (CLUTTER_STAGE (stage));
|
||||||
|
xoverlay = mutter_get_overlay_window (screen);
|
||||||
|
|
||||||
|
static XserverRegion region = None;
|
||||||
|
|
||||||
|
if (region == None)
|
||||||
|
region = XFixesCreateRegion (xdpy, NULL, 0);
|
||||||
|
|
||||||
|
if (reactive)
|
||||||
|
{
|
||||||
|
XFixesSetWindowShapeRegion (xdpy, xstage,
|
||||||
|
ShapeInput, 0, 0, None);
|
||||||
|
XFixesSetWindowShapeRegion (xdpy, xoverlay,
|
||||||
|
ShapeInput, 0, 0, None);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
XFixesSetWindowShapeRegion (xdpy, xstage,
|
||||||
|
ShapeInput, 0, 0, region);
|
||||||
|
XFixesSetWindowShapeRegion (xdpy, xoverlay,
|
||||||
|
ShapeInput, 0, 0, region);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
mutter_plugin_set_stage_input_area (MutterPlugin *plugin,
|
||||||
|
gint x, gint y, gint width, gint height)
|
||||||
|
{
|
||||||
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
|
||||||
|
MetaScreen *screen = priv->screen;
|
||||||
|
MetaDisplay *display = meta_screen_get_display (screen);
|
||||||
|
Display *xdpy = meta_display_get_xdisplay (display);
|
||||||
|
Window xstage, xoverlay;
|
||||||
|
ClutterActor *stage;
|
||||||
|
XRectangle rect;
|
||||||
|
XserverRegion region;
|
||||||
|
|
||||||
|
stage = mutter_get_stage_for_screen (screen);
|
||||||
|
xstage = clutter_x11_get_stage_window (CLUTTER_STAGE (stage));
|
||||||
|
xoverlay = mutter_get_overlay_window (screen);
|
||||||
|
|
||||||
|
rect.x = x;
|
||||||
|
rect.y = y;
|
||||||
|
rect.width = width;
|
||||||
|
rect.height = height;
|
||||||
|
|
||||||
|
region = XFixesCreateRegion (xdpy, &rect, 1);
|
||||||
|
|
||||||
|
XFixesSetWindowShapeRegion (xdpy, xstage, ShapeInput, 0, 0, region);
|
||||||
|
XFixesSetWindowShapeRegion (xdpy, xoverlay, ShapeInput, 0, 0, region);
|
||||||
|
|
||||||
|
XFixesDestroyRegion (xdpy, region);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
mutter_plugin_set_stage_input_region (MutterPlugin *plugin,
|
||||||
|
XserverRegion region)
|
||||||
|
{
|
||||||
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
|
||||||
|
MetaScreen *screen = priv->screen;
|
||||||
|
MetaDisplay *display = meta_screen_get_display (screen);
|
||||||
|
Display *xdpy = meta_display_get_xdisplay (display);
|
||||||
|
Window xstage, xoverlay;
|
||||||
|
ClutterActor *stage;
|
||||||
|
|
||||||
|
stage = mutter_get_stage_for_screen (screen);
|
||||||
|
xstage = clutter_x11_get_stage_window (CLUTTER_STAGE (stage));
|
||||||
|
xoverlay = mutter_get_overlay_window (screen);
|
||||||
|
|
||||||
|
XFixesSetWindowShapeRegion (xdpy, xstage, ShapeInput, 0, 0, region);
|
||||||
|
XFixesSetWindowShapeRegion (xdpy, xoverlay, ShapeInput, 0, 0, region);
|
||||||
|
}
|
||||||
|
|
||||||
|
GList *
|
||||||
|
mutter_plugin_get_windows (MutterPlugin *plugin)
|
||||||
|
{
|
||||||
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
|
||||||
|
|
||||||
|
return mutter_get_windows (priv->screen);
|
||||||
|
}
|
||||||
|
|
||||||
|
Display *
|
||||||
|
mutter_plugin_get_xdisplay (MutterPlugin *plugin)
|
||||||
|
{
|
||||||
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
|
||||||
|
MetaDisplay *display = meta_screen_get_display (priv->screen);
|
||||||
|
Display *xdpy = meta_display_get_xdisplay (display);
|
||||||
|
|
||||||
|
return xdpy;
|
||||||
|
}
|
||||||
|
|
||||||
|
MetaScreen *
|
||||||
|
mutter_plugin_get_screen (MutterPlugin *plugin)
|
||||||
|
{
|
||||||
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
|
||||||
|
|
||||||
|
return priv->screen;
|
||||||
|
}
|
||||||
|
|
@ -366,6 +366,17 @@ mutter_shaped_texture_paint (ClutterActor *actor)
|
|||||||
ClutterActorBox alloc;
|
ClutterActorBox alloc;
|
||||||
static const ClutterColor white = { 0xff, 0xff, 0xff, 0xff };
|
static const ClutterColor white = { 0xff, 0xff, 0xff, 0xff };
|
||||||
|
|
||||||
|
if (!CLUTTER_ACTOR_IS_REALIZED (CLUTTER_ACTOR (stex)))
|
||||||
|
clutter_actor_realize (CLUTTER_ACTOR (stex));
|
||||||
|
|
||||||
|
paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex));
|
||||||
|
|
||||||
|
tex_width = cogl_texture_get_width (paint_tex);
|
||||||
|
tex_height = cogl_texture_get_height (paint_tex);
|
||||||
|
|
||||||
|
if (tex_width == 0 || tex_width == 0) /* no contents yet */
|
||||||
|
return;
|
||||||
|
|
||||||
/* If there are no rectangles or multi-texturing isn't supported,
|
/* If there are no rectangles or multi-texturing isn't supported,
|
||||||
fallback to the regular paint method */
|
fallback to the regular paint method */
|
||||||
if (priv->rectangles->len < 1
|
if (priv->rectangles->len < 1
|
||||||
@ -376,11 +387,6 @@ mutter_shaped_texture_paint (ClutterActor *actor)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CLUTTER_ACTOR_IS_REALIZED (CLUTTER_ACTOR (stex)))
|
|
||||||
clutter_actor_realize (CLUTTER_ACTOR (stex));
|
|
||||||
|
|
||||||
paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex));
|
|
||||||
|
|
||||||
if (paint_tex == COGL_INVALID_HANDLE)
|
if (paint_tex == COGL_INVALID_HANDLE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -392,9 +398,6 @@ mutter_shaped_texture_paint (ClutterActor *actor)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
tex_width = cogl_texture_get_width (paint_tex);
|
|
||||||
tex_height = cogl_texture_get_height (paint_tex);
|
|
||||||
|
|
||||||
mutter_shaped_texture_ensure_mask (stex);
|
mutter_shaped_texture_ensure_mask (stex);
|
||||||
|
|
||||||
cogl_texture_get_gl_texture (paint_tex, &paint_gl_tex, &paint_target);
|
cogl_texture_get_gl_texture (paint_tex, &paint_gl_tex, &paint_target);
|
||||||
@ -512,12 +515,19 @@ mutter_shaped_texture_pick (ClutterActor *actor,
|
|||||||
{
|
{
|
||||||
CoglHandle paint_tex;
|
CoglHandle paint_tex;
|
||||||
ClutterActorBox alloc;
|
ClutterActorBox alloc;
|
||||||
|
guint tex_width, tex_height;
|
||||||
|
|
||||||
paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex));
|
paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex));
|
||||||
|
|
||||||
if (paint_tex == COGL_INVALID_HANDLE)
|
if (paint_tex == COGL_INVALID_HANDLE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
tex_width = cogl_texture_get_width (paint_tex);
|
||||||
|
tex_height = cogl_texture_get_height (paint_tex);
|
||||||
|
|
||||||
|
if (tex_width == 0 || tex_width == 0) /* no contents yet */
|
||||||
|
return;
|
||||||
|
|
||||||
mutter_shaped_texture_ensure_mask (stex);
|
mutter_shaped_texture_ensure_mask (stex);
|
||||||
|
|
||||||
cogl_color (color);
|
cogl_color (color);
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
* 02111-1307, USA.
|
* 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define MUTTER_BUILDING_PLUGIN 1
|
|
||||||
#include "mutter-plugin.h"
|
#include "mutter-plugin.h"
|
||||||
|
|
||||||
#include <libintl.h>
|
#include <libintl.h>
|
||||||
@ -39,35 +38,63 @@
|
|||||||
#define SWITCH_TIMEOUT 500
|
#define SWITCH_TIMEOUT 500
|
||||||
|
|
||||||
#define ACTOR_DATA_KEY "MCCP-Default-actor-data"
|
#define ACTOR_DATA_KEY "MCCP-Default-actor-data"
|
||||||
|
|
||||||
|
#define MUTTER_TYPE_DEFAULT_PLUGIN (mutter_default_plugin_get_type ())
|
||||||
|
#define MUTTER_DEFAULT_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MUTTER_TYPE_DEFAULT_PLUGIN, MutterDefaultPlugin))
|
||||||
|
#define MUTTER_DEFAULT_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MUTTER_TYPE_DEFAULT_PLUGIN, MutterDefaultPluginClass))
|
||||||
|
#define MUTTER_IS_DEFAULT_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MUTTER_DEFAULT_PLUGIN_TYPE))
|
||||||
|
#define MUTTER_IS_DEFAULT_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MUTTER_TYPE_DEFAULT_PLUGIN))
|
||||||
|
#define MUTTER_DEFAULT_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MUTTER_TYPE_DEFAULT_PLUGIN, MutterDefaultPluginClass))
|
||||||
|
|
||||||
|
#define MUTTER_DEFAULT_PLUGIN_GET_PRIVATE(obj) \
|
||||||
|
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), MUTTER_TYPE_DEFAULT_PLUGIN, MutterDefaultPluginPrivate))
|
||||||
|
|
||||||
|
typedef struct _MutterDefaultPlugin MutterDefaultPlugin;
|
||||||
|
typedef struct _MutterDefaultPluginClass MutterDefaultPluginClass;
|
||||||
|
typedef struct _MutterDefaultPluginPrivate MutterDefaultPluginPrivate;
|
||||||
|
|
||||||
|
struct _MutterDefaultPlugin
|
||||||
|
{
|
||||||
|
MutterPlugin parent;
|
||||||
|
|
||||||
|
MutterDefaultPluginPrivate *priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _MutterDefaultPluginClass
|
||||||
|
{
|
||||||
|
MutterPluginClass parent_class;
|
||||||
|
};
|
||||||
|
|
||||||
static GQuark actor_data_quark = 0;
|
static GQuark actor_data_quark = 0;
|
||||||
|
|
||||||
static gboolean do_init (const char *params);
|
static void minimize (MutterPlugin *plugin,
|
||||||
static void minimize (MutterWindow *actor);
|
MutterWindow *actor);
|
||||||
static void map (MutterWindow *actor);
|
static void map (MutterPlugin *plugin,
|
||||||
static void destroy (MutterWindow *actor);
|
MutterWindow *actor);
|
||||||
static void maximize (MutterWindow *actor,
|
static void destroy (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor);
|
||||||
|
static void maximize (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor,
|
||||||
gint x, gint y, gint width, gint height);
|
gint x, gint y, gint width, gint height);
|
||||||
static void unmaximize (MutterWindow *actor,
|
static void unmaximize (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor,
|
||||||
gint x, gint y, gint width, gint height);
|
gint x, gint y, gint width, gint height);
|
||||||
|
|
||||||
static void switch_workspace (const GList **actors, gint from, gint to,
|
static void switch_workspace (MutterPlugin *plugin,
|
||||||
|
const GList **actors, gint from, gint to,
|
||||||
MetaMotionDirection direction);
|
MetaMotionDirection direction);
|
||||||
|
|
||||||
static void kill_effect (MutterWindow *actor, gulong event);
|
static void kill_effect (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor, gulong event);
|
||||||
|
|
||||||
static gboolean reload (const char *params);
|
static const MutterPluginInfo * plugin_info (MutterPlugin *plugin);
|
||||||
|
|
||||||
|
MUTTER_PLUGIN_DECLARE(MutterDefaultPlugin, mutter_default_plugin);
|
||||||
/*
|
|
||||||
* Create the plugin struct; function pointers initialized in
|
|
||||||
* g_module_check_init().
|
|
||||||
*/
|
|
||||||
MUTTER_DECLARE_PLUGIN();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Plugin private data that we store in the .plugin_private member.
|
* Plugin private data that we store in the .plugin_private member.
|
||||||
*/
|
*/
|
||||||
typedef struct _PluginState
|
struct _MutterDefaultPluginPrivate
|
||||||
{
|
{
|
||||||
ClutterEffectTemplate *destroy_effect;
|
ClutterEffectTemplate *destroy_effect;
|
||||||
ClutterEffectTemplate *minimize_effect;
|
ClutterEffectTemplate *minimize_effect;
|
||||||
@ -82,8 +109,150 @@ typedef struct _PluginState
|
|||||||
ClutterActor *desktop1;
|
ClutterActor *desktop1;
|
||||||
ClutterActor *desktop2;
|
ClutterActor *desktop2;
|
||||||
|
|
||||||
|
MutterPluginInfo info;
|
||||||
|
|
||||||
gboolean debug_mode : 1;
|
gboolean debug_mode : 1;
|
||||||
} PluginState;
|
};
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_default_plugin_dispose (GObject *object)
|
||||||
|
{
|
||||||
|
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (object)->priv;
|
||||||
|
|
||||||
|
g_object_unref (priv->destroy_effect);
|
||||||
|
g_object_unref (priv->minimize_effect);
|
||||||
|
g_object_unref (priv->maximize_effect);
|
||||||
|
g_object_unref (priv->switch_workspace_effect);
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (mutter_default_plugin_parent_class)->dispose (object);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_default_plugin_finalize (GObject *object)
|
||||||
|
{
|
||||||
|
G_OBJECT_CLASS (mutter_default_plugin_parent_class)->finalize (object);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_default_plugin_set_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
const GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
switch (prop_id)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_default_plugin_get_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
switch (prop_id)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_default_plugin_constructed (GObject *object)
|
||||||
|
{
|
||||||
|
MutterPlugin *plugin = MUTTER_PLUGIN (object);
|
||||||
|
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (object)->priv;
|
||||||
|
|
||||||
|
guint destroy_timeout = DESTROY_TIMEOUT;
|
||||||
|
guint minimize_timeout = MINIMIZE_TIMEOUT;
|
||||||
|
guint maximize_timeout = MAXIMIZE_TIMEOUT;
|
||||||
|
guint map_timeout = MAP_TIMEOUT;
|
||||||
|
guint switch_timeout = SWITCH_TIMEOUT;
|
||||||
|
|
||||||
|
if (mutter_plugin_debug_mode (plugin))
|
||||||
|
{
|
||||||
|
g_debug ("Plugin %s: Entering debug mode.", priv->info.name);
|
||||||
|
|
||||||
|
priv->debug_mode = TRUE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Double the effect duration to make them easier to observe.
|
||||||
|
*/
|
||||||
|
destroy_timeout *= 2;
|
||||||
|
minimize_timeout *= 2;
|
||||||
|
maximize_timeout *= 2;
|
||||||
|
map_timeout *= 2;
|
||||||
|
switch_timeout *= 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
priv->destroy_effect
|
||||||
|
= clutter_effect_template_new (clutter_timeline_new_for_duration (
|
||||||
|
destroy_timeout),
|
||||||
|
CLUTTER_ALPHA_SINE_INC);
|
||||||
|
|
||||||
|
|
||||||
|
priv->minimize_effect
|
||||||
|
= clutter_effect_template_new (clutter_timeline_new_for_duration (
|
||||||
|
minimize_timeout),
|
||||||
|
CLUTTER_ALPHA_SINE_INC);
|
||||||
|
|
||||||
|
priv->maximize_effect
|
||||||
|
= clutter_effect_template_new (clutter_timeline_new_for_duration (
|
||||||
|
maximize_timeout),
|
||||||
|
CLUTTER_ALPHA_SINE_INC);
|
||||||
|
|
||||||
|
priv->map_effect
|
||||||
|
= clutter_effect_template_new (clutter_timeline_new_for_duration (
|
||||||
|
map_timeout),
|
||||||
|
CLUTTER_ALPHA_SINE_INC);
|
||||||
|
|
||||||
|
priv->switch_workspace_effect
|
||||||
|
= clutter_effect_template_new (clutter_timeline_new_for_duration (
|
||||||
|
switch_timeout),
|
||||||
|
CLUTTER_ALPHA_SINE_INC);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_default_plugin_class_init (MutterDefaultPluginClass *klass)
|
||||||
|
{
|
||||||
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||||
|
MutterPluginClass *plugin_class = MUTTER_PLUGIN_CLASS (klass);
|
||||||
|
|
||||||
|
gobject_class->finalize = mutter_default_plugin_finalize;
|
||||||
|
gobject_class->dispose = mutter_default_plugin_dispose;
|
||||||
|
gobject_class->constructed = mutter_default_plugin_constructed;
|
||||||
|
gobject_class->set_property = mutter_default_plugin_set_property;
|
||||||
|
gobject_class->get_property = mutter_default_plugin_get_property;
|
||||||
|
|
||||||
|
plugin_class->map = map;
|
||||||
|
plugin_class->minimize = minimize;
|
||||||
|
plugin_class->maximize = maximize;
|
||||||
|
plugin_class->unmaximize = unmaximize;
|
||||||
|
plugin_class->destroy = destroy;
|
||||||
|
plugin_class->switch_workspace = switch_workspace;
|
||||||
|
plugin_class->kill_effect = kill_effect;
|
||||||
|
plugin_class->plugin_info = plugin_info;
|
||||||
|
|
||||||
|
g_type_class_add_private (gobject_class, sizeof (MutterDefaultPluginPrivate));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_default_plugin_init (MutterDefaultPlugin *self)
|
||||||
|
{
|
||||||
|
MutterDefaultPluginPrivate *priv;
|
||||||
|
|
||||||
|
self->priv = priv = MUTTER_DEFAULT_PLUGIN_GET_PRIVATE (self);
|
||||||
|
|
||||||
|
priv->info.name = "Default Effects";
|
||||||
|
priv->info.version = "0.1";
|
||||||
|
priv->info.author = "Intel Corp.";
|
||||||
|
priv->info.license = "GPL";
|
||||||
|
priv->info.description = "This is an example of a plugin implementation.";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -102,8 +271,6 @@ typedef struct _ActorPrivate
|
|||||||
gboolean is_maximized : 1;
|
gboolean is_maximized : 1;
|
||||||
} ActorPrivate;
|
} ActorPrivate;
|
||||||
|
|
||||||
static PluginState *plugin_state;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actor private data accessor
|
* Actor private data accessor
|
||||||
*/
|
*/
|
||||||
@ -134,53 +301,68 @@ get_actor_private (MutterWindow *actor)
|
|||||||
return priv;
|
return priv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef struct SwitchWorkspaceData
|
||||||
|
{
|
||||||
|
MutterPlugin *plugin;
|
||||||
|
const GList **actors;
|
||||||
|
} SwitchWorkspaceData;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
on_switch_workspace_effect_complete (ClutterActor *group, gpointer data)
|
on_switch_workspace_effect_complete (ClutterActor *group, gpointer data)
|
||||||
{
|
{
|
||||||
PluginState *state = plugin_state;
|
SwitchWorkspaceData *sw_data = data;
|
||||||
GList *l = *((GList**)data);
|
MutterPlugin *plugin = sw_data->plugin;
|
||||||
|
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
|
||||||
|
GList *l = *((GList**)sw_data->actors);
|
||||||
MutterWindow *actor_for_cb = l->data;
|
MutterWindow *actor_for_cb = l->data;
|
||||||
|
|
||||||
while (l)
|
while (l)
|
||||||
{
|
{
|
||||||
ClutterActor *a = l->data;
|
ClutterActor *a = l->data;
|
||||||
MutterWindow *mc_window = MUTTER_WINDOW (a);
|
MutterWindow *mc_window = MUTTER_WINDOW (a);
|
||||||
ActorPrivate *priv = get_actor_private (mc_window);
|
ActorPrivate *apriv = get_actor_private (mc_window);
|
||||||
|
|
||||||
if (priv->orig_parent)
|
if (apriv->orig_parent)
|
||||||
{
|
{
|
||||||
clutter_actor_reparent (a, priv->orig_parent);
|
clutter_actor_reparent (a, apriv->orig_parent);
|
||||||
priv->orig_parent = NULL;
|
apriv->orig_parent = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
l = l->next;
|
l = l->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
clutter_actor_destroy (state->desktop1);
|
clutter_actor_destroy (priv->desktop1);
|
||||||
clutter_actor_destroy (state->desktop2);
|
clutter_actor_destroy (priv->desktop2);
|
||||||
|
|
||||||
state->actors = NULL;
|
priv->actors = NULL;
|
||||||
state->tml_switch_workspace1 = NULL;
|
priv->tml_switch_workspace1 = NULL;
|
||||||
state->tml_switch_workspace2 = NULL;
|
priv->tml_switch_workspace2 = NULL;
|
||||||
state->desktop1 = NULL;
|
priv->desktop1 = NULL;
|
||||||
state->desktop2 = NULL;
|
priv->desktop2 = NULL;
|
||||||
|
|
||||||
mutter_plugin_effect_completed (mutter_get_plugin(), actor_for_cb,
|
g_free (data);
|
||||||
|
|
||||||
|
mutter_plugin_effect_completed (plugin, actor_for_cb,
|
||||||
MUTTER_PLUGIN_SWITCH_WORKSPACE);
|
MUTTER_PLUGIN_SWITCH_WORKSPACE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
switch_workspace (const GList **actors, gint from, gint to,
|
switch_workspace (MutterPlugin *plugin,
|
||||||
|
const GList **actors, gint from, gint to,
|
||||||
MetaMotionDirection direction)
|
MetaMotionDirection direction)
|
||||||
{
|
{
|
||||||
MutterPlugin *plugin = mutter_get_plugin();
|
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
|
||||||
PluginState *state = plugin_state;
|
|
||||||
GList *l;
|
GList *l;
|
||||||
gint n_workspaces;
|
gint n_workspaces;
|
||||||
ClutterActor *workspace0 = clutter_group_new ();
|
ClutterActor *workspace0 = clutter_group_new ();
|
||||||
ClutterActor *workspace1 = clutter_group_new ();
|
ClutterActor *workspace1 = clutter_group_new ();
|
||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
int screen_width, screen_height;
|
int screen_width, screen_height;
|
||||||
|
MetaScreen *screen = mutter_plugin_get_screen (plugin);
|
||||||
|
SwitchWorkspaceData *sw_data = g_new (SwitchWorkspaceData, 1);
|
||||||
|
|
||||||
|
sw_data->plugin = plugin;
|
||||||
|
sw_data->actors = actors;
|
||||||
|
|
||||||
stage = mutter_plugin_get_stage (plugin);
|
stage = mutter_plugin_get_stage (plugin);
|
||||||
|
|
||||||
@ -201,19 +383,19 @@ switch_workspace (const GList **actors, gint from, gint to,
|
|||||||
|
|
||||||
if (from == to)
|
if (from == to)
|
||||||
{
|
{
|
||||||
mutter_plugin_effect_completed (mutter_get_plugin(), NULL,
|
mutter_plugin_effect_completed (plugin, NULL,
|
||||||
MUTTER_PLUGIN_SWITCH_WORKSPACE);
|
MUTTER_PLUGIN_SWITCH_WORKSPACE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
n_workspaces = g_list_length (plugin->work_areas);
|
n_workspaces = meta_screen_get_n_workspaces (screen);
|
||||||
|
|
||||||
l = g_list_last (*((GList**) actors));
|
l = g_list_last (*((GList**) actors));
|
||||||
|
|
||||||
while (l)
|
while (l)
|
||||||
{
|
{
|
||||||
MutterWindow *mc_window = l->data;
|
MutterWindow *mc_window = l->data;
|
||||||
ActorPrivate *priv = get_actor_private (mc_window);
|
ActorPrivate *apriv = get_actor_private (mc_window);
|
||||||
ClutterActor *window = CLUTTER_ACTOR (mc_window);
|
ClutterActor *window = CLUTTER_ACTOR (mc_window);
|
||||||
gint win_workspace;
|
gint win_workspace;
|
||||||
|
|
||||||
@ -227,7 +409,7 @@ switch_workspace (const GList **actors, gint from, gint to,
|
|||||||
clutter_actor_get_position (window, &x, &y);
|
clutter_actor_get_position (window, &x, &y);
|
||||||
clutter_actor_get_size (window, &w, &h);
|
clutter_actor_get_size (window, &w, &h);
|
||||||
|
|
||||||
priv->orig_parent = clutter_actor_get_parent (window);
|
apriv->orig_parent = clutter_actor_get_parent (window);
|
||||||
|
|
||||||
clutter_actor_reparent (window,
|
clutter_actor_reparent (window,
|
||||||
win_workspace == to ? workspace1 : workspace0);
|
win_workspace == to ? workspace1 : workspace0);
|
||||||
@ -237,30 +419,30 @@ switch_workspace (const GList **actors, gint from, gint to,
|
|||||||
else if (win_workspace < 0)
|
else if (win_workspace < 0)
|
||||||
{
|
{
|
||||||
/* Sticky window */
|
/* Sticky window */
|
||||||
priv->orig_parent = NULL;
|
apriv->orig_parent = NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Window on some other desktop */
|
/* Window on some other desktop */
|
||||||
clutter_actor_hide (window);
|
clutter_actor_hide (window);
|
||||||
priv->orig_parent = NULL;
|
apriv->orig_parent = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
l = l->prev;
|
l = l->prev;
|
||||||
}
|
}
|
||||||
|
|
||||||
state->actors = (GList **)actors;
|
priv->actors = (GList **)actors;
|
||||||
state->desktop1 = workspace0;
|
priv->desktop1 = workspace0;
|
||||||
state->desktop2 = workspace1;
|
priv->desktop2 = workspace1;
|
||||||
|
|
||||||
state->tml_switch_workspace2 =
|
priv->tml_switch_workspace2 =
|
||||||
clutter_effect_scale (state->switch_workspace_effect,
|
clutter_effect_scale (priv->switch_workspace_effect,
|
||||||
workspace1, 1.0, 1.0,
|
workspace1, 1.0, 1.0,
|
||||||
on_switch_workspace_effect_complete,
|
on_switch_workspace_effect_complete,
|
||||||
(gpointer)actors);
|
(gpointer)sw_data);
|
||||||
|
|
||||||
state->tml_switch_workspace1 =
|
priv->tml_switch_workspace1 =
|
||||||
clutter_effect_scale (state->switch_workspace_effect,
|
clutter_effect_scale (priv->switch_workspace_effect,
|
||||||
workspace0, 0.0, 0.0,
|
workspace0, 0.0, 0.0,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
}
|
}
|
||||||
@ -277,6 +459,7 @@ on_minimize_effect_complete (ClutterActor *actor, gpointer data)
|
|||||||
* Must reverse the effect of the effect; must hide it first to ensure
|
* Must reverse the effect of the effect; must hide it first to ensure
|
||||||
* that the restoration will not be visible.
|
* that the restoration will not be visible.
|
||||||
*/
|
*/
|
||||||
|
MutterPlugin *plugin = data;
|
||||||
ActorPrivate *apriv;
|
ActorPrivate *apriv;
|
||||||
MutterWindow *mc_window = MUTTER_WINDOW (actor);
|
MutterWindow *mc_window = MUTTER_WINDOW (actor);
|
||||||
|
|
||||||
@ -292,7 +475,7 @@ on_minimize_effect_complete (ClutterActor *actor, gpointer data)
|
|||||||
CLUTTER_GRAVITY_NORTH_WEST);
|
CLUTTER_GRAVITY_NORTH_WEST);
|
||||||
|
|
||||||
/* Now notify the manager that we are done with this effect */
|
/* Now notify the manager that we are done with this effect */
|
||||||
mutter_plugin_effect_completed (mutter_get_plugin(), mc_window,
|
mutter_plugin_effect_completed (plugin, mc_window,
|
||||||
MUTTER_PLUGIN_MINIMIZE);
|
MUTTER_PLUGIN_MINIMIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,11 +484,11 @@ on_minimize_effect_complete (ClutterActor *actor, gpointer data)
|
|||||||
* completion).
|
* completion).
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
minimize (MutterWindow *mc_window)
|
minimize (MutterPlugin *plugin, MutterWindow *mc_window)
|
||||||
{
|
{
|
||||||
PluginState *state = plugin_state;
|
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
|
||||||
MetaCompWindowType type;
|
MetaCompWindowType type;
|
||||||
ClutterActor *actor = CLUTTER_ACTOR (mc_window);
|
ClutterActor *actor = CLUTTER_ACTOR (mc_window);
|
||||||
|
|
||||||
type = mutter_window_get_window_type (mc_window);
|
type = mutter_window_get_window_type (mc_window);
|
||||||
|
|
||||||
@ -318,16 +501,16 @@ minimize (MutterWindow *mc_window)
|
|||||||
clutter_actor_move_anchor_point_from_gravity (actor,
|
clutter_actor_move_anchor_point_from_gravity (actor,
|
||||||
CLUTTER_GRAVITY_CENTER);
|
CLUTTER_GRAVITY_CENTER);
|
||||||
|
|
||||||
apriv->tml_minimize = clutter_effect_scale (state->minimize_effect,
|
apriv->tml_minimize = clutter_effect_scale (priv->minimize_effect,
|
||||||
actor,
|
actor,
|
||||||
0.0,
|
0.0,
|
||||||
0.0,
|
0.0,
|
||||||
(ClutterEffectCompleteFunc)
|
(ClutterEffectCompleteFunc)
|
||||||
on_minimize_effect_complete,
|
on_minimize_effect_complete,
|
||||||
NULL);
|
plugin);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mutter_plugin_effect_completed (mutter_get_plugin(), mc_window,
|
mutter_plugin_effect_completed (plugin, mc_window,
|
||||||
MUTTER_PLUGIN_MINIMIZE);
|
MUTTER_PLUGIN_MINIMIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -341,6 +524,7 @@ on_maximize_effect_complete (ClutterActor *actor, gpointer data)
|
|||||||
/*
|
/*
|
||||||
* Must reverse the effect of the effect.
|
* Must reverse the effect of the effect.
|
||||||
*/
|
*/
|
||||||
|
MutterPlugin * plugin = data;
|
||||||
MutterWindow *mc_window = MUTTER_WINDOW (actor);
|
MutterWindow *mc_window = MUTTER_WINDOW (actor);
|
||||||
ActorPrivate *apriv = get_actor_private (mc_window);
|
ActorPrivate *apriv = get_actor_private (mc_window);
|
||||||
|
|
||||||
@ -352,7 +536,7 @@ on_maximize_effect_complete (ClutterActor *actor, gpointer data)
|
|||||||
CLUTTER_GRAVITY_NORTH_WEST);
|
CLUTTER_GRAVITY_NORTH_WEST);
|
||||||
|
|
||||||
/* Now notify the manager that we are done with this effect */
|
/* Now notify the manager that we are done with this effect */
|
||||||
mutter_plugin_effect_completed (mutter_get_plugin(), mc_window,
|
mutter_plugin_effect_completed (plugin, mc_window,
|
||||||
MUTTER_PLUGIN_MAXIMIZE);
|
MUTTER_PLUGIN_MAXIMIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -365,9 +549,11 @@ on_maximize_effect_complete (ClutterActor *actor, gpointer data)
|
|||||||
* (Something like a sound would be more appropriate.)
|
* (Something like a sound would be more appropriate.)
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
maximize (MutterWindow *mc_window,
|
maximize (MutterPlugin *plugin,
|
||||||
|
MutterWindow *mc_window,
|
||||||
gint end_x, gint end_y, gint end_width, gint end_height)
|
gint end_x, gint end_y, gint end_width, gint end_height)
|
||||||
{
|
{
|
||||||
|
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
|
||||||
MetaCompWindowType type;
|
MetaCompWindowType type;
|
||||||
ClutterActor *actor = CLUTTER_ACTOR (mc_window);
|
ClutterActor *actor = CLUTTER_ACTOR (mc_window);
|
||||||
|
|
||||||
@ -404,18 +590,18 @@ maximize (MutterWindow *mc_window,
|
|||||||
clutter_actor_move_anchor_point (actor, anchor_x, anchor_y);
|
clutter_actor_move_anchor_point (actor, anchor_x, anchor_y);
|
||||||
|
|
||||||
apriv->tml_maximize =
|
apriv->tml_maximize =
|
||||||
clutter_effect_scale (plugin_state->maximize_effect,
|
clutter_effect_scale (priv->maximize_effect,
|
||||||
actor,
|
actor,
|
||||||
scale_x,
|
scale_x,
|
||||||
scale_y,
|
scale_y,
|
||||||
(ClutterEffectCompleteFunc)
|
(ClutterEffectCompleteFunc)
|
||||||
on_maximize_effect_complete,
|
on_maximize_effect_complete,
|
||||||
NULL);
|
plugin);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mutter_plugin_effect_completed (mutter_get_plugin(), mc_window,
|
mutter_plugin_effect_completed (plugin, mc_window,
|
||||||
MUTTER_PLUGIN_MAXIMIZE);
|
MUTTER_PLUGIN_MAXIMIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -425,7 +611,8 @@ maximize (MutterWindow *mc_window,
|
|||||||
* (Just a skeleton code.)
|
* (Just a skeleton code.)
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
unmaximize (MutterWindow *mc_window,
|
unmaximize (MutterPlugin *plugin,
|
||||||
|
MutterWindow *mc_window,
|
||||||
gint end_x, gint end_y, gint end_width, gint end_height)
|
gint end_x, gint end_y, gint end_width, gint end_height)
|
||||||
{
|
{
|
||||||
MetaCompWindowType type = mutter_window_get_window_type (mc_window);
|
MetaCompWindowType type = mutter_window_get_window_type (mc_window);
|
||||||
@ -438,7 +625,7 @@ unmaximize (MutterWindow *mc_window,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Do this conditionally, if the effect requires completion callback. */
|
/* Do this conditionally, if the effect requires completion callback. */
|
||||||
mutter_plugin_effect_completed (mutter_get_plugin(), mc_window,
|
mutter_plugin_effect_completed (plugin, mc_window,
|
||||||
MUTTER_PLUGIN_UNMAXIMIZE);
|
MUTTER_PLUGIN_UNMAXIMIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -448,6 +635,7 @@ on_map_effect_complete (ClutterActor *actor, gpointer data)
|
|||||||
/*
|
/*
|
||||||
* Must reverse the effect of the effect.
|
* Must reverse the effect of the effect.
|
||||||
*/
|
*/
|
||||||
|
MutterPlugin *plugin = data;
|
||||||
MutterWindow *mc_window = MUTTER_WINDOW (actor);
|
MutterWindow *mc_window = MUTTER_WINDOW (actor);
|
||||||
ActorPrivate *apriv = get_actor_private (mc_window);
|
ActorPrivate *apriv = get_actor_private (mc_window);
|
||||||
|
|
||||||
@ -457,7 +645,7 @@ on_map_effect_complete (ClutterActor *actor, gpointer data)
|
|||||||
CLUTTER_GRAVITY_NORTH_WEST);
|
CLUTTER_GRAVITY_NORTH_WEST);
|
||||||
|
|
||||||
/* Now notify the manager that we are done with this effect */
|
/* Now notify the manager that we are done with this effect */
|
||||||
mutter_plugin_effect_completed (mutter_get_plugin(), mc_window, MUTTER_PLUGIN_MAP);
|
mutter_plugin_effect_completed (plugin, mc_window, MUTTER_PLUGIN_MAP);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -465,8 +653,9 @@ on_map_effect_complete (ClutterActor *actor, gpointer data)
|
|||||||
* completion).
|
* completion).
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
map (MutterWindow *mc_window)
|
map (MutterPlugin *plugin, MutterWindow *mc_window)
|
||||||
{
|
{
|
||||||
|
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
|
||||||
MetaCompWindowType type;
|
MetaCompWindowType type;
|
||||||
ClutterActor *actor = CLUTTER_ACTOR (mc_window);
|
ClutterActor *actor = CLUTTER_ACTOR (mc_window);
|
||||||
|
|
||||||
@ -482,19 +671,19 @@ map (MutterWindow *mc_window)
|
|||||||
clutter_actor_set_scale (actor, 0.0, 0.0);
|
clutter_actor_set_scale (actor, 0.0, 0.0);
|
||||||
clutter_actor_show (actor);
|
clutter_actor_show (actor);
|
||||||
|
|
||||||
apriv->tml_map = clutter_effect_scale (plugin_state->map_effect,
|
apriv->tml_map = clutter_effect_scale (priv->map_effect,
|
||||||
actor,
|
actor,
|
||||||
1.0,
|
1.0,
|
||||||
1.0,
|
1.0,
|
||||||
(ClutterEffectCompleteFunc)
|
(ClutterEffectCompleteFunc)
|
||||||
on_map_effect_complete,
|
on_map_effect_complete,
|
||||||
NULL);
|
plugin);
|
||||||
|
|
||||||
apriv->is_minimized = FALSE;
|
apriv->is_minimized = FALSE;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mutter_plugin_effect_completed (mutter_get_plugin(), mc_window,
|
mutter_plugin_effect_completed (plugin, mc_window,
|
||||||
MUTTER_PLUGIN_MAP);
|
MUTTER_PLUGIN_MAP);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -505,7 +694,7 @@ map (MutterWindow *mc_window)
|
|||||||
static void
|
static void
|
||||||
on_destroy_effect_complete (ClutterActor *actor, gpointer data)
|
on_destroy_effect_complete (ClutterActor *actor, gpointer data)
|
||||||
{
|
{
|
||||||
MutterPlugin *plugin = mutter_get_plugin();
|
MutterPlugin *plugin = data;
|
||||||
MutterWindow *mc_window = MUTTER_WINDOW (actor);
|
MutterWindow *mc_window = MUTTER_WINDOW (actor);
|
||||||
ActorPrivate *apriv = get_actor_private (mc_window);
|
ActorPrivate *apriv = get_actor_private (mc_window);
|
||||||
|
|
||||||
@ -519,8 +708,9 @@ on_destroy_effect_complete (ClutterActor *actor, gpointer data)
|
|||||||
* Simple TV-out like effect.
|
* Simple TV-out like effect.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
destroy (MutterWindow *mc_window)
|
destroy (MutterPlugin *plugin, MutterWindow *mc_window)
|
||||||
{
|
{
|
||||||
|
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
|
||||||
MetaCompWindowType type;
|
MetaCompWindowType type;
|
||||||
ClutterActor *actor = CLUTTER_ACTOR (mc_window);
|
ClutterActor *actor = CLUTTER_ACTOR (mc_window);
|
||||||
|
|
||||||
@ -533,34 +723,34 @@ destroy (MutterWindow *mc_window)
|
|||||||
clutter_actor_move_anchor_point_from_gravity (actor,
|
clutter_actor_move_anchor_point_from_gravity (actor,
|
||||||
CLUTTER_GRAVITY_CENTER);
|
CLUTTER_GRAVITY_CENTER);
|
||||||
|
|
||||||
apriv->tml_destroy = clutter_effect_scale (plugin_state->destroy_effect,
|
apriv->tml_destroy = clutter_effect_scale (priv->destroy_effect,
|
||||||
actor,
|
actor,
|
||||||
1.0,
|
1.0,
|
||||||
0.0,
|
0.0,
|
||||||
(ClutterEffectCompleteFunc)
|
(ClutterEffectCompleteFunc)
|
||||||
on_destroy_effect_complete,
|
on_destroy_effect_complete,
|
||||||
NULL);
|
plugin);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mutter_plugin_effect_completed (mutter_get_plugin(), mc_window,
|
mutter_plugin_effect_completed (plugin, mc_window,
|
||||||
MUTTER_PLUGIN_DESTROY);
|
MUTTER_PLUGIN_DESTROY);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
kill_effect (MutterWindow *mc_window, gulong event)
|
kill_effect (MutterPlugin *plugin, MutterWindow *mc_window, gulong event)
|
||||||
{
|
{
|
||||||
ActorPrivate *apriv;
|
ActorPrivate *apriv;
|
||||||
ClutterActor *actor = CLUTTER_ACTOR (mc_window);
|
ClutterActor *actor = CLUTTER_ACTOR (mc_window);
|
||||||
|
|
||||||
if (event & MUTTER_PLUGIN_SWITCH_WORKSPACE)
|
if (event & MUTTER_PLUGIN_SWITCH_WORKSPACE)
|
||||||
{
|
{
|
||||||
PluginState *state = plugin_state;
|
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
|
||||||
|
|
||||||
if (state->tml_switch_workspace1)
|
if (priv->tml_switch_workspace1)
|
||||||
{
|
{
|
||||||
clutter_timeline_stop (state->tml_switch_workspace1);
|
clutter_timeline_stop (priv->tml_switch_workspace1);
|
||||||
clutter_timeline_stop (state->tml_switch_workspace2);
|
clutter_timeline_stop (priv->tml_switch_workspace2);
|
||||||
on_switch_workspace_effect_complete (state->desktop1, state->actors);
|
on_switch_workspace_effect_complete (priv->desktop1, priv->actors);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(event & ~MUTTER_PLUGIN_SWITCH_WORKSPACE))
|
if (!(event & ~MUTTER_PLUGIN_SWITCH_WORKSPACE))
|
||||||
@ -597,144 +787,10 @@ kill_effect (MutterWindow *mc_window, gulong event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const MutterPluginInfo *
|
||||||
const gchar * g_module_check_init (GModule *module);
|
plugin_info (MutterPlugin *plugin)
|
||||||
const gchar *
|
|
||||||
g_module_check_init (GModule *module)
|
|
||||||
{
|
{
|
||||||
MutterPlugin *plugin = mutter_get_plugin ();
|
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
|
||||||
|
|
||||||
/* Human readable name (for use in UI) */
|
return &priv->info;
|
||||||
plugin->name = "Default Effects";
|
|
||||||
|
|
||||||
/* Plugin load time initialiser */
|
|
||||||
plugin->do_init = do_init;
|
|
||||||
|
|
||||||
/* Effect handlers */
|
|
||||||
plugin->minimize = minimize;
|
|
||||||
plugin->destroy = destroy;
|
|
||||||
plugin->map = map;
|
|
||||||
plugin->maximize = maximize;
|
|
||||||
plugin->unmaximize = unmaximize;
|
|
||||||
plugin->switch_workspace = switch_workspace;
|
|
||||||
plugin->kill_effect = kill_effect;
|
|
||||||
|
|
||||||
/* The reload handler */
|
|
||||||
plugin->reload = reload;
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Core of the plugin init function, called for initial initialization and
|
|
||||||
* by the reload() function. Returns TRUE on success.
|
|
||||||
*/
|
|
||||||
static gboolean
|
|
||||||
do_init (const char *params)
|
|
||||||
{
|
|
||||||
guint destroy_timeout = DESTROY_TIMEOUT;
|
|
||||||
guint minimize_timeout = MINIMIZE_TIMEOUT;
|
|
||||||
guint maximize_timeout = MAXIMIZE_TIMEOUT;
|
|
||||||
guint map_timeout = MAP_TIMEOUT;
|
|
||||||
guint switch_timeout = SWITCH_TIMEOUT;
|
|
||||||
|
|
||||||
plugin_state = g_new0 (PluginState, 1);
|
|
||||||
|
|
||||||
if (params)
|
|
||||||
{
|
|
||||||
if (strstr (params, "debug"))
|
|
||||||
{
|
|
||||||
g_debug ("%s: Entering debug mode.", mutter_get_plugin()->name);
|
|
||||||
|
|
||||||
plugin_state->debug_mode = TRUE;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Double the effect duration to make them easier to observe.
|
|
||||||
*/
|
|
||||||
destroy_timeout *= 2;
|
|
||||||
minimize_timeout *= 2;
|
|
||||||
maximize_timeout *= 2;
|
|
||||||
map_timeout *= 2;
|
|
||||||
switch_timeout *= 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
plugin_state->destroy_effect
|
|
||||||
= clutter_effect_template_new (clutter_timeline_new_for_duration (
|
|
||||||
destroy_timeout),
|
|
||||||
CLUTTER_ALPHA_SINE_INC);
|
|
||||||
|
|
||||||
|
|
||||||
plugin_state->minimize_effect
|
|
||||||
= clutter_effect_template_new (clutter_timeline_new_for_duration (
|
|
||||||
minimize_timeout),
|
|
||||||
CLUTTER_ALPHA_SINE_INC);
|
|
||||||
|
|
||||||
plugin_state->maximize_effect
|
|
||||||
= clutter_effect_template_new (clutter_timeline_new_for_duration (
|
|
||||||
maximize_timeout),
|
|
||||||
CLUTTER_ALPHA_SINE_INC);
|
|
||||||
|
|
||||||
plugin_state->map_effect
|
|
||||||
= clutter_effect_template_new (clutter_timeline_new_for_duration (
|
|
||||||
map_timeout),
|
|
||||||
CLUTTER_ALPHA_SINE_INC);
|
|
||||||
|
|
||||||
plugin_state->switch_workspace_effect
|
|
||||||
= clutter_effect_template_new (clutter_timeline_new_for_duration (
|
|
||||||
switch_timeout),
|
|
||||||
CLUTTER_ALPHA_SINE_INC);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
free_plugin_private (PluginState *state)
|
|
||||||
{
|
|
||||||
if (!state)
|
|
||||||
return;
|
|
||||||
|
|
||||||
g_object_unref (state->destroy_effect);
|
|
||||||
g_object_unref (state->minimize_effect);
|
|
||||||
g_object_unref (state->maximize_effect);
|
|
||||||
g_object_unref (state->switch_workspace_effect);
|
|
||||||
|
|
||||||
g_free (state);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Called by the plugin manager when we stuff like the command line parameters
|
|
||||||
* changed.
|
|
||||||
*/
|
|
||||||
static gboolean
|
|
||||||
reload (const char *params)
|
|
||||||
{
|
|
||||||
PluginState *state;
|
|
||||||
|
|
||||||
state = plugin_state;
|
|
||||||
|
|
||||||
if (do_init (params))
|
|
||||||
{
|
|
||||||
/* Success; free the old state */
|
|
||||||
free_plugin_private (plugin_state);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Fail -- fall back to the old state. */
|
|
||||||
plugin_state = state;
|
|
||||||
}
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* GModule unload function -- do any cleanup required.
|
|
||||||
*/
|
|
||||||
G_MODULE_EXPORT void g_module_unload (GModule *module);
|
|
||||||
G_MODULE_EXPORT void
|
|
||||||
g_module_unload (GModule *module)
|
|
||||||
{
|
|
||||||
free_plugin_private (plugin_state);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -586,7 +586,7 @@ ag_task_get_reply_and_free (AgGetPropertyTask *task,
|
|||||||
int *actual_format,
|
int *actual_format,
|
||||||
unsigned long *nitems,
|
unsigned long *nitems,
|
||||||
unsigned long *bytesafter,
|
unsigned long *bytesafter,
|
||||||
char **prop)
|
unsigned char **prop)
|
||||||
{
|
{
|
||||||
Display *dpy;
|
Display *dpy;
|
||||||
|
|
||||||
@ -615,7 +615,7 @@ ag_task_get_reply_and_free (AgGetPropertyTask *task,
|
|||||||
*nitems = task->n_items;
|
*nitems = task->n_items;
|
||||||
*bytesafter = task->bytes_after;
|
*bytesafter = task->bytes_after;
|
||||||
|
|
||||||
*prop = task->data; /* pass out ownership of task->data */
|
*prop = (unsigned char*) task->data; /* pass out ownership of task->data */
|
||||||
|
|
||||||
SyncHandle ();
|
SyncHandle ();
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ Status ag_task_get_reply_and_free (AgGetPropertyTask *task,
|
|||||||
int *actual_format,
|
int *actual_format,
|
||||||
unsigned long *nitems,
|
unsigned long *nitems,
|
||||||
unsigned long *bytesafter,
|
unsigned long *bytesafter,
|
||||||
char **prop);
|
unsigned char **prop);
|
||||||
|
|
||||||
Bool ag_task_have_reply (AgGetPropertyTask *task);
|
Bool ag_task_have_reply (AgGetPropertyTask *task);
|
||||||
Atom ag_task_get_property (AgGetPropertyTask *task);
|
Atom ag_task_get_property (AgGetPropertyTask *task);
|
||||||
|
@ -197,6 +197,40 @@ meta_rectangle_equal (const MetaRectangle *src1,
|
|||||||
(src1->height == src2->height));
|
(src1->height == src2->height));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_rectangle_union (const MetaRectangle *rect1,
|
||||||
|
const MetaRectangle *rect2,
|
||||||
|
MetaRectangle *dest)
|
||||||
|
{
|
||||||
|
int dest_x, dest_y;
|
||||||
|
int dest_w, dest_h;
|
||||||
|
|
||||||
|
dest_x = rect1->x;
|
||||||
|
dest_y = rect1->y;
|
||||||
|
dest_w = rect1->width;
|
||||||
|
dest_h = rect1->height;
|
||||||
|
|
||||||
|
if (rect2->x < dest_x)
|
||||||
|
{
|
||||||
|
dest_w += dest_x - rect2->x;
|
||||||
|
dest_x = rect2->x;
|
||||||
|
}
|
||||||
|
if (rect2->y < dest_y)
|
||||||
|
{
|
||||||
|
dest_h += dest_y - rect2->y;
|
||||||
|
dest_y = rect2->y;
|
||||||
|
}
|
||||||
|
if (rect2->x + rect2->width > dest_x + dest_w)
|
||||||
|
dest_w = rect2->x + rect2->width - dest_x;
|
||||||
|
if (rect2->y + rect2->height > dest_y + dest_h)
|
||||||
|
dest_h = rect2->y + rect2->height - dest_y;
|
||||||
|
|
||||||
|
dest->x = dest_x;
|
||||||
|
dest->y = dest_y;
|
||||||
|
dest->width = dest_w;
|
||||||
|
dest->height = dest_h;
|
||||||
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
meta_rectangle_overlap (const MetaRectangle *rect1,
|
meta_rectangle_overlap (const MetaRectangle *rect1,
|
||||||
const MetaRectangle *rect2)
|
const MetaRectangle *rect2)
|
||||||
|
@ -392,7 +392,27 @@ setup_constraint_info (ConstraintInfo *info,
|
|||||||
meta_window_get_work_area_for_xinerama (window,
|
meta_window_get_work_area_for_xinerama (window,
|
||||||
xinerama_info->number,
|
xinerama_info->number,
|
||||||
&info->work_area_xinerama);
|
&info->work_area_xinerama);
|
||||||
info->entire_xinerama = xinerama_info->rect;
|
|
||||||
|
if (!window->fullscreen || window->fullscreen_monitors[0] == -1)
|
||||||
|
{
|
||||||
|
info->entire_xinerama = xinerama_info->rect;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
long monitor;
|
||||||
|
|
||||||
|
monitor = window->fullscreen_monitors[i];
|
||||||
|
info->entire_xinerama =
|
||||||
|
window->screen->xinerama_infos[monitor].rect;
|
||||||
|
for (i = 1; i <= 3; i++)
|
||||||
|
{
|
||||||
|
monitor = window->fullscreen_monitors[i];
|
||||||
|
meta_rectangle_union (&info->entire_xinerama,
|
||||||
|
&window->screen->xinerama_infos[monitor].rect,
|
||||||
|
&info->entire_xinerama);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cur_workspace = window->screen->active_workspace;
|
cur_workspace = window->screen->active_workspace;
|
||||||
info->usable_screen_region =
|
info->usable_screen_region =
|
||||||
@ -784,7 +804,9 @@ constrain_fullscreen (MetaWindow *window,
|
|||||||
/* Determine whether constraint applies; exit if it doesn't */
|
/* Determine whether constraint applies; exit if it doesn't */
|
||||||
if (!window->fullscreen)
|
if (!window->fullscreen)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
xinerama = info->entire_xinerama;
|
xinerama = info->entire_xinerama;
|
||||||
|
|
||||||
get_size_limits (window, info->fgeom, FALSE, &min_size, &max_size);
|
get_size_limits (window, info->fgeom, FALSE, &min_size, &max_size);
|
||||||
too_big = !meta_rectangle_could_fit_rect (&xinerama, &min_size);
|
too_big = !meta_rectangle_could_fit_rect (&xinerama, &min_size);
|
||||||
too_small = !meta_rectangle_could_fit_rect (&max_size, &xinerama);
|
too_small = !meta_rectangle_could_fit_rect (&max_size, &xinerama);
|
||||||
|
@ -145,6 +145,13 @@ meta_core_get (Display *xdisplay,
|
|||||||
case META_WINDOW_DOCK:
|
case META_WINDOW_DOCK:
|
||||||
case META_WINDOW_TOOLBAR:
|
case META_WINDOW_TOOLBAR:
|
||||||
case META_WINDOW_SPLASHSCREEN:
|
case META_WINDOW_SPLASHSCREEN:
|
||||||
|
case META_WINDOW_DROPDOWN_MENU:
|
||||||
|
case META_WINDOW_POPUP_MENU:
|
||||||
|
case META_WINDOW_TOOLTIP:
|
||||||
|
case META_WINDOW_NOTIFICATION:
|
||||||
|
case META_WINDOW_COMBO:
|
||||||
|
case META_WINDOW_DND:
|
||||||
|
case META_WINDOW_OVERRIDE_OTHER:
|
||||||
/* No frame */
|
/* No frame */
|
||||||
base_type = META_FRAME_TYPE_LAST;
|
base_type = META_FRAME_TYPE_LAST;
|
||||||
break;
|
break;
|
||||||
|
@ -491,7 +491,7 @@ meta_window_present_delete_dialog (MetaWindow *window, guint32 timestamp)
|
|||||||
|
|
||||||
if (w->xtransient_for == window->xwindow &&
|
if (w->xtransient_for == window->xwindow &&
|
||||||
w->res_class &&
|
w->res_class &&
|
||||||
g_strcasecmp (w->res_class, "metacity-dialog") == 0)
|
g_ascii_strcasecmp (w->res_class, "metacity-dialog") == 0)
|
||||||
{
|
{
|
||||||
meta_window_activate (w, timestamp);
|
meta_window_activate (w, timestamp);
|
||||||
break;
|
break;
|
||||||
|
@ -74,6 +74,8 @@ typedef void (* MetaWindowPingFunc) (MetaDisplay *display,
|
|||||||
|
|
||||||
struct _MetaDisplay
|
struct _MetaDisplay
|
||||||
{
|
{
|
||||||
|
GObject parent_instance;
|
||||||
|
|
||||||
char *name;
|
char *name;
|
||||||
Display *xdisplay;
|
Display *xdisplay;
|
||||||
|
|
||||||
@ -200,10 +202,8 @@ struct _MetaDisplay
|
|||||||
int grab_resize_timeout_id;
|
int grab_resize_timeout_id;
|
||||||
|
|
||||||
/* Keybindings stuff */
|
/* Keybindings stuff */
|
||||||
MetaKeyBinding *screen_bindings;
|
MetaKeyBinding *key_bindings;
|
||||||
int n_screen_bindings;
|
int n_key_bindings;
|
||||||
MetaKeyBinding *window_bindings;
|
|
||||||
int n_window_bindings;
|
|
||||||
int min_keycode;
|
int min_keycode;
|
||||||
int max_keycode;
|
int max_keycode;
|
||||||
KeySym *keymap;
|
KeySym *keymap;
|
||||||
@ -298,6 +298,11 @@ struct _MetaDisplay
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct _MetaDisplayClass
|
||||||
|
{
|
||||||
|
GObjectClass parent_class;
|
||||||
|
};
|
||||||
|
|
||||||
/* Xserver time can wraparound, thus comparing two timestamps needs to take
|
/* Xserver time can wraparound, thus comparing two timestamps needs to take
|
||||||
* this into account. Here's a little macro to help out. If no wraparound
|
* this into account. Here's a little macro to help out. If no wraparound
|
||||||
* has occurred, this is equivalent to
|
* has occurred, this is equivalent to
|
||||||
|
@ -127,6 +127,8 @@ typedef struct
|
|||||||
Window xwindow;
|
Window xwindow;
|
||||||
} MetaAutoRaiseData;
|
} MetaAutoRaiseData;
|
||||||
|
|
||||||
|
G_DEFINE_TYPE(MetaDisplay, meta_display, G_TYPE_OBJECT);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The display we're managing. This is a singleton object. (Historically,
|
* The display we're managing. This is a singleton object. (Historically,
|
||||||
* this was a list of displays, but there was never any way to add more
|
* this was a list of displays, but there was never any way to add more
|
||||||
@ -163,6 +165,11 @@ static void sanity_check_timestamps (MetaDisplay *display,
|
|||||||
|
|
||||||
MetaGroup* get_focussed_group (MetaDisplay *display);
|
MetaGroup* get_focussed_group (MetaDisplay *display);
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_display_class_init (MetaDisplayClass *klass)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destructor for MetaPingData structs. Will destroy the
|
* Destructor for MetaPingData structs. Will destroy the
|
||||||
* event source for the struct as well.
|
* event source for the struct as well.
|
||||||
@ -298,6 +305,13 @@ disable_compositor (MetaDisplay *display)
|
|||||||
display->compositor = NULL;
|
display->compositor = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_display_init (MetaDisplay *disp)
|
||||||
|
{
|
||||||
|
/* Some stuff could go in here that's currently in _open,
|
||||||
|
* but it doesn't really matter. */
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens a new display, sets it up, initialises all the X extensions
|
* Opens a new display, sets it up, initialises all the X extensions
|
||||||
* we will need, and adds it to the list of displays.
|
* we will need, and adds it to the list of displays.
|
||||||
@ -340,7 +354,7 @@ meta_display_open (void)
|
|||||||
XSynchronize (xdisplay, True);
|
XSynchronize (xdisplay, True);
|
||||||
|
|
||||||
g_assert (the_display == NULL);
|
g_assert (the_display == NULL);
|
||||||
the_display = g_new (MetaDisplay, 1);
|
the_display = g_object_new (META_TYPE_DISPLAY, NULL);
|
||||||
|
|
||||||
the_display->closing = 0;
|
the_display->closing = 0;
|
||||||
|
|
||||||
@ -903,7 +917,7 @@ meta_display_close (MetaDisplay *display,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Must be after all calls to meta_window_free() since they
|
/* Must be after all calls to meta_window_unmanage() since they
|
||||||
* unregister windows
|
* unregister windows
|
||||||
*/
|
*/
|
||||||
g_hash_table_destroy (display->window_ids);
|
g_hash_table_destroy (display->window_ids);
|
||||||
@ -1992,7 +2006,7 @@ event_callback (XEvent *event,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Unmanage destroyed window */
|
/* Unmanage destroyed window */
|
||||||
meta_window_free (window, timestamp);
|
meta_window_unmanage (window, timestamp);
|
||||||
window = NULL;
|
window = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2020,11 +2034,12 @@ event_callback (XEvent *event,
|
|||||||
"Window %s withdrawn\n",
|
"Window %s withdrawn\n",
|
||||||
window->desc);
|
window->desc);
|
||||||
|
|
||||||
meta_effect_run_close (window, NULL, NULL);
|
if (!window->override_redirect)
|
||||||
|
meta_effect_run_close (window, NULL, NULL);
|
||||||
|
|
||||||
/* Unmanage withdrawn window */
|
/* Unmanage withdrawn window */
|
||||||
window->withdrawn = TRUE;
|
window->withdrawn = TRUE;
|
||||||
meta_window_free (window, timestamp);
|
meta_window_unmanage (window, timestamp);
|
||||||
window = NULL;
|
window = NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2045,6 +2060,15 @@ event_callback (XEvent *event,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MapNotify:
|
case MapNotify:
|
||||||
|
/* NB: override redirect windows wont cause a map request so we
|
||||||
|
* watch out for map notifies against any root windows too if a
|
||||||
|
* compositor is enabled: */
|
||||||
|
if (display->compositor && window == NULL
|
||||||
|
&& meta_display_screen_for_root (display, event->xmap.event))
|
||||||
|
{
|
||||||
|
window = meta_window_new (display, event->xmap.window,
|
||||||
|
FALSE);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case MapRequest:
|
case MapRequest:
|
||||||
if (window == NULL)
|
if (window == NULL)
|
||||||
@ -2073,29 +2097,32 @@ event_callback (XEvent *event,
|
|||||||
case ReparentNotify:
|
case ReparentNotify:
|
||||||
break;
|
break;
|
||||||
case ConfigureNotify:
|
case ConfigureNotify:
|
||||||
/* Handle screen resize */
|
if (window && window->override_redirect)
|
||||||
{
|
meta_window_configure_notify (window, &event->xconfigure);
|
||||||
MetaScreen *screen;
|
else
|
||||||
|
/* Handle screen resize */
|
||||||
|
{
|
||||||
|
MetaScreen *screen;
|
||||||
|
|
||||||
screen = meta_display_screen_for_root (display,
|
screen = meta_display_screen_for_root (display,
|
||||||
event->xconfigure.window);
|
event->xconfigure.window);
|
||||||
|
|
||||||
if (screen != NULL)
|
if (screen != NULL)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_RANDR
|
#ifdef HAVE_RANDR
|
||||||
/* do the resize the official way */
|
/* do the resize the official way */
|
||||||
XRRUpdateConfiguration (event);
|
XRRUpdateConfiguration (event);
|
||||||
#else
|
#else
|
||||||
/* poke around in Xlib */
|
/* poke around in Xlib */
|
||||||
screen->xscreen->width = event->xconfigure.width;
|
screen->xscreen->width = event->xconfigure.width;
|
||||||
screen->xscreen->height = event->xconfigure.height;
|
screen->xscreen->height = event->xconfigure.height;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
meta_screen_resize (screen,
|
meta_screen_resize (screen,
|
||||||
event->xconfigure.width,
|
event->xconfigure.width,
|
||||||
event->xconfigure.height);
|
event->xconfigure.height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ConfigureRequest:
|
case ConfigureRequest:
|
||||||
/* This comment and code is found in both twm and fvwm */
|
/* This comment and code is found in both twm and fvwm */
|
||||||
@ -2397,9 +2424,10 @@ event_callback (XEvent *event,
|
|||||||
|
|
||||||
if (display->compositor)
|
if (display->compositor)
|
||||||
{
|
{
|
||||||
meta_compositor_process_event (display->compositor,
|
if (meta_compositor_process_event (display->compositor,
|
||||||
event,
|
event,
|
||||||
window);
|
window))
|
||||||
|
filter_out_event = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
display->current_time = CurrentTime;
|
display->current_time = CurrentTime;
|
||||||
@ -3264,9 +3292,10 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
|||||||
|
|
||||||
if (display->grab_op != META_GRAB_OP_NONE)
|
if (display->grab_op != META_GRAB_OP_NONE)
|
||||||
{
|
{
|
||||||
meta_warning ("Attempt to perform window operation %u on window %s when operation %u on %s already in effect\n",
|
if (window)
|
||||||
op, window ? window->desc : "none", display->grab_op,
|
meta_warning ("Attempt to perform window operation %u on window %s when operation %u on %s already in effect\n",
|
||||||
display->grab_window ? display->grab_window->desc : "none");
|
op, window->desc, display->grab_op,
|
||||||
|
display->grab_window ? display->grab_window->desc : "none");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4814,7 +4843,7 @@ meta_display_unmanage_windows_for_screen (MetaDisplay *display,
|
|||||||
tmp = winlist;
|
tmp = winlist;
|
||||||
while (tmp != NULL)
|
while (tmp != NULL)
|
||||||
{
|
{
|
||||||
meta_window_free (tmp->data, timestamp);
|
meta_window_unmanage (tmp->data, timestamp);
|
||||||
|
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#define META_GROUP_PROPS_H
|
#define META_GROUP_PROPS_H
|
||||||
|
|
||||||
#include "group.h"
|
#include "group.h"
|
||||||
|
#include "window-private.h"
|
||||||
|
|
||||||
void meta_group_reload_property (MetaGroup *group,
|
void meta_group_reload_property (MetaGroup *group,
|
||||||
Atom property);
|
Atom property);
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "group-private.h"
|
#include "group-private.h"
|
||||||
#include "group-props.h"
|
#include "group-props.h"
|
||||||
|
#include "window-private.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
|
|
||||||
static MetaGroup*
|
static MetaGroup*
|
||||||
@ -272,3 +273,13 @@ meta_group_property_notify (MetaGroup *group,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
meta_group_get_size (MetaGroup *group)
|
||||||
|
{
|
||||||
|
if (!group)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return group->refcount;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -225,11 +225,12 @@ read_rgb_icon (MetaDisplay *display,
|
|||||||
gulong nitems;
|
gulong nitems;
|
||||||
gulong bytes_after;
|
gulong bytes_after;
|
||||||
int result, err;
|
int result, err;
|
||||||
gulong *data;
|
guchar *data;
|
||||||
gulong *best;
|
gulong *best;
|
||||||
int w, h;
|
int w, h;
|
||||||
gulong *best_mini;
|
gulong *best_mini;
|
||||||
int mini_w, mini_h;
|
int mini_w, mini_h;
|
||||||
|
gulong *data_as_long;
|
||||||
|
|
||||||
meta_error_trap_push_with_return (display);
|
meta_error_trap_push_with_return (display);
|
||||||
type = None;
|
type = None;
|
||||||
@ -239,8 +240,7 @@ read_rgb_icon (MetaDisplay *display,
|
|||||||
display->atom__NET_WM_ICON,
|
display->atom__NET_WM_ICON,
|
||||||
0, G_MAXLONG,
|
0, G_MAXLONG,
|
||||||
False, XA_CARDINAL, &type, &format, &nitems,
|
False, XA_CARDINAL, &type, &format, &nitems,
|
||||||
&bytes_after, ((guchar **)&data));
|
&bytes_after, &data);
|
||||||
|
|
||||||
err = meta_error_trap_pop_with_return (display, TRUE);
|
err = meta_error_trap_pop_with_return (display, TRUE);
|
||||||
|
|
||||||
if (err != Success ||
|
if (err != Success ||
|
||||||
@ -253,7 +253,9 @@ read_rgb_icon (MetaDisplay *display,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!find_best_size (data, nitems,
|
data_as_long = (gulong *)data;
|
||||||
|
|
||||||
|
if (!find_best_size (data_as_long, nitems,
|
||||||
ideal_width, ideal_height,
|
ideal_width, ideal_height,
|
||||||
&w, &h, &best))
|
&w, &h, &best))
|
||||||
{
|
{
|
||||||
@ -261,7 +263,7 @@ read_rgb_icon (MetaDisplay *display,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!find_best_size (data, nitems,
|
if (!find_best_size (data_as_long, nitems,
|
||||||
ideal_mini_width, ideal_mini_height,
|
ideal_mini_width, ideal_mini_height,
|
||||||
&mini_w, &mini_h, &best_mini))
|
&mini_w, &mini_h, &best_mini))
|
||||||
{
|
{
|
||||||
@ -464,6 +466,7 @@ get_kwm_win_icon (MetaDisplay *display,
|
|||||||
int format;
|
int format;
|
||||||
gulong nitems;
|
gulong nitems;
|
||||||
gulong bytes_after;
|
gulong bytes_after;
|
||||||
|
guchar *data;
|
||||||
Pixmap *icons;
|
Pixmap *icons;
|
||||||
int err, result;
|
int err, result;
|
||||||
|
|
||||||
@ -478,7 +481,8 @@ get_kwm_win_icon (MetaDisplay *display,
|
|||||||
False,
|
False,
|
||||||
display->atom__KWM_WIN_ICON,
|
display->atom__KWM_WIN_ICON,
|
||||||
&type, &format, &nitems,
|
&type, &format, &nitems,
|
||||||
&bytes_after, (guchar **)&icons);
|
&bytes_after, &data);
|
||||||
|
icons = (Pixmap *)data;
|
||||||
|
|
||||||
err = meta_error_trap_pop_with_return (display, TRUE);
|
err = meta_error_trap_pop_with_return (display, TRUE);
|
||||||
if (err != Success ||
|
if (err != Success ||
|
||||||
@ -817,29 +821,13 @@ meta_read_icons (MetaScreen *screen,
|
|||||||
if (icon_cache->want_fallback &&
|
if (icon_cache->want_fallback &&
|
||||||
icon_cache->origin < USING_FALLBACK_ICON)
|
icon_cache->origin < USING_FALLBACK_ICON)
|
||||||
{
|
{
|
||||||
GdkPixbuf *fallback_icon;
|
get_fallback_icons (screen,
|
||||||
GdkPixbuf *fallback_mini_icon;
|
iconp,
|
||||||
|
ideal_width,
|
||||||
fallback_icon = NULL;
|
ideal_height,
|
||||||
fallback_mini_icon = NULL;
|
mini_iconp,
|
||||||
|
ideal_mini_width,
|
||||||
meta_ui_get_fallback_icons(&fallback_icon, &fallback_mini_icon);
|
ideal_mini_height);
|
||||||
|
|
||||||
if (fallback_icon == NULL || fallback_mini_icon == NULL)
|
|
||||||
{
|
|
||||||
get_fallback_icons (screen,
|
|
||||||
iconp,
|
|
||||||
ideal_width,
|
|
||||||
ideal_height,
|
|
||||||
mini_iconp,
|
|
||||||
ideal_mini_width,
|
|
||||||
ideal_mini_height);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fallback_icon != NULL)
|
|
||||||
*iconp = fallback_icon;
|
|
||||||
if (fallback_mini_icon != NULL)
|
|
||||||
*mini_iconp = fallback_mini_icon;
|
|
||||||
|
|
||||||
replace_cache (icon_cache, USING_FALLBACK_ICON,
|
replace_cache (icon_cache, USING_FALLBACK_ICON,
|
||||||
*iconp, *mini_iconp);
|
*iconp, *mini_iconp);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -418,8 +418,8 @@ meta_clutter_init (GOptionContext *ctx, int *argc, char ***argv)
|
|||||||
* try to use the environment variable METACITY_DISPLAY. If that
|
* try to use the environment variable METACITY_DISPLAY. If that
|
||||||
* also is NULL, use the default - :0.0
|
* also is NULL, use the default - :0.0
|
||||||
*/
|
*/
|
||||||
static
|
static void
|
||||||
void meta_select_display (gchar *display_name)
|
meta_select_display (gchar *display_name)
|
||||||
{
|
{
|
||||||
gchar *envVar = "";
|
gchar *envVar = "";
|
||||||
if (display_name)
|
if (display_name)
|
||||||
@ -431,6 +431,23 @@ void meta_select_display (gchar *display_name)
|
|||||||
putenv (envVar);
|
putenv (envVar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_finalize (void)
|
||||||
|
{
|
||||||
|
meta_display_close (meta_get_display (),
|
||||||
|
CurrentTime); /* I doubt correct timestamps matter here */
|
||||||
|
|
||||||
|
meta_session_shutdown ();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
sigterm_handler (int signum)
|
||||||
|
{
|
||||||
|
meta_finalize ();
|
||||||
|
|
||||||
|
exit (meta_exit_code);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is where the story begins. It parses commandline options and
|
* This is where the story begins. It parses commandline options and
|
||||||
* environment variables, sets up the screen, hands control off to
|
* environment variables, sets up the screen, hands control off to
|
||||||
@ -471,13 +488,20 @@ main (int argc, char **argv)
|
|||||||
g_strerror (errno));
|
g_strerror (errno));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
act.sa_handler = &sigterm_handler;
|
||||||
|
if (sigaction (SIGTERM, &act, NULL) < 0)
|
||||||
|
g_printerr ("Failed to register SIGTERM handler: %s\n",
|
||||||
|
g_strerror (errno));
|
||||||
|
|
||||||
if (g_getenv ("METACITY_VERBOSE"))
|
if (g_getenv ("METACITY_VERBOSE"))
|
||||||
meta_set_verbose (TRUE);
|
meta_set_verbose (TRUE);
|
||||||
if (g_getenv ("METACITY_DEBUG"))
|
if (g_getenv ("METACITY_DEBUG"))
|
||||||
meta_set_debugging (TRUE);
|
meta_set_debugging (TRUE);
|
||||||
|
|
||||||
if (g_get_home_dir ())
|
if (g_get_home_dir ())
|
||||||
chdir (g_get_home_dir ());
|
if (chdir (g_get_home_dir ()) < 0)
|
||||||
|
meta_warning ("Could not change to home directory %s.\n",
|
||||||
|
g_get_home_dir ());
|
||||||
|
|
||||||
meta_print_self_identity ();
|
meta_print_self_identity ();
|
||||||
|
|
||||||
@ -630,10 +654,7 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
g_main_loop_run (meta_main_loop);
|
g_main_loop_run (meta_main_loop);
|
||||||
|
|
||||||
meta_display_close (meta_get_display (),
|
meta_finalize ();
|
||||||
CurrentTime); /* I doubt correct timestamps matter here */
|
|
||||||
|
|
||||||
meta_session_shutdown ();
|
|
||||||
|
|
||||||
if (meta_restart_after_quit)
|
if (meta_restart_after_quit)
|
||||||
{
|
{
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include "place.h"
|
#include "place.h"
|
||||||
#include "workspace.h"
|
#include "workspace.h"
|
||||||
#include "prefs.h"
|
#include "prefs.h"
|
||||||
#include <gdk/gdkregion.h>
|
#include <gdk/gdk.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
@ -394,6 +394,14 @@ rectangle_overlaps_some_window (MetaRectangle *rect,
|
|||||||
case META_WINDOW_DESKTOP:
|
case META_WINDOW_DESKTOP:
|
||||||
case META_WINDOW_DIALOG:
|
case META_WINDOW_DIALOG:
|
||||||
case META_WINDOW_MODAL_DIALOG:
|
case META_WINDOW_MODAL_DIALOG:
|
||||||
|
/* override redirect window types: */
|
||||||
|
case META_WINDOW_DROPDOWN_MENU:
|
||||||
|
case META_WINDOW_POPUP_MENU:
|
||||||
|
case META_WINDOW_TOOLTIP:
|
||||||
|
case META_WINDOW_NOTIFICATION:
|
||||||
|
case META_WINDOW_COMBO:
|
||||||
|
case META_WINDOW_DND:
|
||||||
|
case META_WINDOW_OVERRIDE_OTHER:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case META_WINDOW_NORMAL:
|
case META_WINDOW_NORMAL:
|
||||||
@ -680,6 +688,14 @@ meta_window_place (MetaWindow *window,
|
|||||||
case META_WINDOW_TOOLBAR:
|
case META_WINDOW_TOOLBAR:
|
||||||
case META_WINDOW_MENU:
|
case META_WINDOW_MENU:
|
||||||
case META_WINDOW_UTILITY:
|
case META_WINDOW_UTILITY:
|
||||||
|
/* override redirect window types: */
|
||||||
|
case META_WINDOW_DROPDOWN_MENU:
|
||||||
|
case META_WINDOW_POPUP_MENU:
|
||||||
|
case META_WINDOW_TOOLTIP:
|
||||||
|
case META_WINDOW_NOTIFICATION:
|
||||||
|
case META_WINDOW_COMBO:
|
||||||
|
case META_WINDOW_DND:
|
||||||
|
case META_WINDOW_OVERRIDE_OTHER:
|
||||||
goto done_no_constraints;
|
goto done_no_constraints;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -713,6 +729,14 @@ meta_window_place (MetaWindow *window,
|
|||||||
case META_WINDOW_TOOLBAR:
|
case META_WINDOW_TOOLBAR:
|
||||||
case META_WINDOW_MENU:
|
case META_WINDOW_MENU:
|
||||||
case META_WINDOW_UTILITY:
|
case META_WINDOW_UTILITY:
|
||||||
|
/* override redirect window types: */
|
||||||
|
case META_WINDOW_DROPDOWN_MENU:
|
||||||
|
case META_WINDOW_POPUP_MENU:
|
||||||
|
case META_WINDOW_TOOLTIP:
|
||||||
|
case META_WINDOW_NOTIFICATION:
|
||||||
|
case META_WINDOW_COMBO:
|
||||||
|
case META_WINDOW_DND:
|
||||||
|
case META_WINDOW_OVERRIDE_OTHER:
|
||||||
if (window->size_hints.flags & PPosition)
|
if (window->size_hints.flags & PPosition)
|
||||||
{
|
{
|
||||||
meta_topic (META_DEBUG_PLACEMENT,
|
meta_topic (META_DEBUG_PLACEMENT,
|
||||||
|
306
src/core/prefs.c
306
src/core/prefs.c
@ -74,8 +74,8 @@
|
|||||||
static GConfClient *default_client = NULL;
|
static GConfClient *default_client = NULL;
|
||||||
static GList *changes = NULL;
|
static GList *changes = NULL;
|
||||||
static guint changed_idle;
|
static guint changed_idle;
|
||||||
#endif
|
|
||||||
static GList *listeners = NULL;
|
static GList *listeners = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
static gboolean use_system_font = FALSE;
|
static gboolean use_system_font = FALSE;
|
||||||
static PangoFontDescription *titlebar_font = NULL;
|
static PangoFontDescription *titlebar_font = NULL;
|
||||||
@ -122,17 +122,13 @@ static gboolean live_hidden_windows = FALSE;
|
|||||||
#ifdef HAVE_GCONF
|
#ifdef HAVE_GCONF
|
||||||
static gboolean handle_preference_update_enum (const gchar *key, GConfValue *value);
|
static gboolean handle_preference_update_enum (const gchar *key, GConfValue *value);
|
||||||
|
|
||||||
static gboolean update_window_binding (const char *name,
|
static gboolean update_key_binding (const char *name,
|
||||||
const char *value);
|
const char *value);
|
||||||
static gboolean update_screen_binding (const char *name,
|
|
||||||
const char *value);
|
|
||||||
static gboolean find_and_update_list_binding (MetaKeyPref *bindings,
|
static gboolean find_and_update_list_binding (MetaKeyPref *bindings,
|
||||||
const char *name,
|
const char *name,
|
||||||
GSList *value);
|
GSList *value);
|
||||||
static gboolean update_window_list_binding (const char *name,
|
static gboolean update_key_list_binding (const char *name,
|
||||||
GSList *value);
|
GSList *value);
|
||||||
static gboolean update_screen_list_binding (const char *name,
|
|
||||||
GSList *value);
|
|
||||||
static gboolean update_command (const char *name,
|
static gboolean update_command (const char *name,
|
||||||
const char *value);
|
const char *value);
|
||||||
static gboolean update_workspace_name (const char *name,
|
static gboolean update_workspace_name (const char *name,
|
||||||
@ -676,8 +672,11 @@ handle_preference_update_enum (const gchar *key, GConfValue *value)
|
|||||||
* we might consider reverting invalid keys to their original values.
|
* we might consider reverting invalid keys to their original values.
|
||||||
* (We know the old value, so we can look up a suitable string in
|
* (We know the old value, so we can look up a suitable string in
|
||||||
* the symtab.)
|
* the symtab.)
|
||||||
|
*
|
||||||
|
* (Empty comment follows so the translators don't see this.)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* */
|
||||||
meta_warning (_("GConf key '%s' is set to an invalid value\n"),
|
meta_warning (_("GConf key '%s' is set to an invalid value\n"),
|
||||||
key);
|
key);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1003,6 +1002,7 @@ meta_prefs_remove_listener (MetaPrefsChangedFunc func,
|
|||||||
/* Initialisation. */
|
/* Initialisation. */
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef HAVE_GCONF
|
||||||
/* @@@ again, use glib's ability to tell you the size of the array */
|
/* @@@ again, use glib's ability to tell you the size of the array */
|
||||||
static gchar *gconf_dirs_we_are_interested_in[] = {
|
static gchar *gconf_dirs_we_are_interested_in[] = {
|
||||||
"/apps/metacity",
|
"/apps/metacity",
|
||||||
@ -1012,6 +1012,7 @@ static gchar *gconf_dirs_we_are_interested_in[] = {
|
|||||||
"/desktop/gnome/interface",
|
"/desktop/gnome/interface",
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_prefs_init (void)
|
meta_prefs_init (void)
|
||||||
@ -1122,17 +1123,13 @@ change_notify (GConfClient *client,
|
|||||||
while (preference_update_handler[i]!=NULL)
|
while (preference_update_handler[i]!=NULL)
|
||||||
{
|
{
|
||||||
if (preference_update_handler[i] (key, value))
|
if (preference_update_handler[i] (key, value))
|
||||||
goto out; /* Get rid of this when we're done with the if */
|
goto out; /* Get rid of this eventually */
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Otherwise, use the enormous if statement. We'll move entries
|
if (g_str_has_prefix (key, KEY_WINDOW_BINDINGS_PREFIX) ||
|
||||||
* out of here as it becomes possible to deal with them in a
|
g_str_has_prefix (key, KEY_SCREEN_BINDINGS_PREFIX))
|
||||||
* more general way.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (g_str_has_prefix (key, KEY_WINDOW_BINDINGS_PREFIX))
|
|
||||||
{
|
{
|
||||||
if (g_str_has_suffix (key, KEY_LIST_BINDINGS_SUFFIX))
|
if (g_str_has_suffix (key, KEY_LIST_BINDINGS_SUFFIX))
|
||||||
{
|
{
|
||||||
@ -1147,8 +1144,8 @@ change_notify (GConfClient *client,
|
|||||||
|
|
||||||
list = value ? gconf_value_get_list (value) : NULL;
|
list = value ? gconf_value_get_list (value) : NULL;
|
||||||
|
|
||||||
if (update_window_list_binding (key, list))
|
if (update_key_list_binding (key, list))
|
||||||
queue_changed (META_PREF_WINDOW_KEYBINDINGS);
|
queue_changed (META_PREF_KEYBINDINGS);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1163,43 +1160,8 @@ change_notify (GConfClient *client,
|
|||||||
|
|
||||||
str = value ? gconf_value_get_string (value) : NULL;
|
str = value ? gconf_value_get_string (value) : NULL;
|
||||||
|
|
||||||
if (update_window_binding (key, str))
|
if (update_key_binding (key, str))
|
||||||
queue_changed (META_PREF_WINDOW_KEYBINDINGS);
|
queue_changed (META_PREF_KEYBINDINGS);
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (g_str_has_prefix (key, KEY_SCREEN_BINDINGS_PREFIX))
|
|
||||||
{
|
|
||||||
if (g_str_has_suffix (key, KEY_LIST_BINDINGS_SUFFIX))
|
|
||||||
{
|
|
||||||
GSList *list;
|
|
||||||
|
|
||||||
if (value && value->type != GCONF_VALUE_LIST)
|
|
||||||
{
|
|
||||||
meta_warning (_("GConf key \"%s\" is set to an invalid type\n"),
|
|
||||||
key);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
list = value ? gconf_value_get_list (value) : NULL;
|
|
||||||
|
|
||||||
if (update_screen_list_binding (key, list))
|
|
||||||
queue_changed (META_PREF_SCREEN_KEYBINDINGS);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
const char *str;
|
|
||||||
|
|
||||||
if (value && value->type != GCONF_VALUE_STRING)
|
|
||||||
{
|
|
||||||
meta_warning (_("GConf key \"%s\" is set to an invalid type\n"),
|
|
||||||
key);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
str = value ? gconf_value_get_string (value) : NULL;
|
|
||||||
|
|
||||||
if (update_screen_binding (key, str))
|
|
||||||
queue_changed (META_PREF_SCREEN_KEYBINDINGS);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (g_str_has_prefix (key, KEY_COMMAND_PREFIX))
|
else if (g_str_has_prefix (key, KEY_COMMAND_PREFIX))
|
||||||
@ -1377,15 +1339,16 @@ titlebar_handler (MetaPreference pref,
|
|||||||
const gchar *string_value,
|
const gchar *string_value,
|
||||||
gboolean *inform_listeners)
|
gboolean *inform_listeners)
|
||||||
{
|
{
|
||||||
PangoFontDescription *new_desc;
|
PangoFontDescription *new_desc = NULL;
|
||||||
|
|
||||||
new_desc = pango_font_description_from_string (string_value);
|
if (string_value)
|
||||||
|
new_desc = pango_font_description_from_string (string_value);
|
||||||
|
|
||||||
if (new_desc == NULL)
|
if (new_desc == NULL)
|
||||||
{
|
{
|
||||||
meta_warning (_("Could not parse font description "
|
meta_warning (_("Could not parse font description "
|
||||||
"\"%s\" from GConf key %s\n"),
|
"\"%s\" from GConf key %s\n"),
|
||||||
string_value,
|
string_value ? string_value : "(null)",
|
||||||
KEY_TITLEBAR_FONT);
|
KEY_TITLEBAR_FONT);
|
||||||
|
|
||||||
*inform_listeners = FALSE;
|
*inform_listeners = FALSE;
|
||||||
@ -1434,7 +1397,7 @@ mouse_button_mods_handler (MetaPreference pref,
|
|||||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||||
"Mouse button modifier has new gconf value \"%s\"\n",
|
"Mouse button modifier has new gconf value \"%s\"\n",
|
||||||
string_value);
|
string_value);
|
||||||
if (meta_ui_parse_modifier (string_value, &mods))
|
if (string_value && meta_ui_parse_modifier (string_value, &mods))
|
||||||
{
|
{
|
||||||
mouse_button_mods = mods;
|
mouse_button_mods = mods;
|
||||||
}
|
}
|
||||||
@ -1529,16 +1492,17 @@ button_layout_handler (MetaPreference pref,
|
|||||||
gboolean *inform_listeners)
|
gboolean *inform_listeners)
|
||||||
{
|
{
|
||||||
MetaButtonLayout new_layout;
|
MetaButtonLayout new_layout;
|
||||||
char **sides;
|
char **sides = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* We need to ignore unknown button functions, for
|
/* We need to ignore unknown button functions, for
|
||||||
* compat with future versions
|
* compat with future versions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sides = g_strsplit (string_value, ":", 2);
|
if (string_value)
|
||||||
|
sides = g_strsplit (string_value, ":", 2);
|
||||||
|
|
||||||
if (sides[0] != NULL)
|
if (sides != NULL && sides[0] != NULL)
|
||||||
{
|
{
|
||||||
char **buttons;
|
char **buttons;
|
||||||
int b;
|
int b;
|
||||||
@ -1598,7 +1562,7 @@ button_layout_handler (MetaPreference pref,
|
|||||||
g_strfreev (buttons);
|
g_strfreev (buttons);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sides[0] != NULL && sides[1] != NULL)
|
if (sides != NULL && sides[0] != NULL && sides[1] != NULL)
|
||||||
{
|
{
|
||||||
char **buttons;
|
char **buttons;
|
||||||
int b;
|
int b;
|
||||||
@ -1770,11 +1734,8 @@ meta_preference_to_string (MetaPreference pref)
|
|||||||
case META_PREF_APPLICATION_BASED:
|
case META_PREF_APPLICATION_BASED:
|
||||||
return "APPLICATION_BASED";
|
return "APPLICATION_BASED";
|
||||||
|
|
||||||
case META_PREF_SCREEN_KEYBINDINGS:
|
case META_PREF_KEYBINDINGS:
|
||||||
return "SCREEN_KEYBINDINGS";
|
return "KEYBINDINGS";
|
||||||
|
|
||||||
case META_PREF_WINDOW_KEYBINDINGS:
|
|
||||||
return "WINDOW_KEYBINDINGS";
|
|
||||||
|
|
||||||
case META_PREF_DISABLE_WORKAROUNDS:
|
case META_PREF_DISABLE_WORKAROUNDS:
|
||||||
return "DISABLE_WORKAROUNDS";
|
return "DISABLE_WORKAROUNDS";
|
||||||
@ -1876,23 +1837,22 @@ meta_prefs_set_num_workspaces (int n_workspaces)
|
|||||||
#endif /* HAVE_GCONF */
|
#endif /* HAVE_GCONF */
|
||||||
}
|
}
|
||||||
|
|
||||||
static MetaKeyPref screen_bindings[] = {
|
#define keybind(name, handler, param, flags, stroke, description) \
|
||||||
#define item(name, suffix, param, has_inverse, short, long, stroke) \
|
{ #name, NULL, !!(flags & BINDING_REVERSES), !!(flags & BINDING_PER_WINDOW) },
|
||||||
{ #name suffix, NULL, has_inverse },
|
static MetaKeyPref key_bindings[] = {
|
||||||
#include "screen-bindings.h"
|
#include "all-keybindings.h"
|
||||||
#undef item
|
|
||||||
{ NULL, NULL, FALSE}
|
|
||||||
};
|
|
||||||
|
|
||||||
static MetaKeyPref window_bindings[] = {
|
|
||||||
#define item(name, suffix, param, short, long, stroke) \
|
|
||||||
{ #name suffix, NULL, FALSE },
|
|
||||||
#include "window-bindings.h"
|
|
||||||
#undef item
|
|
||||||
{ NULL, NULL, FALSE }
|
{ NULL, NULL, FALSE }
|
||||||
};
|
};
|
||||||
|
#undef keybind
|
||||||
|
|
||||||
#ifndef HAVE_GCONF
|
#ifndef HAVE_GCONF
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A type to map names of keybindings (such as "switch_windows")
|
||||||
|
* to the binding strings themselves (such as "<Alt>Tab").
|
||||||
|
* It exists only when GConf is turned off in ./configure and
|
||||||
|
* functions as a sort of ersatz GConf.
|
||||||
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
@ -1900,29 +1860,21 @@ typedef struct
|
|||||||
} MetaSimpleKeyMapping;
|
} MetaSimpleKeyMapping;
|
||||||
|
|
||||||
/* FIXME: This would be neater if the array only contained entries whose
|
/* FIXME: This would be neater if the array only contained entries whose
|
||||||
* default keystroke was non-null. You can do this by defining
|
* default keystroke was non-null. You COULD do this by defining
|
||||||
* ONLY_BOUND_BY_DEFAULT around various blocks at the cost of making
|
* ONLY_BOUND_BY_DEFAULT around various blocks at the cost of making
|
||||||
* the bindings file way more complicated. However, we could stop this being
|
* the bindings file way more complicated. However, we could stop this being
|
||||||
* data and move it into code. Then the compiler would optimise away
|
* data and move it into code. Then the compiler would optimise away
|
||||||
* the problem lines.
|
* the problem lines.
|
||||||
*/
|
*/
|
||||||
static MetaSimpleKeyMapping screen_string_bindings[] = {
|
|
||||||
#define item(name, suffix, param, is_reverse, short, long, keystroke) \
|
|
||||||
{ #name suffix, keystroke },
|
|
||||||
#include "screen-bindings.h"
|
|
||||||
#undef item
|
|
||||||
{ NULL, NULL }
|
|
||||||
};
|
|
||||||
|
|
||||||
static MetaSimpleKeyMapping window_string_bindings[] = {
|
#define keybind(name, handler, param, flags, stroke, description) \
|
||||||
#define ONLY_BOUND_BY_DEFAULT
|
{ #name, stroke },
|
||||||
#define item(name, suffix, param, short, long, keystroke) \
|
|
||||||
{ #name suffix, keystroke },
|
static MetaSimpleKeyMapping key_string_bindings[] = {
|
||||||
#include "window-bindings.h"
|
#include "all-keybindings.h"
|
||||||
#undef item
|
{ NULL, NULL }
|
||||||
#undef ONLY_BOUND_BY_DEFAULT
|
|
||||||
{ NULL, NULL }
|
|
||||||
};
|
};
|
||||||
|
#undef keybind
|
||||||
|
|
||||||
#endif /* NOT HAVE_GCONF */
|
#endif /* NOT HAVE_GCONF */
|
||||||
|
|
||||||
@ -1930,30 +1882,35 @@ static void
|
|||||||
init_bindings (void)
|
init_bindings (void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_GCONF
|
#ifdef HAVE_GCONF
|
||||||
int i;
|
int i = 0;
|
||||||
GError *err;
|
GError *err;
|
||||||
|
|
||||||
i = 0;
|
while (key_bindings[i].name)
|
||||||
while (window_bindings[i].name)
|
|
||||||
{
|
{
|
||||||
GSList *list_val, *tmp;
|
GSList *list_val, *tmp;
|
||||||
char *str_val;
|
char *str_val;
|
||||||
char *key;
|
char *key;
|
||||||
|
|
||||||
key = g_strconcat (KEY_WINDOW_BINDINGS_PREFIX, "/",
|
key = g_strconcat (key_bindings[i].per_window?
|
||||||
window_bindings[i].name, NULL);
|
KEY_WINDOW_BINDINGS_PREFIX:
|
||||||
|
KEY_SCREEN_BINDINGS_PREFIX,
|
||||||
|
"/",
|
||||||
|
key_bindings[i].name, NULL);
|
||||||
|
|
||||||
err = NULL;
|
err = NULL;
|
||||||
str_val = gconf_client_get_string (default_client, key, &err);
|
str_val = gconf_client_get_string (default_client, key, &err);
|
||||||
cleanup_error (&err);
|
cleanup_error (&err);
|
||||||
|
|
||||||
update_binding (&window_bindings[i], str_val);
|
update_binding (&key_bindings[i], str_val);
|
||||||
|
|
||||||
g_free (str_val);
|
g_free (str_val);
|
||||||
g_free (key);
|
g_free (key);
|
||||||
|
|
||||||
key = g_strconcat (KEY_WINDOW_BINDINGS_PREFIX, "/",
|
key = g_strconcat (key_bindings[i].per_window?
|
||||||
window_bindings[i].name,
|
KEY_WINDOW_BINDINGS_PREFIX:
|
||||||
|
KEY_SCREEN_BINDINGS_PREFIX,
|
||||||
|
"/",
|
||||||
|
key_bindings[i].name,
|
||||||
KEY_LIST_BINDINGS_SUFFIX, NULL);
|
KEY_LIST_BINDINGS_SUFFIX, NULL);
|
||||||
|
|
||||||
err = NULL;
|
err = NULL;
|
||||||
@ -1961,49 +1918,7 @@ init_bindings (void)
|
|||||||
list_val = gconf_client_get_list (default_client, key, GCONF_VALUE_STRING, &err);
|
list_val = gconf_client_get_list (default_client, key, GCONF_VALUE_STRING, &err);
|
||||||
cleanup_error (&err);
|
cleanup_error (&err);
|
||||||
|
|
||||||
update_list_binding (&window_bindings[i], list_val, META_LIST_OF_STRINGS);
|
update_list_binding (&key_bindings[i], list_val, META_LIST_OF_STRINGS);
|
||||||
|
|
||||||
tmp = list_val;
|
|
||||||
while (tmp)
|
|
||||||
{
|
|
||||||
g_free (tmp->data);
|
|
||||||
tmp = tmp->next;
|
|
||||||
}
|
|
||||||
g_slist_free (list_val);
|
|
||||||
g_free (key);
|
|
||||||
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0;
|
|
||||||
while (screen_bindings[i].name)
|
|
||||||
{
|
|
||||||
GSList *list_val, *tmp;
|
|
||||||
char *str_val;
|
|
||||||
char *key;
|
|
||||||
|
|
||||||
key = g_strconcat (KEY_SCREEN_BINDINGS_PREFIX, "/",
|
|
||||||
screen_bindings[i].name, NULL);
|
|
||||||
|
|
||||||
err = NULL;
|
|
||||||
str_val = gconf_client_get_string (default_client, key, &err);
|
|
||||||
cleanup_error (&err);
|
|
||||||
|
|
||||||
update_binding (&screen_bindings[i], str_val);
|
|
||||||
|
|
||||||
g_free (str_val);
|
|
||||||
g_free (key);
|
|
||||||
|
|
||||||
key = g_strconcat (KEY_SCREEN_BINDINGS_PREFIX, "/",
|
|
||||||
screen_bindings[i].name,
|
|
||||||
KEY_LIST_BINDINGS_SUFFIX, NULL);
|
|
||||||
|
|
||||||
err = NULL;
|
|
||||||
|
|
||||||
list_val = gconf_client_get_list (default_client, key, GCONF_VALUE_STRING, &err);
|
|
||||||
cleanup_error (&err);
|
|
||||||
|
|
||||||
update_list_binding (&screen_bindings[i], list_val, META_LIST_OF_STRINGS);
|
|
||||||
|
|
||||||
tmp = list_val;
|
tmp = list_val;
|
||||||
while (tmp)
|
while (tmp)
|
||||||
@ -2019,42 +1934,20 @@ init_bindings (void)
|
|||||||
#else /* HAVE_GCONF */
|
#else /* HAVE_GCONF */
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int which = 0;
|
int which = 0;
|
||||||
while (window_string_bindings[i].name)
|
while (key_string_bindings[i].name)
|
||||||
{
|
{
|
||||||
if (window_string_bindings[i].keybinding == NULL)
|
if (key_string_bindings[i].keybinding == NULL) {
|
||||||
|
++i;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* Find which window_bindings entry this window_string_bindings entry
|
while (strcmp(key_bindings[which].name,
|
||||||
* corresponds to.
|
key_string_bindings[i].name) != 0)
|
||||||
*/
|
|
||||||
while (strcmp(window_bindings[which].name,
|
|
||||||
window_string_bindings[i].name) != 0)
|
|
||||||
which++;
|
which++;
|
||||||
|
|
||||||
/* Set the binding */
|
/* Set the binding */
|
||||||
update_binding (&window_bindings[which],
|
update_binding (&key_bindings[which],
|
||||||
window_string_bindings[i].keybinding);
|
key_string_bindings[i].keybinding);
|
||||||
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0;
|
|
||||||
which = 0;
|
|
||||||
while (screen_string_bindings[i].name)
|
|
||||||
{
|
|
||||||
if (screen_string_bindings[i].keybinding == NULL)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/* Find which window_bindings entry this window_string_bindings entry
|
|
||||||
* corresponds to.
|
|
||||||
*/
|
|
||||||
while (strcmp(screen_bindings[which].name,
|
|
||||||
screen_string_bindings[i].name) != 0)
|
|
||||||
which++;
|
|
||||||
|
|
||||||
/* Set the binding */
|
|
||||||
update_binding (&screen_bindings[which],
|
|
||||||
screen_string_bindings[i].keybinding);
|
|
||||||
|
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
@ -2174,8 +2067,8 @@ update_binding (MetaKeyPref *binding,
|
|||||||
|
|
||||||
#ifdef HAVE_GCONF
|
#ifdef HAVE_GCONF
|
||||||
/* Bug 329676: Bindings which can be shifted must not have no modifiers,
|
/* Bug 329676: Bindings which can be shifted must not have no modifiers,
|
||||||
* nor only SHIFT as a modifier.
|
* nor only SHIFT as a modifier.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (binding->add_shift &&
|
if (binding->add_shift &&
|
||||||
0 != keysym &&
|
0 != keysym &&
|
||||||
@ -2209,6 +2102,11 @@ update_binding (MetaKeyPref *binding,
|
|||||||
binding->name,
|
binding->name,
|
||||||
old_setting);
|
old_setting);
|
||||||
|
|
||||||
|
/* FIXME: add_shift is currently screen_bindings only, but
|
||||||
|
* there's no really good reason it should always be.
|
||||||
|
* So we shouldn't blindly add KEY_SCREEN_BINDINGS_PREFIX
|
||||||
|
* onto here.
|
||||||
|
*/
|
||||||
key = g_strconcat (KEY_SCREEN_BINDINGS_PREFIX, "/",
|
key = g_strconcat (KEY_SCREEN_BINDINGS_PREFIX, "/",
|
||||||
binding->name, NULL);
|
binding->name, NULL);
|
||||||
|
|
||||||
@ -2412,17 +2310,10 @@ find_and_update_binding (MetaKeyPref *bindings,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
update_window_binding (const char *name,
|
update_key_binding (const char *name,
|
||||||
const char *value)
|
const char *value)
|
||||||
{
|
{
|
||||||
return find_and_update_binding (window_bindings, name, value);
|
return find_and_update_binding (key_bindings, name, value);
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
update_screen_binding (const char *name,
|
|
||||||
const char *value)
|
|
||||||
{
|
|
||||||
return find_and_update_binding (screen_bindings, name, value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -2455,17 +2346,10 @@ find_and_update_list_binding (MetaKeyPref *bindings,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
update_window_list_binding (const char *name,
|
update_key_list_binding (const char *name,
|
||||||
GSList *value)
|
GSList *value)
|
||||||
{
|
{
|
||||||
return find_and_update_list_binding (window_bindings, name, value);
|
return find_and_update_list_binding (key_bindings, name, value);
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
update_screen_list_binding (const char *name,
|
|
||||||
GSList *value)
|
|
||||||
{
|
|
||||||
return find_and_update_list_binding (screen_bindings, name, value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -2768,20 +2652,12 @@ meta_prefs_get_visual_bell_type (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_prefs_get_screen_bindings (const MetaKeyPref **bindings,
|
meta_prefs_get_key_bindings (const MetaKeyPref **bindings,
|
||||||
int *n_bindings)
|
int *n_bindings)
|
||||||
{
|
{
|
||||||
|
|
||||||
*bindings = screen_bindings;
|
*bindings = key_bindings;
|
||||||
*n_bindings = (int) G_N_ELEMENTS (screen_bindings) - 1;
|
*n_bindings = (int) G_N_ELEMENTS (key_bindings) - 1;
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
meta_prefs_get_window_bindings (const MetaKeyPref **bindings,
|
|
||||||
int *n_bindings)
|
|
||||||
{
|
|
||||||
*bindings = window_bindings;
|
|
||||||
*n_bindings = (int) G_N_ELEMENTS (window_bindings) - 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MetaActionTitlebar
|
MetaActionTitlebar
|
||||||
@ -2837,10 +2713,10 @@ meta_prefs_get_keybinding_action (const char *name)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
i = G_N_ELEMENTS (screen_bindings) - 2; /* -2 for dummy entry at end */
|
i = G_N_ELEMENTS (key_bindings) - 2; /* -2 for dummy entry at end */
|
||||||
while (i >= 0)
|
while (i >= 0)
|
||||||
{
|
{
|
||||||
if (strcmp (screen_bindings[i].name, name) == 0)
|
if (strcmp (key_bindings[i].name, name) == 0)
|
||||||
return (MetaKeyBindingAction) i;
|
return (MetaKeyBindingAction) i;
|
||||||
|
|
||||||
--i;
|
--i;
|
||||||
@ -2860,12 +2736,13 @@ meta_prefs_get_window_binding (const char *name,
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
i = G_N_ELEMENTS (window_bindings) - 2; /* -2 for dummy entry at end */
|
i = G_N_ELEMENTS (key_bindings) - 2; /* -2 for dummy entry at end */
|
||||||
while (i >= 0)
|
while (i >= 0)
|
||||||
{
|
{
|
||||||
if (strcmp (window_bindings[i].name, name) == 0)
|
if (key_bindings[i].per_window &&
|
||||||
|
strcmp (key_bindings[i].name, name) == 0)
|
||||||
{
|
{
|
||||||
GSList *s = window_bindings[i].bindings;
|
GSList *s = key_bindings[i].bindings;
|
||||||
|
|
||||||
while (s)
|
while (s)
|
||||||
{
|
{
|
||||||
@ -2977,7 +2854,6 @@ meta_prefs_set_clutter_plugins (GSList *list)
|
|||||||
void
|
void
|
||||||
meta_prefs_override_clutter_plugins (GSList *list)
|
meta_prefs_override_clutter_plugins (GSList *list)
|
||||||
{
|
{
|
||||||
GError *err = NULL;
|
|
||||||
GSList *l;
|
GSList *l;
|
||||||
|
|
||||||
clutter_plugins_overridden = TRUE;
|
clutter_plugins_overridden = TRUE;
|
||||||
|
@ -21,139 +21,174 @@
|
|||||||
|
|
||||||
/** \file Schema bindings generator.
|
/** \file Schema bindings generator.
|
||||||
*
|
*
|
||||||
* This program simply takes the items given in the binding lists in
|
* This program simply takes the items given in the binding list in
|
||||||
* window-bindings.h and scheme-bindings.h and turns them into a portion of
|
* all-keybindings.h and turns them into a portion of
|
||||||
* the GConf .schemas file.
|
* the GConf .schemas file.
|
||||||
*
|
*
|
||||||
* FIXME: also need to make 50-metacity-desktop-key.xml
|
* FIXME: also need to make 50-metacity-desktop-key.xml
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#define _(x) x
|
#define _(x) x
|
||||||
|
|
||||||
char *liberal, *could_go_backwards, *could_go_forwards;
|
static void single_stanza (gboolean is_window, const char *name,
|
||||||
|
const char *default_value,
|
||||||
|
gboolean can_reverse,
|
||||||
|
const char *description);
|
||||||
|
|
||||||
const char* window_string = \
|
char *about_keybindings, *about_reversible_keybindings;
|
||||||
" <schema>\n" \
|
|
||||||
" <key>/schemas/apps/metacity/%s_keybindings/%s%s</key>\n" \
|
|
||||||
" <applyto>/apps/metacity/%s_keybindings/%s%s</applyto>\n" \
|
|
||||||
" <owner>metacity</owner>\n" \
|
|
||||||
" <type>string</type>\n" \
|
|
||||||
" <default>%s</default>\n" \
|
|
||||||
" <locale name=\"C\">\n" \
|
|
||||||
" <short>%s</short>\n" \
|
|
||||||
" <long>\n" \
|
|
||||||
" %s %s\n" \
|
|
||||||
" </long>\n" \
|
|
||||||
" </locale>\n" \
|
|
||||||
" </schema>\n\n\n";
|
|
||||||
|
|
||||||
void
|
char *source_filename, *target_filename;
|
||||||
single_stanza (gboolean is_window, char *name, char *default_value,
|
FILE *source_file, *target_file;
|
||||||
gboolean can_reverse, gboolean going_backwards,
|
|
||||||
char *short_description, char *long_description)
|
static void
|
||||||
|
single_stanza (gboolean is_window, const char *name,
|
||||||
|
const char *default_value,
|
||||||
|
gboolean can_reverse,
|
||||||
|
const char *description)
|
||||||
{
|
{
|
||||||
char *keybinding_type = is_window? "window": "global";
|
char *keybinding_type = is_window? "window": "global";
|
||||||
char *escaped_default_value;
|
char *escaped_default_value, *escaped_description;
|
||||||
|
|
||||||
if (short_description == NULL || long_description == NULL)
|
if (description==NULL)
|
||||||
/* it must be undocumented, so it can't be in this table */
|
return; /* it must be undocumented, so it can't go in this table */
|
||||||
return;
|
|
||||||
|
|
||||||
/* Escape the text. The old values point at constants (literals, actually)
|
escaped_description = g_markup_escape_text (description, -1);
|
||||||
* so it doesn't matter that we lose the reference.
|
escaped_default_value = default_value==NULL? "disabled":
|
||||||
*/
|
g_markup_escape_text (default_value, -1);
|
||||||
short_description = g_markup_escape_text (short_description, -1);
|
|
||||||
long_description = g_markup_escape_text (long_description, -1);
|
|
||||||
|
|
||||||
escaped_default_value = g_markup_escape_text (
|
fprintf (target_file, " <schema>\n");
|
||||||
default_value? default_value: "disabled",
|
fprintf (target_file, " <key>/schemas/apps/metacity/%s_keybindings/%s</key>\n",
|
||||||
-1);
|
|
||||||
|
|
||||||
printf (" <schema>\n");
|
|
||||||
printf (" <key>/schemas/apps/metacity/%s_keybindings/%s</key>\n",
|
|
||||||
keybinding_type, name);
|
keybinding_type, name);
|
||||||
printf (" <applyto>/apps/metacity/%s_keybindings/%s</applyto>\n",
|
fprintf (target_file, " <applyto>/apps/metacity/%s_keybindings/%s</applyto>\n",
|
||||||
keybinding_type, name);
|
keybinding_type, name);
|
||||||
printf (" <owner>metacity</owner>\n");
|
fprintf (target_file, " <owner>metacity</owner>\n");
|
||||||
printf (" <type>string</type>\n");
|
fprintf (target_file, " <type>string</type>\n");
|
||||||
printf (" <default>%s</default>\n", escaped_default_value);
|
fprintf (target_file, " <default>%s</default>\n", escaped_default_value);
|
||||||
printf (" <locale name=\"C\">\n");
|
|
||||||
printf (" <short>%s</short>\n", short_description);
|
|
||||||
printf (" <long>\n");
|
|
||||||
printf (" %s\n", long_description);
|
|
||||||
|
|
||||||
if (can_reverse)
|
fprintf (target_file, " <locale name=\"C\">\n");
|
||||||
{
|
fprintf (target_file, " <short>%s</short>\n", description);
|
||||||
/* I don't think this is very useful, tbh: */
|
fprintf (target_file, " <long>%s</long>\n",
|
||||||
if (default_value != NULL)
|
can_reverse? about_reversible_keybindings:
|
||||||
{
|
about_keybindings);
|
||||||
printf (" (Traditionally %s)\n", escaped_default_value);
|
fprintf (target_file, " </locale>\n");
|
||||||
}
|
fprintf (target_file, " </schema>\n\n");
|
||||||
|
|
||||||
if (going_backwards)
|
g_free (escaped_description);
|
||||||
printf (could_go_forwards);
|
|
||||||
else
|
|
||||||
printf (could_go_backwards);
|
|
||||||
}
|
|
||||||
|
|
||||||
printf (" </long>\n");
|
if (default_value!=NULL)
|
||||||
printf (" </locale>\n");
|
g_free (escaped_default_value);
|
||||||
printf (" </schema>\n\n\n");
|
|
||||||
|
|
||||||
g_free (escaped_default_value);
|
|
||||||
g_free (short_description);
|
|
||||||
g_free (long_description);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void produce_bindings ();
|
||||||
|
|
||||||
|
static void
|
||||||
produce_bindings ()
|
produce_bindings ()
|
||||||
{
|
{
|
||||||
#define item(name, suffix, param, short, long, keystroke) \
|
/* 10240 is ridiculous overkill; we're writing the input file and
|
||||||
single_stanza (TRUE, #name suffix, \
|
* the lines are always 80 chars or less.
|
||||||
keystroke, \
|
*/
|
||||||
FALSE, FALSE, \
|
char buffer[10240];
|
||||||
short, long);
|
|
||||||
#include "window-bindings.h"
|
|
||||||
#undef item
|
|
||||||
|
|
||||||
#define item(name, suffix, param, flags, short, long, keystroke) \
|
source_file = fopen(source_filename, "r");
|
||||||
single_stanza (FALSE, #name suffix, \
|
|
||||||
keystroke, \
|
if (!source_file)
|
||||||
|
{
|
||||||
|
g_error ("Cannot compile without %s: %s\n",
|
||||||
|
source_filename, strerror (errno));
|
||||||
|
}
|
||||||
|
|
||||||
|
target_file = fopen(target_filename, "w");
|
||||||
|
|
||||||
|
if (!target_file)
|
||||||
|
{
|
||||||
|
g_error ("Cannot create %s: %s\n",
|
||||||
|
target_filename, strerror (errno));
|
||||||
|
}
|
||||||
|
|
||||||
|
while (fgets (buffer, sizeof (buffer), source_file))
|
||||||
|
{
|
||||||
|
if (strstr (buffer, "<!-- GENERATED -->"))
|
||||||
|
break;
|
||||||
|
|
||||||
|
fprintf (target_file, "%s", buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!feof (source_file))
|
||||||
|
{
|
||||||
|
#define keybind(name, handler, param, flags, stroke, description) \
|
||||||
|
single_stanza ( \
|
||||||
|
flags & BINDING_PER_WINDOW, \
|
||||||
|
#name, \
|
||||||
|
stroke, \
|
||||||
flags & BINDING_REVERSES, \
|
flags & BINDING_REVERSES, \
|
||||||
flags & BINDING_IS_REVERSED, \
|
description);
|
||||||
short, long);
|
#include "all-keybindings.h"
|
||||||
#include "screen-bindings.h"
|
#undef keybind
|
||||||
#undef item
|
}
|
||||||
|
|
||||||
|
while (fgets (buffer, sizeof (buffer), source_file))
|
||||||
|
fprintf (target_file, "%s", buffer);
|
||||||
|
|
||||||
|
if (fclose (source_file)!=0)
|
||||||
|
{
|
||||||
|
g_error ("Cannot close %s: %s\n",
|
||||||
|
source_filename, strerror (errno));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fclose (target_file)!=0)
|
||||||
|
{
|
||||||
|
g_error ("Cannot close %s: %s\n",
|
||||||
|
target_filename, strerror (errno));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main ()
|
main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
/* XXX: TODO: find out what/how gdk i18ns the keycaps as, and add a
|
if (argc!=3)
|
||||||
* translator comment
|
{
|
||||||
|
g_error ("Syntax: %s <source.in.in> <target.in>\n", argv[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
source_filename = argv[1];
|
||||||
|
target_filename = argv[2];
|
||||||
|
|
||||||
|
/* Translators: Please don't translate "Control", "Shift", etc, since these
|
||||||
|
* are hardcoded (in gtk/gtkaccelgroup.c; it's not metacity's fault).
|
||||||
|
* "disabled" must also stay as it is.
|
||||||
*/
|
*/
|
||||||
liberal = g_markup_escape_text(_("The parser is fairly liberal and allows "\
|
about_keybindings = g_markup_escape_text(_( \
|
||||||
|
"The format looks like \"<Control>a\" or <Shift><Alt>F1\".\n\n"\
|
||||||
|
"The parser is fairly liberal and allows "\
|
||||||
"lower or upper case, and also abbreviations such as \"<Ctl>\" and " \
|
"lower or upper case, and also abbreviations such as \"<Ctl>\" and " \
|
||||||
"\"<Ctrl>\". If you set the option to the special string " \
|
"\"<Ctrl>\". If you set the option to the special string " \
|
||||||
"\"disabled\", then there will be no keybinding for this action."), -1);
|
"\"disabled\", then there will be no keybinding for this action."),
|
||||||
|
-1);
|
||||||
|
|
||||||
/* These were more dissimilar at some point but have been regularised
|
about_reversible_keybindings = g_markup_escape_text(_( \
|
||||||
* for the translators' benefit.
|
"The format looks like \"<Control>a\" or <Shift><Alt>F1\".\n\n"\
|
||||||
*/
|
"The parser is fairly liberal and allows "\
|
||||||
could_go_backwards = g_markup_escape_text (_("Holding the \"shift\" key "
|
"lower or upper case, and also abbreviations such as \"<Ctl>\" and " \
|
||||||
"while using this binding reverses the direction of movement."), -1);
|
"\"<Ctrl>\". If you set the option to the special string " \
|
||||||
|
"\"disabled\", then there will be no keybinding for this action.\n\n"\
|
||||||
could_go_forwards = g_markup_escape_text (_("Holding the \"shift\" key "
|
"This keybinding may be reversed by holding down the \"shift\" key; "
|
||||||
"while using this binding makes the direction go forward again."), -1);
|
"therefore, \"shift\" cannot be one of the keys it uses."),
|
||||||
|
-1);
|
||||||
|
|
||||||
produce_bindings ();
|
produce_bindings ();
|
||||||
|
|
||||||
g_free (could_go_forwards);
|
g_free (about_keybindings);
|
||||||
g_free (could_go_backwards);
|
g_free (about_reversible_keybindings);
|
||||||
g_free (liberal);
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eof schema-bindings.c */
|
/* eof schema-bindings.c */
|
||||||
|
@ -1,307 +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 "item" 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.
|
|
||||||
*
|
|
||||||
* (This may merge with window-bindings.h at some point, but traditionally
|
|
||||||
* they have been separate concerns. Meanwhile, it is important that actions
|
|
||||||
* don't have names which clash between the two.)
|
|
||||||
*
|
|
||||||
* Currently, the GConf schemas in src/metacity.schemas also need to be
|
|
||||||
* updated separately. There is a program called schema-bindings.c in this
|
|
||||||
* directory which will fix that, but it needs integrating into the build
|
|
||||||
* process.
|
|
||||||
*
|
|
||||||
* The arguments to item() are:
|
|
||||||
* 1) the name of the binding; a bareword identifier
|
|
||||||
* (it's fine if it happens to clash with a C reserved word)
|
|
||||||
* 2) a string to add to the binding name to make the handler name
|
|
||||||
* (usually the empty string)
|
|
||||||
* 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
|
|
||||||
* (not used in this file)
|
|
||||||
* 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)
|
|
||||||
*
|
|
||||||
* 5) a short description. Mostly, you won't use this.
|
|
||||||
* It must be marked translatable (i.e. inside "_(...)").
|
|
||||||
* 6) like short, except long. Don't include all the stuff about
|
|
||||||
* the parser being fairly liberal.
|
|
||||||
* 7) a string representing the default binding.
|
|
||||||
* If this is NULL, the action is unbound by default.
|
|
||||||
*
|
|
||||||
* Don't try to do XML entity escaping anywhere in the strings.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef item
|
|
||||||
#error "item () 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 0x06 /* REVERSES is implied */
|
|
||||||
|
|
||||||
/* FIXME: There is somewhere better for these; remove them */
|
|
||||||
#define PANEL_MAIN_MENU -1
|
|
||||||
#define PANEL_RUN_DIALOG -2
|
|
||||||
|
|
||||||
#endif /* _BINDINGS_DEFINED_CONSTANTS */
|
|
||||||
|
|
||||||
/***********************************/
|
|
||||||
|
|
||||||
item (switch_to_workspace, "_1", 0, 0,
|
|
||||||
_("Switch to workspace 1"),
|
|
||||||
_("The keybinding that switches to workspace 1."),
|
|
||||||
NULL)
|
|
||||||
item (switch_to_workspace, "_2", 1, 0,
|
|
||||||
_("Switch to workspace 2"),
|
|
||||||
_("The keybinding that switches to workspace 2."),
|
|
||||||
NULL)
|
|
||||||
item (switch_to_workspace, "_3", 2, 0,
|
|
||||||
_("Switch to workspace 3"),
|
|
||||||
_("The keybinding that switches to workspace 3."),
|
|
||||||
NULL)
|
|
||||||
item (switch_to_workspace, "_4", 3, 0,
|
|
||||||
_("Switch to workspace 4"),
|
|
||||||
_("The keybinding that switches to workspace 4."),
|
|
||||||
NULL)
|
|
||||||
item (switch_to_workspace, "_5", 4, 0,
|
|
||||||
_("Switch to workspace 5"),
|
|
||||||
_("The keybinding that switches to workspace 5."),
|
|
||||||
NULL)
|
|
||||||
item (switch_to_workspace, "_6", 5, 0,
|
|
||||||
_("Switch to workspace 6"),
|
|
||||||
_("The keybinding that switches to workspace 6."),
|
|
||||||
NULL)
|
|
||||||
item (switch_to_workspace, "_7", 6, 0,
|
|
||||||
_("Switch to workspace 7"),
|
|
||||||
_("The keybinding that switches to workspace 7."),
|
|
||||||
NULL)
|
|
||||||
item (switch_to_workspace, "_8", 7, 0,
|
|
||||||
_("Switch to workspace 8"),
|
|
||||||
_("The keybinding that switches to workspace 8."),
|
|
||||||
NULL)
|
|
||||||
item (switch_to_workspace, "_9", 8, 0,
|
|
||||||
_("Switch to workspace 9"),
|
|
||||||
_("The keybinding that switches to workspace 9."),
|
|
||||||
NULL)
|
|
||||||
item (switch_to_workspace, "_10", 9, 0,
|
|
||||||
_("Switch to workspace 10"),
|
|
||||||
_("The keybinding that switches to workspace 10."),
|
|
||||||
NULL)
|
|
||||||
item (switch_to_workspace, "_11", 10, 0,
|
|
||||||
_("Switch to workspace 11"),
|
|
||||||
_("The keybinding that switches to workspace 11."),
|
|
||||||
NULL)
|
|
||||||
item (switch_to_workspace, "_12", 11, 0,
|
|
||||||
_("Switch to workspace 12"),
|
|
||||||
_("The keybinding that switches to workspace 12."),
|
|
||||||
NULL)
|
|
||||||
|
|
||||||
/* 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 item() throws them away, you don't need to include
|
|
||||||
* workspace.h, of course.
|
|
||||||
*/
|
|
||||||
|
|
||||||
item (switch_to_workspace, "_left", META_MOTION_LEFT, 0,
|
|
||||||
_("Switch to workspace on the left"),
|
|
||||||
_("The keybinding that switches to the workspace on the left "
|
|
||||||
"of the current workspace."),
|
|
||||||
"<Control><Alt>Left")
|
|
||||||
|
|
||||||
item (switch_to_workspace, "_right", META_MOTION_RIGHT, 0,
|
|
||||||
_("Switch to workspace on the right"),
|
|
||||||
_("The keybinding that switches to the workspace on the right "
|
|
||||||
"of the current workspace."),
|
|
||||||
"<Control><Alt>Right")
|
|
||||||
|
|
||||||
item (switch_to_workspace, "_up", META_MOTION_UP, 0,
|
|
||||||
_("Switch to workspace above this one"),
|
|
||||||
_("The keybinding that switches to the workspace above "
|
|
||||||
"the current workspace."),
|
|
||||||
"<Control><Alt>Up")
|
|
||||||
|
|
||||||
item (switch_to_workspace, "_down", META_MOTION_DOWN, 0,
|
|
||||||
_("Switch to workspace below this one"),
|
|
||||||
_("The keybinding that switches to the workspace below "
|
|
||||||
"the current workspace."),
|
|
||||||
"<Control><Alt>Down")
|
|
||||||
|
|
||||||
/***********************************/
|
|
||||||
|
|
||||||
/* The ones which have inverses. These can't be bound to any keystroke
|
|
||||||
* containing Shift because Shift will invert their "backwards" state.
|
|
||||||
*
|
|
||||||
* TODO: "NORMAL" and "DOCKS" should be renamed to the same name as their
|
|
||||||
* action, for obviousness.
|
|
||||||
*/
|
|
||||||
|
|
||||||
item (switch, "_group", META_TAB_LIST_GROUP, BINDING_REVERSES,
|
|
||||||
_("Move between windows of an application with popup"),
|
|
||||||
_("The keybinding used to move focus between windows of an"
|
|
||||||
"application, using a popup window."), NULL)
|
|
||||||
item (switch, "_group_backwards", META_TAB_LIST_GROUP, BINDING_IS_REVERSED,
|
|
||||||
_("Move backwards between windows of an application with popup"),
|
|
||||||
_("The keybinding used to move focus backwards between windows"
|
|
||||||
"of an application, using a popup window."), NULL)
|
|
||||||
item (switch, "_windows", META_TAB_LIST_NORMAL, BINDING_REVERSES,
|
|
||||||
_("Move between windows with popup"),
|
|
||||||
_("The keybinding used to move focus between windows, "
|
|
||||||
"using a popup window."), "<Alt>Tab")
|
|
||||||
item (switch, "_windows_backwards",META_TAB_LIST_NORMAL, BINDING_IS_REVERSED,
|
|
||||||
_("Move focus backwards between windows using popup display"),
|
|
||||||
_("The keybinding used to move focus backwards between windows, "
|
|
||||||
"using a popup window."), NULL)
|
|
||||||
item (switch, "_panels", META_TAB_LIST_DOCKS, BINDING_REVERSES,
|
|
||||||
_("Move between panels and the desktop with popup"),
|
|
||||||
_("The keybinding used to move focus between panels and the desktop, "
|
|
||||||
"using a popup window."), "<Control><Alt>Tab")
|
|
||||||
item (switch, "_panels_backwards", META_TAB_LIST_DOCKS, BINDING_IS_REVERSED,
|
|
||||||
_("Move backwards between panels and the desktop with popup"),
|
|
||||||
_("The keybinding used to move focus backwards between panels "
|
|
||||||
"and the desktop, using a popup window."), NULL)
|
|
||||||
item (cycle, "_group", META_TAB_LIST_GROUP, BINDING_REVERSES,
|
|
||||||
_("Move between windows of an application immediately"),
|
|
||||||
_("The keybinding used to move focus between windows of an "
|
|
||||||
"application without a popup window."), "<Alt>F6")
|
|
||||||
item (cycle, "_group_backwards", META_TAB_LIST_GROUP, BINDING_IS_REVERSED,
|
|
||||||
_("Move backwards between windows of an application immediately"),
|
|
||||||
_("The keybinding used to move focus backwards between windows "
|
|
||||||
"of an application without a popup window."), NULL)
|
|
||||||
item (cycle, "_windows", META_TAB_LIST_NORMAL, BINDING_REVERSES,
|
|
||||||
_("Move between windows immediately"),
|
|
||||||
_("The keybinding used to move focus between windows without "
|
|
||||||
"a popup window."), "<Alt>Escape")
|
|
||||||
item (cycle, "_windows_backwards",META_TAB_LIST_NORMAL, BINDING_IS_REVERSED,
|
|
||||||
_("Move backwards between windows immediately"),
|
|
||||||
_("The keybinding used to move focus backwards between windows "
|
|
||||||
"without a popup window."), NULL)
|
|
||||||
item (cycle, "_panels", META_TAB_LIST_DOCKS, BINDING_REVERSES,
|
|
||||||
_("Move between panels and the desktop immediately"),
|
|
||||||
_("The keybinding used to move focus between panels and "
|
|
||||||
"the desktop, without a popup window."), "<Control><Alt>Escape")
|
|
||||||
item (cycle, "_panels_backwards", META_TAB_LIST_DOCKS, BINDING_IS_REVERSED,
|
|
||||||
_("Move backward between panels and the desktop immediately"),
|
|
||||||
_("The keybinding used to move focus backwards between panels and "
|
|
||||||
"the desktop, without a popup window."), NULL)
|
|
||||||
|
|
||||||
/***********************************/
|
|
||||||
|
|
||||||
item (show_desktop, "", 0, 0,
|
|
||||||
_("Hide all windows and focus desktop"),
|
|
||||||
_("The keybinding used to hide all normal windows and set the "
|
|
||||||
"focus to the desktop background."),
|
|
||||||
"<Control><Alt>d")
|
|
||||||
item (panel, "_main_menu", META_KEYBINDING_ACTION_PANEL_MAIN_MENU, 0,
|
|
||||||
_("Show the panel menu"),
|
|
||||||
_("The keybinding which shows the panel's main menu."),
|
|
||||||
"<Alt>F1")
|
|
||||||
item (panel, "_run_dialog", META_KEYBINDING_ACTION_PANEL_RUN_DIALOG, 0,
|
|
||||||
_("Show the panel run application dialog"),
|
|
||||||
_("The keybinding which display's the panel's \"Run Application\" "
|
|
||||||
"dialog box."),
|
|
||||||
"<Alt>F2")
|
|
||||||
|
|
||||||
/* Yes, the param is offset by one. Historical reasons. (Maybe worth fixing
|
|
||||||
* at some point.) The short and long are NULL here because the stanza is
|
|
||||||
* irregularly shaped in metacity.schemas.in. This will probably be fixed
|
|
||||||
* as well.
|
|
||||||
*/
|
|
||||||
item (run_command, "_1", 0, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_2", 1, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_3", 2, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_4", 3, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_5", 4, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_6", 5, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_7", 6, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_8", 7, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_9", 8, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_10", 9, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_11", 10, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_12", 11, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_13", 12, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_14", 13, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_15", 14, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_16", 15, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_17", 16, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_18", 17, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_19", 18, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_20", 19, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_21", 20, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_22", 21, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_23", 22, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_24", 23, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_25", 24, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_26", 25, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_27", 26, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_28", 27, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_29", 28, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_30", 29, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_31", 30, 0, NULL, NULL, NULL)
|
|
||||||
item (run_command, "_32", 31, 0, NULL, NULL, NULL)
|
|
||||||
|
|
||||||
item (run_command, "_screenshot", 32, 0,
|
|
||||||
_("Take a screenshot"),
|
|
||||||
_("The keybinding which invokes the panel's screenshot utility."),
|
|
||||||
"Print")
|
|
||||||
item (run_command, "_window_screenshot", 33, 0,
|
|
||||||
_("Take a screenshot of a window"),
|
|
||||||
_("The keybinding which invokes the panel's screenshot utility "
|
|
||||||
"to take a screenshot of a window."),
|
|
||||||
"<Alt>Print")
|
|
||||||
|
|
||||||
item (run_terminal, "", 0, 0,
|
|
||||||
_("Run a terminal"),
|
|
||||||
_("The keybinding which invokes a terminal."),
|
|
||||||
NULL)
|
|
||||||
|
|
||||||
/* No descriptions because this is undocumented */
|
|
||||||
item (set_spew_mark, "", 0, 0, NULL, NULL, NULL)
|
|
||||||
|
|
||||||
/* eof screen-bindings.h */
|
|
||||||
|
|
@ -69,6 +69,8 @@ typedef enum
|
|||||||
|
|
||||||
struct _MetaScreen
|
struct _MetaScreen
|
||||||
{
|
{
|
||||||
|
GObject parent_instance;
|
||||||
|
|
||||||
MetaDisplay *display;
|
MetaDisplay *display;
|
||||||
int number;
|
int number;
|
||||||
char *screen_name;
|
char *screen_name;
|
||||||
@ -139,6 +141,11 @@ struct _MetaScreen
|
|||||||
Window guard_window;
|
Window guard_window;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct _MetaScreenClass
|
||||||
|
{
|
||||||
|
GObjectClass parent_class;
|
||||||
|
};
|
||||||
|
|
||||||
MetaScreen* meta_screen_new (MetaDisplay *display,
|
MetaScreen* meta_screen_new (MetaDisplay *display,
|
||||||
int number,
|
int number,
|
||||||
guint32 timestamp);
|
guint32 timestamp);
|
||||||
|
@ -69,6 +69,82 @@ static void meta_screen_sn_event (SnMonitorEvent *event,
|
|||||||
void *user_data);
|
void *user_data);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
PROP_N_WORKSPACES = 1
|
||||||
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (MetaScreen, meta_screen, G_TYPE_OBJECT);
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_screen_set_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
const GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
MetaScreen *screen = META_SCREEN (object);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
switch (prop_id)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_screen_get_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
MetaScreen *screen = META_SCREEN (object);
|
||||||
|
|
||||||
|
switch (prop_id)
|
||||||
|
{
|
||||||
|
case PROP_N_WORKSPACES:
|
||||||
|
g_value_set_int (value, meta_screen_get_n_workspaces (screen));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_screen_finalize (GObject *object)
|
||||||
|
{
|
||||||
|
/* Actual freeing done in meta_screen_free() for now */
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_screen_class_init (MetaScreenClass *klass)
|
||||||
|
{
|
||||||
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
GParamSpec *pspec;
|
||||||
|
|
||||||
|
object_class->get_property = meta_screen_get_property;
|
||||||
|
object_class->set_property = meta_screen_set_property;
|
||||||
|
object_class->finalize = meta_screen_finalize;
|
||||||
|
|
||||||
|
pspec = g_param_spec_int ("n-workspaces",
|
||||||
|
"N Workspaces",
|
||||||
|
"Number of workspaces",
|
||||||
|
1, G_MAXINT, 1,
|
||||||
|
G_PARAM_READABLE);
|
||||||
|
|
||||||
|
g_object_class_install_property (object_class,
|
||||||
|
PROP_N_WORKSPACES,
|
||||||
|
pspec);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_screen_init (MetaScreen *screen)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
set_wm_check_hint (MetaScreen *screen)
|
set_wm_check_hint (MetaScreen *screen)
|
||||||
{
|
{
|
||||||
@ -488,7 +564,7 @@ meta_screen_new (MetaDisplay *display,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
screen = g_new (MetaScreen, 1);
|
screen = g_object_new (META_TYPE_SCREEN, NULL);
|
||||||
screen->closing = 0;
|
screen->closing = 0;
|
||||||
|
|
||||||
screen->display = display;
|
screen->display = display;
|
||||||
@ -718,7 +794,8 @@ meta_screen_free (MetaScreen *screen,
|
|||||||
g_free (screen->xinerama_infos);
|
g_free (screen->xinerama_infos);
|
||||||
|
|
||||||
g_free (screen->screen_name);
|
g_free (screen->screen_name);
|
||||||
g_free (screen);
|
|
||||||
|
g_object_unref (screen);
|
||||||
|
|
||||||
XFlush (display->xdisplay);
|
XFlush (display->xdisplay);
|
||||||
meta_display_ungrab (display);
|
meta_display_ungrab (display);
|
||||||
@ -790,20 +867,6 @@ meta_screen_manage_all_windows (MetaScreen *screen)
|
|||||||
|
|
||||||
window = meta_window_new_with_attrs (screen->display, info->xwindow, TRUE,
|
window = meta_window_new_with_attrs (screen->display, info->xwindow, TRUE,
|
||||||
&info->attrs);
|
&info->attrs);
|
||||||
if (info->xwindow == screen->no_focus_window ||
|
|
||||||
info->xwindow == screen->flash_window ||
|
|
||||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
|
||||||
info->xwindow == screen->wm_cm_selection_window ||
|
|
||||||
info->xwindow == screen->guard_window ||
|
|
||||||
#endif
|
|
||||||
info->xwindow == screen->wm_sn_selection_window) {
|
|
||||||
meta_verbose ("Not managing our own windows\n");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (screen->display->compositor)
|
|
||||||
meta_compositor_add_window (screen->display->compositor, window,
|
|
||||||
info->xwindow, &info->attrs);
|
|
||||||
}
|
}
|
||||||
meta_stack_thaw (screen->stack);
|
meta_stack_thaw (screen->stack);
|
||||||
|
|
||||||
@ -818,38 +881,20 @@ meta_screen_composite_all_windows (MetaScreen *screen)
|
|||||||
{
|
{
|
||||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||||
MetaDisplay *display;
|
MetaDisplay *display;
|
||||||
GList *windows, *list;
|
GSList *windows, *tmp;
|
||||||
|
|
||||||
display = screen->display;
|
display = screen->display;
|
||||||
if (!display->compositor)
|
if (!display->compositor)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
windows = list_windows (screen);
|
windows = meta_display_list_windows (display);
|
||||||
|
for (tmp = windows; tmp != NULL; tmp = tmp->next)
|
||||||
|
meta_compositor_add_window (display->compositor, tmp->data);
|
||||||
|
g_slist_free (windows);
|
||||||
|
|
||||||
|
/* trigger a stack_sync_to_server: */
|
||||||
meta_stack_freeze (screen->stack);
|
meta_stack_freeze (screen->stack);
|
||||||
|
|
||||||
for (list = windows; list != NULL; list = list->next)
|
|
||||||
{
|
|
||||||
WindowInfo *info = list->data;
|
|
||||||
|
|
||||||
if (info->xwindow == screen->no_focus_window ||
|
|
||||||
info->xwindow == screen->flash_window ||
|
|
||||||
info->xwindow == screen->wm_sn_selection_window ||
|
|
||||||
info->xwindow == screen->wm_cm_selection_window) {
|
|
||||||
meta_verbose ("Not managing our own windows\n");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
meta_compositor_add_window (display->compositor,
|
|
||||||
meta_display_lookup_x_window (display,
|
|
||||||
info->xwindow),
|
|
||||||
info->xwindow, &info->attrs);
|
|
||||||
}
|
|
||||||
|
|
||||||
meta_stack_thaw (screen->stack);
|
meta_stack_thaw (screen->stack);
|
||||||
|
|
||||||
g_list_foreach (windows, (GFunc)g_free, NULL);
|
|
||||||
g_list_free (windows);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1140,13 +1185,16 @@ meta_screen_remove_workspace (MetaScreen *screen, MetaWorkspace *workspace,
|
|||||||
l = l->next;
|
l = l->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!neighbour)
|
||||||
|
return;
|
||||||
|
|
||||||
meta_workspace_relocate_windows (workspace, neighbour);
|
meta_workspace_relocate_windows (workspace, neighbour);
|
||||||
|
|
||||||
if (workspace == screen->active_workspace)
|
if (workspace == screen->active_workspace)
|
||||||
meta_workspace_activate (neighbour, timestamp);
|
meta_workspace_activate (neighbour, timestamp);
|
||||||
|
|
||||||
/* This also removes the workspace from the screens list */
|
/* This also removes the workspace from the screens list */
|
||||||
meta_workspace_free (workspace);
|
meta_workspace_remove (workspace);
|
||||||
|
|
||||||
set_number_of_spaces_hint (screen, g_list_length (screen->workspaces));
|
set_number_of_spaces_hint (screen, g_list_length (screen->workspaces));
|
||||||
|
|
||||||
@ -1161,6 +1209,8 @@ meta_screen_remove_workspace (MetaScreen *screen, MetaWorkspace *workspace,
|
|||||||
}
|
}
|
||||||
|
|
||||||
meta_screen_queue_workarea_recalc (screen);
|
meta_screen_queue_workarea_recalc (screen);
|
||||||
|
|
||||||
|
g_object_notify (G_OBJECT (screen), "n-workspaces");
|
||||||
}
|
}
|
||||||
|
|
||||||
MetaWorkspace *
|
MetaWorkspace *
|
||||||
@ -1182,6 +1232,8 @@ meta_screen_append_new_workspace (MetaScreen *screen, gboolean activate,
|
|||||||
|
|
||||||
meta_screen_queue_workarea_recalc (screen);
|
meta_screen_queue_workarea_recalc (screen);
|
||||||
|
|
||||||
|
g_object_notify (G_OBJECT (screen), "n-workspaces");
|
||||||
|
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1250,7 +1302,7 @@ update_num_workspaces (MetaScreen *screen,
|
|||||||
MetaWorkspace *w = tmp->data;
|
MetaWorkspace *w = tmp->data;
|
||||||
|
|
||||||
g_assert (w->windows == NULL);
|
g_assert (w->windows == NULL);
|
||||||
meta_workspace_free (w);
|
meta_workspace_remove (w);
|
||||||
|
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
@ -1266,6 +1318,8 @@ update_num_workspaces (MetaScreen *screen,
|
|||||||
set_number_of_spaces_hint (screen, new_num);
|
set_number_of_spaces_hint (screen, new_num);
|
||||||
|
|
||||||
meta_screen_queue_workarea_recalc (screen);
|
meta_screen_queue_workarea_recalc (screen);
|
||||||
|
|
||||||
|
g_object_notify (G_OBJECT (screen), "n-workspaces");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -2399,6 +2453,10 @@ meta_screen_resize (MetaScreen *screen,
|
|||||||
reload_xinerama_infos (screen);
|
reload_xinerama_infos (screen);
|
||||||
set_desktop_geometry_hint (screen);
|
set_desktop_geometry_hint (screen);
|
||||||
|
|
||||||
|
if (screen->display->compositor)
|
||||||
|
meta_compositor_sync_screen_size (screen->display->compositor,
|
||||||
|
screen, width, height);
|
||||||
|
|
||||||
/* Queue a resize on all the windows */
|
/* Queue a resize on all the windows */
|
||||||
meta_screen_foreach_window (screen, meta_screen_resize_func, 0);
|
meta_screen_foreach_window (screen, meta_screen_resize_func, 0);
|
||||||
}
|
}
|
||||||
|
@ -698,6 +698,20 @@ window_type_to_string (MetaWindowType type)
|
|||||||
return "splashscreen";
|
return "splashscreen";
|
||||||
case META_WINDOW_UTILITY:
|
case META_WINDOW_UTILITY:
|
||||||
return "utility";
|
return "utility";
|
||||||
|
case META_WINDOW_DROPDOWN_MENU:
|
||||||
|
return "dropdown_menu";
|
||||||
|
case META_WINDOW_POPUP_MENU:
|
||||||
|
return "popup_menu";
|
||||||
|
case META_WINDOW_TOOLTIP:
|
||||||
|
return "tooltip";
|
||||||
|
case META_WINDOW_NOTIFICATION:
|
||||||
|
return "notification";
|
||||||
|
case META_WINDOW_COMBO:
|
||||||
|
return "combo";
|
||||||
|
case META_WINDOW_DND:
|
||||||
|
return "dnd";
|
||||||
|
case META_WINDOW_OVERRIDE_OTHER:
|
||||||
|
return "override_redirect";
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
@ -1191,8 +1205,8 @@ start_element_handler (GMarkupParseContext *context,
|
|||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
G_MARKUP_ERROR,
|
G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
|
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
|
||||||
_("Unknown attribute %s on <metacity_session> element"),
|
_("Unknown attribute %s on <%s> element"),
|
||||||
name);
|
name, "metacity_session");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1266,8 +1280,8 @@ start_element_handler (GMarkupParseContext *context,
|
|||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
G_MARKUP_ERROR,
|
G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
|
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
|
||||||
_("Unknown attribute %s on <window> element"),
|
_("Unknown attribute %s on <%s> element"),
|
||||||
name);
|
name, "window");
|
||||||
session_info_free (pd->info);
|
session_info_free (pd->info);
|
||||||
pd->info = NULL;
|
pd->info = NULL;
|
||||||
return;
|
return;
|
||||||
@ -1298,8 +1312,8 @@ start_element_handler (GMarkupParseContext *context,
|
|||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
G_MARKUP_ERROR,
|
G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
|
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
|
||||||
_("Unknown attribute %s on <window> element"),
|
_("Unknown attribute %s on <%s> element"),
|
||||||
name);
|
name, "window");
|
||||||
session_info_free (pd->info);
|
session_info_free (pd->info);
|
||||||
pd->info = NULL;
|
pd->info = NULL;
|
||||||
return;
|
return;
|
||||||
@ -1370,8 +1384,8 @@ start_element_handler (GMarkupParseContext *context,
|
|||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
G_MARKUP_ERROR,
|
G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
|
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
|
||||||
_("Unknown attribute %s on <maximized> element"),
|
_("Unknown attribute %s on <%s> element"),
|
||||||
name);
|
name, "maximized");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1430,8 +1444,8 @@ start_element_handler (GMarkupParseContext *context,
|
|||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
G_MARKUP_ERROR,
|
G_MARKUP_ERROR,
|
||||||
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
|
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
|
||||||
_("Unknown attribute %s on <geometry> element"),
|
_("Unknown attribute %s on <%s> element"),
|
||||||
name);
|
name, "geometry");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -265,6 +265,14 @@ get_standalone_layer (MetaWindow *window)
|
|||||||
layer = META_LAYER_DOCK;
|
layer = META_LAYER_DOCK;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case META_WINDOW_DROPDOWN_MENU:
|
||||||
|
case META_WINDOW_POPUP_MENU:
|
||||||
|
case META_WINDOW_TOOLTIP:
|
||||||
|
case META_WINDOW_NOTIFICATION:
|
||||||
|
case META_WINDOW_COMBO:
|
||||||
|
case META_WINDOW_OVERRIDE_OTHER:
|
||||||
|
layer = META_LAYER_OVERRIDE_REDIRECT;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
meta_window_foreach_transient (window,
|
meta_window_foreach_transient (window,
|
||||||
is_focused_foreach,
|
is_focused_foreach,
|
||||||
@ -1062,6 +1070,7 @@ stack_sync_to_server (MetaStack *stack)
|
|||||||
GArray *root_children_stacked;
|
GArray *root_children_stacked;
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
GArray *all_hidden;
|
GArray *all_hidden;
|
||||||
|
int n_override_redirect = 0;
|
||||||
|
|
||||||
/* Bail out if frozen */
|
/* Bail out if frozen */
|
||||||
if (stack->freeze_count > 0)
|
if (stack->freeze_count > 0)
|
||||||
@ -1100,7 +1109,10 @@ stack_sync_to_server (MetaStack *stack)
|
|||||||
w->layer, w->stack_position, w->desc);
|
w->layer, w->stack_position, w->desc);
|
||||||
|
|
||||||
/* remember, stacked is in reverse order (bottom to top) */
|
/* remember, stacked is in reverse order (bottom to top) */
|
||||||
g_array_prepend_val (stacked, w->xwindow);
|
if (w->override_redirect)
|
||||||
|
n_override_redirect++;
|
||||||
|
else
|
||||||
|
g_array_prepend_val (stacked, w->xwindow);
|
||||||
|
|
||||||
if (w->frame)
|
if (w->frame)
|
||||||
top_level_window = w->frame->xwindow;
|
top_level_window = w->frame->xwindow;
|
||||||
@ -1124,7 +1136,7 @@ stack_sync_to_server (MetaStack *stack)
|
|||||||
meta_pop_no_msg_prefix ();
|
meta_pop_no_msg_prefix ();
|
||||||
|
|
||||||
/* All windows should be in some stacking order */
|
/* All windows should be in some stacking order */
|
||||||
if (stacked->len != stack->windows->len)
|
if (stacked->len != stack->windows->len - n_override_redirect)
|
||||||
meta_bug ("%u windows stacked, %u windows exist in stack\n",
|
meta_bug ("%u windows stacked, %u windows exist in stack\n",
|
||||||
stacked->len, stack->windows->len);
|
stacked->len, stack->windows->len);
|
||||||
|
|
||||||
|
@ -49,14 +49,15 @@
|
|||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
META_LAYER_DESKTOP = 0,
|
META_LAYER_DESKTOP = 0,
|
||||||
META_LAYER_BOTTOM = 1,
|
META_LAYER_BOTTOM = 1,
|
||||||
META_LAYER_NORMAL = 2,
|
META_LAYER_NORMAL = 2,
|
||||||
META_LAYER_TOP = 4, /* Same as DOCK; see EWMH and bug 330717 */
|
META_LAYER_TOP = 4, /* Same as DOCK; see EWMH and bug 330717 */
|
||||||
META_LAYER_DOCK = 4,
|
META_LAYER_DOCK = 4,
|
||||||
META_LAYER_FULLSCREEN = 5,
|
META_LAYER_FULLSCREEN = 5,
|
||||||
META_LAYER_FOCUSED_WINDOW = 6,
|
META_LAYER_FOCUSED_WINDOW = 6,
|
||||||
META_LAYER_LAST = 7
|
META_LAYER_OVERRIDE_REDIRECT = 7,
|
||||||
|
META_LAYER_LAST = 8
|
||||||
} MetaStackLayer;
|
} MetaStackLayer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -187,7 +187,7 @@ try_get_reply (Display *xdisplay,
|
|||||||
int actual_format;
|
int actual_format;
|
||||||
unsigned long n_items;
|
unsigned long n_items;
|
||||||
unsigned long bytes_after;
|
unsigned long bytes_after;
|
||||||
char *data;
|
unsigned char *data;
|
||||||
char *name;
|
char *name;
|
||||||
struct timeval current_time;
|
struct timeval current_time;
|
||||||
|
|
||||||
@ -421,7 +421,7 @@ run_speed_comparison (Display *xdisplay,
|
|||||||
int actual_format;
|
int actual_format;
|
||||||
unsigned long n_items;
|
unsigned long n_items;
|
||||||
unsigned long bytes_after;
|
unsigned long bytes_after;
|
||||||
char *data;
|
unsigned char *data;
|
||||||
|
|
||||||
assert (ag_task_have_reply (task));
|
assert (ag_task_have_reply (task));
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#define _POSIX_C_SOURCE /* for fdopen() */
|
#define _POSIX_C_SOURCE 200112L /* for fdopen() */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
@ -537,3 +537,75 @@ meta_gravity_to_string (int gravity)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_show_dialog (const char *type,
|
||||||
|
const char *message,
|
||||||
|
const char *timeout,
|
||||||
|
const gint screen_number,
|
||||||
|
const char **columns,
|
||||||
|
const char **entries)
|
||||||
|
{
|
||||||
|
GError *error = NULL;
|
||||||
|
char *screen_number_text = g_strdup_printf("%d", screen_number);
|
||||||
|
|
||||||
|
/*
|
||||||
|
We want:
|
||||||
|
|
||||||
|
zenity --display X --screen S --title Metacity --error --text "There was an error running <tt>terminal</tt>:\n\nYour computer is on fire."
|
||||||
|
** with no pipes
|
||||||
|
|
||||||
|
zenity --display X --screen S --title Metacity --question --text "<big><b><tt>%s</tt> is not responding.</b></big>\n\n<i>You may choose to wait a short while for it to continue or force the application to quit entirely.</i>"
|
||||||
|
|
||||||
|
zenity --display X --screen S --title Metacity --list --timeout 240 --text "These windows do not support \"save current setup\" and will have to be restarted manually next time you log in." --column "Window" --column "Class" "Firefox" "foo" "Duke Nukem Forever" "bar"
|
||||||
|
*/
|
||||||
|
|
||||||
|
const char **argvl;
|
||||||
|
int i=0;
|
||||||
|
GPid child_pid;
|
||||||
|
|
||||||
|
argvl = g_malloc(sizeof (char*) *
|
||||||
|
(9 + (timeout?2:0))
|
||||||
|
);
|
||||||
|
|
||||||
|
argvl[i++] = "zenity";
|
||||||
|
argvl[i++] = type;
|
||||||
|
argvl[i++] = "--screen";
|
||||||
|
argvl[i++] = screen_number_text;
|
||||||
|
argvl[i++] = "--title";
|
||||||
|
/* Translators: This is the title used on dialog boxes */
|
||||||
|
argvl[i++] = _("Metacity");
|
||||||
|
argvl[i++] = "--text";
|
||||||
|
argvl[i++] = message;
|
||||||
|
|
||||||
|
if (timeout)
|
||||||
|
{
|
||||||
|
argvl[i++] = "--timeout";
|
||||||
|
argvl[i++] = timeout;
|
||||||
|
}
|
||||||
|
|
||||||
|
argvl[i] = NULL;
|
||||||
|
|
||||||
|
g_spawn_async_with_pipes (
|
||||||
|
"/",
|
||||||
|
(char**) argvl, /* ugh */
|
||||||
|
NULL,
|
||||||
|
G_SPAWN_SEARCH_PATH,
|
||||||
|
NULL, NULL,
|
||||||
|
&child_pid,
|
||||||
|
NULL, NULL, NULL,
|
||||||
|
&error
|
||||||
|
);
|
||||||
|
|
||||||
|
g_free (argvl);
|
||||||
|
g_free (screen_number_text);
|
||||||
|
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
meta_warning ("%s\n", error->message);
|
||||||
|
g_error_free (error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* eof util.c */
|
||||||
|
|
||||||
|
@ -1,293 +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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \file A list of window keybinding information.
|
|
||||||
*
|
|
||||||
* Each action which can have a keystroke bound to it is listed below.
|
|
||||||
* To use this file, define "item" to be a six-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.
|
|
||||||
*
|
|
||||||
* Currently, the GConf schemas in src/metacity.schemas also need to be
|
|
||||||
* updated separately. There is a program called schema-bindings.c in this
|
|
||||||
* directory which will fix that, but it needs integrating into the build
|
|
||||||
* process.
|
|
||||||
*
|
|
||||||
* The arguments to item() are:
|
|
||||||
* 1) name: the name of the binding; a bareword identifier
|
|
||||||
* 2) suffix: a string to add to the binding name to make the handler name
|
|
||||||
* (usually the empty string)
|
|
||||||
* 3) param: an integer parameter to pass to the handler
|
|
||||||
* 4) short: a short description. Mostly, you won't use this.
|
|
||||||
* It must be marked translatable (i.e. inside "_(...)").
|
|
||||||
* 5) long: like short, except long. Don't include all the stuff about
|
|
||||||
* the parser being fairly liberal.
|
|
||||||
* 6) keystroke: a string representing the default binding.
|
|
||||||
* If this is NULL, the action is unbound by default.
|
|
||||||
*
|
|
||||||
* Don't try to do XML entity escaping anywhere in the strings.
|
|
||||||
*
|
|
||||||
* Some code out there wants only the entries which have a default
|
|
||||||
* binding (i.e. whose sixth parameter is not NULL). You can get only these
|
|
||||||
* by defining ONLY_BOUND_BY_DEFAULT before you include this file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef item
|
|
||||||
#error "item () must be defined when you include window-bindings.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
item (activate_window_menu, "", 0,
|
|
||||||
_("Activate window menu"),
|
|
||||||
_("The keybinding used to activate the window menu."),
|
|
||||||
"<Alt>Print")
|
|
||||||
|
|
||||||
#ifndef ONLY_BOUND_BY_DEFAULT
|
|
||||||
|
|
||||||
item (toggle_fullscreen, "", 0,
|
|
||||||
_("Toggle fullscreen mode"),
|
|
||||||
_("The keybinding used to toggle fullscreen mode."),
|
|
||||||
NULL)
|
|
||||||
item (toggle_maximized, "", 0,
|
|
||||||
_("Toggle maximization state"),
|
|
||||||
_("The keybinding used to toggle maximization."),
|
|
||||||
NULL)
|
|
||||||
item (toggle_above, "", 0,
|
|
||||||
_("Toggle always on top state"),
|
|
||||||
_("The keybinding used to toggle always on top. A window that is "
|
|
||||||
"always on top will always be visible over other overlapping "
|
|
||||||
"windows."),
|
|
||||||
NULL)
|
|
||||||
#endif /* ONLY_BOUND_BY_DEFAULT */
|
|
||||||
|
|
||||||
item (maximize, "", 0,
|
|
||||||
_("Maximize window"),
|
|
||||||
_("The keybinding used to maximize a window."),
|
|
||||||
"<Alt>F10")
|
|
||||||
item (unmaximize, "", 0,
|
|
||||||
_("Unmaximize window"),
|
|
||||||
_("The keybinding used to unmaximize a window."),
|
|
||||||
"<Alt>F5")
|
|
||||||
|
|
||||||
#ifndef ONLY_BOUND_BY_DEFAULT
|
|
||||||
|
|
||||||
item (toggle_shaded, "", 0,
|
|
||||||
_("Toggle shaded state"),
|
|
||||||
_("The keybinding used to toggle shaded/unshaded state."),
|
|
||||||
NULL)
|
|
||||||
|
|
||||||
#endif /* ONLY_BOUND_BY_DEFAULT */
|
|
||||||
|
|
||||||
item (minimize, "", 0,
|
|
||||||
_("Minimize window"),
|
|
||||||
_("The keybinding used to minimize a window."),
|
|
||||||
"<Alt>F9")
|
|
||||||
item (close, "", 0,
|
|
||||||
_("Close window"),
|
|
||||||
_("The keybinding used to close a window."),
|
|
||||||
"<Alt>F4")
|
|
||||||
item (begin_move, "", 0,
|
|
||||||
_("Move window"),
|
|
||||||
_("The keybinding used to enter \"move mode\" "
|
|
||||||
"and begin moving a window using the keyboard."),
|
|
||||||
"<Alt>F7")
|
|
||||||
item (begin_resize, "", 0,
|
|
||||||
_("Resize window"),
|
|
||||||
("The keybinding used to enter \"resize mode\" "
|
|
||||||
"and begin resizing a window using the keyboard."),
|
|
||||||
"<Alt>F8")
|
|
||||||
|
|
||||||
#ifndef ONLY_BOUND_BY_DEFAULT
|
|
||||||
|
|
||||||
item (toggle_on_all_workspaces, "", 0,
|
|
||||||
_("Toggle window on all workspaces"),
|
|
||||||
_("The keybinding used to toggle whether the window is on all "
|
|
||||||
"workspaces or just one."),
|
|
||||||
NULL)
|
|
||||||
|
|
||||||
|
|
||||||
item (move_to_workspace, "_1", 1,
|
|
||||||
_("Move window to workspace 1"),
|
|
||||||
_("The keybinding used to move a window to workspace 1."),
|
|
||||||
NULL)
|
|
||||||
item (move_to_workspace, "_2", 2,
|
|
||||||
_("Move window to workspace 2"),
|
|
||||||
_("The keybinding used to move a window to workspace 2."),
|
|
||||||
NULL)
|
|
||||||
item (move_to_workspace, "_3", 3,
|
|
||||||
_("Move window to workspace 3"),
|
|
||||||
_("The keybinding used to move a window to workspace 3."),
|
|
||||||
NULL)
|
|
||||||
item (move_to_workspace, "_4", 4,
|
|
||||||
_("Move window to workspace 4"),
|
|
||||||
_("The keybinding used to move a window to workspace 4."),
|
|
||||||
NULL)
|
|
||||||
item (move_to_workspace, "_5", 5,
|
|
||||||
_("Move window to workspace 5"),
|
|
||||||
_("The keybinding used to move a window to workspace 5."),
|
|
||||||
NULL)
|
|
||||||
item (move_to_workspace, "_6", 6,
|
|
||||||
_("Move window to workspace 6"),
|
|
||||||
_("The keybinding used to move a window to workspace 6."),
|
|
||||||
NULL)
|
|
||||||
item (move_to_workspace, "_7", 7,
|
|
||||||
_("Move window to workspace 7"),
|
|
||||||
_("The keybinding used to move a window to workspace 7."),
|
|
||||||
NULL)
|
|
||||||
item (move_to_workspace, "_8", 8,
|
|
||||||
_("Move window to workspace 8"),
|
|
||||||
_("The keybinding used to move a window to workspace 8."),
|
|
||||||
NULL)
|
|
||||||
item (move_to_workspace, "_9", 9,
|
|
||||||
_("Move window to workspace 9"),
|
|
||||||
_("The keybinding used to move a window to workspace 9."),
|
|
||||||
NULL)
|
|
||||||
item (move_to_workspace, "_10", 10,
|
|
||||||
_("Move window to workspace 10"),
|
|
||||||
_("The keybinding used to move a window to workspace 10."),
|
|
||||||
NULL)
|
|
||||||
item (move_to_workspace, "_11", 11,
|
|
||||||
_("Move window to workspace 11"),
|
|
||||||
_("The keybinding used to move a window to workspace 11."),
|
|
||||||
NULL)
|
|
||||||
item (move_to_workspace, "_12", 12,
|
|
||||||
_("Move window to workspace 12"),
|
|
||||||
_("The keybinding used to move a window to workspace 12."),
|
|
||||||
NULL)
|
|
||||||
|
|
||||||
#endif /* ONLY_BOUND_BY_DEFAULT */
|
|
||||||
|
|
||||||
/* 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 item() throws them away, you don't need to include
|
|
||||||
* workspace.h, of course.
|
|
||||||
*/
|
|
||||||
|
|
||||||
item (move_to_workspace, "_left", META_MOTION_LEFT,
|
|
||||||
_("Move window one workspace to the left"),
|
|
||||||
_("The keybinding used to move a window one workspace to the left."),
|
|
||||||
"<Control><Shift><Alt>Left")
|
|
||||||
item (move_to_workspace, "_right", META_MOTION_RIGHT,
|
|
||||||
_("Move window one workspace to the right"),
|
|
||||||
_("The keybinding used to move a window one workspace to the right."),
|
|
||||||
"<Control><Shift><Alt>Right")
|
|
||||||
item (move_to_workspace, "_up", META_MOTION_UP,
|
|
||||||
_("Move window one workspace up"),
|
|
||||||
_("The keybinding used to move a window one workspace up."),
|
|
||||||
"<Control><Shift><Alt>Up")
|
|
||||||
item (move_to_workspace, "_down", META_MOTION_DOWN,
|
|
||||||
_("Move window one workspace down"),
|
|
||||||
_("The keybinding used to move a window one workspace down."),
|
|
||||||
"<Control><Shift><Alt>Down")
|
|
||||||
|
|
||||||
#ifndef ONLY_BOUND_BY_DEFAULT
|
|
||||||
|
|
||||||
item (raise_or_lower, "", 0,
|
|
||||||
_("Raise obscured window, otherwise lower"),
|
|
||||||
_("This keybinding changes whether a window is above or below "
|
|
||||||
"other windows. If the window is covered by another one, it "
|
|
||||||
"raises the window above all others, and if the window is "
|
|
||||||
"already fully visible, it lowers it below all others."),
|
|
||||||
NULL)
|
|
||||||
item (raise, "", 0,
|
|
||||||
_("Raise window above other windows"),
|
|
||||||
_("This keybinding raises the window above other windows."),
|
|
||||||
NULL)
|
|
||||||
item (lower, "", 0,
|
|
||||||
_("Lower window below other windows"),
|
|
||||||
_("This keybinding lowers a window below other windows."),
|
|
||||||
NULL)
|
|
||||||
|
|
||||||
item (maximize_vertically, "", 0,
|
|
||||||
_("Maximize window vertically"),
|
|
||||||
_("This keybinding resizes a window to fill available "
|
|
||||||
"vertical space."),
|
|
||||||
NULL)
|
|
||||||
item (maximize_horizontally, "", 0,
|
|
||||||
_("Maximize window horizontally"),
|
|
||||||
_("This keybinding resizes a window to fill available "
|
|
||||||
"horizontal space."),
|
|
||||||
NULL)
|
|
||||||
|
|
||||||
item (move_to_corner_nw, "", 0,
|
|
||||||
_("Move window to north-west corner"),
|
|
||||||
_("This keybinding moves a window into the north-west (top left) "
|
|
||||||
"corner of the screen."),
|
|
||||||
NULL)
|
|
||||||
item (move_to_corner_ne, "", 0,
|
|
||||||
_("Move window to north-east corner"),
|
|
||||||
_("This keybinding moves a window into the north-east (top right) "
|
|
||||||
"corner of the screen."),
|
|
||||||
NULL)
|
|
||||||
item (move_to_corner_sw, "", 0,
|
|
||||||
_("Move window to south-west corner"),
|
|
||||||
_("This keybinding moves a window into the north-east (bottom left) "
|
|
||||||
"corner of the screen."),
|
|
||||||
NULL)
|
|
||||||
item (move_to_corner_se, "", 0,
|
|
||||||
_("Move window to south-east corner"),
|
|
||||||
_("This keybinding moves a window into the north-east (bottom right) "
|
|
||||||
"corner of the screen."),
|
|
||||||
NULL)
|
|
||||||
|
|
||||||
item (move_to_side_n, "", 0,
|
|
||||||
_("Move window to north side of screen"),
|
|
||||||
_("This keybinding moves a window against the north (top) "
|
|
||||||
"side of the screen."),
|
|
||||||
NULL)
|
|
||||||
item (move_to_side_s, "", 0,
|
|
||||||
_("Move window to south side of screen"),
|
|
||||||
_("This keybinding moves a window against the south (bottom) "
|
|
||||||
"side of the screen."),
|
|
||||||
NULL)
|
|
||||||
item (move_to_side_e, "", 0,
|
|
||||||
_("Move window to east side of screen"),
|
|
||||||
_("This keybinding moves a window against the east (right) "
|
|
||||||
"side of the screen."),
|
|
||||||
NULL)
|
|
||||||
item (move_to_side_w, "", 0,
|
|
||||||
_("Move window to west side of screen"),
|
|
||||||
_("This keybinding moves a window against the west (left) "
|
|
||||||
"side of the screen."),
|
|
||||||
NULL)
|
|
||||||
|
|
||||||
item (move_to_center, "", 0,
|
|
||||||
_("Move window to center of screen"),
|
|
||||||
_("This keybinding moves a window into the center "
|
|
||||||
"of the screen."),
|
|
||||||
NULL)
|
|
||||||
|
|
||||||
#endif /* ONLY_BOUND_BY_DEFAULT */
|
|
||||||
|
|
||||||
/* eof window-bindings.h */
|
|
||||||
|
|
@ -43,7 +43,6 @@
|
|||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||||
|
|
||||||
typedef struct _MetaGroup MetaGroup;
|
|
||||||
typedef struct _MetaWindowQueue MetaWindowQueue;
|
typedef struct _MetaWindowQueue MetaWindowQueue;
|
||||||
|
|
||||||
typedef gboolean (*MetaWindowForeachFunc) (MetaWindow *window,
|
typedef gboolean (*MetaWindowForeachFunc) (MetaWindow *window,
|
||||||
@ -66,6 +65,8 @@ typedef enum {
|
|||||||
|
|
||||||
struct _MetaWindow
|
struct _MetaWindow
|
||||||
{
|
{
|
||||||
|
GObject parent_instance;
|
||||||
|
|
||||||
MetaDisplay *display;
|
MetaDisplay *display;
|
||||||
MetaScreen *screen;
|
MetaScreen *screen;
|
||||||
MetaWorkspace *workspace;
|
MetaWorkspace *workspace;
|
||||||
@ -110,6 +111,9 @@ struct _MetaWindow
|
|||||||
/* Initial timestamp property */
|
/* Initial timestamp property */
|
||||||
guint32 initial_timestamp;
|
guint32 initial_timestamp;
|
||||||
|
|
||||||
|
/* Whether this is an override redirect window or not */
|
||||||
|
guint override_redirect : 1;
|
||||||
|
|
||||||
/* Whether we're maximized */
|
/* Whether we're maximized */
|
||||||
guint maximized_horizontally : 1;
|
guint maximized_horizontally : 1;
|
||||||
guint maximized_vertically : 1;
|
guint maximized_vertically : 1;
|
||||||
@ -125,6 +129,12 @@ struct _MetaWindow
|
|||||||
/* Whether we're fullscreen */
|
/* Whether we're fullscreen */
|
||||||
guint fullscreen : 1;
|
guint fullscreen : 1;
|
||||||
|
|
||||||
|
/* Area to cover when in fullscreen mode. If _NET_WM_FULLSCREEN_MONITORS has
|
||||||
|
* been overridden (via a client message), the window will cover the union of
|
||||||
|
* these monitors. If not, this is the single monitor which the window's
|
||||||
|
* origin is on. */
|
||||||
|
long fullscreen_monitors[4];
|
||||||
|
|
||||||
/* Whether we're trying to constrain the window to be fully onscreen */
|
/* Whether we're trying to constrain the window to be fully onscreen */
|
||||||
guint require_fully_onscreen : 1;
|
guint require_fully_onscreen : 1;
|
||||||
|
|
||||||
@ -233,7 +243,7 @@ struct _MetaWindow
|
|||||||
/* Has this window not ever been shown yet? */
|
/* Has this window not ever been shown yet? */
|
||||||
guint showing_for_first_time : 1;
|
guint showing_for_first_time : 1;
|
||||||
|
|
||||||
/* Are we in meta_window_free()? */
|
/* Are we in meta_window_unmanage()? */
|
||||||
guint unmanaging : 1;
|
guint unmanaging : 1;
|
||||||
|
|
||||||
/* Are we in meta_window_new()? */
|
/* Are we in meta_window_new()? */
|
||||||
@ -354,6 +364,13 @@ struct _MetaWindow
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct _MetaWindowClass
|
||||||
|
{
|
||||||
|
GObjectClass parent_class;
|
||||||
|
|
||||||
|
void (*workspace_changed) (MetaWindow *window, int old_workspace);
|
||||||
|
};
|
||||||
|
|
||||||
/* These differ from window->has_foo_func in that they consider
|
/* These differ from window->has_foo_func in that they consider
|
||||||
* the dynamic window state such as "maximized", not just the
|
* the dynamic window state such as "maximized", not just the
|
||||||
* window's type
|
* window's type
|
||||||
@ -377,7 +394,7 @@ MetaWindow* meta_window_new_with_attrs (MetaDisplay *display,
|
|||||||
Window xwindow,
|
Window xwindow,
|
||||||
gboolean must_be_viewable,
|
gboolean must_be_viewable,
|
||||||
XWindowAttributes *attrs);
|
XWindowAttributes *attrs);
|
||||||
void meta_window_free (MetaWindow *window,
|
void meta_window_unmanage (MetaWindow *window,
|
||||||
guint32 timestamp);
|
guint32 timestamp);
|
||||||
void meta_window_calc_showing (MetaWindow *window);
|
void meta_window_calc_showing (MetaWindow *window);
|
||||||
void meta_window_queue (MetaWindow *window,
|
void meta_window_queue (MetaWindow *window,
|
||||||
@ -405,6 +422,11 @@ void meta_window_unstick (MetaWindow *window);
|
|||||||
void meta_window_make_fullscreen_internal (MetaWindow *window);
|
void meta_window_make_fullscreen_internal (MetaWindow *window);
|
||||||
void meta_window_make_fullscreen (MetaWindow *window);
|
void meta_window_make_fullscreen (MetaWindow *window);
|
||||||
void meta_window_unmake_fullscreen (MetaWindow *window);
|
void meta_window_unmake_fullscreen (MetaWindow *window);
|
||||||
|
void meta_window_update_fullscreen_monitors (MetaWindow *window,
|
||||||
|
unsigned long top,
|
||||||
|
unsigned long bottom,
|
||||||
|
unsigned long left,
|
||||||
|
unsigned long right);
|
||||||
|
|
||||||
/* args to move are window pos, not frame pos */
|
/* args to move are window pos, not frame pos */
|
||||||
void meta_window_move (MetaWindow *window,
|
void meta_window_move (MetaWindow *window,
|
||||||
|
@ -384,6 +384,8 @@ set_window_title (MetaWindow *window,
|
|||||||
meta_ui_set_frame_title (window->screen->ui,
|
meta_ui_set_frame_title (window->screen->ui,
|
||||||
window->frame->xwindow,
|
window->frame->xwindow,
|
||||||
window->title);
|
window->title);
|
||||||
|
if (modified)
|
||||||
|
g_object_notify (G_OBJECT (window), "title");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -580,6 +582,8 @@ reload_net_wm_state (MetaWindow *window,
|
|||||||
window->wm_state_below = TRUE;
|
window->wm_state_below = TRUE;
|
||||||
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_DEMANDS_ATTENTION)
|
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_DEMANDS_ATTENTION)
|
||||||
window->wm_state_demands_attention = TRUE;
|
window->wm_state_demands_attention = TRUE;
|
||||||
|
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_STICKY)
|
||||||
|
window->on_all_workspaces = TRUE;
|
||||||
|
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
@ -53,6 +53,10 @@
|
|||||||
#include <X11/extensions/shape.h>
|
#include <X11/extensions/shape.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||||
|
#include <X11/extensions/Xcomposite.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static int destroying_windows_disallowed = 0;
|
static int destroying_windows_disallowed = 0;
|
||||||
|
|
||||||
|
|
||||||
@ -128,6 +132,137 @@ static gboolean idle_calc_showing (gpointer data);
|
|||||||
static gboolean idle_move_resize (gpointer data);
|
static gboolean idle_move_resize (gpointer data);
|
||||||
static gboolean idle_update_icon (gpointer data);
|
static gboolean idle_update_icon (gpointer data);
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (MetaWindow, meta_window, G_TYPE_OBJECT);
|
||||||
|
|
||||||
|
enum {
|
||||||
|
PROP_0,
|
||||||
|
|
||||||
|
PROP_TITLE,
|
||||||
|
PROP_ICON,
|
||||||
|
PROP_MINI_ICON,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
WORKSPACE_CHANGED,
|
||||||
|
|
||||||
|
LAST_SIGNAL
|
||||||
|
};
|
||||||
|
|
||||||
|
static guint window_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_window_finalize (GObject *object)
|
||||||
|
{
|
||||||
|
MetaWindow *window = META_WINDOW (object);
|
||||||
|
|
||||||
|
if (window->icon)
|
||||||
|
g_object_unref (G_OBJECT (window->icon));
|
||||||
|
|
||||||
|
if (window->mini_icon)
|
||||||
|
g_object_unref (G_OBJECT (window->mini_icon));
|
||||||
|
|
||||||
|
meta_icon_cache_free (&window->icon_cache);
|
||||||
|
|
||||||
|
g_free (window->sm_client_id);
|
||||||
|
g_free (window->wm_client_machine);
|
||||||
|
g_free (window->startup_id);
|
||||||
|
g_free (window->role);
|
||||||
|
g_free (window->res_class);
|
||||||
|
g_free (window->res_name);
|
||||||
|
g_free (window->title);
|
||||||
|
g_free (window->icon_name);
|
||||||
|
g_free (window->desc);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_window_get_property(GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
MetaWindow *win = META_WINDOW (object);
|
||||||
|
|
||||||
|
switch (prop_id)
|
||||||
|
{
|
||||||
|
case PROP_TITLE:
|
||||||
|
g_value_set_string (value, win->title);
|
||||||
|
break;
|
||||||
|
case PROP_ICON:
|
||||||
|
g_value_set_object (value, win->icon);
|
||||||
|
break;
|
||||||
|
case PROP_MINI_ICON:
|
||||||
|
g_value_set_object (value, win->mini_icon);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_window_set_property(GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
const GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
switch (prop_id)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_window_class_init (MetaWindowClass *klass)
|
||||||
|
{
|
||||||
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
|
object_class->finalize = meta_window_finalize;
|
||||||
|
|
||||||
|
object_class->get_property = meta_window_get_property;
|
||||||
|
object_class->set_property = meta_window_set_property;
|
||||||
|
|
||||||
|
g_object_class_install_property (object_class,
|
||||||
|
PROP_TITLE,
|
||||||
|
g_param_spec_string ("title",
|
||||||
|
"Title",
|
||||||
|
"The title of the window",
|
||||||
|
NULL,
|
||||||
|
G_PARAM_READABLE));
|
||||||
|
g_object_class_install_property (object_class,
|
||||||
|
PROP_ICON,
|
||||||
|
g_param_spec_object ("icon",
|
||||||
|
"Icon",
|
||||||
|
"32 pixel sized icon",
|
||||||
|
GDK_TYPE_PIXBUF,
|
||||||
|
G_PARAM_READABLE));
|
||||||
|
|
||||||
|
g_object_class_install_property (object_class,
|
||||||
|
PROP_MINI_ICON,
|
||||||
|
g_param_spec_object ("mini-icon",
|
||||||
|
"Mini Icon",
|
||||||
|
"16 pixel sized icon",
|
||||||
|
GDK_TYPE_PIXBUF,
|
||||||
|
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,
|
||||||
|
G_TYPE_NONE, 1,
|
||||||
|
G_TYPE_INT);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_window_init (MetaWindow *self)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef WITH_VERBOSE_MODE
|
#ifdef WITH_VERBOSE_MODE
|
||||||
static const char*
|
static const char*
|
||||||
wm_state_to_string (int state)
|
wm_state_to_string (int state)
|
||||||
@ -249,10 +384,11 @@ meta_window_new_with_attrs (MetaDisplay *display,
|
|||||||
gulong existing_wm_state;
|
gulong existing_wm_state;
|
||||||
gulong event_mask;
|
gulong event_mask;
|
||||||
MetaMoveResizeFlags flags;
|
MetaMoveResizeFlags flags;
|
||||||
#define N_INITIAL_PROPS 18
|
#define N_INITIAL_PROPS 19
|
||||||
Atom initial_props[N_INITIAL_PROPS];
|
Atom initial_props[N_INITIAL_PROPS];
|
||||||
int i;
|
int i;
|
||||||
gboolean has_shape;
|
gboolean has_shape;
|
||||||
|
MetaScreen *screen;
|
||||||
|
|
||||||
g_assert (attrs != NULL);
|
g_assert (attrs != NULL);
|
||||||
g_assert (N_INITIAL_PROPS == (int) G_N_ELEMENTS (initial_props));
|
g_assert (N_INITIAL_PROPS == (int) G_N_ELEMENTS (initial_props));
|
||||||
@ -266,12 +402,43 @@ meta_window_new_with_attrs (MetaDisplay *display,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (attrs->override_redirect)
|
screen = NULL;
|
||||||
|
for (tmp = display->screens; tmp != NULL; tmp = tmp->next)
|
||||||
{
|
{
|
||||||
meta_verbose ("Deciding not to manage override_redirect window 0x%lx\n", xwindow);
|
MetaScreen *scr = tmp->data;
|
||||||
return NULL;
|
|
||||||
|
if (scr->xroot == attrs->root)
|
||||||
|
{
|
||||||
|
screen = tmp->data;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_assert (screen);
|
||||||
|
|
||||||
|
/* A black list of override redirect windows that we don't need to manage: */
|
||||||
|
if (attrs->override_redirect &&
|
||||||
|
(xwindow == screen->no_focus_window ||
|
||||||
|
xwindow == screen->flash_window ||
|
||||||
|
xwindow == screen->wm_sn_selection_window ||
|
||||||
|
attrs->class == InputOnly ||
|
||||||
|
/* any windows created via meta_create_offscreen_window: */
|
||||||
|
(attrs->x == -100 && attrs->y == -100
|
||||||
|
&& attrs->width == 1 && attrs->height == 1) ||
|
||||||
|
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||||
|
xwindow == screen->wm_cm_selection_window ||
|
||||||
|
xwindow == screen->guard_window ||
|
||||||
|
(display->compositor &&
|
||||||
|
xwindow == XCompositeGetOverlayWindow (display->xdisplay,
|
||||||
|
screen->xroot)
|
||||||
|
)
|
||||||
|
#endif
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
meta_verbose ("Not managing our own windows\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* Grab server */
|
/* Grab server */
|
||||||
meta_display_grab (display);
|
meta_display_grab (display);
|
||||||
meta_error_trap_push (display); /* Push a trap over all of window
|
meta_error_trap_push (display); /* Push a trap over all of window
|
||||||
@ -330,6 +497,8 @@ meta_window_new_with_attrs (MetaDisplay *display,
|
|||||||
event_mask =
|
event_mask =
|
||||||
PropertyChangeMask | EnterWindowMask | LeaveWindowMask |
|
PropertyChangeMask | EnterWindowMask | LeaveWindowMask |
|
||||||
FocusChangeMask | ColormapChangeMask;
|
FocusChangeMask | ColormapChangeMask;
|
||||||
|
if (attrs->override_redirect)
|
||||||
|
event_mask |= StructureNotifyMask;
|
||||||
|
|
||||||
XSelectInput (display->xdisplay, xwindow, event_mask);
|
XSelectInput (display->xdisplay, xwindow, event_mask);
|
||||||
|
|
||||||
@ -384,9 +553,8 @@ meta_window_new_with_attrs (MetaDisplay *display,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_assert (!attrs->override_redirect);
|
|
||||||
|
|
||||||
window = g_new (MetaWindow, 1);
|
window = g_object_new (META_TYPE_WINDOW, NULL);
|
||||||
|
|
||||||
window->constructing = TRUE;
|
window->constructing = TRUE;
|
||||||
|
|
||||||
@ -408,25 +576,12 @@ meta_window_new_with_attrs (MetaDisplay *display,
|
|||||||
window->sync_request_time.tv_usec = 0;
|
window->sync_request_time.tv_usec = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
window->screen = NULL;
|
window->screen = screen;
|
||||||
tmp = display->screens;
|
|
||||||
while (tmp != NULL)
|
|
||||||
{
|
|
||||||
MetaScreen *scr = tmp->data;
|
|
||||||
|
|
||||||
if (scr->xroot == attrs->root)
|
|
||||||
{
|
|
||||||
window->screen = tmp->data;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
tmp = tmp->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_assert (window->screen);
|
|
||||||
|
|
||||||
window->desc = g_strdup_printf ("0x%lx", window->xwindow);
|
window->desc = g_strdup_printf ("0x%lx", window->xwindow);
|
||||||
|
|
||||||
|
window->override_redirect = attrs->override_redirect;
|
||||||
|
|
||||||
/* avoid tons of stack updates */
|
/* avoid tons of stack updates */
|
||||||
meta_stack_freeze (window->screen->stack);
|
meta_stack_freeze (window->screen->stack);
|
||||||
|
|
||||||
@ -471,6 +626,7 @@ meta_window_new_with_attrs (MetaDisplay *display,
|
|||||||
window->maximize_vertically_after_placement = FALSE;
|
window->maximize_vertically_after_placement = FALSE;
|
||||||
window->minimize_after_placement = FALSE;
|
window->minimize_after_placement = FALSE;
|
||||||
window->fullscreen = FALSE;
|
window->fullscreen = FALSE;
|
||||||
|
window->fullscreen_monitors[0] = -1;
|
||||||
window->require_fully_onscreen = TRUE;
|
window->require_fully_onscreen = TRUE;
|
||||||
window->require_on_single_xinerama = TRUE;
|
window->require_on_single_xinerama = TRUE;
|
||||||
window->require_titlebar_visible = TRUE;
|
window->require_titlebar_visible = TRUE;
|
||||||
@ -604,14 +760,17 @@ meta_window_new_with_attrs (MetaDisplay *display,
|
|||||||
initial_props[i++] = display->atom__MOTIF_WM_HINTS;
|
initial_props[i++] = display->atom__MOTIF_WM_HINTS;
|
||||||
initial_props[i++] = XA_WM_TRANSIENT_FOR;
|
initial_props[i++] = XA_WM_TRANSIENT_FOR;
|
||||||
initial_props[i++] = display->atom__NET_WM_USER_TIME_WINDOW;
|
initial_props[i++] = display->atom__NET_WM_USER_TIME_WINDOW;
|
||||||
|
initial_props[i++] = display->atom__NET_WM_FULLSCREEN_MONITORS;
|
||||||
g_assert (N_INITIAL_PROPS == i);
|
g_assert (N_INITIAL_PROPS == i);
|
||||||
|
|
||||||
meta_window_reload_properties (window, initial_props, N_INITIAL_PROPS);
|
meta_window_reload_properties (window, initial_props, N_INITIAL_PROPS);
|
||||||
|
|
||||||
update_sm_hints (window); /* must come after transient_for */
|
if (!window->override_redirect)
|
||||||
|
update_sm_hints (window); /* must come after transient_for */
|
||||||
update_role (window);
|
update_role (window);
|
||||||
update_net_wm_type (window);
|
update_net_wm_type (window);
|
||||||
meta_window_update_icon_now (window);
|
if (!window->override_redirect)
|
||||||
|
meta_window_update_icon_now (window);
|
||||||
|
|
||||||
if (window->initially_iconic)
|
if (window->initially_iconic)
|
||||||
{
|
{
|
||||||
@ -672,14 +831,15 @@ meta_window_new_with_attrs (MetaDisplay *display,
|
|||||||
meta_window_ensure_frame (window);
|
meta_window_ensure_frame (window);
|
||||||
|
|
||||||
meta_window_grab_keys (window);
|
meta_window_grab_keys (window);
|
||||||
if (window->type != META_WINDOW_DOCK)
|
if (window->type != META_WINDOW_DOCK && !window->override_redirect)
|
||||||
{
|
{
|
||||||
meta_display_grab_window_buttons (window->display, window->xwindow);
|
meta_display_grab_window_buttons (window->display, window->xwindow);
|
||||||
meta_display_grab_focus_window_button (window->display, window);
|
meta_display_grab_focus_window_button (window->display, window);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window->type == META_WINDOW_DESKTOP ||
|
if (window->type == META_WINDOW_DESKTOP ||
|
||||||
window->type == META_WINDOW_DOCK)
|
window->type == META_WINDOW_DOCK ||
|
||||||
|
window->override_redirect)
|
||||||
{
|
{
|
||||||
/* Change the default, but don't enforce this if the user
|
/* Change the default, but don't enforce this if the user
|
||||||
* focuses the dock/desktop and unsticks it using key shortcuts.
|
* focuses the dock/desktop and unsticks it using key shortcuts.
|
||||||
@ -759,7 +919,8 @@ meta_window_new_with_attrs (MetaDisplay *display,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* for the various on_all_workspaces = TRUE possible above */
|
/* for the various on_all_workspaces = TRUE possible above */
|
||||||
meta_window_set_current_workspace_hint (window);
|
if (!window->override_redirect)
|
||||||
|
meta_window_set_current_workspace_hint (window);
|
||||||
|
|
||||||
meta_window_update_struts (window);
|
meta_window_update_struts (window);
|
||||||
|
|
||||||
@ -800,11 +961,14 @@ meta_window_new_with_attrs (MetaDisplay *display,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME we have a tendency to set this then immediately
|
if (!window->override_redirect)
|
||||||
* change it again.
|
{
|
||||||
*/
|
/* FIXME we have a tendency to set this then immediately
|
||||||
set_wm_state (window, window->iconic ? IconicState : NormalState);
|
* change it again.
|
||||||
set_net_wm_state (window);
|
*/
|
||||||
|
set_wm_state (window, window->iconic ? IconicState : NormalState);
|
||||||
|
set_net_wm_state (window);
|
||||||
|
}
|
||||||
|
|
||||||
/* Sync stack changes */
|
/* Sync stack changes */
|
||||||
meta_stack_thaw (window->screen->stack);
|
meta_stack_thaw (window->screen->stack);
|
||||||
@ -837,6 +1001,9 @@ meta_window_new_with_attrs (MetaDisplay *display,
|
|||||||
|
|
||||||
window->constructing = FALSE;
|
window->constructing = FALSE;
|
||||||
|
|
||||||
|
if (screen->display->compositor)
|
||||||
|
meta_compositor_add_window (screen->display->compositor, window);
|
||||||
|
|
||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -980,15 +1147,15 @@ meta_window_apply_session_info (MetaWindow *window,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_window_free (MetaWindow *window,
|
meta_window_unmanage (MetaWindow *window,
|
||||||
guint32 timestamp)
|
guint32 timestamp)
|
||||||
{
|
{
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
|
|
||||||
meta_verbose ("Unmanaging 0x%lx\n", window->xwindow);
|
meta_verbose ("Unmanaging 0x%lx\n", window->xwindow);
|
||||||
|
|
||||||
if (window->display->compositor)
|
if (window->display->compositor)
|
||||||
meta_compositor_destroy_window (window->display->compositor, window);
|
meta_compositor_remove_window (window->display->compositor, window);
|
||||||
|
|
||||||
if (window->display->window_with_menu == window)
|
if (window->display->window_with_menu == window)
|
||||||
{
|
{
|
||||||
@ -1128,6 +1295,9 @@ meta_window_free (MetaWindow *window,
|
|||||||
XDeleteProperty (window->display->xdisplay,
|
XDeleteProperty (window->display->xdisplay,
|
||||||
window->xwindow,
|
window->xwindow,
|
||||||
window->display->atom__NET_WM_STATE);
|
window->display->atom__NET_WM_STATE);
|
||||||
|
XDeleteProperty (window->display->xdisplay,
|
||||||
|
window->xwindow,
|
||||||
|
window->display->atom__NET_WM_FULLSCREEN_MONITORS);
|
||||||
set_wm_state (window, WithdrawnState);
|
set_wm_state (window, WithdrawnState);
|
||||||
meta_error_trap_pop (window->display, FALSE);
|
meta_error_trap_pop (window->display, FALSE);
|
||||||
}
|
}
|
||||||
@ -1194,24 +1364,7 @@ meta_window_free (MetaWindow *window,
|
|||||||
|
|
||||||
meta_error_trap_pop (window->display, FALSE);
|
meta_error_trap_pop (window->display, FALSE);
|
||||||
|
|
||||||
if (window->icon)
|
g_object_unref (window);
|
||||||
g_object_unref (G_OBJECT (window->icon));
|
|
||||||
|
|
||||||
if (window->mini_icon)
|
|
||||||
g_object_unref (G_OBJECT (window->mini_icon));
|
|
||||||
|
|
||||||
meta_icon_cache_free (&window->icon_cache);
|
|
||||||
|
|
||||||
g_free (window->sm_client_id);
|
|
||||||
g_free (window->wm_client_machine);
|
|
||||||
g_free (window->startup_id);
|
|
||||||
g_free (window->role);
|
|
||||||
g_free (window->res_class);
|
|
||||||
g_free (window->res_name);
|
|
||||||
g_free (window->title);
|
|
||||||
g_free (window->icon_name);
|
|
||||||
g_free (window->desc);
|
|
||||||
g_free (window);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1241,7 +1394,7 @@ static void
|
|||||||
set_net_wm_state (MetaWindow *window)
|
set_net_wm_state (MetaWindow *window)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
unsigned long data[11];
|
unsigned long data[12];
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
if (window->shaded)
|
if (window->shaded)
|
||||||
@ -1299,6 +1452,11 @@ set_net_wm_state (MetaWindow *window)
|
|||||||
data[i] = window->display->atom__NET_WM_STATE_DEMANDS_ATTENTION;
|
data[i] = window->display->atom__NET_WM_STATE_DEMANDS_ATTENTION;
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
if (window->on_all_workspaces)
|
||||||
|
{
|
||||||
|
data[i] = window->display->atom__NET_WM_STATE_STICKY;
|
||||||
|
++i;
|
||||||
|
}
|
||||||
|
|
||||||
meta_verbose ("Setting _NET_WM_STATE with %d atoms\n", i);
|
meta_verbose ("Setting _NET_WM_STATE with %d atoms\n", i);
|
||||||
|
|
||||||
@ -1308,6 +1466,23 @@ set_net_wm_state (MetaWindow *window)
|
|||||||
XA_ATOM,
|
XA_ATOM,
|
||||||
32, PropModeReplace, (guchar*) data, i);
|
32, PropModeReplace, (guchar*) data, i);
|
||||||
meta_error_trap_pop (window->display, FALSE);
|
meta_error_trap_pop (window->display, FALSE);
|
||||||
|
|
||||||
|
if (window->fullscreen)
|
||||||
|
{
|
||||||
|
data[0] = window->fullscreen_monitors[0];
|
||||||
|
data[1] = window->fullscreen_monitors[1];
|
||||||
|
data[2] = window->fullscreen_monitors[2];
|
||||||
|
data[3] = window->fullscreen_monitors[3];
|
||||||
|
|
||||||
|
meta_verbose ("Setting _NET_WM_FULLSCREEN_MONITORS\n");
|
||||||
|
meta_error_trap_push (window->display);
|
||||||
|
XChangeProperty (window->display->xdisplay,
|
||||||
|
window->xwindow,
|
||||||
|
window->display->atom__NET_WM_FULLSCREEN_MONITORS,
|
||||||
|
XA_CARDINAL, 32, PropModeReplace,
|
||||||
|
(guchar*) data, 4);
|
||||||
|
meta_error_trap_pop (window->display, FALSE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
@ -1495,7 +1670,9 @@ implement_showing (MetaWindow *window,
|
|||||||
if (window->display->compositor)
|
if (window->display->compositor)
|
||||||
{
|
{
|
||||||
meta_compositor_minimize_window (window->display->compositor,
|
meta_compositor_minimize_window (window->display->compositor,
|
||||||
window);
|
window,
|
||||||
|
&window_rect,
|
||||||
|
&icon_rect);
|
||||||
finish_minimize (window);
|
finish_minimize (window);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2001,6 +2178,14 @@ window_state_on_map (MetaWindow *window,
|
|||||||
case META_WINDOW_DESKTOP:
|
case META_WINDOW_DESKTOP:
|
||||||
case META_WINDOW_SPLASHSCREEN:
|
case META_WINDOW_SPLASHSCREEN:
|
||||||
case META_WINDOW_MENU:
|
case META_WINDOW_MENU:
|
||||||
|
/* override redirect types: */
|
||||||
|
case META_WINDOW_DROPDOWN_MENU:
|
||||||
|
case META_WINDOW_POPUP_MENU:
|
||||||
|
case META_WINDOW_TOOLTIP:
|
||||||
|
case META_WINDOW_NOTIFICATION:
|
||||||
|
case META_WINDOW_COMBO:
|
||||||
|
case META_WINDOW_DND:
|
||||||
|
case META_WINDOW_OVERRIDE_OTHER:
|
||||||
/* don't focus any of these; places_on_top may be irrelevant for some of
|
/* don't focus any of these; places_on_top may be irrelevant for some of
|
||||||
* these (e.g. dock)--but you never know--the focus window might also be
|
* these (e.g. dock)--but you never know--the focus window might also be
|
||||||
* of the same type in some weird situation...
|
* of the same type in some weird situation...
|
||||||
@ -2274,23 +2459,39 @@ meta_window_show (MetaWindow *window)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (did_show && window->was_minimized)
|
if (did_show)
|
||||||
{
|
{
|
||||||
MetaRectangle window_rect;
|
|
||||||
MetaRectangle icon_rect;
|
MetaRectangle icon_rect;
|
||||||
|
|
||||||
window->was_minimized = FALSE;
|
if (window->was_minimized
|
||||||
|
&& meta_window_get_icon_geometry (window, &icon_rect))
|
||||||
if (meta_window_get_icon_geometry (window, &icon_rect))
|
|
||||||
{
|
{
|
||||||
|
MetaRectangle window_rect;
|
||||||
|
|
||||||
meta_window_get_outer_rect (window, &window_rect);
|
meta_window_get_outer_rect (window, &window_rect);
|
||||||
|
|
||||||
meta_effect_run_unminimize (window,
|
if (window->display->compositor)
|
||||||
&window_rect,
|
meta_compositor_unminimize_window (window->display->compositor,
|
||||||
&icon_rect,
|
window,
|
||||||
NULL, NULL);
|
&window_rect,
|
||||||
|
&icon_rect);
|
||||||
|
else
|
||||||
|
meta_effect_run_unminimize (window,
|
||||||
|
&window_rect,
|
||||||
|
&icon_rect,
|
||||||
|
NULL, NULL);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
meta_compositor_map_window (window->display->compositor,
|
||||||
|
window);
|
||||||
|
|
||||||
|
window->was_minimized = FALSE;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (window->display->compositor)
|
||||||
|
meta_compositor_map_window (window->display->compositor, window);
|
||||||
|
}
|
||||||
|
|
||||||
if (window->iconic)
|
if (window->iconic)
|
||||||
{
|
{
|
||||||
@ -2373,10 +2574,16 @@ meta_window_hide (MetaWindow *window)
|
|||||||
window->hidden);
|
window->hidden);
|
||||||
meta_stack_thaw (window->screen->stack);
|
meta_stack_thaw (window->screen->stack);
|
||||||
|
|
||||||
|
meta_compositor_unmap_window (window->display->compositor,
|
||||||
|
window);
|
||||||
|
|
||||||
did_hide = TRUE;
|
did_hide = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
meta_compositor_unmap_window (window->display->compositor,
|
||||||
|
window);
|
||||||
|
|
||||||
if (window->frame && window->frame->mapped)
|
if (window->frame && window->frame->mapped)
|
||||||
{
|
{
|
||||||
meta_topic (META_DEBUG_WINDOW_STATE, "Frame actually needs unmap\n");
|
meta_topic (META_DEBUG_WINDOW_STATE, "Frame actually needs unmap\n");
|
||||||
@ -2650,14 +2857,14 @@ meta_window_maximize (MetaWindow *window,
|
|||||||
|
|
||||||
if (window->display->compositor)
|
if (window->display->compositor)
|
||||||
{
|
{
|
||||||
|
MetaRectangle window_rect;
|
||||||
|
|
||||||
meta_window_move_resize_now (window);
|
meta_window_move_resize_now (window);
|
||||||
|
|
||||||
|
meta_window_get_outer_rect (window, &window_rect);
|
||||||
meta_compositor_maximize_window (window->display->compositor,
|
meta_compositor_maximize_window (window->display->compositor,
|
||||||
window,
|
window,
|
||||||
window->frame->rect.x,
|
&window_rect);
|
||||||
window->frame->rect.y,
|
|
||||||
window->frame->rect.width,
|
|
||||||
window->frame->rect.height);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2763,6 +2970,8 @@ meta_window_unmaximize (MetaWindow *window,
|
|||||||
|
|
||||||
if (window->display->compositor)
|
if (window->display->compositor)
|
||||||
{
|
{
|
||||||
|
MetaRectangle window_rect;
|
||||||
|
|
||||||
meta_window_move_resize (window,
|
meta_window_move_resize (window,
|
||||||
FALSE,
|
FALSE,
|
||||||
target_rect.x,
|
target_rect.x,
|
||||||
@ -2771,12 +2980,11 @@ meta_window_unmaximize (MetaWindow *window,
|
|||||||
target_rect.height);
|
target_rect.height);
|
||||||
meta_window_move_resize_now (window);
|
meta_window_move_resize_now (window);
|
||||||
|
|
||||||
|
meta_window_get_outer_rect (window, &window_rect);
|
||||||
|
|
||||||
meta_compositor_unmaximize_window (window->display->compositor,
|
meta_compositor_unmaximize_window (window->display->compositor,
|
||||||
window,
|
window,
|
||||||
window->frame->rect.x,
|
&window_rect);
|
||||||
window->frame->rect.y,
|
|
||||||
window->frame->rect.width,
|
|
||||||
window->frame->rect.height);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2893,6 +3101,34 @@ meta_window_unmake_fullscreen (MetaWindow *window)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_window_update_fullscreen_monitors (MetaWindow *window,
|
||||||
|
unsigned long top,
|
||||||
|
unsigned long bottom,
|
||||||
|
unsigned long left,
|
||||||
|
unsigned long right)
|
||||||
|
{
|
||||||
|
if ((int)top < window->screen->n_xinerama_infos &&
|
||||||
|
(int)bottom < window->screen->n_xinerama_infos &&
|
||||||
|
(int)left < window->screen->n_xinerama_infos &&
|
||||||
|
(int)right < window->screen->n_xinerama_infos)
|
||||||
|
{
|
||||||
|
window->fullscreen_monitors[0] = top;
|
||||||
|
window->fullscreen_monitors[1] = bottom;
|
||||||
|
window->fullscreen_monitors[2] = left;
|
||||||
|
window->fullscreen_monitors[3] = right;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
window->fullscreen_monitors[0] = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (window->fullscreen)
|
||||||
|
{
|
||||||
|
meta_window_queue(window, META_QUEUE_MOVE_RESIZE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_window_shade (MetaWindow *window,
|
meta_window_shade (MetaWindow *window,
|
||||||
guint32 timestamp)
|
guint32 timestamp)
|
||||||
@ -3660,6 +3896,8 @@ meta_window_move_resize_internal (MetaWindow *window,
|
|||||||
newx, newy, window->rect.width, window->rect.height,
|
newx, newy, window->rect.width, window->rect.height,
|
||||||
window->user_rect.x, window->user_rect.y,
|
window->user_rect.x, window->user_rect.y,
|
||||||
window->user_rect.width, window->user_rect.height);
|
window->user_rect.width, window->user_rect.height);
|
||||||
|
meta_compositor_sync_window_geometry (window->display->compositor,
|
||||||
|
window);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3803,6 +4041,24 @@ idle_move_resize (gpointer data)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This is used to notify us of an unrequested configuration
|
||||||
|
* (only applicable to override redirect windows) */
|
||||||
|
void
|
||||||
|
meta_window_configure_notify (MetaWindow *window, XConfigureEvent *event)
|
||||||
|
{
|
||||||
|
g_assert (window->override_redirect);
|
||||||
|
g_assert (window->frame == NULL);
|
||||||
|
|
||||||
|
window->rect.x = event->x;
|
||||||
|
window->rect.y = event->y;
|
||||||
|
window->rect.width = event->width;
|
||||||
|
window->rect.height = event->height;
|
||||||
|
if (!event->override_redirect && !event->send_event)
|
||||||
|
meta_warning ("Unhandled change of windows override redirect status\n");
|
||||||
|
|
||||||
|
meta_compositor_sync_window_geometry (window->display->compositor, window);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_window_get_position (MetaWindow *window,
|
meta_window_get_position (MetaWindow *window,
|
||||||
int *x,
|
int *x,
|
||||||
@ -4211,9 +4467,16 @@ static void
|
|||||||
meta_window_change_workspace_without_transients (MetaWindow *window,
|
meta_window_change_workspace_without_transients (MetaWindow *window,
|
||||||
MetaWorkspace *workspace)
|
MetaWorkspace *workspace)
|
||||||
{
|
{
|
||||||
|
int old_workspace = -1;
|
||||||
|
|
||||||
meta_verbose ("Changing window %s to workspace %d\n",
|
meta_verbose ("Changing window %s to workspace %d\n",
|
||||||
window->desc, meta_workspace_index (workspace));
|
window->desc, meta_workspace_index (workspace));
|
||||||
|
|
||||||
|
if (!window->on_all_workspaces)
|
||||||
|
{
|
||||||
|
old_workspace = meta_workspace_index (window->workspace);
|
||||||
|
}
|
||||||
|
|
||||||
/* unstick if stuck. meta_window_unstick would call
|
/* unstick if stuck. meta_window_unstick would call
|
||||||
* meta_window_change_workspace recursively if the window
|
* meta_window_change_workspace recursively if the window
|
||||||
* is not in the active workspace.
|
* is not in the active workspace.
|
||||||
@ -4226,6 +4489,8 @@ meta_window_change_workspace_without_transients (MetaWindow *window,
|
|||||||
{
|
{
|
||||||
meta_workspace_remove_window (window->workspace, window);
|
meta_workspace_remove_window (window->workspace, window);
|
||||||
meta_workspace_add_window (workspace, window);
|
meta_workspace_add_window (workspace, window);
|
||||||
|
g_signal_emit (window, window_signals[WORKSPACE_CHANGED], 0,
|
||||||
|
old_workspace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5072,9 +5337,19 @@ meta_window_client_message (MetaWindow *window,
|
|||||||
{
|
{
|
||||||
if ((action == _NET_WM_STATE_ADD) ||
|
if ((action == _NET_WM_STATE_ADD) ||
|
||||||
(action == _NET_WM_STATE_TOGGLE && !window->wm_state_demands_attention))
|
(action == _NET_WM_STATE_TOGGLE && !window->wm_state_demands_attention))
|
||||||
meta_window_set_demands_attention(window);
|
meta_window_set_demands_attention (window);
|
||||||
else
|
else
|
||||||
meta_window_unset_demands_attention(window);
|
meta_window_unset_demands_attention (window);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (first == display->atom__NET_WM_STATE_STICKY ||
|
||||||
|
second == display->atom__NET_WM_STATE_STICKY)
|
||||||
|
{
|
||||||
|
if ((action == _NET_WM_STATE_ADD) ||
|
||||||
|
(action == _NET_WM_STATE_TOGGLE && !window->on_all_workspaces))
|
||||||
|
meta_window_stick (window);
|
||||||
|
else
|
||||||
|
meta_window_unstick (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -5273,6 +5548,23 @@ meta_window_client_message (MetaWindow *window,
|
|||||||
window_activate (window, timestamp, source_indication, NULL);
|
window_activate (window, timestamp, source_indication, NULL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
else if (event->xclient.message_type ==
|
||||||
|
display->atom__NET_WM_FULLSCREEN_MONITORS)
|
||||||
|
{
|
||||||
|
MetaClientType source_indication;
|
||||||
|
gulong top, bottom, left, right;
|
||||||
|
|
||||||
|
meta_verbose ("_NET_WM_FULLSCREEN_MONITORS request for window '%s'\n",
|
||||||
|
window->desc);
|
||||||
|
|
||||||
|
top = event->xclient.data.l[0];
|
||||||
|
bottom = event->xclient.data.l[1];
|
||||||
|
left = event->xclient.data.l[2];
|
||||||
|
right = event->xclient.data.l[3];
|
||||||
|
source_indication = event->xclient.data.l[4];
|
||||||
|
|
||||||
|
meta_window_update_fullscreen_monitors (window, top, bottom, left, right);
|
||||||
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -5847,10 +6139,18 @@ update_net_wm_type (MetaWindow *window)
|
|||||||
atoms[i] == window->display->atom__NET_WM_WINDOW_TYPE_DOCK ||
|
atoms[i] == window->display->atom__NET_WM_WINDOW_TYPE_DOCK ||
|
||||||
atoms[i] == window->display->atom__NET_WM_WINDOW_TYPE_TOOLBAR ||
|
atoms[i] == window->display->atom__NET_WM_WINDOW_TYPE_TOOLBAR ||
|
||||||
atoms[i] == window->display->atom__NET_WM_WINDOW_TYPE_MENU ||
|
atoms[i] == window->display->atom__NET_WM_WINDOW_TYPE_MENU ||
|
||||||
atoms[i] == window->display->atom__NET_WM_WINDOW_TYPE_DIALOG ||
|
|
||||||
atoms[i] == window->display->atom__NET_WM_WINDOW_TYPE_NORMAL ||
|
|
||||||
atoms[i] == window->display->atom__NET_WM_WINDOW_TYPE_UTILITY ||
|
atoms[i] == window->display->atom__NET_WM_WINDOW_TYPE_UTILITY ||
|
||||||
atoms[i] == window->display->atom__NET_WM_WINDOW_TYPE_SPLASH)
|
atoms[i] == window->display->atom__NET_WM_WINDOW_TYPE_SPLASH ||
|
||||||
|
atoms[i] == window->display->atom__NET_WM_WINDOW_TYPE_DIALOG ||
|
||||||
|
atoms[i] ==
|
||||||
|
window->display->atom__NET_WM_WINDOW_TYPE_DROPDOWN_MENU ||
|
||||||
|
atoms[i] == window->display->atom__NET_WM_WINDOW_TYPE_POPUP_MENU ||
|
||||||
|
atoms[i] == window->display->atom__NET_WM_WINDOW_TYPE_TOOLTIP ||
|
||||||
|
atoms[i] ==
|
||||||
|
window->display->atom__NET_WM_WINDOW_TYPE_NOTIFICATION ||
|
||||||
|
atoms[i] == window->display->atom__NET_WM_WINDOW_TYPE_COMBO ||
|
||||||
|
atoms[i] == window->display->atom__NET_WM_WINDOW_TYPE_DND ||
|
||||||
|
atoms[i] == window->display->atom__NET_WM_WINDOW_TYPE_NORMAL)
|
||||||
{
|
{
|
||||||
window->type_atom = atoms[i];
|
window->type_atom = atoms[i];
|
||||||
break;
|
break;
|
||||||
@ -5922,6 +6222,11 @@ meta_window_update_icon_now (MetaWindow *window)
|
|||||||
window->icon = icon;
|
window->icon = icon;
|
||||||
window->mini_icon = mini_icon;
|
window->mini_icon = mini_icon;
|
||||||
|
|
||||||
|
g_object_freeze_notify (G_OBJECT (window));
|
||||||
|
g_object_notify (G_OBJECT (window), "icon");
|
||||||
|
g_object_notify (G_OBJECT (window), "mini-icon");
|
||||||
|
g_object_thaw_notify (G_OBJECT (window));
|
||||||
|
|
||||||
redraw_icon (window);
|
redraw_icon (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6177,7 +6482,24 @@ recalc_window_type (MetaWindow *window)
|
|||||||
|
|
||||||
old_type = window->type;
|
old_type = window->type;
|
||||||
|
|
||||||
if (window->type_atom != None)
|
if (window->override_redirect)
|
||||||
|
{
|
||||||
|
if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_DROPDOWN_MENU)
|
||||||
|
window->type = META_WINDOW_DROPDOWN_MENU;
|
||||||
|
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_POPUP_MENU)
|
||||||
|
window->type = META_WINDOW_POPUP_MENU;
|
||||||
|
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_TOOLTIP)
|
||||||
|
window->type = META_WINDOW_TOOLTIP;
|
||||||
|
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_NOTIFICATION)
|
||||||
|
window->type = META_WINDOW_NOTIFICATION;
|
||||||
|
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_COMBO)
|
||||||
|
window->type = META_WINDOW_COMBO;
|
||||||
|
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_DND)
|
||||||
|
window->type = META_WINDOW_DND;
|
||||||
|
else
|
||||||
|
window->type = META_WINDOW_OVERRIDE_OTHER;
|
||||||
|
}
|
||||||
|
else if (window->type_atom != None)
|
||||||
{
|
{
|
||||||
if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_DESKTOP)
|
if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_DESKTOP)
|
||||||
window->type = META_WINDOW_DESKTOP;
|
window->type = META_WINDOW_DESKTOP;
|
||||||
@ -6187,14 +6509,14 @@ recalc_window_type (MetaWindow *window)
|
|||||||
window->type = META_WINDOW_TOOLBAR;
|
window->type = META_WINDOW_TOOLBAR;
|
||||||
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_MENU)
|
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_MENU)
|
||||||
window->type = META_WINDOW_MENU;
|
window->type = META_WINDOW_MENU;
|
||||||
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_DIALOG)
|
|
||||||
window->type = META_WINDOW_DIALOG;
|
|
||||||
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_NORMAL)
|
|
||||||
window->type = META_WINDOW_NORMAL;
|
|
||||||
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_UTILITY)
|
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_UTILITY)
|
||||||
window->type = META_WINDOW_UTILITY;
|
window->type = META_WINDOW_UTILITY;
|
||||||
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_SPLASH)
|
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_SPLASH)
|
||||||
window->type = META_WINDOW_SPLASHSCREEN;
|
window->type = META_WINDOW_SPLASHSCREEN;
|
||||||
|
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_DIALOG)
|
||||||
|
window->type = META_WINDOW_DIALOG;
|
||||||
|
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_NORMAL)
|
||||||
|
window->type = META_WINDOW_NORMAL;
|
||||||
else
|
else
|
||||||
meta_bug ("Set a type atom for %s that wasn't handled in recalc_window_type\n",
|
meta_bug ("Set a type atom for %s that wasn't handled in recalc_window_type\n",
|
||||||
window->desc);
|
window->desc);
|
||||||
@ -6219,7 +6541,8 @@ recalc_window_type (MetaWindow *window)
|
|||||||
{
|
{
|
||||||
recalc_window_features (window);
|
recalc_window_features (window);
|
||||||
|
|
||||||
set_net_wm_state (window);
|
if (!window->override_redirect)
|
||||||
|
set_net_wm_state (window);
|
||||||
|
|
||||||
/* Update frame */
|
/* Update frame */
|
||||||
if (window->decorated)
|
if (window->decorated)
|
||||||
@ -6370,12 +6693,14 @@ recalc_window_features (MetaWindow *window)
|
|||||||
window->decorated = FALSE;
|
window->decorated = FALSE;
|
||||||
|
|
||||||
if (window->type == META_WINDOW_DESKTOP ||
|
if (window->type == META_WINDOW_DESKTOP ||
|
||||||
window->type == META_WINDOW_DOCK)
|
window->type == META_WINDOW_DOCK ||
|
||||||
|
window->override_redirect)
|
||||||
window->always_sticky = TRUE;
|
window->always_sticky = TRUE;
|
||||||
|
|
||||||
if (window->type == META_WINDOW_DESKTOP ||
|
if (window->type == META_WINDOW_DESKTOP ||
|
||||||
window->type == META_WINDOW_DOCK ||
|
window->type == META_WINDOW_DOCK ||
|
||||||
window->type == META_WINDOW_SPLASHSCREEN)
|
window->type == META_WINDOW_SPLASHSCREEN ||
|
||||||
|
window->override_redirect)
|
||||||
{
|
{
|
||||||
window->decorated = FALSE;
|
window->decorated = FALSE;
|
||||||
window->has_close_func = FALSE;
|
window->has_close_func = FALSE;
|
||||||
@ -6463,6 +6788,13 @@ recalc_window_features (MetaWindow *window)
|
|||||||
case META_WINDOW_MENU:
|
case META_WINDOW_MENU:
|
||||||
case META_WINDOW_UTILITY:
|
case META_WINDOW_UTILITY:
|
||||||
case META_WINDOW_SPLASHSCREEN:
|
case META_WINDOW_SPLASHSCREEN:
|
||||||
|
case META_WINDOW_DROPDOWN_MENU:
|
||||||
|
case META_WINDOW_POPUP_MENU:
|
||||||
|
case META_WINDOW_TOOLTIP:
|
||||||
|
case META_WINDOW_NOTIFICATION:
|
||||||
|
case META_WINDOW_COMBO:
|
||||||
|
case META_WINDOW_DND:
|
||||||
|
case META_WINDOW_OVERRIDE_OTHER:
|
||||||
window->skip_taskbar = TRUE;
|
window->skip_taskbar = TRUE;
|
||||||
window->skip_pager = TRUE;
|
window->skip_pager = TRUE;
|
||||||
break;
|
break;
|
||||||
@ -8206,6 +8538,10 @@ meta_window_set_demands_attention (MetaWindow *window)
|
|||||||
/* windows on other workspaces are necessarily obscured */
|
/* windows on other workspaces are necessarily obscured */
|
||||||
obscured = TRUE;
|
obscured = TRUE;
|
||||||
}
|
}
|
||||||
|
else if (window->minimized)
|
||||||
|
{
|
||||||
|
obscured = TRUE;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
meta_window_get_outer_rect (window, &candidate_rect);
|
meta_window_get_outer_rect (window, &candidate_rect);
|
||||||
@ -8230,21 +8566,26 @@ meta_window_set_demands_attention (MetaWindow *window)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (obscured)
|
||||||
|
{
|
||||||
|
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||||
|
"Marking %s as needing attention\n",
|
||||||
|
window->desc);
|
||||||
|
|
||||||
|
window->wm_state_demands_attention = TRUE;
|
||||||
|
set_net_wm_state (window);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
/* If the window's in full view, there's no point setting the flag. */
|
/* If the window's in full view, there's no point setting the flag. */
|
||||||
|
|
||||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||||
"Not marking %s as needing attention because it's in full view\n",
|
"Not marking %s as needing attention because "
|
||||||
window->desc);
|
"it's in full view\n",
|
||||||
return;
|
window->desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Otherwise, go ahead and set the flag. */
|
|
||||||
|
|
||||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
|
||||||
"Marking %s as needing attention\n", window->desc);
|
|
||||||
|
|
||||||
window->wm_state_demands_attention = TRUE;
|
|
||||||
set_net_wm_state (window);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -8300,13 +8641,13 @@ meta_window_get_xwindow (MetaWindow *window)
|
|||||||
}
|
}
|
||||||
|
|
||||||
MetaWindowType
|
MetaWindowType
|
||||||
meta_window_get_type (MetaWindow *window)
|
meta_window_get_window_type (MetaWindow *window)
|
||||||
{
|
{
|
||||||
return window->type;
|
return window->type;
|
||||||
}
|
}
|
||||||
|
|
||||||
Atom
|
Atom
|
||||||
meta_window_get_type_atom (MetaWindow *window)
|
meta_window_get_window_type_atom (MetaWindow *window)
|
||||||
{
|
{
|
||||||
return window->type_atom;
|
return window->type_atom;
|
||||||
}
|
}
|
||||||
@ -8340,3 +8681,29 @@ meta_window_get_description (MetaWindow *window)
|
|||||||
|
|
||||||
return window->desc;
|
return window->desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void *
|
||||||
|
meta_window_get_compositor_private (MetaWindow *window)
|
||||||
|
{
|
||||||
|
if (!window)
|
||||||
|
return NULL;
|
||||||
|
return window->compositor_private;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_window_set_compositor_private (MetaWindow *window, void *priv)
|
||||||
|
{
|
||||||
|
if (!window)
|
||||||
|
return;
|
||||||
|
window->compositor_private = priv;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *
|
||||||
|
meta_window_get_role (MetaWindow *window)
|
||||||
|
{
|
||||||
|
if (!window)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return window->role;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
|
|
||||||
struct _MetaWorkspace
|
struct _MetaWorkspace
|
||||||
{
|
{
|
||||||
|
GObject parent_instance;
|
||||||
MetaScreen *screen;
|
MetaScreen *screen;
|
||||||
|
|
||||||
GList *windows;
|
GList *windows;
|
||||||
@ -49,6 +50,7 @@ struct _MetaWorkspace
|
|||||||
MetaRectangle *work_area_xinerama;
|
MetaRectangle *work_area_xinerama;
|
||||||
GList *screen_region;
|
GList *screen_region;
|
||||||
GList **xinerama_region;
|
GList **xinerama_region;
|
||||||
|
gint n_xinerama_regions;
|
||||||
GList *screen_edges;
|
GList *screen_edges;
|
||||||
GList *xinerama_edges;
|
GList *xinerama_edges;
|
||||||
GSList *all_struts;
|
GSList *all_struts;
|
||||||
@ -57,8 +59,13 @@ struct _MetaWorkspace
|
|||||||
guint showing_desktop : 1;
|
guint showing_desktop : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct _MetaWorkspaceClass
|
||||||
|
{
|
||||||
|
GObjectClass parent_class;
|
||||||
|
};
|
||||||
|
|
||||||
MetaWorkspace* meta_workspace_new (MetaScreen *screen);
|
MetaWorkspace* meta_workspace_new (MetaScreen *screen);
|
||||||
void meta_workspace_free (MetaWorkspace *workspace);
|
void meta_workspace_remove (MetaWorkspace *workspace);
|
||||||
void meta_workspace_add_window (MetaWorkspace *workspace,
|
void meta_workspace_add_window (MetaWorkspace *workspace,
|
||||||
MetaWindow *window);
|
MetaWindow *window);
|
||||||
void meta_workspace_remove_window (MetaWorkspace *workspace,
|
void meta_workspace_remove_window (MetaWorkspace *workspace,
|
||||||
|
@ -45,6 +45,27 @@ static void free_this (gpointer candidate,
|
|||||||
gpointer dummy);
|
gpointer dummy);
|
||||||
static void workspace_free_struts (MetaWorkspace *workspace);
|
static void workspace_free_struts (MetaWorkspace *workspace);
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (MetaWorkspace, meta_workspace, G_TYPE_OBJECT);
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_workspace_finalize (GObject *object)
|
||||||
|
{
|
||||||
|
/* Actual freeing done in meta_workspace_remove() for now */
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_workspace_class_init (MetaWorkspaceClass *klass)
|
||||||
|
{
|
||||||
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
|
object_class->finalize = meta_workspace_finalize;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_workspace_init (MetaWorkspace *workspace)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
maybe_add_to_list (MetaScreen *screen, MetaWindow *window, gpointer data)
|
maybe_add_to_list (MetaScreen *screen, MetaWindow *window, gpointer data)
|
||||||
{
|
{
|
||||||
@ -59,7 +80,7 @@ meta_workspace_new (MetaScreen *screen)
|
|||||||
{
|
{
|
||||||
MetaWorkspace *workspace;
|
MetaWorkspace *workspace;
|
||||||
|
|
||||||
workspace = g_new (MetaWorkspace, 1);
|
workspace = g_object_new (META_TYPE_WORKSPACE, NULL);
|
||||||
|
|
||||||
workspace->screen = screen;
|
workspace->screen = screen;
|
||||||
workspace->screen->workspaces =
|
workspace->screen->workspaces =
|
||||||
@ -112,7 +133,7 @@ workspace_free_struts (MetaWorkspace *workspace)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_workspace_free (MetaWorkspace *workspace)
|
meta_workspace_remove (MetaWorkspace *workspace)
|
||||||
{
|
{
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
MetaScreen *screen;
|
MetaScreen *screen;
|
||||||
@ -168,7 +189,7 @@ meta_workspace_free (MetaWorkspace *workspace)
|
|||||||
meta_rectangle_free_list_and_elements (workspace->xinerama_edges);
|
meta_rectangle_free_list_and_elements (workspace->xinerama_edges);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (workspace);
|
g_object_unref (workspace);
|
||||||
|
|
||||||
/* don't bother to reset names, pagers can just ignore
|
/* don't bother to reset names, pagers can just ignore
|
||||||
* extra ones
|
* extra ones
|
||||||
|
@ -199,7 +199,7 @@ get_property (MetaDisplay *display,
|
|||||||
False, req_type, &results->type, &results->format,
|
False, req_type, &results->type, &results->format,
|
||||||
&results->n_items,
|
&results->n_items,
|
||||||
&results->bytes_after,
|
&results->bytes_after,
|
||||||
(guchar **)&results->prop) != Success ||
|
&results->prop) != Success ||
|
||||||
results->type == None)
|
results->type == None)
|
||||||
{
|
{
|
||||||
if (results->prop)
|
if (results->prop)
|
||||||
@ -673,9 +673,9 @@ meta_prop_get_text_property (MetaDisplay *display,
|
|||||||
/* From Xmd.h */
|
/* From Xmd.h */
|
||||||
#ifndef cvtINT32toInt
|
#ifndef cvtINT32toInt
|
||||||
#if SIZEOF_VOID_P == 8
|
#if SIZEOF_VOID_P == 8
|
||||||
#define cvtINT8toInt(val) (((val) & 0x00000080) ? ((val) | 0xffffffffffffff00) : (val))
|
#define cvtINT8toInt(val) ((((unsigned int)val) & 0x00000080) ? (((unsigned int)val) | 0xffffffffffffff00) : ((unsigned int)val))
|
||||||
#define cvtINT16toInt(val) (((val) & 0x00008000) ? ((val) | 0xffffffffffff0000) : (val))
|
#define cvtINT16toInt(val) ((((unsigned int)val) & 0x00008000) ? (((unsigned int)val) | 0xffffffffffff0000) : ((unsigned int)val))
|
||||||
#define cvtINT32toInt(val) (((val) & 0x80000000) ? ((val) | 0xffffffff00000000) : (val))
|
#define cvtINT32toInt(val) ((((unsigned int)val) & 0x80000000) ? (((unsigned int)val) | 0xffffffff00000000) : ((unsigned int)val))
|
||||||
#define cvtINT8toShort(val) cvtINT8toInt(val)
|
#define cvtINT8toShort(val) cvtINT8toInt(val)
|
||||||
#define cvtINT16toShort(val) cvtINT16toInt(val)
|
#define cvtINT16toShort(val) cvtINT16toInt(val)
|
||||||
#define cvtINT32toShort(val) cvtINT32toInt(val)
|
#define cvtINT32toShort(val) cvtINT32toInt(val)
|
||||||
@ -1051,7 +1051,7 @@ meta_prop_get_values (MetaDisplay *display,
|
|||||||
&results.type, &results.format,
|
&results.type, &results.format,
|
||||||
&results.n_items,
|
&results.n_items,
|
||||||
&results.bytes_after,
|
&results.bytes_after,
|
||||||
(unsigned char **)(&results.prop)) != Success ||
|
&results.prop) != Success ||
|
||||||
results.type == None)
|
results.type == None)
|
||||||
{
|
{
|
||||||
values[i].type = META_PROP_VALUE_INVALID;
|
values[i].type = META_PROP_VALUE_INVALID;
|
||||||
|
386
src/include/all-keybindings.h
Normal file
386
src/include/all-keybindings.h
Normal file
@ -0,0 +1,386 @@
|
|||||||
|
/* -*- 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, NULL,
|
||||||
|
_("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"))
|
||||||
|
|
||||||
|
/***********************************/
|
||||||
|
|
||||||
|
keybind (show_desktop, handle_show_desktop, 0, 0, "<Control><Alt>d",
|
||||||
|
_("Hide all normal windows and set focus to the desktop background"))
|
||||||
|
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"))
|
||||||
|
|
||||||
|
/* 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 metacity.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, NULL,
|
||||||
|
_("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, "<Alt>F10",
|
||||||
|
_("Maximize window"))
|
||||||
|
keybind (unmaximize, handle_unmaximize, 0, BINDING_PER_WINDOW, "<Alt>F5",
|
||||||
|
_("Unmaximize 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_nw, 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 */
|
||||||
|
|
@ -33,7 +33,7 @@
|
|||||||
* again.
|
* again.
|
||||||
*
|
*
|
||||||
* If you also define EWMH_ATOMS_ONLY then you will only get _NET_WM_*
|
* If you also define EWMH_ATOMS_ONLY then you will only get _NET_WM_*
|
||||||
* hints rather than all of them.
|
* atoms rather than all of them.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef item
|
#ifndef item
|
||||||
@ -106,7 +106,15 @@ item(_NET_WM_WINDOW_TYPE_DESKTOP)
|
|||||||
item(_NET_WM_WINDOW_TYPE_DOCK)
|
item(_NET_WM_WINDOW_TYPE_DOCK)
|
||||||
item(_NET_WM_WINDOW_TYPE_TOOLBAR)
|
item(_NET_WM_WINDOW_TYPE_TOOLBAR)
|
||||||
item(_NET_WM_WINDOW_TYPE_MENU)
|
item(_NET_WM_WINDOW_TYPE_MENU)
|
||||||
|
item(_NET_WM_WINDOW_TYPE_UTILITY)
|
||||||
|
item(_NET_WM_WINDOW_TYPE_SPLASH)
|
||||||
item(_NET_WM_WINDOW_TYPE_DIALOG)
|
item(_NET_WM_WINDOW_TYPE_DIALOG)
|
||||||
|
item(_NET_WM_WINDOW_TYPE_DROPDOWN_MENU)
|
||||||
|
item(_NET_WM_WINDOW_TYPE_POPUP_MENU)
|
||||||
|
item(_NET_WM_WINDOW_TYPE_TOOLTIP)
|
||||||
|
item(_NET_WM_WINDOW_TYPE_NOTIFICATION)
|
||||||
|
item(_NET_WM_WINDOW_TYPE_COMBO)
|
||||||
|
item(_NET_WM_WINDOW_TYPE_DND)
|
||||||
item(_NET_WM_WINDOW_TYPE_NORMAL)
|
item(_NET_WM_WINDOW_TYPE_NORMAL)
|
||||||
item(_NET_WM_STATE_MODAL)
|
item(_NET_WM_STATE_MODAL)
|
||||||
item(_NET_CLIENT_LIST)
|
item(_NET_CLIENT_LIST)
|
||||||
@ -120,9 +128,6 @@ item(_NET_WM_MOVERESIZE)
|
|||||||
item(_NET_ACTIVE_WINDOW)
|
item(_NET_ACTIVE_WINDOW)
|
||||||
item(_NET_WM_STRUT)
|
item(_NET_WM_STRUT)
|
||||||
item(_NET_WM_STATE_HIDDEN)
|
item(_NET_WM_STATE_HIDDEN)
|
||||||
item(_NET_WM_WINDOW_TYPE_UTILITY)
|
|
||||||
item(_NET_WM_WINDOW_TYPE_SPLASH)
|
|
||||||
item(_NET_WM_WINDOW_TYPE_DND)
|
|
||||||
item(_NET_WM_STATE_FULLSCREEN)
|
item(_NET_WM_STATE_FULLSCREEN)
|
||||||
item(_NET_WM_PING)
|
item(_NET_WM_PING)
|
||||||
item(_NET_WM_PID)
|
item(_NET_WM_PID)
|
||||||
@ -155,6 +160,8 @@ item(_NET_DESKTOP_VIEWPORT)
|
|||||||
item(_NET_WM_USER_TIME_WINDOW)
|
item(_NET_WM_USER_TIME_WINDOW)
|
||||||
item(_NET_WM_ACTION_ABOVE)
|
item(_NET_WM_ACTION_ABOVE)
|
||||||
item(_NET_WM_ACTION_BELOW)
|
item(_NET_WM_ACTION_BELOW)
|
||||||
|
item(_NET_WM_STATE_STICKY)
|
||||||
|
item(_NET_WM_FULLSCREEN_MONITORS)
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* We apparently never use: */
|
/* We apparently never use: */
|
||||||
|
@ -103,6 +103,11 @@ gboolean meta_rectangle_intersect (const MetaRectangle *src1,
|
|||||||
gboolean meta_rectangle_equal (const MetaRectangle *src1,
|
gboolean meta_rectangle_equal (const MetaRectangle *src1,
|
||||||
const MetaRectangle *src2);
|
const MetaRectangle *src2);
|
||||||
|
|
||||||
|
/* Find the bounding box of the union of two rectangles */
|
||||||
|
void meta_rectangle_union (const MetaRectangle *rect1,
|
||||||
|
const MetaRectangle *rect2,
|
||||||
|
MetaRectangle *dest);
|
||||||
|
|
||||||
/* overlap is similar to intersect but doesn't provide location of
|
/* overlap is similar to intersect but doesn't provide location of
|
||||||
* intersection information.
|
* intersection information.
|
||||||
*/
|
*/
|
||||||
|
@ -32,24 +32,27 @@
|
|||||||
|
|
||||||
typedef enum _MetaCompWindowType
|
typedef enum _MetaCompWindowType
|
||||||
{
|
{
|
||||||
/*
|
META_COMP_WINDOW_NORMAL = META_WINDOW_NORMAL,
|
||||||
* Types shared with MetaWindow
|
META_COMP_WINDOW_DESKTOP = META_WINDOW_DESKTOP,
|
||||||
*/
|
META_COMP_WINDOW_DOCK = META_WINDOW_DOCK,
|
||||||
META_COMP_WINDOW_NORMAL = META_WINDOW_NORMAL,
|
META_COMP_WINDOW_DIALOG = META_WINDOW_DIALOG,
|
||||||
META_COMP_WINDOW_DESKTOP = META_WINDOW_DESKTOP,
|
META_COMP_WINDOW_MODAL_DIALOG = META_WINDOW_MODAL_DIALOG,
|
||||||
META_COMP_WINDOW_DOCK = META_WINDOW_DOCK,
|
META_COMP_WINDOW_TOOLBAR = META_WINDOW_TOOLBAR,
|
||||||
META_COMP_WINDOW_MENU = META_WINDOW_MENU,
|
META_COMP_WINDOW_MENU = META_WINDOW_MENU,
|
||||||
|
META_COMP_WINDOW_UTILITY = META_WINDOW_UTILITY,
|
||||||
|
META_COMP_WINDOW_SPLASHSCREEN = META_WINDOW_SPLASHSCREEN,
|
||||||
|
|
||||||
|
/* override redirect window types, */
|
||||||
|
META_COMP_WINDOW_DROPDOWN_MENU = META_WINDOW_DROPDOWN_MENU,
|
||||||
|
META_COMP_WINDOW_POPUP_MENU = META_WINDOW_POPUP_MENU,
|
||||||
|
META_COMP_WINDOW_TOOLTIP = META_WINDOW_TOOLTIP,
|
||||||
|
META_COMP_WINDOW_NOTIFICATION = META_WINDOW_NOTIFICATION,
|
||||||
|
META_COMP_WINDOW_COMBO = META_WINDOW_COMBO,
|
||||||
|
META_COMP_WINDOW_DND = META_WINDOW_DND,
|
||||||
|
META_COMP_WINDOW_OVERRIDE_OTHER = META_WINDOW_OVERRIDE_OTHER
|
||||||
|
|
||||||
/*
|
|
||||||
* Extended types that WM does not care about, but we do.
|
|
||||||
*/
|
|
||||||
META_COMP_WINDOW_TOOLTIP = 0xf000,
|
|
||||||
META_COMP_WINDOW_DROP_DOWN_MENU,
|
|
||||||
META_COMP_WINDOW_DND,
|
|
||||||
META_COMP_WINDOW_OVERRIDE,
|
|
||||||
} MetaCompWindowType;
|
} MetaCompWindowType;
|
||||||
|
|
||||||
|
|
||||||
#ifdef WITH_CLUTTER
|
#ifdef WITH_CLUTTER
|
||||||
extern int meta_compositor_can_use_clutter__;
|
extern int meta_compositor_can_use_clutter__;
|
||||||
#endif
|
#endif
|
||||||
@ -62,19 +65,17 @@ void meta_compositor_unmanage_screen (MetaCompositor *compositor,
|
|||||||
MetaScreen *screen);
|
MetaScreen *screen);
|
||||||
|
|
||||||
void meta_compositor_add_window (MetaCompositor *compositor,
|
void meta_compositor_add_window (MetaCompositor *compositor,
|
||||||
MetaWindow *window,
|
MetaWindow *window);
|
||||||
Window xwindow,
|
|
||||||
XWindowAttributes *attrs);
|
|
||||||
void meta_compositor_remove_window (MetaCompositor *compositor,
|
void meta_compositor_remove_window (MetaCompositor *compositor,
|
||||||
Window xwindow);
|
MetaWindow *window);
|
||||||
|
|
||||||
void meta_compositor_set_updates (MetaCompositor *compositor,
|
void meta_compositor_set_updates (MetaCompositor *compositor,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
gboolean updates);
|
gboolean updates);
|
||||||
|
|
||||||
void meta_compositor_process_event (MetaCompositor *compositor,
|
gboolean meta_compositor_process_event (MetaCompositor *compositor,
|
||||||
XEvent *event,
|
XEvent *event,
|
||||||
MetaWindow *window);
|
MetaWindow *window);
|
||||||
Pixmap meta_compositor_get_window_pixmap (MetaCompositor *compositor,
|
Pixmap meta_compositor_get_window_pixmap (MetaCompositor *compositor,
|
||||||
MetaWindow *window);
|
MetaWindow *window);
|
||||||
void meta_compositor_set_active_window (MetaCompositor *compositor,
|
void meta_compositor_set_active_window (MetaCompositor *compositor,
|
||||||
@ -94,28 +95,34 @@ void meta_compositor_free_window (MetaCompositor *compositor,
|
|||||||
MetaWindow *window);
|
MetaWindow *window);
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_compositor_destroy_window (MetaCompositor *compositor,
|
meta_compositor_map_window (MetaCompositor *compositor,
|
||||||
MetaWindow *window);
|
MetaWindow *window);
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_compositor_unmap_window (MetaCompositor *compositor,
|
||||||
|
MetaWindow *window);
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_compositor_minimize_window (MetaCompositor *compositor,
|
meta_compositor_minimize_window (MetaCompositor *compositor,
|
||||||
MetaWindow *window);
|
MetaWindow *window,
|
||||||
|
MetaRectangle *window_rect,
|
||||||
|
MetaRectangle *icon_rect);
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_compositor_unminimize_window (MetaCompositor *compositor,
|
||||||
|
MetaWindow *window,
|
||||||
|
MetaRectangle *window_rect,
|
||||||
|
MetaRectangle *icon_rect);
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_compositor_maximize_window (MetaCompositor *compositor,
|
meta_compositor_maximize_window (MetaCompositor *compositor,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
int x,
|
MetaRectangle *window_rect);
|
||||||
int y,
|
|
||||||
int width,
|
|
||||||
int height);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_compositor_unmaximize_window (MetaCompositor *compositor,
|
meta_compositor_unmaximize_window (MetaCompositor *compositor,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
int x,
|
MetaRectangle *window_rect);
|
||||||
int y,
|
|
||||||
int width,
|
|
||||||
int height);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_compositor_update_workspace_geometry (MetaCompositor *compositor,
|
meta_compositor_update_workspace_geometry (MetaCompositor *compositor,
|
||||||
@ -139,6 +146,14 @@ meta_compositor_set_window_hidden (MetaCompositor *compositor,
|
|||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
gboolean hidden);
|
gboolean hidden);
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_compositor_sync_window_geometry (MetaCompositor *compositor,
|
||||||
|
MetaWindow *window);
|
||||||
|
void
|
||||||
|
meta_compositor_sync_screen_size (MetaCompositor *compositor,
|
||||||
|
MetaScreen *screen,
|
||||||
|
guint width,
|
||||||
|
guint height);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,11 +22,22 @@
|
|||||||
#ifndef META_DISPLAY_H
|
#ifndef META_DISPLAY_H
|
||||||
#define META_DISPLAY_H
|
#define META_DISPLAY_H
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib-object.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
typedef struct _MetaDisplayClass MetaDisplayClass;
|
||||||
|
|
||||||
|
#define META_TYPE_DISPLAY (meta_display_get_type ())
|
||||||
|
#define META_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), META_TYPE_DISPLAY, MetaDisplay))
|
||||||
|
#define META_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_DISPLAY, MetaDisplayClass))
|
||||||
|
#define META_IS_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), META_TYPE_DISPLAY))
|
||||||
|
#define META_IS_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_DISPLAY))
|
||||||
|
#define META_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_DISPLAY, MetaDisplayClass))
|
||||||
|
|
||||||
|
GType meta_display_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
#define meta_XFree(p) do { if ((p)) XFree ((p)); } while (0)
|
#define meta_XFree(p) do { if ((p)) XFree ((p)); } while (0)
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -24,7 +24,9 @@
|
|||||||
#ifndef META_GROUP_H
|
#ifndef META_GROUP_H
|
||||||
#define META_GROUP_H
|
#define META_GROUP_H
|
||||||
|
|
||||||
#include "window-private.h"
|
#include <X11/Xlib.h>
|
||||||
|
#include <glib.h>
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
/* note, can return NULL */
|
/* note, can return NULL */
|
||||||
MetaGroup* meta_window_get_group (MetaWindow *window);
|
MetaGroup* meta_window_get_group (MetaWindow *window);
|
||||||
@ -43,6 +45,8 @@ void meta_group_update_layers (MetaGroup *group);
|
|||||||
|
|
||||||
const char* meta_group_get_startup_id (MetaGroup *group);
|
const char* meta_group_get_startup_id (MetaGroup *group);
|
||||||
|
|
||||||
|
int meta_group_get_size (MetaGroup *group);
|
||||||
|
|
||||||
gboolean meta_group_property_notify (MetaGroup *group,
|
gboolean meta_group_property_notify (MetaGroup *group,
|
||||||
XEvent *event);
|
XEvent *event);
|
||||||
|
|
@ -35,7 +35,7 @@ typedef enum
|
|||||||
/* exit immediately */
|
/* exit immediately */
|
||||||
void meta_exit (MetaExitCode code);
|
void meta_exit (MetaExitCode code);
|
||||||
|
|
||||||
/* g_main_quit() then fall out of main() */
|
/* g_main_loop_quit() then fall out of main() */
|
||||||
void meta_quit (MetaExitCode code);
|
void meta_quit (MetaExitCode code);
|
||||||
|
|
||||||
void meta_restart (void);
|
void meta_restart (void);
|
||||||
|
@ -33,20 +33,8 @@
|
|||||||
#include <gmodule.h>
|
#include <gmodule.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file defines the plugin API.
|
* FIXME -- move these to a private include
|
||||||
*
|
* Required by plugin manager.
|
||||||
* Effects plugin is shared library loaded via g_module_open(); it is
|
|
||||||
* recommended that the GModule API is used (otherwise you are on your own to
|
|
||||||
* do proper plugin clean up when the module is unloaded).
|
|
||||||
*
|
|
||||||
* The plugin interface is exported via the MutterPlugin struct.
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct MutterPlugin MutterPlugin;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Effect flags: identify events that the plugin can handle, used by kill_effect
|
|
||||||
* function.
|
|
||||||
*/
|
*/
|
||||||
#define MUTTER_PLUGIN_MINIMIZE (1<<0)
|
#define MUTTER_PLUGIN_MINIMIZE (1<<0)
|
||||||
#define MUTTER_PLUGIN_MAXIMIZE (1<<1)
|
#define MUTTER_PLUGIN_MAXIMIZE (1<<1)
|
||||||
@ -57,19 +45,96 @@ typedef struct MutterPlugin MutterPlugin;
|
|||||||
|
|
||||||
#define MUTTER_PLUGIN_ALL_EFFECTS (~0)
|
#define MUTTER_PLUGIN_ALL_EFFECTS (~0)
|
||||||
|
|
||||||
#define MUTTER_DECLARE_PLUGIN() G_MODULE_EXPORT MutterPlugin mutter_plugin = \
|
#define MUTTER_TYPE_PLUGIN (mutter_plugin_get_type ())
|
||||||
{ \
|
#define MUTTER_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MUTTER_TYPE_PLUGIN, MutterPlugin))
|
||||||
METACITY_MAJOR_VERSION, \
|
#define MUTTER_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MUTTER_TYPE_PLUGIN, MutterPluginClass))
|
||||||
METACITY_MINOR_VERSION, \
|
#define MUTTER_IS_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MUTTER_PLUGIN_TYPE))
|
||||||
METACITY_MICRO_VERSION, \
|
#define MUTTER_IS_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MUTTER_TYPE_PLUGIN))
|
||||||
METACITY_CLUTTER_PLUGIN_API_VERSION \
|
#define MUTTER_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MUTTER_TYPE_PLUGIN, MutterPluginClass))
|
||||||
}; \
|
|
||||||
static inline MutterPlugin * mutter_get_plugin () \
|
|
||||||
{ \
|
|
||||||
return &mutter_plugin; \
|
|
||||||
}
|
|
||||||
|
|
||||||
struct MutterPlugin
|
typedef struct _MutterPlugin MutterPlugin;
|
||||||
|
typedef struct _MutterPluginClass MutterPluginClass;
|
||||||
|
typedef struct _MutterPluginVersion MutterPluginVersion;
|
||||||
|
typedef struct _MutterPluginInfo MutterPluginInfo;
|
||||||
|
typedef struct _MutterPluginPrivate MutterPluginPrivate;
|
||||||
|
|
||||||
|
struct _MutterPlugin
|
||||||
|
{
|
||||||
|
GObject parent;
|
||||||
|
|
||||||
|
MutterPluginPrivate *priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _MutterPluginClass
|
||||||
|
{
|
||||||
|
GObjectClass parent_class;
|
||||||
|
|
||||||
|
void (*minimize) (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor);
|
||||||
|
|
||||||
|
void (*maximize) (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor,
|
||||||
|
gint x,
|
||||||
|
gint y,
|
||||||
|
gint width,
|
||||||
|
gint height);
|
||||||
|
|
||||||
|
void (*unmaximize) (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor,
|
||||||
|
gint x,
|
||||||
|
gint y,
|
||||||
|
gint width,
|
||||||
|
gint height);
|
||||||
|
|
||||||
|
void (*map) (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor);
|
||||||
|
|
||||||
|
void (*destroy) (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor);
|
||||||
|
|
||||||
|
void (*switch_workspace) (MutterPlugin *plugin,
|
||||||
|
const GList **actors,
|
||||||
|
gint from,
|
||||||
|
gint to,
|
||||||
|
MetaMotionDirection direction);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Called if an effect should be killed prematurely; the plugin must
|
||||||
|
* call the completed() callback as if the effect terminated naturally.
|
||||||
|
* The events parameter is a bitmask indicating which effects are to be
|
||||||
|
* killed.
|
||||||
|
*/
|
||||||
|
void (*kill_effect) (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor,
|
||||||
|
gulong events);
|
||||||
|
|
||||||
|
/* General XEvent filter. This is fired *before* metacity itself handles
|
||||||
|
* an event. Return TRUE to block any further processing.
|
||||||
|
*/
|
||||||
|
gboolean (*xevent_filter) (MutterPlugin *plugin,
|
||||||
|
XEvent *event);
|
||||||
|
|
||||||
|
const MutterPluginInfo * (*plugin_info) (MutterPlugin *plugin);
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _MutterPluginInfo
|
||||||
|
{
|
||||||
|
const gchar *name;
|
||||||
|
const gchar *version;
|
||||||
|
const gchar *author;
|
||||||
|
const gchar *license;
|
||||||
|
const gchar *description;
|
||||||
|
};
|
||||||
|
|
||||||
|
GType mutter_plugin_get_type (void);
|
||||||
|
|
||||||
|
gulong mutter_plugin_features (MutterPlugin *plugin);
|
||||||
|
gboolean mutter_plugin_disabled (MutterPlugin *plugin);
|
||||||
|
gboolean mutter_plugin_running (MutterPlugin *plugin);
|
||||||
|
gboolean mutter_plugin_debug_mode (MutterPlugin *plugin);
|
||||||
|
const MutterPluginInfo * mutter_plugin_get_info (MutterPlugin *plugin);
|
||||||
|
|
||||||
|
struct _MutterPluginVersion
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Version information; the first three numbers match the Metacity version
|
* Version information; the first three numbers match the Metacity version
|
||||||
@ -83,134 +148,81 @@ struct MutterPlugin
|
|||||||
/*
|
/*
|
||||||
* Version of the plugin API; this is unrelated to the matacity version
|
* Version of the plugin API; this is unrelated to the matacity version
|
||||||
* per se. The API version is checked by the plugin manager and must match
|
* per se. The API version is checked by the plugin manager and must match
|
||||||
* the one used by it (see clutter-plugins/simple.c for sample code).
|
* the one used by it (see clutter-plugins/default.c for sample code).
|
||||||
*/
|
*/
|
||||||
guint version_api;
|
guint version_api;
|
||||||
|
|
||||||
#ifndef MUTTER_BUILDING_PLUGIN
|
|
||||||
const
|
|
||||||
#endif
|
|
||||||
gchar *name; /* Human-readable name for UI */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This function is called once the plugin has been loaded.
|
|
||||||
*
|
|
||||||
* @params is a string containing additional parameters for the plugin and is
|
|
||||||
* specified after the plugin name in the gconf database, separated by a
|
|
||||||
* colon.
|
|
||||||
*
|
|
||||||
* The following parameter tokens need to be handled by all
|
|
||||||
* plugins:
|
|
||||||
*
|
|
||||||
* 'debug'
|
|
||||||
* Indicates running in debug mode; the plugin
|
|
||||||
* might want to print useful debug info, or
|
|
||||||
* extend effect duration, etc.
|
|
||||||
*
|
|
||||||
* 'disable: ...;'
|
|
||||||
*
|
|
||||||
* The disable token indicates that the effects
|
|
||||||
* listed after the colon should be disabled.
|
|
||||||
*
|
|
||||||
* The list is comma-separated, terminated by a
|
|
||||||
* semicolon and consisting of the following
|
|
||||||
* tokens:
|
|
||||||
*
|
|
||||||
* minimize
|
|
||||||
* maximize
|
|
||||||
* unmaximize
|
|
||||||
* map
|
|
||||||
* destroy
|
|
||||||
* switch-workspace
|
|
||||||
*
|
|
||||||
* FIXME: ^^^ Instead of configuring in terms of what should be
|
|
||||||
* disabled, and needing a mechanism for coping with the user
|
|
||||||
* mistakenly not disabling the right things, it might be neater
|
|
||||||
* if plugins were enabled on a per effect basis in the first
|
|
||||||
* place. I.e. in gconf we could have effect:plugin key value
|
|
||||||
* pairs.
|
|
||||||
*/
|
|
||||||
|
|
||||||
gboolean (*do_init) (const char *params);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Event handlers
|
|
||||||
*
|
|
||||||
* Plugins must not make any special assumptions about the nature of
|
|
||||||
* ClutterActor, as the implementation details can change.
|
|
||||||
*
|
|
||||||
* Plugins must restore actor properties on completion (i.e., fade effects
|
|
||||||
* must restore opacity back to the original value, scale effects scale,
|
|
||||||
* etc.).
|
|
||||||
*
|
|
||||||
* On completion, each event handler must call the manager completed()
|
|
||||||
* callback function.
|
|
||||||
*/
|
|
||||||
void (*minimize) (MutterWindow *actor);
|
|
||||||
|
|
||||||
void (*maximize) (MutterWindow *actor,
|
|
||||||
gint x,
|
|
||||||
gint y,
|
|
||||||
gint width,
|
|
||||||
gint height);
|
|
||||||
|
|
||||||
void (*unmaximize) (MutterWindow *actor,
|
|
||||||
gint x,
|
|
||||||
gint y,
|
|
||||||
gint width,
|
|
||||||
gint height);
|
|
||||||
|
|
||||||
void (*map) (MutterWindow *actor);
|
|
||||||
|
|
||||||
void (*destroy) (MutterWindow *actor);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Each actor in the list has a workspace number attached to it using
|
|
||||||
* g_object_set_data() with key MUTTER_PLUGIN_WORKSPACE_KEY;
|
|
||||||
* workspace < 0 indicates the window is sticky (i.e., on all desktops).
|
|
||||||
* TODO: Add accessor for sticky bit in new MutterWindow structure
|
|
||||||
*/
|
|
||||||
void (*switch_workspace) (const GList **actors,
|
|
||||||
gint from,
|
|
||||||
gint to,
|
|
||||||
MetaMotionDirection direction);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Called if an effect should be killed prematurely; the plugin must
|
|
||||||
* call the completed() callback as if the effect terminated naturally.
|
|
||||||
* The events parameter is a bitmask indicating which effects are to be
|
|
||||||
* killed.
|
|
||||||
*/
|
|
||||||
void (*kill_effect) (MutterWindow *actor,
|
|
||||||
gulong events);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The plugin manager will call this function when module should be reloaded.
|
|
||||||
* This happens, for example, when the parameters for the plugin changed.
|
|
||||||
*/
|
|
||||||
gboolean (*reload) (const char *params);
|
|
||||||
|
|
||||||
/* General XEvent filter. This is fired *before* metacity itself handles
|
|
||||||
* an event. Return TRUE to block any further processing.
|
|
||||||
*/
|
|
||||||
gboolean (*xevent_filter) (XEvent *event);
|
|
||||||
|
|
||||||
/* List of PluginWorkspaceRectangles defining the geometry of individual
|
|
||||||
* workspaces. */
|
|
||||||
GList *work_areas;
|
|
||||||
|
|
||||||
void *plugin_private; /* Plugin private data go here; use the plugin init
|
|
||||||
* function to allocate and initialize any private
|
|
||||||
* data.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Private; manager private data. */
|
|
||||||
void *manager_private;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef MUTTER_PLUGIN_FROM_MANAGER_
|
/*
|
||||||
static inline MutterPlugin *mutter_get_plugin ();
|
* Convenience macro to set up the plugin type. Based on GEdit.
|
||||||
#endif
|
*/
|
||||||
|
#define MUTTER_PLUGIN_DECLARE(ObjectName, object_name) \
|
||||||
|
G_MODULE_EXPORT MutterPluginVersion mutter_plugin_version = \
|
||||||
|
{ \
|
||||||
|
METACITY_MAJOR_VERSION, \
|
||||||
|
METACITY_MINOR_VERSION, \
|
||||||
|
METACITY_MICRO_VERSION, \
|
||||||
|
METACITY_CLUTTER_PLUGIN_API_VERSION \
|
||||||
|
}; \
|
||||||
|
\
|
||||||
|
static GType g_define_type_id = 0; \
|
||||||
|
\
|
||||||
|
/* Prototypes */ \
|
||||||
|
G_MODULE_EXPORT \
|
||||||
|
GType object_name##_get_type (void); \
|
||||||
|
\
|
||||||
|
G_MODULE_EXPORT \
|
||||||
|
GType object_name##_register_type (GTypeModule *type_module); \
|
||||||
|
\
|
||||||
|
G_MODULE_EXPORT \
|
||||||
|
GType mutter_plugin_register_type (GTypeModule *type_module); \
|
||||||
|
\
|
||||||
|
GType \
|
||||||
|
object_name##_get_type () \
|
||||||
|
{ \
|
||||||
|
return g_define_type_id; \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
static void object_name##_init (ObjectName *self); \
|
||||||
|
static void object_name##_class_init (ObjectName##Class *klass); \
|
||||||
|
static gpointer object_name##_parent_class = NULL; \
|
||||||
|
static void object_name##_class_intern_init (gpointer klass) \
|
||||||
|
{ \
|
||||||
|
object_name##_parent_class = g_type_class_peek_parent (klass); \
|
||||||
|
object_name##_class_init ((ObjectName##Class *) klass); \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
GType \
|
||||||
|
object_name##_register_type (GTypeModule *type_module) \
|
||||||
|
{ \
|
||||||
|
static const GTypeInfo our_info = \
|
||||||
|
{ \
|
||||||
|
sizeof (ObjectName##Class), \
|
||||||
|
NULL, /* base_init */ \
|
||||||
|
NULL, /* base_finalize */ \
|
||||||
|
(GClassInitFunc) object_name##_class_intern_init, \
|
||||||
|
NULL, \
|
||||||
|
NULL, /* class_data */ \
|
||||||
|
sizeof (ObjectName), \
|
||||||
|
0, /* n_preallocs */ \
|
||||||
|
(GInstanceInitFunc) object_name##_init \
|
||||||
|
}; \
|
||||||
|
\
|
||||||
|
g_define_type_id = g_type_module_register_type (type_module, \
|
||||||
|
MUTTER_TYPE_PLUGIN, \
|
||||||
|
#ObjectName, \
|
||||||
|
&our_info, \
|
||||||
|
0); \
|
||||||
|
\
|
||||||
|
\
|
||||||
|
return g_define_type_id; \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
G_MODULE_EXPORT GType \
|
||||||
|
mutter_plugin_register_type (GTypeModule *type_module) \
|
||||||
|
{ \
|
||||||
|
return object_name##_register_type (type_module); \
|
||||||
|
} \
|
||||||
|
|
||||||
void
|
void
|
||||||
mutter_plugin_effect_completed (MutterPlugin *plugin,
|
mutter_plugin_effect_completed (MutterPlugin *plugin,
|
||||||
@ -252,4 +264,7 @@ mutter_plugin_get_xdisplay (MutterPlugin *plugin);
|
|||||||
MetaScreen *
|
MetaScreen *
|
||||||
mutter_plugin_get_screen (MutterPlugin *plugin);
|
mutter_plugin_get_screen (MutterPlugin *plugin);
|
||||||
|
|
||||||
|
void
|
||||||
|
_mutter_plugin_effect_started (MutterPlugin *plugin);
|
||||||
|
|
||||||
#endif /* MUTTER_PLUGIN_H_ */
|
#endif /* MUTTER_PLUGIN_H_ */
|
||||||
|
@ -44,8 +44,7 @@ typedef enum
|
|||||||
META_PREF_TITLEBAR_FONT,
|
META_PREF_TITLEBAR_FONT,
|
||||||
META_PREF_NUM_WORKSPACES,
|
META_PREF_NUM_WORKSPACES,
|
||||||
META_PREF_APPLICATION_BASED,
|
META_PREF_APPLICATION_BASED,
|
||||||
META_PREF_WINDOW_KEYBINDINGS,
|
META_PREF_KEYBINDINGS,
|
||||||
META_PREF_SCREEN_KEYBINDINGS,
|
|
||||||
META_PREF_DISABLE_WORKAROUNDS,
|
META_PREF_DISABLE_WORKAROUNDS,
|
||||||
META_PREF_COMMANDS,
|
META_PREF_COMMANDS,
|
||||||
META_PREF_TERMINAL_COMMAND,
|
META_PREF_TERMINAL_COMMAND,
|
||||||
@ -216,7 +215,8 @@ typedef struct
|
|||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
/* a list of MetaKeyCombos. Each of them is bound to
|
/**
|
||||||
|
* A list of MetaKeyCombos. Each of them is bound to
|
||||||
* this keypref. If one has keysym==modifiers==0, it is
|
* this keypref. If one has keysym==modifiers==0, it is
|
||||||
* ignored. For historical reasons, the first entry is
|
* ignored. For historical reasons, the first entry is
|
||||||
* governed by the pref FOO and the remainder are
|
* governed by the pref FOO and the remainder are
|
||||||
@ -224,14 +224,15 @@ typedef struct
|
|||||||
*/
|
*/
|
||||||
GSList *bindings;
|
GSList *bindings;
|
||||||
|
|
||||||
/* for keybindings that can have shift or not like Alt+Tab */
|
/** for keybindings that can have shift or not like Alt+Tab */
|
||||||
gboolean add_shift;
|
gboolean add_shift:1;
|
||||||
|
|
||||||
|
/** for keybindings that apply only to a window */
|
||||||
|
gboolean per_window:1;
|
||||||
} MetaKeyPref;
|
} MetaKeyPref;
|
||||||
|
|
||||||
void meta_prefs_get_screen_bindings (const MetaKeyPref **bindings,
|
void meta_prefs_get_key_bindings (const MetaKeyPref **bindings,
|
||||||
int *n_bindings);
|
int *n_bindings);
|
||||||
void meta_prefs_get_window_bindings (const MetaKeyPref **bindings,
|
|
||||||
int *n_bindings);
|
|
||||||
|
|
||||||
MetaKeyBindingAction meta_prefs_get_keybinding_action (const char *name);
|
MetaKeyBindingAction meta_prefs_get_keybinding_action (const char *name);
|
||||||
|
|
||||||
|
@ -23,9 +23,20 @@
|
|||||||
#define META_SCREEN_H
|
#define META_SCREEN_H
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <glib.h>
|
#include <glib-object.h>
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
#define META_TYPE_SCREEN (meta_screen_get_type ())
|
||||||
|
#define META_SCREEN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_SCREEN, MetaScreen))
|
||||||
|
#define META_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_SCREEN, MetaScreenClass))
|
||||||
|
#define META_IS_SCREEN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_SCREEN_TYPE))
|
||||||
|
#define META_IS_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_SCREEN))
|
||||||
|
#define META_SCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_SCREEN, MetaScreenClass))
|
||||||
|
|
||||||
|
typedef struct _MetaScreenClass MetaScreenClass;
|
||||||
|
|
||||||
|
GType meta_screen_get_type (void);
|
||||||
|
|
||||||
int meta_screen_get_screen_number (MetaScreen *screen);
|
int meta_screen_get_screen_number (MetaScreen *screen);
|
||||||
MetaDisplay *meta_screen_get_display (MetaScreen *screen);
|
MetaDisplay *meta_screen_get_display (MetaScreen *screen);
|
||||||
|
|
||||||
|
@ -28,4 +28,6 @@ typedef struct _MetaFrame MetaFrame;
|
|||||||
typedef struct _MetaScreen MetaScreen;
|
typedef struct _MetaScreen MetaScreen;
|
||||||
typedef struct _MetaWindow MetaWindow;
|
typedef struct _MetaWindow MetaWindow;
|
||||||
typedef struct _MetaWorkspace MetaWorkspace;
|
typedef struct _MetaWorkspace MetaWorkspace;
|
||||||
|
typedef struct _MetaGroup MetaGroup;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -204,9 +204,6 @@ MetaUIDirection meta_ui_get_direction (void);
|
|||||||
|
|
||||||
GdkPixbuf *meta_ui_get_pixbuf_from_pixmap (Pixmap pmap);
|
GdkPixbuf *meta_ui_get_pixbuf_from_pixmap (Pixmap pmap);
|
||||||
|
|
||||||
void meta_ui_get_fallback_icons (GdkPixbuf **fallback_icon_p,
|
|
||||||
GdkPixbuf **fallback_mini_icon_p);
|
|
||||||
|
|
||||||
#include "tabpopup.h"
|
#include "tabpopup.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -97,6 +97,13 @@ char* meta_g_utf8_strndup (const gchar *src, gsize n);
|
|||||||
|
|
||||||
void meta_free_gslist_and_elements (GSList *list_to_deep_free);
|
void meta_free_gslist_and_elements (GSList *list_to_deep_free);
|
||||||
|
|
||||||
|
void meta_show_dialog (const char *type,
|
||||||
|
const char *title,
|
||||||
|
const char *message,
|
||||||
|
gint timeout,
|
||||||
|
const char **columns,
|
||||||
|
const char **entries);
|
||||||
|
|
||||||
/* To disable verbose mode, we make these functions into no-ops */
|
/* To disable verbose mode, we make these functions into no-ops */
|
||||||
#ifdef WITH_VERBOSE_MODE
|
#ifdef WITH_VERBOSE_MODE
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#ifndef META_WINDOW_H
|
#ifndef META_WINDOW_H
|
||||||
#define META_WINDOW_H
|
#define META_WINDOW_H
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib-object.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
#include "boxes.h"
|
#include "boxes.h"
|
||||||
@ -39,6 +39,15 @@ typedef enum
|
|||||||
META_WINDOW_MENU,
|
META_WINDOW_MENU,
|
||||||
META_WINDOW_UTILITY,
|
META_WINDOW_UTILITY,
|
||||||
META_WINDOW_SPLASHSCREEN,
|
META_WINDOW_SPLASHSCREEN,
|
||||||
|
|
||||||
|
/* override redirect window types: */
|
||||||
|
META_WINDOW_DROPDOWN_MENU,
|
||||||
|
META_WINDOW_POPUP_MENU,
|
||||||
|
META_WINDOW_TOOLTIP,
|
||||||
|
META_WINDOW_NOTIFICATION,
|
||||||
|
META_WINDOW_COMBO,
|
||||||
|
META_WINDOW_DND,
|
||||||
|
META_WINDOW_OVERRIDE_OTHER
|
||||||
} MetaWindowType;
|
} MetaWindowType;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
@ -47,6 +56,17 @@ typedef enum
|
|||||||
META_MAXIMIZE_VERTICAL = 1 << 1
|
META_MAXIMIZE_VERTICAL = 1 << 1
|
||||||
} MetaMaximizeFlags;
|
} MetaMaximizeFlags;
|
||||||
|
|
||||||
|
#define META_TYPE_WINDOW (meta_window_get_type ())
|
||||||
|
#define META_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_WINDOW, MetaWindow))
|
||||||
|
#define META_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_WINDOW, MetaWindowClass))
|
||||||
|
#define META_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_WINDOW_TYPE))
|
||||||
|
#define META_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_WINDOW))
|
||||||
|
#define META_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_WINDOW, MetaWindowClass))
|
||||||
|
|
||||||
|
typedef struct _MetaWindowClass MetaWindowClass;
|
||||||
|
|
||||||
|
GType meta_window_get_type (void);
|
||||||
|
|
||||||
MetaFrame *meta_window_get_frame (MetaWindow *window);
|
MetaFrame *meta_window_get_frame (MetaWindow *window);
|
||||||
gboolean meta_window_has_focus (MetaWindow *window);
|
gboolean meta_window_has_focus (MetaWindow *window);
|
||||||
gboolean meta_window_is_shaded (MetaWindow *window);
|
gboolean meta_window_is_shaded (MetaWindow *window);
|
||||||
@ -54,8 +74,8 @@ MetaRectangle *meta_window_get_rect (MetaWindow *window);
|
|||||||
MetaScreen *meta_window_get_screen (MetaWindow *window);
|
MetaScreen *meta_window_get_screen (MetaWindow *window);
|
||||||
MetaDisplay *meta_window_get_display (MetaWindow *window);
|
MetaDisplay *meta_window_get_display (MetaWindow *window);
|
||||||
Window meta_window_get_xwindow (MetaWindow *window);
|
Window meta_window_get_xwindow (MetaWindow *window);
|
||||||
MetaWindowType meta_window_get_type (MetaWindow *window);
|
MetaWindowType meta_window_get_window_type (MetaWindow *window);
|
||||||
Atom meta_window_get_type_atom (MetaWindow *window);
|
Atom meta_window_get_window_type_atom (MetaWindow *window);
|
||||||
MetaWorkspace *meta_window_get_workspace (MetaWindow *window);
|
MetaWorkspace *meta_window_get_workspace (MetaWindow *window);
|
||||||
gboolean meta_window_is_on_all_workspaces (MetaWindow *window);
|
gboolean meta_window_is_on_all_workspaces (MetaWindow *window);
|
||||||
gboolean meta_window_is_hidden (MetaWindow *window);
|
gboolean meta_window_is_hidden (MetaWindow *window);
|
||||||
@ -72,4 +92,9 @@ void meta_window_change_workspace_by_index (MetaWindow *window,
|
|||||||
gint space_index,
|
gint space_index,
|
||||||
gboolean append,
|
gboolean append,
|
||||||
guint32 timestamp);
|
guint32 timestamp);
|
||||||
|
void *meta_window_get_compositor_private (MetaWindow *window);
|
||||||
|
void meta_window_set_compositor_private (MetaWindow *window, void *priv);
|
||||||
|
void meta_window_configure_notify (MetaWindow *window, XConfigureEvent *event);
|
||||||
|
const char *meta_window_get_role (MetaWindow *window);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -53,6 +53,17 @@ typedef enum
|
|||||||
META_MOTION_DOWN_RIGHT = -8
|
META_MOTION_DOWN_RIGHT = -8
|
||||||
} MetaMotionDirection;
|
} MetaMotionDirection;
|
||||||
|
|
||||||
|
#define META_TYPE_WORKSPACE (meta_workspace_get_type ())
|
||||||
|
#define META_WORKSPACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_WORKSPACE, MetaWorkspace))
|
||||||
|
#define META_WORKSPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_WORKSPACE, MetaWorkspaceClass))
|
||||||
|
#define META_IS_WORKSPACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_WORKSPACE_TYPE))
|
||||||
|
#define META_IS_WORKSPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_WORKSPACE))
|
||||||
|
#define META_WORKSPACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_WORKSPACE, MetaWorkspaceClass))
|
||||||
|
|
||||||
|
typedef struct _MetaWorkspaceClass MetaWorkspaceClass;
|
||||||
|
|
||||||
|
GType meta_workspace_get_type (void);
|
||||||
|
|
||||||
int meta_workspace_index (MetaWorkspace *workspace);
|
int meta_workspace_index (MetaWorkspace *workspace);
|
||||||
MetaScreen *meta_workspace_get_screen (MetaWorkspace *workspace);
|
MetaScreen *meta_workspace_get_screen (MetaWorkspace *workspace);
|
||||||
void meta_workspace_get_work_area_all_xineramas (MetaWorkspace *workspace,
|
void meta_workspace_get_work_area_all_xineramas (MetaWorkspace *workspace,
|
||||||
|
File diff suppressed because it is too large
Load Diff
569
src/metacity.schemas.in.in
Normal file
569
src/metacity.schemas.in.in
Normal file
@ -0,0 +1,569 @@
|
|||||||
|
<gconfschemafile>
|
||||||
|
<schemalist>
|
||||||
|
|
||||||
|
<!-- General preferences -->
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/mouse_button_modifier</key>
|
||||||
|
<applyto>/apps/metacity/general/mouse_button_modifier</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>string</type>
|
||||||
|
<default><Alt></default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Modifier to use for modified window click actions</short>
|
||||||
|
<long>
|
||||||
|
Clicking a window while holding down this modifier key
|
||||||
|
will move the window (left click), resize the window
|
||||||
|
(middle click), or show the window menu (right click).
|
||||||
|
Modifier is expressed as "<Alt>" or "<Super>"
|
||||||
|
for example.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/button_layout</key>
|
||||||
|
<applyto>/apps/metacity/general/button_layout</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>string</type>
|
||||||
|
<default>menu:minimize,maximize,close</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Arrangement of buttons on the titlebar</short>
|
||||||
|
<long>
|
||||||
|
Arrangement of buttons on the titlebar. The
|
||||||
|
value should be a string, such as
|
||||||
|
"menu:minimize,maximize,spacer,close"; the colon separates the
|
||||||
|
left corner of the window from the right corner, and
|
||||||
|
the button names are comma-separated. Duplicate buttons
|
||||||
|
are not allowed. Unknown button names are silently ignored
|
||||||
|
so that buttons can be added in future metacity versions
|
||||||
|
without breaking older versions.
|
||||||
|
A special spacer tag can be used to insert some space between
|
||||||
|
two adjacent buttons.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/focus_mode</key>
|
||||||
|
<applyto>/apps/metacity/general/focus_mode</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>string</type>
|
||||||
|
<default>click</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Window focus mode</short>
|
||||||
|
<long>
|
||||||
|
The window focus mode indicates how windows are activated.
|
||||||
|
It has three possible values; "click" means windows must
|
||||||
|
be clicked in order to focus them, "sloppy" means windows
|
||||||
|
are focused when the mouse enters the window, and "mouse" means
|
||||||
|
windows are focused when the mouse enters the window and
|
||||||
|
unfocused when the mouse leaves the window.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/focus_new_windows</key>
|
||||||
|
<applyto>/apps/metacity/general/focus_new_windows</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>string</type>
|
||||||
|
<default>smart</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Control how new windows get focus</short>
|
||||||
|
<long>
|
||||||
|
This option provides additional control over how newly created
|
||||||
|
windows get focus. It has two possible values; "smart" applies
|
||||||
|
the user's normal focus mode, and "strict" results in windows
|
||||||
|
started from a terminal not being given focus.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/raise_on_click</key>
|
||||||
|
<applyto>/apps/metacity/general/raise_on_click</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>bool</type>
|
||||||
|
<default>true</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Whether raising should be a side-effect of other user
|
||||||
|
interactions</short>
|
||||||
|
<long>
|
||||||
|
Setting this option to false can lead to buggy behavior, so
|
||||||
|
users are strongly discouraged from changing it from the default
|
||||||
|
of true.
|
||||||
|
|
||||||
|
Many actions (e.g. clicking in the client area, moving or resizing the window)
|
||||||
|
normally raise the window as a side-effect. Setting this option to false, which
|
||||||
|
is strongly discouraged, will decouple raising from other user actions, and
|
||||||
|
ignore raise requests generated by applications. See
|
||||||
|
http://bugzilla.gnome.org/show_bug.cgi?id=445447#c6.
|
||||||
|
Even when this option is false, windows can
|
||||||
|
still be raised by an alt-left-click anywhere on the window, a
|
||||||
|
normal click on the window decorations, or by special messages
|
||||||
|
from pagers, such as activation requests from tasklist applets.
|
||||||
|
This option is currently disabled in click-to-focus mode.
|
||||||
|
|
||||||
|
Note that the list of ways to raise windows when raise_on_click
|
||||||
|
is false does not include programmatic requests from
|
||||||
|
applications to raise windows; such requests will be ignored
|
||||||
|
regardless of the reason for the request. If you are an
|
||||||
|
application developer and have a user complaining that your
|
||||||
|
application does not work with this setting disabled, tell them
|
||||||
|
it is _their_ fault for breaking their window manager and that
|
||||||
|
they need to change this option back to true or live with the
|
||||||
|
"bug" they requested.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/action_double_click_titlebar</key>
|
||||||
|
<applyto>/apps/metacity/general/action_double_click_titlebar</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>string</type>
|
||||||
|
<default>toggle_maximize</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Action on title bar double-click</short>
|
||||||
|
<long>
|
||||||
|
This option determines the effects of double-clicking on the
|
||||||
|
title bar. Current valid options are
|
||||||
|
'toggle_shade', which will shade/unshade the window,
|
||||||
|
'toggle_maximize' which will maximize/unmaximize the window,
|
||||||
|
'toggle_maximize_horizontally' and 'toggle_maximize_vertically'
|
||||||
|
which will maximize/unmaximize the window in that direction only,
|
||||||
|
'minimize' which will minimize the window,
|
||||||
|
'shade' which will roll the window up,
|
||||||
|
'menu' which will display the window menu,
|
||||||
|
'lower' which will put the window behind all the others,
|
||||||
|
and 'none' which will not do anything.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/action_middle_click_titlebar</key>
|
||||||
|
<applyto>/apps/metacity/general/action_middle_click_titlebar</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>string</type>
|
||||||
|
<default>lower</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Action on title bar middle-click</short>
|
||||||
|
<long>
|
||||||
|
This option determines the effects of middle-clicking on the
|
||||||
|
title bar. Current valid options are
|
||||||
|
'toggle_shade', which will shade/unshade the window,
|
||||||
|
'toggle_maximize' which will maximize/unmaximize the window,
|
||||||
|
'toggle_maximize_horizontally' and 'toggle_maximize_vertically'
|
||||||
|
which will maximize/unmaximize the window in that direction only,
|
||||||
|
'minimize' which will minimize the window,
|
||||||
|
'shade' which will roll the window up,
|
||||||
|
'menu' which will display the window menu,
|
||||||
|
'lower' which will put the window behind all the others,
|
||||||
|
and 'none' which will not do anything.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/action_right_click_titlebar</key>
|
||||||
|
<applyto>/apps/metacity/general/action_right_click_titlebar</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>string</type>
|
||||||
|
<default>menu</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Action on title bar right-click</short>
|
||||||
|
<long>
|
||||||
|
This option determines the effects of right-clicking on the
|
||||||
|
title bar. Current valid options are
|
||||||
|
'toggle_shade', which will shade/unshade the window,
|
||||||
|
'toggle_maximize' which will maximize/unmaximize the window,
|
||||||
|
'toggle_maximize_horizontally' and 'toggle_maximize_vertically'
|
||||||
|
which will maximize/unmaximize the window in that direction only,
|
||||||
|
'minimize' which will minimize the window,
|
||||||
|
'shade' which will roll the window up,
|
||||||
|
'menu' which will display the window menu,
|
||||||
|
'lower' which will put the window behind all the others,
|
||||||
|
and 'none' which will not do anything.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/auto_raise</key>
|
||||||
|
<applyto>/apps/metacity/general/auto_raise</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>bool</type>
|
||||||
|
<default>false</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Automatically raises the focused window</short>
|
||||||
|
<long>
|
||||||
|
If set to true, and the focus mode is either "sloppy" or "mouse"
|
||||||
|
then the focused window will be automatically raised after a
|
||||||
|
delay specified by the auto_raise_delay key. This is not related
|
||||||
|
to clicking on a window to raise it, nor to entering a window
|
||||||
|
during drag-and-drop.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/auto_raise_delay</key>
|
||||||
|
<applyto>/apps/metacity/general/auto_raise_delay</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>int</type>
|
||||||
|
<default>500</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Delay in milliseconds for the auto raise option</short>
|
||||||
|
<long>
|
||||||
|
The time delay before raising a window if auto_raise is set to
|
||||||
|
true. The delay is given in thousandths of a second.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/theme</key>
|
||||||
|
<applyto>/apps/metacity/general/theme</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>string</type>
|
||||||
|
<default>Clearlooks</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Current theme</short>
|
||||||
|
<long>
|
||||||
|
The theme determines the appearance of window borders,
|
||||||
|
titlebar, and so forth.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/titlebar_uses_system_font</key>
|
||||||
|
<applyto>/apps/metacity/general/titlebar_uses_system_font</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>bool</type>
|
||||||
|
<default>false</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Use standard system font in window titles</short>
|
||||||
|
<long>
|
||||||
|
If true, ignore the titlebar_font
|
||||||
|
option, and use the standard application font for window
|
||||||
|
titles.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/titlebar_font</key>
|
||||||
|
<applyto>/apps/metacity/general/titlebar_font</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>string</type>
|
||||||
|
<default>Sans Bold 10</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Window title font</short>
|
||||||
|
<long>
|
||||||
|
A font description string describing a font for window
|
||||||
|
titlebars. The size from the description will only be used if the
|
||||||
|
titlebar_font_size option is set to 0. Also, this option is
|
||||||
|
disabled if the titlebar_uses_desktop_font option is set to true.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/num_workspaces</key>
|
||||||
|
<applyto>/apps/metacity/general/num_workspaces</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>int</type>
|
||||||
|
<default>4</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Number of workspaces</short>
|
||||||
|
<long>
|
||||||
|
Number of workspaces. Must be more than zero, and has a fixed
|
||||||
|
maximum to prevent making the desktop unusable by accidentally
|
||||||
|
asking for too many workspaces.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/visual_bell</key>
|
||||||
|
<applyto>/apps/metacity/general/visual_bell</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>bool</type>
|
||||||
|
<default>false</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Enable Visual Bell</short>
|
||||||
|
<long>
|
||||||
|
Turns on a visual indication when an application or the system
|
||||||
|
issues a 'bell' or 'beep'; useful for the hard-of-hearing and for
|
||||||
|
use in noisy environments.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/audible_bell</key>
|
||||||
|
<applyto>/apps/metacity/general/audible_bell</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>bool</type>
|
||||||
|
<default>true</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>System Bell is Audible</short>
|
||||||
|
<long>
|
||||||
|
Determines whether applications or the system can generate
|
||||||
|
audible 'beeps'; may be used in conjunction with 'visual bell' to
|
||||||
|
allow silent 'beeps'.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/visual_bell_type</key>
|
||||||
|
<applyto>/apps/metacity/general/visual_bell_type</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>string</type>
|
||||||
|
<default>fullscreen</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Visual Bell Type</short>
|
||||||
|
<long>
|
||||||
|
Tells Metacity how to implement the visual indication that the
|
||||||
|
system bell or another application 'bell' indicator has been
|
||||||
|
rung. Currently there are two valid values, "fullscreen", which
|
||||||
|
causes a fullscreen white-black flash, and "frame_flash" which
|
||||||
|
causes the titlebar of the application which sent the bell signal
|
||||||
|
to flash. If the application which sent the bell is unknown (as
|
||||||
|
is usually the case for the default "system beep"), the currently
|
||||||
|
focused window's titlebar is flashed.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/compositing_manager</key>
|
||||||
|
<applyto>/apps/metacity/general/compositing_manager</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>bool</type>
|
||||||
|
<default>false</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Compositing Manager</short>
|
||||||
|
<long>
|
||||||
|
Determines whether Metacity is a compositing manager.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/clutter_disabled</key>
|
||||||
|
<applyto>/apps/metacity/general/clutter_disabled</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>bool</type>
|
||||||
|
<default>false</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Clutter Disabled</short>
|
||||||
|
<long>
|
||||||
|
Determines whether Clutter compositing backend should be disabled.
|
||||||
|
Change to this option will not take effect until Metacity is
|
||||||
|
restarted.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/clutter_plugins</key>
|
||||||
|
<applyto>/apps/metacity/general/clutter_plugins</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>list</type>
|
||||||
|
<list_type>string</list_type>
|
||||||
|
<default>[default]</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Clutter Plugins</short>
|
||||||
|
<long>
|
||||||
|
Plugins to load for the Clutter-based compositing manager.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/live_hidden_windows</key>
|
||||||
|
<applyto>/apps/metacity/general/live_hidden_windows</applyto>
|
||||||
|
<owner>metacity</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/metacity/workspace_names/name</key>
|
||||||
|
<applyto>/apps/metacity/workspace_names/name_1</applyto>
|
||||||
|
<applyto>/apps/metacity/workspace_names/name_2</applyto>
|
||||||
|
<applyto>/apps/metacity/workspace_names/name_3</applyto>
|
||||||
|
<applyto>/apps/metacity/workspace_names/name_4</applyto>
|
||||||
|
<applyto>/apps/metacity/workspace_names/name_5</applyto>
|
||||||
|
<applyto>/apps/metacity/workspace_names/name_6</applyto>
|
||||||
|
<applyto>/apps/metacity/workspace_names/name_7</applyto>
|
||||||
|
<applyto>/apps/metacity/workspace_names/name_8</applyto>
|
||||||
|
<applyto>/apps/metacity/workspace_names/name_9</applyto>
|
||||||
|
<applyto>/apps/metacity/workspace_names/name_10</applyto>
|
||||||
|
<applyto>/apps/metacity/workspace_names/name_11</applyto>
|
||||||
|
<applyto>/apps/metacity/workspace_names/name_12</applyto>
|
||||||
|
<applyto>/apps/metacity/workspace_names/name_13</applyto>
|
||||||
|
<applyto>/apps/metacity/workspace_names/name_14</applyto>
|
||||||
|
<applyto>/apps/metacity/workspace_names/name_15</applyto>
|
||||||
|
<applyto>/apps/metacity/workspace_names/name_16</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>string</type>
|
||||||
|
<default></default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Name of workspace</short>
|
||||||
|
<long>
|
||||||
|
The name of a workspace.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/reduced_resources</key>
|
||||||
|
<applyto>/apps/metacity/general/reduced_resources</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>bool</type>
|
||||||
|
<default>false</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>If true, trade off usability for less resource usage</short>
|
||||||
|
<long>
|
||||||
|
If true, metacity will give the user less feedback by using
|
||||||
|
wireframes, avoiding animations, or other means. This is a
|
||||||
|
significant reduction in usability for many users, but may allow
|
||||||
|
legacy applications to continue working, and may also be a
|
||||||
|
useful tradeoff for terminal servers. However, the wireframe
|
||||||
|
feature is disabled when accessibility is on.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<!-- Keybindings -->
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/global_keybindings/run_command</key>
|
||||||
|
<applyto>/apps/metacity/global_keybindings/run_command_1</applyto>
|
||||||
|
<applyto>/apps/metacity/global_keybindings/run_command_2</applyto>
|
||||||
|
<applyto>/apps/metacity/global_keybindings/run_command_3</applyto>
|
||||||
|
<applyto>/apps/metacity/global_keybindings/run_command_4</applyto>
|
||||||
|
<applyto>/apps/metacity/global_keybindings/run_command_5</applyto>
|
||||||
|
<applyto>/apps/metacity/global_keybindings/run_command_6</applyto>
|
||||||
|
<applyto>/apps/metacity/global_keybindings/run_command_7</applyto>
|
||||||
|
<applyto>/apps/metacity/global_keybindings/run_command_8</applyto>
|
||||||
|
<applyto>/apps/metacity/global_keybindings/run_command_9</applyto>
|
||||||
|
<applyto>/apps/metacity/global_keybindings/run_command_10</applyto>
|
||||||
|
<applyto>/apps/metacity/global_keybindings/run_command_11</applyto>
|
||||||
|
<applyto>/apps/metacity/global_keybindings/run_command_12</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>string</type>
|
||||||
|
<default>disabled</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Run a defined command</short>
|
||||||
|
<long>
|
||||||
|
The keybinding that runs the correspondingly-numbered
|
||||||
|
command in /apps/metacity/keybinding_commands
|
||||||
|
|
||||||
|
The format looks like "<Control>a" or
|
||||||
|
"<Shift><Alt>F1".
|
||||||
|
|
||||||
|
The parser is fairly liberal and allows lower or upper case,
|
||||||
|
and also abbreviations such as "<Ctl>" and
|
||||||
|
"<Ctrl>". If you set the option to the special string
|
||||||
|
"disabled", then there will be no keybinding for this
|
||||||
|
action.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/keybinding_commands/command</key>
|
||||||
|
<applyto>/apps/metacity/keybinding_commands/command_1</applyto>
|
||||||
|
<applyto>/apps/metacity/keybinding_commands/command_2</applyto>
|
||||||
|
<applyto>/apps/metacity/keybinding_commands/command_3</applyto>
|
||||||
|
<applyto>/apps/metacity/keybinding_commands/command_4</applyto>
|
||||||
|
<applyto>/apps/metacity/keybinding_commands/command_5</applyto>
|
||||||
|
<applyto>/apps/metacity/keybinding_commands/command_6</applyto>
|
||||||
|
<applyto>/apps/metacity/keybinding_commands/command_7</applyto>
|
||||||
|
<applyto>/apps/metacity/keybinding_commands/command_8</applyto>
|
||||||
|
<applyto>/apps/metacity/keybinding_commands/command_9</applyto>
|
||||||
|
<applyto>/apps/metacity/keybinding_commands/command_10</applyto>
|
||||||
|
<applyto>/apps/metacity/keybinding_commands/command_11</applyto>
|
||||||
|
<applyto>/apps/metacity/keybinding_commands/command_12</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>string</type>
|
||||||
|
<default> </default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Commands to run in response to keybindings</short>
|
||||||
|
<long>
|
||||||
|
The /apps/metacity/global_keybindings/run_command_N
|
||||||
|
keys define keybindings that correspond to these commands.
|
||||||
|
Pressing the keybinding for run_command_N will
|
||||||
|
execute command_N.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<!-- Schemas below are generated by schema-bindings.c when this file
|
||||||
|
becomes metacity.schemas.in
|
||||||
|
-->
|
||||||
|
<!-- GENERATED -->
|
||||||
|
|
||||||
|
<!-- Not used and/or crackrock -->
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/application_based</key>
|
||||||
|
<applyto>/apps/metacity/general/application_based</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>bool</type>
|
||||||
|
<default>false</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>(Not implemented) Navigation works in terms of applications not windows</short>
|
||||||
|
<long>
|
||||||
|
If true, then Metacity works in terms of applications rather than
|
||||||
|
windows. The concept is a bit abstract, but in general an
|
||||||
|
application-based setup is more like the Mac and less like
|
||||||
|
Windows. When you focus a window in application-based mode, all
|
||||||
|
the windows in the application will be raised. Also, in
|
||||||
|
application-based mode, focus clicks are not passed through to
|
||||||
|
windows in other applications. Application-based mode is,
|
||||||
|
however, largely unimplemented at the moment.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
<schema>
|
||||||
|
<key>/schemas/apps/metacity/general/disable_workarounds</key>
|
||||||
|
<applyto>/apps/metacity/general/disable_workarounds</applyto>
|
||||||
|
<owner>metacity</owner>
|
||||||
|
<type>bool</type>
|
||||||
|
<default>false</default>
|
||||||
|
<locale name="C">
|
||||||
|
<short>Disable misfeatures that are required by old or broken
|
||||||
|
applications</short>
|
||||||
|
<long>
|
||||||
|
Some applications disregard specifications in ways that result in
|
||||||
|
window manager misfeatures. This option puts Metacity in a
|
||||||
|
rigorously correct mode, which gives a more consistent user
|
||||||
|
interface, provided one does not need to run any misbehaving
|
||||||
|
applications.
|
||||||
|
</long>
|
||||||
|
</locale>
|
||||||
|
</schema>
|
||||||
|
|
||||||
|
</schemalist>
|
||||||
|
</gconfschemafile>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -28,9 +28,9 @@
|
|||||||
#ifndef WNCK_DRAW_WORKSPACE_H
|
#ifndef WNCK_DRAW_WORKSPACE_H
|
||||||
#define WNCK_DRAW_WORKSPACE_H
|
#define WNCK_DRAW_WORKSPACE_H
|
||||||
|
|
||||||
#include <gdk/gdkdrawable.h>
|
#include <gdk/gdk.h>
|
||||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||||
#include <gtk/gtkwidget.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#define META_GRADIENT_H
|
#define META_GRADIENT_H
|
||||||
|
|
||||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||||
#include <gdk/gdkcolor.h>
|
#include <gdk/gdk.h>
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
@ -33,8 +33,7 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include "metaaccellabel.h"
|
#include "metaaccellabel.h"
|
||||||
#include <gtk/gtkmain.h>
|
#include <gtk/gtk.h>
|
||||||
#include <gtk/gtkaccelmap.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#ifndef __META_ACCEL_LABEL_H__
|
#ifndef __META_ACCEL_LABEL_H__
|
||||||
#define __META_ACCEL_LABEL_H__
|
#define __META_ACCEL_LABEL_H__
|
||||||
|
|
||||||
#include <gtk/gtklabel.h>
|
#include <gtk/gtk.h>
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#define _XOPEN_SOURCE 600 /* for the maths routines over floats */
|
#define _XOPEN_SOURCE 600 /* for the maths routines over floats */
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <gtk/gtkicontheme.h>
|
#include <gtk/gtk.h>
|
||||||
#include "preview-widget.h"
|
#include "preview-widget.h"
|
||||||
|
|
||||||
static void meta_preview_class_init (MetaPreviewClass *klass);
|
static void meta_preview_class_init (MetaPreviewClass *klass);
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "theme.h"
|
#include "theme.h"
|
||||||
#include <gtk/gtkbin.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#ifndef META_PREVIEW_WIDGET_H
|
#ifndef META_PREVIEW_WIDGET_H
|
||||||
#define META_PREVIEW_WIDGET_H
|
#define META_PREVIEW_WIDGET_H
|
||||||
|
@ -24,10 +24,7 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include "resizepopup.h"
|
#include "resizepopup.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include <gtk/gtkwindow.h>
|
#include <gtk/gtk.h>
|
||||||
#include <gtk/gtklabel.h>
|
|
||||||
#include <gtk/gtkframe.h>
|
|
||||||
#include <gtk/gtkmain.h>
|
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
|
|
||||||
struct _MetaResizePopup
|
struct _MetaResizePopup
|
||||||
@ -110,6 +107,9 @@ update_size_window (MetaResizePopup *popup)
|
|||||||
|
|
||||||
g_return_if_fail (popup->size_window != NULL);
|
g_return_if_fail (popup->size_window != NULL);
|
||||||
|
|
||||||
|
/* Translators: This represents the size of a window. The first number is
|
||||||
|
* the width of the window and the second is the height.
|
||||||
|
*/
|
||||||
str = g_strdup_printf (_("%d x %d"),
|
str = g_strdup_printf (_("%d x %d"),
|
||||||
popup->horizontal_size,
|
popup->horizontal_size,
|
||||||
popup->vertical_size);
|
popup->vertical_size);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -486,7 +486,7 @@ preview_collection (int font_size,
|
|||||||
i = 0;
|
i = 0;
|
||||||
while (i < META_FRAME_TYPE_LAST)
|
while (i < META_FRAME_TYPE_LAST)
|
||||||
{
|
{
|
||||||
const char *title;
|
const char *title = NULL;
|
||||||
GtkWidget *contents;
|
GtkWidget *contents;
|
||||||
GtkWidget *align;
|
GtkWidget *align;
|
||||||
double xalign, yalign;
|
double xalign, yalign;
|
||||||
|
@ -57,9 +57,7 @@
|
|||||||
#include "theme-parser.h"
|
#include "theme-parser.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "gradient.h"
|
#include "gradient.h"
|
||||||
#include <gtk/gtkwidget.h>
|
#include <gtk/gtk.h>
|
||||||
#include <gtk/gtkimage.h>
|
|
||||||
#include <gtk/gtkicontheme.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
@ -4628,6 +4626,10 @@ check_state (MetaFrameStyleSet *style_set,
|
|||||||
if (get_style (style_set, state,
|
if (get_style (style_set, state,
|
||||||
META_FRAME_RESIZE_NONE, i) == NULL)
|
META_FRAME_RESIZE_NONE, i) == NULL)
|
||||||
{
|
{
|
||||||
|
/* Translators: This error occurs when a <frame> tag is missing
|
||||||
|
* in theme XML. The "<frame ...>" is intended as a noun phrase,
|
||||||
|
* and the "missing" qualifies it. You should translate "whatever".
|
||||||
|
*/
|
||||||
g_set_error (error, META_THEME_ERROR,
|
g_set_error (error, META_THEME_ERROR,
|
||||||
META_THEME_ERROR_FAILED,
|
META_THEME_ERROR_FAILED,
|
||||||
_("Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"),
|
_("Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"),
|
||||||
@ -4824,6 +4826,10 @@ meta_theme_validate (MetaTheme *theme,
|
|||||||
|
|
||||||
if (theme->readable_name == NULL)
|
if (theme->readable_name == NULL)
|
||||||
{
|
{
|
||||||
|
/* Translators: This error means that a necessary XML tag (whose name
|
||||||
|
* is given in angle brackets) was not found in a given theme (whose
|
||||||
|
* name is given second, in quotation marks).
|
||||||
|
*/
|
||||||
g_set_error (error, META_THEME_ERROR, META_THEME_ERROR_FAILED,
|
g_set_error (error, META_THEME_ERROR, META_THEME_ERROR_FAILED,
|
||||||
_("No <%s> set for theme \"%s\""), "name", theme->name);
|
_("No <%s> set for theme \"%s\""), "name", theme->name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "boxes.h"
|
#include "boxes.h"
|
||||||
#include "gradient.h"
|
#include "gradient.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include <gtk/gtkrc.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
typedef struct _MetaFrameStyle MetaFrameStyle;
|
typedef struct _MetaFrameStyle MetaFrameStyle;
|
||||||
typedef struct _MetaFrameStyleSet MetaFrameStyleSet;
|
typedef struct _MetaFrameStyleSet MetaFrameStyleSet;
|
||||||
@ -805,8 +805,6 @@ struct _MetaTheme
|
|||||||
GHashTable *style_sets_by_name;
|
GHashTable *style_sets_by_name;
|
||||||
MetaFrameStyleSet *style_sets_by_type[META_FRAME_TYPE_LAST];
|
MetaFrameStyleSet *style_sets_by_type[META_FRAME_TYPE_LAST];
|
||||||
|
|
||||||
GdkPixbuf *fallback_icon, *fallback_mini_icon;
|
|
||||||
|
|
||||||
GQuark quark_width;
|
GQuark quark_width;
|
||||||
GQuark quark_height;
|
GQuark quark_height;
|
||||||
GQuark quark_object_width;
|
GQuark quark_object_width;
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "theme.h"
|
#include "theme.h"
|
||||||
#include <gtk/gtkmisc.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#ifndef META_THEME_WIDGET_H
|
#ifndef META_THEME_WIDGET_H
|
||||||
#define META_THEME_WIDGET_H
|
#define META_THEME_WIDGET_H
|
||||||
|
15
src/ui/ui.c
15
src/ui/ui.c
@ -851,7 +851,7 @@ meta_ui_parse_modifier (const char *accel,
|
|||||||
|
|
||||||
*mask = 0;
|
*mask = 0;
|
||||||
|
|
||||||
if (strcmp (accel, "disabled") == 0)
|
if (accel == NULL || strcmp (accel, "disabled") == 0)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
meta_ui_accelerator_parse (accel, &gdk_sym, &gdk_code, &gdk_mask);
|
meta_ui_accelerator_parse (accel, &gdk_sym, &gdk_code, &gdk_mask);
|
||||||
@ -998,16 +998,3 @@ meta_ui_get_pixbuf_from_pixmap (Pixmap pmap)
|
|||||||
|
|
||||||
return pixbuf;
|
return pixbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
meta_ui_get_fallback_icons (GdkPixbuf **fallback_icon_p,
|
|
||||||
GdkPixbuf **fallback_mini_icon_p)
|
|
||||||
{
|
|
||||||
MetaTheme *theme = meta_theme_get_current ();
|
|
||||||
|
|
||||||
if (fallback_icon_p)
|
|
||||||
*fallback_icon_p = theme->fallback_icon;
|
|
||||||
|
|
||||||
if (fallback_mini_icon_p)
|
|
||||||
*fallback_mini_icon_p = theme->fallback_mini_icon;
|
|
||||||
}
|
|
||||||
|
@ -68,7 +68,7 @@ get_size (Display *d, Drawable draw,
|
|||||||
int *xp, int *yp, int *widthp, int *heightp)
|
int *xp, int *yp, int *widthp, int *heightp)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
unsigned int width, height, border, depth;
|
unsigned int width=0, height=0, border=0, depth=0;
|
||||||
Window root;
|
Window root;
|
||||||
|
|
||||||
XGetGeometry (d, draw, &root, &x, &y, &width, &height, &border, &depth);
|
XGetGeometry (d, draw, &root, &x, &y, &width, &height, &border, &depth);
|
||||||
|
159
tools/announce-wrangler.py
Normal file
159
tools/announce-wrangler.py
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
import commands
|
||||||
|
import xml.dom.minidom
|
||||||
|
import glob
|
||||||
|
import wordpresslib # http://www.blackbirdblog.it/programmazione/progetti/28
|
||||||
|
import ConfigParser
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
|
||||||
|
doaps = glob.glob("*.doap")
|
||||||
|
|
||||||
|
if len(doaps)==0:
|
||||||
|
print 'Please run this from the top-level directory.'
|
||||||
|
|
||||||
|
description=str(xml.dom.minidom.parse(doaps[0]).getElementsByTagName('shortdesc')[0].firstChild.toxml().strip())
|
||||||
|
|
||||||
|
program_name = doaps[0][:-5]
|
||||||
|
print program_name
|
||||||
|
|
||||||
|
markup = {
|
||||||
|
'text': {
|
||||||
|
'open': ' *',
|
||||||
|
'newline': ' ',
|
||||||
|
'close': '',
|
||||||
|
},
|
||||||
|
'html': {
|
||||||
|
'open': '<li>',
|
||||||
|
'newline': '',
|
||||||
|
'close': '</li>',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
def text_list(list, type):
|
||||||
|
result = []
|
||||||
|
for entry in list:
|
||||||
|
result.append(markup[type]['open'])
|
||||||
|
for word in entry.split():
|
||||||
|
if len(result[-1]+word)>75:
|
||||||
|
result.append(markup[type]['newline'])
|
||||||
|
result[-1] = result[-1] + ' ' + word
|
||||||
|
if result[-1].strip()=='':
|
||||||
|
result = result[:-1]
|
||||||
|
result[-1] = result[-1] + markup[type]['close']
|
||||||
|
return '\n'.join(result)
|
||||||
|
|
||||||
|
news = file('NEWS')
|
||||||
|
news_entry = []
|
||||||
|
header_count = 0
|
||||||
|
|
||||||
|
while header_count<2:
|
||||||
|
line = news.readline().replace('\n', '')
|
||||||
|
news_entry.append(line)
|
||||||
|
if line.startswith('='):
|
||||||
|
header_count = header_count + 1
|
||||||
|
|
||||||
|
news.close()
|
||||||
|
|
||||||
|
version = news_entry[0]
|
||||||
|
news_entry = news_entry[2:-2]
|
||||||
|
|
||||||
|
print version
|
||||||
|
majorminor = '.'.join(version.split('.')[:2])
|
||||||
|
md5s = commands.getoutput('ssh master.gnome.org md5sum /ftp/pub/GNOME/sources/metacity/%s/%s-%s.tar*' % (majorminor, program_name, version)).split()
|
||||||
|
if len(md5s)!=4:
|
||||||
|
print 'WARNING: There were not two known tarballs'
|
||||||
|
|
||||||
|
md5_values = {}
|
||||||
|
|
||||||
|
for i in range(0, len(md5s), 2):
|
||||||
|
a = md5s[i+1]
|
||||||
|
md5_values[a[a.rindex('.'):]] = md5s[i]
|
||||||
|
|
||||||
|
print md5_values
|
||||||
|
|
||||||
|
changes = []
|
||||||
|
translations = ''
|
||||||
|
|
||||||
|
reading_changes = False
|
||||||
|
reading_translations = False
|
||||||
|
for line in news_entry:
|
||||||
|
line = line.replace('(#', '(GNOME bug ').strip()
|
||||||
|
if line.startswith('-'):
|
||||||
|
changes.append(line[2:])
|
||||||
|
reading_changes = True
|
||||||
|
elif reading_changes:
|
||||||
|
if line=='':
|
||||||
|
reading_changes = False
|
||||||
|
else:
|
||||||
|
changes[-1] = changes[-1] + ' ' + line
|
||||||
|
elif line=='Translations':
|
||||||
|
reading_translations = True
|
||||||
|
elif reading_translations:
|
||||||
|
translations = translations + ' ' + line
|
||||||
|
|
||||||
|
translations = translations[1:]
|
||||||
|
|
||||||
|
text_links = []
|
||||||
|
for i in ('.bz2', '.gz'):
|
||||||
|
text_links.append('%s http://download.gnome.org/sources/metacity/%s/%s-%s.tar%s' % (
|
||||||
|
md5_values[i], majorminor, program_name, version, i))
|
||||||
|
|
||||||
|
text_version = """\
|
||||||
|
What is it ?
|
||||||
|
============
|
||||||
|
%s
|
||||||
|
|
||||||
|
What's changed ?
|
||||||
|
================
|
||||||
|
%s
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
%s
|
||||||
|
|
||||||
|
Where can I get it ?
|
||||||
|
====================
|
||||||
|
%s""" % (text_list([description], 'text'),
|
||||||
|
text_list(changes, 'text'),
|
||||||
|
text_list([translations], 'text'),
|
||||||
|
text_list(text_links, 'text'))
|
||||||
|
|
||||||
|
print "============ x8 x8 x8 ===== SEND THIS TO gnome-announce-list"
|
||||||
|
print text_version
|
||||||
|
print "============ x8 x8 x8 ===== ENDS"
|
||||||
|
|
||||||
|
translations = re.sub('\((.*)\)',
|
||||||
|
'(<a href="http://svn.gnome.org/viewvc/metacity/trunk/po/\\1.po">\\1</a>)',
|
||||||
|
translations)
|
||||||
|
|
||||||
|
html_version = """\
|
||||||
|
<b>What is it ?</b><br />
|
||||||
|
<ul>%s</ul>
|
||||||
|
|
||||||
|
<b>What's changed ?</b><br />
|
||||||
|
<ul>%s</ul>
|
||||||
|
|
||||||
|
<i>Translations:</i><br />
|
||||||
|
<ul>%s</ul>
|
||||||
|
|
||||||
|
<b>Where can I get it ?</b><br />
|
||||||
|
<ul>%s</ul>""" % (text_list([description], 'html'),
|
||||||
|
text_list(changes, 'html'),
|
||||||
|
text_list([translations], 'html'),
|
||||||
|
text_list(text_links, 'html'))
|
||||||
|
|
||||||
|
cp = ConfigParser.ConfigParser()
|
||||||
|
cp.read(os.environ['HOME']+'/.config/metacity/tools.ini')
|
||||||
|
|
||||||
|
wp = wordpresslib.WordPressClient(
|
||||||
|
cp.get('release-wrangler', 'blogurl'),
|
||||||
|
cp.get('release-wrangler', 'bloguser'),
|
||||||
|
cp.get('release-wrangler', 'blogpass'))
|
||||||
|
wp.selectBlog(cp.getint('release-wrangler', 'blognumber'))
|
||||||
|
post = wordpresslib.WordPressPost()
|
||||||
|
post.title = '%s %s released' % (program_name, version)
|
||||||
|
post.description = html_version
|
||||||
|
# appears to have been turned off-- ask jdub
|
||||||
|
#idPost = wp.newPost(post, False)
|
||||||
|
|
||||||
|
print html_version
|
||||||
|
|
@ -26,6 +26,8 @@ import commands
|
|||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import posixpath
|
import posixpath
|
||||||
|
import ConfigParser
|
||||||
|
import re
|
||||||
|
|
||||||
# FIXME: Needs tidying into separate functions.
|
# FIXME: Needs tidying into separate functions.
|
||||||
|
|
||||||
@ -83,85 +85,29 @@ def wordwrap(str, prefix=''):
|
|||||||
|
|
||||||
#####################
|
#####################
|
||||||
|
|
||||||
|
change_filename = 'ChangeLog'
|
||||||
|
|
||||||
get_up_to_date()
|
get_up_to_date()
|
||||||
|
|
||||||
discoveries = {}
|
cp = ConfigParser.ConfigParser()
|
||||||
|
cp.read(os.environ['HOME']+'/.config/metacity/tools.ini')
|
||||||
|
|
||||||
current_file = '?'
|
os.environ['CHANGE_LOG_NAME'] = cp.get('commit-wrangler', 'name')
|
||||||
|
os.environ['CHANGE_LOG_EMAIL_ADDRESS'] = cp.get('commit-wrangler', 'address')
|
||||||
|
|
||||||
diff = commands.getstatusoutput('svn diff --diff-cmd $(which diff) -x -up')[1]
|
print commands.getoutput('moap cl prep')
|
||||||
|
|
||||||
for line in diff.split('\n'):
|
|
||||||
if line.startswith('---'):
|
|
||||||
current_file = line[4:line.find('\t')]
|
|
||||||
elif line.startswith('@@'):
|
|
||||||
atatpos = line.find('@@', 3)+3
|
|
||||||
discoveries.setdefault(current_file,{})[line[atatpos:line.find(' ',atatpos)]] = 1
|
|
||||||
|
|
||||||
# yes, I know this is MY username. I will come back and fix it
|
|
||||||
# later, but for now there is a lot else to do. FIXME
|
|
||||||
your_username = 'Thomas Thurman <tthurman@gnome.org>'
|
|
||||||
|
|
||||||
change_filename = posixpath.expanduser("~/.commit-wrangler.txt")
|
|
||||||
change = open(change_filename, 'w')
|
|
||||||
change.write('# You are checking in a single changeset.\n')
|
|
||||||
change.write('# The message below is the one which will be used\n')
|
|
||||||
change.write('# both in the checkin and the changelog.\n')
|
|
||||||
change.write('# Any lines starting with a "#" don\'t go in.\n')
|
|
||||||
change.write('#\n')
|
|
||||||
|
|
||||||
change.write('%s %s\n\n' % (
|
|
||||||
time.strftime('%Y-%m-%d',time.gmtime()),
|
|
||||||
your_username))
|
|
||||||
|
|
||||||
for filename in discoveries:
|
|
||||||
change.write(wordwrap('* %s (%s): something' % (
|
|
||||||
filename, ', '.join(discoveries[filename])),
|
|
||||||
' ')+'\n')
|
|
||||||
|
|
||||||
change.write('\n#\n#\n##############\n#\n#\n#\n')
|
|
||||||
change.write('# And this is the original diff:\n#\n#')
|
|
||||||
change.write(diff.replace('\n','\n#'))
|
|
||||||
change.write('\n#\n#\n##############\n# EOF\n')
|
|
||||||
change.close()
|
|
||||||
|
|
||||||
time_before = os.stat(change_filename)[8]
|
time_before = os.stat(change_filename)[8]
|
||||||
os.system(favourite_editor()+' +6 %s ' % (change_filename))
|
os.system(favourite_editor()+' +6 %s ' % (change_filename))
|
||||||
|
|
||||||
if os.stat(change_filename)[8] == time_before:
|
if os.stat(change_filename)[8] == time_before:
|
||||||
print 'No change; aborting.'
|
print 'No change; aborting:'
|
||||||
|
print commands.getoutput('svn revert '+change_filename)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
# Update the changelog
|
# Update the changelog
|
||||||
|
|
||||||
changelog_new = open('ChangeLog.tmp', 'w')
|
checkin = commands.getoutput("moap cl ci")
|
||||||
changelog_justfunc = open(change_filename+'.justfunc', 'w')
|
|
||||||
change = open(change_filename, 'r')
|
|
||||||
for line in change.readlines():
|
|
||||||
if not line.startswith('#'):
|
|
||||||
changelog_new.write(line)
|
|
||||||
changelog_justfunc.write(line)
|
|
||||||
change.close()
|
|
||||||
changelog_justfunc.close()
|
|
||||||
|
|
||||||
changelog = open('ChangeLog', 'r')
|
print re.sub(".*Committed revision (\\d+).*", 'http://svn.gnome.org/viewvc/metacity?rev=\\1&view=rev', checkin)
|
||||||
for line in changelog.readlines():
|
|
||||||
changelog_new.write(line)
|
|
||||||
|
|
||||||
changelog.close()
|
|
||||||
changelog_new.close()
|
|
||||||
|
|
||||||
os.rename('ChangeLog.tmp', 'ChangeLog')
|
|
||||||
|
|
||||||
committing = commands.getstatusoutput('svn commit --file %s.justfunc' % (change_filename))[1]
|
|
||||||
|
|
||||||
print 'Committed: ', committing
|
|
||||||
|
|
||||||
checkin = committing[committing.find('Committed revision')+19:]
|
|
||||||
checkin = checkin[:checkin.find('.')]
|
|
||||||
# this number will be useful in the future for updating
|
|
||||||
# Bugzilla.
|
|
||||||
|
|
||||||
print
|
|
||||||
print 'http://svn.gnome.org/viewvc/metacity?rev=%s&view=rev' % (checkin)
|
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ def check_we_are_up_to_date():
|
|||||||
changed = []
|
changed = []
|
||||||
for line in commands.getoutput('/usr/bin/svn status').split('\n'):
|
for line in commands.getoutput('/usr/bin/svn status').split('\n'):
|
||||||
if line!='' and (line[0]=='C' or line[0]=='M'):
|
if line!='' and (line[0]=='C' or line[0]=='M'):
|
||||||
if line.find('release-wrangler.py')==-1:
|
if line.find('release-wrangler.py')==-1 and line.find('ChangeLog')==-1:
|
||||||
# we should be insensitive to changes in this script itself
|
# we should be insensitive to changes in this script itself
|
||||||
# to avoid chicken-and-egg problems
|
# to avoid chicken-and-egg problems
|
||||||
changed.append(line[1:].lstrip())
|
changed.append(line[1:].lstrip())
|
||||||
|
Loading…
Reference in New Issue
Block a user