Skip to content

Commit

Permalink
[display] Normalize placeholder topmost window pid values. Fixes JB#5…
Browse files Browse the repository at this point in the history
…4297

It used to be that lipstick reported topmost window pid with value -1
when there was no application windows on screen. However due to some
recent change nowadays (also) pid value zero seems to be used in such
situations. As the pid value is used by mce for detecting situations
where some application window is on screen despite lockscreen being
active, there are subtle problems with for example blanking timers and
fingerprint wakeup handling.

Normalize pid values within mce so that -1 is used whenever lipstick
reports value that is less than or equal to zero.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jolla.com>
  • Loading branch information
spiiroin committed May 18, 2021
1 parent f4644db commit 1325983
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/display.c
Expand Up @@ -5847,6 +5847,13 @@ static waitfb_t mdy_waitfb_data =
static void
mdy_topmost_window_set_pid(int pid)
{
/* If there is no active application window, lipstick can report
* pid as zero or -1 depending on details that are currently not
* relevant from mce point of view -> normalize and use -1 value.
*/
if( pid <= 0 )
pid = -1;

if( topmost_window_pid == pid )
goto EXIT;

Expand Down

0 comments on commit 1325983

Please sign in to comment.