aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2022-09-09 16:27:02 +0800
committerPo Lu2022-09-09 16:27:02 +0800
commita0886b321c4792ac52d69900a999840c7ee1d90a (patch)
tree821e9e1d260c79e87a4693838bfe445bf88ec6b0 /src
parentadc8344e759b0aa3c919df9bdff1232d89b2e6b4 (diff)
downloademacs-a0886b321c4792ac52d69900a999840c7ee1d90a.tar.gz
emacs-a0886b321c4792ac52d69900a999840c7ee1d90a.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/xterm.c b/src/xterm.c
index aa3fb0fc124..6043e2ab09a 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3978,12 +3978,10 @@ x_dnd_do_unsupported_drop (struct x_display_info *dpyinfo,
3978 x_ignore_errors_for_next_request (dpyinfo); 3978 x_ignore_errors_for_next_request (dpyinfo);
3979 XSendEvent (dpyinfo->display, child, 3979 XSendEvent (dpyinfo->display, child,
3980 True, ButtonPressMask, &event); 3980 True, ButtonPressMask, &event);
3981 x_stop_ignoring_errors (dpyinfo);
3982 3981
3983 event.xbutton.type = ButtonRelease; 3982 event.xbutton.type = ButtonRelease;
3984 event.xbutton.time = before + 2; 3983 event.xbutton.time = before + 2;
3985 3984
3986 x_ignore_errors_for_next_request (dpyinfo);
3987 XSendEvent (dpyinfo->display, child, 3985 XSendEvent (dpyinfo->display, child,
3988 True, ButtonReleaseMask, &event); 3986 True, ButtonReleaseMask, &event);
3989 x_stop_ignoring_errors (dpyinfo); 3987 x_stop_ignoring_errors (dpyinfo);
@@ -6630,22 +6628,21 @@ x_set_frame_alpha (struct frame *f)
6630 Do this unconditionally as this function is called on reparent when 6628 Do this unconditionally as this function is called on reparent when
6631 alpha has not changed on the frame. */ 6629 alpha has not changed on the frame. */
6632 6630
6631 x_ignore_errors_for_next_request (dpyinfo);
6632
6633 if (!FRAME_PARENT_FRAME (f)) 6633 if (!FRAME_PARENT_FRAME (f))
6634 { 6634 {
6635 parent = x_find_topmost_parent (f); 6635 parent = x_find_topmost_parent (f);
6636 6636
6637 if (parent != None) 6637 if (parent != None)
6638 { 6638 {
6639 x_ignore_errors_for_next_request (dpyinfo);
6640 XChangeProperty (dpy, parent, 6639 XChangeProperty (dpy, parent,
6641 dpyinfo->Xatom_net_wm_window_opacity, 6640 dpyinfo->Xatom_net_wm_window_opacity,
6642 XA_CARDINAL, 32, PropModeReplace, 6641 XA_CARDINAL, 32, PropModeReplace,
6643 (unsigned char *) &opac, 1); 6642 (unsigned char *) &opac, 1);
6644 x_stop_ignoring_errors (dpyinfo);
6645 } 6643 }
6646 } 6644 }
6647 6645
6648 x_ignore_errors_for_next_request (dpyinfo);
6649 XChangeProperty (dpy, win, dpyinfo->Xatom_net_wm_window_opacity, 6646 XChangeProperty (dpy, win, dpyinfo->Xatom_net_wm_window_opacity,
6650 XA_CARDINAL, 32, PropModeReplace, 6647 XA_CARDINAL, 32, PropModeReplace,
6651 (unsigned char *) &opac, 1); 6648 (unsigned char *) &opac, 1);