GNOME Bugzilla – Bug 603066
API allowing plugins to provide custom shadow implementation
Last modified: 2011-01-04 16:09:17 UTC
Created attachment 148542 [details] [review] Patch for custom shadow generation [MutterShadow] An API allowing plugins to generate their custom shadows The commmit adds new vfunction get_shadow() to MutterPluginClass, allowing plugins to replace the stock gaussian shadow with a custom actor. The shadow is encapsulated in a MutterShadow structure that contains the custom actor, and four points of attachment describing the position and size of the shadow relative to the window. In addition, this commit replaces the MutterWindow::no-frame boolean property with shape-type emum property which allows to force and disable the shadow on a given window, or leave the compositor to decide. The plugin API version number is bumped by one.
Created attachment 148588 [details] [review] updated patch
What's the use case? Do you see plugins drawing different shadows, or just better shadows?
You could do both, that is provide shadow that better integrates with your shell look and feel, but also have different shadows for different window types (the intended moblin use is to draw a specific shadow for dock-type windows).
(In reply to comment #3) > You could do both, that is provide shadow that better integrates with your > shell look and feel, but also have different shadows for different window types > (the intended moblin use is to draw a specific shadow for dock-type windows). Drawing shadows is pretty tightly integrated with drawing the window graph in an optimized fashion, so the idea of having opaque shadow actors that we know nothing about doesn't appeal to me much. Plus drawing nice shadows is pretty hard even leaving out optimizations, so it's not good to have duplicated code. We know that we need to do a better job of drawing the built-in shadows in a prettier and more theme-customizable fashion. Bug 592382 is the tracker bug for that. Are there any sort of shadows that can't be done as parameterization of shadow code that lives in Mutter? We could make the blur radius/offset customizable on a per-window basis.
We know have pretty powerful shadow customization features in the core (MetaShadowFactory, shadow-class property on MetaWindowActor), I don't think custom implementations are necessary.