From 697362bca2bbc41361a71394e50d102e4e624f75 Mon Sep 17 00:00:00 2001 From: cxl Date: Wed, 9 Sep 2020 11:58:47 +0000 Subject: [PATCH] ide: Fixed full screen issue in SlideShow git-svn-id: svn://ultimatepp.org/upp/trunk@15002 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CtrlCore/TopWin32.cpp | 8 +++++++- uppsrc/Draw/ImageOp.cpp | 1 - uppsrc/Esc/Esc.cpp | 4 ---- uppsrc/ide/SlideShow.cpp | 3 ++- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/uppsrc/CtrlCore/TopWin32.cpp b/uppsrc/CtrlCore/TopWin32.cpp index d7b4996c6..ac924b9b7 100644 --- a/uppsrc/CtrlCore/TopWin32.cpp +++ b/uppsrc/CtrlCore/TopWin32.cpp @@ -309,9 +309,15 @@ TopWindow& TopWindow::FullScreen(bool b) fullscreen = b; HWND hwnd = GetOwnerHWND(); bool pinloop = inloop; + bool open = IsOpen(); WndDestroy(); Overlap(); - SetRect(overlapped); // 12-05-23 Tom changed from GetDefaultWindowRect() to 'overlapped' to restore back to previous window position + Rect r = GetRect(); + if(open) + SetRect(overlapped); // restore to the same screen as before + else + if(r.left + r.top == 0) + SetRect(GetDefaultWindowRect()); // open in primary screen Open(hwnd); inloop = pinloop; return *this; diff --git a/uppsrc/Draw/ImageOp.cpp b/uppsrc/Draw/ImageOp.cpp index 448dbe8c8..49dd1665c 100644 --- a/uppsrc/Draw/ImageOp.cpp +++ b/uppsrc/Draw/ImageOp.cpp @@ -446,7 +446,6 @@ Image Colorize(const Image& img, Color color, int alpha) Image DarkTheme(const Image& img) { - RTIMING("DarkTheme"); if(IsNull(img)) return img; diff --git a/uppsrc/Esc/Esc.cpp b/uppsrc/Esc/Esc.cpp index 4c97217b8..829d5c7aa 100644 --- a/uppsrc/Esc/Esc.cpp +++ b/uppsrc/Esc/Esc.cpp @@ -294,8 +294,6 @@ void Esc::Subscript(Esc::SRVal& r) void Esc::Term(SRVal& r) { - RTIMING("Term"); - r.sbs = EscValue(); op_limit--; @@ -391,7 +389,6 @@ void Esc::Term(SRVal& r) if(Char(':')) _global = true; if(IsId()) { - RTIMING("Id1"); String id = ReadId(); EscValue method; int locali = var.Find(id); @@ -425,7 +422,6 @@ void Esc::Term(SRVal& r) else r.lval = &var.GetPut(id); - RTIMING("Id2"); try { Subscript(r, _self, id); } diff --git a/uppsrc/ide/SlideShow.cpp b/uppsrc/ide/SlideShow.cpp index c37a9a29d..4cc5e3260 100644 --- a/uppsrc/ide/SlideShow.cpp +++ b/uppsrc/ide/SlideShow.cpp @@ -86,7 +86,6 @@ INITBLOCK { SlideShow::SlideShow() { text.slideshow = settings.slideshow = this; - FullScreen(); Add(text.SizePos()); text.NoHyperlinkDecoration(); text.NoSb(); @@ -266,6 +265,8 @@ void SlideShow::SetPage() void TopicCtrl::SShow() { SlideShow ss; + ss.SetRect(GetScreenRect()); + ss.FullScreen(); TopicLink tl = ParseTopicLink(GetCurrent()); if(IsNull(tl.package)) return;