forked from aniani/vim
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)
This commit is contained in:
committed by
Bram Moolenaar
parent
83a19c5fda
commit
810cb5a3bf
@@ -6261,7 +6261,7 @@ gui_mch_invert_rectangle(int r, int c, int nr, int nc)
|
|||||||
};
|
};
|
||||||
cairo_t * const cr = cairo_create(gui.surface);
|
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)
|
# if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,9,2)
|
||||||
cairo_set_operator(cr, CAIRO_OPERATOR_DIFFERENCE);
|
cairo_set_operator(cr, CAIRO_OPERATOR_DIFFERENCE);
|
||||||
# else
|
# else
|
||||||
@@ -6281,13 +6281,9 @@ gui_mch_invert_rectangle(int r, int c, int nr, int nc)
|
|||||||
if (gui.drawarea->window == NULL)
|
if (gui.drawarea->window == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
values.foreground.pixel = gui.norm_pixel ^ gui.back_pixel;
|
values.function = GDK_INVERT;
|
||||||
values.background.pixel = gui.norm_pixel ^ gui.back_pixel;
|
|
||||||
values.function = GDK_XOR;
|
|
||||||
invert_gc = gdk_gc_new_with_values(gui.drawarea->window,
|
invert_gc = gdk_gc_new_with_values(gui.drawarea->window,
|
||||||
&values,
|
&values,
|
||||||
GDK_GC_FOREGROUND |
|
|
||||||
GDK_GC_BACKGROUND |
|
|
||||||
GDK_GC_FUNCTION);
|
GDK_GC_FUNCTION);
|
||||||
gdk_gc_set_exposures(invert_gc, gui.visibility !=
|
gdk_gc_set_exposures(invert_gc, gui.visibility !=
|
||||||
GDK_VISIBILITY_UNOBSCURED);
|
GDK_VISIBILITY_UNOBSCURED);
|
||||||
|
@@ -703,6 +703,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
454,
|
||||||
/**/
|
/**/
|
||||||
453,
|
453,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user