Windows QPA: introduce a way to disable redirection surface
Why do we need this feature: to give user the possibility to explore different interesting graphics features (currently only compatible with D3D with the new FLIP model). Why do we need to modify QPA directly: touch this flag after the window has been created has no effect. It can only be used when we call CreateWindow(), so we can't add this flag through SetWindowLong(). However, Qt doesn't provide any public or private interface to control how Qt call CreateWindow(), and providing such interface is also dangerous. Using environment variable to control this behavior is the simplest solution and is commonly used inside Qt code base. Change-Id: I12440ed498d97cc17640e6c7498e42770b813737 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>bb10
parent
2a1772a649
commit
838fc606c1
|
|
@ -834,6 +834,10 @@ void WindowCreationData::fromWindow(const QWindow *w, const Qt::WindowFlags flag
|
|||
// NOTE: WS_EX_TRANSPARENT flag can make mouse inputs fall through a layered window
|
||||
if (flagsIn & Qt::WindowTransparentForInput)
|
||||
exStyle |= WS_EX_LAYERED | WS_EX_TRANSPARENT;
|
||||
|
||||
// Currently only compatible with D3D surfaces, use it with care.
|
||||
if (qEnvironmentVariableIntValue("QT_QPA_DISABLE_REDIRECTION_SURFACE"))
|
||||
exStyle |= WS_EX_NOREDIRECTIONBITMAP;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue