mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
VirtualGui: Ctrl::GetOwner() bounds check added. & missing Ctrl::GetCaretBlinkTime() implemented. (#107)
This commit is contained in:
parent
c400785beb
commit
91b95d12c2
2 changed files with 8 additions and 4 deletions
|
|
@ -42,6 +42,8 @@ private:
|
|||
|
||||
static void DeleteDesktopTop();
|
||||
|
||||
static int GetCaretBlinkTime() { return 500; }
|
||||
|
||||
protected:
|
||||
static int PaintLock;
|
||||
|
||||
|
|
|
|||
|
|
@ -74,10 +74,12 @@ Ctrl *Ctrl::GetOwner()
|
|||
{
|
||||
GuiLock __;
|
||||
int q = FindTopCtrl();
|
||||
Top *top = topctrl[q]->GetTop();
|
||||
if(q > 0 && top) {
|
||||
Ctrl *x = top->owner_window;
|
||||
return dynamic_cast<TopWindowFrame *>(x) ? x->GetOwner() : x;
|
||||
if(q >= 0) {
|
||||
Top *top = topctrl[q]->GetTop();
|
||||
if(q > 0 && top) {
|
||||
Ctrl *x = top->owner_window;
|
||||
return dynamic_cast<TopWindowFrame *>(x) ? x->GetOwner() : x;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue