diff options
Diffstat (limited to 'hardinfo2/util.c')
| -rw-r--r-- | hardinfo2/util.c | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/hardinfo2/util.c b/hardinfo2/util.c index 9df6fc75..79084c2c 100644 --- a/hardinfo2/util.c +++ b/hardinfo2/util.c @@ -17,6 +17,7 @@   */  #include <string.h>  #include <hardinfo.h> +#include <gtk/gtk.h>  inline void  remove_quotes(gchar *str) @@ -48,3 +49,16 @@ remove_linefeed(gchar * str)  {      strend(str, '\n');  } + +void +widget_set_cursor(GtkWidget *widget, GdkCursorType cursor_type) +{    +        GdkCursor *cursor; +  +        cursor = gdk_cursor_new(cursor_type); +        gdk_window_set_cursor(GDK_WINDOW(widget->window), cursor); +        gdk_cursor_unref(cursor); +         +        while(gtk_events_pending()) +                gtk_main_iteration(); +} | 
