Commit 560fae4
committed
Fix switching to fullscreen loses keyboard focus if titlebar is hidden
For some reason, when the titlebar is hidden, if we use `set fullscreen`
in native full screen mode, the focus will be lost and the user needs to
manually click on the screen to be able to type in MacVim. Current
theory is that because fullscreen window always has a title bar,
sometime that resulted in the window being defocused when the OS is
fixing it up.
For an easy fix, simply assert the focus by using `makeFirstResponder`
on the text view. This may not work well if the program is more
complicated but for MacVim the text view should always be where the
focus goes.
Fix #10781 parent 8b25779 commit 560fae4
1 file changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1419 | 1419 | | |
1420 | 1420 | | |
1421 | 1421 | | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
1422 | 1427 | | |
1423 | 1428 | | |
1424 | 1429 | | |
| |||
1436 | 1441 | | |
1437 | 1442 | | |
1438 | 1443 | | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
1439 | 1449 | | |
1440 | 1450 | | |
1441 | 1451 | | |
| |||
1500 | 1510 | | |
1501 | 1511 | | |
1502 | 1512 | | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
1503 | 1518 | | |
1504 | 1519 | | |
1505 | 1520 | | |
| |||
1515 | 1530 | | |
1516 | 1531 | | |
1517 | 1532 | | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
1518 | 1538 | | |
1519 | 1539 | | |
1520 | 1540 | | |
| |||
0 commit comments