This mirrors commit 0748cc1e about a year ago that optimized window dragging, and performs basically the same check (removed a week ago with commit b4ce023c)