From 9dc01f3f2b5932c6a0dee93fafc6ccf942e13bb7 Mon Sep 17 00:00:00 2001 From: cxl Date: Sun, 24 Jul 2011 18:40:06 +0000 Subject: [PATCH] .developing rainbow git-svn-id: svn://ultimatepp.org/upp/trunk@3709 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- rainbow/Framebuffer/Ctrl.h | 2 ++ rainbow/Framebuffer/Top.cpp | 2 +- rainbow/Framebuffer/Wnd.cpp | 9 +++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/rainbow/Framebuffer/Ctrl.h b/rainbow/Framebuffer/Ctrl.h index dbf7061ac..ac2f22117 100644 --- a/rainbow/Framebuffer/Ctrl.h +++ b/rainbow/Framebuffer/Ctrl.h @@ -34,6 +34,8 @@ private: static void AddInvalid(const Rect& rect); + void DestroyWnd(); + void NewTop() { top = new Top; top->owner_window = NULL; } void PutForeground(); static void MouseEventFB(Ptr t, int event, Point p, int zdelta); diff --git a/rainbow/Framebuffer/Top.cpp b/rainbow/Framebuffer/Top.cpp index 1eb8ddf62..988950a7c 100644 --- a/rainbow/Framebuffer/Top.cpp +++ b/rainbow/Framebuffer/Top.cpp @@ -14,7 +14,7 @@ void TopWindow::SyncFrameRect(const Rect& r) void TopWindow::DestroyFrame() { if(frame->IsOpen()) - frame->Close(); + frame->DestroyWnd(); } void TopWindow::GripResize() diff --git a/rainbow/Framebuffer/Wnd.cpp b/rainbow/Framebuffer/Wnd.cpp index 04d8a3525..3c93454c1 100644 --- a/rainbow/Framebuffer/Wnd.cpp +++ b/rainbow/Framebuffer/Wnd.cpp @@ -533,7 +533,7 @@ int Ctrl::GetKbdSpeed() return 1000 / 32; } -void Ctrl::WndDestroy0() +void Ctrl::DestroyWnd() { for(int i = 0; i < topctrl.GetCount(); i++) if(topctrl[i]->top && topctrl[i]->top->owner_window == this) @@ -551,8 +551,13 @@ void Ctrl::WndDestroy0() TopWindow *win = dynamic_cast(this); if(win) win->DestroyFrame(); +} + +void Ctrl::WndDestroy0() +{ + DestroyWnd(); if(topctrl.GetCount()) - topctrl.Top()->SetWndForeground0(); + topctrl.Top()->ActivateWnd(); } void Ctrl::PutForeground()