From: Po Lu Date: Thu, 2 May 2024 02:23:09 +0000 (+0800) Subject: Switch to GXinvert in XTflash X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=57e649cc7bd31fd5b885001ac33807c1a71ea322;p=emacs.git Switch to GXinvert in XTflash * src/xterm.c (XTflash): Move to inverting the regions of the display being flashed. Suggested by Manuel Giraud . (cherry picked from commit d3e95fcae9078a0ea8fcb15a4aee417e6e546ee5) --- diff --git a/src/xterm.c b/src/xterm.c index c6cc4a9cae6..44f0cc55fd7 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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 ();