diff options
| author | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-04-02 20:50:33 +0200 | 
|---|---|---|
| committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-04-02 20:50:33 +0200 | 
| commit | 00b1d3d0e3f538b7819c61a147f109d7e0d8a59b (patch) | |
| tree | 1fa3cfde416870e21e39dff3027bd138387a36a7 /plugingui | |
| parent | 07205d12ab39a05274249a0628bb1ec0c2094383 (diff) | |
Fix missing win32 initial size when embedded in prent window - part 2.
Diffstat (limited to 'plugingui')
| -rw-r--r-- | plugingui/nativewindow_win32.cc | 13 | 
1 files changed, 6 insertions, 7 deletions
diff --git a/plugingui/nativewindow_win32.cc b/plugingui/nativewindow_win32.cc index 502bfe9..ee16fb9 100644 --- a/plugingui/nativewindow_win32.cc +++ b/plugingui/nativewindow_win32.cc @@ -55,8 +55,8 @@ LRESULT CALLBACK NativeWindowWin32::dialogProc(HWND hwnd, UINT msg,  			auto resizeEvent = std::make_shared<ResizeEvent>();  			resizeEvent->width = LOWORD(lp);  			resizeEvent->height = HIWORD(lp); -			//native->event_queue.push_back(resizeEvent); -			native->window.resized(resizeEvent->width, resizeEvent->height); +			native->event_queue.push_back(resizeEvent); +			//native->window.resized(resizeEvent->width, resizeEvent->height);  		}  		break; @@ -378,11 +378,10 @@ NativeWindowWin32::NativeWindowWin32(void* native_window, Window& window)  		RECT rect;  		GetClientRect(parent_window, &rect); -		// Hack to make sure we scale the child and not simply the parent (again). -		auto tmp = parent_window; -		parent_window = nullptr; -		resize(rect.right - rect.left, rect.bottom - rect.top); -		parent_window = tmp; +		auto resizeEvent = std::make_shared<ResizeEvent>(); +		resizeEvent->width = rect.right - rect.left; +		resizeEvent->height = rect.bottom - rect.top; +		event_queue.push_back(resizeEvent);  	}  }  | 
