Correctly handle key map updates on Haiku
* src/haiku_support.cc (MessageReceived): Handle B_KEY_MAP_LOADED by clearing the previous keymap.
This commit is contained in:
parent
2bac9d4693
commit
e7614cc9ac
1 changed files with 18 additions and 0 deletions
|
@ -653,6 +653,24 @@ class Emacs : public BApplication
|
|||
Quit ();
|
||||
else if (msg->what == B_CLIPBOARD_CHANGED)
|
||||
haiku_write (CLIPBOARD_CHANGED_EVENT, &rq);
|
||||
else if (msg->what == B_KEY_MAP_LOADED)
|
||||
{
|
||||
/* Install the new keymap. Or rather, clear key_map -- Emacs
|
||||
will fetch it again from the main thread the next time it
|
||||
is needed. */
|
||||
if (key_map_lock.Lock ())
|
||||
{
|
||||
if (key_map)
|
||||
free (key_map);
|
||||
|
||||
if (key_chars)
|
||||
free (key_chars);
|
||||
|
||||
key_map = NULL;
|
||||
key_chars = NULL;
|
||||
key_map_lock.Unlock ();
|
||||
}
|
||||
}
|
||||
else
|
||||
BApplication::MessageReceived (msg);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue