1
0
Fork 0
Commit graph

250 commits

Author SHA1 Message Date
Ray Strode
07c0471902 tiling: Add new "maximized" tile
In addition to the existing side-by-side tiling modes, this commit
adds a new "maximize" tiling mode.  It allows the user to maximize
their windows (in other words, tile with the edge panels) by dragging
their window to the top edge of the monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=630548
2010-12-02 17:11:11 -05:00
Ray Strode
aa3a4a48e4 tiling: add side_by_side suffix to tile code
The meta_window_can_tile function and META_WINDOW_TILED
macro are pretty side-by-side tiling specific, so
rename them.

https://bugzilla.gnome.org/show_bug.cgi?id=630548
2010-12-02 16:35:23 -05:00
Owen W. Taylor
6b16604c26 Export meta_window_appears_focused()
Move meta_window_appears_focused() into the public window.h so
we can use it to change the shadow type.

https://bugzilla.gnome.org/show_bug.cgi?id=592382
2010-11-18 09:47:57 -05:00
Owen W. Taylor
1c3f7c4088 Allow breaking out from maximization during a mouse resize
A maximized window can't be resized from the screen edges (preserves
Fitts law goodness for the application), but it's still possible
to start a resize drag with alt-middle-button. Currently we just
don't let the user resize the window, while showing drag feedback;
it's more useful to let the user "break" out from the resize.

This provides a fast way to get a window partially aligned with
the screen edges - maximize, then alt-drag it out from one edge.

Behavior choices in this patch:

 - You can drag out a window out of maximization in both directions -
   smaller and larger. This can be potentilaly useful in multihead.

 - Dragging a window in only one direction unmaximizes the window
   fully, rather than leaving it in a horizontally/vertically
   maximized state. This is done because the horizontally/vertically
   maximzed states don't have clear visual representation and can
   be confusing to the user.

 - If you drag back to the maximized state after breaking out,
   maximization is restored, but you can't maximize a window by
   dragging to the full size if it didn't start out that way.

A new internal function meta_window_unmaximize_with_gravity() is
added for implementing this; it's a hybrid of
meta_window_unmaximize() and meta_window_resize_with_gravity().

Port of the metacity patch from Owen Taylor in bug 622517.

https://bugzilla.gnome.org/show_bug.cgi?id=629931
2010-09-23 13:32:35 +02:00
Florian Müllner
97e2b4666b Implement side-by-side tiling
When dragging a window over a screen edge and dropping it there,
maximize it vertically and scale it horizontally to cover the
corresponding half of the current monitor.

Whenever a "hot area" which triggers this behavior is entered, an
indication of window's target size is displayed after a short delay
to avoid distraction when moving a window between monitors.

https://bugzilla.gnome.org/show_bug.cgi?id=606260
2010-09-17 16:00:03 +02:00
Maxim Ermilov
66105c6e7e Optionally attach modal dialogs
Add a preference /apps/mutter/general/attach_modal_dialogs. When true, instead
of having independent titlebars, modal dialogs appear attached to the titlebar
of the parent window and are moved together with the parent window.
https://bugzilla.gnome.org/show_bug.cgi?id=612726
2010-09-11 05:36:12 +04:00
Tomas Frydrych
28767c4d34 _MUTTER_HINTS
A per-window _MUTTER_HINTS property allowing plugins to use custom hints. The
property holds a colon separated list of key=value pairs; plugin-specific keys
must be suitably namespaced, while 'mutter-' prefix is reserved for internal
Mutter use only.

This commit adds MetaWindow::mutter-hints property, and
meta_window_get_mutter_hints() accessor, as well as the internal machinery for
reading and updating of the hints.

https://bugzilla.gnome.org/show_bug.cgi?id=613123
2010-05-14 12:20:56 +01:00
Colin Walters
609aae684f Export functions to iterate over window transients
https://bugzilla.gnome.org/show_bug.cgi?id=616050
2010-05-05 17:17:41 -04:00
Colin Walters
49940877d1 Export meta_window_raise and meta_window_lower
For plugins that want fine grained control over window stacking.

https://bugzilla.gnome.org/show_bug.cgi?id=616050
2010-05-05 17:13:08 -04:00
Colin Walters
e9fbe4b2c1 Export the functions to control demands_attention
Plugins can want a finer grained control over this.

https://bugzilla.gnome.org/show_bug.cgi?id=616050
2010-04-24 13:13:54 -04:00
Peter Bloomfield
c6793d477a Prevent window self-maximisation
https://bugzilla.gnome.org/show_bug.cgi?id=461927
2010-02-10 12:48:10 -05:00
Tomas Frydrych
0ccfb0d781 [MetaWindow] added urgent property
Property tracking ICCCM urgency hint

https://bugzilla.gnome.org/show_bug.cgi?id=600068
2009-11-20 08:51:19 +00:00
Colin Walters
9311addca3 Add "window-created" signal to MetaDisplay, "unmanaged" signal for MetaWindow
For some consumers it's significantly more convenient to be able
to directly connect to a signal on the Window to know when
Mutter is done with it, rather than having to connect to each
Workspace object (and handle workspace additions, etc.).

Similarly, add window-created which acts globally.

https://bugzilla.gnome.org/show_bug.cgi?id=598289
2009-10-14 14:39:33 -04:00
Colin Walters
d399141d13 Add meta_window_get_stable_sequence
Useful for plugins which want to order windows in a stable
fashion.

https://bugzilla.gnome.org/show_bug.cgi?id=595882
2009-09-22 12:43:35 -04:00
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
Colin Walters
41cf9134a6 Add meta_window_is_mapped, remove usage of window-private.h from mutter-window.c
mutter-window.c originally grew an #include "window-private.h" for
window->override_redirect, but that was just fixed.  However since
then it also ended up relying on a few other minor private bits.

To fix that, add meta_window_is_mapped, promote meta_window_toplevel_is_mapped
to public, and use the public MetaDisplay accessor.
2009-08-14 19:47:13 -04:00
Tomas Frydrych
2222cb8fbf Added public prototype for meta_window_is_ancestor_of_transient()
http://bugzilla.gnome.org/show_bug.cgi?id=590439
2009-08-04 08:32:36 +01: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
Jon Nettleton
94f64797de Remove wireframe mode and old effects framework
Remove the reduced_resources preference and all all wireframe logic and effects.

http://bugzilla.gnome.org/show_bug.cgi?id=581812
2009-06-30 09:35:12 -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
Davyd Madeley
f26d503694 Move meta_window_delete() to public API 2009-06-19 11:48:33 +08: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
Davyd Madeley
204431812b Move meta_window_{min,max}imize() to public API 2009-06-15 09:42:34 +08:00
Vincent Untz
ea91834407 Remove metacity-dialog and always use zenity
This is a merge of metacity commits 0b3f45bb1b and 3d0bfbb4f4
2009-05-05 15:57:58 +02:00
Sander Dijkhuis
49400c08cd Export window maximize and unmaximize methods
http://bugzilla.gnome.org/show_bug.cgi?id=580434
2009-04-27 15:11:09 +02:00
Owen W. Taylor
8ab9ed5d4e Expose meta_window_get_icon_geometry()
Make meta_window_get_icon_geometry() public, so that it can be used
to from plugins to animate windows minimizing to the correct
position.

Based on a patch from Cosimo Cecchi <cosimoc@gnome.org>

http://bugzilla.gnome.org/show_bug.cgi?id=571109
2009-03-31 17:29:48 -04:00
Tomas Frydrych
0b635aafae Make prototype for meta_window_find_root_ancestor() public. 2009-03-19 16:01:32 +00:00
Tomas Frydrych
54e56a47da Moved meta_window_get_outer_rect() prototype to window.h
Useful for plugins.
2009-03-17 08:35:17 +00:00
Tomas Frydrych
39a3bb2c7d Sync up to upstream 2.25.144
Conflicts:

	configure.in
	src/core/main.c
	src/core/prefs.c
	src/core/window.c
	src/include/prefs.h
2009-02-12 17:14:12 +00:00
Thomas James Alexander Thurman
f5fa4a3866 All the window properties are now handled using simple
window property handlers.  Closes #549886.
	* src/core/window-private.h:
	* src/core/window-props.c:
	* src/core/window.c:


svn path=/trunk/; revision=4090
2009-01-27 05:03:06 +00:00
Dan Winship
f4ecc9bab8 Make compositor private a GObject than a void pointer
Requiring the compositor private object to be a GObject allows the
return value of meta_window_get_compositor_private() to be used
via gobject-introspection, since the type and memory management
can be determined.

This allows a reverse mapping from MetaWindow to MutterWindow.

- Change meta_window_get/set_compositor_private to use GObject
  rather than void *
- Adapt code in compositor-mutter.c to match.
2009-02-02 15:16:05 -05:00
Tomas Frydrych
d1fd844bc4 MetaWindow::raised signal. 2009-02-02 14:08:46 +00:00
Tomas Frydrych
db273ce50c MetaWindow::focus signal. 2009-02-02 11:00:13 +00:00
Tomas Frydrych
a96939be0f MetaWindow::workspace-changed signal.
Emitted when window is moved from one workspace to another; the number of the
  old workspace is passed to the signal handlers.
2009-01-20 12:52:06 +00:00
Tomas Frydrych
25d628aea2 Exposed MetaGroup API. 2009-01-15 15:37:48 +00:00
Thomas James Alexander Thurman
a06d96316e This change adds support for the new _NET_WM_FULLSCREEN_MONITORS
property and client message.  This allows client applications to request
 	that a fullscreen window cover more than one monitor.
 	* src/include/boxes.h:
	* src/core/boxes.c: Add meta_rectangle_union
 	* src/core/window-private.h:
	* src/core/window.c:
 	(meta_window_new_with_attrs, meta_window_free, set_net_wm_state,
 	meta_window_update_fullscreen_monitors, meta_window_client_message): Add
 	MetaWindow property to store fullscreen monitors field, update
 	_NET_WM_FULLSCREEN_MONITORS property on windows, and handle client
 	message.
 	* src/core/atomnames.h: Add _NET_WM_FULLSCREEN_MONITORS atom.
 	* src/core/constraints.c (setup_constraint_info): If
 	_NET_WM_FULLSCREEN_MONITORS is interesting, use the data stored in
 	MetaWindow::fullscreen_monitors to determine the fullscreen area instead
 	of the basic xinerama_info area.


svn path=/trunk/; revision=4021
2008-11-17 02:57:20 +00:00
Tomas Frydrych
3b3226b678 Merge branch 'plugin-gobject' into next-generation
Conflicts:

	src/compositor/mutter/compositor-mutter.c
	src/core/window.c
2008-12-18 12:41:56 +00:00
Tomas Frydrych
0214ece238 Merge commit 'clutter/override-redirect-core-1' into next-generation 2008-12-18 12:28:01 +00:00
Tomas Frydrych
9821453b5f Merge branch 'upstream-2.25.55' into next-generation
Conflicts:

	configure.in
	src/Makefile.am
	src/core/screen-bindings.h
	src/metacity.schemas.in
2008-12-18 11:00:19 +00:00
Robert Bragg
6849735e9d Adds support in src/core for tracking override redirect windows.
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-23 19:28:40 +00:00
Owen W. Taylor
9a1be03205 Make MetaWindow a GObject
Make MetaWindow into a GObject so that it is accessible to
gobject-introspection (also allows for signals to be added.)

Renames:

 meta_window_free() => meta_window_unmanage()
 meta_window_get_type() => meta_window_get_window_type()
 meta_window_get_type_atom() => meta_window_get_window_type_atom()
2008-11-07 04:57:00 -05:00
Tomas Frydrych
40c25dc426 Exposed meta_window_get_startup_id () 2008-11-19 12:30:45 +00:00
Robert Bragg
0058271aaa Re-works the approach to supporting live preview to handle stacking.
We can't easily use a metacity layer to hide windows as that means we
loose our original stacking position. (Metacity's stack positions are
only valid within a single layer) We now have a "guard window" per
screen that is a fullscreen override redirect that is lowered to the
bottom of the stack. Hidden windows now remain in their original layer
so the stacking position remains valid, but all hidden windows get
XRestacked under the guard window.

A new compositor hook is also added to inform it when a window becomes
hidden/unhidded, this lets us map/unmap the corresponding actor.

missing files in preview commit (TODO: rebase -i and squash this later)
2008-11-03 14:50:22 +00:00
Robert Bragg
7ea4380725 Adds a compositor_private member to MetaWindow
Since we often need to find a MutterWindow corresponding to a MetaWindow
this make it a simple de-reference of a compositor private pointer.
2008-10-31 09:10:10 +00: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
9b3a0d1ad8 Basic plugin infastructure and a sample simple plugin. 2008-09-18 16:09:11 +01:00
Tomas Frydrych
438ac55cb1 update to upstream 2.25.1
Merge commit '49cc773eb4801fb0ee3cddeeb1d27042f4a46e2e' into clutter
2008-09-03 19:48:23 +01:00
Tomas Frydrych
e6e6aecb93 Exposed MetaWindowType so it can be used by compositor backends.
meta_window_get_type:
meta_window_get_type_atom:
Accessors for window type/type atom.
2008-08-18 15:42:38 +01:00
Thomas Thurman
8736f61579 Adding doxygen headers to some files.
2008-08-18  Thomas Thurman  <tthurman@gnome.org>

        Adding doxygen headers to some files.

        * src/core/metacity-Xatomtype.h
        * src/core/main.c
        * src/core/screen-private.h
        * src/core/window-private.h
        * src/core/keybindings.h
        * src/core/session.h
        * src/core/workspace.h
        * src/core/window-props.h ()


svn path=/trunk/; revision=3818
2008-08-18 10:25:17 +00:00
Iain Holmes
f141692ca2 src/include/frame.h src/include/display.h src/include/xprops.h
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-19 00:00:09 +00:00
Renamed from src/core/window.h (Browse further)