Skip to content

Commit 810cb5a

Browse files
Your Namebrammool
authored andcommitted
patch 9.0.0454: incorrect color for modeless selection with GTK
Problem: Incorrect color for modeless selection with GTK. Solution: Use simple inversion instead of XOR. (closes #11111)
1 parent 83a19c5 commit 810cb5a

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

src/gui_gtk_x11.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6261,7 +6261,7 @@ gui_mch_invert_rectangle(int r, int c, int nr, int nc)
62616261
};
62626262
cairo_t * const cr = cairo_create(gui.surface);
62636263

6264-
set_cairo_source_rgba_from_color(cr, gui.norm_pixel ^ gui.back_pixel);
6264+
cairo_set_source_rgba(cr, 1.0, 1.0, 1.0, 1.0);
62656265
# if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,9,2)
62666266
cairo_set_operator(cr, CAIRO_OPERATOR_DIFFERENCE);
62676267
# else
@@ -6281,13 +6281,9 @@ gui_mch_invert_rectangle(int r, int c, int nr, int nc)
62816281
if (gui.drawarea->window == NULL)
62826282
return;
62836283

6284-
values.foreground.pixel = gui.norm_pixel ^ gui.back_pixel;
6285-
values.background.pixel = gui.norm_pixel ^ gui.back_pixel;
6286-
values.function = GDK_XOR;
6284+
values.function = GDK_INVERT;
62876285
invert_gc = gdk_gc_new_with_values(gui.drawarea->window,
62886286
&values,
6289-
GDK_GC_FOREGROUND |
6290-
GDK_GC_BACKGROUND |
62916287
GDK_GC_FUNCTION);
62926288
gdk_gc_set_exposures(invert_gc, gui.visibility !=
62936289
GDK_VISIBILITY_UNOBSCURED);

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,8 @@ static char *(features[]) =
703703

704704
static int included_patches[] =
705705
{ /* Add new patch number below this line */
706+
/**/
707+
454,
706708
/**/
707709
453,
708710
/**/

0 commit comments

Comments
 (0)