/*EXTL_DOC
* Iterate over focus history until \var{iterfn} returns \code{false}.
- * The function itself returns \code{true} if it reaches the end of list
+ * The function is called in protected mode.
+ * This routine returns \code{true} if it reaches the end of list
* without this happening.
*/
EXTL_EXPORT
*/
EXTL_SAFE
EXTL_EXPORT_MEMBER
-bool region_is_active(WRegion *reg)
+bool region_is_active(WRegion *reg, bool pseudoact_ok)
{
- return REGION_IS_ACTIVE(reg);
+ return (REGION_IS_ACTIVE(reg) ||
+ (pseudoact_ok && REGION_IS_PSEUDOACTIVE(reg)));
}