[gnome-system-monitor] Fixed graph grids not rendered issue (Bug 693677).
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-monitor] Fixed graph grids not rendered issue (Bug 693677).
- Date: Wed, 10 Jul 2013 21:33:26 +0000 (UTC)
commit 22708897fcafa545d767309c0f15d8167848a63c
Author: Robert Roth <robert roth off gmail com>
Date: Thu Jul 11 00:27:58 2013 +0300
Fixed graph grids not rendered issue (Bug 693677).
Fixed graph grids not being rendered issue by
redrawing the grids in case of state flags changes, so when the window
gets focused, the grid is redrawn.
http://bugzilla.gnome.org/show_bug.cgi?id=693677
src/load-graph.cpp | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/load-graph.cpp b/src/load-graph.cpp
index 4bbac9d..6ede62f 100644
--- a/src/load-graph.cpp
+++ b/src/load-graph.cpp
@@ -216,6 +216,20 @@ load_graph_configure (GtkWidget *widget,
}
static gboolean
+load_graph_state_changed (GtkWidget *widget,
+ GtkStateFlags *flags,
+ gpointer data_ptr)
+{
+ LoadGraph * const graph = static_cast<LoadGraph*>(data_ptr);
+
+ graph->clear_background();
+
+ load_graph_queue_draw (graph);
+
+ return TRUE;
+}
+
+static gboolean
load_graph_draw (GtkWidget *widget,
cairo_t * context,
gpointer data_ptr)
@@ -782,6 +796,8 @@ LoadGraph::LoadGraph(guint type)
G_CALLBACK (load_graph_configure), graph);
g_signal_connect (G_OBJECT(disp), "destroy",
G_CALLBACK (load_graph_destroy), graph);
+ g_signal_connect (G_OBJECT(disp), "state-flags-changed",
+ G_CALLBACK (load_graph_state_changed), graph);
gtk_widget_set_events (disp, GDK_EXPOSURE_MASK);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]