From: Yuuki Harano Date: Tue, 21 Jan 2020 13:45:37 +0000 (+0900) Subject: Before sleep, dispatch draw events. X-Git-Tag: emacs-29.0.90~3821 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=806b7640c0fe757ee6c2213e33220a807a5aa05d;p=emacs.git Before sleep, dispatch draw events. * src/pgtkterm.c (pgtk_select): remove sigio signal (pgtk_term_init): dispatch draw --- diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 74eb08d3301..92ad1bc6c8e 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -3605,6 +3605,17 @@ pgtk_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds, tmop = &tmo; } + /* Before sleep, dispatch draw events. */ + if (context_acquired) + { + int pselect_errno = errno; + block_input (); + while (g_main_context_pending (context)) + g_main_context_dispatch (context); + unblock_input (); + errno = pselect_errno; + } + fds_lim = max_fds + 1; nfds = thread_select (pselect, fds_lim, &all_rfds, have_wfds ? &all_wfds : NULL, efds, @@ -6271,13 +6282,6 @@ pgtk_term_init (Lisp_Object display_name, char *resource_name) xsettings_initialize (dpyinfo); -#ifdef F_SETOWN - fcntl (dpyinfo->connection, F_SETOWN, getpid ()); -#endif /* ! defined (F_SETOWN) */ - - if (interrupt_input) - init_sigio (dpyinfo->connection); - pgtk_selection_init(); pgtk_im_init (dpyinfo);