Skip to content
  • Carlos Garnacho's avatar
    backends: Avoid orientation changes around suspend/resume if locked · d1245092
    Carlos Garnacho authored and Robert Mader's avatar Robert Mader committed
    We currently lock the capability of the MetaOrientationManager to emit
    the ::orientation-changed signal, but otherwise keep reading the current
    orientation and returning it if we are asked politely through
    meta_orientation_manager_get_orientation().
    
    This may bring issues e.g. around suspend/resume, since there may be other
    parts of the code trying to get the current orientation without receiving
    ::orientation-changed signals, this may result in the display orientation
    being effectively rotated, then stay locked after that.
    
    In order to fix this, make the MetaOrientationManager return a fixed
    orientation while locked, only updated after changes in the lock state.
    
    Closes: #2600
    Part-of: <!3021>
    
    (cherry picked from commit b5900dd9)
    d1245092