mirror of https://github.com/adamdruppe/arsd.git
fix bug abotu drawing in tab widgets on minigu
This commit is contained in:
parent
89d53a071f
commit
84bca96eee
|
@ -8071,11 +8071,16 @@ version(Windows) {
|
|||
auto windowHdc = GetDC(hwnd);
|
||||
|
||||
auto buffer = sw.impl.buffer;
|
||||
hdc = CreateCompatibleDC(windowHdc);
|
||||
if(buffer is null) {
|
||||
hdc = windowHdc;
|
||||
windowDc = true;
|
||||
} else {
|
||||
hdc = CreateCompatibleDC(windowHdc);
|
||||
|
||||
ReleaseDC(hwnd, windowHdc);
|
||||
ReleaseDC(hwnd, windowHdc);
|
||||
|
||||
oldBmp = SelectObject(hdc, buffer);
|
||||
oldBmp = SelectObject(hdc, buffer);
|
||||
}
|
||||
} else {
|
||||
// drawing on something else, draw directly
|
||||
hdc = CreateCompatibleDC(null);
|
||||
|
@ -8153,12 +8158,16 @@ version(Windows) {
|
|||
|
||||
SelectObject(hdc, oldBmp);
|
||||
|
||||
DeleteDC(hdc);
|
||||
if(windowDc)
|
||||
ReleaseDC(hwnd, hdc);
|
||||
else
|
||||
DeleteDC(hdc);
|
||||
|
||||
if(window.paintingFinishedDg !is null)
|
||||
window.paintingFinishedDg();
|
||||
}
|
||||
|
||||
bool windowDc;
|
||||
HPEN originalPen;
|
||||
HPEN currentPen;
|
||||
|
||||
|
|
Loading…
Reference in New Issue