Commit 7c7ad596ca84bcbff21118dfd04988cae1dca505

Authored by ksamak
1 parent 7a47d7a9

focuspoll: hardened conditions for firefox caret focusing (bug #501)

plugins/focuspoll/src/accessibilitywatcher.cpp
... ... @@ -336,7 +336,9 @@ bool AccessibilityWatcher::appSpecificFilter (FocusInfo& focus, const AtspiEvent
336 336 return true;
337 337 }
338 338 if (focus.type == "caret" && !(focus.x == 0 && focus.y == 0) &&
339   - !(focus.x < -2000 || focus.y < -2000))
  339 + !(focus.x < -2000 || focus.y < -2000) &&
  340 + focus.w < A11YWATCHER_MAX_CARET_WIDTH &&
  341 + focus.h < A11YWATCHER_MAX_CARET_HEIGHT)
340 342 {
341 343 AccessibilityWatcher::getInstance ()->focusList.push_back (focus);
342 344 return true;
... ...