The bounding rectangle of an input control getting by UIAutomation is not up-to-date

I’m using UIAutomation to get the bounding rectagle of an focused input text area.
Here’s my C++ code.

IUIAutomation* p_iui;

IUIAutomationElement* p_fcs_element;
while(TRUE)
{

Sleep(1000);
p_iui->GetFocusedElement(&p_fcs_element);
RECT r;
p_fcs_element->get_CurrentBoundingRectangle(&r);
_cprintf(“Rect: %d,%d,%d,%d\n”, r.left, r.top, r.right, r.bottom);
}

When I put focus on some input text area and move Firefox by drag&drop, the RECT r’s data(left,top,right,bottom)does not change, unless I change the focus to another text area and back to the first one.
Should I change some Firefox settings to make the location information up-to-date when get_CurrentBoundingRectangle every time?