Skip to content
  • Owen W. Taylor's avatar
    Compress motion synchronized with the paint cycle · a69285da
    Owen W. Taylor authored
    When we have pending motion events, instead of delivering them
    directly, request the new FLUSH_EVENTS phase of the frame clock.
    This allows us to compress repeated motion events sent to the
    same window.
    
    In the FLUSH_EVENTS phase, which occur at priority GDK_PRIORITY_EVENTS + 1,
    we deliver any pending motion events then turn off event delivery
    until the end of the next frame. Turning off event delivery means
    that we'll reliably paint the compressed motion events even if more
    have arrived.
    
    Add a motion-compression test case which demonstrates behavior when
    an application takes too long handle motion events. It is unusable
    without this patch but behaves fine with the patch.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=685460
    a69285da