Fast user switching hides CALayer

I have a cocoa GUI application that starts automatically when the computer wakes up from sleep. The application starts in several user accounts at the same time and at some point starts in the user account, which is not the current user displayed on the screen (that is, the active user of the console). This is where the problem arises.

I have a custom view that uses CALayer to display the composition of several different images. CALayer NSView contains two sublayers, one of which also contains two sublayers. When the application is launched in the active user account by the user, there are no problems. When the application is launched by an automatic script in an inactive user account, the user NSView does not draw any of the CALayers. I injected F-Script into the application until it drew CALayer, and noticed that the custom NSView layer did not contain sublayers ! Note that the level setup code is contained in -awakeFromNib custom NSView. I tried calling -awakeFromNib manually when the custom NSView was not drawing and it fixed the problem (although it installed sublayers correctly).

I searched the network and found this bit of information:

In OS X v.10.4 and later, the display line flow automatically stops if the user uses Fast User Switching. After returning to the original user, the link to the display restarts.

I know that my problem is that the user does not have a link to the active screen ("good" CGContext link?), But I did not receive any error messages and did not have the ability of Quartz / Core Animation to point me in the right direction.

Thank you in advance for your help!

+6
cocoa core-animation calayer
source share

No one has answered this question yet.

See related questions:

354
Fast and Fast PDF Viewer for iPhone / iPad / iOs - Tips and Tricks?
3
Subview NSView or CALayer?
3
How can I make CALayer and all its sublayers Zoom proportionally?
3
Seal CALayers
2
NSViewController. Core Animation candlestick not running
one
Using Core Animation / CALayer for Simple Multilayer Painting
one
hosted by CALayer in NSView changes
one
Inside CALayer drawInContext: is called, but does not refresh the screen
one
CALayer, CAConstraint and disabling animation
0
Line drawing on CALayer in OSx

All Articles