Prevents accidental selection of window caption or content. (#12726)

Change-Id: Ida479ef0c421cf67b2863cf78c76b495337f30cf