Don't trigger screen edge if the pointer is constrained
If the pointer is constrained, the screen edge may push the cursor back, which will work not as expected. It's also undesired to trigger the screen edge while the pointer is constrained by some surface, in general.
(cherry picked from commit 44b72823)