Skip to content
  • Giovanni Campagna's avatar
    MetaIdleMonitor: fire immediately watches that are already expired · 389e04c7
    Giovanni Campagna authored
    The XSync semantics mandate that alarms already expired will not
    fire until the counter is reset and the alarm triggered again, so
    clients traditionally called get_idle_time() first to see if they
    should install the alarm.
    This is inherently racy, as by the time the call is handled by
    mutter and the reply received the idle time could be different.
    Instead, if we see that the watch would have fired in the past,
    fire it immediately.
    
    This is a behavior change, but it's a compatible one, as all legacy
    clients are calling get_idle_time() first, and it was perfectly
    possible for the idle time counter to trigger the alarm right
    after the get_idle_time() call.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707302
    389e04c7