1
0
Fork 0
Commit graph

25 commits

Author SHA1 Message Date
Dan Winship
3a1e492afc Refer to monitors as "monitors" rather than "xineramas"
http://bugzilla.gnome.org/show_bug.cgi?id=593686
2009-08-31 14:39:48 -04:00
Volker Sobek
a69ce37546 Unminimize windows passed to meta_workspace_activate_with_focus()
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
2009-08-28 12:10:41 -04:00
Owen W. Taylor
6726fcd25d Simplify relationship between mapping and visibility
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
2009-07-06 00:16:23 +01:00
Milan Bouchet-Valat
2c17ef4803 Emit signals when workspaces are added, removed or switched
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.
2009-07-04 10:57:52 +02:00
Owen W. Taylor
3aff9726eb Remove MetaCompositor virtualization
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
2009-06-30 09:34:45 -04:00
Jon Nettleton
0b8a57bcba There can be only one compositor engine
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
2009-06-30 09:34:03 -04:00
Owen W. Taylor
00d955eb40 meta_display_list_windows: Exclude override-redirect
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
2009-06-29 22:51:32 -04:00
Jon Nettleton
51a6467968 Comprehensively rename to Mutter
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.
2009-06-16 14:17:10 -04:00
Owen W. Taylor
c4a4de0056 Fix return transfer annotations for a number of functions and add docs
Add return transfer annotations (and while I was at it, docs), for
public functions that return MetaDisplay, MetaWindow, and MetaScreen.

http://bugzilla.gnome.org/show_bug.cgi?id=561297

http://bugzilla.gnome.org/show_bug.cgi?id=580027
2009-04-24 09:54:17 -04:00
Owen W. Taylor
28a4be2536 Add meta_workspace_set_builtin_struts()
Add a function to set a list of "built-in" struts for a workspace;
these are struts that are combined with the struts of the windows in
the workspace when determining the work area of the workspace.

http://bugzilla.gnome.org/show_bug.cgi?id=561297

http://bugzilla.gnome.org/show_bug.cgi?id=580026
2009-04-24 09:54:17 -04:00
Dan Winship
6e9803cd9f Add ::window-added and ::window-removed signals to MetaWorkspace
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
2009-04-24 09:54:17 -04:00
Tomas Frydrych
31f48c0cf0 Removed unnecessary g_object_ref/unref() bracketing around g_object_notify(). 2009-03-17 12:28:00 +00:00
Tomas Frydrych
4203fd2993 Added MetaWorkspace::n-windows property (read-only). 2009-03-17 08:54:19 +00:00
Tomas Frydrych
95fa3a3879 Ensure that when a workspace is removed from the middle of the list, the
_NET_WM_DESKTOP props on windows on following workspaces are correctly set.
2009-01-09 15:04:53 +00:00
Owen W. Taylor
98ccfea388 Make MetaScreen and MetaWorkspace GObjects
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
2008-11-17 15:56:34 -05:00
Tomas Frydrych
07c1003905 Live previews for hidden windows.
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-10-24 10:07:24 +01:00
Tomas Frydrych
6b1719de1c Added direction parameter to plugin switch_workspace()
To facilitate nicer effects; extended direction defined in workspace.h so we
can represent up-left, etc.
2008-10-09 17:57:12 +01:00
Tomas Frydrych
9b3a0d1ad8 Basic plugin infastructure and a sample simple plugin. 2008-09-18 16:09:11 +01:00
Thomas Thurman
8bd3cdff14 When a workspace's list of struts is freed, free the struts too. Closes
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-09-01 03:10:31 +00:00
Eric Piel
233237f098 add a copy of each strut in a window to the workspace's strut list,
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-08-18 02:48:36 +00:00
Elijah Newren
dacf784498 Don't attempt to double-free struts, edges and regions if work areas have
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-07-13 22:16:23 +00:00
Thomas Thurman
b455ac62d2 All information should live in exactly one place. This means that the list
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-05-02 18:49:01 +00:00
Matthew Wilson
9836007f5e allow moving workspace while moving window with modifier remove the
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
2008-03-11 03:37:54 +00:00
Paolo Borelli
b9e1a9159e do not leak list.
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-21 19:56:07 +00:00
Havoc Pennington
72b08c82b1 sort source files into these directories according to which part of the WM
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
2007-12-19 21:17:50 +00:00
Renamed from src/workspace.c (Browse further)