java - LibGDX Multiple Fullscreen Windows -


i writing program display text on 2 monitors.

right method launch libgdx window on both monitors, control each separately. however, when both in fullscreen, 1 window can have focus. out-of-focus window gets hidden. how solve this?

specs:

  • windows 10

  • java 1.8

  • libgdx 1.9.3, using lwjgl 3 backend

code:

  • in applicationlistener:

    @override public void show() throws runtimeexception {    // throws exception if set go monitor 1 , not exist     if (external && gdx.graphics.getmonitors().length < 2)         throw new runtimeexception("cannot extend secondary monitor.");      gdx.graphics.setfullscreenmode(gdx.graphics.getdisplaymode(gdx.graphics.getmonitors()[external ? 1 : 0])); } 
  • then, open window:

    @override public void openwindow(applicationlistener a) {    lwjgl3windowconfiguration config = new lwjgl3windowconfiguration();     config.settitle(title);     config.setwindowlistener(new lwjgl3windowlistener() {         @override        public void iconified() {}         @override        public void focuslost() {}         @override        public void focusgained() {}         @override        public void filesdropped(string[] files) {}         @override        public void deiconified() {}         @override        public boolean closerequested() {             return true;        }    });     lwjgl3application app = (lwjgl3application) gdx.app;    window = app.newwindow(a, config);    desktoplauncher.openwindows.add(window);  // used close windows later } 

am looking @ wrong way? thanks!


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -