emacs-diffs
[Top][All Lists]
Advanced

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

master a399eeac15 2/2: Merge branch 'master' of git.savannah.gnu.org:/sr


From: Eli Zaretskii
Subject: master a399eeac15 2/2: Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Date: Sun, 26 Jun 2022 04:11:38 -0400 (EDT)

branch: master
commit a399eeac156ec782aca5e298d846a1ca905d2fdb
Merge: f3b876fa75 afcec5f0a5
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
---
 src/xterm.c | 61 ++++++++++++++++++++++++++++++++++++++++++-------------------
 1 file changed, 42 insertions(+), 19 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index 8a42b77f51..6afb2a3312 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3184,11 +3184,10 @@ x_dnd_compute_toplevels (struct x_display_info *dpyinfo)
 
          if (dpyinfo->xshape_supported_p)
            {
-             x_catch_errors (dpyinfo->display);
+             x_ignore_errors_for_next_request (dpyinfo);
              XShapeSelectInput (dpyinfo->display,
                                 toplevels[i],
                                 ShapeNotifyMask);
-             x_uncatch_errors ();
 
 #ifndef HAVE_XCB_SHAPE
              x_catch_errors (dpyinfo->display);
@@ -24770,12 +24769,12 @@ frame_set_mouse_pixel_position (struct frame *f, int 
pix_x, int pix_y)
                              FRAME_X_WINDOW (f),
                              &deviceid))
        {
-         x_catch_errors (FRAME_X_DISPLAY (f));
+         x_ignore_errors_for_next_request (FRAME_DISPLAY_INFO (f));
+
          XIWarpPointer (FRAME_X_DISPLAY (f),
                         deviceid, None,
                         FRAME_X_WINDOW (f),
                         0, 0, 0, 0, pix_x, pix_y);
-         x_uncatch_errors ();
        }
     }
   else
@@ -24889,7 +24888,7 @@ x_get_focus_frame (struct frame *f)
 
 /* In certain situations, when the window manager follows a
    click-to-focus policy, there seems to be no way around calling
-   XSetInputFocus to give another frame the input focus .
+   XSetInputFocus to give another frame the input focus.
 
    In an ideal world, XSetInputFocus should generally be avoided so
    that applications don't interfere with the window manager's focus
@@ -24899,28 +24898,25 @@ x_get_focus_frame (struct frame *f)
 static void
 x_focus_frame (struct frame *f, bool noactivate)
 {
-  Display *dpy = FRAME_X_DISPLAY (f);
+  struct x_display_info *dpyinfo;
 
-  block_input ();
-  x_catch_errors (dpy);
+  dpyinfo = FRAME_DISPLAY_INFO (f);
 
   if (FRAME_X_EMBEDDED_P (f))
-    {
-      /* For Xembedded frames, normally the embedder forwards key
-        events.  See XEmbed Protocol Specification at
-        https://freedesktop.org/wiki/Specifications/xembed-spec/  */
-      xembed_request_focus (f);
-    }
+    /* For Xembedded frames, normally the embedder forwards key
+       events.  See XEmbed Protocol Specification at
+       https://freedesktop.org/wiki/Specifications/xembed-spec/  */
+    xembed_request_focus (f);
   else
     {
+      /* Ignore any BadMatch error this request might result in.  */
+      x_ignore_errors_for_next_request (dpyinfo);
       XSetInputFocus (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
                      RevertToParent, CurrentTime);
+
       if (!noactivate)
        x_ewmh_activate_frame (f);
     }
-
-  x_uncatch_errors ();
-  unblock_input ();
 }
 
 
@@ -25635,11 +25631,26 @@ x_intern_cached_atom (struct x_display_info *dpyinfo,
   if (!strcmp (name, "ATOM"))
     return XA_ATOM;
 
+  if (!strcmp (name, "WINDOW"))
+    return XA_WINDOW;
+
+  if (!strcmp (name, "DRAWABLE"))
+    return XA_DRAWABLE;
+
+  if (!strcmp (name, "BITMAP"))
+    return XA_BITMAP;
+
   if (!strcmp (name, "CARDINAL"))
     return XA_CARDINAL;
 
-  if (!strcmp (name, "WINDOW"))
-    return XA_WINDOW;
+  if (!strcmp (name, "COLORMAP"))
+    return XA_COLORMAP;
+
+  if (!strcmp (name, "CURSOR"))
+    return XA_CURSOR;
+
+  if (!strcmp (name, "FONT"))
+    return XA_FONT;
 
   if (dpyinfo->motif_drag_atom != None
       && !strcmp (name, dpyinfo->motif_drag_atom_name))
@@ -25702,6 +25713,18 @@ x_get_atom_name (struct x_display_info *dpyinfo, Atom 
atom,
     case XA_WINDOW:
       return xstrdup ("WINDOW");
 
+    case XA_DRAWABLE:
+      return xstrdup ("DRAWABLE");
+
+    case XA_BITMAP:
+      return xstrdup ("BITMAP");
+
+    case XA_COLORMAP:
+      return xstrdup ("COLORMAP");
+
+    case XA_FONT:
+      return xstrdup ("FONT");
+
     default:
       if (dpyinfo->motif_drag_atom
          && atom == dpyinfo->motif_drag_atom)



reply via email to

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