Skip to content

Commit

Permalink
Add hasFocus field to ClientWindowInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
jgraham committed Sep 6, 2024
1 parent 2b7c2ac commit 040fb4f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2232,6 +2232,7 @@ browser.ClientWindowInfo = {
height: js-uint,
x: js-int,
y: js-int,
hasFocus: bool,
}
</pre>

Expand All @@ -2245,14 +2246,23 @@ To <dfn>get the client window info</dfn> given |client window|:

1. Let |state| be [=get the client window state=] with |client window|.

1. Let |has system focus| be false.

1. For each [=/top-level traversable=] |traversable|:

1. If |traversable|'s [=client window=] is not |window| then continue.

1. If |traversable| has [=system focus=], set |has system focus| to true and break.

1. Let |client window info| be a [=/map=] matching the
<code>browser.ClientWindowsInfo</code> production with the
<code>clientWindow</code> field set to |client window id|, <code>state</code>
field set to |state|, the <code>x</code> field set to |client window|'s
[=client window/x-coordinate=], the <code>y</code> field set to |client
window|'s [=client window/y-coordinate=], the <code>width</code> field set to
|client window|'s [=client window/width=], and the <code>height</code> field
set to |client window|'s [=client window/height=].
|client window|'s [=client window/width=], the <code>height</code> field
set to |client window|'s [=client window/height=], and the
<code>hasFocus</code> field set to |has system focus|.

1. Return |client window info|

Expand Down

0 comments on commit 040fb4f

Please sign in to comment.