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 -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220913103631.6EC831C0D18%40moolenaar.net.

Raspunde prin e-mail lui