# Fullscreen over 2 monitors

**URL:** https://discourse.glfw.org/t/fullscreen-over-2-monitors/284
**Category:** support
**Created:** [April 11, 2011, 1:22pm UTC](https://discourse.glfw.org/t/fullscreen-over-2-monitors/284 "2011-04-11T13:22:08Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)
#### Post date: [April 11, 2011, 1:22pm UTC](https://discourse.glfw.org/t/fullscreen-over-2-monitors/284/1 "2011-04-11T13:22:08Z")

</div>

**[xeethrax](https://sourceforge.net/u/xeethrax/)** wrote on [Monday, April 11, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/13c0c72a/#91f1):

Hi.

I’ve been trying to get my app to run in fullscreen over 2 x 1680x1050 22"  
widescreen monitors with GLFW without success. This was in latest Ubuntu using  
Nvidia TwinView. It works fine with Glut, but for some reason Glut will spend  
40-50ms swapping buffers when they’re 1680x2100 big… So I decided to try GLFW  
before going with Sdl.

The problem is that it only fullscreens in one window. Which screen it chooses  
is actually dependant from which screen is “active” when I start the app. I’ve  
set proper metamodes (although nvidia does this task perfectly fine for  
you), and made sure everything is appropriate as far as Xorg.conf is  
concerned. I’ve also checked that it in fact sets the correct resolution with  
glfwGetWindowSize. And again, Glut fullscreen works fine…

Same happens in windows though - in fact, I have yet to get GLFW fullscreen  
mode to work at all. Could you confirm or deny (or better yet, offer a  
solution) whether GLFW is to blame here, before change to Sdl?

PS: I also get lower framerates with glfw than with glut?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)
#### Post date: [April 11, 2011, 1:47pm UTC](https://discourse.glfw.org/t/fullscreen-over-2-monitors/284/2 "2011-04-11T13:47:18Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Monday, April 11, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/13c0c72a/#77e7):

You are most likely using a modern window manager on Ubuntu, which means that  
GLFW leaves most of the details of fullscreen placement to the WM. In almost  
all cases, this is what people want.

Since you dont’ want this, you could try disabling the EWMH check in  
x11\_window.c and so force GLFW to use the older override-redirect code path.

Please clarify what you mean by GLFW fullscreen mode not working at all. What  
happens when you request a fullscreen window?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)
#### Post date: [April 11, 2011, 5:00pm UTC](https://discourse.glfw.org/t/fullscreen-over-2-monitors/284/3 "2011-04-11T17:00:10Z")

</div>

**[xeethrax](https://sourceforge.net/u/xeethrax/)** wrote on [Monday, April 11, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/13c0c72a/#f491):

Hey, thanks for your swift reply. 🙂

My apologies if I did not make myself properly understood. Fullscreen actually  
works, but only one one screen. glfwGetWindowSize reports 1680x2100 as it  
should be, but it only goes fullscreen on the one screen, only using 1680x1050  
in reality. Furthermore, it will use the screen from which I launch the app  
(ie, the screen that contains the console window from which I launch the  
app).

It is very possible indeed that the WM is to blame, but as dual monitor gaming  
in linux appears to be a bit dodgy, I thought I’d check if there was any known  
issues regarding my problem. I Couldn’t find anything relating to my issue  
anywhere.

I did notice that when doing windowed mode that neither resizing across the  
screen or moving the window with glfw made any difference whatsoever. Probably  
gnome is to blame. I still don’t understand why glfw reports its using the  
correct resolution (1680x2100), when it’s in fact using 1680x1050. According  
to nvidia, TwinView knows internally that there are two screens (and handles  
them with metamodes) - but as far as X is concerned, it only sees it as 1 big  
device with 1 big buffer. This seems to be confirmed by the fact that glfw  
only finds one resolution (1680x2100), so you’d think it’d work as you’d  
expect, but sadly this isn’t the case…

I guess I could give your suggestion a try though, before I move on to Sdl…  
🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)
#### Post date: [April 11, 2011, 9:40pm UTC](https://discourse.glfw.org/t/fullscreen-over-2-monitors/284/4 "2011-04-11T21:40:24Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Monday, April 11, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/13c0c72a/#69ca):

That glfwGetWindowSize reports the requested instead of the actual window size  
sounds like a bug. I will investigate this. Having the window appear on the  
same monitor as the terminal that was used to start it matches the behaviour  
on my machine, but I don’t consider that a bug.

If the window was put into EWMH fullscreen mode then as a user you can’t  
really change its size, and the WM will actively fight you if you try. It’s  
the same behaviour that for example media players use. Also, X may see only  
one screen, but Metacity seems very aware of where the actual monitors are. I  
assume I’m going to find out how when I add multi-monitor support to GLFW 3.

As for your actual problem, with GLFW 2.x the only advice I can give is to try  
disabling the EWMH support in GLFW. That might give you the behaviour you  
need. I’ll keep this use case in mind for GLFW 3, however.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)
#### Post date: [April 12, 2011, 4:16am UTC](https://discourse.glfw.org/t/fullscreen-over-2-monitors/284/5 "2011-04-12T04:16:59Z")

</div>

**[xeethrax](https://sourceforge.net/u/xeethrax/)** wrote on [Tuesday, April 12, 2011](https://sourceforge.net/p/glfw/discussion/247562/thread/13c0c72a/#2c88):

Thanks again for you reply. It’s always nice to see such activity among devs  
on a long standing project 🙂

I will try disabling the EWMH check in x11\_window.c hopefully sometime during  
the day.
