[register] Delay post-ime reset of the selection.

Works around bug 798587.
This commit is contained in:
John Ralls 2022-12-17 10:41:34 -08:00
parent 16dca1ad5e
commit 65d3546f10

View File

@ -1833,6 +1833,11 @@ gnucash_sheet_key_press_event_internal (GtkWidget *widget, GdkEventKey *event)
/* Followed by the input method */
if (gtk_entry_im_context_filter_keypress (GTK_ENTRY(sheet->entry), event))
{
/* There's sometimes a timing issue when running under KDE
* Plasma where this call removes the selection. This 1ms
* sleep prevents it.
*/
usleep(1000);
/* Restore the saved cursor position in case GtkEntry's IMContext
* handlers messed with it after we set it in our insert_cb.
*/