[vte] Stop using the gdk_draw_* API
- From: Kristian Høgsberg <krh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] Stop using the gdk_draw_* API
- Date: Thu, 15 Jul 2010 14:00:04 +0000 (UTC)
commit d17e650aa062946ce599f80fe33989cc2c7bb52d
Author: Kristian Høgsberg <krh bitplanet net>
Date: Thu Jul 15 09:57:23 2010 -0400
Stop using the gdk_draw_* API
Only one gdk_draw_rectangle() call let.
src/vte.c | 29 ++++++++++++++++-------------
1 files changed, 16 insertions(+), 13 deletions(-)
---
diff --git a/src/vte.c b/src/vte.c
index d52f131..9b84a98 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -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);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]