XGetImage from hidden screen - x11

I'm using Xlib for my application and would like get image from root window
I open separated Xserver in another tty (:1) then opened this diplay
XGetDisplay(":1")
I'm working in :0 display
After I get default screen and root window and want to get image of this root window
Unfortunately I've got only black screen if my window is hidden
Can I someway force X11 to render window if it's hidden?

When not visible on screen X11 windows don't have to keep their surface pixmaps. You can force this with Composite extension, NameWindowPixmap request

Related

Fullscreen 'commands/apps' causes window to grey out

I am getting a grey/white overlay when using commands that take up the entire terminal like nmon and bmon. The first image is iterm2 and the second is the base macos terminal app, both running nmon.
It is not the transparency settings as I have already disabled those, not sure what setting to change to fix this.

Win32/C++: Program started minimized shows generic icon in taskbar flyout preview - how do I set my own image or fix it?

When you hover the mouse over taskbar buttons in Win10 you get a preview of that Window in a flyout. However if I start my program minimized it shows a generic icon (if I then restore it, the preview is updated and works minimized or not - so on startup is the key).
How do I have it show what the window will look like when restored or set my own image to use so this doesn't happen? It's okay if my own image is the only one that ever shows. I wouldn't mind disabling the preview on the flyout either (I do need the flyout because I use use toobar buttons on it).
I see ITaskbarList3::SetThumbnailClip() but that would have the same issue.
TIA!!
Found this is controlled by the DWM (Desktop Window Manager) via dwmapi. Examples of use is here

How can i identify an application flashing in windows taskbar in Testcomplete?

I need to verify if my application window flashes in the windows taskbar.Is there anyway to do that in TestComplete?
Thanks
There is no a straightforward way to do this. The only thing I can suggest is to save an image of the taskbar item before it should start flashing and then compare the actual image with the saved image. If the images are different, the window caption is flashing.

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.

Mac OpenGL : No sound volume overlay in fullscreen

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

Resources