After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 603066 - API allowing plugins to provide custom shadow implementation
API allowing plugins to provide custom shadow implementation
Status: RESOLVED WONTFIX
Product: mutter
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2009-11-26 17:13 UTC by Tomas Frydrych
Modified: 2011-01-04 16:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for custom shadow generation (34.67 KB, patch)
2009-11-26 17:13 UTC, Tomas Frydrych
none Details | Review
updated patch (35.19 KB, patch)
2009-11-27 12:37 UTC, Tomas Frydrych
none Details | Review

Description Tomas Frydrych 2009-11-26 17:13:44 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.
Comment 1 Tomas Frydrych 2009-11-27 12:37:05 UTC
Created attachment 148588 [details] [review]
updated patch
Comment 2 Owen Taylor 2009-11-30 19:02:37 UTC
What's the use case? Do you see plugins drawing different shadows, or just better shadows?
Comment 3 Tomas Frydrych 2009-12-01 08:16:06 UTC
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).
Comment 4 Owen Taylor 2010-04-12 17:45:04 UTC
(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.
Comment 5 Owen Taylor 2011-01-04 16:09:17 UTC
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.