mirror of
https://github.com/brl/mutter.git
synced 2025-01-23 09:59:03 +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
a967d479c5
commit
0c0973bbd8
@ -1714,12 +1714,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…
x
Reference in New Issue
Block a user