Mac OpenGL : No sound volume overlay in fullscreen - macos

I have an OpenGL-based app that can run windowed or fullscreen in OS X 10.5. While in windowed mode, pressing the volume keys in the keyboard changes the volume setting (mute/unmute for example) and the OSX-drawn speaker icon overlay is drawn, as it happens with every other application.
However, in full screen mode, pressing the keys does change the volume setting, but no overlay is drawn - I can't figure out why, since I'm not doing anything different.
Any ides?

When you are in fullscreen, your app captures the display and nothing else can draw to the screen as the window server is not asked to do it's compositing.
If you want to have regular compositing in full screen, you must hide the menu bar, window title bar, and make your window full screen.
Google a bit, there are tons of posts on how to do that without capturing the display.
Edit: this might be of interest: http://developer.apple.com/mac/library/technotes/tn2002/tn2062.html

Related

Show popup window when in fullscreen mode on MacOS

Background
We are building a cross-platform application with "popup" reminders, they are custom windows/dialogs which uses QWidget.setWindowFlags like this:
self.setWindowFlags(
QtCore.Qt.Dialog
| QtCore.Qt.WindowStaysOnTopHint
| QtCore.Qt.FramelessWindowHint
)
These popups show up on the systems we have tested (MacOS, Lubuntu (LXDE)), even when we switch between different virtual desktops the dialogs are still shown in the current desktop. However:
Problem
When the user is in fullscreen mode on MacOS (Sierra 10.12.6) the dialog instead is shown in the last virtual desktop that was used
Question
How can we show our "popup" dialogs to the user even when the user is in fullscreen mode on MacOS?
The short answer is that you can't and neither can any other app.
Here's why.
The idea is that when you select the fullscreen view for an app, you want to focus exclusively on that app, to the exclusion of all others. So the app not only expands to fill the entire screen, it removes the menu bar and creates its own desktop space.
You can see how this works using Mission Control (by default, swipe up with 3 fingers). You will see all the apps and all the desktops across all your monitors. Next, set an app to full screen and swipe up again. You'll see that the app has a dedicated desktop (which I believe doesn't even have wallpaper).
The bottom line is that macOS fullscreen view does not support pop-ups.

Hide window when other application in fullscreen mode (pseudo fullscreen)

I have an application for Windows which is basically a toolbar on top of all windows.
Unfortunately, our users ask why does it overlap a fullscreen video playing in Google Chrome. Since the application works with no issues along with other fullscreen applications (such as games), it seems to be a pseudo fullscreen mode. How do we hide the toolbar in such cases?
Right now there is only one idea: keep an eye on MoveWindow, compare window class name against a predefined list and rectangle against screen size then deduce whether it is the 'pseuso fullscreen' mode. Any better ideas?

Set OS X Lion full-screen desktop image programmatically

In OS X Lion, when user toggle app full-screen, the window moves to the right to the new space and this new space has a default background.
In QuickTime X, when user toggle full screen, desktop background on the new space that gets created is black.
Is there a code to have a custom desktop image for the newly created space?
I know that it's possible to change the desktop background of every space in Lion through system preferences but I need not to change it, but to have it already set up when the space gets created for letting the app going full-screen.
Unfortunately, no. The default linen texture is shown when transitioning an application to a full screen (so that it has it's own space).
It's possible to set different desktop pictures for normal, non-application spaces using the methods available in NSWorkspace (i.e. – setDesktopImageURL:forScreen:options:error:), but they don't really let you control the space that the image is set on – it seems to just set whatever space you're currently on.
So sadly, the answer is no.

Adobe AIR: Is it possible to create a full screen app to fill multiple monitors?

I am trying to build an Adobe AIR app that runs on two monitors with an extended desktop. Is that possible?
I've read fullscreen is restricted to a single display and the only option is to maximize the app to both displays. Is that right? If so, how can I hide OSX top menu bar?
Just for the record, OSX does not allow you to have more than one full screen applications (of any kind, not just AIR) open at the same time nor it let's you to expand a full screen app to more than one display.
An application window can span multiple displays as long as the window is sized properly. Menubar and dock can also be hidden. Check NSWindow in the apple documentation for more info. Adobe may or may not support this feature.

NSWindow, how not to be part of a screenshot?

My Cocoa app displays a transparent window on the screen, but when the user tries to take a screenshot using Mac OS X's built-in screen capture key with the option of selecting full windows (Command-Shift-4, then Space Bar), my window gets highlighted as part of the possible windows to capture.
How can I tell my Window or App not to allow this? My Window already refuses to be the Main Window or Key Window through -canBecomeKeyWindow and -canBecomeMainWindow both returning NO, but this still happens.
The Window is also at the NSModalPanelWindowLevel and NSScreenSaverWindowLevel does the same thing.
Notice that every window is eligible for screenshots, even the desktop, dock and menu bar, which are special windows. You can even take a screenshot of the Exposé overlay window itself. This leads me to believe that there is no way to do this.
I suppose you could hook the Command+Shift+4 key event and hide the window, but that key combo is user-definable, so it is subject to change.

Resources