mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
sc: Use current console rather than first console for mouse input
When mouse reporting feature is turned on (control sequence ^[[?1000h), syscons sends valid mouse coordinates only for ttyv0. Applications running on other ttys always (erroneously) get mouse coordinates from the first tty, not from tty they actually run. Steps to reproduce: 1. On ttyv0, run any application that uses mouse reporting feature. Make some clicks. The feature works properly. 2. Switch to another ttyv, run the application. The application receives mouse click events, but mouse position reported by syscons to the application does not match with the actual mouse position on the screen. Expected result: Reported mouse position should match with visible mouse position. PR: 193339 Reviewed by: imp
This commit is contained in:
parent
256fe4a154
commit
751c323b82
|
@ -798,7 +798,7 @@ sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
|
||||||
cur_scp->status &= ~MOUSE_HIDDEN;
|
cur_scp->status &= ~MOUSE_HIDDEN;
|
||||||
|
|
||||||
if (cur_scp->mouse_level > 0) {
|
if (cur_scp->mouse_level > 0) {
|
||||||
sc_mouse_input(scp, mouse);
|
sc_mouse_input(cur_scp, mouse);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -859,7 +859,7 @@ sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
|
||||||
cur_scp->status &= ~MOUSE_HIDDEN;
|
cur_scp->status &= ~MOUSE_HIDDEN;
|
||||||
|
|
||||||
if (cur_scp->mouse_level > 0) {
|
if (cur_scp->mouse_level > 0) {
|
||||||
sc_mouse_input(scp, mouse);
|
sc_mouse_input(cur_scp, mouse);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue