[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
I looked into the log file, and this is the scenario:

22:18:07 1239817154 =========================POWER_STATE_ON============================

22:18:07 1239817154 resumeSeconds POWER_STATE_ON: 166687

22:18:07 1239817154 PowerOnRequest()

...

22:18:07 782373814 POWER_ON_REQUEST

22:18:07 782373814 SetPowerStateOn(true)

22:18:07 782373814 IsConnectedCall(false)

22:18:07 782373814 =======================EnableInput()============================

22:18:07 782373814 SetDisabledPanelAndButtons(false)

22:18:07 782373814 SetDisabledPanelOnly(false)

22:18:07 782373814 HookTouchPanel(false)

22:18:07 782373814 SetWindowLong result: 1

22:18:07 1239817154 SetBackLightOff(false)

22:18:07 1239817154 SetCallStatus(CALL_INCOMING): 0

22:18:07 1239817154 NotificationCallStatusIncoming()

22:18:07 782373814 ClockWndProc(WM_TIMER): 19

22:18:07 782373814 NOTIFY_CALLSTATUS_INCOMING

22:18:07 782373814 SetLocked()

22:18:07 782373814 SetLockMode(true)

22:18:07 782373814 IsConnectedCall(false)

22:18:07 782373814 Lock(true)

22:18:07 782373814 ==================================Lock=============================(true)

22:18:07 782373814 SetLocked(true)

22:18:07 782373814 ==========================DisableInput()==============================

22:18:07 782373814 SetDisabledPanelAndButtons(true)

22:18:07 782373814 SetDisabledPanelOnly(true)

22:18:07 782373814 HookTouchPanel(true)

22:18:07 782373814 TouchRegisterWindow Ok

22:18:07 782373814 SetWindowLong result: 2

22:18:07 782373814 SetDisabledPanelAndButtons: nothing to do

22:18:07 782373814 ===== DestroyLockedWindow() ======

22:18:07 782373814 ClockWndProc(WM_WINDOWPOSCHANGED)

22:18:07 782373814 InvalidateClock()

22:18:07 782373814 ===== CreateLockedWindow() ======

22:18:07 782373814 ComputeClockXY Portrait: X:0 Y:0 Width:480 Height:2

22:18:07 782373814 InvalidateClock()

22:18:07 782373814 No vibrate/beep, incoming call

22:18:07 782373814 SetDisabledPanelOnly(false)

22:18:07 782373814 HookTouchPanel(false)

22:18:07 782373814 SetWindowLong result: 1

22:18:07 782373814 TouchUnregisterWindow done

22:18:07 782373814 TouchUnregisterWindow done

22:18:07 782373814 KBHook: UnhookWindowsHookEx

22:18:07 782373814 SetUnlocked()

22:18:07 782373814 SetLockMode(false)

22:18:07 782373814 Lock(false)

22:18:07 782373814 ==================================Lock=============================(false)

22:18:07 782373814 SetLocked(false)

22:18:07 782373814 =======================EnableInput()============================

22:18:07 782373814 SetDisabledPanelAndButtons(false)

22:18:07 782373814 SetDisabledPanelOnly(false)

22:18:07 782373814 SetDisabledPanelOnly: nothing to do

22:18:07 782373814 SetDisabledPanelAndButtons: nothing to do

22:18:07 782373814 No vibrate/beep, incoming call

22:18:07 782373814 ===== DestroyLockedWindow() ======

22:18:07 782373814 ClockWndProc(WM_WINDOWPOSCHANGED)

So the power on request wants to unlock, and the incoming call wants to lock. But both are running on the main thread (782373814) and they interrupt each others, strangely enough. I would have expected that the first request would be ended, before the next request was started. I have seen this before, and I thought this was not possible in Windows Mobile :confused:

I have to think about this, how to solve this beast, because the attempts I did till now, did not succeed. I did not want to have locking in place (because it was expecting nicely runnning on the main thread after each other), but apparently I have to synchronize/lock :mad:

Anyone a better idea, that an operation on the main thread is pre-empted, continued with another on the main thread and later on, continue with the first one :confused: