Skip to content
  • Olivier Fourdan's avatar
    common: Avoid zero refresh rate for monitor · c697a54a
    Olivier Fourdan authored
    
    
    The function gdk_monitor_get_refresh_rate() can return 0 if there is no
    real monitor attached (as with Xephyr or VNC for example).
    
    The compositor use the value as a divisor to compute the frequency of
    refresh when zooming, and if the value is 0, xfwm4 will crash with a
    floating point exception (division by zero error).
    
    Make sure we return something even if gdk_monitor_get_refresh_rate()
    cannot get us a real refresh rate.
    
    Signed-off-by: default avatarOlivier Fourdan <fourdan@xfce.org>
    c697a54a