Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display Cocoa window above Keynote presentation

Some context: I am building a tool to be used on screen during a Keynote or PowerPoint presentation.

The biggest issue I've had so far is that Keynote seems to take over the desktop whenever you view a presentation. I have tried setting my Cocoa window's level to the maximum using:

[[self window] setLevel:kCGMaximumWindowLevel];

That seems to have some effect (I can have the window hover over Keynote's "control panel" that's active in the off-screen window), but it doesn't let me hover over the actual presentation.

Any ideas? Thanks in advance for the help!

like image 622
Anson MacKeracher Avatar asked Feb 24 '23 23:02

Anson MacKeracher


2 Answers

Keynote has some settings in its Preferences that also must be set. Try these:

/usr/bin/defaults write com.apple.iWork.Keynote PresentationModePlayWellWithOthers 1
/usr/bin/defaults write com.apple.iWork.Keynote MouseVisibility 2

Definitely the 1st one is required. The 2nd is just for practicality.

This is in addition to what Rob suggested above in setting the window level to just above the NSScreenSaverWindowLevel.

like image 58
speby Avatar answered Mar 06 '23 00:03

speby


Try setting the level to NSScreenSaverWindowLevel + 1.

like image 30
Rob Keniger Avatar answered Mar 06 '23 01:03

Rob Keniger