emacs-diffs
[Top][All Lists]
Advanced

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

master a0886b321c: Remove some redundant calls to x_ignore_errors_for_ne


From: Po Lu
Subject: master a0886b321c: Remove some redundant calls to x_ignore_errors_for_next_request
Date: Fri, 9 Sep 2022 04:27:15 -0400 (EDT)

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

    Remove some redundant calls to x_ignore_errors_for_next_request
    
    * src/xterm.c (x_dnd_do_unsupported_drop, x_set_frame_alpha):
    Wrap some requests in x_ignore_errors_for_next_request instead
    of calling it each time.
---
 src/xterm.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index aa3fb0fc12..6043e2ab09 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3978,12 +3978,10 @@ x_dnd_do_unsupported_drop (struct x_display_info 
*dpyinfo,
   x_ignore_errors_for_next_request (dpyinfo);
   XSendEvent (dpyinfo->display, child,
              True, ButtonPressMask, &event);
-  x_stop_ignoring_errors (dpyinfo);
 
   event.xbutton.type = ButtonRelease;
   event.xbutton.time = before + 2;
 
-  x_ignore_errors_for_next_request (dpyinfo);
   XSendEvent (dpyinfo->display, child,
              True, ButtonReleaseMask, &event);
   x_stop_ignoring_errors (dpyinfo);
@@ -6630,22 +6628,21 @@ x_set_frame_alpha (struct frame *f)
      Do this unconditionally as this function is called on reparent when
      alpha has not changed on the frame.  */
 
+  x_ignore_errors_for_next_request (dpyinfo);
+
   if (!FRAME_PARENT_FRAME (f))
     {
       parent = x_find_topmost_parent (f);
 
       if (parent != None)
        {
-         x_ignore_errors_for_next_request (dpyinfo);
          XChangeProperty (dpy, parent,
                           dpyinfo->Xatom_net_wm_window_opacity,
                           XA_CARDINAL, 32, PropModeReplace,
                           (unsigned char *) &opac, 1);
-         x_stop_ignoring_errors (dpyinfo);
        }
     }
 
-  x_ignore_errors_for_next_request (dpyinfo);
   XChangeProperty (dpy, win, dpyinfo->Xatom_net_wm_window_opacity,
                   XA_CARDINAL, 32, PropModeReplace,
                   (unsigned char *) &opac, 1);



reply via email to

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