1
0
Fork 0
Commit graph

1891 commits

Author SHA1 Message Date
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
Owen W. Taylor
d69546902b Remove unused MetaCompositor functions
Remove a number of functions that were either entirely unimplemented
or had empty implementations for the Clutter-compositor.

 meta_compositor_begin_move()
 meta_compositor_update_move()
 meta_compositor_end_move()
 meta_compositor_set_active_window()
 meta_compositor_free_window()

http://bugzilla.gnome.org/show_bug.cgi?id=581813
2009-06-30 09:35:12 -04:00
Owen W. Taylor
72149a054e Make MetaCompositor the clutter compositor
* Move compositor-mutter.c to compositor.c

* Remove the 'Mutter' typedef and define the structure for
  MetaCompositor directly.

http://bugzilla.gnome.org/show_bug.cgi?id=581813
2009-06-30 09:35:12 -04: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
455486db7c Avoid restacking animating hidden actors
Since the stack passed to the compositor now accurately reflects
the X stacking order, we need to treat hidden windows (which are
at the bottom of the X stacking order) specially - when the
compositor stacking order is synced, try to keep animating hidden
actors in their old positions in the stack.

http://bugzilla.gnome.org/show_bug.cgi?id=585984
2009-06-30 09:33:29 -04:00
Owen W. Taylor
43511c316e Use MetaStackTracker to avoid a round-trip XQueryTree()
With MetaStackTracker, it's no longer necessary to XQueryTree to
get a reasonably-up-to-date view of the server stacking order.

Add some comments explaining unclear aspects of
raise_window_relative_to_managed_windows() and with future possible
improvements.

http://bugzilla.gnome.org/show_bug.cgi?id=585984
2009-06-29 23:05:11 -04:00
Owen W. Taylor
34e4b594cd Don't do stacking for override-redirect windows
Don't add override-redirect windows to MetaStack; we shouldn't
be restacking them.

Since we *aren't* stacking the override-redirect windows, we need to
be careful that to ignore them when looking for the top managed
window.

http://bugzilla.gnome.org/show_bug.cgi?id=585984
2009-06-29 23:05:11 -04:00
Owen W. Taylor
6314ee8780 Move compositor-stack handling to MetaStackTracker
In order to properly track the stacking order for override-redirect
windows, move meta_compositor_sync_stack() call into MetaStackTracker.
In the new location, we sync the stack as a before-redraw idle function,
rather then using the freeze-thaw facilities of MetaStack. This is
simpler, and also properly compresses multiple stack changes on
notifications received from the X server.

http://bugzilla.gnome.org/show_bug.cgi?id=585984
2009-06-29 23:05:11 -04:00
Owen W. Taylor
a4cd66f599 Add better tracking of real stacking order
Wedging override-redirect windows into the constraint code in stack.c
results in Mutter getting confused about the stacking order of
these windows with respect to other windows, and may also in some
cases cause Mutter to restack override-redirect windows.

core/stack-tracker.c core/stack-tracker.h: MetaStackTracker - combine
  events received from the X server with local changes we have made
  to come up with the best possible idea of what the stacking order
  is at any one point in time.

core/screen.c core/screen-private.h: Create a MetaStackTracker for
  the screen.

core/display.c: Feed relevant events to MetaStackTracker

core/frame.c core/screen.c core/stack.c: When we make changes to the
  stacking order or add windows, record those changes immediatley
  in MetaStackTracker so we have the information without waiting
  for a round-trip.

include/ui.h ui/ui.c: meta_ui_create_frame_window add a return value
  for the X request serial used to create the window.

http://bugzilla.gnome.org/show_bug.cgi?id=585984
2009-06-29 23:04:59 -04:00
Owen W. Taylor
729fb2e0b4 Avoid moving and resizing override-redirect windows
Override-redirect windows should not be moved or resized by the
window manager.

- Mark override-redirect windows as already placed to avoid
  placing them when first shown.
- Don't move-resize newly created override-redirect MetaWindow
- Don't queue a resize on override-redirect windows when reading
  their WM_TRANSIENT_FOR hint.
- Add g_return_if_fail (!window->override_redirect) to catch
  unexpected code paths that might result in override-redirect
  windows being moved or resized.

http://bugzilla.gnome.org/show_bug.cgi?id=582639
2009-06-29 22:54:38 -04:00
Owen W. Taylor
dc2d8acc92 Don't add override-redirect windows to workspaces
Normally a window that is "on all workspaces", is also on a particular
workspace (to deal with being unstuck.) This is pointless for
override-redirect windows.

http://bugzilla.gnome.org/show_bug.cgi?id=582639
2009-06-29 22:51:40 -04:00
Owen W. Taylor
f7c595ff18 Ignore client messages sent to override-redirect windows
If someone asks us to close, maximize, etc, an override-redirect
window, just ignore the request.

http://bugzilla.gnome.org/show_bug.cgi?id=582639
2009-06-29 22:51:40 -04:00
Owen W. Taylor
3d81a1e5ec meta_screen_foreach_window(): Skip override-redirect windows
Don't include override-redirect windows when iterating the windows
in the screen. We don't need them for any of the current uses:

 - Queueing redraws and resizes on managed windows
 - Checking which windows should be added to a new workspace

http://bugzilla.gnome.org/show_bug.cgi?id=582639
2009-06-29 22:51:40 -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
Owen W. Taylor
fd27647440 Don't read most properties for override-redirect windows
Skipping handling of properties for override redirect windows has
two advantages: first it reduces the amount of work needed to get
an override-redirect window (menu, tooltip, drag icon) onto the
screen. But more importantly, it reduces the number of code-paths
for an override-redirect to get into some code portion where it
isn't expected.

* Integrate the list of properties we load initially with the
  list of property hooks; this avoids having two separate lists
  that we have to keep in sync.

* Add a flag to MetaWindowPropHooks to indicate whether the
  property should be handled for override-redirect windows;
  currently we load a) properties that identify the window -
  useful for debugging purposes b) WM_TRANSIENT_FOR (could be
  used to associate menus with toplevels.)

* For properties that aren't always loaded through window-props.c,
  add !window->override checks to places that trigger loading,
  and add g_return_if_fail(!window->override) to the load
  functions as a double-check.

http://bugzilla.gnome.org/show_bug.cgi?id=582639
2009-06-29 22:32:19 -04:00
Owen W. Taylor
27fb5fbbca Add checks against inappropriate changes to override-redirect window
Add g_return_if_fail() to check that window-management functions like
meta_window_maximize() aren't called on override-redirect windows.

This reveals that were were "unminimizing" override-redirect windows
when adding them; avoid doing that.

http://bugzilla.gnome.org/show_bug.cgi?id=582639
2009-06-29 22:29:32 -04:00
Owen W. Taylor
d810315884 Fix property notifications for certain properties
If a property has a reload function, but the standard property-fetching
mechanism isn't used (hooks->type == META_PROP_VALUE_INVALID), then the
a logic error (introduced in January) caused the hook to never be run.

This meant that changes to struts and icons weren't noticed.

Same as: http://bugzilla.gnome.org/show_bug.cgi?id=572573
The fix here is different in detail from that applied to Metacity, but
similar in spirit.

http://bugzilla.gnome.org/show_bug.cgi?id=585980
2009-06-29 22:29:31 -04:00
Owen W. Taylor
820970328b Load NET_WM_USER_TIME from the right window
On subsequent changes, if there is a NET_WM_USER_TIME_WINDOW, then
read the property from that rather than from the main window.
(Fix an accidental regression: the right Window was being computed
but no longer passed in.)

http://bugzilla.gnome.org/show_bug.cgi?id=585979
2009-06-29 22:29:31 -04:00
Owen W. Taylor
3e2fcf4acd Fix missing static for meta_window_show()
Definition of meta_window_show() was missing static although it
was forward-declared with static.

http://bugzilla.gnome.org/show_bug.cgi?id=585978
2009-06-29 22:29:31 -04:00
Owen W. Taylor
072ec184d3 Revert "Unparent rather than destroy MutterWindows."
This reverts commit 16d49695ad.

If we want an actor to go away deterministically, we should call
clutter_actor_destroy(); using unparent instead a) may result
leaks through cyclic ref counts, and b) will delay the deallocation
of the window texture in a garbage collected environment until
the next garbage collection, causing much greater transient use
of memory.

http://bugzilla.gnome.org/show_bug.cgi?id=580520
2009-06-23 14:13:59 -04:00
Davyd Madeley
321b40a386 Fix broken MUTTER_PLUGIN_TYPE -> MUTTER_TYPE_PLUGIN 2009-06-22 10:38:09 +08:00
Marina Zhurakhinskaya
0a863b8c2b Handle input area set to full screen or reset during start-up
info->pending_input_region needed to be destroyed in
mutter_set_stage_input_region() before it was set to something
else or before it was reset to be full screen (region == None).

Set the initial input area to an empty region by
setting info->pending_input_region to an empty region by default
and setting it to None or a new region if a new input region is
specified.

Remove show_overlay_window() function that was used to set an empty
input region on start-up, and uses a call to do_set_stage_input_region()
with info->pending_input_region as an argument instead.
2009-06-19 16:48:44 -04:00
Owen W. Taylor
c012105b90 Fix hiding newly added windows with live_hidden_windows
When we add a window and it gets hidden as the first thing, we need
to show not just the frame window, but also the window itself.
Otherwise when the window subsequently becomes visible, it will
just be an empty frame.

Add helper functions to reduce current code duplication and avoid
adding more.

http://bugzilla.gnome.org/show_bug.cgi?id=586309
2009-06-19 11:40:42 -04:00
Davyd Madeley
f26d503694 Move meta_window_delete() to public API 2009-06-19 11:48:33 +08:00
Davyd Madeley
08c5095ad7 Add meta_window_get_transient_for() method 2009-06-17 09:40:55 +08:00
Davyd Madeley
dfb0e4f57b Add meta_window_get_title() method
Update meta_window_get_title() as per comments
2009-06-17 09:34:40 +08:00
Davyd Madeley
29257f107a IS_MUTTER_PLUGIN() -> MUTTER_IS_PLUGIN()
IS_MUTTER_PLUGIN never actually worked. So it's not going to break anyone's
API to fix the namespace while making the macro work.
2009-06-17 09:34:06 +08:00
Florian Muellner
ecde490967 Suppress strict aliasing warning
Fix a (harmless) warning about strict aliasing that some GCC versions
give when using g_module_symbol().

http://bugzilla.gnome.org/show_bug.cgi?id=582243
2009-06-16 15:47:59 -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
Davyd Madeley
204431812b Move meta_window_{min,max}imize() to public API 2009-06-15 09:42:34 +08:00
Owen W. Taylor
627b4484ec Fix _XOPEN_SOURCE compilation problems on Solaris
Change #define _XOPEN_SOURCE 500 to 600 in compositor-xrender.c to
avoid a bad interaction with -xc99 on Solaris.

Remove unneeded #define in compositor-mutter.c.

Based on a patch by Brian Cameron

http://bugzilla.gnome.org/show_bug.cgi?id=580662
2009-06-12 14:50:15 -04:00
Owen W. Taylor
442991a712 Adapt to premultiplied alpha usage in Cogl
Cogl's default blend function has been switched to expect premultiplied
alpha. Change the combine function and the colors we use to
modulate alpha to match.

http://bugzilla.gnome.org/show_bug.cgi?id=585480
2009-06-11 15:36:27 -04:00
Owen W. Taylor
7eae5d4eab Allow slicing the mask texture
It doesn't make sense to allow the window texture to be sliced,
but not allow the mask texture to be sliced. So, we should either
set 'disable-slicing' for the texture actor or not pass NO_SLICING when
creating the mask texture.

While slicing currently results in only the first layer being shown,
disabling slicing entirely would break windows larger than the texture
size limit.  It would be straightforward to support multitexturing of
sliced textures in Cogl when all the textures are identically sized
and sliced identically, if it became a priority.

http://bugzilla.gnome.org/show_bug.cgi?id=585151
2009-06-11 14:49:59 -04:00
Davyd Madeley
f3914c86b9 s/META_WINDOW_TYPE/META_TYPE_WINDOW/ in META_IS_WINDOW() 2009-06-10 12:43:43 +08:00
Owen W. Taylor
fafb752827 Port to Mutter to Clutter 1.0 API
- Use float instead of ClutterUnit
- clutter_actor_get_size/position() return floats (remove some
  stray usage of these functions in the default plugin as well.)
- Adapt to cogl_texture_new_from_data() changes
- Use blend strings to set up multitexturing
- Remove CLUTTER_UNITS_TO_FLOAT() usage

http://bugzilla.gnome.org/show_bug.cgi?id=585016
2009-06-08 09:34:09 -04:00
Colin Walters
2ed1bf05d1 Add meta_window_get_wm_class
Public function to retrieve the cached WM_CLASS, used in gnome-shell
for tracking applications.
2009-05-29 13:26:18 -04:00
Owen W. Taylor
9883f6e679 Select for crossing events on stage and overlay
If the input region has been shaped, then clutter needs to
receive EnterNotify/LeaveNotify events in order to properly
send enter and leave events to actors when the pointer crosses
the boundary of the stage.

http://bugzilla.gnome.org/show_bug.cgi?id=578250
2009-05-05 13:57:23 -04: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
Tomas Frydrych
90c35f8181 Allow the compositor to see ButtonPress events for buttons 4 or 5 2009-05-05 09:46:36 +01:00
Tomas Frydrych
2a8c160569 MetaScreen::keyboard-grabbed property
gboolean read-only property that tracks the all_keys_grabbed flag of
  MetaScreen.
2009-05-05 09:39:29 +01:00
Dan Winship
1d5117a607 Create a MetaAltTabHandler abstraction to allow alternate implementations
http://bugzilla.gnome.org/show_bug.cgi?id=580917
2009-05-04 10:25:58 -04:00
Dan Winship
99d0f41d98 Push the tab/workspace popup abstraction completely into screen.c
Also, use MetaWindows as the tab_popup keys rather than using (X) Windows
and then having to map back and forth everywhere, which is silly since
we never actually want the X Window.

http://bugzilla.gnome.org/show_bug.cgi?id=580917
2009-05-04 10:25:58 -04:00
Dan Winship
7b522c0de8 Split screen->tab_popup and screen->ws_popup
http://bugzilla.gnome.org/show_bug.cgi?id=580917
2009-05-04 10:25:58 -04:00
Dan Winship
cbf4be04fc Reorganize tab popup code a bit more cleanly.
Rather than trying to reverse-engineer what kind of tab/workspace
popup to create from within meta_display_begin_grab_op(), just create
the popup directly from do_choose_window()/handle_workspace_switch()
after completing the grab, since they already know which kind they
want.

Also add meta_screen_destroy_tab_popup()/_destroy_workspace_popup()
rather than having meta_display_end_grab_op() poke into MetaScreen's
internals itself.

http://bugzilla.gnome.org/show_bug.cgi?id=580917
2009-05-04 10:25:58 -04:00
Dan Winship
f55509aadd Fix some broken indentation and simplify nested if()s
http://bugzilla.gnome.org/show_bug.cgi?id=580917
2009-05-04 10:25:58 -04:00
Dan Winship
7e369d63b3 Remove some old compositor-related code that mutter doesn't need
http://bugzilla.gnome.org/show_bug.cgi?id=580917
2009-05-04 10:25:58 -04:00
Owen W. Taylor
6cf71a06c0 Remove debug printf about opacity
Don't print ""setting opacity to %d\n" every time a window's opacity
changes.

http://bugzilla.gnome.org/show_bug.cgi?id=580655
2009-04-29 11:44:15 -04: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
7a7632fa98 Allow setting input region before output window is created
If mutter_plugin_set_stage_input_region() and related methods are
called before the output window is available, save the set input
region and apply it to the output window later on.

compository-mutter.[ch]: Add mutter_set_stage_input_region() and
mutter_empty_stage_input_region(), move the input region handling
here and implement the delayed shape setting described
above.

mutter-plugin.c: Implement shape setting in terms of the new methods.

http://bugzilla.gnome.org/show_bug.cgi?id=580042
2009-04-24 09:54:19 -04:00
Owen W. Taylor
76a3f9d402 Build and install introspection information
Build a XML gir file and binary typelib file for the interfaces that
we are installing for plugin use. They are installed into $(pkglibdir)
since they are private to the application.

http://bugzilla.gnome.org/show_bug.cgi?id=580041
2009-04-24 09:54:18 -04:00
Colin Walters
96dfeea412 Don't use G_MODULE_BIND_LOCAL
Using G_MODULE_BIND_LOCAL causes problems for introspecting plugins,
since introspected symbols need to be globally available. And in
any case, trying to use linker features to prevent symbol conflicts
doesn't usually work out very well, it's better to just namespace
properly.

http://bugzilla.gnome.org/show_bug.cgi?id=580033
2009-04-24 09:54:18 -04:00
Colin Walters
a4746d75e6 Load plugins separately from initializing
Add separate mutter_plugin_manager_load() and
mutter_plugin_manager_initialize() calls so that we can just
load the plugins without start them. This is useful for introspecting
a gnome-shell plugin at build time.

http://bugzilla.gnome.org/show_bug.cgi?id=580032
2009-04-24 09:54:18 -04:00
Owen W. Taylor
52638b9d8e In case of GConf failure, fall back to local keybinding values
Always compile the default keybindings into Metacity, and if we
fail to retrieve the values from GConf, use the compiled-in
value. This makes things more robust especially in an environment
like JHBuild where GConf-schema-installation may not work
correctly.

Also use these values for the no-GConf case, rather than
having a separate arrray and code path.

http://bugzilla.gnome.org/show_bug.cgi?id=576127
2009-04-24 09:54:18 -04:00
Colin Walters
514d00698d Add support for a "meta key" which initiates extended WM operations
This patch adds the concept of a special key for WM operations, and
the default is Super_L, which on extended PC hardware is the
"Windows key".  What we do is handle the special case of a press
and release of this key (without any other intervening keys).

Super_L+<key> should still be passed to applications.  In the future
we may want to also take some of these keybindings (e.g. Super+TAB)
though.

http://bugzilla.gnome.org/show_bug.cgi?id=563047
2009-04-24 09:54:18 -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
Owen W. Taylor
63b1d6642c Improve handling of errors when calling CompositeNameWindowPixmap
To guard against CompositeNameWindowPixmap failing, just use an
error trap. Previous code used:

 GrabServer/GetWindowAttributes/CompositeNameWindowPixmap/UngrabServer

To prevent BadMatch errors from !viewable, but didn't check the
return value of GetWindowAttributes and didn't check if an error
occured during the error trap. This way is more correct and more
efficient.

http://bugzilla.gnome.org/show_bug.cgi?id=580023
2009-04-24 09:54:17 -04:00
Owen W. Taylor
626912a9a4 Merge branch 'gnome-2-26' into master
Conflicts:
	configure.in
	src/core/schema-bindings.c
2009-04-08 16:11:12 -04:00
Tomas Frydrych
2e0cd7af5e Fixed focus handling in finish_minize().
When the window being hidden/mimimized has focus, is modal, but is not on the
  currently active workspace (e.g., during workspace switch before the new
  focus window is activated), we must prevent focus being passed to the modal
  window ancestor (otherwise the ancestor ends up being forcefully moved onto
  the active workspace).
2009-04-07 13:02:57 +01:00
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
Tomas Frydrych
3b864f8af5 Delay creation of overlay window until we are ready to show the stage.
The overlay window was created before the plugins are loaded. Because the
  composite extension immediately maps the window, we ended blanking the screen
  while plugins, etc., were loading. This commit reorganizes the code so that
  the overlay window is only created just before we are ready to show the
  stage.

  The significant impact of this change is that plugins cannot manipulate the
  overlay window during their initial loading, i.e., they cannot call the
  input-region API (the plugin should hook into the "show" signal if it needs
  to do anything of this sort).

  The commit also removes the XClearArea() call on the overlay window that
  seems to have served no real purpose.
2009-03-30 16:56:52 +01: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
Dan Winship
8216cbc4f6 Revert a seemingly non-functional and erroneous part of the no-tab-popup change
http://bugzilla.o-hand.com/show_bug.cgi?id=1446
2009-02-12 15:07:40 -05: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
Emmanuele Bassi
050c1e268d Do not use Fixed values with COGL
The COGL API expects floating point values, not fixed point ones.
2009-03-10 12:52:03 +00:00
Tomas Frydrych
7afc4310f6 Added no_more_x_calls flag to MutterWindow.
Once the window destruction is initiated, we can still manipulate our
  MutterWindow with clutter API, but we can not longer use any X-based API,
  or MetaWindow API to query it.
2009-02-18 12:13:36 +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
Tomas Frydrych
081272c5a9 Distcheck fixes. 2009-02-12 10:48:59 +00:00
Tomas Frydrych
f4bc825cf8 Do not destroy the GLX texture during redecoration.
Just ensure that it is on the top of the internal actor stack.
2009-02-11 14:20:37 +00:00
Tomas Frydrych
fb1fc4e7c6 Do not run map effect if the map is because window is getting redecorated. 2009-02-11 14:20:01 +00:00
Tomas Frydrych
ed3d222327 Recreate internals of MutterWindow when the decoration status changes. 2009-02-11 12:55:59 +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
Tomas Frydrych
5780ffad12 Added MutterWindow::no-shadow property
Allows to specify that a window that otherwise would have shadow should not.
2009-02-10 10:22:35 +00:00
Tomas Frydrych
770a6f0138 Actually, if the parent of MutterWindow is a container, use the interface.
Just unparenting the window does not automatically remove it from it's
  parent.
2009-02-09 17:01:37 +00:00
Tomas Frydrych
16d49695ad Unparent rather than destroy MutterWindows.
clutter_actor_destroy() is pure evil, wreaking havoc in reference tracking.
2009-02-09 16:39:26 +00:00
Joshua Lock
6893ef034b Intialise *style to NULL.
*style being unitialised raises a warning which causes problems on systems which enable warnings as errors (-Werror).
2009-02-09 14:48:08 +00:00
Tomas Frydrych
3e754a6f35 Fixed handling of _NET_WM_WINDOW_OPACITY. 2009-02-06 11:16:33 +00:00
Thomas James Alexander Thurman
b2da6d86f3 queue resize on window undecorate
* src/core/frame.c: queue resize on window undecorate


svn path=/trunk/; revision=4114
2009-02-05 01:06:15 +00:00
Luca Ferretti
00192b019c Fix description, focus the desktop, not desktop backgroung (Closes bug
2009-02-03  Luca Ferretti  <elle.uca@libero.it>

	* src/include/all-keybindings.h: Fix description, focus the
	desktop, not desktop backgroung (Closes bug #569649)

svn path=/trunk/; revision=4112
2009-02-03 08:39:34 +00:00
Thomas James Alexander Thurman
21416f453a Wrap g_error calls in braces.
* src/core/schema-bindings.c: Wrap g_error calls in braces.


svn path=/trunk/; revision=4110
2009-02-03 02:21:36 +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
1381f6d5f2 free the result of gdk_text_property_to_utf8_list() even when it returns
* src/ui/ui.c: free the result of gdk_text_property_to_utf8_list()
          even when it returns no data.


svn path=/trunk/; revision=4093
2009-01-28 02:00:33 +00:00
Owen Taylor
a6c951352f GtkStyle is specific to a particular colormap. Metacity uses different
2009-01-27  Owen Taylor  <otaylor@redhat.com>

       GtkStyle is specific to a particular colormap. Metacity
       uses different colormaps for windows with different
       visuals, so it must specialize the GtkStyle.

       Closes #568365 and #513944.

       * src/ui/frames.[ch]: Keep a GtkStyle for each MetaUIFrame, which is
         obtained by calling gtk_style_attach() on the style for the
         MetaFrames. When the style of the MetaFrames changes, reattach
         everything. When we call gtk_style_set_background() pass in the
         right style.

       * src/ui/themes.[ch]: Create a _with_style() variant of functions that
         previously took the style from widget->style passed in, so we
         can draw with the right style for the colormap.


svn path=/trunk/; revision=4092
2009-01-28 01:47:18 +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
Thomas James Alexander Thurman
77cb0db9c2 add meta_theme_draw_frame_by_name, which is needed for the theme editor.
* src/ui/theme.[ch]: add meta_theme_draw_frame_by_name, which
          is needed for the theme editor.


svn path=/trunk/; revision=4074
2009-01-11 04:48:54 +00:00
Jonathan Matthew
ee738f1d6f Defer hiding windows until effects finish
Add 'hide_after_effect' flag to MutterWindowPrivate, tracking
whether the window needs to be hidden after all outstanding effects
finish.

Set or clear the flag as appropriate in clutter_cmp_set_window_hidden.

In mutter_window_effect_completed, if hide_after_effect is TRUE
and no other effects are in progress, hide the window.
2009-01-05 20:26:47 +10:00
Tomas Frydrych
17c10f60d9 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
24823e19e0 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
c8e967ba1c 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
f7aa5f8653 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
6da5a5abcb Handle gconf errors better for string values in preferences. 2009-02-03 10:15:23 +00:00
Dan Winship
0fdb644454 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
f6a3ba26f9 Can't g_free() MetaDisplay GObject. 2009-02-03 09:11:32 +00:00
Tomas Frydrych
d1920788ac Move meta_display_get_tab_*() functions into display.h 2009-02-02 17:01:27 +00:00
Tomas Frydrych
fc1ff18ca7 Added meta_screen_(un)grab_all_keys() to keybindings.h. 2009-02-02 16:53:38 +00:00
Tomas Frydrych
5f9a4ab8cc 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
920a847508 --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
1e17ba1768 MetaWindow::raised signal. 2009-02-02 14:08:46 +00:00
Tomas Frydrych
e17377d407 MetaWindow::focus signal. 2009-02-02 11:00:13 +00:00
Tomas Frydrych
b47459af58 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
986bdac451 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
b5b37d72a3 Install keybindings.h 2009-01-29 15:14:25 +00:00
Tomas Frydrych
096e3dee8f Implemented meta_keybindings_set_custom_handler(). 2009-01-29 15:07:57 +00:00
Tomas Frydrych
e25282088b Expose keybindings data types; add user_data parameter the handler signature. 2009-01-29 14:53:03 +00:00
Tomas Frydrych
da36829f96 Rename keybindings.h to keybindings-private.h 2009-01-29 14:16:01 +00:00
Neil Roberts
ff5055834b Pass on MapNotify events to Clutter
Clutter needs to know about MapNotify events otherwise it will never
make the stage visible and nothing will paint.
2009-01-30 11:57:46 +00:00
Neil Roberts
b41abfd1f8 [mutter-shaped-texture] Use the new material api instead of raw GL calls
Now that Cogl has the material API we can use Cogl calls for
multi-texturing instead of directly calling GL.

The MutterShapedTexture actor keeps a handle to a material with the
right combine modes for combining the texture and the shape
mask. Before each paint it sets the layers of the material to be the
two textures.

A second material with different combine modes 1is also created if the
pixmap is 24 bit to implement the workaround from commit 72da8c57.
2009-01-30 11:56:58 +00:00
Thomas Wood
e1cc242b52 Port TextureFrame to the new materials and Clone API
Update TidyTextureFrame using clutter-0-9 branch of NbtkTextureFrame
2009-01-29 13:43:42 +00:00
Thomas Wood
4589d1246d Update to Clutter 0.9
Fixes various API breakage due to switching to Clutter 0.9.
2009-01-28 15:43:36 +00:00
Robert Bragg
66a5edd31a [mutter-shaped-texture] workaround multi-tex combine mode for RGB tfp textures
It seems that with the latest intel drivers when multi-texturing using an RGB
TFP texture, the texture is being setup internally as an RGBA texture, where
the alpha channel is mostly 0.0 so you only see a shimmer of the window. This
workaround forcibly defines the alpha channel as 1.0. Maybe there is some
clutter/cogl state that is interacting with this that is being overlooked,
but for now this seems to work. (Tested on i945 + DRI2)
2009-01-12 13:18:39 +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
4b3a8fefb6 Fixed mutter_window_is_override_redirect()
Broken in course of override redirect core changes.
2009-01-12 16:40:25 +00:00
Tomas Frydrych
ec0562550a Added meta_window_get_role(). 2009-01-12 12:30:31 +00:00
Tomas Frydrych
822e125492 Make sure we preserve pre-existing event mask on stage and overlay windows. 2009-01-09 16:28:12 +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
Tomas Frydrych
d6b974ba15 Print dl error message if load fails. 2009-01-06 11:31:45 +00:00
Tomas Frydrych
ec09ac49f6 Do not attempt to load plugin if module is not usable. 2009-01-06 10:09:16 +00:00
Thomas James Alexander Thurman
c311e96b63 alt-F10 toggles maximisation, alt-F5 only restores. Also rename
* src/include/all-keybindings.h: alt-F10 toggles maximisation,
          alt-F5 only restores.  Also rename "unmaximize" to "restore".
	* src/ui/frames.c: Rename "unmaximize" to "restore".
          Closes #343824.


svn path=/trunk/; revision=4064
2008-12-25 16:53:33 +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
151ddc08ec add screenshot commands which had mistakenly been removed; closes #564343,
* src/metacity.schemas.in.in: add screenshot commands which had
          mistakenly been removed; closes #564343, Launchpad bug 298463,
          Red Hat bug 474635, and probably others.


svn path=/trunk/; revision=4062
2008-12-24 20:39:00 +00:00
Thomas James Alexander Thurman
b81c7c48d5 fix move_to_corner_se
* src/include/all-keybindings.h: fix move_to_corner_se


svn path=/trunk/; revision=4061
2008-12-24 06:03:56 +00:00
Owen W. Taylor
e11100e584 Restore the ability to use the default effect implementations
The addition of method implementations in the base class in the
plugin-gobject branch broke the logic for checking to see
if a plugin didn't implement an effect. Requiring a mandatory
chain up to the base class is a fiddly anyways, so this patch
does the 'running' count computations in a different (and more
robust) way.

mutter-plugin.h mutter-plugin.c: Add _mutter_plugin_effect_started()
 to increment the running count.
mutter-plugin-manager.c: Call _mutter_plugin_effect_started()
 as necessary.
mutter-plugin.c: Remove the "real" methods that did nothing
 but implement the runnning count.
plugins/default.c: Remove chain-ups.
2008-12-22 16:53:10 -05: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
Thomas James Alexander Thurman
38faa8fe10 when the user double-clicks the title bar, end the grab op. Closes
* src/ui/frames.c: when the user double-clicks the title bar,
	  end the grab op.  Closes #401028.


svn path=/trunk/; revision=4059
2008-12-19 12:47:11 +00:00
Thomas James Alexander Thurman
45f2ec5f64 patches to fixes for -Wall. Closes #562939.
* src/core/iconcache.c: patches to fixes for -Wall.  Closes #562939.


svn path=/trunk/; revision=4049
2008-12-02 08:15:00 +00:00
Thomas James Alexander Thurman
3b1e91342e gnome-doc-tools version doesn't need to be so high. disable the entire
* configure.in: gnome-doc-tools version doesn't need to be so high.
	* src/compositor/compositor-xrender.c: disable the entire file if the
          compositor is disabled.
	* src/core/async-getprop.[ch]: fixes for -Wall
	* src/core/iconcache.c: fixes for -Wall
	* src/core/testasyncgetprop.c: fixes for -Wall
	* src/core/xprops.c: fixes for -Wall


svn path=/trunk/; revision=4045
2008-12-01 22:54:57 +00:00
Thomas James Alexander Thurman
cf2206352f add casts (#562106)
* src/core/xprops.c: add casts (#562106)


svn path=/trunk/; revision=4038
2008-11-25 23:18:08 +00:00