]> git.eshelyaron.com Git - emacs.git/commitdiff
Switch to GXinvert in XTflash
authorPo Lu <luangruo@yahoo.com>
Thu, 2 May 2024 02:23:09 +0000 (10:23 +0800)
committerEshel Yaron <me@eshelyaron.com>
Mon, 6 May 2024 16:32:01 +0000 (18:32 +0200)
* src/xterm.c (XTflash): Move to inverting the regions of the
display being flashed.  Suggested by Manuel Giraud
<manuel@ledu-giraud.fr>.

(cherry picked from commit d3e95fcae9078a0ea8fcb15a4aee417e6e546ee5)

src/xterm.c

index c6cc4a9cae6ab4224b0742ec4fca8088c90a7f8d..44f0cc55fd7a692ba235eecff5fcaf612a350033 100644 (file)
@@ -11550,19 +11550,9 @@ XTflash (struct frame *f)
   int fd, rc;
 
   block_input ();
-
-  if (FRAME_X_VISUAL_INFO (f)->class == TrueColor)
-    {
-      values.function = GXxor;
-      values.foreground = (FRAME_FOREGROUND_PIXEL (f)
-                          ^ FRAME_BACKGROUND_PIXEL (f));
-
-      gc = XCreateGC (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                     GCFunction | GCForeground, &values);
-    }
-  else
-    gc = FRAME_X_OUTPUT (f)->normal_gc;
-
+  values.function = GXinvert;
+  gc = XCreateGC (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+                 GCFunction, &values);
 
   /* Get the height not including a menu bar widget.  */
   int height = FRAME_PIXEL_HEIGHT (f);
@@ -11649,8 +11639,7 @@ XTflash (struct frame *f)
                    flash_left, FRAME_INTERNAL_BORDER_WIDTH (f),
                    width, height - 2 * FRAME_INTERNAL_BORDER_WIDTH (f));
 
-  if (FRAME_X_VISUAL_INFO (f)->class == TrueColor)
-    XFreeGC (FRAME_X_DISPLAY (f), gc);
+  XFreeGC (FRAME_X_DISPLAY (f), gc);
   x_flush (f);
 
   unblock_input ();