]> git.eshelyaron.com Git - emacs.git/commitdiff
Before sleep, dispatch draw events.
authorYuuki Harano <masm+github@masm11.me>
Tue, 21 Jan 2020 13:45:37 +0000 (22:45 +0900)
committerJeff Walsh <fejfighter@gmail.com>
Sun, 22 Nov 2020 03:46:56 +0000 (14:46 +1100)
* src/pgtkterm.c (pgtk_select): remove sigio signal
  (pgtk_term_init): dispatch draw

src/pgtkterm.c

index 74eb08d33014a7da95befcc9dfdf69babcb1ef44..92ad1bc6c8e3826cfef05d64c3d67f9417fd2b43 100644 (file)
@@ -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);