Only send _NET_ACTIVE_WINDOW hint if the chromium window is not already active.
This is intended to replace the proposed changes of https://codereview.chromium.org/
917473002/ and
https://codereview.chromium.org/
882223011/. This coupled with the changes in
https://codereview.chromium.org/
1154013002 should resolve bug 318937. Rather than always sending a
_NET_ACTIVE_WINDOW hint, keep track of the active window by tracking the _NET_ACTIVE_WINDOW property
of the X11 root window, and send a _NET_ACTIVE_WINDOW only if the window is not already active.
This prevents spurious raises in some window managers when click to raise is disabled.
R=agoode@chromium.org, sadrul@chromium.org
BUG=318937
TEST=In an affected WM like XFCE or E19, disable click-to-raise and overlap a window over Chromium.
Click in the rendering area of Chromium and observe that it is not raised. Click on a link in another
application with Chromium as the default browser and note that the Chromium window is raised correctly.
Review URL: https://codereview.chromium.org/
1212643008
Cr-Commit-Position: refs/heads/master@{#337282}