]> git.eshelyaron.com Git - emacs.git/commitdiff
Make `x-no-window-manager' cover user time as well
authorPo Lu <luangruo@yahoo.com>
Sun, 10 Jul 2022 02:49:46 +0000 (10:49 +0800)
committerPo Lu <luangruo@yahoo.com>
Sun, 10 Jul 2022 02:49:46 +0000 (10:49 +0800)
* src/xterm.c (x_update_frame_user_time_window):
(x_wm_supports_1): Respect `x-no-window-manager'.  This makes
testing some features easier.

src/xterm.c

index e10edbad3a9638ea1161671c261fa5078da9e447..4e2d977e60f865f802d1a29f5f9a465e5a618358 100644 (file)
@@ -7113,6 +7113,23 @@ x_update_frame_user_time_window (struct frame *f)
   output = FRAME_X_OUTPUT (f);
   dpyinfo = FRAME_DISPLAY_INFO (f);
 
+  if (!NILP (Vx_no_window_manager))
+    {
+      if (output->user_time_window != None
+         && output->user_time_window != FRAME_OUTER_WINDOW (f))
+       {
+         XDestroyWindow (dpyinfo->display, output->user_time_window);
+         XDeleteProperty (dpyinfo->display, FRAME_OUTER_WINDOW (f),
+                          dpyinfo->Xatom_net_wm_user_time_window);
+       }
+      else
+       XDeleteProperty (dpyinfo->display, FRAME_OUTER_WINDOW (f),
+                        dpyinfo->Xatom_net_wm_user_time);
+
+      output->user_time_window = None;
+      return;
+    }
+
   if (!x_wm_supports (f, dpyinfo->Xatom_net_wm_user_time_window))
     {
       if (output->user_time_window == None)
@@ -24115,6 +24132,11 @@ x_wm_supports_1 (struct x_display_info *dpyinfo, Atom want_atom)
   unsigned char *tmp_data = NULL;
   Atom target_type = XA_WINDOW;
 
+  /* The user says there's no window manager, so take him up on
+     it.  */
+  if (!NILP (Vx_no_window_manager))
+    return false;
+
   block_input ();
 
   x_catch_errors (dpy);