mirror of https://github.com/buggins/dlangui.git
fix win32 build w/o opengl
This commit is contained in:
parent
24a033f1d9
commit
bdba7bd15b
|
@ -169,7 +169,9 @@ class Win32Window : Window {
|
||||||
Win32Window w32parent = cast(Win32Window)parent;
|
Win32Window w32parent = cast(Win32Window)parent;
|
||||||
HWND parenthwnd = w32parent ? w32parent._hwnd : null;
|
HWND parenthwnd = w32parent ? w32parent._hwnd : null;
|
||||||
_platform = platform;
|
_platform = platform;
|
||||||
|
version (USE_OPENGL) {
|
||||||
_gl = new GLSupport();
|
_gl = new GLSupport();
|
||||||
|
}
|
||||||
_caption = windowCaption;
|
_caption = windowCaption;
|
||||||
_flags = flags;
|
_flags = flags;
|
||||||
uint ws = WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
|
uint ws = WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
|
||||||
|
@ -295,7 +297,7 @@ class Win32Window : Window {
|
||||||
import derelict.opengl3.wgl;
|
import derelict.opengl3.wgl;
|
||||||
if (_hGLRC) {
|
if (_hGLRC) {
|
||||||
glSupport.uninitShaders();
|
glSupport.uninitShaders();
|
||||||
delete _glSupport;
|
destroy(_glSupport);
|
||||||
_glSupport = null;
|
_glSupport = null;
|
||||||
_gl = null;
|
_gl = null;
|
||||||
wglMakeCurrent (null, null) ;
|
wglMakeCurrent (null, null) ;
|
||||||
|
@ -960,12 +962,17 @@ LRESULT WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
if (window !is null) {
|
if (window !is null) {
|
||||||
WINDOWPOS * pos = cast(WINDOWPOS*)lParam;
|
WINDOWPOS * pos = cast(WINDOWPOS*)lParam;
|
||||||
|
Log.d("WM_WINDOWPOSCHANGED: ", *pos);
|
||||||
GetClientRect(hwnd, &rect);
|
GetClientRect(hwnd, &rect);
|
||||||
|
//window.onResize(pos.cx, pos.cy);
|
||||||
|
//if (!(pos.flags & 0x8000)) { //SWP_NOACTIVATE)) {
|
||||||
|
//if (pos.x > -30000) {
|
||||||
int dx = rect.right - rect.left;
|
int dx = rect.right - rect.left;
|
||||||
int dy = rect.bottom - rect.top;
|
int dy = rect.bottom - rect.top;
|
||||||
//window.onResize(pos.cx, pos.cy);
|
|
||||||
window.onResize(dx, dy);
|
window.onResize(dx, dy);
|
||||||
InvalidateRect(hwnd, null, FALSE);
|
InvalidateRect(hwnd, null, FALSE);
|
||||||
|
//}
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue