Maintaining fullscreen in Linux touchscreen

I have an installation running on Ubuntu 20.04, which is interacted with on a touchscreen monitor (there is also an additional monitor displaying another window).

Since there are two windows, I set them up in main like so:

#include "ofMain.h"
#include "ofApp.h"

//========================================================================
int main( ){

	ofGLFWWindowSettings settingsT;
	settingsT.setSize(1920, 1080);
	settingsT.setPosition(ofVec2f(1920, 0));
	settingsT.resizable = true;
	shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settingsT);

	ofGLFWWindowSettings settingsP;
	settingsP.setSize(1920, 1080);
	settingsP.setPosition(ofVec2f(0, 0));
	settingsP.resizable = true;
	settingsP.shareContextWith = mainWindow;	
    shared_ptr<ofAppBaseWindow> presentWindow = ofCreateWindow(settingsP);
    presentWindow->setVerticalSync(false);
	
    shared_ptr<ofApp> mainApp(new ofApp);
	mainApp->setupMain();
	
    ofAddListener(presentWindow->events().draw, mainApp.get(), &ofApp::drawMain);
	ofRunApp(mainWindow, mainApp);
	ofRunMainLoop();
}

and I run ofSetFullscreen(true) on each of the windows on startup.

My problem is that people are able to knock the touchscreen window out of full-screen in various ways, usually by what appear to be errant multi-touch gestures.

I installed Disable-Gestures and Block-Caribou GNOME extensions, but problem remains.

What other solutions can I try?

not sure if it will change anything but how about
settings.windowMode = OF_FULLSCREEN;

or maybe this one will lock in fullscreen

settings.windowMode = OF_GAME_MODE;

ah yeah perhaps game mode should fix the problem. only issue is game mode seems to interfere with the other window… when the second window comes up, the game window loses focus and goes invisible. have to tinker some more.

What about setting win allways on top so even people mess it and open others yours will be the first

I asked time ago on how to do this on linux

1 Like