]> git.eshelyaron.com Git - emacs.git/commitdiff
Replace use of `DefaultRootWindow' with our recorded root window
authorPo Lu <luangruo@yahoo.com>
Tue, 15 Feb 2022 05:41:52 +0000 (13:41 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 15 Feb 2022 05:41:52 +0000 (13:41 +0800)
* src/xfns.c (x_relative_mouse_position):
(x_set_parent_frame):
(Fx_mouse_absolute_pixel_position):
(Fx_set_mouse_absolute_pixel_position):
* src/xterm.c (x_iconify_frame): Use dpyinfo->root_window
instead of DefaultRootWindow.

src/xfns.c
src/xterm.c

index c490dc1802a64bfbd8a6129aae32e3bd4e7ba1f1..0f8d6933b39a5ff8c3dd82de214e9fa1ccf6a73c 100644 (file)
@@ -610,7 +610,7 @@ x_relative_mouse_position (struct frame *f, int *x, int *y)
   block_input ();
 
   XQueryPointer (FRAME_X_DISPLAY (f),
-                 DefaultRootWindow (FRAME_X_DISPLAY (f)),
+                 FRAME_DISPLAY_INFO (f)->root_window,
 
                  /* The root window which contains the pointer.  */
                  &root,
@@ -910,7 +910,7 @@ x_set_parent_frame (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
       block_input ();
       XReparentWindow
        (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
-        p ? FRAME_X_WINDOW (p) : DefaultRootWindow (FRAME_X_DISPLAY (f)),
+        p ? FRAME_X_WINDOW (p) : FRAME_DISPLAY_INFO (f)->root_window,
         f->left_pos, f->top_pos);
 #ifdef USE_GTK
       if (EQ (x_gtk_resize_child_frames, Qresize_mode))
@@ -6372,7 +6372,7 @@ selected frame's display.  */)
 
   block_input ();
   XQueryPointer (FRAME_X_DISPLAY (f),
-                 DefaultRootWindow (FRAME_X_DISPLAY (f)),
+                FRAME_DISPLAY_INFO (f)->root_window,
                  &root, &dummy_window, &x, &y, &dummy, &dummy,
                  (unsigned int *) &dummy);
   unblock_input ();
@@ -6406,14 +6406,15 @@ The coordinates X and Y are interpreted in pixels relative to a position
                              &deviceid))
        {
          XIWarpPointer (FRAME_X_DISPLAY (f), deviceid, None,
-                        DefaultRootWindow (FRAME_X_DISPLAY (f)),
+                        FRAME_DISPLAY_INFO (f)->root_window,
                         0, 0, 0, 0, xval, yval);
        }
       XUngrabServer (FRAME_X_DISPLAY (f));
     }
   else
 #endif
-    XWarpPointer (FRAME_X_DISPLAY (f), None, DefaultRootWindow (FRAME_X_DISPLAY (f)),
+    XWarpPointer (FRAME_X_DISPLAY (f), None,
+                 FRAME_DISPLAY_INFO (f)->root_window,
                  0, 0, 0, 0, xval, yval);
   unblock_input ();
 
index 60d87ccbf0962d7c94f0ceff55ad28299fb288f6..23317bf6959b8d92b90d135e772ef64c784438ce 100644 (file)
@@ -15075,7 +15075,7 @@ x_iconify_frame (struct frame *f)
     msg.xclient.data.l[0] = IconicState;
 
     if (! XSendEvent (FRAME_X_DISPLAY (f),
-                     DefaultRootWindow (FRAME_X_DISPLAY (f)),
+                     FRAME_DISPLAY_INFO (f)->root_window,
                      False,
                      SubstructureRedirectMask | SubstructureNotifyMask,
                      &msg))