mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
CtrlCore: gtk: fixed issue with popup mouse events #1027
git-svn-id: svn://ultimatepp.org/upp/trunk@9075 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
b732ab79d1
commit
1cd90e3dea
3 changed files with 12 additions and 20 deletions
|
|
@ -115,9 +115,15 @@ void Ctrl::WndDestroy()
|
|||
}
|
||||
|
||||
Vector< Ptr<Ctrl> > Ctrl::activePopup;
|
||||
Vector< Ptr<Ctrl> > Ctrl::visiblePopup;
|
||||
|
||||
void Ctrl::GuiPlatformRemove()
|
||||
{
|
||||
for(int i = 0; i < visiblePopup.GetCount();)
|
||||
if(visiblePopup[i] == this)
|
||||
visiblePopup.Remove(i);
|
||||
else
|
||||
i++;
|
||||
for(int i = 0; i < activePopup.GetCount();)
|
||||
if(activePopup[i] == this) {
|
||||
if(this == grabpopup && gdk_pointer_is_grabbed())
|
||||
|
|
@ -129,23 +135,6 @@ void Ctrl::GuiPlatformRemove()
|
|||
i++;
|
||||
}
|
||||
|
||||
/*
|
||||
void Ctrl::PopUp(Ctrl *owner, bool savebits, bool activate, bool, bool)
|
||||
{
|
||||
GuiLock __;
|
||||
LLOG("POPUP " << Name() << ", " << GetRect() << ", activate " << activate);
|
||||
Create(owner ? owner->GetTopCtrl() : GetActiveCtrl(), true);
|
||||
popup = true;
|
||||
if(activate)
|
||||
SetFocus();
|
||||
Ptr<Ctrl> _this = this;
|
||||
if(_this) {
|
||||
activePopup.Add(this);
|
||||
StartGrabPopup();
|
||||
CheckMouseCtrl();
|
||||
}
|
||||
}
|
||||
*/
|
||||
void Ctrl::PopUp(Ctrl *owner, bool savebits, bool activate, bool, bool)
|
||||
{
|
||||
GuiLock __;
|
||||
|
|
@ -161,6 +150,8 @@ void Ctrl::PopUp(Ctrl *owner, bool savebits, bool activate, bool, bool)
|
|||
CheckMouseCtrl();
|
||||
}
|
||||
}
|
||||
if(_this)
|
||||
visiblePopup.Add(this);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue