summaryrefslogtreecommitdiff
path: root/plugingui/nativewindow_win32.cc
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui/nativewindow_win32.cc')
-rw-r--r--plugingui/nativewindow_win32.cc26
1 files changed, 11 insertions, 15 deletions
diff --git a/plugingui/nativewindow_win32.cc b/plugingui/nativewindow_win32.cc
index 9e80be0..172850d 100644
--- a/plugingui/nativewindow_win32.cc
+++ b/plugingui/nativewindow_win32.cc
@@ -26,10 +26,10 @@
*/
#include "nativewindow_win32.h"
-#include "window.h"
-
#include <cstring>
+#include "window.h"
+
namespace GUI {
LRESULT CALLBACK NativeWindowWin32::dialogProc(HWND hwnd, UINT msg,
@@ -49,24 +49,20 @@ LRESULT CALLBACK NativeWindowWin32::dialogProc(HWND hwnd, UINT msg,
switch(msg) {
case WM_SIZE:
{
- static bool first = true;
- if(!first)
- {
- auto resizeEvent = std::make_shared<ResizeEvent>();
- resizeEvent->width = LOWORD(lp);
- resizeEvent->height = HIWORD(lp);
- native->event_queue.push(resizeEvent);
- first = false;
- }
+ auto resizeEvent = std::make_shared<ResizeEvent>();
+ resizeEvent->width = LOWORD(lp);
+ resizeEvent->height = HIWORD(lp);
+ //native->event_queue.push(resizeEvent);
+ native->window.resized(resizeEvent->width, resizeEvent->height);
}
break;
case WM_MOVE:
{
-// auto moveEvent = std::make_shared<MoveEvent>();
-// moveEvent->x = (short)LOWORD(lp);
-// moveEvent->y = (short)HIWORD(lp);
-// native->event_queue.push(moveEvent);
+ auto moveEvent = std::make_shared<MoveEvent>();
+ moveEvent->x = (short)LOWORD(lp);
+ moveEvent->y = (short)HIWORD(lp);
+ native->event_queue.push(moveEvent);
}
break;