emacs-diffs
[Top][All Lists]
Advanced

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

master 6f566021ed: Replace use of `DefaultRootWindow' with our recorded


From: Po Lu
Subject: master 6f566021ed: Replace use of `DefaultRootWindow' with our recorded root window
Date: Tue, 15 Feb 2022 00:42:45 -0500 (EST)

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

    Replace use of `DefaultRootWindow' with our recorded root window
    
    * 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  | 11 ++++++-----
 src/xterm.c |  2 +-
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/xfns.c b/src/xfns.c
index c490dc1802..0f8d6933b3 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -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 ();
 
diff --git a/src/xterm.c b/src/xterm.c
index 60d87ccbf0..23317bf695 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -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))



reply via email to

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