diff options
author | Richard Grenville <[email protected]> | 2012-10-03 21:13:34 +0800 |
---|---|---|
committer | Richard Grenville <[email protected]> | 2012-10-03 21:21:43 +0800 |
commit | 3ef937670802ae09662065e23f34355f828bb52b (patch) | |
tree | eb879b8223b925fef6674d07293e2a60d276ab2a /compton.h | |
parent | 11e27d354bbf248226e22e31f2c69a9bb8f5666c (diff) | |
download | tdebase-3ef937670802ae09662065e23f34355f828bb52b.tar.gz tdebase-3ef937670802ae09662065e23f34355f828bb52b.zip |
Improvement: Support reading _NET_WM_OPACITY from client windows
- Some WMs don't respect Keith Packard's proposal of
_NET_WM_WINDOW_OPACITY, and do not copy _NET_WM_OPACITY attribute of a
client window to its frame windows, thus cause opacity set by
non-override-redirect windows to have no effect. This commit adds
support for reading _NET_WM_OPACITY from client windows if running
with --detect-client-opacity. Thanks to pvanek for reporting.
- Change Makefile logic to determine options from 3 variables
(NO_LIBCONFIG, NO_REGEX_PCRE, NO_REGEX_PCRE_JIT) instead of CFG to
ensure compatibility when we add new options. CFG variable is no
longer been respected.
Diffstat (limited to 'compton.h')
-rw-r--r-- | compton.h | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -198,6 +198,10 @@ typedef struct _win { opacity_t opacity_cur; /// Cached value of opacity window attribute. opacity_t opacity_prop; + /// Cached value of opacity window attribute on client window. For + /// broken window managers not transferring client window's + /// _NET_WM_OPACITY value + opacity_t opacity_prop_client; /// Alpha mask Picture to render window with opacity. Picture alpha_pict; @@ -302,7 +306,12 @@ typedef struct _options { /// Whether inactive_opacity overrides the opacity set by window /// attributes. Bool inactive_opacity_override; + /// Frame opacity. Relative to window opacity, also affects shadow + /// opacity. double frame_opacity; + /// Whether to detect _NET_WM_OPACITY on client windows. Used on window + /// managers that don't pass _NET_WM_OPACITY to frame windows. + Bool detect_client_opacity; /// How much to dim an inactive window. 0.0 - 1.0, 0 to disable. double inactive_dim; @@ -780,7 +789,7 @@ static void unmap_win(Display *dpy, Window id, Bool fade); static opacity_t -get_opacity_prop(Display *dpy, win *w, opacity_t def); +wid_get_opacity_prop(Display *dpy, Window wid, opacity_t def); static double get_opacity_percent(Display *dpy, win *w); |