microsoft / DirectX-Graphics-Samples

This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.
MIT License
5.87k stars 2k forks source link

Window client area is drawn incorrectly when changing multiple display configuration #694

Open Devenec opened 3 years ago

Devenec commented 3 years ago

The result: HelloTriangle

The offset of the client area is at the top-left corner of the window. The contents behind the window are showing through at the bottom and right side of the window. Moving the window corrects the issue. This seems to be a D3D/DXGI issue, as I'm unable to reproduce it with an application using OpenGL.

Windows 10 19042.804 Using two 1920 x 1080 displays

How to reproduce:

  1. Configure two displays in Extend these displays mode.
  2. Run D3D12HelloTriangle application from D3D12HelloWorld solution.
  3. Place the application window on the primary display.
  4. Change multiple displays settings from Extend these displays to Show only on *, where * is the primary display.
  5. When the display config change is finished, the window is drawn incorrectly.
paulbartrum commented 3 years ago

This looks like it could be the same issue as issue #705. If so, the resolution is to update your graphics driver.

Devenec commented 2 years ago

This looks like it could be the same issue as issue #705. If so, the resolution is to update your graphics driver.

I am still experiencing this issue after updating to Nvidia Display Driver 471.41.

stanard commented 2 years ago

I still have it on Nvidia 471.11. When I drag the title bar to move the window, the window contents snap to the proper location relative to the frame. I tried playing with the window setup code to simulate a window move operation at startup, but the window contents always first appear anchored to the upper left corner of the title bar. I was hopeful this would be fixed with a newer driver, but it appears it is not.

rosiecube commented 2 years ago

Commercial engines and games do not have the same symptoms. The graphics card driver used both the latest driver and the manufacturer-provided driver. There seems to be a problem with the sample code.