diff options
author | Your Name <you@example.com> | 2022-09-13 11:25:54 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-13 11:25:54 +0100 |
commit | 810cb5a3bf73ff4b084f483aa87cd49c1111bfa9 (patch) | |
tree | 91a99cf66ec5fc15d73b2ee63f3310c24eee7158 | |
parent | 83a19c5fda0556330860899bfb484addf9178cd0 (diff) | |
download | vim-git-810cb5a3bf73ff4b084f483aa87cd49c1111bfa9.tar.gz |
patch 9.0.0454: incorrect color for modeless selection with GTKv9.0.0454
Problem: Incorrect color for modeless selection with GTK.
Solution: Use simple inversion instead of XOR. (closes #11111)
-rw-r--r-- | src/gui_gtk_x11.c | 8 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index d0d946cc0..21a6ed109 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -6261,7 +6261,7 @@ gui_mch_invert_rectangle(int r, int c, int nr, int nc) }; cairo_t * const cr = cairo_create(gui.surface); - set_cairo_source_rgba_from_color(cr, gui.norm_pixel ^ gui.back_pixel); + cairo_set_source_rgba(cr, 1.0, 1.0, 1.0, 1.0); # if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,9,2) cairo_set_operator(cr, CAIRO_OPERATOR_DIFFERENCE); # else @@ -6281,13 +6281,9 @@ gui_mch_invert_rectangle(int r, int c, int nr, int nc) if (gui.drawarea->window == NULL) return; - values.foreground.pixel = gui.norm_pixel ^ gui.back_pixel; - values.background.pixel = gui.norm_pixel ^ gui.back_pixel; - values.function = GDK_XOR; + values.function = GDK_INVERT; invert_gc = gdk_gc_new_with_values(gui.drawarea->window, &values, - GDK_GC_FOREGROUND | - GDK_GC_BACKGROUND | GDK_GC_FUNCTION); gdk_gc_set_exposures(invert_gc, gui.visibility != GDK_VISIBILITY_UNOBSCURED); diff --git a/src/version.c b/src/version.c index 9701d6d82..9208d6a0c 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 454, +/**/ 453, /**/ 452, |