[gnome-system-monitor/ubergraph] More Nextmon cleanup



commit 6b50983dd3970d2b1eef0d3906628e2c52aed1f0
Author: Robert Roth <robert roth off gmail com>
Date:   Mon Jul 8 02:48:34 2013 +0300

    More Nextmon cleanup

 src/sysmon.c         |   55 --------------------------------------------------
 src/sysmon.h         |    9 --------
 src/system-monitor.c |    4 ---
 3 files changed, 0 insertions(+), 68 deletions(-)
---
diff --git a/src/sysmon.c b/src/sysmon.c
index 08a56af..d90d8ed 100644
--- a/src/sysmon.c
+++ b/src/sysmon.c
@@ -6,7 +6,6 @@
 
 #include "sysmon.h"
 
-UIInfo       ui_info          = { 0 };
 CpuInfo      cpu_info         = { 0 };
 NetInfo      net_info         = { 0 };
 
@@ -22,36 +21,6 @@ smon_cpu_has_freq_scaling (gint cpu)
        return ret;
 }
 
-void
-smon_gdk_event_hook (GdkEvent *event, /* IN */
-                gpointer  data)  /* IN */
-{
-       ui_info.gdk_event_count++;
-       gtk_main_do_event(event);
-}
-
-gdouble
-smon_get_xevent_info (UberLineGraph *graph,     /* IN */
-                 guint          line,      /* IN */
-                 gpointer       user_data) /* IN */
-{
-       gdouble value = UBER_LINE_GRAPH_NO_VALUE;
-
-       switch (line) {
-       case 1:
-               value = ui_info.gdk_event_count;
-               ui_info.gdk_event_count = 0;
-               break;
-       case 2:
-               value = ui_info.x_event_count;
-               ui_info.x_event_count = 0;
-               break;
-       default:
-               g_assert_not_reached();
-       }
-       return value;
-}
-
 gdouble
 smon_get_cpu_info (UberLineGraph *graph,     /* IN */
               guint          line,      /* IN */
@@ -98,30 +67,6 @@ smon_get_net_info (UberLineGraph *graph,     /* IN */
        return value;
 }
 
-int
-XNextEvent (Display *display,      /* IN */
-            XEvent  *event_return) /* OUT */
-{
-       static gsize initialized = FALSE;
-       static int (*Real_XNextEvent) (Display*disp, XEvent*evt);
-       gpointer lib;
-       int ret;
-       
-       if (G_UNLIKELY(g_once_init_enter(&initialized))) {
-               if (!(lib = dlopen("libX11.so.6", RTLD_LAZY))) {
-                       g_error("Could not load libX11.so.6");
-               }
-               if (!(Real_XNextEvent = dlsym(lib, "XNextEvent"))) {
-                       g_error("Could not find XNextEvent in libX11.so.6");
-               }
-               g_once_init_leave(&initialized, TRUE);
-       }
-
-       ret = Real_XNextEvent(display, event_return);
-       ui_info.x_event_count++;
-       return ret;
-}
-
 void
 smon_next_cpu_info (void)
 {
diff --git a/src/sysmon.h b/src/sysmon.h
index 783f956..2d736ef 100644
--- a/src/sysmon.h
+++ b/src/sysmon.h
@@ -26,19 +26,10 @@ typedef struct
        gdouble last_total_out;
 } NetInfo;
 
-typedef struct
-{
-       gulong gdk_event_count;
-       gulong x_event_count;
-} UIInfo;
-
-extern UIInfo       ui_info;
 extern CpuInfo      cpu_info;
 extern NetInfo      net_info;
 
 gboolean smon_cpu_has_freq_scaling (gint cpu);
-void smon_gdk_event_hook (GdkEvent *event, gpointer  data);
-gdouble smon_get_xevent_info (UberLineGraph *graph, guint line, gpointer user_data);
 
 gdouble
 smon_get_cpu_info (UberLineGraph *graph,     /* IN */
diff --git a/src/system-monitor.c b/src/system-monitor.c
index 629f872..41a1cdd 100644
--- a/src/system-monitor.c
+++ b/src/system-monitor.c
@@ -76,10 +76,6 @@ main (gint   argc,   /* IN */
        smon_next_cpu_info();
        smon_next_cpu_freq_info();
        /*
-        * Install event hook to track how many X events we are doing.
-        */
-       gdk_event_handler_set(smon_gdk_event_hook, NULL, NULL);
-       /*
         * Create window and graphs.
         */
        window = uber_window_new();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]