Now that we create MetaWindow objects for override-redirect windows, we need
to check all key press events to see if they are on GTK+ widgets, not just
events that don't match a MetaWindow. This fixes a problem with alt-Tab stealing
grabs away from the window menu.
https://bugzilla.gnome.org/show_bug.cgi?id=633398
While the Meego developers agreed to switching mutter to GTK+-3.0
unconditionally a while ago, Canonical used a GTK+-2.0 build for their
Unity project. As Canonical now announced a switch to compiz as their
window manager, there is no longer a reason to maintain GTK+-2.0
compatibility.
https://bugzilla.gnome.org/show_bug.cgi?id=633133
meta_display_process_key_event() always looks up events based on the
"default" keysym for the keycode, so we should do the same here. This
fixes, eg, the lookup of Shift-Alt-Tab (which would otherwise be
unrecognized because the keysym would be XK_ISO_Left_Tab rather than
XK_Tab).
https://bugzilla.gnome.org/show_bug.cgi?id=632155
Cleanly build with --warn-fatal. Implementation:
* Liberally apply (skip) where the API is clearly C only, e.g. uses
XLib. The theming code and MutterPlugin are skipped too.
* Add missing (transfer) and (element-type) annotations
For a few functions that had a comment, I turned it into gtk-doc, but
I didn't (with a few exceptions) try to write new documentation in
this pass.
If the user just presses a modifier (e.g., shift) during Alt+Tab grab, we need
to keep the grab in place to allow the custom Alt+Tab handler to deal with what
might simply be a change of tabbing direction.
https://bugzilla.gnome.org/show_bug.cgi?id=613126
The changes to enforce single handling of all key events were breaking
custom-alt-tab keypress handlers, since that code was assuming that
key event would get to process_tab_grab(), and then maybe to
process_event() and then to the plugin's xevent_filter to detect a
key release.
We centeralize all of this handling into process_tab_grab() and either
- Invoke a custom handler for the key press
- Select the current window on modifier release by calling a new
pseudo-binding "tab_popup_select"
- Cancel the grab on an unbound key by calling a new pseudo-binding
"tab_popup_cancel"
http://bugzilla.gnome.org/show_bug.cgi?id=590754
Only process each key event once. If all keys are grabbed, then
don't also look for handlers for a key shortcut after processing
the grab op. If all keys are grabbed or we find a key shortcut,
don't pass the event on to the compositing mananger.
http://bugzilla.gnome.org/show_bug.cgi?id=590754
Don't include override-redirect windows in the list return by
meta_display_list_windows(), since we almost never want to handle
them when considering "all window" for the display. Add a separate
meta_display_list_all_windows() that includes override-redirect
windows.
http://bugzilla.gnome.org/show_bug.cgi?id=582639
Code:
All references in the code not related to themes, keybindings, or
GConf were changed from 'metacity' to 'mutter'. This includes, among other
things, strings, comments, the atoms used in the message protocol, and
the envvars used for debugging. The GConf schema file was reduced to
the 3 settings new to mutter.
The overall version was brought up to 2.27 to match current gnome.
Structure:
All files named '*metacity*' were renamed '*mutter*' with appropriate
changes in the automake system. Files removed are
doc/creating_themes, src/themes, doc/metacity-theme.dtd,
metacity.doap. These files will eventually end up in an external
gnome-wm-data module.
Installation location:
On the filesystem the mutter-plugindir was change from
$(libdir)/metacity/plugins/clutter to just $(libdir)/mutter/plugins.
The mutter-plugins.pc.in reflects these changes.
Note:
mutter.desktop.in and mutter-wm.desktop both continue to have
X-GNOME-WMSettingsModule=metacity set. This allows
gnome-control-center to continue using libmetacity.so for
configuration. This is fine since most the general keybindings and wm
settings are being read from /apps/metacity/* in gconf.
Also, use MetaWindows as the tab_popup keys rather than using (X) Windows
and then having to map back and forth everywhere, which is silly since
we never actually want the X Window.
http://bugzilla.gnome.org/show_bug.cgi?id=580917
Rather than trying to reverse-engineer what kind of tab/workspace
popup to create from within meta_display_begin_grab_op(), just create
the popup directly from do_choose_window()/handle_workspace_switch()
after completing the grab, since they already know which kind they
want.
Also add meta_screen_destroy_tab_popup()/_destroy_workspace_popup()
rather than having meta_display_end_grab_op() poke into MetaScreen's
internals itself.
http://bugzilla.gnome.org/show_bug.cgi?id=580917
This patch adds the concept of a special key for WM operations, and
the default is Super_L, which on extended PC hardware is the
"Windows key". What we do is handle the special case of a press
and release of this key (without any other intervening keys).
Super_L+<key> should still be passed to applications. In the future
we may want to also take some of these keybindings (e.g. Super+TAB)
though.
http://bugzilla.gnome.org/show_bug.cgi?id=563047
Add a keybinding (defaulting to <Control><Shift><Alt>r) to record
a screencast of the session. This isn't hooked up to anything in
metacity itself, but a plugin can connect to a signal on MetaScreen.
keybindings.c all-keybindings.h: Add the keybinding
screen.c: Add a ::toggle-recording signal
http://bugzilla.gnome.org/show_bug.cgi?id=575290
When there is custom handler installed for the tab releavant tab function
we do not want to actually call it form inside of this function, only to
ensure that the grab is not released. The handler will get called in the
normal way in process_event(). Whoever installed the handler (and requested
the grab) also has to ensure the grab is released.
The metacity core is now directly aware of override redirect windows.
- They get MetaWindows like normal windows, so mutter no longer need to special
case them. The net wm types applicable to override redirects are also
recognised.
- The original positioning/stacking semantics of metacity with respect to OR
windows are maintained, but now it's easier to synchronize the stacking
between the core and mutter.
- mutter no longer needs to manualy track UnmapNotify, MapNotify,
ReparentNotify, CreateNotify and DestroyNotify events; instead map, unmap,
add and remove events can now be consistently delivered via the
MetaCompositor callbacks.
2008-11-22 Thomas Thurman <tthurman@gnome.org>
* src/core/all-keybindings.h: "backward", not "backwards" throughout.
2008-11-20 Thomas Thurman <tthurman@gnome.org>
* configure.in: turned on -Wall and -Werror in order to
trap as many problems as possible.
* src/ui/resizepopup.c: added correct #include.
* src/ui/theme-viewer.c: initialised variable.
* src/core/xprops.c: corrected cast.
* src/core/main.c: added warning if chdir() fails.
* src/core/schema-bindings.c: checking the return
result of fgets().
2008-11-20 Thomas Thurman <tthurman@gnome.org>
Merged screen and window keybinding tables so that
we can use just one file for the both. Also incidentally
closes#528337. Further efficiencies of scale to come.
* src/include/prefs.h: replace META_PREF_*_KEYBINDINGS
with META_PREF_KEYBINDINGS
* src/core/keybindings.c: replace *_bindings with key_bindings
and similar throughout; all window-based functions are now
guaranteed to receive a window so don't need to check for
themselves
(find_handler): moved so it can also be called from
rebuild_binding_table
* src/core/display-private.h: replace *_bindings with key_bindings
* src/core/prefs.c: update_*_binding becomes update_key_binding;
(change_notify): tidy up references to "enormous if statement"
since it's almost entirely gone now
* src/core/all-keybindings.h: new merged version of
screen-bindings.h and window-bindings.h.
svn path=/trunk/; revision=4022
2008-10-22 Thomas Thurman <tthurman@gnome.org>
Slight transformation of the x-macros used in keybindings
to make them clearer: write handler names out in full
because the old suffix system was confusing to people
skim-reading, and switched the order of the last two
parameters so more would generally fit on a screen.
* src/core/keybindings.c, src/core/schema-bindings.c
src/core/prefs.c: sympathy changes
* src/core/window-bindings.h, src/core/screen-bindings.h:
transformation as above
svn path=/trunk/; revision=3970
2008-10-18 Thomas Thurman <tthurman@gnome.org>
During a discussion with Rodney Dawes about making life easier
for the translators, he pointed out that the short and long
forms of almost all the keybindings say much the same thing
in different words. I believe this is an unconscionable burden
to place on translators, and have therefore merged the short
and long descriptions into the short description. The long
is now a general explanation of the format, plus possibly a
notice about reversibility. Closes#469361, and should solve
the l10n issue previously mentioned.
* src/core/keybindings.c: reflect changes in *-bindings.h
* src/core/schema-bindings.c: reflect changes in *-bindings.h
* src/core/prefs.c: reflect changes in *-bindings.h
* src/core/window-bindings.h: Add flags field, always the same
currently, so that it's the same as screen-bindings.h.
Also, lose ONLY_BOUND_BY_DEFAULT, since we already had a
rather more elegant way to perform the same effect.
And merge the long and short descriptions.
* src/core/screen-bindings.h (, item): Merge the long and
short descriptions.
svn path=/trunk/; revision=3966
2008-10-05 Thomas Thurman <tthurman@gnome.org>
Second half of the switch to using x-macros for keybindings so that
we don't have lots of places with the same information which must
stay in the same order. This time it's screen bindings.
* src/core/screen-bindings.h: New file, containing screen bindings.
* src/core/schema-bindings.c: added ability to output screen bindings.
* src/core/window-bindings.h: tiny tweak to comment
* src/core/keybindings.c: generate function prototypes using s-b.h;
several handlers modified to use ints rather than ints cast into
pointers, or renamed.
* src/include/prefs.h: generate names of bindings using s-b.h;
generate screen_handlers using s-b.h;
arguments to bindings are ints and not ints cast to pointers;
several handler functions renamed to consistent names.
* src/core/prefs.c (meta_prefs_set_num_workspaces, init_bindings):
generate screen_handlers using s-b.h;
generate screen_string_bindings using s-b.h (and add check for
null bindings in init_bindings to enable this simply).
svn path=/trunk/; revision=3941
2008-09-06 Thomas Thurman <tthurman@gnome.org>
An attempt to keep all information about window bindings
in the same place. Screen bindings to come.
* src/core/window-bindings.h: new file, list of all window bindings
* src/include/prefs.h: drop all the existing window-binding macros
* src/core/schema-bindings.c (): output all the schema blocks that
would appear in metacity.schema for these window bindings. This
ought to become part of the build process, and hopefully will soon.
When this works it will also close#469361.
* src/core/keybindings.c: generate handle_* prototypes using
x-macros; populate window_handlers using x-macros; rename several
functions to have consistent names; do_handle_move_to_workspace(),
handle_move_to_workspace_flip(), and handle_move_to_workspace() all
merged into handle_move_to_workspace.
* src/core/prefs.c: generate window_bindings and window_string_bindings
using x-macros; (meta_prefs_set_compositing_manager) fix unrelated
problem with use of GConf functions when GConf was disabled.
* src/core/core.c (meta_core_get_menu_accelerator): binding names
given as literals since this is the only place in the code they
now appear
svn path=/trunk/; revision=3860
2008-09-01 Thomas Thurman <tthurman@gnome.org>
Add new move_to_center keybinding, requested by Khanh-Dang Nguyen
Thu Lam; closes#549979.
* src/include/prefs.h (void): add name of new binding
* src/core/prefs.c: added pref for it
* src/core/keybindings.c (handle_move_to_center): new function
* src/metacity.schemas.in: included new binding
svn path=/trunk/; revision=3839
2008-06-10 Thomas Thurman <tthurman@gnome.org>
* test/tokentest: A preliminary attempt at a test for the
theme expression tokeniser.
svn path=/trunk/; revision=3753
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
svn path=/trunk/; revision=3715
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
svn path=/trunk/; revision=3702
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
svn path=/trunk/; revision=3649