API to detect active session in Mac OS X with fast user switch

后端 未结 3 1044
生来不讨喜
生来不讨喜 2021-01-18 03:07

On Mac OS X Snow Leopard with fast user switching enabled, is there an API to detect whether or not my application is running in the active user session? I.e. the session cu

3条回答
  •  误落风尘
    2021-01-18 03:41

    From "Introduction to Multiple User Environments" i can only think of one thing that could fit your needs: User Switch Notifications. So if your application starts it clearly must be in the active session. Now you can use a user switch notification for setting the new state, i. e. that the application does not run anymore in the active session.

提交回复
热议问题