Compare commits
215 Commits
METACITY_2
...
METACITY_2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d341b8ea5e | ||
![]() |
795d2caf8b | ||
![]() |
f6036b9860 | ||
![]() |
82cefd12ad | ||
![]() |
7ab715fa71 | ||
![]() |
163e236cd0 | ||
![]() |
0107da404c | ||
![]() |
c94c482283 | ||
![]() |
09501c9fab | ||
![]() |
941e4bf967 | ||
![]() |
60d710a71f | ||
![]() |
5dbe941495 | ||
![]() |
e9388f4345 | ||
![]() |
a8c5c002fb | ||
![]() |
327e3cb6b5 | ||
![]() |
0bdfa0f494 | ||
![]() |
c500de4e38 | ||
![]() |
b55dbe10bb | ||
![]() |
01c0a95136 | ||
![]() |
8fea7a4128 | ||
![]() |
4f93a1a273 | ||
![]() |
c5c68fcbe8 | ||
![]() |
0c7be52675 | ||
![]() |
fff75cd9ae | ||
![]() |
76735c18a1 | ||
![]() |
1f435cc1fc | ||
![]() |
a5d2bdea55 | ||
![]() |
565a04793e | ||
![]() |
f167d55625 | ||
![]() |
3405f3d8c8 | ||
![]() |
f141692ca2 | ||
![]() |
fe292078fe | ||
![]() |
224040cd1a | ||
![]() |
4026ea7b42 | ||
![]() |
53b9e49ca4 | ||
![]() |
8547d1e8ed | ||
![]() |
b095ecc195 | ||
![]() |
3bbf402684 | ||
![]() |
f8ff76efdd | ||
![]() |
3673472cd7 | ||
![]() |
b455ac62d2 | ||
![]() |
4916fedc28 | ||
![]() |
81eeb9c0d5 | ||
![]() |
2d895ce875 | ||
![]() |
eacd442787 | ||
![]() |
b8a9ed1d3a | ||
![]() |
117f0e5663 | ||
![]() |
f13a8e6ab9 | ||
![]() |
fa1195b7f1 | ||
![]() |
3d9f2868fc | ||
![]() |
17bf5ea13a | ||
![]() |
8d3432b8b7 | ||
![]() |
3fcbbfbbd2 | ||
![]() |
2caa49bca8 | ||
![]() |
a8912c4fb9 | ||
![]() |
7f8ad91af6 | ||
![]() |
53a7cbe6af | ||
![]() |
b9c6ba8536 | ||
![]() |
4e653cc49f | ||
![]() |
c17d58237e | ||
![]() |
48261330de | ||
![]() |
300be6e03b | ||
![]() |
0c83442709 | ||
![]() |
d372cf598a | ||
![]() |
5fa7c76ba0 | ||
![]() |
77644a32d7 | ||
![]() |
fb588c6075 | ||
![]() |
6a586e8929 | ||
![]() |
58ef1592a5 | ||
![]() |
9730f15411 | ||
![]() |
f3e64f181d | ||
![]() |
0130c0d5b6 | ||
![]() |
1e325bcbdf | ||
![]() |
941a9a9a7f | ||
![]() |
38b4f08b2b | ||
![]() |
fe1ea6ac34 | ||
![]() |
932fb56ea9 | ||
![]() |
18dfce2873 | ||
![]() |
915192ca9f | ||
![]() |
f2b400b82c | ||
![]() |
e629364582 | ||
![]() |
3299427097 | ||
![]() |
7d239b0d45 | ||
![]() |
9836007f5e | ||
![]() |
87cceaf992 | ||
![]() |
f77dba7ac2 | ||
![]() |
d19de0c1ee | ||
![]() |
142b64fff9 | ||
![]() |
a9b20427a5 | ||
![]() |
0e02cf9b07 | ||
![]() |
5f4c3f817b | ||
![]() |
80e838aed5 | ||
![]() |
b4c369931d | ||
![]() |
1b00ca6158 | ||
![]() |
4b8a05b803 | ||
![]() |
fe816afa1d | ||
![]() |
b93a94506b | ||
![]() |
d1ef896c73 | ||
![]() |
ed5c34d335 | ||
![]() |
429a8ccd15 | ||
![]() |
a8c3d1614f | ||
![]() |
ac10c309ea | ||
![]() |
e021e06178 | ||
![]() |
8c6f3853b0 | ||
![]() |
e7196621bc | ||
![]() |
f8a5ef7c9f | ||
![]() |
85631aec0f | ||
![]() |
401b716cf5 | ||
![]() |
3d4adc8be9 | ||
![]() |
210206b699 | ||
![]() |
c0c05d51ea | ||
![]() |
9d9576612b | ||
![]() |
abdb3fd8b9 | ||
![]() |
b3f766c618 | ||
![]() |
41e93f71be | ||
![]() |
79076b2997 | ||
![]() |
3684bd2da4 | ||
![]() |
d0e22bf63d | ||
![]() |
8450d97341 | ||
![]() |
3043d2a2be | ||
![]() |
3ca31c7b04 | ||
![]() |
8802ac2fe9 | ||
![]() |
61c7487172 | ||
![]() |
3782c482ef | ||
![]() |
8c487ddbb2 | ||
![]() |
07939f235f | ||
![]() |
abfccf5002 | ||
![]() |
df83c15583 | ||
![]() |
83010879f1 | ||
![]() |
c35fd86b3b | ||
![]() |
932fd0dcff | ||
![]() |
2a53302ab9 | ||
![]() |
44a4c1c9fb | ||
![]() |
04956ecf18 | ||
![]() |
2d41d65cf2 | ||
![]() |
7e41ffdda5 | ||
![]() |
54c15a2583 | ||
![]() |
8aae0a7723 | ||
![]() |
f23d8a3774 | ||
![]() |
aad6f37f8a | ||
![]() |
404a61b571 | ||
![]() |
0312a3e474 | ||
![]() |
c25a5c99ec | ||
![]() |
ac5759af24 | ||
![]() |
9bee48dcd2 | ||
![]() |
73d9143d76 | ||
![]() |
230d78d8b4 | ||
![]() |
fbc3563b21 | ||
![]() |
4c8557055c | ||
![]() |
2f43d436c8 | ||
![]() |
a9a69ac807 | ||
![]() |
8e7fe42b5e | ||
![]() |
d70219b88d | ||
![]() |
806fa75a70 | ||
![]() |
1177b13338 | ||
![]() |
ea2d79fbfb | ||
![]() |
f60624ac5b | ||
![]() |
836a1f7b08 | ||
![]() |
a660fd3805 | ||
![]() |
d5cea091bf | ||
![]() |
0bd1727eab | ||
![]() |
8bd2822e69 | ||
![]() |
7a340792c9 | ||
![]() |
8e77d5b28d | ||
![]() |
8e79100b92 | ||
![]() |
18b63e9b5f | ||
![]() |
48b6e8dd67 | ||
![]() |
fb872b8f1e | ||
![]() |
94be13a003 | ||
![]() |
ea1c807d69 | ||
![]() |
1df98bd6a4 | ||
![]() |
6c192b67a9 | ||
![]() |
4a792d207c | ||
![]() |
1daf7543eb | ||
![]() |
b4890a3d22 | ||
![]() |
7b031a1c28 | ||
![]() |
ca098b2416 | ||
![]() |
cb5134de8d | ||
![]() |
e5009396f8 | ||
![]() |
53a116333c | ||
![]() |
13918cea25 | ||
![]() |
03f14bd5dd | ||
![]() |
8828532d14 | ||
![]() |
146ad60c7f | ||
![]() |
6da40d919b | ||
![]() |
a4d657a324 | ||
![]() |
4419430a57 | ||
![]() |
11ba3be6b9 | ||
![]() |
286af99def | ||
![]() |
a409a0a098 | ||
![]() |
ee7cfc8824 | ||
![]() |
af8d3c16bf | ||
![]() |
9d1549e1ff | ||
![]() |
845ecdc3af | ||
![]() |
1c5ef4a50f | ||
![]() |
212a9f26ab | ||
![]() |
e61015cb42 | ||
![]() |
c96ae75437 | ||
![]() |
a8e2f45b1c | ||
![]() |
33383e1f4f | ||
![]() |
b9e1a9159e | ||
![]() |
5dc41f8c94 | ||
![]() |
4aaf053760 | ||
![]() |
b718f79c47 | ||
![]() |
72b08c82b1 | ||
![]() |
3880951458 | ||
![]() |
3229882183 | ||
![]() |
f4cc847f83 | ||
![]() |
a63d5801ae | ||
![]() |
4b774eb18e | ||
![]() |
d052782caf | ||
![]() |
c2a6eeaf5e | ||
![]() |
931d70d87f | ||
![]() |
f28cd718f8 | ||
![]() |
623e4dc05c |
838
ChangeLog
838
ChangeLog
@@ -1,3 +1,841 @@
|
||||
2008-06-16 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* NEWS: 2.23.34 release.
|
||||
|
||||
2008-06-16 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* NEWS: 2.23.34 release.
|
||||
|
||||
2008-06-13 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/window-props.c: Some commenting.
|
||||
|
||||
* src/core/prefs.c: Added unified handling of integer preferences.
|
||||
Re-ordered fields in existing preferences so that changing to
|
||||
a union-based system will be easier in the future.
|
||||
|
||||
2008-06-10 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* test/tokentest/tokentest.c (draw_string_to_spec): doubles are
|
||||
%f or %g, not %d
|
||||
* test/tokentest/tokentest.ini: re-created fair copy accordingly
|
||||
|
||||
2008-06-10 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* test/tokentest: A preliminary attempt at a test for the
|
||||
theme expression tokeniser.
|
||||
|
||||
2008-06-05 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/compositor/compositor-xrender.c (paint_root, destroy_win,
|
||||
create_root_buffer, paint_windows, repair_screen, window_has_shadow,
|
||||
xrender_set_active_window, paint_dock_shadows, unmap_win, restack_win,
|
||||
make_shadow, resize_win, process_property_notify, free_win,
|
||||
process_configure_notify, process_circulate_notify, add_damage):
|
||||
defensive programming; check meta_screen_get_compositor_data()
|
||||
throughout in case it returns NULL. In particular, when this
|
||||
happened in a certain situation in xrender_set_active_window
|
||||
this caused a segfault; refs #530702 (and LP#178953 has more data)
|
||||
but this doesn't close them.
|
||||
|
||||
2008-06-02 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* NEWS: 2.23.34 release.
|
||||
|
||||
2008-06-02 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/display.c: make sure compositor things don't get
|
||||
compiled when we're not using the compositor.
|
||||
|
||||
2008-06-02 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* test/metacity-test: new test script, imported from
|
||||
branch.
|
||||
|
||||
2008-05-30 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/window-props.h: fix comments (number)
|
||||
|
||||
2008-05-30 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/window-props.h: commenting
|
||||
|
||||
2008-05-28 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/prefs.c (handle_preference_update_string,
|
||||
meta_prefs_remove_listener, queue_changed): Make disabling
|
||||
gconf work again. Closes #530870.
|
||||
|
||||
2008-05-26 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* configure.in: Post-release bump to 2.23.34.
|
||||
|
||||
2008-05-26 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* NEWS: 2.23.21 release.
|
||||
|
||||
2008-05-26 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/Makefile.am: added in two files needed for Iain's
|
||||
changes earlier to work in a release tarball
|
||||
|
||||
2008-05-24 Iain Holmes <iain@gnome.org>
|
||||
|
||||
* src/compositor/compositor-xrender.c: Add Dropdown menu atoms so we
|
||||
can add shadows to them. Fixes #517442
|
||||
Handle tooltips as well. Fixes #517524
|
||||
|
||||
2008-05-24 Iain Holmes <iain@gnome.org>
|
||||
|
||||
* src/compositor/compositor.c: Check the compositor isn't NULL before
|
||||
dereferencing it. Fixes #534569
|
||||
(meta_compositor_get_window_pixmap): Actually return a value
|
||||
|
||||
2008-05-19 Iain Holmes <iain@gnome.org>
|
||||
|
||||
* src/core/window.c: Applied patch from Ed Catmur to fix #528787
|
||||
|
||||
2008-05-19 Iain Holmes <iain@gnome.org>
|
||||
|
||||
* src/include/frame.h
|
||||
* src/include/display.h
|
||||
* src/include/xprops.h
|
||||
* src/include/compositor.h
|
||||
* src/include/types.h
|
||||
* src/include/window.h
|
||||
* src/include/errors.h
|
||||
* src/include/screen.h: New basic public API for compositor.
|
||||
|
||||
* src/compositor/*: Separate the compositor out into its own separate
|
||||
directory and set it up for backends. Initial XRender backend.
|
||||
|
||||
* src/core/compositor.[ch]: Remove
|
||||
|
||||
* src/core/frame.h
|
||||
* src/core/screen.h
|
||||
* src/core/display.h
|
||||
* src/core/window.h: Rename to -private.h so as not to clash with the
|
||||
new files in include
|
||||
|
||||
* src/core/delete.c
|
||||
* src/core/workspace.h
|
||||
* src/core/stack.[ch]
|
||||
* src/core/keybindings.[ch]
|
||||
* src/core/errors.c
|
||||
* src/core/effects.[ch]
|
||||
* src/core/core.c
|
||||
* src/core/group.h
|
||||
* src/core/edge-resistance.[ch]
|
||||
* src/core/window-props.[ch]
|
||||
* src/core/constraints.h
|
||||
* src/core/bell.[ch]
|
||||
* src/core/iconcache.h
|
||||
* src/core/session.[ch]
|
||||
* src/core/main.c
|
||||
* src/core/place.h
|
||||
* src/core/xprops.c
|
||||
* src/ui/tabpopup.c: Use the new -private headers
|
||||
|
||||
* src/core/display.c
|
||||
* src/core/frame.c
|
||||
* src/core/window.c
|
||||
* src/core/screen.c: Add the API functions required by the compositor
|
||||
|
||||
* src/Makefile.am: Relocate the new files
|
||||
|
||||
2008-05-13 Robert Escriva <me@robescriva.com>
|
||||
|
||||
* src/ui/theme.h (struct): remove color_set flag
|
||||
* src/ui/theme.c (meta_color_spec_render,
|
||||
meta_color_spec_new_from_string): remove check of color_set flag
|
||||
before rendering (we always do it now). Closes #511826.
|
||||
|
||||
2008-05-12 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* tools/xlib.py: Basic Python-based Xlib client for testing
|
||||
and building upon.
|
||||
|
||||
2008-05-09 Elijah Newren <newren gmail com>
|
||||
|
||||
* src/ui/color.[ch]:
|
||||
Remove these two unused files
|
||||
|
||||
2008-05-04 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
Added curly brackets in two places to keep -pedantic happy.
|
||||
|
||||
* src/core/window-props.c (meta_display_init_window_prop_hooks)
|
||||
* src/core/group-props.c (meta_display_init_group_prop_hooks)
|
||||
|
||||
2008-05-03 Matt Krai <mkraai@beckman.com>
|
||||
|
||||
* src/core/delete.c (io_from_ping_dialog): fix type of "len" variable
|
||||
(refs #526049)
|
||||
2008-05-02 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
All information should live in exactly one place. This means
|
||||
that the list of atoms should not be replicated anywhere.
|
||||
Therefore, we include it via x-macros. Closes #530843.
|
||||
|
||||
* src/core/atomnames.h: added list of atom names
|
||||
* src/Makefile.am: added reference to new file
|
||||
* src/core/display.h
|
||||
* src/core/display.c (twice)
|
||||
* src/core/screen.c: #included atomnames.h instead of having
|
||||
an enormous list of atoms
|
||||
* src/core/group-props.c
|
||||
* src/core/window.c
|
||||
* src/core/compositor.c
|
||||
* src/core/window-props.c
|
||||
* src/core/delete.c
|
||||
* src/core/workspace.c
|
||||
* src/core/stack.c
|
||||
* src/core/keybindings.c
|
||||
* src/core/iconcache.c
|
||||
* src/core/group.c
|
||||
* src/core/xprops.c: changed to new, simpler identifiers
|
||||
for atoms
|
||||
|
||||
2008-04-29 Chris Wang <chris.wang@sun.com>
|
||||
|
||||
* src/core/window.c (meta_window_new): XGetWindowAttributes
|
||||
can return an error value, and if it does its other results
|
||||
are invalid! (#530485)
|
||||
|
||||
2008-04-29 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/ui/fixedtip.[ch]: documentation
|
||||
|
||||
2008-04-27 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* configure.in: Post-release bump to 2.23.21.
|
||||
|
||||
2008-04-27 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* NEWS: 2.23.13 release.
|
||||
|
||||
2008-04-27 Erwann Chenede <erwann.chenede@sun.com>
|
||||
|
||||
* src/core/place.c (meta_window_place): re-enable cascade
|
||||
code which was wrongly removed a year ago. Closes #529925.
|
||||
|
||||
2008-04-22 Carlos Garnacho <carlos@imendio.com>
|
||||
|
||||
* src/core/compositor.c (process_property_notify,
|
||||
find_window_in_display): Propagate opacity to frame window.
|
||||
|
||||
2008-04-22 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* configure.in: Post-release bump to 2.23.13.
|
||||
|
||||
2008-04-22 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* NEWS: 2.23.8 release.
|
||||
|
||||
2008-04-22 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* configure.in: Post-release bump to 2.21.8.
|
||||
(Which was seriously belated. Sorry, folks.)
|
||||
|
||||
2008-04-22 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/effects.c: a few comments
|
||||
|
||||
2008-04-10 Lucas Rocha <lucasr@gnome.org>
|
||||
|
||||
* src/Makefile.am: no need to create a symlink to .desktop file in
|
||||
default-session directory anymore as gnome-session will find
|
||||
metacity's .desktop in its original place.
|
||||
|
||||
2008-04-07 iain <iain@gnome.org>
|
||||
|
||||
* src/core/compositor.c (hide_overlay_window): Hide the overlay window
|
||||
(meta_compositor_unmanage_screen): Release the compositor overlay.
|
||||
(#526770)
|
||||
|
||||
2008-04-07 Jens Granseuer <jensgr@gmx.net>
|
||||
|
||||
* src/core/session.c: (save_state),
|
||||
(warn_about_lame_clients_and_finish_interact):
|
||||
reorder declarations so we don't break C89 compilers.
|
||||
|
||||
2008-04-06 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* NEWS: 2.23.5 release.
|
||||
|
||||
2008-04-03 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/prefs.c (handle_preference_update_bool): preferences
|
||||
which have a null target don't get updated! (#526016)
|
||||
|
||||
2008-03-29 Lucas Rocha <lucasr.at.mundo@gmail.com>
|
||||
|
||||
* src/metacity.desktop.in, src/Makefile.am: make Metacity
|
||||
install its desktop files in the default session directory
|
||||
as required by the new gnome-session. (Closes #525051.)
|
||||
|
||||
2008-03-29 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/ui/preview-widget.c (meta_preview_get_clip_region):
|
||||
prevent null dereference if the theme was invalid, which
|
||||
caused crashes in gnome-appearance-properties. No GNOME
|
||||
bug number, but I believe this is a fix for Launchpad bug
|
||||
#199402 and its many duplicates.
|
||||
|
||||
2008-03-28 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* src/core/window.c (meta_window_new_with_attrs): Don't
|
||||
immediately unminimize an initially iconic window (#491090)
|
||||
|
||||
2008-03-27 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/session.c (regenerate_save_file, save_state, load_state):
|
||||
files are saved in ~/.config/metacity/sessions and checked for there
|
||||
and in ~/.metacity/sessions. Fixes #518596.
|
||||
|
||||
2008-03-27 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/display.c (meta_display_close): fix regression
|
||||
where Metacity sometimes wouldn't quit when replaced
|
||||
|
||||
2008-03-26 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/display.c (event_callback): meta_display_screen_for_root
|
||||
is quite capable of returning NULL.
|
||||
|
||||
2008-03-25 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/display.c (meta_display_queue_retheme_all_windows,
|
||||
meta_set_syncing, meta_display_set_cursor_theme, disable_compositor,
|
||||
meta_display_for_x_display, meta_display_open, meta_display_close,
|
||||
meta_display_ungrab): MetaDisplay becomes a singleton. The static
|
||||
variable which holds this singleton is renamed "the_display" so as
|
||||
not to mask the this parameter in the methods.
|
||||
|
||||
* src/core/main.c (main):
|
||||
* src/core/session.c (warn_about_lame_clients_and_finish_inte,
|
||||
save_state, io_from_warning_dialog):
|
||||
* src/core/core.c (meta_core_increment_event_serial):
|
||||
* src/core/delete.c (release_window_with_fd, search_and_destroy_window):
|
||||
sympathy changes for this, and consequent simplification.
|
||||
Closes #499301.
|
||||
|
||||
2008-03-21 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* configure.in: Post-release bump to 2.23.5.
|
||||
|
||||
2008-03-21 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* NEWS: 2.23.3 release.
|
||||
|
||||
2008-03-21 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/ui/menu.c (activate_cb, get_workspace_name_with_accel): Workspaces
|
||||
whose name is the standard name plus a non-empty string are handled
|
||||
correctly in menus. Closes #453678.
|
||||
|
||||
2008-03-19 Iain Holmes <iain@gnome.org>
|
||||
|
||||
* src/core/compositor.c (meta_compositor_set_active_window): Handle
|
||||
compositor being disabled and don't crash.
|
||||
|
||||
2008-03-19 Iain Holmes <iain@gnome.org>
|
||||
|
||||
* src/core/compositor.c (meta_compositor_set_active_window): Add a
|
||||
screen argument.
|
||||
(process_property_notify): Damage the whole screen when the background
|
||||
changes. Fixes 522599
|
||||
(add_repair): Use the idle instead of the timeout. Fixes 522166
|
||||
(unmap_win): If the window is also focus window NULLify it.
|
||||
|
||||
* src/core/window.c (meta_window_notify_focus): Notify when a window
|
||||
has lost focus, pass in screen as well.
|
||||
|
||||
2008-03-18 Iain Holmes <iain@gnome.org>
|
||||
|
||||
* src/core/compositor.c (window_has_shadow): Allow shaped windows
|
||||
_with frames_ to have shadows.
|
||||
(meta_compositor_set_active_window): Watch for the focus of windows
|
||||
and change the size of the drop shadows.
|
||||
(generate_shadows): Create differently sized shadows.
|
||||
(meta_compositor_get_window_pixmap): Get the xwindow correctly.
|
||||
|
||||
* src/core/window.c (meta_window_notify_focus): Set the active window
|
||||
in the compositor.
|
||||
|
||||
2008-03-18 Marco Pesenti Gritti <mpgritti@gmail.com>
|
||||
|
||||
* src/core/window.c (window_would_be_covered): newly created windows
|
||||
can't be considered to be above themselves; fixes bug #519188.
|
||||
|
||||
2008-03-11 Matthew Wilson <msw@gimp.org>
|
||||
|
||||
* src/core/keybindings.c (meta_display_process_key_event, process_event,
|
||||
find_handler, process_mouse_move_resize_grab): allow moving workspace
|
||||
while moving window with modifier
|
||||
* src/core/workspace.c (meta_workspace_activate_with_focus): remove the
|
||||
correct window on jumping workspace while moving
|
||||
|
||||
2008-03-10 Josh Lee <jleedev@gmail.com>
|
||||
|
||||
* src/core/compositor.c (window_has_shadow): Don't shadow
|
||||
shaped windows.
|
||||
|
||||
2008-03-07 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* configure.in: Post-release bump to 2.23.3.
|
||||
|
||||
2008-03-07 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* NEWS: 2.23.2 release.
|
||||
|
||||
2008-03-07 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/prefs.c (mouse_button_mods_handler): remove
|
||||
debug statements (*blush*)
|
||||
|
||||
2008-03-06 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* configure.in: Post-release bump to 2.23.2.
|
||||
|
||||
2008-03-06 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* NEWS: 2.23.1 release.
|
||||
|
||||
2008-03-06 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* tools/release-wrangler.py: basic md5 printing (not used yet);
|
||||
also print release announcements to stdout (eventually will
|
||||
need to be emailed to release list and blogged)
|
||||
|
||||
2008-03-06 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
Part three of the great prefs refactor, this time
|
||||
dealing with string preferences. (This was the most
|
||||
complicated part, and has been especially tested and
|
||||
valground before committing. As ever, though, let us
|
||||
know if you find a problem.)
|
||||
|
||||
* src/core/prefs.c (MetaStringPreference): new struct.
|
||||
* src/core/prefs.c (update_*): replaced with *_handler
|
||||
* src/core/prefs.c (meta_prefs_init): uses new string prefs
|
||||
init; uses array of gconf dirs to monitor rather than
|
||||
repeating code.
|
||||
* src/core/prefs.c (handle_preference_init_enum): tidying
|
||||
* src/core/prefs.c (change_notify): uses new string prefs
|
||||
|
||||
2008-03-04 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* MAINTAINERS: added some spacing to see whether it
|
||||
helps Pulse
|
||||
|
||||
2008-03-03 Cosimo Cecchi <anarki@lilik.it>
|
||||
|
||||
Add ability to vertically and horizontally maximise
|
||||
using the mouse, by clicking the titlebar in various
|
||||
ways. A very similar patch was received from Jason Ribero.
|
||||
Thanks also go to Tony Houghton and Carlo Wood, who
|
||||
both submitted patches which solved this differently.
|
||||
Closes #358674.
|
||||
|
||||
* src/include/common.h (MetaActionTitlebar): new values
|
||||
for the new actions
|
||||
* src/core/core.c (meta_core_maximize_{vertic|horizont}ally):
|
||||
new functions.
|
||||
* src/ui/frames.c (meta_frame_titlebar_event): handle the
|
||||
new action values
|
||||
* src/core/window.h: new macros (for regularity, not really
|
||||
necessary)
|
||||
* src/core/prefs.c (symtab_titlebar_action): new string
|
||||
representations of the action values
|
||||
* src/metacity.schemas.in: documentation
|
||||
|
||||
2008-02-29 Andrea Del Signore <sejerpz@tin.it>
|
||||
|
||||
Add support for "spacer" as a button type which adds some
|
||||
empty space. Closes #509165.
|
||||
|
||||
* src/ui/theme.c (meta_frame_layout_calc_geometry),
|
||||
src/include/common.h (MetaButtonLayout),
|
||||
src/core/prefs.c (update_button_layout, button_layout_equal),
|
||||
src/metacity.schemas.in: add spacer support
|
||||
|
||||
2008-02-28 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/compositor.h: removed unnecessary #include which
|
||||
should have been in Jim's patch (not sure how it slipped
|
||||
through the tests!)
|
||||
|
||||
2008-02-27 Jim Huang <jserv.tw@gmail.com>
|
||||
|
||||
* src/core/spring-model.[ch]: deleted as no longer used
|
||||
* src/Makefile.am: modified accordingly
|
||||
|
||||
2008-02-27 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
Lots of tiny fixes to make sure we compile with
|
||||
"gcc -ansi -Werror".
|
||||
|
||||
2008-02-26 Jens Granseuer <jensgr@gmx.net>
|
||||
|
||||
* src/core/constraints.c (constrain_aspect_ratio,
|
||||
constrain_size_limits, constrain_size_increments):
|
||||
reorder declarations so we don't break C89 compilers.
|
||||
Closes #518917.
|
||||
|
||||
2008-02-26 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* configure.in: Post-release bump to 2.23.1.
|
||||
|
||||
2008-02-26 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* NEWS: 2.23.0 release.
|
||||
|
||||
2008-02-26 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* tools/release-wrangler.py: ANY post-release bump is now the
|
||||
most recent, not just the one that matches the current version.
|
||||
Otherwise, you can't use these tools straight after a branch.
|
||||
The changeset before this one was mislabelled because of this.
|
||||
It has now been excised from the changelog.
|
||||
|
||||
2008-02-25 Thomas Wood <thos@gnome.org>
|
||||
|
||||
* src/ui/preview-widget.[ch] (meta_preview_get_clip_region):
|
||||
allow users of the preview widget to get a mask for windows
|
||||
in the correct shape for the current theme.
|
||||
|
||||
2008-02-23 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
Refactor handling of boolean preferences.
|
||||
|
||||
* src/core/prefs.c (handle_preference_init_bool,
|
||||
handle_preference_update_bool): new functions.
|
||||
* src/core/prefs.c (meta_prefs_init, change_notify):
|
||||
use the new functions.
|
||||
* src/core/prefs.c (update_*): several of these removed whose
|
||||
only purpose was to receive boolean preferences.
|
||||
* src/core/prefs.c (cleanup_error, get_bool): moved down to make
|
||||
the flow of ideas more obvious.
|
||||
* src/core/prefs.c (maybe_give_disable_workarounds_warning): new
|
||||
function containing duplicated code from elsewhere.
|
||||
* src/core/prefs.c (init_button_layout): only compiled when
|
||||
HAVE_GCONF is not defined. Removed a compiler warning.
|
||||
|
||||
2008-02-23 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* tools/commit-wrangler.py: Print URL of changeset on success.
|
||||
|
||||
2008-02-23 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
Refactored handling of enumerated preferences.
|
||||
|
||||
* src/core/prefs.c (handle_preference_init_enum,
|
||||
handle_preference_update_enum): new functions.
|
||||
(meta_prefs_init, change_notify): use regularised
|
||||
forms and remove old copy-and-pasted code.
|
||||
Also many small similar functions removed which
|
||||
only existed to deal with each kind of enum.
|
||||
Also some amount of correction of which parts were
|
||||
and weren't inside "#ifdef HAVE_GCONF" blocks.
|
||||
|
||||
|
||||
2008-02-21 Mikkel Kamstrup Erlandsen <mikkel.kamstrup@gmail.com>
|
||||
|
||||
* src/core/constraints.c: Respect requested position on
|
||||
_NET_MOVERESIZE_WINDOW. Closes #448183.
|
||||
|
||||
2008-02-18 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* src/core/window.h: Make skip-taskbar windows appear in the
|
||||
Ctrl-Alt-Tab list. Closes #106249.
|
||||
|
||||
2008-02-18 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* configure.in: if we have libSM and its headers,
|
||||
that means we did find it, not that we didn't.
|
||||
Closes #328210.
|
||||
|
||||
2008-02-18 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/window.c (warp_grab_pointer): When
|
||||
resizing a window with the keyboard, stay one
|
||||
pixels from the edges so that the cursor remains
|
||||
resting on a window edge even if we escape,
|
||||
whatever side it was on. Closes #436257.
|
||||
|
||||
2008-02-17 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* tools/commit-wrangler.py: added new script to manage commits
|
||||
|
||||
2008-02-17 Jim Huang <jserv.tw@gmail.com>
|
||||
|
||||
* src/core/prefs.c (update_binding): Allow compilation
|
||||
when gconf mode is disabled. Closes #515019.
|
||||
|
||||
2008-02-14 Jim Huang <jserv.tw@gmail.com>
|
||||
|
||||
* src/core/display.c, src/core/util.c: fixups to allow
|
||||
compilation in non-verbose mode. Closes #515152.
|
||||
|
||||
2008-02-12 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* configure.in: Correct help for verbose option name.
|
||||
|
||||
2008-02-12 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* configure.in: Post-branch bump to 2.23.0.
|
||||
|
||||
2008-02-12 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* configure.in: Post-release bump to 2.21.21.
|
||||
|
||||
2008-02-11 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* NEWS: 2.21.13 release.
|
||||
|
||||
2008-02-04 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/compositor.c: only use compositor version if
|
||||
we have a compositor. Closes #514453.
|
||||
|
||||
2008-02-04 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* configure.in, src/ui/ui.c: remove workaround for a problem
|
||||
in GTK 1.3.9(!) which was causing problems. Closes #513737.
|
||||
|
||||
2008-01-28 Michael Meeks <michael.meeks@novell.com>
|
||||
|
||||
* src/core/display.c (meta_display_open),
|
||||
* src/core/compositor.c: fetch & use composite
|
||||
version, for remote screens that don't match the
|
||||
compile system's version.
|
||||
(meta_compositor_manage_screen): bin erroneous FIXME.
|
||||
(add_win): remove common warning churn for (very)
|
||||
transient windows
|
||||
|
||||
2008-02-03 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* tools/patch-wrangler.py: another program I use for maintenance
|
||||
which other people might find useful and which should probably
|
||||
be in svn. Also not very polished.
|
||||
|
||||
2008-02-03 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* test/tokentest/tokentest.c, test/tokentest/tokentest.ini: added
|
||||
new files for a regression test on the tokeniser. (They aren't very
|
||||
polished at the moment and aren't included in the autotools build.)
|
||||
|
||||
2008-02-03 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* configure.in: Post-release bump to 2.21.13.
|
||||
|
||||
2008-02-03 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* NEWS: 2.21.8 release.
|
||||
|
||||
2008-02-03 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* tools/release-wrangler.py: Fix quoting error and added some
|
||||
more error checking.
|
||||
|
||||
2008-02-03 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* tools/release-wrangler.py: basic release script; needs work,
|
||||
but probably good enough for the current unstable release
|
||||
|
||||
2008-02-02 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/Makefile.am: core.h is in include, not core. (Last one, I
|
||||
promise.)
|
||||
|
||||
2008-02-02 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/Makefile.am: main.h is in include, not core.
|
||||
|
||||
2008-02-02 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/Makefile.am: draw-workspace.h is in ui, not core.
|
||||
|
||||
2008-02-01 Alex R.M. Turner <armtuk@gmail.com>
|
||||
|
||||
* src/core/display.c (meta_get_tab_entry_list): Have the list also pull
|
||||
windows that are in other workspaces that have the
|
||||
wm_state_needs_attention flag set
|
||||
* src/core/window.c (meta_window_set_demands_attention): Make windows that
|
||||
are on other workspaces that demand attention that aren't obscured
|
||||
count as being obscured
|
||||
Bug #333548.
|
||||
|
||||
2008-01-28 Christian Persch <chpe@gnome.org>
|
||||
|
||||
* src/core/display.c (convert_property):
|
||||
* src/core/screen.c (meta_screen_calc_workspace_layout):
|
||||
* src/core/xprops.c (meta_prop_get_values):
|
||||
Use G_STRFUNC instead of the deprecated G_GNUC_FUNCTION.
|
||||
Bug #512561.
|
||||
|
||||
2008-01-21 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/ui/theme.[ch]: more commenting.
|
||||
|
||||
2008-01-18 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/ui/theme.[ch]: some more commenting.
|
||||
|
||||
2008-01-16 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/bell.c: Correct comment.
|
||||
* src/core/main.c: Correct comment.
|
||||
* src/ui/theme.c: Much commenting; #ifdeffed-out
|
||||
debug code removed.
|
||||
* src/ui/theme.h: Much commenting.
|
||||
|
||||
2008-01-13 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/bell.c: Commenting.
|
||||
* src/core/main.c: Commenting, and fixing existing comments.
|
||||
|
||||
2008-01-12 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/main.c: Refactor repeated lines in main() to
|
||||
iterate instead.
|
||||
|
||||
2008-01-12 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/main.[ch] (meta_get_main_loop): removed as it
|
||||
was never used.
|
||||
* src/core/main.c: lots of comments.
|
||||
* src/core/main.c (version): copyright year is 2008.
|
||||
* src/core/c-screen.[ch], src/core/c-window.[ch]: removed
|
||||
files from Søren's compositor which were removed by the
|
||||
merge with Iain's compositor but reintroduced by the split
|
||||
to separate subdirectories.
|
||||
* src/core/display.c: fix comments.
|
||||
|
||||
2008-01-12 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/display.c: reinstated missing first character!
|
||||
* Doxyfile: correct reordering of blank fields.
|
||||
|
||||
2008-01-12 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/display.c: change comments from /*! to /** because the
|
||||
other way makes doxygen think they are Qt comments, which messes
|
||||
up brief descriptions.
|
||||
* Doxyfile: check in so other people can generate documentation
|
||||
too.
|
||||
|
||||
2008-01-07 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/display.c: further commenting (trying to keep comment
|
||||
addings down to once a day at most so you don't all get spammed
|
||||
too much).
|
||||
|
||||
2008-01-07 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/main.c (main): g_free is a no-op on nulls; there is no
|
||||
need to test.
|
||||
|
||||
2008-01-06 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/display.c: Function commenting marathon; more to come.
|
||||
|
||||
2008-01-02 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* src/core/xprops.c (meta_prop_get_cardinal), src/core/compositor.c
|
||||
(timeout_debug): Two really minor coding standards layout tweaks.
|
||||
|
||||
2007-12-27 Iain Holmes <iain@gnome.org>
|
||||
|
||||
* src/core/compositor.c: Don't do anything in
|
||||
meta_compositor_free_window, it doesn't seem to be needed and breaks
|
||||
things very badly. http://bugzilla.gnome.org/show_bug.cgi?id=504876
|
||||
|
||||
2007-12-27 Iain Holmes <iain@gnome.org>
|
||||
|
||||
* src/core/compositor.c: When a window is mapped, don't set damaged to
|
||||
TRUE. Fixes a bug when redrawing shadows.
|
||||
|
||||
2007-12-25 Iain Holmes <iain@gnome.org>
|
||||
|
||||
* src/core/compositor.c: USe the compositor overlay window instead of
|
||||
the root window.
|
||||
|
||||
2007-12-21 Paolo Borelli <pborelli@katamail.com>
|
||||
|
||||
* src/core/core.c (meta_invalidate_default_icons): do not leak list.
|
||||
|
||||
* src/core/edge-resistance.c
|
||||
(meta_display_compute_resistance_and_snapping_edges): ditto.
|
||||
|
||||
* src/core/workspace.c (meta_workspace_index): small cleanup in list
|
||||
handling.
|
||||
|
||||
2007-12-19 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* src/core/display.c (meta_display_open): fix a third warning
|
||||
about %d and long int
|
||||
|
||||
* src/core/delete.c (io_from_ping_dialog): fix another warning
|
||||
about long int to %d
|
||||
|
||||
* src/core/compositor.c (meta_compositor_new): fix a warning about
|
||||
long int to %d
|
||||
|
||||
* src/core/iconcache.c (meta_read_icons): use
|
||||
meta_ui_get_fallback_icons() instead of incorrectly including theme.h
|
||||
|
||||
* src/ui/ui.c (meta_ui_get_fallback_icons): new function
|
||||
|
||||
2007-12-19 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* src/ui, src/core, src/include: sort source files into these
|
||||
directories according to which part of the WM they are supposed to
|
||||
be in. In an eventual plan, we should also create
|
||||
src/compositor/render, src/compositor/fallback and move some of
|
||||
the compositor stuff into that.
|
||||
|
||||
* autogen.sh: require a newer automake, so we don't have to use
|
||||
a recursive build
|
||||
|
||||
* src/ui/tabpopup.c: put in a hack to make the build temporarily
|
||||
work, want to commit the large rearrangement before fixing this
|
||||
not to include workspace.h or frame.h
|
||||
|
||||
* src/core/iconcache.c (meta_read_icons): temporarily break this
|
||||
to get the build to work, want to commit the large rearrangement
|
||||
before fixing this file not to include theme.h
|
||||
|
||||
2007-12-19 Thomas Thurman <thomas@thurman.org.uk>
|
||||
|
||||
* configure.in: Post-release bump to 2.21.8.
|
||||
|
||||
2007-12-19 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* NEWS: 2.21.5 release.
|
||||
|
||||
2007-12-19 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* configure.in: print "Subversion" and not "CVS".
|
||||
|
||||
2007-12-18 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* configure.in: compositor enabled by default.
|
||||
|
||||
2007-12-18 Iain Holmes <iain@gnome.org>
|
||||
|
||||
* configure.in, src/theme.c, src/display.c,
|
||||
src/theme.h, src/display.h, src/theme-parser.c,
|
||||
src/compositor.c, src/c-screen.c, src/compositor.h,
|
||||
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
|
||||
src/screen.h, src/c-window.c, src/c-window.h,
|
||||
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
|
||||
|
||||
2007-12-14 Thomas Thurman <thomas@thurman.org.uk>
|
||||
|
||||
* configure.in: Post-release bump to 2.21.5.
|
||||
|
||||
2007-12-14 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* NEWS: 2.21.3 release.
|
||||
|
@@ -22,6 +22,7 @@ Userid: tthurman
|
||||
|
||||
Semi-active maintainers
|
||||
--------------------------------
|
||||
|
||||
Havoc Pennington
|
||||
Email: hp redhat com
|
||||
Userid: hp
|
||||
@@ -32,6 +33,7 @@ Userid: hp
|
||||
|
||||
Important historical figureheads
|
||||
--------------------------------
|
||||
|
||||
Rob Adams (readams readams net)
|
||||
- Was the main maintainer of metacity for a while; particular areas
|
||||
of focus included xinerama, placement, and an older version of the
|
||||
|
238
NEWS
238
NEWS
@@ -1,3 +1,241 @@
|
||||
|
||||
2.23.34
|
||||
=======
|
||||
|
||||
Thanks to Thomas Thurman for improvements in this version.
|
||||
|
||||
- Commenting and tidying (Thomas)
|
||||
- Fix possible compositor crash (Thomas) (#530702)
|
||||
|
||||
Translations
|
||||
Khaled Hosny (ar), Yavor Doganov (bg), Jorge González (es), Kjartan Maraas (nb),
|
||||
Yannig Marchegay (Kokoyaya) (oc), Theppitak Karoonboonyanan (th), Clytie
|
||||
Siddall (vi)
|
||||
|
||||
2.23.34
|
||||
=======
|
||||
|
||||
Thanks to Thomas Thurman for improvements in this version.
|
||||
|
||||
- Commenting and tidying (Thomas)
|
||||
- Fix possible compositor crash (Thomas) (#530702)
|
||||
|
||||
Translations
|
||||
Khaled Hosny (ar), Yavor Doganov (bg), Jorge González (es), Kjartan Maraas (nb),
|
||||
Yannig Marchegay (Kokoyaya) (oc), Theppitak Karoonboonyanan (th), Clytie
|
||||
Siddall (vi)
|
||||
|
||||
2.23.34
|
||||
=======
|
||||
|
||||
Thanks to Thomas Thurman for improvements in this version.
|
||||
|
||||
- Various commenting (Thomas)
|
||||
- Ensure you can turn off compositor with "configure" (Thomas)
|
||||
- Ensure you can turn off gconf with "configure" (Thomas) (#530870)
|
||||
|
||||
Translations
|
||||
Clytie Siddall (vi)
|
||||
|
||||
2.23.21
|
||||
=======
|
||||
|
||||
Thanks to Robert Escriva, Iain Holmes, Matt Krai, Thomas Thurman,
|
||||
and Chris Wang for improvements in this version.
|
||||
|
||||
- Add shadow ability for menus and tooltips (Iain) (#517442) (#517524)
|
||||
- Fix possible crashes in compositor (Iain) (#534569) (#528787)
|
||||
- Major reorganisation of compositor code (Iain)
|
||||
- Initial version of XRender backend for the compositor (Iain)
|
||||
- New basic public API for compositor (Iain)
|
||||
- Window decoration updates colour when GTK theme changes (Robert) (#511826)
|
||||
- Minor code cleanup for pedantic compilers (Thomas)
|
||||
- Further code cleanup for pedantic compilers (Matt) (#526049)
|
||||
- The atom list appears only once in the code (Thomas) (#530843)
|
||||
- Don't attempt to read attributes of invalid windows (Chris) (#530485)
|
||||
|
||||
Translations
|
||||
Khaled Hosny (ar), Gabor Kelemen (hu), Kjartan Maraas (nb), Tino Meinen (nl),
|
||||
Theppitak Karoonboonyanan (th)
|
||||
2.23.13
|
||||
=======
|
||||
|
||||
Thanks to Erwann Chenede and Carlos Garnacho for improvements
|
||||
in this version.
|
||||
|
||||
- Re-enable cascading (Erwann) (#529925)
|
||||
- Propagate opacity to frame windows (spec compliance!) (Carlos)
|
||||
|
||||
Translations
|
||||
- None this time!
|
||||
|
||||
2.23.8
|
||||
======
|
||||
|
||||
Thanks to Lucas Rocha, Iain Holmes, and Jens Granseuer for improvements
|
||||
in this version.
|
||||
|
||||
* No need to symlink to .desktop files (Lucas)
|
||||
* Fixes to compositor's dealings with overlay windows (Iain)
|
||||
* C89 fixes (Jens)
|
||||
|
||||
Translators:
|
||||
Khaled Hosny (ar), Amitakhya Phukan (as), Ihar Hrachyshka (be@latin),
|
||||
Petr Kovar (cs), Rhys Jones (cy), Kenneth Nielsen (da), Andre Klapper (de),
|
||||
Jorge González (es), Iñaki Larrañaga Murgoitio (eu), Ilkka Tuohela (fi),
|
||||
Claude Paroz (fr), Seán de Búrca (ga), Ignacio Casal Quinteiro (gl),
|
||||
Yuval Tanny (he), Gabor Kelemen (hu), Luca Ferretti (it), Takeshi AIHANA (ja),
|
||||
Shankar Prasad (kn), Changwoo Ryu (ko), Arangel Angov (mk), sandeep shedmake (mr),
|
||||
Kjartan Maraas (nb), Nabin Gautam (ne), Wouter Bolsterlee (nl),
|
||||
Eskild Hustvedt (nn), Yannig Marchegay (Kokoyaya) (oc), Tomasz Dominikowski (pl),
|
||||
Duarte Loreto (pt), Vasiliy Faronov (ru), Daniel Nylander (sv),
|
||||
Theppitak Karoonboonyanan (th), Baris Cicek (tr), Maxim Dziumanenko (uk),
|
||||
Clytie Siddall (vi), Woodman Tuen (zh_HK), Woodman Tuen (zh_TW)
|
||||
2.23.5
|
||||
======
|
||||
|
||||
Thanks to Lucas Rocha, Owen Taylor, and Thomas Thurman for improvements in this
|
||||
version.
|
||||
|
||||
- Updates of useless preferences don't crash (Thomas) (#526016)
|
||||
- Compliance with new gnome-session (Lucas) (#525051)
|
||||
- Preview widget doesn't crash on broken themes (Thomas) (Launchpad 199402)
|
||||
- Initially iconic windows don't unminimise (Owen) (#491090)
|
||||
- Move ~/.metacity to ~/.config/metacity (Thomas) (#518596)
|
||||
- Metacity doesn't stay around when replaced (Thomas)
|
||||
- Extra check for null return in a function (Thomas)
|
||||
- Displays are singletons, simplifying code (Thomas) (#499301)
|
||||
|
||||
Translations
|
||||
Jorge González (es), Eskild Hustvedt (nn), Baris Cicek (tr), Clytie Siddall (vi)
|
||||
|
||||
2.23.3
|
||||
======
|
||||
|
||||
Thanks to Marco Pesenti Gritti, Iain Holmes, Josh Lee, Thomas Thurman, and
|
||||
Matthew Wilson for improvements in this version.
|
||||
|
||||
- Workspaces whose name is the same as the standard name, plus some string,
|
||||
are not cut off. (Thomas) (#453678)
|
||||
- Improve compositor performance (Iain) (#522166)
|
||||
- Draw wallpaper correctly when we start up with compositor
|
||||
(Iain) (#522599)
|
||||
- Several other smaller compositor fixes (Iain)
|
||||
- Don't draw shadows on shaped windows unless they have frames
|
||||
(Iain) (#505333)
|
||||
- Newly-created keep-above windows get focus (Marco) (#519188)
|
||||
- Allow moving workspace when dragging with modifier key (Matthew)
|
||||
(#474195)
|
||||
|
||||
Translations
|
||||
Kenneth Nielsen (da), Gabor Kelemen (hu), Vasiliy Faronov (ru), Daniel
|
||||
Nylander (sv), Maxim Dziumanenko (uk), Woodman Tuen (zh_HK)
|
||||
|
||||
2.23.2
|
||||
======
|
||||
|
||||
Removed some debug statements introduced in 2.23.1. Brown paper bag release.
|
||||
|
||||
|
||||
2.23.1
|
||||
======
|
||||
|
||||
Thanks to Cosimo Cecchi, Jens Granseuer, Jim Huang, Andrea Del Signore, and
|
||||
Thomas Thurman for improvements in this version.
|
||||
|
||||
(Cosimo's patch was very similar to another received from Jason Ribero.)
|
||||
|
||||
- Allow horizontal and vertical maximisation using the mouse (Cosimo/Jason)
|
||||
(#358674)
|
||||
- Allow "spacer" as a value for buttons, for blank space (Andrea) (#509165)
|
||||
- Remove unused code (Jim)
|
||||
- refactor preferences handling (Thomas)
|
||||
- make sure we're valid C89 (Jens) (#518917)
|
||||
- some messing with tool scripts (Thomas)
|
||||
|
||||
Translations
|
||||
Jorge González (es), Claude Paroz (fr), Woodman Tuen (zh_HK), Woodman
|
||||
Tuen (zh_TW)
|
||||
|
||||
2.23.0
|
||||
======
|
||||
|
||||
Thanks to Matthias Clasen, Mikkel Kamstrup Erlandsen, Jim Huang, Thomas Thurman,
|
||||
and Thomas Wood for improvements in this version.
|
||||
|
||||
- the preview widget can draw shaped windows properly! (Thomas W, #460018)
|
||||
- refactored handling of boolean and enumerated gconf preferences;
|
||||
refactoring of string and integer preferences will follow shortly (Thomas T)
|
||||
- Applications asking to move and resize windows at the same time have
|
||||
both their requests granted (Mikkel) (#448183)
|
||||
- Windows marked "skip taskbar" don't appear in the ctrl-alt-tab list
|
||||
(Matthias) (#106249)
|
||||
- fix session management detection (Thomas T) (#328210)
|
||||
- when resizing with the keyboard, the cursor stays on a window edge if
|
||||
you escape, whichever direction you were going (Thomas T) (#436257)
|
||||
- fix major breakage when gconf was turned off in configure (Jim) (#515019)
|
||||
- fix major breakage when verbose was turned off in configure (Jim) (#515152)
|
||||
- fix name of verbose option in help (Thomas T)
|
||||
- various bits of messing around with release scripts (Thomas T)
|
||||
|
||||
Translations
|
||||
Ihar Hrachyshka (be@latin), Ilkka Tuohela (fi), Ignacio Casal Quinteiro (gl),
|
||||
Shankar Prasad (kn), Changwoo Ryu (ko), Nabin Gautam (ne), Wouter Bolsterlee (nl)
|
||||
|
||||
2.21.13
|
||||
=======
|
||||
|
||||
Thanks to Michael Meeks and Thomas Thurman for improvements in this version.
|
||||
|
||||
- Only use compositor version if we have a compositor (Thomas) (#514453)
|
||||
- Remove workaround for a problem in an ancient GTK version (Thomas) (#513737)
|
||||
- Compositor efficiency fixes (Michael)
|
||||
- Various tools added (Thomas)
|
||||
|
||||
Translations
|
||||
Amitakhya Phukan (as), Rhys Jones (cy), Andre Klapper (de), Takeshi AIHANA (ja),
|
||||
Arangel Angov (mk), Tomasz Dominikowski (pl), Duarte Loreto (pt)
|
||||
|
||||
2.21.8
|
||||
======
|
||||
|
||||
Thanks to Paolo Borelli, Iain Holmes, Havoc Pennington, Christian Persch, Thomas
|
||||
Thurman, and Alex R.M. Turner for improvements in this version.
|
||||
|
||||
- Windows on other workspaces which need attention appear in the alt-tab
|
||||
list too (Alex) (#333548)
|
||||
- Remove deprecated function call (Christian) (#512561)
|
||||
- New release script (Thomas)
|
||||
- Made a start at improving the general number of comments (Thomas)
|
||||
- Updated copyright year to 2008, and some other tiny fixes (Thomas)
|
||||
- Don't do anything unusual when the compositor frees a window (Iain)
|
||||
- Mapping windows doesn't mark them as damaged (Iain)
|
||||
- Compositor uses the overlay window and not the root window (Iain)
|
||||
- Fixed several list leaks (Paolo)
|
||||
- Fixed warnings about printf formats (Havoc)
|
||||
- Move source files into subdirectories of the src directory (Havoc)
|
||||
|
||||
Translations
|
||||
Khaled Hosny (ar), Ihar Hrachyshka (be@latin), Petr Kovar (cs), Andre
|
||||
Klapper (de), Jorge González (es), Iñaki Larrañaga Murgoitio (eu), Seán de
|
||||
Búrca (ga), Yuval Tanny (he), Luca Ferretti (it), Takeshi AIHANA (ja), Arangel
|
||||
Angov (mk), sandeep shedmake (mr), Kjartan Maraas (nb), Yannig
|
||||
Marchegay (Kokoyaya) (oc), Daniel Nylander (sv), Theppitak Karoonboonyanan (th),
|
||||
Baris Cicek (tr), Clytie Siddall (vi)
|
||||
2.21.5
|
||||
======
|
||||
|
||||
Thanks to Iain Holmes and Thomas Thurman for improvements in this version.
|
||||
This contains the new compositor; downstream maintainers should note that
|
||||
its GConf key is initially turned off in src/metacity.schemas.in and consider
|
||||
whether to turn it on by default in their packages.
|
||||
|
||||
- merge compositor branch! (Iain) (499081)
|
||||
- print "Subversion" and not "CVS" when building (Thomas)
|
||||
|
||||
Translations
|
||||
Jorge González (es), Kjartan Maraas (nb), Daniel Nylander (sv)
|
||||
|
||||
2.21.3
|
||||
======
|
||||
|
||||
|
@@ -5,7 +5,7 @@ srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
PKG_NAME="metacity"
|
||||
REQUIRED_AUTOMAKE_VERSION=1.7
|
||||
REQUIRED_AUTOMAKE_VERSION=1.10
|
||||
|
||||
(test -f $srcdir/configure.in \
|
||||
&& test -d $srcdir/src) || {
|
||||
|
30
configure.in
30
configure.in
@@ -1,17 +1,17 @@
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
m4_define([metacity_major_version], [2])
|
||||
m4_define([metacity_minor_version], [21])
|
||||
m4_define([metacity_minor_version], [23])
|
||||
# Fibonacci sequence for micro version numbering:
|
||||
# 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987
|
||||
m4_define([metacity_micro_version], [3])
|
||||
m4_define([metacity_micro_version], [34])
|
||||
|
||||
m4_define([metacity_version],
|
||||
[metacity_major_version.metacity_minor_version.metacity_micro_version])
|
||||
AC_INIT([metacity], [metacity_version],
|
||||
[http://bugzilla.gnome.org/enter_bug.cgi?product=metacity])
|
||||
|
||||
AC_CONFIG_SRCDIR(src/display.c)
|
||||
AC_CONFIG_SRCDIR(src/core/display.c)
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
|
||||
AM_INIT_AUTOMAKE
|
||||
@@ -120,7 +120,7 @@ if test x$enable_gconf = xyes; then
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(verbose-mode,
|
||||
AC_HELP_STRING([--disable-verbose],
|
||||
AC_HELP_STRING([--disable-verbose-mode],
|
||||
[disable metacity's ability to do verbose logging, for embedded/size-sensitive custom builds]),,
|
||||
enable_verbose_mode=yes)
|
||||
|
||||
@@ -223,15 +223,15 @@ if test x$enable_compositor = xyes; then
|
||||
have_xcomposite=yes
|
||||
echo "CompositeExt support forced on"
|
||||
elif test x$enable_compositor = xauto; then
|
||||
echo "Not building compositing manager by default now, must enable explicitly to get it."
|
||||
have_xcomposite=no
|
||||
echo "Building compositing manager by default now."
|
||||
have_xcomposite=yes
|
||||
else
|
||||
have_xcomposite=no
|
||||
fi
|
||||
|
||||
if test x$have_xcomposite = xyes; then
|
||||
echo "Building with CompositeExt"
|
||||
METACITY_PC_MODULES="$METACITY_PC_MODULES xcomposite >= $XCOMPOSITE_VERSION xfixes xrender xdamage cm"
|
||||
METACITY_PC_MODULES="$METACITY_PC_MODULES xcomposite >= $XCOMPOSITE_VERSION xfixes xrender xdamage"
|
||||
AC_DEFINE(HAVE_COMPOSITE_EXTENSIONS, , [Building with compositing manager support])
|
||||
|
||||
## force on render also
|
||||
@@ -426,7 +426,7 @@ case "$METACITY_LIBS" in
|
||||
*)
|
||||
AC_CHECK_LIB(SM, SmcSaveYourselfDone,
|
||||
[AC_CHECK_HEADERS(X11/SM/SMlib.h,
|
||||
METACITY_LIBS="-lSM -lICE $METACITY_LIBS" found_sm=no)],
|
||||
METACITY_LIBS="-lSM -lICE $METACITY_LIBS" found_sm=yes)],
|
||||
, $METACITY_LIBS)
|
||||
;;
|
||||
esac
|
||||
@@ -459,12 +459,6 @@ fi
|
||||
|
||||
AC_SUBST(GDK_PIXBUF_CSOURCE)
|
||||
|
||||
## hack to work with old GTK versions for now
|
||||
save_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$METACITY_LIBS $LDFLAGS"
|
||||
AC_CHECK_FUNCS(gdk_pixbuf_new_from_stream)
|
||||
LDFLAGS=$save_LDFLAGS
|
||||
|
||||
if test x$enable_gconf = xyes; then
|
||||
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
|
||||
if test x"$GCONFTOOL" = xno; then
|
||||
@@ -477,6 +471,12 @@ else
|
||||
GCONF_SCHEMAS_INSTALL_FALSE=
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug enable debugging],,
|
||||
enable_debug=no)
|
||||
if test "x$enable_debug" = "xyes"; then
|
||||
CFLAGS="$CFLAGS -g -O -Wall"
|
||||
fi
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
doc/Makefile
|
||||
@@ -532,7 +532,7 @@ if test $(( $(echo $METACITY_MINOR_VERSION) %2)) == "1"; then
|
||||
stable_version=$(( ($METACITY_MINOR_VERSION / 2) * 2))
|
||||
echo "This is the UNSTABLE branch of metacity"
|
||||
echo -n "Use 2.$stable_version.x for stable "
|
||||
echo "(gnome-2-$stable_version branch in CVS)"
|
||||
echo "(gnome-2-$stable_version branch in Subversion)"
|
||||
else
|
||||
echo "This is the stable branch of metacity"
|
||||
fi
|
||||
|
313
po/ChangeLog
313
po/ChangeLog
@@ -1,6 +1,299 @@
|
||||
2008-06-16 Alexander Shopov <ash@contact.bg>
|
||||
|
||||
* bg.po: Updated Bulgarian translation by
|
||||
Yavor Doganov <yavor@gnu.org>
|
||||
|
||||
2008-06-15 Jorge Gonzalez <jorgegonz@svn.gnome.org>
|
||||
|
||||
* es.po: Updated Spanish translation
|
||||
|
||||
2008-06-12 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
||||
|
||||
* th.po: Updated Thai translation.
|
||||
|
||||
2008-06-11 Djihed Afifi <djihed@gmail.com>
|
||||
|
||||
* ar.po: Updated Arabic Translation by Khaled Hosny.
|
||||
|
||||
2008-06-11 Yannig Marchegay <yannig@marchegay.org>
|
||||
|
||||
* oc.po: Updated Occitan translation.
|
||||
|
||||
2008-06-08 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* nb.po: Updated Norwegian bokmål translation.
|
||||
|
||||
2008-06-01 Clytie Siddall <clytie@riverland.net.au>
|
||||
|
||||
* vi.po: Updated Vietnamese translation.
|
||||
|
||||
2008-05-22 Djihed Afifi <djihed@gmail.com>
|
||||
|
||||
* ar.po: Updated Arabic Translation by Khaled Hosny.
|
||||
|
||||
2008-05-20 Vincent van Adrighem <adrighem@gnome.org>
|
||||
|
||||
* nl.po: Translation updated by Tino Meinen.
|
||||
|
||||
2008-05-19 Djihed Afifi <djihed@gmail.com>
|
||||
|
||||
* ar.po: Updated Arabic Translation by Khaled Hosny.
|
||||
|
||||
2008-05-18 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
||||
|
||||
* th.po: Updated Thai translation.
|
||||
|
||||
2008-05-14 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* nb.po: Updated Norwegian bokmål translation.
|
||||
|
||||
2008-05-13 Vincent van Adrighem <adrighem@gnome.org>
|
||||
|
||||
* nl.po: Translation updated by Tino Meinen.
|
||||
|
||||
2008-05-06 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* nb.po: Updated Norwegian bokmål translation.
|
||||
|
||||
2008-05-01 Gabor Kelemen <kelemeng@gnome.org>
|
||||
|
||||
* hu.po: Translation updated.
|
||||
|
||||
2008-04-20 Yair Hershkovitz <yairhr@gmail.com>
|
||||
|
||||
* he.po: Updated Hebrew translation.
|
||||
|
||||
2008-04-10 Yair Hershkovitz <yairhr@gmail.com>
|
||||
|
||||
* he.po: Updated Hebrew translation.
|
||||
|
||||
2008-04-04 Eskild Hustvedt <eskildh@gnome.org>
|
||||
|
||||
* nn.po: Updated Norwegian Nynorsk translation
|
||||
|
||||
2008-03-31 Baris Cicek <baris@teamforce.name.tr>
|
||||
|
||||
* tr.po: Updated Turkish translation
|
||||
|
||||
2008-03-30 Jorge Gonzalez <jorgegonz@svn.gnome.org>
|
||||
|
||||
* es.po: Updated Spanish translation
|
||||
|
||||
2008-03-23 Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
|
||||
|
||||
* vi.po: Update Vietnamese translation
|
||||
|
||||
2008-03-20 Abel Cheung <abelcheung@gmail.com>
|
||||
|
||||
* zh_HK.po, zh_TW.po: Typo fix for traditional Chinese translations.
|
||||
|
||||
2008-03-18 Gabor Kelemen <kelemeng@gnome.hu>
|
||||
|
||||
* hu.po: Translation updated
|
||||
|
||||
2008-03-09 Kenneth Nielsen <k.nielsen81@gmail.com>
|
||||
|
||||
* da.po: Updated Danish translation
|
||||
|
||||
2008-03-09 Gabor Kelemen <kelemeng@gnome.hu>
|
||||
|
||||
* hu.po: Translation updated
|
||||
|
||||
2008-03-09 Daniel Nylander <po@danielnylander.se>
|
||||
|
||||
* sv.po: Updated Swedish translation.
|
||||
|
||||
2008-03-09 Vasiliy Faronov <qvvx@yandex.ru>
|
||||
|
||||
* ru.po: Updated Russian translation.
|
||||
|
||||
2008-03-07 Maxim Dziumanenko <dziumanenko@gmail.com>
|
||||
|
||||
* uk.po: Updated Ukrainian translation.
|
||||
|
||||
2008-03-03 Jorge Gonzalez <jorgegonz@svn.gnome.org>
|
||||
|
||||
* es.po: Updated Spanish translation
|
||||
|
||||
2008-03-01 Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>
|
||||
|
||||
* zh_HK.po: Updated Traditional Chinese translation(Hong Kong).
|
||||
* zh_TW.po: Updated Traditional Chinese translation(Taiwan).
|
||||
|
||||
2008-02-27 Stéphane Raimbault <stephane.raimbault@gmail.com>
|
||||
|
||||
* fr.po: Updated French translation (merged from gnome-2-22).
|
||||
|
||||
2008-02-25 Changwoo Ryu <cwryu@debian.org>
|
||||
|
||||
* ko.po: Updated Korean translation.
|
||||
|
||||
2008-02-24 Ilkka Tuohela <hile@iki.fi>
|
||||
|
||||
* fi.po: Updated Finnish translation (bug #518255).
|
||||
|
||||
2008-02-23 Ihar Hrachyshka <booxter@lacinka.org>
|
||||
|
||||
* be@latin.po: Updated Belarusian Latin translation.
|
||||
|
||||
2008-02-20 Ilkka Tuohela <hile@iki.fi>
|
||||
|
||||
* fi.po: Updated Finnish translation.
|
||||
|
||||
2008-02-18 Wouter Bolsterlee <wbolster@svn.gnome.org>
|
||||
|
||||
* nl.po: Updated Dutch translation by Wouter Bolsterlee.
|
||||
|
||||
2008-02-18 Ihar Hrachyshka <booxter@lacinka.org>
|
||||
|
||||
* be@latin.po: Updated Belarusian Latin translation.
|
||||
|
||||
2008-02-15 Runa Bhattacharjee <runabh@gmail.com>
|
||||
|
||||
* kn.po: Added Kannada Translations by Shankar Prasad
|
||||
* LINGUAS: Added Kannada (kn) to the List of Languages
|
||||
|
||||
2008-02-14 Ignacio Casal Quinteiro <nacho.resa@gmail.com>
|
||||
|
||||
* gl.po: Updated Galician Translation.
|
||||
|
||||
2008-02-14 Pawan Chitrakar <chautari@gmail.com>
|
||||
|
||||
* ne.po: Updated Nepali Translation.
|
||||
|
||||
2008-02-14 Ilkka Tuohela <hile@iki.fi>
|
||||
|
||||
* fi.po: Updated Finnish translation.
|
||||
|
||||
2008-02-13 Ilkka Tuohela <hile@iki.fi>
|
||||
|
||||
* fi.po: Updated Finnish translation.
|
||||
|
||||
2008-02-10 Duarte Loreto <happyguy_pt@hotmail.com>
|
||||
|
||||
* pt.po: Updated Portuguese translation.
|
||||
|
||||
2008-02-09 Hendrik Brandt <heb@gnome-de.org>
|
||||
|
||||
* de.po: Updated German translation.
|
||||
|
||||
2008-02-07 Artur Flinta <aflinta@svn.gnome.org>
|
||||
|
||||
* pl.po: Updated Polish translation by GNOME PL Team.
|
||||
|
||||
2008-02-05 Rhys Jones <rhys@sucs.org>
|
||||
|
||||
* cy.po: Updated Welsh translation.
|
||||
|
||||
2008-02-03 Amitakhya Phukan <amitakhya@svn.gnome.org>
|
||||
|
||||
* LINGUAS: Added as to LINGUAS.
|
||||
* as.po: Updated assamese translations.
|
||||
|
||||
2008-02-03 Arangel Angov <arangel@linux.net.mk>
|
||||
|
||||
* mk.po: Updated Macedonian translation.
|
||||
|
||||
2008-02-03 Takeshi AIHANA <takeshi.aihana@gmail.com>
|
||||
|
||||
* ja.po: Updated Japanese translation.
|
||||
|
||||
2008-02-02 Luca Ferretti <elle.uca@libero.it>
|
||||
|
||||
* it.po: Updated Italian translation.
|
||||
|
||||
2008-02-01 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
||||
|
||||
* th.po: Updated Thai translation.
|
||||
|
||||
2008-01-31 Djihed Afifi <djihed@gmail.com>
|
||||
|
||||
* ar.po: Updated Arabic Translation by Khaled Hosny.
|
||||
|
||||
2008-01-30 Rahul Bhalerao <b.rahul.pm@gmail.com>
|
||||
|
||||
* mr.po: Updated Marathi translations by Sandeep Shedmake.
|
||||
|
||||
2008-01-27 Baris Cicek <baris@teamforce.name.tr>
|
||||
|
||||
* tr.po: Fixed typo in Turkish translation.
|
||||
|
||||
2008-01-25 Petr Kovar <pknbe@volny.cz>
|
||||
|
||||
* cs.po: Updated Czech translation.
|
||||
|
||||
2008-01-22 Andre Klapper <a9016009@gmx.de>
|
||||
|
||||
* de.po: Sync "beep" translation.
|
||||
|
||||
2008-01-15 Daniel Nylander <po@danielnylander.se>
|
||||
|
||||
* sv.po: Updated Swedish translation.
|
||||
|
||||
2008-01-14 Inaki Larranaga Murgoitio <dooteo@euskalgnu.org>
|
||||
|
||||
* eu.po: Updated Basque translation.
|
||||
|
||||
2008-01-14 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* nb.po: Updated Norwegian bokmål translation.
|
||||
|
||||
2008-01-13 Jorge Gonzalez <jorgegonz@svn.gnome.org>
|
||||
|
||||
* es.po: Updated Spanish translation
|
||||
|
||||
2008-01-09 Yair Hershkovitz <yairhr@gmail.com>
|
||||
|
||||
* he.po: Updated Hebrew translation.
|
||||
|
||||
2008-01-06 Ihar Hrachyshka <booxter@lacinka.org>
|
||||
|
||||
* be@latin.po: Updated Belarusian Latin translation.
|
||||
|
||||
2008-01-05 Clytie Siddall <clytie@riverland.net.au>
|
||||
|
||||
* vi.po: Updated Vietnamese translation.
|
||||
|
||||
2007-12-31 Yannig Marchegay <yannig@marchegay.org>
|
||||
|
||||
* oc.po: Updated Occitan translation.
|
||||
|
||||
2007-12-31 Daniel Nylander <po@danielnylander.se>
|
||||
|
||||
* sv.po: Updated Swedish translation.
|
||||
|
||||
2007-12-22 Seán de Búrca <sdeburca@svn.gnome.org>
|
||||
|
||||
* ga.po: Updated Irish translation.
|
||||
|
||||
2007-12-22 Seán de Búrca <sdeburca@svn.gnome.org>
|
||||
|
||||
* POTFILES.in: Remove dead files.
|
||||
|
||||
2007-12-20 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* POTFILES.in: Rearrange after stuff moved around.
|
||||
* nb.po: Update
|
||||
|
||||
2007-12-19 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* nb.po: Updated Norwegian bokmål translation.
|
||||
|
||||
2007-12-19 Jorge Gonzalez <jorgegonz@svn.gnome.org>
|
||||
|
||||
* es.po: Updated Spanish translation.
|
||||
|
||||
2007-12-17 Daniel Nylander <po@danielnylander.se>
|
||||
|
||||
* sv.po: Updated Swedish translation.
|
||||
|
||||
2007-12-15 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* nb.po: Updated Norwegian bokmål translation.
|
||||
|
||||
2007-12-10 Jorge Gonzalez <jorgegonz@svn.gnome.org>
|
||||
|
||||
* es.po: Updated Spanish translation, fixes bug #500562 and bug #500831
|
||||
* es.po: Updated Spanish translation, fixes bug #500562 and bug #500831
|
||||
|
||||
2007-12-10 Matej Urbančič <mateju@svn.gnome.org>
|
||||
|
||||
@@ -8,11 +301,11 @@
|
||||
|
||||
2007-12-10 Jorge Gonzalez <jorgegonz@svn.gnome.org>
|
||||
|
||||
* es.po: Updated Spanish translation, fixes bug #500831
|
||||
* es.po: Updated Spanish translation, fixes bug #500831
|
||||
|
||||
2007-12-09 Jorge Gonzalez <jorgegonz@svn.gnome.org>
|
||||
|
||||
* es.po: Updated Spanish translation, fixes bug #500562
|
||||
* es.po: Updated Spanish translation, fixes bug #500562
|
||||
|
||||
2007-12-08 Jakub Friedl <jfriedl@suse.cz>
|
||||
|
||||
@@ -160,7 +453,7 @@
|
||||
|
||||
2007-09-05 Jovan Naumovski <jovan@lugola.net>
|
||||
|
||||
* mk.po: Updated Macedonian translation.
|
||||
* mk.po: Updated Macedonian translation.
|
||||
|
||||
2007-09-03 Clytie Siddall <clytie@riverland.net.au>
|
||||
|
||||
@@ -172,11 +465,11 @@
|
||||
|
||||
2007-09-03 Jovan Naumovski <jovan@lugola.net>
|
||||
|
||||
* mk.po: Updated Macedonian translation.
|
||||
* mk.po: Updated Macedonian translation.
|
||||
|
||||
2007-09-01 Jovan Naumovski <jovan@lugola.net>
|
||||
|
||||
* mk.po: Updated Macedonian translation.
|
||||
* mk.po: Updated Macedonian translation.
|
||||
|
||||
2007-09-01 Stéphane Raimbault <stephane.raimbault@gmail.com>
|
||||
|
||||
@@ -311,7 +604,7 @@
|
||||
|
||||
2007-05-09 Jovan Naumovski <jovan@lugola.net>
|
||||
|
||||
* mk.po: Updated Macedonian translation.
|
||||
* mk.po: Updated Macedonian translation.
|
||||
|
||||
2007-05-2 Djihed Afifi <djihed@gmail.com>
|
||||
|
||||
@@ -1716,7 +2009,7 @@
|
||||
|
||||
2005-04-17 Pauli Virtanen <pauli.virtanen@hut.fi>
|
||||
|
||||
* fi.po: Fix a small mistranslation.
|
||||
* fi.po: Fix a small mistranslation.
|
||||
|
||||
2005-04-09 Christopher Orr <chris@protactin.co.uk>
|
||||
|
||||
@@ -1903,7 +2196,7 @@
|
||||
|
||||
2005-02-06 Pauli Virtanen <pauli.virtanen@hut.fi>
|
||||
|
||||
* fi.po: Updated Finnish translation.
|
||||
* fi.po: Updated Finnish translation.
|
||||
|
||||
2005-02-05 Frank Arnold <farnold@cvs.gnome.org>
|
||||
|
||||
@@ -2518,7 +2811,7 @@
|
||||
|
||||
2004-02-07 Robert Sedak <robert.sedak@sk.htnet.hr>
|
||||
|
||||
* hr.po: Updated Croatian translation.
|
||||
* hr.po: Updated Croatian translation.
|
||||
|
||||
2004-02-08 Changwoo Ryu <cwryu@debian.org>
|
||||
|
||||
|
@@ -2,6 +2,7 @@
|
||||
#
|
||||
am
|
||||
ar
|
||||
as
|
||||
az
|
||||
be
|
||||
be@latin
|
||||
@@ -37,6 +38,7 @@ is
|
||||
it
|
||||
ja
|
||||
ka
|
||||
kn
|
||||
ko
|
||||
ku
|
||||
lt
|
||||
|
@@ -2,28 +2,28 @@
|
||||
# Please keep this file sorted alphabetically.
|
||||
src/50-metacity-desktop-key.xml.in
|
||||
src/50-metacity-key.xml.in
|
||||
src/tools/metacity-message.c
|
||||
src/core.c
|
||||
src/delete.c
|
||||
src/display.c
|
||||
src/errors.c
|
||||
src/frames.c
|
||||
src/keybindings.c
|
||||
src/main.c
|
||||
src/menu.c
|
||||
src/metaaccellabel.c
|
||||
src/metacity-dialog.c
|
||||
src/core/core.c
|
||||
src/core/delete.c
|
||||
src/core/display.c
|
||||
src/core/errors.c
|
||||
src/core/keybindings.c
|
||||
src/core/main.c
|
||||
src/core/prefs.c
|
||||
src/core/screen.c
|
||||
src/core/session.c
|
||||
src/core/util.c
|
||||
src/core/window-props.c
|
||||
src/core/window.c
|
||||
src/core/xprops.c
|
||||
src/metacity.desktop.in
|
||||
src/metacity.schemas.in
|
||||
src/prefs.c
|
||||
src/resizepopup.c
|
||||
src/screen.c
|
||||
src/session.c
|
||||
src/theme-parser.c
|
||||
src/theme-viewer.c
|
||||
src/theme.c
|
||||
src/util.c
|
||||
src/window-props.c
|
||||
src/window.c
|
||||
src/workspace.c
|
||||
src/xprops.c
|
||||
src/ui/frames.c
|
||||
src/ui/menu.c
|
||||
src/ui/metaaccellabel.c
|
||||
src/ui/metacity-dialog.c
|
||||
src/ui/resizepopup.c
|
||||
src/ui/theme-parser.c
|
||||
src/ui/theme-viewer.c
|
||||
src/ui/theme.c
|
||||
src/tools/metacity-message.c
|
||||
|
||||
|
1830
po/be@latin.po
1830
po/be@latin.po
File diff suppressed because it is too large
Load Diff
1801
po/zh_CN.po
1801
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
2123
po/zh_HK.po
2123
po/zh_HK.po
File diff suppressed because it is too large
Load Diff
2156
po/zh_TW.po
2156
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
238
src/Makefile.am
238
src/Makefile.am
@@ -2,136 +2,139 @@ lib_LTLIBRARIES = libmetacity-private.la
|
||||
|
||||
SUBDIRS=wm-tester tools themes
|
||||
|
||||
INCLUDES=@METACITY_CFLAGS@ -DMETACITY_LIBEXECDIR=\"$(libexecdir)\" -DHOST_ALIAS=\"@HOST_ALIAS@\" -DMETACITY_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DMETACITY_PKGDATADIR=\"$(pkgdatadir)\" -DMETACITY_DATADIR=\"$(datadir)\" -DG_LOG_DOMAIN=\"metacity\" -DSN_API_NOT_YET_FROZEN=1
|
||||
INCLUDES=@METACITY_CFLAGS@ -I $(srcdir)/include -DMETACITY_LIBEXECDIR=\"$(libexecdir)\" -DHOST_ALIAS=\"@HOST_ALIAS@\" -DMETACITY_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DMETACITY_PKGDATADIR=\"$(pkgdatadir)\" -DMETACITY_DATADIR=\"$(datadir)\" -DG_LOG_DOMAIN=\"metacity\" -DSN_API_NOT_YET_FROZEN=1
|
||||
|
||||
metacity_SOURCES= \
|
||||
async-getprop.c \
|
||||
async-getprop.h \
|
||||
bell.h \
|
||||
bell.c \
|
||||
boxes.h \
|
||||
boxes.c \
|
||||
common.h \
|
||||
c-screen.c \
|
||||
c-screen.h \
|
||||
c-window.c \
|
||||
c-window.h \
|
||||
compositor.c \
|
||||
compositor.h \
|
||||
constraints.c \
|
||||
constraints.h \
|
||||
core.c \
|
||||
core.h \
|
||||
delete.c \
|
||||
display.c \
|
||||
display.h \
|
||||
draw-workspace.c \
|
||||
draw-workspace.h \
|
||||
edge-resistance.c \
|
||||
edge-resistance.h \
|
||||
effects.c \
|
||||
effects.h \
|
||||
errors.c \
|
||||
errors.h \
|
||||
eventqueue.c \
|
||||
eventqueue.h \
|
||||
fixedtip.c \
|
||||
fixedtip.h \
|
||||
frame.c \
|
||||
frame.h \
|
||||
frames.c \
|
||||
frames.h \
|
||||
gradient.c \
|
||||
gradient.h \
|
||||
group.c \
|
||||
group.h \
|
||||
group-private.h \
|
||||
group-props.c \
|
||||
group-props.h \
|
||||
iconcache.c \
|
||||
iconcache.h \
|
||||
core/async-getprop.c \
|
||||
core/async-getprop.h \
|
||||
core/atomnames.h \
|
||||
core/bell.c \
|
||||
core/bell.h \
|
||||
core/boxes.c \
|
||||
include/boxes.h \
|
||||
compositor/compositor.c \
|
||||
compositor/compositor-private.h \
|
||||
compositor/compositor-xrender.c \
|
||||
compositor/compositor-xrender.h \
|
||||
include/compositor.h \
|
||||
core/constraints.c \
|
||||
core/constraints.h \
|
||||
core/core.c \
|
||||
core/delete.c \
|
||||
core/display.c \
|
||||
core/display-private.h \
|
||||
include/display.h \
|
||||
ui/draw-workspace.c \
|
||||
ui/draw-workspace.h \
|
||||
core/edge-resistance.c \
|
||||
core/edge-resistance.h \
|
||||
core/effects.c \
|
||||
core/effects.h \
|
||||
core/errors.c \
|
||||
include/errors.h \
|
||||
core/eventqueue.c \
|
||||
core/eventqueue.h \
|
||||
core/frame.c \
|
||||
core/frame-private.h \
|
||||
include/frame.h \
|
||||
ui/gradient.c \
|
||||
ui/gradient.h \
|
||||
core/group-private.h \
|
||||
core/group-props.c \
|
||||
core/group-props.h \
|
||||
core/group.c \
|
||||
core/group.h \
|
||||
core/iconcache.c \
|
||||
core/iconcache.h \
|
||||
core/keybindings.c \
|
||||
core/keybindings.h \
|
||||
core/main.c \
|
||||
include/main.h \
|
||||
core/metacity-Xatomtype.h \
|
||||
core/place.c \
|
||||
core/place.h \
|
||||
core/prefs.c \
|
||||
include/prefs.h \
|
||||
core/screen.c \
|
||||
core/screen-private.h \
|
||||
include/screen.h \
|
||||
include/types.h \
|
||||
core/session.c \
|
||||
core/session.h \
|
||||
core/stack.c \
|
||||
core/stack.h \
|
||||
core/util.c \
|
||||
include/util.h \
|
||||
core/window-props.c \
|
||||
core/window-props.h \
|
||||
core/window.c \
|
||||
core/window-private.h \
|
||||
include/window.h \
|
||||
core/workspace.c \
|
||||
core/workspace.h \
|
||||
core/xprops.c \
|
||||
include/xprops.h \
|
||||
include/common.h \
|
||||
include/core.h \
|
||||
include/ui.h \
|
||||
inlinepixbufs.h \
|
||||
keybindings.c \
|
||||
keybindings.h \
|
||||
main.c \
|
||||
main.h \
|
||||
menu.c \
|
||||
menu.h \
|
||||
metaaccellabel.c \
|
||||
metaaccellabel.h \
|
||||
metacity-Xatomtype.h \
|
||||
place.c \
|
||||
place.h \
|
||||
prefs.c \
|
||||
prefs.h \
|
||||
resizepopup.c \
|
||||
resizepopup.h \
|
||||
screen.c \
|
||||
screen.h \
|
||||
session.c \
|
||||
session.h \
|
||||
spring-model.c \
|
||||
spring-model.h \
|
||||
stack.c \
|
||||
stack.h \
|
||||
tabpopup.c \
|
||||
tabpopup.h \
|
||||
theme.c \
|
||||
theme.h \
|
||||
theme-parser.c \
|
||||
theme-parser.h \
|
||||
themewidget.c \
|
||||
themewidget.h \
|
||||
ui.c \
|
||||
ui.h \
|
||||
util.c \
|
||||
util.h \
|
||||
window.c \
|
||||
window.h \
|
||||
window-props.c \
|
||||
window-props.h \
|
||||
workspace.c \
|
||||
workspace.h \
|
||||
xprops.c \
|
||||
xprops.h
|
||||
ui/fixedtip.c \
|
||||
ui/fixedtip.h \
|
||||
ui/frames.c \
|
||||
ui/frames.h \
|
||||
ui/menu.c \
|
||||
ui/menu.h \
|
||||
ui/metaaccellabel.c \
|
||||
ui/metaaccellabel.h \
|
||||
ui/resizepopup.c \
|
||||
include/resizepopup.h \
|
||||
ui/tabpopup.c \
|
||||
include/tabpopup.h \
|
||||
ui/theme-parser.c \
|
||||
ui/theme-parser.h \
|
||||
ui/theme.c \
|
||||
ui/theme.h \
|
||||
ui/themewidget.c \
|
||||
ui/themewidget.h \
|
||||
ui/ui.c
|
||||
|
||||
# by setting libmetacity_private_la_CFLAGS, the files shared with
|
||||
# metacity proper will be compiled with different names.
|
||||
libmetacity_private_la_CFLAGS =
|
||||
libmetacity_private_la_SOURCES= \
|
||||
boxes.c \
|
||||
boxes.h \
|
||||
gradient.c \
|
||||
gradient.h \
|
||||
preview-widget.c \
|
||||
preview-widget.h \
|
||||
theme.c \
|
||||
theme.h \
|
||||
theme-parser.c \
|
||||
theme-parser.h \
|
||||
util.c \
|
||||
util.h \
|
||||
common.h
|
||||
libmetacity_private_la_SOURCES= \
|
||||
core/boxes.c \
|
||||
include/boxes.h \
|
||||
ui/gradient.c \
|
||||
ui/gradient.h \
|
||||
core/util.c \
|
||||
include/util.h \
|
||||
include/common.h \
|
||||
ui/preview-widget.c \
|
||||
ui/preview-widget.h \
|
||||
ui/theme-parser.c \
|
||||
ui/theme-parser.h \
|
||||
ui/theme.c \
|
||||
ui/theme.h
|
||||
|
||||
libmetacity_private_la_LDFLAGS = -no-undefined
|
||||
libmetacity_private_la_LIBADD = @METACITY_LIBS@
|
||||
|
||||
libmetacityincludedir = $(includedir)/metacity-1/metacity-private
|
||||
|
||||
libmetacityinclude_HEADERS = \
|
||||
boxes.h \
|
||||
common.h \
|
||||
gradient.h \
|
||||
preview-widget.h \
|
||||
theme.h \
|
||||
theme-parser.h \
|
||||
util.h
|
||||
libmetacityinclude_HEADERS = \
|
||||
include/boxes.h \
|
||||
ui/gradient.h \
|
||||
include/util.h \
|
||||
include/common.h \
|
||||
ui/preview-widget.h \
|
||||
ui/theme-parser.h \
|
||||
ui/theme.h
|
||||
|
||||
metacity_theme_viewer_SOURCES= \
|
||||
theme-viewer.c
|
||||
ui/theme-viewer.c
|
||||
|
||||
metacity_dialog_SOURCES= \
|
||||
metacity-dialog.c
|
||||
ui/metacity-dialog.c
|
||||
|
||||
bin_PROGRAMS=metacity metacity-theme-viewer
|
||||
libexec_PROGRAMS=metacity-dialog
|
||||
@@ -141,9 +144,9 @@ metacity_LDADD=@METACITY_LIBS@ $(EFENCE)
|
||||
metacity_theme_viewer_LDADD= @METACITY_LIBS@ libmetacity-private.la
|
||||
metacity_dialog_LDADD=@METACITY_LIBS@
|
||||
|
||||
testboxes_SOURCES=util.h util.c boxes.h boxes.c testboxes.c
|
||||
testgradient_SOURCES=gradient.h gradient.c testgradient.c
|
||||
testasyncgetprop_SOURCES=async-getprop.h async-getprop.c testasyncgetprop.c
|
||||
testboxes_SOURCES=include/util.h core/util.c include/boxes.h core/boxes.c core/testboxes.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
|
||||
|
||||
noinst_PROGRAMS=testboxes testgradient testasyncgetprop
|
||||
|
||||
@@ -155,6 +158,7 @@ desktopfilesdir=$(datadir)/gnome/wm-properties
|
||||
desktopfiles_in_files=metacity.desktop.in
|
||||
desktopfiles_files=$(desktopfiles_in_files:.desktop.in=.desktop)
|
||||
desktopfiles_DATA = $(desktopfiles_files)
|
||||
|
||||
@INTLTOOL_DESKTOP_RULE@
|
||||
|
||||
schemadir = @GCONF_SCHEMA_FILE_DIR@
|
||||
@@ -186,7 +190,7 @@ BUILT_SOURCES = inlinepixbufs.h
|
||||
CLEANFILES = inlinepixbufs.h metacity.desktop metacity.schemas 50-metacity-desktop-key.xml 50-metacity-key.xml
|
||||
|
||||
inlinepixbufs.h: $(IMAGES)
|
||||
$(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h
|
||||
$(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
|
||||
|
677
src/c-screen.c
677
src/c-screen.c
@@ -1,677 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2006 Red Hat, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
#include <cm/ws.h>
|
||||
#include <cm/stacker.h>
|
||||
#include <cm/wsint.h>
|
||||
#include <cm/drawable-node.h>
|
||||
#include <cm/state.h>
|
||||
#include <cm/magnifier.h>
|
||||
#include <cm/square.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "screen.h"
|
||||
#include "c-screen.h"
|
||||
#include "c-window.h"
|
||||
|
||||
struct MetaCompScreen
|
||||
{
|
||||
WsDisplay *display;
|
||||
CmStacker *stacker;
|
||||
CmMagnifier *magnifier;
|
||||
|
||||
WsWindow *gl_window;
|
||||
WsWindow *root_window;
|
||||
|
||||
WsScreen *screen;
|
||||
MetaScreen *meta_screen;
|
||||
|
||||
int repaint_id;
|
||||
int idle_id;
|
||||
|
||||
WsWindow *selection_window;
|
||||
|
||||
GHashTable *windows_by_xid;
|
||||
};
|
||||
|
||||
static MetaCompWindow *
|
||||
meta_comp_window_lookup (MetaCompScreen *info,
|
||||
Window xid)
|
||||
{
|
||||
MetaCompWindow *window;
|
||||
|
||||
window = g_hash_table_lookup (info->windows_by_xid, (gpointer)xid);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
MetaCompWindow *
|
||||
meta_comp_screen_lookup_window (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
return meta_comp_window_lookup (info, xwindow);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void
|
||||
update_frame_counter (void)
|
||||
{
|
||||
#define BUFSIZE 128
|
||||
static GTimer *timer;
|
||||
static double buffer [BUFSIZE];
|
||||
static int next = 0;
|
||||
|
||||
if (!timer)
|
||||
timer = g_timer_new ();
|
||||
|
||||
buffer[next++] = g_timer_elapsed (timer, NULL);
|
||||
|
||||
if (next == BUFSIZE)
|
||||
{
|
||||
int i;
|
||||
double total;
|
||||
|
||||
next = 0;
|
||||
|
||||
total = 0.0;
|
||||
for (i = 1; i < BUFSIZE; ++i)
|
||||
total += buffer[i] - buffer[i - 1];
|
||||
|
||||
g_print ("frames per second: %f\n", 1 / (total / (BUFSIZE - 1)));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
dump_stacking_order (GList *nodes)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
for (list = nodes; list != NULL; list = list->next)
|
||||
{
|
||||
CmDrawableNode *node = list->data;
|
||||
|
||||
if (node)
|
||||
g_print ("%lx, ", WS_RESOURCE_XID (node->drawable));
|
||||
}
|
||||
g_print ("\n");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
repaint (gpointer data)
|
||||
{
|
||||
MetaCompScreen *info = data;
|
||||
CmState *state;
|
||||
#if 0
|
||||
g_print ("repaint\n");
|
||||
#endif
|
||||
glViewport (0, 0,
|
||||
info->meta_screen->rect.width,
|
||||
info->meta_screen->rect.height);
|
||||
|
||||
glLoadIdentity();
|
||||
|
||||
#if 0
|
||||
glClearColor (0, 0, 0, 1.0);
|
||||
glClear (GL_COLOR_BUFFER_BIT);
|
||||
#endif
|
||||
|
||||
ws_window_raise (info->gl_window);
|
||||
|
||||
#if 0
|
||||
glDisable (GL_TEXTURE_2D);
|
||||
glDisable (GL_TEXTURE_RECTANGLE_ARB);
|
||||
glPolygonMode (GL_FRONT_AND_BACK, GL_FILL);
|
||||
glColor4f (0.0, 1.0, 0.0, 1.0);
|
||||
glRectf (-1.0, -1.0, 1.0, 1.0);
|
||||
glFinish();
|
||||
#endif
|
||||
|
||||
state = cm_state_new ();
|
||||
|
||||
cm_state_disable_depth_buffer_update (state);
|
||||
|
||||
cm_node_render (CM_NODE (info->magnifier), state);
|
||||
|
||||
cm_state_enable_depth_buffer_update (state);
|
||||
|
||||
g_object_unref (state);
|
||||
|
||||
ws_window_gl_swap_buffers (info->gl_window);
|
||||
glFinish();
|
||||
|
||||
#if 0
|
||||
dump_stacking_order (info->stacker->children);
|
||||
#endif
|
||||
|
||||
info->idle_id = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static MetaCompWindow *
|
||||
find_comp_window (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
return meta_comp_window_lookup (info, xwindow);
|
||||
}
|
||||
|
||||
static CmNode *
|
||||
find_node (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
MetaCompWindow *window = meta_comp_window_lookup (info, xwindow);
|
||||
|
||||
if (window)
|
||||
return meta_comp_window_get_node (window);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static GList *all_screen_infos;
|
||||
|
||||
MetaCompScreen *
|
||||
meta_comp_screen_get_by_xwindow (Window xwindow)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
for (list = all_screen_infos; list != NULL; list = list->next)
|
||||
{
|
||||
MetaCompScreen *info = list->data;
|
||||
|
||||
if (find_node (info, xwindow))
|
||||
return info;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
MetaCompScreen *
|
||||
meta_comp_screen_new (WsDisplay *display,
|
||||
MetaScreen *screen)
|
||||
{
|
||||
MetaCompScreen *scr_info = g_new0 (MetaCompScreen, 1);
|
||||
|
||||
scr_info->screen = ws_display_get_screen_from_number (
|
||||
display, screen->number);
|
||||
scr_info->root_window = ws_screen_get_root_window (scr_info->screen);
|
||||
scr_info->display = display;
|
||||
scr_info->meta_screen = screen;
|
||||
scr_info->windows_by_xid = g_hash_table_new (g_direct_hash, g_direct_equal);
|
||||
|
||||
all_screen_infos = g_list_prepend (all_screen_infos, scr_info);
|
||||
|
||||
return scr_info;
|
||||
}
|
||||
|
||||
static char *
|
||||
make_selection_name (MetaCompScreen *info)
|
||||
{
|
||||
char *buffer;
|
||||
|
||||
buffer = g_strdup_printf ("_NET_WM_CM_S%d", info->meta_screen->number);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
static void
|
||||
on_selection_clear (WsWindow *window,
|
||||
WsSelectionClearEvent *event,
|
||||
gpointer data)
|
||||
{
|
||||
MetaCompScreen *info = data;
|
||||
char *buffer = make_selection_name (info);
|
||||
|
||||
if (strcmp (event->selection, buffer))
|
||||
{
|
||||
/* We lost the selection */
|
||||
meta_comp_screen_unredirect (info);
|
||||
}
|
||||
}
|
||||
|
||||
static WsWindow *
|
||||
claim_selection (MetaCompScreen *info)
|
||||
{
|
||||
WsWindow *window = ws_window_new (info->root_window);
|
||||
char *buffer = make_selection_name (info);
|
||||
|
||||
#if 0
|
||||
g_print ("selection window: %lx\n", WS_RESOURCE_XID (window));
|
||||
#endif
|
||||
|
||||
ws_window_own_selection (window, buffer, WS_CURRENT_TIME);
|
||||
|
||||
g_signal_connect (window, "selection_clear_event", G_CALLBACK (on_selection_clear), info);
|
||||
|
||||
g_free (buffer);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
static void
|
||||
queue_paint (CmNode *node,
|
||||
MetaCompScreen *info)
|
||||
{
|
||||
#if 0
|
||||
g_print ("queueing %s\n", G_OBJECT_TYPE_NAME (node));
|
||||
#endif
|
||||
meta_comp_screen_queue_paint (info);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_redirect (MetaCompScreen *info)
|
||||
{
|
||||
WsWindow *root = ws_screen_get_root_window (info->screen);
|
||||
WsRectangle source;
|
||||
WsRectangle target;
|
||||
WsServerRegion *region;
|
||||
int screen_w;
|
||||
int screen_h;
|
||||
CmSquare *square;
|
||||
|
||||
#if 0
|
||||
g_print ("redirecting %lx\n", WS_RESOURCE_XID (root));
|
||||
#endif
|
||||
|
||||
ws_window_redirect_subwindows (root);
|
||||
info->gl_window = ws_screen_get_gl_window (info->screen);
|
||||
/* FIXME: This should probably happen in libcm */
|
||||
ws_window_set_override_redirect (info->gl_window, TRUE);
|
||||
region = ws_server_region_new (info->display);
|
||||
ws_window_set_input_shape (info->gl_window, region);
|
||||
g_object_unref (G_OBJECT (region));
|
||||
|
||||
ws_display_begin_error_trap (info->display);
|
||||
|
||||
ws_window_unredirect (info->gl_window);
|
||||
|
||||
ws_display_end_error_trap (info->display);
|
||||
|
||||
info->selection_window = claim_selection (info);
|
||||
|
||||
ws_window_map (info->gl_window);
|
||||
|
||||
info->stacker = cm_stacker_new ();
|
||||
|
||||
square = cm_square_new (0.3, 0.3, 0.8, 1.0);
|
||||
|
||||
cm_stacker_add_child (info->stacker, CM_NODE (square));
|
||||
|
||||
g_object_unref (square);
|
||||
|
||||
screen_w = ws_screen_get_width (info->screen);
|
||||
screen_h = ws_screen_get_height (info->screen);
|
||||
|
||||
#if 0
|
||||
g_print ("width: %d height %d\n", screen_w, screen_h);
|
||||
#endif
|
||||
|
||||
source.x = (screen_w - (screen_w / 4)) / 2;
|
||||
source.y = screen_h / 16;
|
||||
source.width = screen_w / 4;
|
||||
source.height = screen_h / 16;
|
||||
|
||||
target.x = 0;
|
||||
target.y = screen_h - screen_h / 4;
|
||||
target.width = screen_w;
|
||||
target.height = screen_h / 4;
|
||||
|
||||
info->magnifier = cm_magnifier_new (CM_NODE (info->stacker), &source, &target);
|
||||
|
||||
if (g_getenv ("USE_MAGNIFIER"))
|
||||
cm_magnifier_set_active (info->magnifier, TRUE);
|
||||
else
|
||||
cm_magnifier_set_active (info->magnifier, FALSE);
|
||||
|
||||
info->repaint_id =
|
||||
g_signal_connect (info->magnifier, "need_repaint",
|
||||
G_CALLBACK (queue_paint), info);
|
||||
|
||||
ws_display_sync (info->display);
|
||||
}
|
||||
|
||||
static void
|
||||
listify (gpointer key,
|
||||
gpointer value,
|
||||
gpointer data)
|
||||
{
|
||||
GList **windows = data;
|
||||
|
||||
*windows = g_list_prepend (*windows, (gpointer)value);
|
||||
}
|
||||
|
||||
static void
|
||||
free_all_windows (MetaCompScreen *info)
|
||||
{
|
||||
GList *windows = NULL, *list;
|
||||
|
||||
g_hash_table_foreach (info->windows_by_xid, listify, &windows);
|
||||
|
||||
for (list = windows; list != NULL; list = list->next)
|
||||
{
|
||||
MetaCompWindow *window = list->data;
|
||||
|
||||
meta_comp_window_free (window);
|
||||
}
|
||||
|
||||
g_list_free (windows);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_unredirect (MetaCompScreen *info)
|
||||
{
|
||||
WsScreen *ws_screen = info->screen;
|
||||
WsWindow *root = ws_screen_get_root_window (ws_screen);
|
||||
|
||||
g_signal_handler_disconnect (info->magnifier, info->repaint_id);
|
||||
g_object_unref (info->magnifier);
|
||||
|
||||
ws_window_unredirect_subwindows (root);
|
||||
ws_screen_release_gl_window (ws_screen);
|
||||
|
||||
free_all_windows (info);
|
||||
|
||||
ws_display_sync (info->display);
|
||||
|
||||
/* FIXME: libcm needs a way to guarantee that a window is destroyed,
|
||||
* without relying on ref counting having it as a side effect
|
||||
*/
|
||||
g_object_unref (info->selection_window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_queue_paint (MetaCompScreen *info)
|
||||
{
|
||||
#if 0
|
||||
g_print ("queuing\n");
|
||||
#endif
|
||||
if (!info->idle_id)
|
||||
info->idle_id = g_idle_add (repaint, info);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_restack (MetaCompScreen *info,
|
||||
Window window,
|
||||
Window above_this)
|
||||
{
|
||||
MetaCompWindow *comp_window = find_comp_window (info, window);
|
||||
MetaCompWindow *above_comp_window = find_comp_window (info, above_this);
|
||||
CmNode *window_node = find_node (info, window);
|
||||
CmNode *above_node = find_node (info, above_this);
|
||||
|
||||
if ((comp_window && meta_comp_window_stack_frozen (comp_window)) ||
|
||||
(above_comp_window && meta_comp_window_stack_frozen (above_comp_window)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#if 0
|
||||
dump_stacking_order (info->stacker->children);
|
||||
#endif
|
||||
|
||||
if (window_node == above_node)
|
||||
return;
|
||||
|
||||
if (window_node && above_this == WS_RESOURCE_XID (info->gl_window))
|
||||
{
|
||||
cm_stacker_raise_child (info->stacker, window_node);
|
||||
}
|
||||
else if (window_node && above_this == None)
|
||||
{
|
||||
cm_stacker_lower_child (info->stacker, window_node);
|
||||
}
|
||||
else if (window_node && above_node)
|
||||
{
|
||||
cm_stacker_restack_child (info->stacker, window_node, above_node);
|
||||
}
|
||||
#if 0
|
||||
else
|
||||
g_print ("nothing happened\n");
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
g_print ("done restacking; new order:\n");
|
||||
#endif
|
||||
#if 0
|
||||
dump_stacking_order (info->stacker->children);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_raise_window (MetaCompScreen *info,
|
||||
Window window)
|
||||
{
|
||||
CmNode *node = find_node (info, window);
|
||||
|
||||
if (node)
|
||||
cm_stacker_raise_child (info->stacker, node);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_set_size (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
MetaCompWindow *comp_window = meta_comp_window_lookup (info, xwindow);
|
||||
|
||||
if (comp_window)
|
||||
{
|
||||
WsRectangle rect;
|
||||
|
||||
rect.x = x;
|
||||
rect.y = y;
|
||||
rect.width = width;
|
||||
rect.height = height;
|
||||
|
||||
meta_comp_window_set_size (comp_window, &rect);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
print_child_titles (WsWindow *window)
|
||||
{
|
||||
GList *children = ws_window_query_subwindows (window);
|
||||
GList *list;
|
||||
int i;
|
||||
|
||||
g_print ("window: %lx %s\n", WS_RESOURCE_XID (window), ws_window_query_title (window));
|
||||
|
||||
i = 0;
|
||||
for (list = children; list != NULL; list = list->next)
|
||||
{
|
||||
WsWindow *child = list->data;
|
||||
|
||||
g_print (" %d adding: %lx %s\n", i++, WS_RESOURCE_XID (child), ws_window_query_title (child));
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct
|
||||
{
|
||||
MetaCompScreen *cscreen;
|
||||
XID xid;
|
||||
} DestroyData;
|
||||
|
||||
static void
|
||||
on_window_destroy (MetaCompWindow *comp_window,
|
||||
gpointer closure)
|
||||
{
|
||||
DestroyData *data = closure;
|
||||
CmNode *node = meta_comp_window_get_node (comp_window);
|
||||
|
||||
cm_stacker_remove_child (data->cscreen->stacker, node);
|
||||
g_hash_table_remove (data->cscreen->windows_by_xid, (gpointer)data->xid);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_add_window (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
WsDrawable *drawable;
|
||||
MetaCompWindow *comp_window;
|
||||
DestroyData *data;
|
||||
|
||||
ws_display_begin_error_trap (info->display);
|
||||
|
||||
comp_window = meta_comp_window_lookup (info, xwindow);
|
||||
|
||||
if (comp_window)
|
||||
goto out;
|
||||
|
||||
drawable = WS_DRAWABLE (ws_window_lookup (info->display, xwindow));
|
||||
|
||||
if (ws_window_query_input_only (WS_WINDOW (drawable)))
|
||||
goto out;
|
||||
|
||||
if (WS_WINDOW (drawable) == info->gl_window ||
|
||||
WS_WINDOW (drawable) == info->screen->overlay_window)
|
||||
{
|
||||
#if 0
|
||||
g_print ("gl window\n");
|
||||
#endif
|
||||
goto out;
|
||||
}
|
||||
|
||||
data = g_new (DestroyData, 1);
|
||||
data->cscreen = info;
|
||||
data->xid = WS_RESOURCE_XID (drawable);
|
||||
|
||||
comp_window = meta_comp_window_new (info->meta_screen, drawable,
|
||||
on_window_destroy, data);
|
||||
|
||||
g_hash_table_insert (info->windows_by_xid, (gpointer)WS_RESOURCE_XID (drawable), comp_window);
|
||||
|
||||
cm_stacker_add_child (info->stacker, meta_comp_window_get_node (comp_window));
|
||||
|
||||
out:
|
||||
if (comp_window)
|
||||
{
|
||||
/* This function is called both when windows are created and when they
|
||||
* are mapped, so for now we have this silly function.
|
||||
*/
|
||||
meta_comp_window_refresh_attrs (comp_window);
|
||||
}
|
||||
|
||||
ws_display_end_error_trap (info->display);
|
||||
|
||||
#if 0
|
||||
g_print ("done checking\n");
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
meta_comp_screen_remove_window (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
MetaCompWindow *comp_window = meta_comp_window_lookup (info, xwindow);
|
||||
|
||||
if (comp_window)
|
||||
meta_comp_window_free (comp_window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_set_updates (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gboolean updates)
|
||||
{
|
||||
MetaCompWindow *comp_window = meta_comp_window_lookup (info, xwindow);
|
||||
|
||||
meta_comp_window_set_updates (comp_window, updates);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
meta_comp_screen_set_patch (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
CmPoint points[4][4])
|
||||
{
|
||||
CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow));
|
||||
|
||||
if (node)
|
||||
cm_drawable_node_set_patch (node, points);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_unset_patch (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow));
|
||||
|
||||
if (node)
|
||||
cm_drawable_node_unset_patch (node);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_set_alpha (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gdouble alpha)
|
||||
{
|
||||
CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow));
|
||||
#if 0
|
||||
g_print ("alpha: %f\n", alpha);
|
||||
#endif
|
||||
cm_drawable_node_set_alpha (node, alpha);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_get_real_size (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
WsRectangle *size)
|
||||
{
|
||||
CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow));
|
||||
|
||||
if (!size)
|
||||
return;
|
||||
|
||||
cm_drawable_node_get_clipbox (node, size);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_unmap (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
MetaCompWindow *window = find_comp_window (info, xwindow);
|
||||
|
||||
if (window)
|
||||
meta_comp_window_hide (window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_set_target_rect (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
WsRectangle *rect)
|
||||
{
|
||||
CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow));
|
||||
|
||||
if (node)
|
||||
cm_drawable_node_set_scale_rect (node, rect);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -1,53 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
#include "screen.h"
|
||||
#include "c-window.h"
|
||||
|
||||
typedef struct MetaCompScreen MetaCompScreen;
|
||||
|
||||
MetaCompScreen *meta_comp_screen_new (WsDisplay *display,
|
||||
MetaScreen *screen);
|
||||
MetaCompScreen *meta_comp_screen_get_by_xwindow (Window xwindow);
|
||||
void meta_comp_screen_destroy (MetaCompScreen *scr_info);
|
||||
void meta_comp_screen_redirect (MetaCompScreen *info);
|
||||
void meta_comp_screen_unredirect (MetaCompScreen *info);
|
||||
void meta_comp_screen_add_window (MetaCompScreen *scr_info,
|
||||
Window xwindow);
|
||||
void meta_comp_screen_remove_window (MetaCompScreen *scr_info,
|
||||
Window xwindow);
|
||||
void meta_comp_screen_restack (MetaCompScreen *scr_info,
|
||||
Window window,
|
||||
Window above_this);
|
||||
void meta_comp_screen_set_size (MetaCompScreen *info,
|
||||
Window window,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void meta_comp_screen_raise_window (MetaCompScreen *scr_info,
|
||||
Window window);
|
||||
void meta_comp_screen_queue_paint (MetaCompScreen *info);
|
||||
void meta_comp_screen_set_updates (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gboolean updates);
|
||||
void meta_comp_screen_set_patch (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
CmPoint points[4][4]);
|
||||
void meta_comp_screen_unset_patch (MetaCompScreen *info,
|
||||
Window xwindow);
|
||||
void meta_comp_screen_set_alpha (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gdouble alpha);
|
||||
void meta_comp_screen_get_real_size (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
WsRectangle *size);
|
||||
void meta_comp_screen_set_target_rect (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
WsRectangle *rect);
|
||||
void meta_comp_screen_set_explode (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gdouble level);
|
||||
void meta_comp_screen_unmap (MetaCompScreen *info,
|
||||
Window xwindow);
|
||||
MetaCompWindow *meta_comp_screen_lookup_window (MetaCompScreen *info,
|
||||
Window xwindow);
|
1259
src/c-window.c
1259
src/c-window.c
File diff suppressed because it is too large
Load Diff
@@ -1,72 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
/*
|
||||
* Copyright (C) 2006 Red Hat, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <cm/node.h>
|
||||
#include "display.h"
|
||||
#include "effects.h"
|
||||
|
||||
#ifndef C_WINDOW_H
|
||||
#define C_WINDOW_H
|
||||
|
||||
typedef struct _MetaCompWindow MetaCompWindow;
|
||||
|
||||
typedef void (* MetaCompWindowDestroy) (MetaCompWindow *window,
|
||||
gpointer closure);
|
||||
|
||||
MetaCompWindow *meta_comp_window_new (MetaScreen *screen,
|
||||
WsDrawable *drawable,
|
||||
MetaCompWindowDestroy destroy,
|
||||
gpointer data);
|
||||
CmNode *meta_comp_window_get_node (MetaCompWindow *window);
|
||||
gboolean meta_comp_window_free (MetaCompWindow *window);
|
||||
void meta_comp_window_set_size (MetaCompWindow *window,
|
||||
WsRectangle *size);
|
||||
|
||||
void meta_comp_window_hide (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_show (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_refresh_attrs (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_set_updates (MetaCompWindow *comp_window,
|
||||
gboolean updates);
|
||||
|
||||
void meta_comp_window_explode (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_shrink (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_unshrink (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_run_focus (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_restack (MetaCompWindow *comp_window,
|
||||
MetaCompWindow *above);
|
||||
void meta_comp_window_freeze_stack (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_thaw_stack (MetaCompWindow *comp_window);
|
||||
gboolean meta_comp_window_stack_frozen (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_run_minimize (MetaCompWindow *window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_run_unminimize (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
|
||||
#if 0
|
||||
void meta_comp_window_set_explode (MetaCompWindow *comp_window,
|
||||
double level);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
381
src/colors.c
381
src/colors.c
@@ -1,381 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity RGB color stuff */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
*
|
||||
* 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 "colors.h"
|
||||
|
||||
struct _MetaUIColors
|
||||
{
|
||||
PangoColor fg[5];
|
||||
PangoColor bg[5];
|
||||
PangoColor light[5];
|
||||
PangoColor dark[5];
|
||||
PangoColor mid[5];
|
||||
PangoColor text[5];
|
||||
PangoColor base[5];
|
||||
PangoColor text_aa[5];
|
||||
};
|
||||
|
||||
static void
|
||||
visual_decompose_mask (gulong mask,
|
||||
gint *shift,
|
||||
gint *prec)
|
||||
{
|
||||
/* This code is from GTK+, (C) GTK+ Team */
|
||||
*shift = 0;
|
||||
*prec = 0;
|
||||
|
||||
while (!(mask & 0x1))
|
||||
{
|
||||
(*shift)++;
|
||||
mask >>= 1;
|
||||
}
|
||||
|
||||
while (mask & 0x1)
|
||||
{
|
||||
(*prec)++;
|
||||
mask >>= 1;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_screen_init_visual_info (MetaScreen *screen)
|
||||
{
|
||||
Visual *xvisual;
|
||||
int nxvisuals;
|
||||
XVisualInfo *visual_list;
|
||||
XVisualInfo visual_template;
|
||||
|
||||
/* root window visual */
|
||||
xvisual = DefaultVisual (screen->display->xdisplay,
|
||||
screen->number);
|
||||
|
||||
visual_template.visualid = XVisualIDFromVisual (xvisual);
|
||||
visual_list = XGetVisualInfo (screen->display->xdisplay,
|
||||
VisualIDMask, &visual_template, &nxvisuals);
|
||||
|
||||
if (nxvisuals != 1)
|
||||
meta_warning ("Matched weird number of visuals %d\n", nxvisuals);
|
||||
|
||||
screen->visual_info = *visual_list;
|
||||
|
||||
meta_verbose ("Using visual class %d\n", screen->visual_info.class);
|
||||
|
||||
XFree (visual_list);
|
||||
}
|
||||
|
||||
gulong
|
||||
meta_screen_get_x_pixel (MetaScreen *screen,
|
||||
const PangoColor *color)
|
||||
{
|
||||
/* This code is derived from GTK+, (C) GTK+ Team */
|
||||
gulong pixel;
|
||||
|
||||
if (screen->visual_info.class == TrueColor ||
|
||||
screen->visual_info.class == DirectColor)
|
||||
{
|
||||
int red_prec, red_shift, green_prec, green_shift, blue_prec, blue_shift;
|
||||
|
||||
visual_decompose_mask (screen->visual_info.red_mask,
|
||||
&red_shift, &red_prec);
|
||||
visual_decompose_mask (screen->visual_info.green_mask,
|
||||
&green_shift, &green_prec);
|
||||
visual_decompose_mask (screen->visual_info.blue_mask,
|
||||
&blue_shift, &blue_prec);
|
||||
|
||||
pixel = (((color->red >> (16 - red_prec)) << red_shift) +
|
||||
((color->green >> (16 - green_prec)) << green_shift) +
|
||||
((color->blue >> (16 - blue_prec)) << blue_shift));
|
||||
}
|
||||
else
|
||||
{
|
||||
#define INTENSITY(r, g, b) ((r) * 0.30 + (g) * 0.59 + (b) * 0.11)
|
||||
double r, g, b;
|
||||
|
||||
r = color->red / (double) 0xffff;
|
||||
g = color->green / (double) 0xffff;
|
||||
b = color->blue / (double) 0xffff;
|
||||
|
||||
/* Now this is a low-bloat GdkRGB replacement! */
|
||||
if (INTENSITY (r, g, b) > 0.5)
|
||||
pixel = WhitePixel (screen->display->xdisplay, screen->number);
|
||||
else
|
||||
pixel = BlackPixel (screen->display->xdisplay, screen->number);
|
||||
#undef INTENSITY
|
||||
}
|
||||
|
||||
return pixel;
|
||||
}
|
||||
|
||||
void
|
||||
meta_screen_set_ui_colors (MetaScreen *screen,
|
||||
const MetaUIColors *colors)
|
||||
{
|
||||
screen->colors = *colors;
|
||||
meta_screen_queue_frame_redraws (screen);
|
||||
}
|
||||
|
||||
/* Straight out of gtkstyle.c */
|
||||
static PangoColor meta_default_normal_fg = { 0, 0, 0 };
|
||||
static PangoColor meta_default_active_fg = { 0, 0, 0 };
|
||||
static PangoColor meta_default_prelight_fg = { 0, 0, 0 };
|
||||
static PangoColor meta_default_selected_fg = { 0xffff, 0xffff, 0xffff };
|
||||
static PangoColor meta_default_insensitive_fg = { 0x7530, 0x7530, 0x7530 };
|
||||
|
||||
static PangoColor meta_default_normal_bg = { 0xd6d6, 0xd6d6, 0xd6d6 };
|
||||
static PangoColor meta_default_active_bg = { 0xc350, 0xc350, 0xc350 };
|
||||
static PangoColor meta_default_prelight_bg = { 0xea60, 0xea60, 0xea60 };
|
||||
static PangoColor meta_default_selected_bg = { 0, 0, 0x9c40 };
|
||||
static PangoColor meta_default_insensitive_bg = { 0xd6d6, 0xd6d6, 0xd6d6 };
|
||||
|
||||
static void
|
||||
rgb_to_hls (gdouble *r,
|
||||
gdouble *g,
|
||||
gdouble *b)
|
||||
{
|
||||
gdouble min;
|
||||
gdouble max;
|
||||
gdouble red;
|
||||
gdouble green;
|
||||
gdouble blue;
|
||||
gdouble h, l, s;
|
||||
gdouble delta;
|
||||
|
||||
red = *r;
|
||||
green = *g;
|
||||
blue = *b;
|
||||
|
||||
if (red > green)
|
||||
{
|
||||
if (red > blue)
|
||||
max = red;
|
||||
else
|
||||
max = blue;
|
||||
|
||||
if (green < blue)
|
||||
min = green;
|
||||
else
|
||||
min = blue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (green > blue)
|
||||
max = green;
|
||||
else
|
||||
max = blue;
|
||||
|
||||
if (red < blue)
|
||||
min = red;
|
||||
else
|
||||
min = blue;
|
||||
}
|
||||
|
||||
l = (max + min) / 2;
|
||||
s = 0;
|
||||
h = 0;
|
||||
|
||||
if (max != min)
|
||||
{
|
||||
if (l <= 0.5)
|
||||
s = (max - min) / (max + min);
|
||||
else
|
||||
s = (max - min) / (2 - max - min);
|
||||
|
||||
delta = max -min;
|
||||
if (red == max)
|
||||
h = (green - blue) / delta;
|
||||
else if (green == max)
|
||||
h = 2 + (blue - red) / delta;
|
||||
else if (blue == max)
|
||||
h = 4 + (red - green) / delta;
|
||||
|
||||
h *= 60;
|
||||
if (h < 0.0)
|
||||
h += 360;
|
||||
}
|
||||
|
||||
*r = h;
|
||||
*g = l;
|
||||
*b = s;
|
||||
}
|
||||
|
||||
static void
|
||||
hls_to_rgb (gdouble *h,
|
||||
gdouble *l,
|
||||
gdouble *s)
|
||||
{
|
||||
gdouble hue;
|
||||
gdouble lightness;
|
||||
gdouble saturation;
|
||||
gdouble m1, m2;
|
||||
gdouble r, g, b;
|
||||
|
||||
lightness = *l;
|
||||
saturation = *s;
|
||||
|
||||
if (lightness <= 0.5)
|
||||
m2 = lightness * (1 + saturation);
|
||||
else
|
||||
m2 = lightness + saturation - lightness * saturation;
|
||||
m1 = 2 * lightness - m2;
|
||||
|
||||
if (saturation == 0)
|
||||
{
|
||||
*h = lightness;
|
||||
*l = lightness;
|
||||
*s = lightness;
|
||||
}
|
||||
else
|
||||
{
|
||||
hue = *h + 120;
|
||||
while (hue > 360)
|
||||
hue -= 360;
|
||||
while (hue < 0)
|
||||
hue += 360;
|
||||
|
||||
if (hue < 60)
|
||||
r = m1 + (m2 - m1) * hue / 60;
|
||||
else if (hue < 180)
|
||||
r = m2;
|
||||
else if (hue < 240)
|
||||
r = m1 + (m2 - m1) * (240 - hue) / 60;
|
||||
else
|
||||
r = m1;
|
||||
|
||||
hue = *h;
|
||||
while (hue > 360)
|
||||
hue -= 360;
|
||||
while (hue < 0)
|
||||
hue += 360;
|
||||
|
||||
if (hue < 60)
|
||||
g = m1 + (m2 - m1) * hue / 60;
|
||||
else if (hue < 180)
|
||||
g = m2;
|
||||
else if (hue < 240)
|
||||
g = m1 + (m2 - m1) * (240 - hue) / 60;
|
||||
else
|
||||
g = m1;
|
||||
|
||||
hue = *h - 120;
|
||||
while (hue > 360)
|
||||
hue -= 360;
|
||||
while (hue < 0)
|
||||
hue += 360;
|
||||
|
||||
if (hue < 60)
|
||||
b = m1 + (m2 - m1) * hue / 60;
|
||||
else if (hue < 180)
|
||||
b = m2;
|
||||
else if (hue < 240)
|
||||
b = m1 + (m2 - m1) * (240 - hue) / 60;
|
||||
else
|
||||
b = m1;
|
||||
|
||||
*h = r;
|
||||
*l = g;
|
||||
*s = b;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
style_shade (PangoColor *a,
|
||||
PangoColor *b,
|
||||
gdouble k)
|
||||
{
|
||||
gdouble red;
|
||||
gdouble green;
|
||||
gdouble blue;
|
||||
|
||||
red = (gdouble) a->red / 65535.0;
|
||||
green = (gdouble) a->green / 65535.0;
|
||||
blue = (gdouble) a->blue / 65535.0;
|
||||
|
||||
rgb_to_hls (&red, &green, &blue);
|
||||
|
||||
green *= k;
|
||||
if (green > 1.0)
|
||||
green = 1.0;
|
||||
else if (green < 0.0)
|
||||
green = 0.0;
|
||||
|
||||
blue *= k;
|
||||
if (blue > 1.0)
|
||||
blue = 1.0;
|
||||
else if (blue < 0.0)
|
||||
blue = 0.0;
|
||||
|
||||
hls_to_rgb (&red, &green, &blue);
|
||||
|
||||
b->red = red * 65535.0;
|
||||
b->green = green * 65535.0;
|
||||
b->blue = blue * 65535.0;
|
||||
}
|
||||
|
||||
#define LIGHTNESS_MULT 1.3
|
||||
#define DARKNESS_MULT 0.7
|
||||
void
|
||||
meta_screen_init_ui_colors (MetaScreen *screen)
|
||||
{
|
||||
int i;
|
||||
MetaUIColors *colors;
|
||||
|
||||
colors = &screen->colors;
|
||||
|
||||
colors->fg[META_STATE_NORMAL] = meta_default_normal_fg;
|
||||
colors->fg[META_STATE_ACTIVE] = meta_default_active_fg;
|
||||
colors->fg[META_STATE_PRELIGHT] = meta_default_prelight_fg;
|
||||
colors->fg[META_STATE_SELECTED] = meta_default_selected_fg;
|
||||
colors->fg[META_STATE_INSENSITIVE] = meta_default_insensitive_fg;
|
||||
|
||||
colors->bg[META_STATE_NORMAL] = meta_default_normal_bg;
|
||||
colors->bg[META_STATE_ACTIVE] = meta_default_active_bg;
|
||||
colors->bg[META_STATE_PRELIGHT] = meta_default_prelight_bg;
|
||||
colors->bg[META_STATE_SELECTED] = meta_default_selected_bg;
|
||||
colors->bg[META_STATE_INSENSITIVE] = meta_default_insensitive_bg;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
colors->text[i] = colors->fg[i];
|
||||
colors->base[i].red = G_MAXUSHORT;
|
||||
colors->base[i].green = G_MAXUSHORT;
|
||||
colors->base[i].blue = G_MAXUSHORT;
|
||||
}
|
||||
|
||||
colors->base[META_STATE_SELECTED] = meta_default_selected_bg;
|
||||
colors->base[META_STATE_INSENSITIVE] = meta_default_prelight_bg;
|
||||
colors->text[META_STATE_INSENSITIVE] = meta_default_insensitive_fg;
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
style_shade (&colors->bg[i], &colors->light[i], LIGHTNESS_MULT);
|
||||
style_shade (&colors->bg[i], &colors->dark[i], DARKNESS_MULT);
|
||||
|
||||
colors->mid[i].red = (colors->light[i].red + colors->dark[i].red) / 2;
|
||||
colors->mid[i].green = (colors->light[i].green + colors->dark[i].green) / 2;
|
||||
colors->mid[i].blue = (colors->light[i].blue + colors->dark[i].blue) / 2;
|
||||
|
||||
colors->text_aa[i].red = (colors->text[i].red + colors->base[i].red) / 2;
|
||||
colors->text_aa[i].green = (colors->text[i].green + colors->base[i].green) / 2;
|
||||
colors->text_aa[i].blue = (colors->text[i].blue + colors->base[i].blue) / 2;
|
||||
}
|
||||
}
|
46
src/colors.h
46
src/colors.h
@@ -1,46 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity RGB color stuff */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_COLORS_H
|
||||
#define META_COLORS_H
|
||||
|
||||
/* Colors/state stuff matches GTK.
|
||||
*/
|
||||
typedef struct _MetaUIColors MetaUIColors;
|
||||
|
||||
/* This stuff will all just be XlibRGB eventually. Right now
|
||||
* it has a stub implementation.
|
||||
*/
|
||||
|
||||
#include "screen.h"
|
||||
#include "util.h"
|
||||
|
||||
gulong meta_screen_get_x_pixel (MetaScreen *screen,
|
||||
const PangoColor *color);
|
||||
void meta_screen_init_visual_info (MetaScreen *screen);
|
||||
void meta_screen_set_ui_colors (MetaScreen *screen,
|
||||
const MetaUIColors *colors);
|
||||
void meta_screen_init_ui_colors (MetaScreen *screen);
|
||||
|
||||
|
||||
#endif
|
1024
src/compositor.c
1024
src/compositor.c
File diff suppressed because it is too large
Load Diff
@@ -1,92 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity compositing manager */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2003 Red Hat, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_COMPOSITOR_H
|
||||
#define META_COMPOSITOR_H
|
||||
|
||||
#include "util.h"
|
||||
#include "display.h"
|
||||
#include "spring-model.h"
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
#include "cm/deform.h"
|
||||
/* FIXME: Needs namespacing. */
|
||||
void get_patch_points (Model *model, CmPoint points[4][4]);
|
||||
#endif
|
||||
|
||||
typedef void (* MetaAnimationFinishedFunc) (gpointer data);
|
||||
|
||||
/* XXX namespace me */
|
||||
void compute_window_rect (MetaWindow *window, MetaRectangle *rect);
|
||||
|
||||
MetaCompositor* meta_compositor_new (MetaDisplay *display);
|
||||
void meta_compositor_unref (MetaCompositor *compositor);
|
||||
void meta_compositor_process_event (MetaCompositor *compositor,
|
||||
XEvent *xevent,
|
||||
MetaWindow *window);
|
||||
void meta_compositor_add_window (MetaCompositor *compositor,
|
||||
Window xwindow,
|
||||
XWindowAttributes *attrs);
|
||||
void meta_compositor_remove_window (MetaCompositor *compositor,
|
||||
Window xwindow);
|
||||
void meta_compositor_set_debug_updates (MetaCompositor *compositor,
|
||||
gboolean debug_updates);
|
||||
|
||||
void meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
MetaScreen *screen);
|
||||
void meta_compositor_unmanage_screen (MetaCompositor *compositor,
|
||||
MetaScreen *screen);
|
||||
|
||||
#if 0
|
||||
void meta_compositor_minimize (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
MetaAnimationFinishedFunc finished_cb,
|
||||
gpointer finished_data);
|
||||
#endif
|
||||
|
||||
void
|
||||
meta_compositor_set_updates (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
gboolean updates);
|
||||
void
|
||||
meta_compositor_destroy (MetaCompositor *compositor);
|
||||
|
||||
void meta_compositor_begin_move (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *initial,
|
||||
int grab_x, int grab_y);
|
||||
void meta_compositor_update_move (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
int x, int y);
|
||||
void meta_compositor_end_move (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
void meta_compositor_free_window (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
void meta_compositor_free_window (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
|
||||
#endif /* META_COMPOSITOR_H */
|
54
src/compositor/compositor-private.h
Normal file
54
src/compositor/compositor-private.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2008 Iain Holmes
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_COMPOSITOR_PRIVATE_H
|
||||
#define META_COMPOSITOR_PRIVATE_H
|
||||
|
||||
#include "compositor.h"
|
||||
|
||||
struct _MetaCompositor
|
||||
{
|
||||
void (* destroy) (MetaCompositor *compositor);
|
||||
|
||||
void (*manage_screen) (MetaCompositor *compositor,
|
||||
MetaScreen *screen);
|
||||
void (*unmanage_screen) (MetaCompositor *compositor,
|
||||
MetaScreen *screen);
|
||||
void (*add_window) (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
Window xwindow,
|
||||
XWindowAttributes *attrs);
|
||||
void (*remove_window) (MetaCompositor *compositor,
|
||||
Window xwindow);
|
||||
void (*set_updates) (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
gboolean update);
|
||||
void (*process_event) (MetaCompositor *compositor,
|
||||
XEvent *event,
|
||||
MetaWindow *window);
|
||||
Pixmap (*get_window_pixmap) (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
void (*set_active_window) (MetaCompositor *compositor,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window);
|
||||
};
|
||||
|
||||
#endif
|
3065
src/compositor/compositor-xrender.c
Normal file
3065
src/compositor/compositor-xrender.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity fixed tooltip routine */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
* Copyright (C) 2007 Iain Holmes
|
||||
* Based on xcompmgr - (c) 2003 Keith Packard
|
||||
* xfwm4 - (c) 2005-2007 Olivier Fourdan
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
@@ -21,16 +21,11 @@
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_FIXED_TIP_H
|
||||
#define META_FIXED_TIP_H
|
||||
#ifndef META_COMPOSITOR_XRENDER_H_
|
||||
#define META_COMPOSITOR_XRENDER_H_
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
|
||||
void meta_fixed_tip_show (Display *xdisplay, int screen_number,
|
||||
int root_x, int root_y,
|
||||
const char *markup_text);
|
||||
void meta_fixed_tip_hide (void);
|
||||
#include "types.h"
|
||||
|
||||
MetaCompositor *meta_compositor_xrender_new (MetaDisplay *display);
|
||||
|
||||
#endif
|
159
src/compositor/compositor.c
Normal file
159
src/compositor/compositor.c
Normal file
@@ -0,0 +1,159 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2008 Iain Holmes
|
||||
*
|
||||
* 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 <config.h>
|
||||
#include "compositor-private.h"
|
||||
#include "compositor-xrender.h"
|
||||
|
||||
MetaCompositor *
|
||||
meta_compositor_new (MetaDisplay *display)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
/* At some point we would have a way to select between backends */
|
||||
return meta_compositor_xrender_new (display);
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_destroy (MetaCompositor *compositor)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
if (compositor && compositor->destroy)
|
||||
compositor->destroy (compositor);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_add_window (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
Window xwindow,
|
||||
XWindowAttributes *attrs)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
if (compositor && compositor->add_window)
|
||||
compositor->add_window (compositor, window, xwindow, attrs);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_remove_window (MetaCompositor *compositor,
|
||||
Window xwindow)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
if (compositor && compositor->remove_window)
|
||||
compositor->remove_window (compositor, xwindow);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
MetaScreen *screen)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
if (compositor && compositor->manage_screen)
|
||||
compositor->manage_screen (compositor, screen);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_unmanage_screen (MetaCompositor *compositor,
|
||||
MetaScreen *screen)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
if (compositor && compositor->unmanage_screen)
|
||||
compositor->unmanage_screen (compositor, screen);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_set_updates (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
gboolean updates)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
if (compositor && compositor->set_updates)
|
||||
compositor->set_updates (compositor, window, updates);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_process_event (MetaCompositor *compositor,
|
||||
XEvent *event,
|
||||
MetaWindow *window)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
if (compositor && compositor->process_event)
|
||||
compositor->process_event (compositor, event, window);
|
||||
#endif
|
||||
}
|
||||
|
||||
Pixmap
|
||||
meta_compositor_get_window_pixmap (MetaCompositor *compositor,
|
||||
MetaWindow *window)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
if (compositor && compositor->get_window_pixmap)
|
||||
return compositor->get_window_pixmap (compositor, window);
|
||||
else
|
||||
return None;
|
||||
#else
|
||||
return None;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_set_active_window (MetaCompositor *compositor,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
if (compositor && compositor->set_active_window)
|
||||
compositor->set_active_window (compositor, screen, window);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* These functions are unused at the moment */
|
||||
void meta_compositor_begin_move (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *initial,
|
||||
int grab_x,
|
||||
int grab_y)
|
||||
{
|
||||
}
|
||||
|
||||
void meta_compositor_update_move (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
int x,
|
||||
int y)
|
||||
{
|
||||
}
|
||||
|
||||
void meta_compositor_end_move (MetaCompositor *compositor,
|
||||
MetaWindow *window)
|
||||
{
|
||||
}
|
||||
|
||||
void meta_compositor_free_window (MetaCompositor *compositor,
|
||||
MetaWindow *window)
|
||||
{
|
||||
}
|
164
src/core/atomnames.h
Normal file
164
src/core/atomnames.h
Normal file
@@ -0,0 +1,164 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
* Copyright (C) 2002, 2003, 2004 Red Hat, Inc.
|
||||
* Copyright (C) 2003, 2004 Rob Adams
|
||||
* Copyright (C) 2004-2006 Elijah Newren
|
||||
* 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 atomnames.h A list of atom names.
|
||||
*
|
||||
* This is a list of the names of all the X atoms that Metacity uses.
|
||||
* Each is wrapped in a macro "item()" which is undefined here; the
|
||||
* idea is that when you need to make a big list of all the X atoms,
|
||||
* you can define item(), include this file, and then undefine it
|
||||
* again.
|
||||
*
|
||||
* If you also define EWMH_ATOMS_ONLY then you will only get _NET_WM_*
|
||||
* hints rather than all of them.
|
||||
*/
|
||||
|
||||
#ifndef item
|
||||
#error "item(x) must be defined when you include atomnames.h"
|
||||
#endif
|
||||
|
||||
#ifndef EWMH_ATOMS_ONLY
|
||||
|
||||
item(WM_PROTOCOLS)
|
||||
item(WM_TAKE_FOCUS)
|
||||
item(WM_DELETE_WINDOW)
|
||||
item(WM_STATE)
|
||||
item(_MOTIF_WM_HINTS)
|
||||
item(WM_CHANGE_STATE)
|
||||
item(SM_CLIENT_ID)
|
||||
item(WM_CLIENT_LEADER)
|
||||
item(WM_WINDOW_ROLE)
|
||||
item(UTF8_STRING)
|
||||
item(WM_ICON_SIZE)
|
||||
item(_KWM_WIN_ICON)
|
||||
item(_METACITY_RESTART_MESSAGE)
|
||||
item(_METACITY_RELOAD_THEME_MESSAGE)
|
||||
item(_METACITY_SET_KEYBINDINGS_MESSAGE)
|
||||
item(_METACITY_TOGGLE_VERBOSE)
|
||||
item(_GNOME_PANEL_ACTION)
|
||||
item(_GNOME_PANEL_ACTION_MAIN_MENU)
|
||||
item(_GNOME_PANEL_ACTION_RUN_DIALOG)
|
||||
item(_METACITY_SENTINEL)
|
||||
item(_METACITY_VERSION)
|
||||
item(WM_CLIENT_MACHINE)
|
||||
item(MANAGER)
|
||||
item(TARGETS)
|
||||
item(MULTIPLE)
|
||||
item(TIMESTAMP)
|
||||
item(VERSION)
|
||||
item(ATOM_PAIR)
|
||||
|
||||
/* Oddities: These are used, and we need atoms for them,
|
||||
* but when we need all _NET_WM hints (i.e. when we're making
|
||||
* lists of which _NET_WM hints we support in order to advertise
|
||||
* it) we haven't historically listed them. I don't know what
|
||||
* the reason for this is. It may be a bug.
|
||||
*/
|
||||
item(_NET_WM_SYNC_REQUEST)
|
||||
item(_NET_WM_SYNC_REQUEST_COUNTER)
|
||||
item(_NET_WM_VISIBLE_NAME)
|
||||
item(_NET_WM_VISIBLE_ICON_NAME)
|
||||
item(_NET_SUPPORTING_WM_CHECK)
|
||||
|
||||
/* But I suppose it's quite reasonable not to advertise using
|
||||
* _NET_SUPPORTED that we support _NET_SUPPORTED :)
|
||||
*/
|
||||
item(_NET_SUPPORTED)
|
||||
|
||||
#endif /* !EWMH_ATOMS_ONLY */
|
||||
|
||||
/**************************************************************************/
|
||||
|
||||
item(_NET_WM_NAME)
|
||||
item(_NET_CLOSE_WINDOW)
|
||||
item(_NET_WM_STATE)
|
||||
item(_NET_WM_STATE_SHADED)
|
||||
item(_NET_WM_STATE_MAXIMIZED_HORZ)
|
||||
item(_NET_WM_STATE_MAXIMIZED_VERT)
|
||||
item(_NET_WM_DESKTOP)
|
||||
item(_NET_NUMBER_OF_DESKTOPS)
|
||||
item(_NET_CURRENT_DESKTOP)
|
||||
item(_NET_WM_WINDOW_TYPE)
|
||||
item(_NET_WM_WINDOW_TYPE_DESKTOP)
|
||||
item(_NET_WM_WINDOW_TYPE_DOCK)
|
||||
item(_NET_WM_WINDOW_TYPE_TOOLBAR)
|
||||
item(_NET_WM_WINDOW_TYPE_MENU)
|
||||
item(_NET_WM_WINDOW_TYPE_DIALOG)
|
||||
item(_NET_WM_WINDOW_TYPE_NORMAL)
|
||||
item(_NET_WM_STATE_MODAL)
|
||||
item(_NET_CLIENT_LIST)
|
||||
item(_NET_CLIENT_LIST_STACKING)
|
||||
item(_NET_WM_STATE_SKIP_TASKBAR)
|
||||
item(_NET_WM_STATE_SKIP_PAGER)
|
||||
item(_NET_WM_ICON_NAME)
|
||||
item(_NET_WM_ICON)
|
||||
item(_NET_WM_ICON_GEOMETRY)
|
||||
item(_NET_WM_MOVERESIZE)
|
||||
item(_NET_ACTIVE_WINDOW)
|
||||
item(_NET_WM_STRUT)
|
||||
item(_NET_WM_STATE_HIDDEN)
|
||||
item(_NET_WM_WINDOW_TYPE_UTILITY)
|
||||
item(_NET_WM_WINDOW_TYPE_SPLASH)
|
||||
item(_NET_WM_STATE_FULLSCREEN)
|
||||
item(_NET_WM_PING)
|
||||
item(_NET_WM_PID)
|
||||
item(_NET_WORKAREA)
|
||||
item(_NET_SHOWING_DESKTOP)
|
||||
item(_NET_DESKTOP_LAYOUT)
|
||||
item(_NET_DESKTOP_NAMES)
|
||||
item(_NET_WM_ALLOWED_ACTIONS)
|
||||
item(_NET_WM_ACTION_MOVE)
|
||||
item(_NET_WM_ACTION_RESIZE)
|
||||
item(_NET_WM_ACTION_SHADE)
|
||||
item(_NET_WM_ACTION_STICK)
|
||||
item(_NET_WM_ACTION_MAXIMIZE_HORZ)
|
||||
item(_NET_WM_ACTION_MAXIMIZE_VERT)
|
||||
item(_NET_WM_ACTION_CHANGE_DESKTOP)
|
||||
item(_NET_WM_ACTION_CLOSE)
|
||||
item(_NET_WM_STATE_ABOVE)
|
||||
item(_NET_WM_STATE_BELOW)
|
||||
item(_NET_STARTUP_ID)
|
||||
item(_NET_WM_STRUT_PARTIAL)
|
||||
item(_NET_WM_ACTION_FULLSCREEN)
|
||||
item(_NET_WM_ACTION_MINIMIZE)
|
||||
item(_NET_FRAME_EXTENTS)
|
||||
item(_NET_REQUEST_FRAME_EXTENTS)
|
||||
item(_NET_WM_USER_TIME)
|
||||
item(_NET_WM_STATE_DEMANDS_ATTENTION)
|
||||
item(_NET_MOVERESIZE_WINDOW)
|
||||
item(_NET_DESKTOP_GEOMETRY)
|
||||
item(_NET_DESKTOP_VIEWPORT)
|
||||
item(_NET_WM_USER_TIME_WINDOW)
|
||||
item(_NET_WM_ACTION_ABOVE)
|
||||
item(_NET_WM_ACTION_BELOW)
|
||||
|
||||
#if 0
|
||||
/* We apparently never use: */
|
||||
/* item(_NET_RESTACK_WINDOW) */
|
||||
#endif
|
||||
|
||||
/* eof atomnames.h */
|
||||
|
@@ -22,11 +22,57 @@
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file core/bell.c Ring the bell or flash the screen
|
||||
*
|
||||
* Sometimes, X programs "ring the bell", whatever that means. Metacity lets
|
||||
* the user configure the bell to be audible or visible (aka visual), and
|
||||
* if it's visual it can be configured to be frame-flash or fullscreen-flash.
|
||||
* We never get told about audible bells; X handles them just fine by itself.
|
||||
*
|
||||
* Visual bells come in at meta_bell_notify(), which checks we are actually
|
||||
* in visual mode and calls through to meta_bell_visual_notify(). That
|
||||
* function then checks what kind of visual flash you like, and calls either
|
||||
* meta_bell_flash_fullscreen()-- which calls meta_bell_flash_screen() to do
|
||||
* its work-- or meta_bell_flash_frame(), which flashes the focussed window
|
||||
* using meta_bell_flash_window_frame(), unless there is no such window, in
|
||||
* which case it flashes the screen instead. meta_bell_flash_window_frame()
|
||||
* flashes the frame and calls meta_bell_unflash_frame() as a timeout to
|
||||
* remove the flash.
|
||||
*
|
||||
* The visual bell was the result of a discussion in Bugzilla here:
|
||||
* <http://bugzilla.gnome.org/show_bug.cgi?id=99886>.
|
||||
*
|
||||
* Several of the functions in this file are ifdeffed out entirely if we are
|
||||
* found not to have the XKB extension, which is required to do these clever
|
||||
* things with bells; some others are entirely no-ops in that case.
|
||||
*
|
||||
* \bug Static functions should not be called meta_*.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "bell.h"
|
||||
#include "screen.h"
|
||||
#include "screen-private.h"
|
||||
#include "prefs.h"
|
||||
|
||||
/**
|
||||
* Flashes one entire screen. This is done by making a window the size of the
|
||||
* whole screen (or reusing the old one, if it's still around), mapping it,
|
||||
* painting it white and then black, and then unmapping it. We set saveunder so
|
||||
* that all the windows behind it come back immediately.
|
||||
*
|
||||
* Unlike frame flashes, we don't do fullscreen flashes with a timeout; rather,
|
||||
* we do them in one go, because we don't have to rely on the theme code
|
||||
* redrawing the frame for us in order to do the flash.
|
||||
*
|
||||
* \param display The display which owns the screen (rather redundant)
|
||||
* \param screen The screen to flash
|
||||
*
|
||||
* \bug The way I read it, this appears not to do the flash
|
||||
* the first time we flash a particular display. Am I wrong?
|
||||
*
|
||||
* \bug This appears to destroy our current XSync status.
|
||||
*/
|
||||
static void
|
||||
meta_bell_flash_screen (MetaDisplay *display,
|
||||
MetaScreen *screen)
|
||||
@@ -89,6 +135,16 @@ meta_bell_flash_screen (MetaDisplay *display,
|
||||
XFlush (display->xdisplay);
|
||||
}
|
||||
|
||||
/**
|
||||
* Flashes one screen, or all screens, in response to a bell event.
|
||||
* If the event is on a particular window, flash the screen that
|
||||
* window is on. Otherwise, flash every screen on this display.
|
||||
*
|
||||
* If the configure script found we had no XKB, this does not exist.
|
||||
*
|
||||
* \param display The display the event came in on
|
||||
* \param xkb_ev The bell event
|
||||
*/
|
||||
#ifdef HAVE_XKB
|
||||
static void
|
||||
meta_bell_flash_fullscreen (MetaDisplay *display,
|
||||
@@ -116,6 +172,20 @@ meta_bell_flash_fullscreen (MetaDisplay *display,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes a frame be not flashed; this is the timeout half of
|
||||
* meta_bell_flash_window_frame(). This is done simply by clearing the
|
||||
* flash flag and queuing a redraw of the frame.
|
||||
*
|
||||
* If the configure script found we had no XKB, this does not exist.
|
||||
*
|
||||
* \param data The frame to unflash, cast to a gpointer so it can go into
|
||||
* a callback function.
|
||||
* \return Always FALSE, so we don't get called again.
|
||||
*
|
||||
* \bug This is the parallel to meta_bell_flash_window_frame(), so it should
|
||||
* really be called meta_bell_unflash_window_frame().
|
||||
*/
|
||||
static gboolean
|
||||
meta_bell_unflash_frame (gpointer data)
|
||||
{
|
||||
@@ -125,6 +195,17 @@ meta_bell_unflash_frame (gpointer data)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes a frame flash and then return to normal shortly afterwards.
|
||||
* This is done by setting a flag so that the theme
|
||||
* code will temporarily draw the frame as focussed if it's unfocussed and
|
||||
* vice versa, and then queueing a redraw. Lastly, we create a timeout so
|
||||
* that the flag can be unset and the frame re-redrawn.
|
||||
*
|
||||
* If the configure script found we had no XKB, this does not exist.
|
||||
*
|
||||
* \param window The window to flash
|
||||
*/
|
||||
static void
|
||||
meta_bell_flash_window_frame (MetaWindow *window)
|
||||
{
|
||||
@@ -135,6 +216,13 @@ meta_bell_flash_window_frame (MetaWindow *window)
|
||||
meta_bell_unflash_frame, window->frame, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Flashes the frame of the focussed window. If there is no focussed window,
|
||||
* flashes the screen.
|
||||
*
|
||||
* \param display The display the bell event came in on
|
||||
* \param xkb_ev The bell event we just received
|
||||
*/
|
||||
static void
|
||||
meta_bell_flash_frame (MetaDisplay *display,
|
||||
XkbAnyEvent *xkb_ev)
|
||||
@@ -158,6 +246,17 @@ meta_bell_flash_frame (MetaDisplay *display,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gives the user some kind of visual bell substitute, in response to a
|
||||
* bell event. What this is depends on the "visual bell type" pref.
|
||||
*
|
||||
* If the configure script found we had no XKB, this does not exist.
|
||||
*
|
||||
* \param display The display the bell event came in on
|
||||
* \param xkb_ev The bell event we just received
|
||||
*
|
||||
* \bug This should be merged with meta_bell_notify().
|
||||
*/
|
||||
static void
|
||||
meta_bell_visual_notify (MetaDisplay *display,
|
||||
XkbAnyEvent *xkb_ev)
|
||||
@@ -176,6 +275,16 @@ meta_bell_visual_notify (MetaDisplay *display,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gives the user some kind of visual bell; in fact, this is our response
|
||||
* to any kind of bell request, but we set it up so that we only get
|
||||
* notified about visual bells, and X deals with audible ones.
|
||||
*
|
||||
* If the configure script found we had no XKB, this does not exist.
|
||||
*
|
||||
* \param display The display the bell event came in on
|
||||
* \param xkb_ev The bell event we just received
|
||||
*/
|
||||
void
|
||||
meta_bell_notify (MetaDisplay *display,
|
||||
XkbAnyEvent *xkb_ev)
|
||||
@@ -184,8 +293,17 @@ meta_bell_notify (MetaDisplay *display,
|
||||
if (meta_prefs_get_visual_bell ())
|
||||
meta_bell_visual_notify (display, xkb_ev);
|
||||
}
|
||||
#endif
|
||||
#endif /* HAVE_XKB */
|
||||
|
||||
/**
|
||||
* Turns the bell to audible or visual. This tells X what to do, but
|
||||
* not Metacity; you will need to set the "visual bell" pref for that.
|
||||
*
|
||||
* If the configure script found we had no XKB, this is a no-op.
|
||||
*
|
||||
* \param display The display we're configuring
|
||||
* \param audible True for an audible bell, false for a visual bell
|
||||
*/
|
||||
void
|
||||
meta_bell_set_audible (MetaDisplay *display, gboolean audible)
|
||||
{
|
||||
@@ -197,6 +315,27 @@ meta_bell_set_audible (MetaDisplay *display, gboolean audible)
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialises the bell subsystem. This involves intialising
|
||||
* XKB (which, despite being a keyboard extension, is the
|
||||
* place to look for bell notifications), then asking it
|
||||
* to send us bell notifications, and then also switching
|
||||
* off the audible bell if we're using a visual one ourselves.
|
||||
*
|
||||
* Unlike most X extensions we use, we only initialise XKB here
|
||||
* (rather than in main()). It's possible that XKB is not
|
||||
* installed at all, but if that was known at build time
|
||||
* we will have HAVE_XKB undefined, which will cause this
|
||||
* function to be a no-op.
|
||||
*
|
||||
* \param display The display which is opening
|
||||
*
|
||||
* \bug There is a line of code that's never run that tells
|
||||
* XKB to reset the bell status after we quit. Bill H said
|
||||
* (<http://bugzilla.gnome.org/show_bug.cgi?id=99886#c12>)
|
||||
* that XFree86's implementation is broken so we shouldn't
|
||||
* call it, but that was in 2002. Is it working now?
|
||||
*/
|
||||
gboolean
|
||||
meta_bell_init (MetaDisplay *display)
|
||||
{
|
||||
@@ -238,6 +377,15 @@ meta_bell_init (MetaDisplay *display)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shuts down the bell subsystem.
|
||||
*
|
||||
* \param display The display which is closing
|
||||
*
|
||||
* \bug This is never called! If we had XkbSetAutoResetControls
|
||||
* enabled in meta_bell_init(), this wouldn't be a problem, but
|
||||
* we don't.
|
||||
*/
|
||||
void
|
||||
meta_bell_shutdown (MetaDisplay *display)
|
||||
{
|
||||
@@ -250,6 +398,14 @@ meta_bell_shutdown (MetaDisplay *display)
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Deals with a frame being destroyed. This is important because if we're
|
||||
* using a visual bell, we might be flashing the edges of the frame, and
|
||||
* so we'd have a timeout function waiting ready to un-flash them. If the
|
||||
* frame's going away, we can tell the timeout not to bother.
|
||||
*
|
||||
* \param frame The frame which is being destroyed
|
||||
*/
|
||||
void
|
||||
meta_bell_notify_frame_destroy (MetaFrame *frame)
|
||||
{
|
@@ -24,8 +24,8 @@
|
||||
#ifdef HAVE_XKB
|
||||
#include <X11/XKBlib.h>
|
||||
#endif
|
||||
#include "display.h"
|
||||
#include "frame.h"
|
||||
#include "display-private.h"
|
||||
#include "frame-private.h"
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
void meta_bell_notify (MetaDisplay *display, XkbAnyEvent *xkb_ev);
|
@@ -29,7 +29,6 @@
|
||||
#include "boxes.h"
|
||||
#include "util.h"
|
||||
#include <X11/Xutil.h> /* Just for the definition of the various gravities */
|
||||
#include <stdio.h> /* For snprintf */
|
||||
|
||||
char*
|
||||
meta_rectangle_to_string (const MetaRectangle *rect,
|
||||
@@ -61,7 +60,7 @@ meta_rectangle_region_to_string (GList *region,
|
||||
char *cur = output;
|
||||
|
||||
if (region == NULL)
|
||||
snprintf (output, 10, "(EMPTY)");
|
||||
g_snprintf (output, 10, "(EMPTY)");
|
||||
|
||||
while (tmp)
|
||||
{
|
||||
@@ -114,7 +113,7 @@ meta_rectangle_edge_list_to_string (GList *edge_list,
|
||||
GList *tmp = edge_list;
|
||||
|
||||
if (edge_list == NULL)
|
||||
snprintf (output, 10, "(EMPTY)");
|
||||
g_snprintf (output, 10, "(EMPTY)");
|
||||
|
||||
while (tmp)
|
||||
{
|
@@ -91,7 +91,7 @@
|
||||
|
||||
typedef enum
|
||||
{
|
||||
PRIORITY_MINIMUM = 0, // Dummy value used for loop start = min(all priorities)
|
||||
PRIORITY_MINIMUM = 0, /* Dummy value used for loop start = min(all priorities) */
|
||||
PRIORITY_ASPECT_RATIO = 0,
|
||||
PRIORITY_ENTIRELY_VISIBLE_ON_SINGLE_XINERAMA = 0,
|
||||
PRIORITY_ENTIRELY_VISIBLE_ON_WORKAREA = 1,
|
||||
@@ -101,7 +101,7 @@ typedef enum
|
||||
PRIORITY_SIZE_HINTS_LIMITS = 3,
|
||||
PRIORITY_TITLEBAR_VISIBLE = 4,
|
||||
PRIORITY_PARTIALLY_VISIBLE_ON_WORKAREA = 4,
|
||||
PRIORITY_MAXIMUM = 4 // Dummy value used for loop end = max(all priorities)
|
||||
PRIORITY_MAXIMUM = 4 /* Dummy value used for loop end = max(all priorities) */
|
||||
} ConstraintPriority;
|
||||
|
||||
typedef enum
|
||||
@@ -811,6 +811,7 @@ constrain_size_increments (MetaWindow *window,
|
||||
int bh, hi, bw, wi, extra_height, extra_width;
|
||||
int new_width, new_height;
|
||||
gboolean constraint_already_satisfied;
|
||||
MetaRectangle *start_rect;
|
||||
|
||||
if (priority > PRIORITY_SIZE_HINTS_INCREMENTS)
|
||||
return TRUE;
|
||||
@@ -852,8 +853,16 @@ constrain_size_increments (MetaWindow *window,
|
||||
if (new_height < window->size_hints.min_height)
|
||||
new_height += ((window->size_hints.min_height - new_height)/hi + 1)*hi;
|
||||
|
||||
/* Figure out what original rect to pass to meta_rectangle_resize_with_gravity
|
||||
* See bug 448183
|
||||
*/
|
||||
if (info->action_type == ACTION_MOVE_AND_RESIZE)
|
||||
start_rect = &info->current;
|
||||
else
|
||||
start_rect = &info->orig;
|
||||
|
||||
/* Resize to the new size */
|
||||
meta_rectangle_resize_with_gravity (&info->orig,
|
||||
meta_rectangle_resize_with_gravity (start_rect,
|
||||
&info->current,
|
||||
info->resize_gravity,
|
||||
new_width,
|
||||
@@ -870,6 +879,7 @@ constrain_size_limits (MetaWindow *window,
|
||||
MetaRectangle min_size, max_size;
|
||||
gboolean too_big, too_small, constraint_already_satisfied;
|
||||
int new_width, new_height;
|
||||
MetaRectangle *start_rect;
|
||||
|
||||
if (priority > PRIORITY_SIZE_HINTS_LIMITS)
|
||||
return TRUE;
|
||||
@@ -898,7 +908,16 @@ constrain_size_limits (MetaWindow *window,
|
||||
/*** Enforce constraint ***/
|
||||
new_width = CLAMP (info->current.width, min_size.width, max_size.width);
|
||||
new_height = CLAMP (info->current.height, min_size.height, max_size.height);
|
||||
meta_rectangle_resize_with_gravity (&info->orig,
|
||||
|
||||
/* Figure out what original rect to pass to meta_rectangle_resize_with_gravity
|
||||
* See bug 448183
|
||||
*/
|
||||
if (info->action_type == ACTION_MOVE_AND_RESIZE)
|
||||
start_rect = &info->current;
|
||||
else
|
||||
start_rect = &info->orig;
|
||||
|
||||
meta_rectangle_resize_with_gravity (start_rect,
|
||||
&info->current,
|
||||
info->resize_gravity,
|
||||
new_width,
|
||||
@@ -917,6 +936,7 @@ constrain_aspect_ratio (MetaWindow *window,
|
||||
int fudge, new_width, new_height;
|
||||
double best_width, best_height;
|
||||
double alt_width, alt_height;
|
||||
MetaRectangle *start_rect;
|
||||
|
||||
if (priority > PRIORITY_ASPECT_RATIO)
|
||||
return TRUE;
|
||||
@@ -1022,7 +1042,15 @@ constrain_aspect_ratio (MetaWindow *window,
|
||||
break;
|
||||
}
|
||||
|
||||
meta_rectangle_resize_with_gravity (&info->orig,
|
||||
/* Figure out what original rect to pass to meta_rectangle_resize_with_gravity
|
||||
* See bug 448183
|
||||
*/
|
||||
if (info->action_type == ACTION_MOVE_AND_RESIZE)
|
||||
start_rect = &info->current;
|
||||
else
|
||||
start_rect = &info->orig;
|
||||
|
||||
meta_rectangle_resize_with_gravity (start_rect,
|
||||
&info->current,
|
||||
info->resize_gravity,
|
||||
new_width,
|
@@ -26,8 +26,8 @@
|
||||
#define META_CONSTRAINTS_H
|
||||
|
||||
#include "util.h"
|
||||
#include "window.h"
|
||||
#include "frame.h"
|
||||
#include "window-private.h"
|
||||
#include "frame-private.h"
|
||||
|
||||
typedef enum
|
||||
{
|
@@ -25,7 +25,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include "core.h"
|
||||
#include "frame.h"
|
||||
#include "frame-private.h"
|
||||
#include "workspace.h"
|
||||
#include "prefs.h"
|
||||
|
||||
@@ -328,6 +328,40 @@ meta_core_maximize (Display *xdisplay,
|
||||
META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_toggle_maximize_vertically (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (meta_prefs_get_raise_on_click ())
|
||||
meta_window_raise (window);
|
||||
|
||||
if (META_WINDOW_MAXIMIZED_VERTICALLY (window))
|
||||
meta_window_unmaximize (window,
|
||||
META_MAXIMIZE_VERTICAL);
|
||||
else
|
||||
meta_window_maximize (window,
|
||||
META_MAXIMIZE_VERTICAL);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_toggle_maximize_horizontally (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (meta_prefs_get_raise_on_click ())
|
||||
meta_window_raise (window);
|
||||
|
||||
if (META_WINDOW_MAXIMIZED_HORIZONTALLY (window))
|
||||
meta_window_unmaximize (window,
|
||||
META_MAXIMIZE_HORIZONTAL);
|
||||
else
|
||||
meta_window_maximize (window,
|
||||
META_MAXIMIZE_HORIZONTAL);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_toggle_maximize (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
@@ -718,28 +752,25 @@ meta_core_increment_event_serial (Display *xdisplay)
|
||||
void
|
||||
meta_invalidate_default_icons (void)
|
||||
{
|
||||
GSList *displays, *windows;
|
||||
MetaDisplay *display = meta_get_display ();
|
||||
GSList *windows;
|
||||
GSList *l;
|
||||
|
||||
for (displays = meta_displays_list ();
|
||||
displays != NULL;
|
||||
displays = displays->next)
|
||||
if (display == NULL)
|
||||
return; /* We can validly be called before the display is opened. */
|
||||
|
||||
windows = meta_display_list_windows (display);
|
||||
for (l = windows; l != NULL; l = l->next)
|
||||
{
|
||||
MetaWindow *window = (MetaWindow*)l->data;
|
||||
|
||||
for (windows = meta_display_list_windows (displays->data);
|
||||
windows != NULL;
|
||||
windows = windows->next)
|
||||
if (window->icon_cache.origin == USING_FALLBACK_ICON)
|
||||
{
|
||||
|
||||
MetaWindow *window = (MetaWindow*)windows->data;
|
||||
|
||||
if (window->icon_cache.origin == USING_FALLBACK_ICON)
|
||||
{
|
||||
meta_icon_cache_free (&(window->icon_cache));
|
||||
meta_window_update_icon_now (window);
|
||||
}
|
||||
meta_icon_cache_free (&(window->icon_cache));
|
||||
meta_window_update_icon_now (window);
|
||||
}
|
||||
|
||||
g_slist_free (windows);
|
||||
}
|
||||
|
||||
g_slist_free (windows);
|
||||
}
|
||||
|
@@ -22,9 +22,12 @@
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#define _SVID_SOURCE /* for gethostname() */
|
||||
|
||||
#include <config.h>
|
||||
#include "util.h"
|
||||
#include "window.h"
|
||||
#include "window-private.h"
|
||||
#include "errors.h"
|
||||
#include "workspace.h"
|
||||
|
||||
@@ -144,7 +147,8 @@ search_and_destroy_window (int pid,
|
||||
* kill the window.
|
||||
*/
|
||||
GSList *tmp;
|
||||
gboolean found;
|
||||
gboolean found = FALSE;
|
||||
GSList *windows;
|
||||
|
||||
if (xwindow == None)
|
||||
{
|
||||
@@ -153,39 +157,31 @@ search_and_destroy_window (int pid,
|
||||
return;
|
||||
}
|
||||
|
||||
found = FALSE;
|
||||
tmp = meta_displays_list ();
|
||||
windows = meta_display_list_windows (meta_get_display ());
|
||||
tmp = windows;
|
||||
|
||||
while (tmp != NULL)
|
||||
{
|
||||
GSList *windows = meta_display_list_windows (tmp->data);
|
||||
GSList *tmp2;
|
||||
MetaWindow *w = tmp->data;
|
||||
|
||||
tmp2 = windows;
|
||||
while (tmp2 != NULL)
|
||||
if (w->dialog_pid == pid)
|
||||
{
|
||||
MetaWindow *w = tmp2->data;
|
||||
|
||||
if (w->dialog_pid == pid)
|
||||
if (w->xwindow != xwindow)
|
||||
meta_topic (META_DEBUG_PING,
|
||||
"Dialog pid matches but not xwindow (0x%lx vs. 0x%lx)\n",
|
||||
w->xwindow, xwindow);
|
||||
else
|
||||
{
|
||||
if (w->xwindow != xwindow)
|
||||
meta_topic (META_DEBUG_PING,
|
||||
"Dialog pid matches but not xwindow (0x%lx vs. 0x%lx)\n",
|
||||
w->xwindow, xwindow);
|
||||
else
|
||||
{
|
||||
meta_window_kill (w);
|
||||
found = TRUE;
|
||||
}
|
||||
meta_window_kill (w);
|
||||
found = TRUE;
|
||||
}
|
||||
|
||||
tmp2 = tmp2->next;
|
||||
}
|
||||
|
||||
g_slist_free (windows);
|
||||
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
g_slist_free (windows);
|
||||
|
||||
if (!found)
|
||||
meta_topic (META_DEBUG_PING,
|
||||
"Did not find a window with dialog pid %d xwindow 0x%lx\n",
|
||||
@@ -199,40 +195,30 @@ release_window_with_fd (int fd)
|
||||
* double check that it matches "xwindow", then
|
||||
* kill the window.
|
||||
*/
|
||||
GSList *tmp;
|
||||
gboolean found;
|
||||
|
||||
found = FALSE;
|
||||
gboolean found = FALSE;
|
||||
|
||||
tmp = meta_displays_list ();
|
||||
GSList *windows = meta_display_list_windows (meta_get_display ());
|
||||
GSList *tmp = windows;
|
||||
|
||||
while (tmp != NULL)
|
||||
{
|
||||
GSList *windows = meta_display_list_windows (tmp->data);
|
||||
GSList *tmp2;
|
||||
MetaWindow *w = tmp->data;
|
||||
|
||||
tmp2 = windows;
|
||||
while (tmp2 != NULL)
|
||||
if (w->dialog_pid >= 0 &&
|
||||
w->dialog_pipe == fd)
|
||||
{
|
||||
MetaWindow *w = tmp2->data;
|
||||
|
||||
if (w->dialog_pid >= 0 &&
|
||||
w->dialog_pipe == fd)
|
||||
{
|
||||
meta_topic (META_DEBUG_PING,
|
||||
"Removing dialog with fd %d pid %d from window %s\n",
|
||||
fd, w->dialog_pid, w->desc);
|
||||
meta_window_free_delete_dialog (w);
|
||||
found = TRUE;
|
||||
}
|
||||
|
||||
tmp2 = tmp2->next;
|
||||
meta_topic (META_DEBUG_PING,
|
||||
"Removing dialog with fd %d pid %d from window %s\n",
|
||||
fd, w->dialog_pid, w->desc);
|
||||
meta_window_free_delete_dialog (w);
|
||||
found = TRUE;
|
||||
}
|
||||
|
||||
g_slist_free (windows);
|
||||
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
g_slist_free (windows);
|
||||
|
||||
if (!found)
|
||||
meta_topic (META_DEBUG_PING,
|
||||
"Did not find a window with a dialog pipe %d\n",
|
||||
@@ -251,7 +237,7 @@ io_from_ping_dialog (GIOChannel *channel,
|
||||
if (condition & G_IO_IN)
|
||||
{
|
||||
char *str;
|
||||
unsigned int len;
|
||||
gsize len;
|
||||
GError *err;
|
||||
|
||||
/* Go ahead and block for all data from child */
|
||||
@@ -270,8 +256,8 @@ io_from_ping_dialog (GIOChannel *channel,
|
||||
}
|
||||
|
||||
meta_topic (META_DEBUG_PING,
|
||||
"Read %d bytes strlen %d \"%s\" from child\n",
|
||||
len, str ? strlen (str) : 0, str ? str : "NULL");
|
||||
"Read %" G_GSIZE_FORMAT " bytes strlen %d \"%s\" from child\n",
|
||||
len, str ? (int) strlen (str) : 0, str ? str : "NULL");
|
||||
|
||||
if (len > 0)
|
||||
{
|
||||
@@ -379,7 +365,7 @@ meta_window_delete (MetaWindow *window,
|
||||
"Deleting %s with delete_window request\n",
|
||||
window->desc);
|
||||
meta_window_send_icccm_message (window,
|
||||
window->display->atom_wm_delete_window,
|
||||
window->display->atom_WM_DELETE_WINDOW,
|
||||
timestamp);
|
||||
}
|
||||
else
|
@@ -24,8 +24,8 @@
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_DISPLAY_H
|
||||
#define META_DISPLAY_H
|
||||
#ifndef META_DISPLAY_PRIVATE_H
|
||||
#define META_DISPLAY_PRIVATE_H
|
||||
|
||||
#ifndef PACKAGE
|
||||
#error "config.h not included"
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "eventqueue.h"
|
||||
#include "common.h"
|
||||
#include "boxes.h"
|
||||
#include "display.h"
|
||||
|
||||
#ifdef HAVE_STARTUP_NOTIFICATION
|
||||
#include <libsn/sn.h>
|
||||
@@ -45,16 +46,9 @@
|
||||
#include <X11/extensions/sync.h>
|
||||
#endif
|
||||
|
||||
#define meta_XFree(p) do { if ((p)) XFree ((p)); } while (0)
|
||||
|
||||
typedef struct MetaCompositor MetaCompositor;
|
||||
typedef struct _MetaDisplay MetaDisplay;
|
||||
typedef struct _MetaFrame MetaFrame;
|
||||
typedef struct _MetaKeyBinding MetaKeyBinding;
|
||||
typedef struct _MetaScreen MetaScreen;
|
||||
typedef struct _MetaStack MetaStack;
|
||||
typedef struct _MetaUISlave MetaUISlave;
|
||||
typedef struct _MetaWindow MetaWindow;
|
||||
typedef struct _MetaWorkspace MetaWorkspace;
|
||||
|
||||
typedef struct _MetaWindowPropHooks MetaWindowPropHooks;
|
||||
@@ -87,103 +81,12 @@ struct _MetaDisplay
|
||||
Window leader_window;
|
||||
Window timestamp_pinging_window;
|
||||
|
||||
Atom atom_net_wm_name;
|
||||
Atom atom_wm_protocols;
|
||||
Atom atom_wm_take_focus;
|
||||
Atom atom_wm_delete_window;
|
||||
Atom atom_wm_state;
|
||||
Atom atom_net_close_window;
|
||||
Atom atom_net_wm_state;
|
||||
Atom atom_motif_wm_hints;
|
||||
Atom atom_net_wm_state_shaded;
|
||||
Atom atom_net_wm_state_maximized_horz;
|
||||
Atom atom_net_wm_state_maximized_vert;
|
||||
Atom atom_net_wm_desktop;
|
||||
Atom atom_net_number_of_desktops;
|
||||
Atom atom_wm_change_state;
|
||||
Atom atom_sm_client_id;
|
||||
Atom atom_wm_client_leader;
|
||||
Atom atom_wm_window_role;
|
||||
Atom atom_net_current_desktop;
|
||||
Atom atom_net_supporting_wm_check;
|
||||
Atom atom_net_supported;
|
||||
Atom atom_net_wm_window_type;
|
||||
Atom atom_net_wm_window_type_desktop;
|
||||
Atom atom_net_wm_window_type_dock;
|
||||
Atom atom_net_wm_window_type_toolbar;
|
||||
Atom atom_net_wm_window_type_menu;
|
||||
Atom atom_net_wm_window_type_dialog;
|
||||
Atom atom_net_wm_window_type_normal;
|
||||
Atom atom_net_wm_state_modal;
|
||||
Atom atom_net_client_list;
|
||||
Atom atom_net_client_list_stacking;
|
||||
Atom atom_net_wm_state_skip_taskbar;
|
||||
Atom atom_net_wm_state_skip_pager;
|
||||
Atom atom_net_wm_icon_name;
|
||||
Atom atom_net_wm_icon;
|
||||
Atom atom_net_wm_icon_geometry;
|
||||
Atom atom_utf8_string;
|
||||
Atom atom_wm_icon_size;
|
||||
Atom atom_kwm_win_icon;
|
||||
Atom atom_net_wm_moveresize;
|
||||
Atom atom_net_active_window;
|
||||
Atom atom_metacity_restart_message;
|
||||
Atom atom_net_wm_strut;
|
||||
Atom atom_metacity_reload_theme_message;
|
||||
Atom atom_metacity_set_keybindings_message;
|
||||
Atom atom_net_wm_state_hidden;
|
||||
Atom atom_net_wm_window_type_utility;
|
||||
Atom atom_net_wm_window_type_splash;
|
||||
Atom atom_net_wm_ping;
|
||||
Atom atom_net_wm_pid;
|
||||
Atom atom_wm_client_machine;
|
||||
Atom atom_net_wm_state_fullscreen;
|
||||
Atom atom_net_workarea;
|
||||
Atom atom_net_showing_desktop;
|
||||
Atom atom_net_desktop_layout;
|
||||
Atom atom_manager;
|
||||
Atom atom_targets;
|
||||
Atom atom_multiple;
|
||||
Atom atom_timestamp;
|
||||
Atom atom_version;
|
||||
Atom atom_atom_pair;
|
||||
Atom atom_net_desktop_names;
|
||||
Atom atom_net_wm_allowed_actions;
|
||||
Atom atom_net_wm_action_move;
|
||||
Atom atom_net_wm_action_resize;
|
||||
Atom atom_net_wm_action_fullscreen;
|
||||
Atom atom_net_wm_action_minimize;
|
||||
Atom atom_net_wm_action_shade;
|
||||
Atom atom_net_wm_action_stick;
|
||||
Atom atom_net_wm_action_maximize_horz;
|
||||
Atom atom_net_wm_action_maximize_vert;
|
||||
Atom atom_net_wm_action_change_desktop;
|
||||
Atom atom_net_wm_action_close;
|
||||
Atom atom_net_wm_action_above;
|
||||
Atom atom_net_wm_action_below;
|
||||
Atom atom_net_wm_state_above;
|
||||
Atom atom_net_wm_state_below;
|
||||
Atom atom_net_startup_id;
|
||||
Atom atom_metacity_toggle_verbose;
|
||||
Atom atom_net_wm_sync_request;
|
||||
Atom atom_net_wm_sync_request_counter;
|
||||
Atom atom_gnome_panel_action;
|
||||
Atom atom_gnome_panel_action_main_menu;
|
||||
Atom atom_gnome_panel_action_run_dialog;
|
||||
Atom atom_metacity_sentinel;
|
||||
Atom atom_net_wm_strut_partial;
|
||||
Atom atom_net_frame_extents;
|
||||
Atom atom_net_request_frame_extents;
|
||||
Atom atom_net_wm_user_time;
|
||||
Atom atom_net_wm_state_demands_attention;
|
||||
Atom atom_net_restack_window;
|
||||
Atom atom_net_moveresize_window;
|
||||
Atom atom_net_desktop_geometry;
|
||||
Atom atom_net_desktop_viewport;
|
||||
Atom atom_metacity_version;
|
||||
Atom atom_net_wm_visible_name;
|
||||
Atom atom_net_wm_visible_icon_name;
|
||||
Atom atom_net_wm_user_time_window;
|
||||
/* Pull in all the names of atoms as fields; we will intern them when the
|
||||
* class is constructed.
|
||||
*/
|
||||
#define item(x) Atom atom_##x;
|
||||
#include "atomnames.h"
|
||||
#undef item
|
||||
|
||||
/* This is the actual window from focus events,
|
||||
* not the one we last set
|
||||
@@ -354,6 +257,16 @@ struct _MetaDisplay
|
||||
int render_event_base;
|
||||
int render_error_base;
|
||||
#endif
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
int composite_event_base;
|
||||
int composite_error_base;
|
||||
int composite_major_version;
|
||||
int composite_minor_version;
|
||||
int damage_event_base;
|
||||
int damage_error_base;
|
||||
int xfixes_event_base;
|
||||
int xfixes_error_base;
|
||||
#endif
|
||||
#ifdef HAVE_XSYNC
|
||||
unsigned int have_xsync : 1;
|
||||
#define META_DISPLAY_HAS_XSYNC(display) ((display)->have_xsync)
|
||||
@@ -372,6 +285,18 @@ struct _MetaDisplay
|
||||
#else
|
||||
#define META_DISPLAY_HAS_RENDER(display) FALSE
|
||||
#endif
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
unsigned int have_composite : 1;
|
||||
unsigned int have_damage : 1;
|
||||
unsigned int have_xfixes : 1;
|
||||
#define META_DISPLAY_HAS_COMPOSITE(display) ((display)->have_composite)
|
||||
#define META_DISPLAY_HAS_DAMAGE(display) ((display)->have_damage)
|
||||
#define META_DISPLAY_HAS_XFIXES(display) ((display)->have_xfixes)
|
||||
#else
|
||||
#define META_DISPLAY_HAS_COMPOSITE(display) FALSE
|
||||
#define META_DISPLAY_HAS_DAMAGE(display) FALSE
|
||||
#define META_DISPLAY_HAS_XFIXES(display) FALSE
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Xserver time can wraparound, thus comparing two timestamps needs to take
|
||||
@@ -399,8 +324,6 @@ struct _MetaDisplay
|
||||
gboolean meta_display_open (void);
|
||||
void meta_display_close (MetaDisplay *display,
|
||||
guint32 timestamp);
|
||||
MetaScreen* meta_display_screen_for_root (MetaDisplay *display,
|
||||
Window xroot);
|
||||
MetaScreen* meta_display_screen_for_x_screen (MetaDisplay *display,
|
||||
Screen *screen);
|
||||
MetaScreen* meta_display_screen_for_xwindow (MetaDisplay *display,
|
||||
@@ -437,7 +360,7 @@ gboolean meta_display_xwindow_is_a_no_focus_window (MetaDisplay *display,
|
||||
GSList* meta_display_list_windows (MetaDisplay *display);
|
||||
|
||||
MetaDisplay* meta_display_for_x_display (Display *xdisplay);
|
||||
GSList* meta_displays_list (void);
|
||||
MetaDisplay* meta_get_display (void);
|
||||
|
||||
Cursor meta_display_create_x_cursor (MetaDisplay *display,
|
||||
MetaCursor cursor);
|
File diff suppressed because it is too large
Load Diff
@@ -21,9 +21,10 @@
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "edge-resistance.h"
|
||||
#include "boxes.h"
|
||||
#include "display.h"
|
||||
#include "display-private.h"
|
||||
#include "workspace.h"
|
||||
|
||||
/* A simple macro for whether a given window's edges are potentially
|
||||
@@ -1091,6 +1092,7 @@ meta_display_compute_resistance_and_snapping_edges (MetaDisplay *display)
|
||||
/*
|
||||
* 4th: Free the extra memory not needed and sort the list
|
||||
*/
|
||||
g_list_free (stacked_windows);
|
||||
/* Free the memory used by the obscuring windows/docks lists */
|
||||
g_slist_free (window_stacking);
|
||||
/* FIXME: Shouldn't there be a helper function to make this one line of code
|
@@ -24,7 +24,7 @@
|
||||
#ifndef META_EDGE_RESISTANCE_H
|
||||
#define META_EDGE_RESISTANCE_H
|
||||
|
||||
#include "window.h"
|
||||
#include "window-private.h"
|
||||
|
||||
void meta_window_edge_resistance_for_move (MetaWindow *window,
|
||||
int old_x,
|
@@ -21,11 +21,21 @@
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \file effects.c "Special effects" other than compositor effects.
|
||||
*
|
||||
* Before we had a serious compositor, we supported swooping
|
||||
* rectangles for minimising and so on. These are still supported
|
||||
* today, even when the compositor is enabled.
|
||||
*/
|
||||
|
||||
|
||||
#include <config.h>
|
||||
#include "effects.h"
|
||||
#include "display.h"
|
||||
#include "display-private.h"
|
||||
#include "ui.h"
|
||||
#include "window.h"
|
||||
#include "window-private.h"
|
||||
|
||||
#ifdef HAVE_SHAPE
|
||||
#include <X11/extensions/shape.h>
|
||||
@@ -256,14 +266,15 @@ update_wireframe_window (MetaDisplay *display,
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* A hack to force the X server to synchronize with the
|
||||
* graphics hardware.
|
||||
*/
|
||||
static void
|
||||
graphics_sync (BoxAnimationContext *context)
|
||||
{
|
||||
XImage *image;
|
||||
|
||||
/* A hack to force the X server to synchronize with the
|
||||
* graphics hardware
|
||||
*/
|
||||
image = XGetImage (context->screen->display->xdisplay,
|
||||
context->screen->xroot,
|
||||
0, 0, 1, 1,
|
@@ -25,7 +25,7 @@
|
||||
#define META_EFFECTS_H
|
||||
|
||||
#include "util.h"
|
||||
#include "screen.h"
|
||||
#include "screen-private.h"
|
||||
|
||||
typedef struct MetaEffect MetaEffect;
|
||||
typedef struct MetaEffectPriv MetaEffectPriv;
|
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include "errors.h"
|
||||
#include "display-private.h"
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <gdk/gdk.h>
|
@@ -21,10 +21,11 @@
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_FRAME_H
|
||||
#define META_FRAME_H
|
||||
#ifndef META_FRAME_PRIVATE_H
|
||||
#define META_FRAME_PRIVATE_H
|
||||
|
||||
#include "window.h"
|
||||
#include "frame.h"
|
||||
#include "window-private.h"
|
||||
|
||||
typedef struct _MetaFrameGeometry MetaFrameGeometry;
|
||||
|
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "frame.h"
|
||||
#include "frame-private.h"
|
||||
#include "bell.h"
|
||||
#include "errors.h"
|
||||
#include "keybindings.h"
|
||||
@@ -413,3 +413,8 @@ meta_frame_set_screen_cursor (MetaFrame *frame,
|
||||
}
|
||||
}
|
||||
|
||||
Window
|
||||
meta_frame_get_xwindow (MetaFrame *frame)
|
||||
{
|
||||
return frame->xwindow;
|
||||
}
|
@@ -126,7 +126,7 @@ init_wm_client_machine (MetaDisplay *display,
|
||||
MetaPropValue *value)
|
||||
{
|
||||
value->type = META_PROP_VALUE_STRING;
|
||||
value->atom = display->atom_wm_client_machine;
|
||||
value->atom = display->atom_WM_CLIENT_MACHINE;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -149,7 +149,7 @@ init_net_startup_id (MetaDisplay *display,
|
||||
MetaPropValue *value)
|
||||
{
|
||||
value->type = META_PROP_VALUE_UTF8;
|
||||
value->atom = display->atom_net_startup_id;
|
||||
value->atom = display->atom__NET_STARTUP_ID;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -181,23 +181,25 @@ meta_display_init_group_prop_hooks (MetaDisplay *display)
|
||||
|
||||
i = 0;
|
||||
|
||||
hooks[i].property = display->atom_wm_client_machine;
|
||||
hooks[i].property = display->atom_WM_CLIENT_MACHINE;
|
||||
hooks[i].init_func = init_wm_client_machine;
|
||||
hooks[i].reload_func = reload_wm_client_machine;
|
||||
++i;
|
||||
|
||||
hooks[i].property = display->atom_net_wm_pid;
|
||||
hooks[i].property = display->atom__NET_WM_PID;
|
||||
hooks[i].init_func = NULL;
|
||||
hooks[i].reload_func = NULL;
|
||||
++i;
|
||||
|
||||
hooks[i].property = display->atom_net_startup_id;
|
||||
hooks[i].property = display->atom__NET_STARTUP_ID;
|
||||
hooks[i].init_func = init_net_startup_id;
|
||||
hooks[i].reload_func = reload_net_startup_id;
|
||||
++i;
|
||||
|
||||
if (i != N_HOOKS)
|
||||
g_error ("Initialized %d group hooks should have been %d\n", i, N_HOOKS);
|
||||
{
|
||||
g_error ("Initialized %d group hooks should have been %d\n", i, N_HOOKS);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
@@ -58,9 +58,9 @@ meta_group_new (MetaDisplay *display,
|
||||
|
||||
/* Fill these in the order we want them to be gotten */
|
||||
i = 0;
|
||||
initial_props[i++] = display->atom_wm_client_machine;
|
||||
initial_props[i++] = display->atom_net_wm_pid;
|
||||
initial_props[i++] = display->atom_net_startup_id;
|
||||
initial_props[i++] = display->atom_WM_CLIENT_MACHINE;
|
||||
initial_props[i++] = display->atom__NET_WM_PID;
|
||||
initial_props[i++] = display->atom__NET_STARTUP_ID;
|
||||
g_assert (N_INITIAL_PROPS == i);
|
||||
|
||||
meta_group_reload_properties (group, initial_props, N_INITIAL_PROPS);
|
@@ -24,7 +24,7 @@
|
||||
#ifndef META_GROUP_H
|
||||
#define META_GROUP_H
|
||||
|
||||
#include "window.h"
|
||||
#include "window-private.h"
|
||||
|
||||
/* note, can return NULL */
|
||||
MetaGroup* meta_window_get_group (MetaWindow *window);
|
@@ -25,7 +25,6 @@
|
||||
#include "iconcache.h"
|
||||
#include "ui.h"
|
||||
#include "errors.h"
|
||||
#include "theme.h"
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
@@ -237,7 +236,7 @@ read_rgb_icon (MetaDisplay *display,
|
||||
data = NULL;
|
||||
result = XGetWindowProperty (display->xdisplay,
|
||||
xwindow,
|
||||
display->atom_net_wm_icon,
|
||||
display->atom__NET_WM_ICON,
|
||||
0, G_MAXLONG,
|
||||
False, XA_CARDINAL, &type, &format, &nitems,
|
||||
&bytes_after, ((guchar **)&data));
|
||||
@@ -474,10 +473,10 @@ get_kwm_win_icon (MetaDisplay *display,
|
||||
meta_error_trap_push_with_return (display);
|
||||
icons = NULL;
|
||||
result = XGetWindowProperty (display->xdisplay, xwindow,
|
||||
display->atom_kwm_win_icon,
|
||||
display->atom__KWM_WIN_ICON,
|
||||
0, G_MAXLONG,
|
||||
False,
|
||||
display->atom_kwm_win_icon,
|
||||
display->atom__KWM_WIN_ICON,
|
||||
&type, &format, &nitems,
|
||||
&bytes_after, (guchar **)&icons);
|
||||
|
||||
@@ -486,7 +485,7 @@ get_kwm_win_icon (MetaDisplay *display,
|
||||
result != Success)
|
||||
return;
|
||||
|
||||
if (type != display->atom_kwm_win_icon)
|
||||
if (type != display->atom__KWM_WIN_ICON)
|
||||
{
|
||||
XFree (icons);
|
||||
return;
|
||||
@@ -557,9 +556,9 @@ meta_icon_cache_property_changed (MetaIconCache *icon_cache,
|
||||
MetaDisplay *display,
|
||||
Atom atom)
|
||||
{
|
||||
if (atom == display->atom_net_wm_icon)
|
||||
if (atom == display->atom__NET_WM_ICON)
|
||||
icon_cache->net_wm_icon_dirty = TRUE;
|
||||
else if (atom == display->atom_kwm_win_icon)
|
||||
else if (atom == display->atom__KWM_WIN_ICON)
|
||||
icon_cache->kwm_win_icon_dirty = TRUE;
|
||||
else if (atom == XA_WM_HINTS)
|
||||
icon_cache->wm_hints_dirty = TRUE;
|
||||
@@ -818,9 +817,15 @@ meta_read_icons (MetaScreen *screen,
|
||||
if (icon_cache->want_fallback &&
|
||||
icon_cache->origin < USING_FALLBACK_ICON)
|
||||
{
|
||||
MetaTheme *theme = meta_theme_get_current ();
|
||||
GdkPixbuf *fallback_icon;
|
||||
GdkPixbuf *fallback_mini_icon;
|
||||
|
||||
fallback_icon = NULL;
|
||||
fallback_mini_icon = NULL;
|
||||
|
||||
if (theme->fallback_icon == NULL || theme->fallback_mini_icon == NULL)
|
||||
meta_ui_get_fallback_icons(&fallback_icon, &fallback_mini_icon);
|
||||
|
||||
if (fallback_icon == NULL || fallback_mini_icon == NULL)
|
||||
{
|
||||
get_fallback_icons (screen,
|
||||
iconp,
|
||||
@@ -831,14 +836,14 @@ meta_read_icons (MetaScreen *screen,
|
||||
ideal_mini_height);
|
||||
}
|
||||
|
||||
if (theme->fallback_icon != NULL)
|
||||
*iconp = theme->fallback_icon;
|
||||
if (theme->fallback_mini_icon != NULL)
|
||||
*mini_iconp = theme->fallback_mini_icon;
|
||||
|
||||
if (fallback_icon != NULL)
|
||||
*iconp = fallback_icon;
|
||||
if (fallback_mini_icon != NULL)
|
||||
*mini_iconp = fallback_mini_icon;
|
||||
|
||||
replace_cache (icon_cache, USING_FALLBACK_ICON,
|
||||
*iconp, *mini_iconp);
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@
|
||||
#ifndef META_ICON_CACHE_H
|
||||
#define META_ICON_CACHE_H
|
||||
|
||||
#include "screen.h"
|
||||
#include "screen-private.h"
|
||||
|
||||
typedef struct _MetaIconCache MetaIconCache;
|
||||
|
@@ -23,13 +23,16 @@
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#define _SVID_SOURCE /* for putenv() */
|
||||
|
||||
#include <config.h>
|
||||
#include "keybindings.h"
|
||||
#include "workspace.h"
|
||||
#include "errors.h"
|
||||
#include "edge-resistance.h"
|
||||
#include "ui.h"
|
||||
#include "frame.h"
|
||||
#include "frame-private.h"
|
||||
#include "place.h"
|
||||
#include "prefs.h"
|
||||
#include "effects.h"
|
||||
@@ -1580,7 +1583,7 @@ find_handler (const MetaKeyHandler *handlers,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
static gboolean
|
||||
process_event (MetaKeyBinding *bindings,
|
||||
int n_bindings,
|
||||
const MetaKeyHandler *handlers,
|
||||
@@ -1594,13 +1597,13 @@ process_event (MetaKeyBinding *bindings,
|
||||
|
||||
/* we used to have release-based bindings but no longer. */
|
||||
if (event->type == KeyRelease)
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
i = 0;
|
||||
while (i < n_bindings)
|
||||
{
|
||||
if (bindings[i].keycode == event->xkey.keycode &&
|
||||
((event->xkey.state & ~(display->ignored_modifier_mask)) ==
|
||||
((event->xkey.state & 0xff & ~(display->ignored_modifier_mask)) ==
|
||||
bindings[i].mask) &&
|
||||
event->type == KeyPress)
|
||||
{
|
||||
@@ -1634,7 +1637,7 @@ process_event (MetaKeyBinding *bindings,
|
||||
|
||||
(* handler->func) (display, screen, window, event,
|
||||
&bindings[i]);
|
||||
return;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
++i;
|
||||
@@ -1642,6 +1645,7 @@ process_event (MetaKeyBinding *bindings,
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"No handler found for this event in this binding table\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Handle a key event. May be called recursively: some key events cause
|
||||
@@ -1662,16 +1666,17 @@ meta_display_process_key_event (MetaDisplay *display,
|
||||
{
|
||||
KeySym keysym;
|
||||
gboolean handled;
|
||||
gboolean keep_grab;
|
||||
gboolean all_keys_grabbed;
|
||||
const char *str;
|
||||
MetaScreen *screen;
|
||||
|
||||
|
||||
XAllowEvents (display->xdisplay,
|
||||
all_bindings_disabled ? ReplayKeyboard : AsyncKeyboard,
|
||||
event->xkey.time);
|
||||
if (all_bindings_disabled)
|
||||
return;
|
||||
|
||||
|
||||
/* if key event was on root window, we have a shortcut */
|
||||
screen = meta_display_screen_for_root (display, event->xkey.window);
|
||||
|
||||
@@ -1700,115 +1705,102 @@ meta_display_process_key_event (MetaDisplay *display,
|
||||
str ? str : "none", event->xkey.state,
|
||||
window ? window->desc : "(no window)");
|
||||
|
||||
keep_grab = TRUE;
|
||||
all_keys_grabbed = window ? window->all_keys_grabbed : screen->all_keys_grabbed;
|
||||
if (!all_keys_grabbed)
|
||||
if (all_keys_grabbed)
|
||||
{
|
||||
/* Do the normal keybindings */
|
||||
process_event (display->screen_bindings,
|
||||
display->n_screen_bindings,
|
||||
screen_handlers,
|
||||
display, screen, NULL, event, keysym);
|
||||
|
||||
if (window)
|
||||
process_event (display->window_bindings,
|
||||
display->n_window_bindings,
|
||||
window_handlers,
|
||||
display, screen, window, event, keysym);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (display->grab_op == META_GRAB_OP_NONE)
|
||||
return;
|
||||
|
||||
/* If we get here we have a global grab, because
|
||||
* we're in some special keyboard mode such as window move
|
||||
* mode.
|
||||
*/
|
||||
|
||||
handled = FALSE;
|
||||
|
||||
if (window ? (window == display->grab_window) :
|
||||
(screen == display->grab_screen))
|
||||
{
|
||||
switch (display->grab_op)
|
||||
if (display->grab_op == META_GRAB_OP_NONE)
|
||||
return;
|
||||
/* If we get here we have a global grab, because
|
||||
* we're in some special keyboard mode such as window move
|
||||
* mode.
|
||||
*/
|
||||
if (window ? (window == display->grab_window) :
|
||||
(screen == display->grab_screen))
|
||||
{
|
||||
case META_GRAB_OP_MOVING:
|
||||
case META_GRAB_OP_RESIZING_SE:
|
||||
case META_GRAB_OP_RESIZING_S:
|
||||
case META_GRAB_OP_RESIZING_SW:
|
||||
case META_GRAB_OP_RESIZING_N:
|
||||
case META_GRAB_OP_RESIZING_NE:
|
||||
case META_GRAB_OP_RESIZING_NW:
|
||||
case META_GRAB_OP_RESIZING_W:
|
||||
case META_GRAB_OP_RESIZING_E:
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Processing event for mouse-only move/resize\n");
|
||||
g_assert (window != NULL);
|
||||
handled = process_mouse_move_resize_grab (display, screen,
|
||||
window, event, keysym);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_KEYBOARD_MOVING:
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Processing event for keyboard move\n");
|
||||
g_assert (window != NULL);
|
||||
handled = process_keyboard_move_grab (display, screen,
|
||||
window, event, keysym);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN:
|
||||
case META_GRAB_OP_KEYBOARD_RESIZING_S:
|
||||
case META_GRAB_OP_KEYBOARD_RESIZING_N:
|
||||
case META_GRAB_OP_KEYBOARD_RESIZING_W:
|
||||
case META_GRAB_OP_KEYBOARD_RESIZING_E:
|
||||
case META_GRAB_OP_KEYBOARD_RESIZING_SE:
|
||||
case META_GRAB_OP_KEYBOARD_RESIZING_NE:
|
||||
case META_GRAB_OP_KEYBOARD_RESIZING_SW:
|
||||
case META_GRAB_OP_KEYBOARD_RESIZING_NW:
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Processing event for keyboard resize\n");
|
||||
g_assert (window != NULL);
|
||||
handled = process_keyboard_resize_grab (display, screen,
|
||||
window, event, keysym);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_KEYBOARD_TABBING_NORMAL:
|
||||
case META_GRAB_OP_KEYBOARD_TABBING_DOCK:
|
||||
case META_GRAB_OP_KEYBOARD_TABBING_GROUP:
|
||||
case META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL:
|
||||
case META_GRAB_OP_KEYBOARD_ESCAPING_DOCK:
|
||||
case META_GRAB_OP_KEYBOARD_ESCAPING_GROUP:
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Processing event for keyboard tabbing/cycling\n");
|
||||
handled = process_tab_grab (display, screen, event, keysym);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING:
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Processing event for keyboard workspace switching\n");
|
||||
handled = process_workspace_switch_grab (display, screen, event, keysym);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
switch (display->grab_op)
|
||||
{
|
||||
case META_GRAB_OP_MOVING:
|
||||
case META_GRAB_OP_RESIZING_SE:
|
||||
case META_GRAB_OP_RESIZING_S:
|
||||
case META_GRAB_OP_RESIZING_SW:
|
||||
case META_GRAB_OP_RESIZING_N:
|
||||
case META_GRAB_OP_RESIZING_NE:
|
||||
case META_GRAB_OP_RESIZING_NW:
|
||||
case META_GRAB_OP_RESIZING_W:
|
||||
case META_GRAB_OP_RESIZING_E:
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Processing event for mouse-only move/resize\n");
|
||||
g_assert (window != NULL);
|
||||
keep_grab = process_mouse_move_resize_grab (display, screen,
|
||||
window, event, keysym);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_KEYBOARD_MOVING:
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Processing event for keyboard move\n");
|
||||
g_assert (window != NULL);
|
||||
keep_grab = process_keyboard_move_grab (display, screen,
|
||||
window, event, keysym);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN:
|
||||
case META_GRAB_OP_KEYBOARD_RESIZING_S:
|
||||
case META_GRAB_OP_KEYBOARD_RESIZING_N:
|
||||
case META_GRAB_OP_KEYBOARD_RESIZING_W:
|
||||
case META_GRAB_OP_KEYBOARD_RESIZING_E:
|
||||
case META_GRAB_OP_KEYBOARD_RESIZING_SE:
|
||||
case META_GRAB_OP_KEYBOARD_RESIZING_NE:
|
||||
case META_GRAB_OP_KEYBOARD_RESIZING_SW:
|
||||
case META_GRAB_OP_KEYBOARD_RESIZING_NW:
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Processing event for keyboard resize\n");
|
||||
g_assert (window != NULL);
|
||||
keep_grab = process_keyboard_resize_grab (display, screen,
|
||||
window, event, keysym);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_KEYBOARD_TABBING_NORMAL:
|
||||
case META_GRAB_OP_KEYBOARD_TABBING_DOCK:
|
||||
case META_GRAB_OP_KEYBOARD_TABBING_GROUP:
|
||||
case META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL:
|
||||
case META_GRAB_OP_KEYBOARD_ESCAPING_DOCK:
|
||||
case META_GRAB_OP_KEYBOARD_ESCAPING_GROUP:
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Processing event for keyboard tabbing/cycling\n");
|
||||
keep_grab = process_tab_grab (display, screen, event, keysym);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING:
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Processing event for keyboard workspace switching\n");
|
||||
keep_grab = process_workspace_switch_grab (display, screen, event, keysym);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* end grab if a key that isn't used gets pressed */
|
||||
if (!handled)
|
||||
{
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Ending grab op %u on key event sym %s\n",
|
||||
display->grab_op, XKeysymToString (keysym));
|
||||
meta_display_end_grab_op (display, event->xkey.time);
|
||||
|
||||
g_assert (display->grab_op == META_GRAB_OP_NONE);
|
||||
|
||||
/* and go round again: #112560 */
|
||||
meta_display_process_key_event (display, window, event);
|
||||
|
||||
}
|
||||
if (!keep_grab)
|
||||
{
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Ending grab op %u on key event sym %s\n",
|
||||
display->grab_op, XKeysymToString (keysym));
|
||||
meta_display_end_grab_op (display, event->xkey.time);
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* Do the normal keybindings */
|
||||
handled = process_event (display->screen_bindings,
|
||||
display->n_screen_bindings,
|
||||
screen_handlers,
|
||||
display, screen, NULL, event, keysym);
|
||||
|
||||
if (!all_keys_grabbed && !handled && window)
|
||||
handled = process_event (display->window_bindings,
|
||||
display->n_window_bindings,
|
||||
window_handlers,
|
||||
display, screen, window, event, keysym);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -1845,13 +1837,10 @@ process_mouse_move_resize_grab (MetaDisplay *display,
|
||||
else
|
||||
display->grab_was_cancelled = TRUE;
|
||||
|
||||
/* End grab, since this was an "unhandled" keypress */
|
||||
/* End grab */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* The keypress really isn't handled but we just want to ignore it, so
|
||||
* treat it as handled.
|
||||
*/
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -2560,6 +2549,13 @@ process_tab_grab (MetaDisplay *display,
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* !! TO HERE !!
|
||||
* alt-f6 during alt-{Tab,Escape} does not end the grab
|
||||
* but does change the grab op (and redraws the window,
|
||||
* of course).
|
||||
* See _{SWITCH,CYCLE}_GROUP.@@@
|
||||
*/
|
||||
|
||||
popup_not_showing = FALSE;
|
||||
key_used = FALSE;
|
||||
@@ -3197,10 +3193,10 @@ handle_panel_keybinding (MetaDisplay *display,
|
||||
switch (action)
|
||||
{
|
||||
case META_KEYBINDING_ACTION_PANEL_MAIN_MENU:
|
||||
action_atom = display->atom_gnome_panel_action_main_menu;
|
||||
action_atom = display->atom__GNOME_PANEL_ACTION_MAIN_MENU;
|
||||
break;
|
||||
case META_KEYBINDING_ACTION_PANEL_RUN_DIALOG:
|
||||
action_atom = display->atom_gnome_panel_action_run_dialog;
|
||||
action_atom = display->atom__GNOME_PANEL_ACTION_RUN_DIALOG;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
@@ -3208,7 +3204,7 @@ handle_panel_keybinding (MetaDisplay *display,
|
||||
|
||||
ev.type = ClientMessage;
|
||||
ev.window = screen->xroot;
|
||||
ev.message_type = display->atom_gnome_panel_action;
|
||||
ev.message_type = display->atom__GNOME_PANEL_ACTION;
|
||||
ev.format = 32;
|
||||
ev.data.l[0] = action_atom;
|
||||
ev.data.l[1] = event->xkey.time;
|
@@ -24,7 +24,7 @@
|
||||
#ifndef META_KEYBINDINGS_H
|
||||
#define META_KEYBINDINGS_H
|
||||
|
||||
#include "display.h"
|
||||
#include "display-private.h"
|
||||
#include "window.h"
|
||||
|
||||
void meta_display_init_keys (MetaDisplay *display);
|
@@ -22,10 +22,31 @@
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file core/main.c Program startup
|
||||
*
|
||||
* Functions which parse the command-line arguments, create the display,
|
||||
* kick everything off and then close down Metacity when it's time to go.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \mainpage Metacity - a boring window manager for the adult in you
|
||||
*
|
||||
* Many window managers are like Marshmallow Froot Loops; Metacity
|
||||
* is like Cheerios.
|
||||
*
|
||||
* The best way to get a handle on how the whole system fits together
|
||||
* is discussed in doc/code-overview.txt; if you're looking for functions
|
||||
* to investigate, read main(), meta_display_open(), and event_callback().
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#define _SVID_SOURCE /* for putenv() and some signal-related functions */
|
||||
|
||||
#include <config.h>
|
||||
#include "main.h"
|
||||
#include "util.h"
|
||||
#include "display.h"
|
||||
#include "display-private.h"
|
||||
#include "errors.h"
|
||||
#include "ui.h"
|
||||
#include "session.h"
|
||||
@@ -44,13 +65,36 @@
|
||||
#include <locale.h>
|
||||
#include <time.h>
|
||||
|
||||
/**
|
||||
* The exit code we'll return to our parent process when we eventually die.
|
||||
*/
|
||||
static MetaExitCode meta_exit_code = META_EXIT_SUCCESS;
|
||||
|
||||
/**
|
||||
* Handle on the main loop, so that we have an easy way of shutting Metacity
|
||||
* down.
|
||||
*/
|
||||
static GMainLoop *meta_main_loop = NULL;
|
||||
|
||||
/**
|
||||
* If set, Metacity will spawn an identical copy of itself immediately
|
||||
* before quitting.
|
||||
*/
|
||||
static gboolean meta_restart_after_quit = FALSE;
|
||||
|
||||
static void prefs_changed_callback (MetaPreference pref,
|
||||
gpointer data);
|
||||
|
||||
/**
|
||||
* Prints log messages. If Metacity was compiled with backtrace support,
|
||||
* also prints a backtrace (see meta_print_backtrace()).
|
||||
*
|
||||
* \param log_domain the domain the error occurred in (we ignore this)
|
||||
* \param log_level the log level so that we can filter out less
|
||||
* important messages
|
||||
* \param message the message to log
|
||||
* \param user_data arbitrary data (we ignore this)
|
||||
*/
|
||||
static void
|
||||
log_handler (const gchar *log_domain,
|
||||
GLogLevelFlags log_level,
|
||||
@@ -61,17 +105,27 @@ log_handler (const gchar *log_domain,
|
||||
meta_print_backtrace ();
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints the version notice. This is shown when Metacity is called
|
||||
* with the --version switch.
|
||||
*/
|
||||
static void
|
||||
version (void)
|
||||
{
|
||||
g_print (_("metacity %s\n"
|
||||
"Copyright (C) 2001-2007 Havoc Pennington, Red Hat, Inc., and others\n"
|
||||
"Copyright (C) 2001-2008 Havoc Pennington, Red Hat, Inc., and others\n"
|
||||
"This is free software; see the source for copying conditions.\n"
|
||||
"There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"),
|
||||
VERSION);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a list of which configure script options were used to
|
||||
* build this copy of Metacity. This is actually always called
|
||||
* on startup, but it's all no-op unless we're in verbose mode
|
||||
* (see meta_set_verbose).
|
||||
*/
|
||||
static void
|
||||
meta_print_compilation_info (void)
|
||||
{
|
||||
@@ -117,6 +171,14 @@ meta_print_compilation_info (void)
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints the version number, the current timestamp (not the
|
||||
* build date), the locale, the character encoding, and a list
|
||||
* of configure script options that were used to build this
|
||||
* copy of Metacity. This is actually always called
|
||||
* on startup, but it's all no-op unless we're in verbose mode
|
||||
* (see meta_set_verbose).
|
||||
*/
|
||||
static void
|
||||
meta_print_self_identity (void)
|
||||
{
|
||||
@@ -140,6 +202,11 @@ meta_print_self_identity (void)
|
||||
meta_print_compilation_info ();
|
||||
}
|
||||
|
||||
/**
|
||||
* The set of possible options that can be set on Metacity's
|
||||
* command line. This type exists so that meta_parse_options() can
|
||||
* write to an instance of it.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
gchar *save_file;
|
||||
@@ -152,13 +219,16 @@ typedef struct
|
||||
} MetaArguments;
|
||||
|
||||
/**
|
||||
* meta_parse_options() parses argc and argv and returns the
|
||||
* arguments that Metacity understands in struct
|
||||
* MetaArguments. In meta_args.
|
||||
* Parses argc and argv and returns the
|
||||
* arguments that Metacity understands in meta_args.
|
||||
*
|
||||
* The strange call signature has to be written like it is so
|
||||
* that g_option_context_parse() gets a chance to modify argc and
|
||||
* argv.
|
||||
*
|
||||
* \param argc Pointer to the number of arguments Metacity was given
|
||||
* \param argv Pointer to the array of arguments Metacity was given
|
||||
* \param meta_args The result of parsing the arguments.
|
||||
**/
|
||||
static void
|
||||
meta_parse_options (int *argc, char ***argv,
|
||||
@@ -225,8 +295,7 @@ meta_parse_options (int *argc, char ***argv,
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_select_display() is a helper function that selects
|
||||
* which display Metacity should use. It first tries to use
|
||||
* Selects which display Metacity should use. It first tries to use
|
||||
* display_name as the display. If display_name is NULL then
|
||||
* try to use the environment variable METACITY_DISPLAY. If that
|
||||
* also is NULL, use the default - :0.0
|
||||
@@ -244,12 +313,28 @@ void meta_select_display (gchar *display_name)
|
||||
putenv (envVar);
|
||||
}
|
||||
|
||||
/**
|
||||
* This is where the story begins. It parses commandline options and
|
||||
* environment variables, sets up the screen, hands control off to
|
||||
* GTK, and cleans up afterwards.
|
||||
*
|
||||
* \param argc Number of arguments (as usual)
|
||||
* \param argv Array of arguments (as usual)
|
||||
*
|
||||
* \bug It's a bit long. It would be good to split it out into separate
|
||||
* functions.
|
||||
*/
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
struct sigaction act;
|
||||
sigset_t empty_mask;
|
||||
MetaArguments meta_args;
|
||||
const gchar *log_domains[] = {
|
||||
NULL, G_LOG_DOMAIN, "Gtk", "Gdk", "GLib",
|
||||
"Pango", "GLib-GObject", "GThread"
|
||||
};
|
||||
guint i;
|
||||
|
||||
if (setlocale (LC_ALL, "") == NULL)
|
||||
meta_warning ("Locale not understood by C library, internationalization will not work\n");
|
||||
@@ -312,30 +397,12 @@ main (int argc, char **argv)
|
||||
|
||||
|
||||
#if 1
|
||||
g_log_set_handler (NULL,
|
||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
|
||||
log_handler, NULL);
|
||||
g_log_set_handler (G_LOG_DOMAIN,
|
||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
|
||||
log_handler, NULL);
|
||||
g_log_set_handler ("Gtk",
|
||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
|
||||
log_handler, NULL);
|
||||
g_log_set_handler ("Gdk",
|
||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
|
||||
log_handler, NULL);
|
||||
g_log_set_handler ("GLib",
|
||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
|
||||
log_handler, NULL);
|
||||
g_log_set_handler ("Pango",
|
||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
|
||||
log_handler, NULL);
|
||||
g_log_set_handler ("GLib-GObject",
|
||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
|
||||
log_handler, NULL);
|
||||
g_log_set_handler ("GThread",
|
||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
|
||||
log_handler, NULL);
|
||||
|
||||
for (i=0; i<G_N_ELEMENTS(log_domains); i++)
|
||||
g_log_set_handler (log_domains[i],
|
||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
|
||||
log_handler, NULL);
|
||||
|
||||
#endif
|
||||
|
||||
if (g_getenv ("METACITY_G_FATAL_WARNINGS") != NULL)
|
||||
@@ -402,36 +469,17 @@ main (int argc, char **argv)
|
||||
/* Free memory possibly allocated by the argument parsing which are
|
||||
* no longer needed.
|
||||
*/
|
||||
if (meta_args.save_file)
|
||||
g_free (meta_args.save_file);
|
||||
if (meta_args.display_name)
|
||||
g_free (meta_args.display_name);
|
||||
if (meta_args.client_id)
|
||||
g_free (meta_args.client_id);
|
||||
g_free (meta_args.save_file);
|
||||
g_free (meta_args.display_name);
|
||||
g_free (meta_args.client_id);
|
||||
|
||||
if (!meta_display_open ())
|
||||
meta_exit (META_EXIT_ERROR);
|
||||
|
||||
g_main_loop_run (meta_main_loop);
|
||||
|
||||
{
|
||||
GSList *displays;
|
||||
GSList *tmp;
|
||||
|
||||
/* we need a copy since closing the display removes it
|
||||
* from the list
|
||||
*/
|
||||
displays = g_slist_copy (meta_displays_list ());
|
||||
tmp = displays;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
guint32 timestamp;
|
||||
timestamp = CurrentTime; /* I doubt correct timestamps matter here */
|
||||
meta_display_close (tmp->data, timestamp);
|
||||
tmp = tmp->next;
|
||||
}
|
||||
g_slist_free (displays);
|
||||
}
|
||||
meta_display_close (meta_get_display (),
|
||||
CurrentTime); /* I doubt correct timestamps matter here */
|
||||
|
||||
meta_session_shutdown ();
|
||||
|
||||
@@ -459,12 +507,15 @@ main (int argc, char **argv)
|
||||
return meta_exit_code;
|
||||
}
|
||||
|
||||
GMainLoop*
|
||||
meta_get_main_loop (void)
|
||||
{
|
||||
return meta_main_loop;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops Metacity. This tells the event loop to stop processing; it is rather
|
||||
* dangerous to use this rather than meta_restart() because this will leave
|
||||
* the user with no window manager. We generally do this only if, for example,
|
||||
* the session manager asks us to; we assume the session manager knows what
|
||||
* it's talking about.
|
||||
*
|
||||
* \param code The success or failure code to return to the calling process.
|
||||
*/
|
||||
void
|
||||
meta_quit (MetaExitCode code)
|
||||
{
|
||||
@@ -474,6 +525,12 @@ meta_quit (MetaExitCode code)
|
||||
g_main_loop_quit (meta_main_loop);
|
||||
}
|
||||
|
||||
/**
|
||||
* Restarts Metacity. In practice, this tells the event loop to stop
|
||||
* processing, having first set the meta_restart_after_quit flag which
|
||||
* tells Metacity to spawn an identical copy of itself before quitting.
|
||||
* This happens on receipt of a _METACITY_RESTART_MESSAGE client event.
|
||||
*/
|
||||
void
|
||||
meta_restart (void)
|
||||
{
|
||||
@@ -481,6 +538,15 @@ meta_restart (void)
|
||||
meta_quit (META_EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called on pref changes. (One of several functions of its kind and purpose.)
|
||||
*
|
||||
* \bug Why are these particular prefs handled in main.c and not others?
|
||||
* Should they be?
|
||||
*
|
||||
* \param pref Which preference has changed
|
||||
* \param data Arbitrary data (which we ignore)
|
||||
*/
|
||||
static void
|
||||
prefs_changed_callback (MetaPreference pref,
|
||||
gpointer data)
|
@@ -86,7 +86,7 @@ northwestcmp (gconstpointer a, gconstpointer b)
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
find_next_cascade (MetaWindow *window,
|
||||
MetaFrameGeometry *fgeom,
|
||||
@@ -871,6 +871,12 @@ meta_window_place (MetaWindow *window,
|
||||
}
|
||||
}
|
||||
|
||||
/* If no placement has been done, revert to cascade to avoid
|
||||
* fully overlapping window (e.g. starting multiple terminals)
|
||||
* */
|
||||
if (x == xi->rect.x && y == xi->rect.y)
|
||||
find_next_cascade (window, fgeom, windows, x, y, &x, &y);
|
||||
|
||||
done_check_denied_focus:
|
||||
/* If the window is being denied focus and isn't a transient of the
|
||||
* focus window, we do NOT want it to overlap with the focus window
|
@@ -24,8 +24,8 @@
|
||||
#ifndef META_PLACE_H
|
||||
#define META_PLACE_H
|
||||
|
||||
#include "window.h"
|
||||
#include "frame.h"
|
||||
#include "window-private.h"
|
||||
#include "frame-private.h"
|
||||
|
||||
void meta_window_place (MetaWindow *window,
|
||||
MetaFrameGeometry *fgeom,
|
File diff suppressed because it is too large
Load Diff
@@ -23,10 +23,11 @@
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_SCREEN_H
|
||||
#define META_SCREEN_H
|
||||
#ifndef META_SCREEN_PRIVATE_H
|
||||
#define META_SCREEN_PRIVATE_H
|
||||
|
||||
#include "display.h"
|
||||
#include "display-private.h"
|
||||
#include "screen.h"
|
||||
#include <X11/Xutil.h>
|
||||
#include "ui.h"
|
||||
|
||||
@@ -102,7 +103,11 @@ struct _MetaScreen
|
||||
GSList *startup_sequences;
|
||||
guint startup_sequence_timeout;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
Window wm_cm_selection_window;
|
||||
#endif
|
||||
|
||||
guint work_area_idle;
|
||||
|
||||
int rows_of_workspaces;
|
||||
@@ -128,7 +133,6 @@ MetaScreen* meta_screen_new (MetaDisplay *displ
|
||||
void meta_screen_free (MetaScreen *screen,
|
||||
guint32 timestamp);
|
||||
void meta_screen_manage_all_windows (MetaScreen *screen);
|
||||
MetaScreen* meta_screen_for_x_screen (Screen *xscreen);
|
||||
void meta_screen_foreach_window (MetaScreen *screen,
|
||||
MetaScreenWindowFunc func,
|
||||
gpointer data);
|
@@ -27,11 +27,11 @@
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "screen.h"
|
||||
#include "screen-private.h"
|
||||
#include "util.h"
|
||||
#include "errors.h"
|
||||
#include "window.h"
|
||||
#include "frame.h"
|
||||
#include "window-private.h"
|
||||
#include "frame-private.h"
|
||||
#include "prefs.h"
|
||||
#include "workspace.h"
|
||||
#include "keybindings.h"
|
||||
@@ -79,7 +79,7 @@ set_wm_check_hint (MetaScreen *screen)
|
||||
data[0] = screen->display->leader_window;
|
||||
|
||||
XChangeProperty (screen->display->xdisplay, screen->xroot,
|
||||
screen->display->atom_net_supporting_wm_check,
|
||||
screen->display->atom__NET_SUPPORTING_WM_CHECK,
|
||||
XA_WINDOW,
|
||||
32, PropModeReplace, (guchar*) data, 1);
|
||||
|
||||
@@ -89,81 +89,21 @@ set_wm_check_hint (MetaScreen *screen)
|
||||
static int
|
||||
set_supported_hint (MetaScreen *screen)
|
||||
{
|
||||
#define N_SUPPORTED 62
|
||||
Atom atoms[N_SUPPORTED];
|
||||
|
||||
atoms[0] = screen->display->atom_net_wm_name;
|
||||
atoms[1] = screen->display->atom_net_close_window;
|
||||
atoms[2] = screen->display->atom_net_wm_state;
|
||||
atoms[3] = screen->display->atom_net_wm_state_shaded;
|
||||
atoms[4] = screen->display->atom_net_wm_state_maximized_vert;
|
||||
atoms[5] = screen->display->atom_net_wm_state_maximized_horz;
|
||||
atoms[6] = screen->display->atom_net_wm_desktop;
|
||||
atoms[7] = screen->display->atom_net_number_of_desktops;
|
||||
atoms[8] = screen->display->atom_net_current_desktop;
|
||||
atoms[9] = screen->display->atom_net_wm_window_type;
|
||||
atoms[10] = screen->display->atom_net_wm_window_type_desktop;
|
||||
atoms[11] = screen->display->atom_net_wm_window_type_dock;
|
||||
atoms[12] = screen->display->atom_net_wm_window_type_toolbar;
|
||||
atoms[13] = screen->display->atom_net_wm_window_type_menu;
|
||||
atoms[14] = screen->display->atom_net_wm_window_type_dialog;
|
||||
atoms[15] = screen->display->atom_net_wm_window_type_normal;
|
||||
atoms[16] = screen->display->atom_net_wm_state_modal;
|
||||
atoms[17] = screen->display->atom_net_client_list;
|
||||
atoms[18] = screen->display->atom_net_client_list_stacking;
|
||||
atoms[19] = screen->display->atom_net_wm_state_skip_taskbar;
|
||||
atoms[20] = screen->display->atom_net_wm_state_skip_pager;
|
||||
atoms[21] = screen->display->atom_net_wm_icon_name;
|
||||
atoms[22] = screen->display->atom_net_wm_icon;
|
||||
atoms[23] = screen->display->atom_net_wm_icon_geometry;
|
||||
atoms[24] = screen->display->atom_net_wm_moveresize;
|
||||
atoms[25] = screen->display->atom_net_active_window;
|
||||
atoms[26] = screen->display->atom_net_wm_strut;
|
||||
atoms[27] = screen->display->atom_net_wm_state_hidden;
|
||||
atoms[28] = screen->display->atom_net_wm_window_type_utility;
|
||||
atoms[29] = screen->display->atom_net_wm_window_type_splash;
|
||||
atoms[30] = screen->display->atom_net_wm_state_fullscreen;
|
||||
atoms[31] = screen->display->atom_net_wm_ping;
|
||||
atoms[32] = screen->display->atom_net_wm_pid;
|
||||
atoms[33] = screen->display->atom_net_workarea;
|
||||
atoms[34] = screen->display->atom_net_showing_desktop;
|
||||
atoms[35] = screen->display->atom_net_desktop_layout;
|
||||
atoms[36] = screen->display->atom_net_desktop_names;
|
||||
atoms[37] = screen->display->atom_net_wm_allowed_actions;
|
||||
atoms[38] = screen->display->atom_net_wm_action_move;
|
||||
atoms[39] = screen->display->atom_net_wm_action_resize;
|
||||
atoms[40] = screen->display->atom_net_wm_action_shade;
|
||||
atoms[41] = screen->display->atom_net_wm_action_stick;
|
||||
atoms[42] = screen->display->atom_net_wm_action_maximize_horz;
|
||||
atoms[43] = screen->display->atom_net_wm_action_maximize_vert;
|
||||
atoms[44] = screen->display->atom_net_wm_action_change_desktop;
|
||||
atoms[45] = screen->display->atom_net_wm_action_close;
|
||||
atoms[46] = screen->display->atom_net_wm_state_above;
|
||||
atoms[47] = screen->display->atom_net_wm_state_below;
|
||||
atoms[48] = screen->display->atom_net_startup_id;
|
||||
atoms[49] = screen->display->atom_net_wm_strut_partial;
|
||||
atoms[50] = screen->display->atom_net_wm_action_fullscreen;
|
||||
atoms[51] = screen->display->atom_net_wm_action_minimize;
|
||||
atoms[52] = screen->display->atom_net_frame_extents;
|
||||
atoms[53] = screen->display->atom_net_request_frame_extents;
|
||||
atoms[54] = screen->display->atom_net_wm_user_time;
|
||||
atoms[55] = screen->display->atom_net_wm_state_demands_attention;
|
||||
atoms[56] = screen->display->atom_net_desktop_geometry;
|
||||
atoms[57] = screen->display->atom_net_desktop_viewport;
|
||||
atoms[58] = screen->display->atom_net_wm_user_time_window;
|
||||
atoms[59] = screen->display->atom_net_moveresize_window;
|
||||
atoms[60] = screen->display->atom_net_wm_action_above;
|
||||
atoms[61] = screen->display->atom_net_wm_action_below;
|
||||
Atom atoms[] = {
|
||||
#define EWMH_ATOMS_ONLY
|
||||
#define item(x) screen->display->atom_##x,
|
||||
#include "atomnames.h"
|
||||
#undef item
|
||||
#undef EWMH_ATOMS_ONLY
|
||||
};
|
||||
|
||||
/* atoms[58] = screen->display->atom_net_restack_window; */
|
||||
|
||||
XChangeProperty (screen->display->xdisplay, screen->xroot,
|
||||
screen->display->atom_net_supported,
|
||||
screen->display->atom__NET_SUPPORTED,
|
||||
XA_ATOM,
|
||||
32, PropModeReplace, (guchar*) atoms, N_SUPPORTED);
|
||||
32, PropModeReplace,
|
||||
(guchar*) atoms, G_N_ELEMENTS(atoms));
|
||||
|
||||
return Success;
|
||||
#undef N_SUPPORTED
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -181,7 +121,7 @@ set_wm_icon_size_hint (MetaScreen *screen)
|
||||
vals[5] = 0;
|
||||
|
||||
XChangeProperty (screen->display->xdisplay, screen->xroot,
|
||||
screen->display->atom_wm_icon_size,
|
||||
screen->display->atom_WM_ICON_SIZE,
|
||||
XA_CARDINAL,
|
||||
32, PropModeReplace, (guchar*) vals, N_VALS);
|
||||
|
||||
@@ -464,7 +404,7 @@ meta_screen_new (MetaDisplay *display,
|
||||
|
||||
ev.type = ClientMessage;
|
||||
ev.window = xroot;
|
||||
ev.message_type = display->atom_manager;
|
||||
ev.message_type = display->atom_MANAGER;
|
||||
ev.format = 32;
|
||||
ev.data.l[0] = manager_timestamp;
|
||||
ev.data.l[1] = wm_sn_atom;
|
||||
@@ -535,7 +475,12 @@ meta_screen_new (MetaDisplay *display,
|
||||
screen->wm_sn_selection_window = new_wm_sn_owner;
|
||||
screen->wm_sn_atom = wm_sn_atom;
|
||||
screen->wm_sn_timestamp = manager_timestamp;
|
||||
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
screen->wm_cm_selection_window = meta_create_offscreen_window (xdisplay,
|
||||
xroot,
|
||||
NoEventMask);
|
||||
#endif
|
||||
screen->work_area_idle = 0;
|
||||
|
||||
screen->active_workspace = NULL;
|
||||
@@ -607,7 +552,7 @@ meta_screen_new (MetaDisplay *display,
|
||||
current_workspace = 0;
|
||||
if (meta_prop_get_cardinal (screen->display,
|
||||
screen->xroot,
|
||||
screen->display->atom_net_current_desktop,
|
||||
screen->display->atom__NET_CURRENT_DESKTOP,
|
||||
¤t_workspace))
|
||||
meta_verbose ("Read existing _NET_CURRENT_DESKTOP = %d\n",
|
||||
(int) current_workspace);
|
||||
@@ -807,9 +752,23 @@ meta_screen_manage_all_windows (MetaScreen *screen)
|
||||
for (list = windows; list != NULL; list = list->next)
|
||||
{
|
||||
WindowInfo *info = list->data;
|
||||
MetaWindow *window;
|
||||
|
||||
meta_window_new_with_attrs (screen->display, info->xwindow, TRUE,
|
||||
&info->attrs);
|
||||
window = meta_window_new_with_attrs (screen->display, info->xwindow, TRUE,
|
||||
&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 ||
|
||||
#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);
|
||||
|
||||
@@ -822,9 +781,12 @@ meta_screen_manage_all_windows (MetaScreen *screen)
|
||||
void
|
||||
meta_screen_composite_all_windows (MetaScreen *screen)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
MetaDisplay *display;
|
||||
GList *windows, *list;
|
||||
|
||||
if (!screen->display->compositor)
|
||||
display = screen->display;
|
||||
if (!display->compositor)
|
||||
return;
|
||||
|
||||
windows = list_windows (screen);
|
||||
@@ -835,7 +797,17 @@ meta_screen_composite_all_windows (MetaScreen *screen)
|
||||
{
|
||||
WindowInfo *info = list->data;
|
||||
|
||||
meta_compositor_add_window (screen->display->compositor,
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -843,6 +815,7 @@ meta_screen_composite_all_windows (MetaScreen *screen)
|
||||
|
||||
g_list_foreach (windows, (GFunc)g_free, NULL);
|
||||
g_list_free (windows);
|
||||
#endif
|
||||
}
|
||||
|
||||
MetaScreen*
|
||||
@@ -1047,7 +1020,7 @@ set_number_of_spaces_hint (MetaScreen *screen,
|
||||
|
||||
meta_error_trap_push (screen->display);
|
||||
XChangeProperty (screen->display->xdisplay, screen->xroot,
|
||||
screen->display->atom_net_number_of_desktops,
|
||||
screen->display->atom__NET_NUMBER_OF_DESKTOPS,
|
||||
XA_CARDINAL,
|
||||
32, PropModeReplace, (guchar*) data, 1);
|
||||
meta_error_trap_pop (screen->display, FALSE);
|
||||
@@ -1068,7 +1041,7 @@ set_desktop_geometry_hint (MetaScreen *screen)
|
||||
|
||||
meta_error_trap_push (screen->display);
|
||||
XChangeProperty (screen->display->xdisplay, screen->xroot,
|
||||
screen->display->atom_net_desktop_geometry,
|
||||
screen->display->atom__NET_DESKTOP_GEOMETRY,
|
||||
XA_CARDINAL,
|
||||
32, PropModeReplace, (guchar*) data, 2);
|
||||
meta_error_trap_pop (screen->display, FALSE);
|
||||
@@ -1092,7 +1065,7 @@ set_desktop_viewport_hint (MetaScreen *screen)
|
||||
|
||||
meta_error_trap_push (screen->display);
|
||||
XChangeProperty (screen->display->xdisplay, screen->xroot,
|
||||
screen->display->atom_net_desktop_viewport,
|
||||
screen->display->atom__NET_DESKTOP_VIEWPORT,
|
||||
XA_CARDINAL,
|
||||
32, PropModeReplace, (guchar*) data, 2);
|
||||
meta_error_trap_pop (screen->display, FALSE);
|
||||
@@ -1215,6 +1188,49 @@ meta_screen_update_cursor (MetaScreen *screen)
|
||||
XFreeCursor (screen->display->xdisplay, xcursor);
|
||||
}
|
||||
|
||||
#define MAX_PREVIEW_SIZE 150.0
|
||||
|
||||
static GdkPixbuf *
|
||||
get_window_pixbuf (MetaWindow *window,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
Pixmap pmap;
|
||||
GdkPixbuf *pixbuf, *scaled;
|
||||
double ratio;
|
||||
|
||||
pmap = meta_compositor_get_window_pixmap (window->display->compositor,
|
||||
window);
|
||||
if (pmap == None)
|
||||
return NULL;
|
||||
|
||||
pixbuf = meta_ui_get_pixbuf_from_pixmap (pmap);
|
||||
if (pixbuf == NULL)
|
||||
return NULL;
|
||||
|
||||
*width = gdk_pixbuf_get_width (pixbuf);
|
||||
*height = gdk_pixbuf_get_height (pixbuf);
|
||||
|
||||
/* Scale pixbuf to max dimension MAX_PREVIEW_SIZE */
|
||||
if (*width > *height)
|
||||
{
|
||||
ratio = ((double) *width) / MAX_PREVIEW_SIZE;
|
||||
*width = (int) MAX_PREVIEW_SIZE;
|
||||
*height = (int) (((double) *height) / ratio);
|
||||
}
|
||||
else
|
||||
{
|
||||
ratio = ((double) *height) / MAX_PREVIEW_SIZE;
|
||||
*height = (int) MAX_PREVIEW_SIZE;
|
||||
*width = (int) (((double) *width) / ratio);
|
||||
}
|
||||
|
||||
scaled = gdk_pixbuf_scale_simple (pixbuf, *width, *height,
|
||||
GDK_INTERP_BILINEAR);
|
||||
g_object_unref (pixbuf);
|
||||
return scaled;
|
||||
}
|
||||
|
||||
void
|
||||
meta_screen_ensure_tab_popup (MetaScreen *screen,
|
||||
MetaTabList list_type,
|
||||
@@ -1247,12 +1263,41 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
|
||||
{
|
||||
MetaWindow *window;
|
||||
MetaRectangle r;
|
||||
|
||||
GdkPixbuf *win_pixbuf;
|
||||
int width, height;
|
||||
|
||||
window = tmp->data;
|
||||
|
||||
entries[i].key = (MetaTabEntryKey) window->xwindow;
|
||||
entries[i].title = window->title;
|
||||
entries[i].icon = window->icon;
|
||||
|
||||
win_pixbuf = get_window_pixbuf (window, &width, &height);
|
||||
if (win_pixbuf == NULL)
|
||||
entries[i].icon = g_object_ref (window->icon);
|
||||
else
|
||||
{
|
||||
int icon_width, icon_height, t_width, t_height;
|
||||
#define ICON_OFFSET 6
|
||||
|
||||
icon_width = gdk_pixbuf_get_width (window->icon);
|
||||
icon_height = gdk_pixbuf_get_height (window->icon);
|
||||
|
||||
t_width = width + ICON_OFFSET;
|
||||
t_height = height + ICON_OFFSET;
|
||||
|
||||
entries[i].icon = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8,
|
||||
t_width, t_height);
|
||||
gdk_pixbuf_fill (entries[i].icon, 0x00000000);
|
||||
gdk_pixbuf_copy_area (win_pixbuf, 0, 0, width, height,
|
||||
entries[i].icon, 0, 0);
|
||||
g_object_unref (win_pixbuf);
|
||||
gdk_pixbuf_composite (window->icon, entries[i].icon,
|
||||
t_width - icon_width, t_height - icon_height,
|
||||
icon_width, icon_height,
|
||||
t_width - icon_width, t_height - icon_height,
|
||||
1.0, 1.0, GDK_INTERP_BILINEAR, 255);
|
||||
}
|
||||
|
||||
entries[i].blank = FALSE;
|
||||
entries[i].hidden = !meta_window_showing_on_its_workspace (window);
|
||||
entries[i].demands_attention = window->wm_state_demands_attention;
|
||||
@@ -1312,6 +1357,10 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
|
||||
len,
|
||||
5, /* FIXME */
|
||||
TRUE);
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
g_object_unref (entries[i].icon);
|
||||
|
||||
g_free (entries);
|
||||
|
||||
g_list_free (tab_list);
|
||||
@@ -1661,7 +1710,7 @@ meta_screen_update_workspace_layout (MetaScreen *screen)
|
||||
|
||||
if (meta_prop_get_cardinal_list (screen->display,
|
||||
screen->xroot,
|
||||
screen->display->atom_net_desktop_layout,
|
||||
screen->display->atom__NET_DESKTOP_LAYOUT,
|
||||
&list, &n_items))
|
||||
{
|
||||
if (n_items == 3 || n_items == 4)
|
||||
@@ -1774,8 +1823,8 @@ set_workspace_names (MetaScreen *screen)
|
||||
meta_error_trap_push (screen->display);
|
||||
XChangeProperty (screen->display->xdisplay,
|
||||
screen->xroot,
|
||||
screen->display->atom_net_desktop_names,
|
||||
screen->display->atom_utf8_string,
|
||||
screen->display->atom__NET_DESKTOP_NAMES,
|
||||
screen->display->atom_UTF8_STRING,
|
||||
8, PropModeReplace,
|
||||
(unsigned char *)flattened->str, flattened->len);
|
||||
meta_error_trap_pop (screen->display, FALSE);
|
||||
@@ -1798,7 +1847,7 @@ meta_screen_update_workspace_names (MetaScreen *screen)
|
||||
n_names = 0;
|
||||
if (!meta_prop_get_utf8_list (screen->display,
|
||||
screen->xroot,
|
||||
screen->display->atom_net_desktop_names,
|
||||
screen->display->atom__NET_DESKTOP_NAMES,
|
||||
&names, &n_names))
|
||||
{
|
||||
meta_verbose ("Failed to get workspace names from root window %d\n",
|
||||
@@ -1878,7 +1927,7 @@ set_work_area_hint (MetaScreen *screen)
|
||||
|
||||
meta_error_trap_push (screen->display);
|
||||
XChangeProperty (screen->display->xdisplay, screen->xroot,
|
||||
screen->display->atom_net_workarea,
|
||||
screen->display->atom__NET_WORKAREA,
|
||||
XA_CARDINAL, 32, PropModeReplace,
|
||||
(guchar*) data, num_workspaces*4);
|
||||
g_free (data);
|
||||
@@ -2146,7 +2195,7 @@ meta_screen_calc_workspace_layout (MetaScreen *screen,
|
||||
|
||||
if (i != grid_area)
|
||||
meta_bug ("did not fill in the whole workspace grid in %s (%d filled)\n",
|
||||
G_GNUC_FUNCTION, i);
|
||||
G_STRFUNC, i);
|
||||
|
||||
current_row = 0;
|
||||
current_col = 0;
|
||||
@@ -2248,7 +2297,7 @@ meta_screen_update_showing_desktop_hint (MetaScreen *screen)
|
||||
|
||||
meta_error_trap_push (screen->display);
|
||||
XChangeProperty (screen->display->xdisplay, screen->xroot,
|
||||
screen->display->atom_net_showing_desktop,
|
||||
screen->display->atom__NET_SHOWING_DESKTOP,
|
||||
XA_CARDINAL,
|
||||
32, PropModeReplace, (guchar*) data, 1);
|
||||
meta_error_trap_pop (screen->display, FALSE);
|
||||
@@ -2686,3 +2735,68 @@ meta_screen_apply_startup_properties (MetaScreen *screen,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int
|
||||
meta_screen_get_screen_number (MetaScreen *screen)
|
||||
{
|
||||
return screen->number;
|
||||
}
|
||||
|
||||
MetaDisplay *
|
||||
meta_screen_get_display (MetaScreen *screen)
|
||||
{
|
||||
return screen->display;
|
||||
}
|
||||
|
||||
Window
|
||||
meta_screen_get_xroot (MetaScreen *screen)
|
||||
{
|
||||
return screen->xroot;
|
||||
}
|
||||
|
||||
void
|
||||
meta_screen_get_size (MetaScreen *screen,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
*width = screen->rect.width;
|
||||
*height = screen->rect.height;
|
||||
}
|
||||
|
||||
gpointer
|
||||
meta_screen_get_compositor_data (MetaScreen *screen)
|
||||
{
|
||||
return screen->compositor_data;
|
||||
}
|
||||
|
||||
void
|
||||
meta_screen_set_compositor_data (MetaScreen *screen,
|
||||
gpointer compositor)
|
||||
{
|
||||
screen->compositor_data = compositor;
|
||||
}
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
void
|
||||
meta_screen_set_cm_selection (MetaScreen *screen)
|
||||
{
|
||||
char selection[32];
|
||||
Atom a;
|
||||
|
||||
g_snprintf (selection, sizeof(selection), "_NET_WM_CM_S%d", screen->number);
|
||||
meta_verbose ("Setting selection: %s\n", selection);
|
||||
a = XInternAtom (screen->display->xdisplay, selection, FALSE);
|
||||
XSetSelectionOwner (screen->display->xdisplay, a,
|
||||
screen->wm_cm_selection_window, CurrentTime);
|
||||
}
|
||||
|
||||
void
|
||||
meta_screen_unset_cm_selection (MetaScreen *screen)
|
||||
{
|
||||
char selection[32];
|
||||
Atom a;
|
||||
|
||||
g_snprintf (selection, sizeof(selection), "_NET_WM_CM_S%d", screen->number);
|
||||
a = XInternAtom (screen->display->xdisplay, selection, FALSE);
|
||||
XSetSelectionOwner (screen->display->xdisplay, a, None, CurrentTime);
|
||||
}
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
@@ -70,7 +70,7 @@ meta_window_release_saved_state (const MetaWindowSessionInfo *info)
|
||||
#include <stdio.h>
|
||||
#include "main.h"
|
||||
#include "util.h"
|
||||
#include "display.h"
|
||||
#include "display-private.h"
|
||||
#include "workspace.h"
|
||||
|
||||
static void ice_io_error_handler (IceConn connection);
|
||||
@@ -807,17 +807,28 @@ save_state (void)
|
||||
char *metacity_dir;
|
||||
char *session_dir;
|
||||
FILE *outfile;
|
||||
GSList *displays;
|
||||
GSList *display_iter;
|
||||
GSList *windows;
|
||||
GSList *tmp;
|
||||
int stack_position;
|
||||
|
||||
g_assert (client_id);
|
||||
|
||||
outfile = NULL;
|
||||
|
||||
metacity_dir = g_strconcat (g_get_home_dir (), "/.metacity",
|
||||
/*
|
||||
* g_get_user_config_dir() is guaranteed to return an existing directory.
|
||||
* Eventually, if SM stays with the WM, I'd like to make this
|
||||
* something like <config>/window_placement in a standard format.
|
||||
* Future optimisers should note also that by the time we get here
|
||||
* we probably already have full_save_path figured out and therefore
|
||||
* can just use the directory name from that.
|
||||
*/
|
||||
metacity_dir = g_strconcat (g_get_user_config_dir (),
|
||||
G_DIR_SEPARATOR_S "metacity",
|
||||
NULL);
|
||||
|
||||
session_dir = g_strconcat (metacity_dir, "/sessions",
|
||||
session_dir = g_strconcat (metacity_dir,
|
||||
G_DIR_SEPARATOR_S "sessions",
|
||||
NULL);
|
||||
|
||||
if (mkdir (metacity_dir, 0700) < 0 &&
|
||||
@@ -863,127 +874,116 @@ save_state (void)
|
||||
|
||||
fprintf (outfile, "<metacity_session id=\"%s\">\n",
|
||||
client_id);
|
||||
|
||||
displays = meta_displays_list ();
|
||||
display_iter = displays;
|
||||
while (display_iter != NULL)
|
||||
|
||||
windows = meta_display_list_windows (meta_get_display ());
|
||||
stack_position = 0;
|
||||
|
||||
windows = g_slist_sort (windows, meta_display_stack_cmp);
|
||||
tmp = windows;
|
||||
stack_position = 0;
|
||||
|
||||
while (tmp != NULL)
|
||||
{
|
||||
GSList *windows;
|
||||
GSList *tmp;
|
||||
int stack_position;
|
||||
|
||||
windows = meta_display_list_windows (display_iter->data);
|
||||
windows = g_slist_sort (windows, meta_display_stack_cmp);
|
||||
MetaWindow *window;
|
||||
|
||||
stack_position = 0;
|
||||
tmp = windows;
|
||||
while (tmp != NULL)
|
||||
window = tmp->data;
|
||||
|
||||
if (window->sm_client_id)
|
||||
{
|
||||
MetaWindow *window;
|
||||
char *sm_client_id;
|
||||
char *res_class;
|
||||
char *res_name;
|
||||
char *role;
|
||||
char *title;
|
||||
|
||||
window = tmp->data;
|
||||
|
||||
if (window->sm_client_id)
|
||||
{
|
||||
char *sm_client_id;
|
||||
char *res_class;
|
||||
char *res_name;
|
||||
char *role;
|
||||
char *title;
|
||||
|
||||
/* client id, class, name, role are not expected to be
|
||||
* in UTF-8 (I think they are in XPCS which is Latin-1?
|
||||
* in practice they are always ascii though.)
|
||||
*/
|
||||
/* client id, class, name, role are not expected to be
|
||||
* in UTF-8 (I think they are in XPCS which is Latin-1?
|
||||
* in practice they are always ascii though.)
|
||||
*/
|
||||
|
||||
sm_client_id = encode_text_as_utf8_markup (window->sm_client_id);
|
||||
res_class = window->res_class ?
|
||||
encode_text_as_utf8_markup (window->res_class) : NULL;
|
||||
res_name = window->res_name ?
|
||||
encode_text_as_utf8_markup (window->res_name) : NULL;
|
||||
role = window->role ?
|
||||
encode_text_as_utf8_markup (window->role) : NULL;
|
||||
if (window->title)
|
||||
title = g_markup_escape_text (window->title, -1);
|
||||
else
|
||||
title = NULL;
|
||||
|
||||
meta_topic (META_DEBUG_SM, "Saving session managed window %s, client ID '%s'\n",
|
||||
window->desc, window->sm_client_id);
|
||||
|
||||
fprintf (outfile,
|
||||
" <window id=\"%s\" class=\"%s\" name=\"%s\" title=\"%s\" role=\"%s\" type=\"%s\" stacking=\"%d\">\n",
|
||||
sm_client_id,
|
||||
res_class ? res_class : "",
|
||||
res_name ? res_name : "",
|
||||
title ? title : "",
|
||||
role ? role : "",
|
||||
window_type_to_string (window->type),
|
||||
stack_position);
|
||||
|
||||
g_free (sm_client_id);
|
||||
g_free (res_class);
|
||||
g_free (res_name);
|
||||
g_free (role);
|
||||
g_free (title);
|
||||
|
||||
/* Sticky */
|
||||
if (window->on_all_workspaces)
|
||||
fputs (" <sticky/>\n", outfile);
|
||||
|
||||
/* Minimized */
|
||||
if (window->minimized)
|
||||
fputs (" <minimized/>\n", outfile);
|
||||
|
||||
/* Maximized */
|
||||
if (META_WINDOW_MAXIMIZED (window))
|
||||
{
|
||||
fprintf (outfile,
|
||||
" <maximized saved_x=\"%d\" saved_y=\"%d\" saved_width=\"%d\" saved_height=\"%d\"/>\n",
|
||||
window->saved_rect.x,
|
||||
window->saved_rect.y,
|
||||
window->saved_rect.width,
|
||||
window->saved_rect.height);
|
||||
}
|
||||
|
||||
/* Workspaces we're on */
|
||||
{
|
||||
int n;
|
||||
n = meta_workspace_index (window->workspace);
|
||||
fprintf (outfile,
|
||||
" <workspace index=\"%d\"/>\n", n);
|
||||
}
|
||||
|
||||
/* Gravity */
|
||||
{
|
||||
int x, y, w, h;
|
||||
meta_window_get_geometry (window, &x, &y, &w, &h);
|
||||
|
||||
fprintf (outfile,
|
||||
" <geometry x=\"%d\" y=\"%d\" width=\"%d\" height=\"%d\" gravity=\"%s\"/>\n",
|
||||
x, y, w, h,
|
||||
meta_gravity_to_string (window->size_hints.win_gravity));
|
||||
}
|
||||
|
||||
fputs (" </window>\n", outfile);
|
||||
}
|
||||
sm_client_id = encode_text_as_utf8_markup (window->sm_client_id);
|
||||
res_class = window->res_class ?
|
||||
encode_text_as_utf8_markup (window->res_class) : NULL;
|
||||
res_name = window->res_name ?
|
||||
encode_text_as_utf8_markup (window->res_name) : NULL;
|
||||
role = window->role ?
|
||||
encode_text_as_utf8_markup (window->role) : NULL;
|
||||
if (window->title)
|
||||
title = g_markup_escape_text (window->title, -1);
|
||||
else
|
||||
{
|
||||
meta_topic (META_DEBUG_SM, "Not saving window '%s', not session managed\n",
|
||||
window->desc);
|
||||
}
|
||||
|
||||
tmp = tmp->next;
|
||||
++stack_position;
|
||||
}
|
||||
|
||||
g_slist_free (windows);
|
||||
title = NULL;
|
||||
|
||||
meta_topic (META_DEBUG_SM, "Saving session managed window %s, client ID '%s'\n",
|
||||
window->desc, window->sm_client_id);
|
||||
|
||||
display_iter = display_iter->next;
|
||||
fprintf (outfile,
|
||||
" <window id=\"%s\" class=\"%s\" name=\"%s\" title=\"%s\" role=\"%s\" type=\"%s\" stacking=\"%d\">\n",
|
||||
sm_client_id,
|
||||
res_class ? res_class : "",
|
||||
res_name ? res_name : "",
|
||||
title ? title : "",
|
||||
role ? role : "",
|
||||
window_type_to_string (window->type),
|
||||
stack_position);
|
||||
|
||||
g_free (sm_client_id);
|
||||
g_free (res_class);
|
||||
g_free (res_name);
|
||||
g_free (role);
|
||||
g_free (title);
|
||||
|
||||
/* Sticky */
|
||||
if (window->on_all_workspaces)
|
||||
fputs (" <sticky/>\n", outfile);
|
||||
|
||||
/* Minimized */
|
||||
if (window->minimized)
|
||||
fputs (" <minimized/>\n", outfile);
|
||||
|
||||
/* Maximized */
|
||||
if (META_WINDOW_MAXIMIZED (window))
|
||||
{
|
||||
fprintf (outfile,
|
||||
" <maximized saved_x=\"%d\" saved_y=\"%d\" saved_width=\"%d\" saved_height=\"%d\"/>\n",
|
||||
window->saved_rect.x,
|
||||
window->saved_rect.y,
|
||||
window->saved_rect.width,
|
||||
window->saved_rect.height);
|
||||
}
|
||||
|
||||
/* Workspaces we're on */
|
||||
{
|
||||
int n;
|
||||
n = meta_workspace_index (window->workspace);
|
||||
fprintf (outfile,
|
||||
" <workspace index=\"%d\"/>\n", n);
|
||||
}
|
||||
|
||||
/* Gravity */
|
||||
{
|
||||
int x, y, w, h;
|
||||
meta_window_get_geometry (window, &x, &y, &w, &h);
|
||||
|
||||
fprintf (outfile,
|
||||
" <geometry x=\"%d\" y=\"%d\" width=\"%d\" height=\"%d\" gravity=\"%s\"/>\n",
|
||||
x, y, w, h,
|
||||
meta_gravity_to_string (window->size_hints.win_gravity));
|
||||
}
|
||||
|
||||
fputs (" </window>\n", outfile);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_topic (META_DEBUG_SM, "Not saving window '%s', not session managed\n",
|
||||
window->desc);
|
||||
}
|
||||
|
||||
tmp = tmp->next;
|
||||
++stack_position;
|
||||
}
|
||||
/* don't need to free displays */
|
||||
displays = NULL;
|
||||
|
||||
|
||||
g_slist_free (windows);
|
||||
|
||||
fputs ("</metacity_session>\n", outfile);
|
||||
|
||||
out:
|
||||
@@ -1061,8 +1061,9 @@ load_state (const char *previous_save_file)
|
||||
gsize length;
|
||||
char *session_file;
|
||||
|
||||
session_file = g_strconcat (g_get_home_dir (),
|
||||
"/.metacity/sessions/",
|
||||
session_file = g_strconcat (g_get_user_config_dir (),
|
||||
G_DIR_SEPARATOR_S "metacity"
|
||||
G_DIR_SEPARATOR_S "sessions" G_DIR_SEPARATOR_S,
|
||||
previous_save_file,
|
||||
NULL);
|
||||
|
||||
@@ -1072,11 +1073,32 @@ load_state (const char *previous_save_file)
|
||||
&length,
|
||||
&error))
|
||||
{
|
||||
meta_warning (_("Failed to read saved session file %s: %s\n"),
|
||||
session_file, error->message);
|
||||
g_error_free (error);
|
||||
g_free (session_file);
|
||||
return NULL;
|
||||
char *canonical_session_file = session_file;
|
||||
|
||||
/* Maybe they were doing it the old way, with ~/.metacity */
|
||||
session_file = g_strconcat (g_get_home_dir (),
|
||||
G_DIR_SEPARATOR_S ".metacity"
|
||||
G_DIR_SEPARATOR_S "sessions"
|
||||
G_DIR_SEPARATOR_S,
|
||||
previous_save_file,
|
||||
NULL);
|
||||
|
||||
if (!g_file_get_contents (session_file,
|
||||
&text,
|
||||
&length,
|
||||
NULL))
|
||||
{
|
||||
/* oh, just give up */
|
||||
|
||||
meta_warning (_("Failed to read saved session file %s: %s\n"),
|
||||
canonical_session_file, error->message);
|
||||
g_error_free (error);
|
||||
g_free (session_file);
|
||||
g_free (canonical_session_file);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
g_free (canonical_session_file);
|
||||
}
|
||||
|
||||
meta_topic (META_DEBUG_SM, "Parsing saved session file %s\n", session_file);
|
||||
@@ -1678,8 +1700,9 @@ regenerate_save_file (void)
|
||||
g_free (full_save_path);
|
||||
|
||||
if (client_id)
|
||||
full_save_path = g_strconcat (g_get_home_dir (),
|
||||
"/.metacity/sessions/",
|
||||
full_save_path = g_strconcat (g_get_user_config_dir (),
|
||||
G_DIR_SEPARATOR_S "metacity"
|
||||
G_DIR_SEPARATOR_S "sessions" G_DIR_SEPARATOR_S,
|
||||
client_id,
|
||||
".ms",
|
||||
NULL);
|
||||
@@ -1760,9 +1783,8 @@ io_from_warning_dialog (GIOChannel *channel,
|
||||
static void
|
||||
warn_about_lame_clients_and_finish_interact (gboolean shutdown)
|
||||
{
|
||||
GSList *displays;
|
||||
GSList *display_iter;
|
||||
GSList *lame;
|
||||
GSList *windows;
|
||||
char **argv;
|
||||
int i;
|
||||
GSList *tmp;
|
||||
@@ -1776,34 +1798,26 @@ warn_about_lame_clients_and_finish_interact (gboolean shutdown)
|
||||
char timestampbuf[32];
|
||||
|
||||
lame = NULL;
|
||||
displays = meta_displays_list ();
|
||||
display_iter = displays;
|
||||
while (display_iter != NULL)
|
||||
windows = meta_display_list_windows (meta_get_display ());
|
||||
tmp = windows;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
GSList *windows;
|
||||
|
||||
windows = meta_display_list_windows (display_iter->data);
|
||||
tmp = windows;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
MetaWindow *window;
|
||||
|
||||
window = tmp->data;
|
||||
|
||||
/* only complain about normal windows, the others
|
||||
* are kind of dumb to worry about
|
||||
*/
|
||||
if (window->sm_client_id == NULL &&
|
||||
window->type == META_WINDOW_NORMAL)
|
||||
lame = g_slist_prepend (lame, window);
|
||||
MetaWindow *window;
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
g_slist_free (windows);
|
||||
window = tmp->data;
|
||||
|
||||
display_iter = display_iter->next;
|
||||
/* only complain about normal windows, the others
|
||||
* are kind of dumb to worry about
|
||||
*/
|
||||
if (window->sm_client_id == NULL &&
|
||||
window->type == META_WINDOW_NORMAL)
|
||||
lame = g_slist_prepend (lame, window);
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
g_slist_free (windows);
|
||||
|
||||
if (lame == NULL)
|
||||
{
|
||||
/* No lame apps. */
|
||||
@@ -1813,12 +1827,9 @@ warn_about_lame_clients_and_finish_interact (gboolean shutdown)
|
||||
|
||||
lame = g_slist_sort (lame, (GCompareFunc) windows_cmp_by_title);
|
||||
|
||||
timestamp = meta_display_get_current_time_roundtrip (displays->data);
|
||||
timestamp = meta_display_get_current_time_roundtrip (meta_get_display ());
|
||||
sprintf (timestampbuf, "%u", timestamp);
|
||||
|
||||
/* don't need to free displays */
|
||||
displays = NULL;
|
||||
|
||||
len = g_slist_length (lame);
|
||||
len *= 2; /* titles and also classes */
|
||||
len += 2; /* --timestamp flag and actual timestamp */
|
@@ -24,7 +24,7 @@
|
||||
#ifndef META_SESSION_H
|
||||
#define META_SESSION_H
|
||||
|
||||
#include "window.h"
|
||||
#include "window-private.h"
|
||||
|
||||
typedef struct _MetaWindowSessionInfo MetaWindowSessionInfo;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user