|
2010-04-19
, 01:34
|
|
Posts: 172 |
Thanked: 160 times |
Joined on Jan 2010
@ Sweden
|
#2
|
|
2010-04-19
, 17:33
|
Posts: 18 |
Thanked: 5 times |
Joined on Apr 2010
|
#3
|
The Following User Says Thank You to bitwit For This Useful Post: | ||
|
2010-04-19
, 17:42
|
|
Posts: 1,111 |
Thanked: 1,985 times |
Joined on Aug 2009
@ Åbo, Finland
|
#4
|
|
2010-04-23
, 06:53
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#6
|
The Following User Says Thank You to qwerty12 For This Useful Post: | ||
Tags |
cursor, enable cursor, enable pointer, fremantle, maemo, maemo 5, mouse, mouse cursor, mouse pointer, pointer, visible cursor, visible mouse, visible pointer |
|
Messing with Synergy and I'm curious -- is it possible to enable a mouse cursor to be shown all the time? I'm currently using this quick hack I knocked up
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
int main (void)
{
GdkPixbuf *pixbuf = NULL;
GdkCursor *cursor = NULL;
gtk_init (NULL, NULL);
pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), "browser_cursor", 32, 0, NULL);
g_assert (pixbuf);
gint x = (gdk_pixbuf_get_width (pixbuf) / 2) - 7; /* Maths is shitty */
gint y = (gdk_pixbuf_get_height (pixbuf) / 2) - 7;
cursor = gdk_cursor_new_from_pixbuf (gdk_display_get_default (), pixbuf, x, y); /* I should be freeing you (and others)... */
g_assert (cursor);
gdk_window_set_cursor (gdk_window_foreign_new (GDK_ROOT_WINDOW ()), cursor);
g_idle_add ((GSourceFunc) gtk_main_quit, NULL);
gtk_main ();
return 0;
}