When we are moving a window with a modal dialog to a different
workspace, meta_workspace_focus_default_window() can be called
with 'not_this_one' being the focused modal dialog.
Since the ancestor of that window is also being moved, we must
not focus it as an alternative to the current window; this will
cause windows to be moved back and Metacity to get into an
inconsistent confused state.
https://bugzilla.redhat.com/show_bug.cgi?id=237158https://bugzilla.gnome.org/show_bug.cgi?id=598995
Add a configure switch:
--with-libcanberra=[yes/no/auto]
(defaulting to auto); if libcanberra is not found or explicitly
disabled, then the default system bell will be used for the bell
sound and no switch workspace sound is played.
https://bugzilla.gnome.org/show_bug.cgi?id=609585
These sounds are good candidates for caching in the sound server, to
save a bit of CPU and make reaction faster. Hence, tell libcanberra to
cache them.
https://bugzilla.gnome.org/show_bug.cgi?id=609585
meta_workspace_set_builtin_struts() is slightly expensive; it involves
discarding all our cached computed information about the layout of the
workspace. So catch calls to set_builtin_struts() that don't change
anything.
https://bugzilla.gnome.org/show_bug.cgi?id=609546
Since meta_workspace_invalidate_work_area() frees the edges
workspace->screen_edges and workspace->monitor_edges, we must clean up
our cached edge resistance data when the invalidate_work_area() is
called on the active workspace, or when the workspace changes.
Make the computation of the edge resistance data lazy so that it
will be recomputed the next time we try to access it.
meta_display_compute_resistance_and_snapping_edges() is made
private to edge-resistance.c
Invaliding the data when active workspace changes also will improve
correctness for edge resistance when the current workspace changes
during a grab operation. (Even with this fix we still don't try to
handle window positions changing during a grab operation; that can't
cause a crash since, unlike screen and monitor edges, the window edges
are freshly allocated, it will just cause slight oddness in that
corner case.)
Root cause tracked down due to much effort by Jon Nettleton.
https://bugzilla.gnome.org/show_bug.cgi?id=608800
Unminimize minimized windows passed to meta_workspace_activate_with_focus()
by calling meta_window_activate() on them instead of meta_window_focus()
and meta_window_raise(). This fix makes sense because for the existing
usage inside Mutter meta_workspace_activate_with_focus() is never called
on a minimized window and for calls from outside Mutter there is no
point in focusing a minimized window without unminimizing it first.
Add a doc comment to meta_workspace_activate_with_focus().
http://bugzilla.gnome.org/show_bug.cgi?id=592393
Previously, changes to the visibility of a window could be indicated
by meta_compositor_map_window(), meta_compositor_unminimize_window(),
meta_compositor_set_window_hidden(), etc, with the exact behavior
depending on the 'live_hidden_windows' preference.
Simplify this so that visibility is controlled by:
meta_compositor_show_window()
meta_compositor_hide_window()
With an 'effect' parameter provided to indicate the appropriate
effect (CREATE/UNMINIMIZE/MINIMIZE/DESTROY/NONE.)
The map state of the window is signalled separately by:
meta_compositor_map_window()
meta_compositor_unmap_window()
And is used only to control resource handling.
Other changes:
* The desired effect on show/hide is explicitly stored in
MetaWindow, avoiding the need for the was_minimized flag.
At idle, once we calculate the window state, we pass the
effect to the compositor if it matches the new window
state, and then clear the effect to start over for future
map state changes.
* meta_compositor_switch_workspace() is called before any windows
are hidden or shown, allowing the compositor to avoid hiding
or showing an effect for windows involved in the switch.
http://bugzilla.gnome.org/show_bug.cgi?id=582341
* Handling of post-effect cleanups for MutterWindow are
simplified - instead of trying to do different things based
on the individual needs of different effects, we just wait until
all effects complete and sync the window state to what it
should be.
* On unmap, once we destroy the pixmap, we tell ClutterX11Pixmap
that we've done so, so it can clean up and unbind. (The
unbinding doesn't seem to be working properly because of
ClutterGLXPixmap or video driver issues.)
http://bugzilla.gnome.org/show_bug.cgi?id=587251
The patch adds GLib marshalling code to Mutter, since it's required for the "workspace-switched" signal.
The definition of MetaMotionDirection enum is moved to common.h since it's now used in workspace.c.
A little cleaning is done in workspace.c:meta_workspace_activate_with_focus(), where compositor-specific code is merged with the rest of the function (required to emit signal), removing #ifdefs.
Now that we only have one compositor, there's no reason to access the
compositor functions through a vtable. Remove the MetaCompositor virtualization
and make the clutter code implement the meta_compositor_* functions
directly.
Move the checks for the compositor being NULL from the vtable wrappers
to the calling code (most of them were already there, so just a few
needed to be added)
Note: the compositor is actually hard-coded on at the moment and the plan
is to remove the non-composited code entirely, so the checks are
added only to keep things neat: they have no practical effect.
http://bugzilla.gnome.org/show_bug.cgi?id=581813
Mutter is a Clutter-based compositing manager. So, remove the code for
the XRender-based compositor, and make it mandatory to have XComposite,
XRender and Clutter.
Run-time support for non-composited operation is left for now.
* src/compositor/mutter/: Move files from this subdirectory into
the main compositor/ directory.
* compositor/compositor-xrender.ccompositor/compositor-xrender.h:
Remove
* include/compositor-clutter.h: Remove this stray file, it had been
replaced with compositor-mutter.h some time back.
http://bugzilla.gnome.org/show_bug.cgi?id=581813
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.
Add sigals to MetaWorkspace to allow tracking when windows are added
and removed. Note that on window creation that these signals are fired
before the window setup is totally complete, so they need to be used
with some care. (For example, the compositor, if present, has not
been notified of the new window.)
http://bugzilla.gnome.org/show_bug.cgi?id=580025
src/core/screen.c src/core/screen-private.h src/include/screen.h:
Make MetaScreen a GObject.
src/core/workspace.c src/core/workspace-private.h src/include/workspace.h:
Make MetaWorkspace a GObject. Rename meta_workspace_free() to
meta_workspace_remove().
http://bugzilla.gnome.org/show_bug.cgi?id=561297
ClutterActors for hidden windows (such windows on different than active
workspaces and windows that are minimized) are available, and reflect the
actual state of the window. This is intended for use in task-switchers etc.
This feature is disabled by default (due to increased demand on resources),
and can be enabled through the metacity/general/live_hidden_windows gconf key.
A trivial sample window switcher is included in the scratch plugin (activated
by clicking on the slide out panel).
2008-09-01 Thomas Thurman <tthurman@gnome.org>
* src/core/workspace.c: When a workspace's list of struts
is freed, free the struts too. Closes#549952, and #468075.
svn path=/trunk/; revision=3840
2008-08-18 Eric Piel <e.a.b.piel@tudelft.nl>
* src/core/workspace.c (ensure_work_areas_validated): add a copy of
each strut in a window to the workspace's strut list, instead of
using the copy in the list (which would mean it was double-freed).
Believed to fix#468075.
svn path=/trunk/; revision=3817
2008-07-13 Elijah Newren <newren gmail com>
* src/core/workspace.c (meta_workspace_free): Don't attempt to
double-free struts, edges and regions if work areas have already
been invalidated at the time of freeing a workspace.
Possible fix to #361804.
svn path=/trunk/; revision=3787
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
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.
svn path=/trunk/; revision=3495
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
svn path=/trunk/; revision=3491