~kdub/unity-system-compositor/silo0-n7-fix

« back to all changes in this revision

Viewing changes to src/mir_screen.cpp

Don't enable proximity for notifications when the screen is already on.

Approved by Cemil Azizoglu, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
    if (mode == MirPowerMode::mir_power_mode_on &&
147
147
        reason == PowerStateChangeReason::notification)
148
148
    {
149
 
        allow_proximity_to_turn_on_screen = true;
150
 
        screen_hardware->enable_proximity(true);
 
149
        if (current_power_mode != MirPowerMode::mir_power_mode_on)
 
150
        {
 
151
            allow_proximity_to_turn_on_screen = true;
 
152
            screen_hardware->enable_proximity(true);
 
153
        }
151
154
        reset_timers_ignoring_power_mode_l(reason);
152
155
        return;
153
156
    }