glfw / glfw

A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input
https://www.glfw.org
zlib License
12.84k stars 5.16k forks source link

Video mode not restored for secondary monitor #474

Open uglycoder opened 9 years ago

uglycoder commented 9 years ago

Fedora 21: 3.17.7-300 NVidia driver 343-36 Dual 24" monitors @ 1920 x 1200, as 1 virtual desktop.

glfw 3.1.1 Tested with glfw compiled as shared library and static library. Running the reopen test exec does not restore desktop on the non-primary monitor either when running or when closed. The primary monitor is restored OK.

I use the NVidia settings app to reset the non-primary monitor to 1920x1200 from the 640x480 that reopen uses for windowed display.

Also to note: I had to use the NVidia app to set the monitor so that the left monitor is the primary. On boot up one can see this setting being applied - ie the natural setup is for the right monitor to be the primary.

elmindreda commented 9 years ago

Please post the output of the monitors test program.

uglycoder commented 9 years ago

Pre reopen test.

Name: DVI-I-3 (primary)
Current mode: 1920 x 1200 x 24 (8 8 8) 59 Hz
Virtual position: 0 0
Physical size: 518 x 324 mm (94 dpi)
Modes:
  0: 640 x 480 x 24 (8 8 8) 59 Hz
  1: 640 x 480 x 24 (8 8 8) 75 Hz
  2: 800 x 600 x 24 (8 8 8) 60 Hz
  3: 800 x 600 x 24 (8 8 8) 75 Hz
  4: 1024 x 768 x 24 (8 8 8) 60 Hz
  5: 1024 x 768 x 24 (8 8 8) 75 Hz
  6: 1152 x 864 x 24 (8 8 8) 75 Hz
  7: 1280 x 1024 x 24 (8 8 8) 60 Hz
  8: 1280 x 1024 x 24 (8 8 8) 75 Hz
  9: 1600 x 1200 x 24 (8 8 8) 60 Hz
 10: 1920 x 1200 x 24 (8 8 8) 59 Hz (current mode)
Name: DVI-I-2 (secondary)
Current mode: 1920 x 1200 x 24 (8 8 8) 59 Hz
Virtual position: 1920 0
Physical size: 518 x 324 mm (94 dpi)
Modes:
  0: 640 x 480 x 24 (8 8 8) 59 Hz
  1: 640 x 480 x 24 (8 8 8) 75 Hz
  2: 800 x 600 x 24 (8 8 8) 60 Hz
  3: 800 x 600 x 24 (8 8 8) 75 Hz
  4: 1024 x 768 x 24 (8 8 8) 60 Hz
  5: 1024 x 768 x 24 (8 8 8) 75 Hz
  6: 1152 x 864 x 24 (8 8 8) 75 Hz
  7: 1280 x 1024 x 24 (8 8 8) 60 Hz
  8: 1280 x 1024 x 24 (8 8 8) 75 Hz
  9: 1600 x 1200 x 24 (8 8 8) 60 Hz
 10: 1920 x 1200 x 24 (8 8 8) 59 Hz (current mode)
elmindreda commented 9 years ago

Cannot reproduce.

uglycoder commented 9 years ago

I've redone test and still get my original result. However, I'm not going to pursue or investigate this.

elmindreda commented 9 years ago

Fair enough. I'll leave this open in case something turns up.