1
0
Fork 0
Commit graph

219 commits

Author SHA1 Message Date
Tomas Frydrych
8ccb9e04eb Postpone creation of the guard window until we are ready to manage windows.
Creating the gard window when constructing MetaScreen causes the screen to
  go black for the duration of Metacity startup which is uggly. We do not
  actually need that window until we are ready to manage windows on the screen.
2009-04-02 12:25:53 +01: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
Owen W. Taylor
4253ff8e12 Add a "toggle_recording" keybinding
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
2009-03-13 17:06:04 -04:00
Owen W. Taylor
fb7b820187 Cleanup: split MetaSide from MetaDirection
The MetaDirection enumeration had META_SIDE_* values in it that
were used in some places where an enum with only four directions
was needed. Split this off into a separate enum called MetaSide
and use that enum name where appropriate.
2009-03-17 16:53:01 -04:00
Dan Winship
a47bb96536 Add a MetaScreen:restacked signal and expose MetaWindow.layer
Expose restacking and a window's stack layer to allow a compositor
to insert elements into the window stack in the right location.
(See Bug 571827 – hide panel when screensaver is active)

src/core/stack.h src/include/common.h: Move MetaStackLayer to
 a public header.

src/core/screen.c src/core/screen-private.h src/core/stack.c:
 Add a ::restacked signal emitted after we finish restracking.

src/core/window.h src/include/window.h: Add meta_window_get_layer()
2009-03-12 17:07:27 -04:00
Dan Winship
0e256a21a5 Use GDestroyNotify instead of custom type, for better introspectability 2009-03-25 10:50:40 -04:00
Dan Winship
f78390b094 Notify the compositor of new windows slightly sooner.
In particular, make it so that we call meta_compositor_add_window() on
a new window before calling meta_compositor_sync_stack() to position
it. The list returned by mutter_plugin_get_windows() is only updated
by sync_stack(), but sync_stack() only pays attention to windows that
add_window() has already been called on. So without this change, a
newly-mapped window will not be returned by
mutter_plugin_get_windows() until after the *next* restacking.

http://bugzilla.openedhand.com/show_bug.cgi?id=1512
2009-03-18 15:09:15 -04:00
Tomas Frydrych
0b635aafae Make prototype for meta_window_find_root_ancestor() public. 2009-03-19 16:01:32 +00: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
cd0ef08783 Added MetaWindow::fullscreen property (read only). 2009-03-17 12:27:13 +00:00
Tomas Frydrych
4203fd2993 Added MetaWorkspace::n-windows property (read-only). 2009-03-17 08:54:19 +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
9a4d1d1375 Moved bunch of prototypes from display-private.h to display. 2009-03-12 14:48:22 +00:00
Dan Winship
616e140420 Ignore override-redirect windows when restacking based on window groups.
http://bugzilla.gnome.org/show_bug.cgi?id=571616 /
http://bugzilla.openedhand.com/show_bug.cgi?id=1461
2009-02-26 09:59:14 -05: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
Tomas Frydrych
8c0ae7be83 Turned window decorated flag into MetaWindow::decorated property.
This allows things like the compositor to easily track decoration status.
2009-02-11 12:16:41 +00:00
Thomas James Alexander Thurman
e5db44ca90 Set prop_hooks_table to NULL after freeing it.
* src/core/window-props.c:


svn path=/trunk/; revision=4103
2009-02-01 20:47:33 +00:00
Thomas James Alexander Thurman
a203fb1037 Window properties are looked up in a hash table rather than
by iteration over an array.  Saves ~44us per window, but
        also makes the code cleaner.
	* src/core/display-private.h:
	* src/core/window-props.c:


svn path=/trunk/; revision=4097
2009-01-29 14:32:31 +00:00
Thomas James Alexander Thurman
8e6c0bec78 some lists failed to keep track of their contents and therefore didn't
* src/core/edge-resistance.c: some lists failed to keep track
          of their contents and therefore didn't free correctly.
          Closes #552303.


svn path=/trunk/; revision=4095
2009-01-28 02:30:30 +00:00
Thomas James Alexander Thurman
69ae9e4a9d Free name of old theme when new theme is loaded.
* src/core/prefs.c: Free name of old theme when new theme
          is loaded.


svn path=/trunk/; revision=4094
2009-01-28 02:08:09 +00:00
Thomas James Alexander Thurman
0a172cc053 Added a gconf key to swap the meanings of the right and
middle buttons when the modifier key is held down.
        Closes #437910.  Thanks to Matt Kraai for looking over
        the patch.
	* src/core/display.c:
	* src/core/prefs.c:
	* src/include/prefs.h:
	* src/metacity.schemas.in.in:


svn path=/trunk/; revision=4091
2009-01-27 21:05:42 +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
Thomas James Alexander Thurman
8cbcbb0655 More of the window properties are checked using simple
window property handlers.  The ones which remain don't
        actually look up the new value in the ordinary way, and
        so are a little trickier to merge.  Added an "initial"
        flag to be on the safe side that the behaviour is the
        same as before (so we don't do things when a window's
        first mapped that we only used to do when a property
        changed).  Partial fix for bug #549886.
	* src/core/window-props.c:
	* src/core/window-props.h:
	* src/core/window.c:


svn path=/trunk/; revision=4089
2009-01-27 03:53:07 +00:00
Thomas James Alexander Thurman
35d9d2864f add support for _NET_WM_MOVERESIZE_CANCEL.
* src/core/window.c: add support for _NET_WM_MOVERESIZE_CANCEL.


svn path=/trunk/; revision=4088
2009-01-25 22:59:50 +00:00
Tomas Frydrych
1d38209520 Fixed process_tab_grab()
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.
2009-02-03 17:30:49 +00:00
Tomas Frydrych
c1f3a5c67d Ensure that if custom handler is installed for one of the shortcuts that do
keyboard grab, the custom handler gets also called while the grab is in place.
2009-02-03 13:23:08 +00:00
Tomas Frydrych
6e543fbcfd Store the default keybinding handler alongside the custom one.
This allows us to fall back onto it if the custom handler removes itself.
2009-02-03 13:20:51 +00:00
Tomas Frydrych
9dee164790 Ensure that we do not attempt to free the tab popup when there is none. 2009-02-03 13:16:01 +00:00
Tomas Frydrych
b0cc2a8614 Handle gconf errors better for string values in preferences. 2009-02-03 10:15:23 +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
c3884e9900 Can't g_free() MetaDisplay GObject. 2009-02-03 09:11:32 +00:00
Tomas Frydrych
39c88facc5 Move meta_display_get_tab_*() functions into display.h 2009-02-02 17:01:27 +00:00
Tomas Frydrych
6b1aa3cf04 Do not allocate the tab_pop up object at all when the --no-tab-popup option is set
This option is intended primarily so that and Alt+Tab implementation can be
  provided in a plugin, so having the object around makes no sense.
2009-02-02 15:28:26 +00:00
Tomas Frydrych
2e1893f7d3 --no-tab-popup && no-tab-popup gconf key
Disables the use of popup (and highlight frame) for window cycling.
2009-02-02 14:09:04 +00: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
2338611046 meta_keybindings_switch_window()
Public function to switch to the next window in Alt+Tab like fashion.
2009-01-29 16:26:12 +00:00
Tomas Frydrych
7d3a05f2d1 Removed const qualifier from key_handlers[] so we can modify it; use find_handler() in meta_keybindings_set_custom_handler(). 2009-01-29 15:29:43 +00:00
Tomas Frydrych
952d63a127 Implemented meta_keybindings_set_custom_handler(). 2009-01-29 15:07:57 +00:00
Tomas Frydrych
23bed522ab Expose keybindings data types; add user_data parameter the handler signature. 2009-01-29 14:53:03 +00:00
Tomas Frydrych
813acae961 Rename keybindings.h to keybindings-private.h 2009-01-29 14:16:01 +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
cb3870f9f6 Sanity check to ensure we do not try to relocate windows onto NULL workspace. 2009-01-20 12:48:59 +00:00
Tomas Frydrych
25d628aea2 Exposed MetaGroup API. 2009-01-15 15:37:48 +00:00
Tomas Frydrych
aad8eb1999 Added meta_group_get_size() to allow for more efficient check of whether window is part of a larger group. 2009-01-15 15:21:43 +00:00
Tomas Frydrych
fc6b78a20c Ensure that meta_compositor_map_window() is even when we only get MapNotify. 2009-01-12 16:41:06 +00:00
Tomas Frydrych
ec0562550a Added meta_window_get_role(). 2009-01-12 12:30:31 +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
Frederic Peters
b66fbc0369 added call to g_thread_init(), as ORBit2 stopped doing it and Metacity is
* src/core/main.c: (main): added call to g_thread_init(), as ORBit2
stopped doing it and Metacity is using gconf; closes #565517.


svn path=/trunk/; revision=4063
2008-12-25 13:06:00 +00:00
Thomas James Alexander Thurman
01027006a7 windows which attempt to present themselves but are offscreen end up
* src/core/window.c: windows which attempt to present themselves
          but are offscreen end up demanding attention, unless they
          are transient, when they move to the current workspace
          as before.  Closes #482354.


svn path=/trunk/; revision=4060
2008-12-21 05:35:30 +00:00