To: vim_dev@googlegroups.com Subject: Patch 9.0.0454 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0454 Problem: Incorrect color for modeless selection with GTK. Solution: Use simple inversion instead of XOR. (closes #11111) Files: src/gui_gtk_x11.c *** ../vim-9.0.0453/src/gui_gtk_x11.c 2022-07-04 19:58:14.238360165 +0100 --- src/gui_gtk_x11.c 2022-09-13 11:22:51.259067461 +0100 *************** *** 6261,6267 **** }; cairo_t * const cr = cairo_create(gui.surface); ! set_cairo_source_rgba_from_color(cr, gui.norm_pixel ^ gui.back_pixel); # if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,9,2) cairo_set_operator(cr, CAIRO_OPERATOR_DIFFERENCE); # else --- 6261,6267 ---- }; cairo_t * const cr = cairo_create(gui.surface); ! 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,6293 **** 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; 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); --- 6281,6289 ---- if (gui.drawarea->window == NULL) return; ! values.function = GDK_INVERT; invert_gc = gdk_gc_new_with_values(gui.drawarea->window, &values, GDK_GC_FUNCTION); gdk_gc_set_exposures(invert_gc, gui.visibility != GDK_VISIBILITY_UNOBSCURED); *** ../vim-9.0.0453/src/version.c 2022-09-12 20:35:22.689554224 +0100 --- src/version.c 2022-09-13 11:24:47.182579288 +0100 *************** *** 705,706 **** --- 705,708 ---- { /* Add new patch number below this line */ + /**/ + 454, /**/ -- "I can't complain, but sometimes I still do." (Joe Walsh) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///