X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphics%2Fwindows%2Fwindow.cpp;h=b148915d9bc94b6581037a682c3982c0bf78212f;hb=f6ca714e2258f4cad433801c88264947d4c2d14c;hp=2af6b83917e153664f8f82220ba56f0849f7e802;hpb=1d7113259625a91f5f6d2f53365aad22ae744689;p=libs%2Fgui.git diff --git a/source/graphics/windows/window.cpp b/source/graphics/windows/window.cpp index 2af6b83..b148915 100644 --- a/source/graphics/windows/window.cpp +++ b/source/graphics/windows/window.cpp @@ -162,6 +162,7 @@ bool Window::event(const Event &evnt) { case WM_KEYDOWN: case WM_KEYUP: + case WM_CHAR: case WM_LBUTTONDOWN: case WM_LBUTTONUP: case WM_MBUTTONDOWN: @@ -179,9 +180,23 @@ bool Window::event(const Event &evnt) resizing = false; signal_resize.emit(options.width, options.height); break; + case WM_MOVE: + options.x = static_cast(LOWORD(evnt.lparam)); + options.y = static_cast(HIWORD(evnt.lparam)); + signal_move.emit(options.x, options.y); + break; case WM_CLOSE: signal_close.emit(); break; + case WM_PAINT: + { + RECT update_rect; + GetUpdateRect(priv->window, &update_rect, false); + unsigned width = update_rect.right-update_rect.left; + unsigned height = update_rect.bottom-update_rect.top; + signal_expose.emit(update_rect.left, update_rect.top, width, height, evnt); + } + break; default: return false; }