Mercurial > vim
diff src/netbeans.c @ 9624:d63b85fe3dc7 v7.4.2089
commit https://github.com/vim/vim/commit/36edf0685c8b55ee3ce709058d83ada8027fec1e
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 21 22:10:12 2016 +0200
patch 7.4.2089
Problem: Color handling of X11 GUIs is too complicated.
Solution: Simplify the code. Use RGBA where appropriate. (Kazunobu
Kuriyama)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 21 Jul 2016 22:15:05 +0200 |
parents | 69ed2c9d34a6 |
children | fd9727ae3c49 |
line wrap: on
line diff
--- a/src/netbeans.c +++ b/src/netbeans.c @@ -3097,24 +3097,9 @@ netbeans_draw_multisign_indicator(int ro #if GTK_CHECK_VERSION(3,0,0) cr = cairo_create(gui.surface); - { - GdkVisual *visual = NULL; - guint32 r_mask, g_mask, b_mask; - gint r_shift, g_shift, b_shift; - - visual = gdk_window_get_visual(gtk_widget_get_window(gui.drawarea)); - if (visual != NULL) - { - gdk_visual_get_red_pixel_details(visual, &r_mask, &r_shift, NULL); - gdk_visual_get_green_pixel_details(visual, &g_mask, &g_shift, NULL); - gdk_visual_get_blue_pixel_details(visual, &b_mask, &b_shift, NULL); - - cairo_set_source_rgb(cr, - ((gui.fgcolor->red & r_mask) >> r_shift) / 255.0, - ((gui.fgcolor->green & g_mask) >> g_shift) / 255.0, - ((gui.fgcolor->blue & b_mask) >> b_shift) / 255.0); - } - } + cairo_set_source_rgba(cr, + gui.fgcolor->red, gui.fgcolor->green, gui.fgcolor->blue, + gui.fgcolor->alpha); #endif x = 0;