title: libgdx borderless fullscreen
body: <p>I try to give the user the option of how he wants to play the game. Window and Fullscreen Mode is no problem. The thing I don't seem to get to work is the borderless fullscreen/windowed fullscreen.
  I searched the web and found only one site that helped me: </p>
  
  <p><a href="http://badlogicgames.com/forum/viewtopic.php?f=11&amp;t=13863" rel="nofollow noreferrer">http://badlogicgames.com/forum/viewtopic.php?f=11&amp;t=13863</a></p>
  
  <p>I did as I was told and I think it kinda works, my problem is, the windows 10 toolbar at the bottom is always in front of the window.
  Here the picture of how it looks: </p>
  
  <p><a href="https://imgur.com/hdA3LAb" rel="nofollow noreferrer">http://imgur.com/hdA3LAb</a> </p>
  
  <p>The color is awful, but just for testing purposes. Code looks like this:</p>
  
  <pre><code>if (screenManager.FULLSCREEN) {
      Gdx.graphics.setDisplayMode(Gdx.graphics.getDesktopDisplayMode().width, Gdx.graphics.getDesktopDisplayMode().height, true);
  } else if (screenManager.WINDOWEDFULLSCREEN) {
      System.setProperty("org.lwjgl.opengl.Window.undecorated", "true");
      Gdx.graphics.setDisplayMode(Gdx.graphics.getDesktopDisplayMode().width,
      Gdx.graphics.getDesktopDisplayMode().height, false);
  } else {
      Gdx.graphics.setDisplayMode(screenManager.WIDTH, screenManager.HEIGTH, false);
  } 
  </code></pre>
  
  <p>How can I fix this?</p>
  
  <p><strong>Edit:</strong>
  I updated to 1.9.2, which doesn't has the setDisplayMode method.
  The code now looks like this:</p>
  
  <pre><code>DisplayMode mode = Gdx.graphics.getDisplayMode();
  if (screenManager.FULLSCREEN) {
      Gdx.graphics.setWindowedMode(Gdx.graphics.getDisplayMode().width, Gdx.graphics.getDisplayMode().height);
      Gdx.graphics.setFullscreenMode(mode);
  } else if (screenManager.WINDOWEDFULLSCREEN) {
      System.setProperty("org.lwjgl.opengl.Window.undecorated", "true");
      Gdx.graphics.setWindowedMode(Gdx.graphics.getDisplayMode().width, Gdx.graphics.getDisplayMode().height);
      //Gdx.graphics.setFullscreenMode(mode);
  } else {
      Gdx.graphics.setWindowedMode(screenManager.WIDTH, screenManager.HEIGTH);
  }
  </code></pre>
  
  <p>Everything works like before, just the borderless fullscreen has the windows toolbar(the thing on the botton) infront of it, just like in the picture. Normal fullscreen works fine.</p>