mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
idle-monitor: Store either 1 or 0 in the inhibited gboolean
Wrap the flag checking in !!(..) to make sure we always either store TRUE or FALSE in the gboolean.
This commit is contained in:
parent
1bfa20929b
commit
7c06e21e5a
@ -226,7 +226,7 @@ meta_idle_monitor_inhibited_actions_changed (GDBusProxy *session,
|
||||
{
|
||||
gboolean inhibited;
|
||||
|
||||
inhibited = g_variant_get_uint32 (v) & GSM_INHIBITOR_FLAG_IDLE;
|
||||
inhibited = !!(g_variant_get_uint32 (v) & GSM_INHIBITOR_FLAG_IDLE);
|
||||
g_variant_unref (v);
|
||||
|
||||
if (!inhibited)
|
||||
@ -265,7 +265,8 @@ meta_idle_monitor_init (MetaIdleMonitor *monitor)
|
||||
"InhibitedActions");
|
||||
if (v)
|
||||
{
|
||||
monitor->inhibited = g_variant_get_uint32 (v) & GSM_INHIBITOR_FLAG_IDLE;
|
||||
monitor->inhibited = !!(g_variant_get_uint32 (v) &
|
||||
GSM_INHIBITOR_FLAG_IDLE);
|
||||
g_variant_unref (v);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user