diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2010-07-15 09:57:23 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2010-07-15 09:57:23 -0400 |
commit | d17e650aa062946ce599f80fe33989cc2c7bb52d (patch) | |
tree | 169f44f5e477ae1e944bf3cc434c500b4b314e06 | |
parent | 6eadb8494797e44910b86b5e101823cf527c04e1 (diff) | |
download | vte-d17e650aa062946ce599f80fe33989cc2c7bb52d.tar.gz |
Stop using the gdk_draw_* API
Only one gdk_draw_rectangle() call let.
-rw-r--r-- | src/vte.c | 29 |
1 files changed, 16 insertions, 13 deletions
@@ -4839,26 +4839,29 @@ void _vte_terminal_visible_beep(VteTerminal *terminal) { GtkWidget *widget; + GtkAllocation allocation; + GtkStyle *style; + PangoColor color; widget = &terminal->widget; if (gtk_widget_get_realized (widget)) { - GtkStyle *style; - GtkAllocation allocation; style = gtk_widget_get_style (widget); gtk_widget_get_allocation (widget, &allocation); - - /* Fill the screen with the default foreground color, and then - * repaint everything, to provide visual bell. */ - gdk_draw_rectangle (gtk_widget_get_window (widget), - style->fg_gc[gtk_widget_get_state (widget)], - TRUE, 0, 0, allocation.width, allocation.height); - - gdk_flush (); - - /* Force the repaint. */ - _vte_invalidate_all (terminal); /* max delay of UPDATE_REPEAT_TIMEOUT */ + color.red = style->fg[gtk_widget_get_state (widget)].red; + color.green = style->fg[gtk_widget_get_state (widget)].green; + color.blue = style->fg[gtk_widget_get_state (widget)].blue; + + _vte_draw_start(terminal->pvt->draw); + _vte_draw_fill_rectangle(terminal->pvt->draw, + 0, 0, + allocation.width, allocation.height, + &color, VTE_DRAW_OPAQUE); + _vte_draw_end(terminal->pvt->draw); + + /* Force the repaint, max delay of UPDATE_REPEAT_TIMEOUT */ + _vte_invalidate_all (terminal); } } |