Home » U++ Library support » U++ Widgets - General questions or Mixed problems » How to block background redrawing in my own widget
|
|
Re: How to block background redrawing in my own widget [message #47012 is a reply to message #47007] |
Fri, 28 October 2016 14:01 |
Zbych
Messages: 326 Registered: July 2009
|
Senior Member |
|
|
Thanks for explanation.
Right now I override State(int reason) function from Ctrl and when size or position is changed I call Layout function to set everything:
https://github.com/ultimatepp/mirror/blob/master/bazaar/Chro miumBrowser/ChromiumBrowser.cpp
Windows code responsible for chrome position and size looks like this (flickering visible):
CefWindowHandle hwnd = handler->GetBrowser()->GetHost()->GetWindowHandle();
HDWP hdwp = BeginDeferWindowPos(1);
hdwp = DeferWindowPos(hdwp, hwnd, nullptr, r.left, r.top, r.Width(), r.Height(), SWP_NOZORDER);
EndDeferWindowPos(hdwp);
Or second version (flickering visible):
SetWindowPos(hwnd, NULL, r.left, r.top, r.GetWidth(), r.GetHeight(), SWP_NOZORDER);
In third version I disabled it completely, so chrome doesn't change its size when I resize application window, but flickering is still visible.
The funny thing is, that with X11 backend flickering is not visible.
[Updated on: Fri, 28 October 2016 14:28] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat May 11 14:04:27 CEST 2024
Total time taken to generate the page: 0.02885 seconds
|