aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2024-05-02 10:23:09 +0800
committerPo Lu2024-05-02 10:23:09 +0800
commitd3e95fcae9078a0ea8fcb15a4aee417e6e546ee5 (patch)
tree6d35b1c0269961241ca5c3c36505fb4dd8186efb
parentbcaf946cb143f9d2e5c17c89012c4f9f7541379a (diff)
downloademacs-d3e95fcae9078a0ea8fcb15a4aee417e6e546ee5.tar.gz
emacs-d3e95fcae9078a0ea8fcb15a4aee417e6e546ee5.zip
Switch to GXinvert in XTflash
* src/xterm.c (XTflash): Move to inverting the regions of the display being flashed. Suggested by Manuel Giraud <manuel@ledu-giraud.fr>.
-rw-r--r--src/xterm.c19
1 files changed, 4 insertions, 15 deletions
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)
11550 int fd, rc; 11550 int fd, rc;
11551 11551
11552 block_input (); 11552 block_input ();
11553 11553 values.function = GXinvert;
11554 if (FRAME_X_VISUAL_INFO (f)->class == TrueColor) 11554 gc = XCreateGC (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
11555 { 11555 GCFunction, &values);
11556 values.function = GXxor;
11557 values.foreground = (FRAME_FOREGROUND_PIXEL (f)
11558 ^ FRAME_BACKGROUND_PIXEL (f));
11559
11560 gc = XCreateGC (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
11561 GCFunction | GCForeground, &values);
11562 }
11563 else
11564 gc = FRAME_X_OUTPUT (f)->normal_gc;
11565
11566 11556
11567 /* Get the height not including a menu bar widget. */ 11557 /* Get the height not including a menu bar widget. */
11568 int height = FRAME_PIXEL_HEIGHT (f); 11558 int height = FRAME_PIXEL_HEIGHT (f);
@@ -11649,8 +11639,7 @@ XTflash (struct frame *f)
11649 flash_left, FRAME_INTERNAL_BORDER_WIDTH (f), 11639 flash_left, FRAME_INTERNAL_BORDER_WIDTH (f),
11650 width, height - 2 * FRAME_INTERNAL_BORDER_WIDTH (f)); 11640 width, height - 2 * FRAME_INTERNAL_BORDER_WIDTH (f));
11651 11641
11652 if (FRAME_X_VISUAL_INFO (f)->class == TrueColor) 11642 XFreeGC (FRAME_X_DISPLAY (f), gc);
11653 XFreeGC (FRAME_X_DISPLAY (f), gc);
11654 x_flush (f); 11643 x_flush (f);
11655 11644
11656 unblock_input (); 11645 unblock_input ();