Skip to content

Commit

Permalink
[register] Don't usleep on Apple or Win32.
Browse files Browse the repository at this point in the history
Not needed and usleep needs an extra include for MinGW64.
  • Loading branch information
jralls committed Dec 18, 2022
1 parent 092d67e commit 9815579
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gnucash/register/register-gnome/gnucash-sheet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1833,11 +1833,13 @@ 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))
{
#if !(defined(__APPLE__) || defined(__WIN32__))
/* There's sometimes a timing issue when running under KDE
* Plasma where this call removes the selection. This 1ms
* sleep prevents it.
*/
usleep(1000);
#endif
/* Restore the saved cursor position in case GtkEntry's IMContext
* handlers messed with it after we set it in our insert_cb.
*/
Expand Down

0 comments on commit 9815579

Please sign in to comment.