frame:SetScript("OnLeave", function(self, motion) if self:IsMouseOver() then -- OnEnter state else -- OnLeave state endend)