summaryrefslogtreecommitdiff
path: root/src/netbeans.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-07-21 22:10:12 +0200
committerBram Moolenaar <Bram@vim.org>2016-07-21 22:10:12 +0200
commit36edf0685c8b55ee3ce709058d83ada8027fec1e (patch)
tree06e655f23ec2b4c9b4be5acf22b0869506bddd6b /src/netbeans.c
parentf36213597d737ab500771e87edcf121acd55e277 (diff)
downloadvim-git-36edf0685c8b55ee3ce709058d83ada8027fec1e.tar.gz
patch 7.4.2089v7.4.2089
Problem: Color handling of X11 GUIs is too complicated. Solution: Simplify the code. Use RGBA where appropriate. (Kazunobu Kuriyama)
Diffstat (limited to 'src/netbeans.c')
-rw-r--r--src/netbeans.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/netbeans.c b/src/netbeans.c
index 736bb16b0..7d6ec4344 100644
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -3097,24 +3097,9 @@ netbeans_draw_multisign_indicator(int row)
#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;