Add msw.window.no-composited system option
For some applications turning off double buffering for individual windows may be infeasible, so allow doing it globally using this system option. Note that wxAutoBufferedPaintDC still does no buffering in wxMSW now, even when this option is set, so setting it will result in flickering in any code using it. The solution is to use wxBufferedPaintDC directly in the programs that use this option. Closes #22953.
This commit is contained in:
parent
1c2ec47676
commit
d9734baed5
3 changed files with 14 additions and 1 deletions
|
|
@ -19,6 +19,11 @@ Changes in behaviour not resulting in compilation errors
|
|||
strongly recommended to change your redrawing logic to avoid using wxClientDC
|
||||
instead, as the code using it still won't work with wxGTK/wxOSX.
|
||||
|
||||
You may also choose to globally set the new msw.window.no-composited system
|
||||
option to disable the use of double buffering, but please consider doing it
|
||||
only as a last resort and/or temporary solution, as this _will_ result in
|
||||
flicker and won't be supported at all in the future wxWidgets versions.
|
||||
|
||||
- As first mentioned in 3.0 release notes, the value of wxTHREAD_WAIT_DEFAULT,
|
||||
used by wxThread::Delete() and Wait() by default, has changed from
|
||||
wxTHREAD_WAIT_YIELD to wxTHREAD_WAIT_BLOCK for safety and consistency.
|
||||
|
|
|
|||
|
|
@ -72,6 +72,10 @@
|
|||
appearance but not all fonts are available in this quality,
|
||||
e.g. the Terminal font in small sizes is not and this option may be
|
||||
used if wider fonts selection is more important than higher quality.
|
||||
@flag{msw.window.no-composited}
|
||||
If set to 1, disables the use of composited, i.e. double-buffered,
|
||||
windows by default in wxMSW. This is not recommended, but can be useful
|
||||
for debugging or working around redraw problems in the existing code.
|
||||
@endFlagTable
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -549,7 +549,11 @@ bool wxWindowMSW::CreateUsingMSWClass(const wxChar* classname,
|
|||
// checking it it's already set for the parent, even though we could.
|
||||
if ( !classname )
|
||||
{
|
||||
exstyle |= WS_EX_COMPOSITED;
|
||||
// We also allow disabling the use of this style globally by setting
|
||||
// a system option if nothing else (i.e. turning it off for individual
|
||||
// windows) works.
|
||||
if ( !wxSystemOptions::GetOptionInt("msw.window.no-composited") )
|
||||
exstyle |= WS_EX_COMPOSITED;
|
||||
}
|
||||
|
||||
if ( IsShown() )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue