emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r112892: * xgselect.c (xg_select): Remove call to wi


From: Jan D.
Subject: [Emacs-diffs] trunk r112892: * xgselect.c (xg_select): Remove call to window_system_available
Date: Sat, 08 Jun 2013 08:48:55 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 112892
revision-id: address@hidden
parent: address@hidden
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Sat 2013-06-08 10:48:52 +0200
message:
  * xgselect.c (xg_select): Remove call to window_system_available
  and g_main_context_pending at the top, so Gdk events (i.e. file
  notify) are processed when Emacs is started with -nw.
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-06-07 09:26:02 +0000
+++ b/src/ChangeLog     2013-06-08 08:48:52 +0000
@@ -1,3 +1,9 @@
+2013-06-08  Jan Djärv  <address@hidden>
+
+       * xgselect.c (xg_select): Remove call to window_system_available
+       and g_main_context_pending at the top, so Gdk events (i.e. file
+       notify) are processed when Emacs is started with -nw.
+
 2013-06-07  Eli Zaretskii  <address@hidden>
 
        * Makefile.in (ctagsfiles1, ctagsfiles2): Don't include *.m files.

=== modified file 'src/xgselect.c'
--- a/src/xgselect.c    2013-06-03 18:47:35 +0000
+++ b/src/xgselect.c    2013-06-08 08:48:52 +0000
@@ -44,9 +44,13 @@
   int i, nfds, tmo_in_millisec;
   USE_SAFE_ALLOCA;
 
-  if (! (window_system_available (NULL)
-        && g_main_context_pending (context = g_main_context_default ())))
-    return pselect (fds_lim, rfds, wfds, efds, timeout, sigmask);
+  /* Do not try to optimize with an initial check with g_main_context_pending
+     and a call to pselect if it returns false.  If Gdk has a timeout for 0.01
+     second, and Emacs has a timeout for 1 second, g_main_context_pending will
+     return false, but the timeout will be 1 second, thus missing the gdk
+     timeout with a lot.  */
+
+  context = g_main_context_default ();
 
   if (rfds) all_rfds = *rfds;
   else FD_ZERO (&all_rfds);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]