emacs-diffs
[Top][All Lists]
Advanced

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

master 6cf0784a0d: Speed up completion plugins over slow networks


From: Po Lu
Subject: master 6cf0784a0d: Speed up completion plugins over slow networks
Date: Fri, 23 Dec 2022 05:23:05 -0500 (EST)

branch: master
commit 6cf0784a0d6d1fc58a200aa8f8e14cef612cd68b
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Speed up completion plugins over slow networks
    
    * src/xterm.c (x_make_frame_invisible): Do not sync if
    `x-lax-frame-positioning' is enabled.
    (syms_of_xterm): Update doc string.
---
 src/xterm.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index 5947145ce0..c2bb1e2afe 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -28471,7 +28471,10 @@ x_make_frame_invisible (struct frame *f)
        error ("Can't notify window manager of window withdrawal");
       }
 
-  XSync (FRAME_X_DISPLAY (f), False);
+  /* Don't perform the synchronization if the network connection is
+     slow, and the user says it is unwanted.  */
+  if (NILP (Vx_lax_frame_positioning))
+    XSync (FRAME_X_DISPLAY (f), False);
 
   /* We can't distinguish this from iconification
      just by the event that we get from the server.
@@ -28482,8 +28485,7 @@ x_make_frame_invisible (struct frame *f)
   SET_FRAME_ICONIFIED (f, false);
 
   if (CONSP (frame_size_history))
-    frame_size_history_plain
-      (f, build_string ("x_make_frame_invisible"));
+    frame_size_history_plain (f, build_string ("x_make_frame_invisible"));
 
   unblock_input ();
 }
@@ -32010,6 +32012,7 @@ too slow, which is usually true when the X server is 
located over a
 network connection with high latency.  Doing so will make frame
 creation and placement faster at the cost of reducing the accuracy of
 frame placement via frame parameters, `set-frame-position', and
-`set-frame-size'.  */);
+`set-frame-size', along with the actual state of a frame after
+`x_make_frame_invisible'.  */);
   Vx_lax_frame_positioning = Qnil;
 }



reply via email to

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