diff --git a/rainbow/DrawDragRect/main.cpp b/rainbow/DrawDragRect/main.cpp index 7a4bba933..f5e8d0097 100644 --- a/rainbow/DrawDragRect/main.cpp +++ b/rainbow/DrawDragRect/main.cpp @@ -22,6 +22,12 @@ struct App : public Ctrl { Black(), pattern); } + + virtual Image CursorImage(Point p, dword keyflags) { + Animate(); + return Image::Arrow(); + } + void Animate() { pattern = I64(0xf0f0) >> (pos++ & 7); @@ -56,7 +62,7 @@ struct App : public Ctrl { pos = 0; a = 200; dir = 1; - PostCallback(THISBACK(Animate)); +// PostCallback(THISBACK(Animate)); SetCaret(0, 0, 20, 20); } }; diff --git a/rainbow/Framebuffer/Util.cpp b/rainbow/Framebuffer/Util.cpp index 22a616801..984717844 100644 --- a/rainbow/Framebuffer/Util.cpp +++ b/rainbow/Framebuffer/Util.cpp @@ -36,6 +36,9 @@ void DrawDragRect(SystemDraw& w, const Rect& rect1, const Rect& rect2, w.End(); } + + + /* Size GetScreenSize() { diff --git a/rainbow/Framebuffer/Wnd.cpp b/rainbow/Framebuffer/Wnd.cpp index 137bbde81..55c278182 100644 --- a/rainbow/Framebuffer/Wnd.cpp +++ b/rainbow/Framebuffer/Wnd.cpp @@ -229,7 +229,8 @@ ViewDraw::ViewDraw(Ctrl *ctrl) ViewDraw::~ViewDraw() { - Ctrl::invalid.Clear(); + Ctrl::DoUpdate(); +// Ctrl::invalid.Clear(); } void Ctrl::DoUpdate() @@ -300,15 +301,17 @@ void Ctrl::WndUpdate0r(const Rect& r) bool Ctrl::ProcessEvents(bool *quit) { - DLOG("ProcessEvents " << LOG_BEGIN); + LOGBLOCK("@ ProcessEvents"); + MemoryCheckDebug(); if(!ProcessEvent(quit)) return false; while(ProcessEvent(quit) && (!LoopCtrl || LoopCtrl->InLoop()) && !FBEndSession()); + TimeStop tm; TimerProc(GetTickCount()); + DLOG("TimerProc elapsed: " << tm); SweepMkImageCache(); DoPaint(); FBFlush(); - DLOG(LOG_END); return true; } diff --git a/rainbow/Paint/Paint.upp b/rainbow/Paint/Paint.upp index 2f59d408d..7e71851e7 100644 --- a/rainbow/Paint/Paint.upp +++ b/rainbow/Paint/Paint.upp @@ -13,8 +13,7 @@ uses(SDLFB) SDLFb; uses(WINGL) WinGl; file - Draw.cpp, - U:\h.txt; + Draw.cpp; mainconfig "" = "GUI WINFB", diff --git a/rainbow/WinFb/Win.cpp b/rainbow/WinFb/Win.cpp index 02883dcbf..79ef0b6ff 100644 --- a/rainbow/WinFb/Win.cpp +++ b/rainbow/WinFb/Win.cpp @@ -35,7 +35,7 @@ void FBSleep(int ms) { TimeStop tm; MsgWaitForMultipleObjects(0, NULL, FALSE, ms, QS_ALLINPUT); - DLOG("@ FBSleep " << tm.Elapsed()); + LLOG("@ FBSleep " << tm.Elapsed()); } void FBInit(HINSTANCE hInstance) @@ -68,7 +68,7 @@ void fbUpdate(HDC hdc, const Rect& r_) Size sz = framebuffer.GetSize(); Rect r = sz; // Rect r = r_; - DLOG("fbUpdate " << r); + LLOG("fbUpdate " << r); Buffer data; data.Alloc(sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD)*256); BITMAPINFOHEADER *hi = (BITMAPINFOHEADER *) ~data;; @@ -89,7 +89,7 @@ void fbUpdate(HDC hdc, const Rect& r_) void FBUpdate(const Rect& r) { - DLOG("FBUpdate " << r); + LLOG("FBUpdate " << r); if(fbHWND) { HDC hdc = GetDC(fbHWND); fbUpdate(hdc, r);