diff --git a/uppsrc/CtrlCore/CtrlChild.cpp b/uppsrc/CtrlCore/CtrlChild.cpp index ec00cbaeb..aca8cf03d 100644 --- a/uppsrc/CtrlCore/CtrlChild.cpp +++ b/uppsrc/CtrlCore/CtrlChild.cpp @@ -248,6 +248,7 @@ TopWindow *Ctrl::GetMainWindow() { GuiLock __; Ctrl *q = GetTopCtrl(); + DDUMP(Upp::Name(q)); for(;;) { Ctrl *w = q->GetOwner(); if(!w) diff --git a/uppsrc/CtrlCore/CtrlKbd.cpp b/uppsrc/CtrlCore/CtrlKbd.cpp index d5cc5efc8..13fea9a67 100644 --- a/uppsrc/CtrlCore/CtrlKbd.cpp +++ b/uppsrc/CtrlCore/CtrlKbd.cpp @@ -284,6 +284,8 @@ void Ctrl::SetFocusWnd() GuiLock __; // notification, don't set host platform focus here LLOG("Ctrl::SetFocusWnd"); + DDUMP(Upp::Name(focusCtrlWnd)); + DDUMP(Upp::Name(this)); if(focusCtrlWnd != this) { LLOG("Ctrl::SetFocusWnd->ActivateWnd"); ActivateWnd(); diff --git a/uppsrc/CtrlCore/TopWindow.cpp b/uppsrc/CtrlCore/TopWindow.cpp index c10e8d244..edc2bc35e 100644 --- a/uppsrc/CtrlCore/TopWindow.cpp +++ b/uppsrc/CtrlCore/TopWindow.cpp @@ -2,7 +2,7 @@ NAMESPACE_UPP -#define LLOG(x) // LOG(x) +#define LLOG(x) DLOG(x) Rect TopWindow::windowFrameMargin; @@ -426,6 +426,31 @@ TopWindow& TopWindow::Urgent(bool b) return *this; } +void TopWindow::ShutdownWindow() +{ +} + +void TopWindow::ShutdownWindows() +{ + bool again = true; + while(again) { + Vector tc = GetTopCtrls(); + again = false; + for(int i = 0; i < tc.GetCount(); i++) { + Ptr w = dynamic_cast(tc[i]); + if(w && w->IsOpen() && w->IsEnabled()) { + again = true; + w->SetForeground(); + w->ShutdownWindow(); + if(w && w->IsOpen()) + w->WhenClose(); + if(!w || !w->IsOpen()) + break; + } + } + } +} + struct DialogBackground : public Display { void Paint(Draw& w, const Rect& r, const Value& q, Color ink, Color paper, dword style) const { diff --git a/uppsrc/CtrlCore/TopWindow.h b/uppsrc/CtrlCore/TopWindow.h index d47be7e5e..8c8ee8233 100644 --- a/uppsrc/CtrlCore/TopWindow.h +++ b/uppsrc/CtrlCore/TopWindow.h @@ -85,6 +85,8 @@ private: #endif public: + virtual void ShutdownWindow(); + Callback WhenClose; void Backup(); @@ -165,6 +167,8 @@ public: Image GetLargeIcon() const { return largeicon; } void SerializePlacement(Stream& s, bool reminimize = false); + + static void ShutdownWindows(); typedef TopWindow CLASSNAME; diff --git a/uppsrc/plugin/jpg/init b/uppsrc/plugin/jpg/init index 99141b40a..35cad3204 100644 --- a/uppsrc/plugin/jpg/init +++ b/uppsrc/plugin/jpg/init @@ -1,7 +1,7 @@ #ifndef _plugin_jpg_icpp_init_stub #define _plugin_jpg_icpp_init_stub #include "Draw/init" -#define BLITZ_INDEX__ F41EE56AAB5E423C9A7F05BB9E9F8F6EE +#define BLITZ_INDEX__ FE833856160034180BCAB32D6048C9BB6 #include "jpgreg.icpp" #undef BLITZ_INDEX__ #endif