This patch changes KWin's pointer constraining behavior by only allowing
constraints if the surface has keyboard focus. In case the client activation
state changes, it rechecks it.
Details
- Reviewers
graesslin - Group Reviewers
KWin - Maniphest Tasks
- T8923: Improve cursor locking and confining
- Commits
- R108:0bd5eff8623d: Make keyboard focus a pointer constraints necessity
Manually with the pointer constraints test application and opening the
launcher by pressing meta. Also amended autotest.
Diff Detail
- Repository
- R108 KWin
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
pointer_input.cpp | ||
---|---|---|
629 | I compare here the pointer focus surface with the keyboard focus surface. It might make more sense to compare the activated client with the client of the pointer focus surface, since I connected to the clientActivated signal. I tried it out and the new autotest works as well. Any opinions on this? |
The spec says nothing about keyboard focus or activated clients. That's a rule I came up with, but it seems very natural to me. If a client is not active, you don't want your cursor to be controlled by it. It's very obvious if you try to open the launcher while being constrained in your current client.
In general the compositor is allowed to take away constraints whenever it pleases.
pointer_input.cpp | ||
---|---|---|
629 | Client would be better as there might be weird multi surface situations. |