Commit Graph

132 Commits

Author SHA1 Message Date
Owen W. Taylor
06817df975 Add a 'n-workspaces' property to MetaScreen
Add a 'n-workspaces' property to MetaScreen to allow for notification
when the number of workspaces changes.

http://bugzilla.gnome.org/show_bug.cgi?id=561297
2008-11-17 17:22:28 -05: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
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
026008a700 Fix to allow windows created from within Mutter itself to be managed. 2008-12-02 12:11:06 +00:00
Owen W. Taylor
b26fc771b1 Drain the clutter event queue
When multiple events are generated from a single event (for example,
when a motion event generates an enter/leave pair), events accumulate
in the clutter event queue if the clutter event source is not running.
Add a simple event source that checks clutter_events_pending() and
dispatches events as necessary.
2008-11-05 17:49:55 -05:00
Tomas Frydrych
04619df818 Added timestamp parameter to meta_window_change_workspace_by_index(). 2008-11-25 15:34:07 +00:00
Tomas Frydrych
c1928ead7c Exposed meta_display_get_current_time/_roundtrip(). 2008-11-25 15:24:48 +00:00
Tomas Frydrych
b43f9aec5a Fixed clutter-less build. 2008-11-25 12:26:26 +00:00
Tomas Frydrych
99f6b2cdce meta_screen_get_active_workspace() 2008-11-20 12:41:28 +00:00
Tomas Frydrych
da55d8e738 meta_window_change_workspace_by_index() 2008-11-20 09:14:58 +00:00
Tomas Frydrych
40c25dc426 Exposed meta_window_get_startup_id () 2008-11-19 12:30:45 +00:00
Robert Bragg
3211fb04d3 Merge branch 'fix-stacking' into clutter 2008-11-04 15:26:17 +00:00
Robert Bragg
17e12ccb6d [meta_window_hide] make sure the right xwindow gets mapped for live preview 2008-11-04 14:55:46 +00:00
Tomas Frydrych
6eab4fb9e8 Exposed meta_screen_get_n_workspaces() 2008-11-04 10:27:59 +00:00
Robert Bragg
7a190f33f6 Tries to consider how window->hidden affects existing window->mapped tests
src/core does some things depending on window->mapped, but since we now
leave the window mapped for hidden windows we might get some wrong
descisions.

Also instead of calling meta_window_show when in meta_window_hide for
the case that the window isn't currently mapped, we now simply
XMapWindow.
2008-11-03 12:36:55 +00:00
Tomas Frydrych
7ec7a8fa44 meta_screen_get_active_workspace_index() 2008-11-03 12:32:25 +00:00
Robert Bragg
93b945ea42 Instead of hiding/showing the actors of hidden windows, reparent, it's more reliable
It's more awkward and error prone, considering plugin ininteractions, to simply
show/hide the actors of hidden windows, and it seems to be more reliable to
reparent them to a hidden group instead.
2008-11-03 10:26:21 +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
368346571a Ensure window->compositor_private is initialised in meta_window_new_with_attrs 2008-10-31 12:57:47 +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
Owen W. Taylor
1b943f8191 Add --mutter-plugins command line argument
src/core/main.c: Add --mutter-plugins argument (overrides GConf value)
src/core/prefs.c src/include/prefs.h: Add meta_prefs_override_clutter_plugins()
   to set a value for clutter_plugins that overrides the value from GConf
2008-10-31 08:33:37 -04:00
Robert Bragg
6d8baea4c2 [stacking] Simplifies the way compositor code has to handle stacking
The compositor now gets handed a GList of MetaWindows when the stacking
gets syncd with the X server.
2008-10-30 22:09:48 +00:00
Tomas Frydrych
b5ac24e9c1 meta_screen_append_new_workspace() 2008-10-24 11:11:28 +01:00
Tomas Frydrych
d1635d13cb meta_screen_remove_workspace() 2008-10-24 11:03:43 +01:00
Tomas Frydrych
a7a0a0300f Exposed meta_screen_get_workspace_by_index. 2008-11-03 10:03:58 +00:00
Tomas Frydrych
ce2bfc008d mutter_window_get_description()
Human redable description useful for debugging, now accessible to plugins and
  and also for override redirect windows.
2008-10-30 08:30:42 +00:00
Tomas Frydrych
10f9a7f252 Forced live_hidden_windows to TRUE 2008-10-27 12:29:49 +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
73f90dfd69 Fixed 1-off bug in switch-workspace keybindings 2008-10-20 12:19: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
0a7fc94799 Revert "Build metacity as library so that plugins can link against it."
This reverts commit 57c2e6d716485205a9178afe01dbc43641b5c2aa.
2008-10-08 12:19:08 +01:00
Tomas Frydrych
bbdd7d9b15 Build metacity as library so that plugins can link against it.
Renamed original main() to meta_main(); added wrapper main() into metacity.c.
2008-10-08 10:11:57 +01:00
Robert Bragg
f65d898f80 Merge branch 'master' into bob/clutter
Conflicts:

	src/core/prefs.c
	src/include/prefs.h
2008-10-06 12:54:34 +01:00
William Lachance
a49f986c67 Pass modified mouse button events down to panel windows instead of dealing
2008-10-06  William Lachance  <wrlach@gmail.com>

        Pass modified mouse button events down to panel windows
        instead of dealing with them ourselves.  Closes #554428.

        * src/core/display.c (prefs_changed_callback): don't grab mouse
          buttons on panels
        * src/core/window.c (meta_window_new_with_attrs): ditto


svn path=/trunk/; revision=3942
2008-10-06 01:34:17 +00:00
Thomas Thurman
b1fb765d8e Second half of the switch to using x-macros for keybindings so that we
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-10-06 00:24:07 +00:00
Tomas Frydrych
bd3d643f96 Use clutter_get_option_group_without_init() once available. 2008-09-23 08:28:13 +01:00
Tomas Frydrych
7bd5f61db7 Conflicts:
src/core/main.c
2008-09-23 08:26:51 +01:00
Tomas Frydrych
5e76e1b221 Hooked in clutter options. 2008-09-19 16:27:44 +01:00
Tomas Frydrych
9b3a0d1ad8 Basic plugin infastructure and a sample simple plugin. 2008-09-18 16:09:11 +01:00
Tomas Frydrych
d509097967 Sync with upstream r3901
Merge branch 'upstream' into clutter
2008-09-17 17:12:27 +01:00
Thomas Thurman
cf48407972 An attempt to keep all information about window bindings in the same
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-06 22:01:56 +00:00
Tomas Frydrych
438ac55cb1 update to upstream 2.25.1
Merge commit '49cc773eb4801fb0ee3cddeeb1d27042f4a46e2e' into clutter
2008-09-03 19:48:23 +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
Thomas Thurman
2095cce3ab Add new move_to_center keybinding, requested by Khanh-Dang Nguyen Thu Lam;
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-09-01 01:32:39 +00:00
Thomas Thurman
5128bd4f28 new function. turn the compositing manager on or off as necessary.
2008-08-31  Thomas Thurman  <tthurman@gnome.org>

        * src/core/prefs.[ch] (meta_prefs_set_compositing_manager): new
          function.
        * src/core/main.c (meta_parse_options): turn the compositing
          manager on or off as necessary.


svn path=/trunk/; revision=3838
2008-08-31 22:55:18 +00:00
Thomas Thurman
9c82331009 moving all messages about properties to the top, as a start at #549886
2008-08-30  Thomas Thurman  <tthurman@gnome.org>

        * src/core/window.c (process_property_notify): moving all
	messages about properties to the top, as a start at #549886


svn path=/trunk/; revision=3837
2008-08-30 21:37:13 +00:00
Tomas Frydrych
1f29679c0d Basic CM minimize effect
Added minimize hook to the compositor, hooked up into MetaWindow, implemented
in the clutter compositor.
2008-08-19 11:47:30 +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
Tomas Frydrych
f7f696c310 Moved atomnames.h to includes so can be included from display.h.
meta_display_get_atom: allow common atom retrieval via enum (to avoid interning
identical atoms at different places).
2008-08-18 15:10:13 +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