Wrong rotation on screen unlock if previously in landscape
Locking the screen in landscape mode I have a wrong rotation (180 degrees too much) after unlocking the screen.
Currently running phosh 0.4.3-3mobian1
(the applied patches shouldn't really matter in phoshs case)
and phoc-0.4.2-1mobian2
(with the direction change applied https://gitlab.com/mobian1/packages/phoc/-/commit/90fb012ca283336b503125b9eca0fad124a2b9c9 == !187 (merged) ) on the PineTab.
Steps to reproduce:
- (re)start phosh
- login
- change to landscape mode
- lock the screen
- unlock the screen
- now the screen has a
WL_OUTPUT_TRANSFORM_270
Debugging shows that phosh_shell_rotate_display
is called with degrees set to 90
but phosh_shell_get_rotation
returns 270!
See this gdb output from phosh:
(gdb) b phosh_shell_rotate_display
Breakpoint 1 at 0xaaaad79af080: file ../src/shell.c, line 640.
(gdb) b ../src/lockscreen-manager.c:75
Breakpoint 2 at 0xaaaad79a2ac0: file ../src/lockscreen-manager.c, line 75.
(gdb) b ../src/lockscreen-manager.c:166
Breakpoint 3 at 0xaaaad79a3260: file ../src/lockscreen-manager.c, line 166.
(gdb) c
Continuing.
[Thread 0xffff960c1c40 (LWP 3221) exited]
[New Thread 0xffff960c1c40 (LWP 3612)]
[Detaching after fork from child process 3619]
Thread 1 "phosh" hit Breakpoint 2, lockscreen_unlock_cb (self=0xaaaad807e4a0, lockscreen=0xaaaad7fc8370)
at ../src/lockscreen-manager.c:75
75 ../src/lockscreen-manager.c: No such file or directory.
(gdb) #unlocking
(gdb) p priv->rotation
$1 = 0
(gdb) c
Continuing.
Thread 1 "phosh" hit Breakpoint 1, phosh_shell_rotate_display (self=0xaaaad7f650e0, degree=0) at ../src/shell.c:640
640 ../src/shell.c: No such file or directory.
(gdb) c
Continuing.
# rotating to landscape
Thread 1 "phosh" hit Breakpoint 1, phosh_shell_rotate_display (self=0xaaaad7f650e0, degree=90) at ../src/shell.c:640
640 in ../src/shell.c
(gdb) c
Continuing.
[Thread 0xffff960c1c40 (LWP 3612) exited]
[New Thread 0xffff960c1c40 (LWP 3622)]
[Thread 0xffff960c1c40 (LWP 3622) exited]
# locking
Thread 1 "phosh" hit Breakpoint 3, lockscreen_lock (self=0xaaaad807e4a0) at ../src/lockscreen-manager.c:166
166 ../src/lockscreen-manager.c: No such file or directory.
(gdb) p priv->rotation
$2 = 270
Edited by Evangelos Ribeiro Tzaras