Mercurial > dwindows
diff win/dw.c @ 1726:a02ce34692f0
Enable toolbar double buffering during packing on Windows if the window
isn't composited. We may need to do this differently but seems to work
for now.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 14 May 2012 23:08:24 +0000 |
parents | 2e0f87ec24fe |
children | 38a0e75bc59c |
line wrap: on
line diff
--- a/win/dw.c Mon May 14 22:26:26 2012 +0000 +++ b/win/dw.c Mon May 14 23:08:24 2012 +0000 @@ -7122,6 +7122,16 @@ SendMessage(item, UDM_SETBUDDY, (WPARAM)cinfo->buddy, 0); } } +#ifdef TOOLBAR + else if(_tcsnicmp(tmpbuf, TOOLBARCLASSNAME, _tcslen(TOOLBARCLASSNAME)+1) == 0) + { + if(!(_dw_composition && (GetWindowLongPtr(_toplevel_window(box), GWL_EXSTYLE) & WS_EX_LAYERED))) + { + /* Enable double buffering if our window isn't composited */ + SendMessage(item, TB_SETEXTENDEDSTYLE, 0, (LPARAM)TBSTYLE_EX_DOUBLEBUFFER); + } + } +#endif /* Queue a redraw on the top-level window */ _dw_redraw(_toplevel_window(box), TRUE); }