mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
window-props: _NET_WM_WINDOW_OPACITY range is 0xffffffff to 0
After reading the atom, scale the value from 0xffffffff to 0xff. Not doing so causes Clutter to truncate the opacity value, and only read the last two digits. Hence, 0x7fffffff (50%) becomes 0xff (100%). https://bugzilla.gnome.org/show_bug.cgi?id=727874
This commit is contained in:
parent
feca0fb512
commit
ab0bd59f5e
@ -1594,12 +1594,12 @@ reload_window_opacity (MetaWindow *window,
|
||||
gboolean initial)
|
||||
|
||||
{
|
||||
int requested_value = 0xFF;
|
||||
guint8 opacity = 0xFF;
|
||||
|
||||
if (value->type != META_PROP_VALUE_INVALID)
|
||||
requested_value = (int) value->v.cardinal;
|
||||
opacity = (guint8)((gfloat)value->v.cardinal * 255.0 / ((gfloat)0xffffffff));
|
||||
|
||||
meta_window_set_opacity (window, requested_value);
|
||||
meta_window_set_opacity (window, opacity);
|
||||
}
|
||||
|
||||
#define RELOAD_STRING(var_name, propname) \
|
||||
|
Loading…
Reference in New Issue
Block a user