I need to create a window that always stays on top. Sounds annoying, I know, but it’s for a kiosk.
In ofAppGlutWindow.cpp, line 142, a GLUT window is created with glutCreateWindow(""); So, according to the internets, the code below should work on Windows (I don’t have a Windows machine handy to test), but what do I put in the OSX and Linux parts?
void ofSetWindowAlwaysOnTop() {
#ifdef TARGET_WIN32
//get its handle "GLUT" = class name "ogl" = window
HWND hwnd = FindWindow( "GLUT", "" );
//set the window always-on-top
captionSetWindowPos( hwnd, HWND_TOPMOST, NULL, NULL, NULL, NULL, SWP_NOREPOSITION | SWP_NOSIZE );
#endif
#ifdef TARGET_OSX
// What goes here??
#endif
#ifdef TARGET_LINUX
// What goes here?
#endif
}
Or maybe am I over thinking this? Is there an existing method?