diff options
| author | Po Lu | 2022-11-12 13:11:00 +0000 |
|---|---|---|
| committer | Po Lu | 2022-11-12 13:11:00 +0000 |
| commit | e7614cc9ac18995ef8ac353096a5c13e8cebddc9 (patch) | |
| tree | 5cbfcb0ae108f244f8fc05f03ced0fe22f005739 /src | |
| parent | 2bac9d469398c0453e8026430e0f84a74a7b602f (diff) | |
| download | emacs-e7614cc9ac18995ef8ac353096a5c13e8cebddc9.tar.gz emacs-e7614cc9ac18995ef8ac353096a5c13e8cebddc9.zip | |
Correctly handle key map updates on Haiku
* src/haiku_support.cc (MessageReceived): Handle
B_KEY_MAP_LOADED by clearing the previous keymap.
Diffstat (limited to 'src')
| -rw-r--r-- | src/haiku_support.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/haiku_support.cc b/src/haiku_support.cc index 0f8e26d0db4..3a982856777 100644 --- a/src/haiku_support.cc +++ b/src/haiku_support.cc | |||
| @@ -653,6 +653,24 @@ public: | |||
| 653 | Quit (); | 653 | Quit (); |
| 654 | else if (msg->what == B_CLIPBOARD_CHANGED) | 654 | else if (msg->what == B_CLIPBOARD_CHANGED) |
| 655 | haiku_write (CLIPBOARD_CHANGED_EVENT, &rq); | 655 | haiku_write (CLIPBOARD_CHANGED_EVENT, &rq); |
| 656 | else if (msg->what == B_KEY_MAP_LOADED) | ||
| 657 | { | ||
| 658 | /* Install the new keymap. Or rather, clear key_map -- Emacs | ||
| 659 | will fetch it again from the main thread the next time it | ||
| 660 | is needed. */ | ||
| 661 | if (key_map_lock.Lock ()) | ||
| 662 | { | ||
| 663 | if (key_map) | ||
| 664 | free (key_map); | ||
| 665 | |||
| 666 | if (key_chars) | ||
| 667 | free (key_chars); | ||
| 668 | |||
| 669 | key_map = NULL; | ||
| 670 | key_chars = NULL; | ||
| 671 | key_map_lock.Unlock (); | ||
| 672 | } | ||
| 673 | } | ||
| 656 | else | 674 | else |
| 657 | BApplication::MessageReceived (msg); | 675 | BApplication::MessageReceived (msg); |
| 658 | } | 676 | } |