diff --git a/uppsrc/CtrlCore/TopWindow.cpp b/uppsrc/CtrlCore/TopWindow.cpp index 547c6ceee..42957b63a 100644 --- a/uppsrc/CtrlCore/TopWindow.cpp +++ b/uppsrc/CtrlCore/TopWindow.cpp @@ -456,7 +456,7 @@ bool Ctrl::MouseActiveCtrl(Ctrl *w, Point p) for(Ctrl *q = w->GetLastChild(); q; q = q->GetPrev()) if(q->GetScreenRect().Contains(p)) return MouseActiveCtrl(q, p); - + return w->IsMouseActive(); } diff --git a/uppsrc/CtrlCore/src.tpp/TopWindow_en-us.tpp b/uppsrc/CtrlCore/src.tpp/TopWindow_en-us.tpp index f7804bf98..1f01eaf6a 100644 --- a/uppsrc/CtrlCore/src.tpp/TopWindow_en-us.tpp +++ b/uppsrc/CtrlCore/src.tpp/TopWindow_en-us.tpp @@ -539,6 +539,14 @@ windows decoration on the left / right side of area, [@(0.0.255) height would use to draw the background of title bar area.&] [s3; &] [s4; &] +[s5;:Upp`:`:TopWindow`:`:IsCustomTitleBarDragArea`(Point`): [@(0.0.255) virtual +bool] [* IsCustomTitleBarDragArea](Point [*@3 p])&] +[s2;%% This method can be overriden to determine whether mouse at +[%-*@3 p] should possibly drag the window. Default implementation +allows that in mouse inactive areas and is probably fine for +most use cases.&] +[s3; &] +[s4; &] [s5;:TopWindow`:`:SerializePlacement`(Stream`&`,bool`): [@(0.0.255) void]_[* SerializePla cement]([_^Stream^ Stream][@(0.0.255) `&]_[*@3 s], [@(0.0.255) bool]_[*@3 reminimize]_`=_[@(0.0.255) f alse])&] diff --git a/uppsrc/ide/ide.h b/uppsrc/ide/ide.h index 4167b3457..4c9d75dd5 100644 --- a/uppsrc/ide/ide.h +++ b/uppsrc/ide/ide.h @@ -389,7 +389,6 @@ public: virtual void Activate(); virtual void Layout(); virtual void Skin(); - virtual bool IsCustomTitleBarDragArea(Point p); virtual bool IsVerbose() const; virtual void PutConsole(const char *s); diff --git a/uppsrc/ide/idewin.cpp b/uppsrc/ide/idewin.cpp index da687b147..7d4a15789 100644 --- a/uppsrc/ide/idewin.cpp +++ b/uppsrc/ide/idewin.cpp @@ -390,12 +390,6 @@ void Ide::Layout() display.Show(!designer && (menubar.GetSize().cx + display.GetSize().cx < GetSize().cx)); } -bool Ide::IsCustomTitleBarDragArea(Point p) -{ - p += GetScreenRect().TopLeft(); - return !menubar.GetScreenRect().Contains(p) && !toolbar.GetScreenRect().Contains(p); -} - void Ide::DoDisplay() { if(replace_in_files)