1
0
Fork 0
Commit graph

217 commits

Author SHA1 Message Date
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
Tomas Frydrych
3e754a6f35 Fixed handling of _NET_WM_WINDOW_OPACITY. 2009-02-06 11:16:33 +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
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
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
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
822e125492 Make sure we preserve pre-existing event mask on stage and overlay windows. 2009-01-09 16:28:12 +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
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
Owen W. Taylor
e083742426 Filter out events handled before the plugin before they get GTK+
Fix a problem where GTK+ was warning
'gdk_window_set_user_time called on non-toplevel' for every button
press and click on the mutter stage by excluding such events from
GTK+ processing.

Add a boolean return value to meta_compositor_process_event that
indicates whether the event has been handled and should be filtered
out of the event stream and for mutter, base that on the return
value of the plugin's xevent_filter vfunc.
2008-11-22 13:07:32 -05:00
Jonathan Matthew
e5fc168a46 ignore minimizing windows in resize_win 2008-12-19 14:08:38 +10:00
Owen W. Taylor
be7067bc0a Handle 0x0 textures by skipping paint/pick
Before we've retrieved a pixmap for a window, the shaped texture
has a 0x0 texture, which will cause mutter_shaped_texture_ensure_mask()
to crash. Just skip all of paint/pick in this case.

http://bugzilla.openedhand.com/show_bug.cgi?id=1283
2008-11-22 11:19:17 -05:00
Owen W. Taylor
af8d281556 Add a few doc comments with annotations
Add (transfer none) annotations to mutter_window_get_texture()
and mutter_window_get_meta_window(), and while add doc comments,
actually add some docs as well.
2008-11-07 03:23:39 -05:00
Tomas Frydrych
0f73a011ce Fix module use tracking. 2008-12-18 12:56:32 +00:00
Tomas Frydrych
53cea00323 Fix following the renaming of meta_window_get_type() to meta_window_get_window_type(). 2008-12-18 12:46:53 +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
ab2e925b65 Fixed xrender compositor following compositor API changes. 2008-12-18 12:37:34 +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
Tomas Frydrych
c61eb77a70 GObjectified MutterPlugin. 2008-12-17 09:33:56 +00:00
Robert Bragg
13badba158 Adds a clear warning when GLX TFP is not being used
Since this is the most common cause of performance issues, this makes it
clearer when GLX TFP isn't being used. Note, there was a corresponding
fix to clutter_glx_texture_pixmap_using_extension() committed last week
as r3559 in the 0.8 branch.
2008-12-08 12:39:37 +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
Robert Bragg
f956853550 No longer handle ConfigureNotify events directly in mutter
We are now informed of window moves/resizes via callbacks from
src/core instead.
2008-11-27 13:40:52 +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
Neil Roberts
1ba3b3dd7d [mutter-shaped-texture] Create a rectangle texture if needed
If the window texture was created using the GL_TEXTURE_RECTANGLE_ARB
extension then also create a rectangle texture for the shape texture.
2008-11-17 16:15:00 +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
f3a8b2f12e Removed unused variable. 2008-11-07 10:14:36 +00:00
Tomas Frydrych
dcd350dd90 Fixed broken g_object_set_property() call.
Fixing this broken stuff, so it is disabled.
2008-11-07 10:13:40 +00:00
Owen W. Taylor
f826fb1d9a Support GL_ARB_texture_rectangle in MutterShapedTexture
mutter-shaped-texture.c: Retrieve the target from the cogl_texture
  and use it, instead of hardcoding GL_TEXTURE_2D.
2008-11-05 17:45:00 -05:00
Matthew Allum
123f4df31b Add support for setting MUTTER_DISABLE_MIPMAPS env var. 2008-11-05 11:48:07 +00:00
Robert Bragg
8f8097aa2c Removes some g_print debugging 2008-11-03 17:49:24 +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
cfa45beee1 exposes meta_window_showing_on_its_workspace via mutter_window_showing_on_its_workspace
This e.g. allows a switcher plugin to determine if a mutter window corresponds
to a minimized or visible window
2008-11-03 14:45:28 +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
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
Owen W. Taylor
20ce1e77d9 Don't show_all() the stage and overlay group at initialization.
Calling clutter_actor_show_all() on the stage and overlay_group breaks
the ability for plugins to create initially hidden actors. Call
clutter_actor_show() instead.
2008-10-31 18:59:04 -04:00
Owen W. Taylor
15daecacdc Allow absolute paths instead of plugin names
If a mutter plugin name (in GConf, or more likely on the command line)
looks like an absolute path, use that path directly rather than
looking for the plugin in the plugins directory.
2008-10-31 02:13:53 -04:00
Owen W. Taylor
6683b5efff Clean up messages when loading plugins
Remove a "got here" leftover, remove unnecessary trailing \n when
calling g_message(), include g_module_error() in the output when
loading a module fails.
2008-10-29 14:40:51 -04:00
Owen W. Taylor
783e51281a Fix installation with --disable-static
If --disable-static is passed to configure, then .a files won't be built
or installed. Make removing them in install-exec-hook not fatal if they
don't exist.
2008-10-29 11:58:43 -04:00
Tomas Frydrych
f80e39e2ca mutter_plugin_get_screen() 2008-11-03 10:07:12 +00:00
Tomas Frydrych
685bbb2e64 Fixed format 2008-11-03 09:59:01 +00:00
Matthew Allum
e85f67f564 Fix minor warning 2008-10-31 23:37:46 +00:00
Matthew Allum
eeb762e1e2 Remove overlay debug message. 2008-10-31 23:12:40 +00:00
Matthew Allum
3991e82539 Set TFP texture filter-quality to high (as to enable mipmaps) 2008-10-31 16:28:33 +00:00
Tomas Frydrych
312cbf3e04 Added G_MODULE_BIND_LOCAL for plugin load.
See http://bugzilla.openedhand.com/show_bug.cgi?id=1216.
2008-10-31 08:08:08 +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
b2fe0097e6 mutter_plugin_get_xdisplay() 2008-10-29 13:27:35 +00:00
Tomas Frydrych
e4501f801e mutter_plugin_set_stage_input_region() 2008-10-29 13:03:03 +00:00
Tomas Frydrych
7bef175590 MUTTER_PLUGIN_DIR variable/define
Define for use in plugin manager
  Makefile variable for plugin pc file and plugin installation.
2008-10-29 10:28:48 +00:00
Tomas Frydrych
a4a102726e Removed tridy-grid and scratch plugin 2008-10-29 09:01:50 +00:00
Matthew Allum
a42ea69d0e Tweak workspace switcher to display all windows 2008-10-28 23:04:51 +00:00
Tomas Frydrych
8f594c93cd Added StructureNotifyMask for override redirect windows.
We need to be getting ConfigureNotify events for these, so we can respond
    to changes in position of these windows. We cannot add this to windows
    Metacity manages, as this makes it got mental.
2008-10-28 13:02:33 +00:00
Tomas Frydrych
8f8a193c7e Revert "Add StructureNotifyMask windows the compositor is interested in."
This reverts commit f76f4dc898c435d9a15bc96a9aad89526f69fcb2.
2008-10-28 12:27:30 +00:00
Matthew Allum
c283fbe9b3 Merge branch 'clutter' of ssh://gitserver@git.o-hand.com/metacity-clutter into clutter 2008-10-28 11:34:05 +00:00
Matthew Allum
53d89a7fd5 Tweak/fix/improve workspace switching effect 2008-10-28 11:30:29 +00:00
Tomas Frydrych
68c2f75558 Changes necessary to build plugins out of tree:
metacity-plugins.pc.in
  installation necessary header files
  fixed misplaced inclusion of config.h
2008-10-28 10:45:45 +00:00
Tomas Frydrych
2a3445c865 Add StructureNotifyMask windows the compositor is interested in. 2008-10-27 17:17:09 +00:00
Tomas Frydrych
b1c5a2e221 Added mutter_get_plugin() to mutter-plugin.h
So we can completely hide the struct name from plugins.
2008-10-27 10:34:32 +00:00
Tomas Frydrych
1d6e70a49d Fixed stale comment. 2008-10-27 09:38:21 +00:00
Tomas Frydrych
310970a91b De-C99fied default and scratch plugins. 2008-10-27 09:33:58 +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
Matthew Allum
273d213509 Integrate in Ebassi's workspace switching code from ui-hackfest branch. 2008-10-23 15:36:33 +01:00
Matthew Allum
4d441a6f7b Make the overlay message a little less in your face.. 2008-10-23 12:53:01 +01:00
Tomas Frydrych
3cc7b2c74d Fixed how windows are added to avoid duplication. 2008-10-22 17:12:15 +01:00
Tomas Frydrych
275cccb136 Fixed process_reparent() 2008-10-22 14:40:06 +01:00
Iain Holmes
be11a6bf72 Allow framed ARGB windows to have a shadow
When creating the drop shadow source, just have a translucent centre
2008-10-21 16:51:18 +01:00
Tomas Frydrych
0684ef95c5 Fixed up stage reactivity bug. 2008-10-21 08:58:44 +01:00
Tomas Frydrych
775cb1f4a4 Removed plugin .features member (no longer required); reanambled all effects in scratch plugin by popular demand. 2008-10-20 13:04:46 +01:00
Tomas Frydrych
8a0ffa93eb Merge branch 'clutter' of ssh://gitserver@git.o-hand.com/metacity-clutter into clutter 2008-10-20 08:54:03 +01:00
Tomas Frydrych
7ddb3a4663 Disabled event effects; disable_stage() convenience function. 2008-10-20 08:52:38 +01:00
Robert Bragg
9a66ce6b01 Removes unused files: compositor-clutter-plugin-manager.c and compositor-clutter-plugin.h 2008-10-17 17:12:57 +01:00
Robert Bragg
08c3c187eb Removes the running counter from the plugins and instead manage it internally
to the plugin manager
2008-10-17 17:10:15 +01:00
Tomas Frydrych
b422faa4fe Fixed build when building without --with-clutter 2008-10-17 12:45:45 +01:00
Tomas Frydrych
a8dd848ca4 Connect to captured-event signal on stage for generic panel processing
This is to allow the panel to handle events the normal way without interference
2008-10-17 11:02:04 +01:00
Tomas Frydrych
143cb3d60b white space tweaks 2008-10-17 07:25:18 +01:00
Tomas Frydrych
92610f53c3 renamed DefaultPluginState to PluginState 2008-10-17 07:23:34 +01:00
Tomas Frydrych
30ece059cf whitespace cleanup; use g_slice in scratch plugin. 2008-10-16 23:29:24 +01:00
Tomas Frydrych
1e59d63e31 adjusted panel color and opacity 2008-10-16 23:08:12 +01:00
Tomas Frydrych
7380163eaf Renamed moblin.c to avoid confusion 2008-10-16 23:04:32 +01:00
Tomas Frydrych
dc33ad1adf Merge branch 'moblin-plugin' into clutter
Conflicts:

	src/compositor/clutter/compositor-clutter-plugin-manager.c
	src/compositor/mutter/plugins/Makefile.am
	src/compositor/mutter/plugins/moblin.c
	src/include/compositor-clutter-plugin.h
	src/include/compositor-clutter.h
2008-10-16 23:02:34 +01:00
Tomas Frydrych
b5414c27a3 sliding panel 2008-10-16 15:50:03 +01:00
Robert Bragg
2f790b0165 This changes the meta_compositor_clutter namespacing to simply "mutter" which
helps makes code much more readable.
2008-10-16 12:50:01 +01:00
Tomas Frydrych
d185a84140 Api to set specific input region on stage from plugins. 2008-10-16 12:16:08 +01:00
Tomas Frydrych
749698eb54 connect xevent handler 2008-10-16 10:42:03 +01:00
Tomas Frydrych
6323467879 Fixed input mask on overlay window to get pointer and key events. 2008-10-16 10:41:34 +01:00
Tomas Frydrych
d94a34a2c1 disabled workspace switch effect 2008-10-16 08:27:46 +01:00
Tomas Frydrych
9005e4a68f set panel width to match screen 2008-10-16 08:26:37 +01:00
Tomas Frydrych
9e4f5a26dd hook moblin plugin into stage reactivity API 2008-10-16 08:05:50 +01:00
Tomas Frydrych
ae906b318a API for enabling/disabling input to stage window. 2008-10-16 07:50:49 +01:00
Tomas Frydrych
8d373e009d Process motion events on stage to handle panle closing. 2008-10-16 00:06:20 +01:00
Tomas Frydrych
f0364b2eed Panel sliding 2008-10-15 18:14:52 +01:00
Tomas Frydrych
5af56eebd1 panel slide timeout 2008-10-15 17:57:41 +01:00
Tomas Frydrych
5f3e27bbd7 Mockup panel, xevent skeleton. 2008-10-15 17:50:06 +01:00