_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);
}
}