Page MenuHomeFreeBSD

vt: fix window switching w.r.t. cngrab/cnungrab
ClosedPublic

Authored by kevans on Nov 6 2020, 3:14 AM.
Tags
None
Referenced Files
F146014779: D27110.id.diff
Fri, Feb 27, 1:21 AM
F145983111: D27110.id.diff
Thu, Feb 26, 6:22 PM
F145938085: D27110.id.diff
Thu, Feb 26, 8:35 AM
Unknown Object (File)
Tue, Feb 24, 7:24 PM
Unknown Object (File)
Fri, Feb 20, 4:40 AM
Unknown Object (File)
Fri, Feb 20, 4:40 AM
Unknown Object (File)
Wed, Feb 11, 5:56 AM
Unknown Object (File)
Mon, Feb 9, 12:57 PM
Subscribers

Details

Summary

Noticed while investigating the situation that lead to D27109, vt(4) will switch away from the current window but never switch back if the console ends up being ungrabbed.

Resolve this by recording the active window in cngrab(), and restore it on the last cnungrab() if we actually switched away.

While I was hacking on this, I noticed that vt_allocate_keyboard will do a cnungrab/cngrab dance if it needs to. Yank out basically just the parts it needs and use those directly to avoid clobbering the pre-grab window state -- it just wants the keyboard restored.

Test Plan

Switch to ttyv1, break to debugger, continue; observe it switching back to a functional ttyv1.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 34661