[refactor
timo.lindfors@iki.fi**20080826153042] {
hunk ./main.c 12
-char *key;
+char *key, *prev_key = "";
hunk ./main.c 44
-void motion_notify(GtkWidget *widget, GdkEventMotion *e) {
-    g_print("motion %f %f\n",
-	    e->x_root,
-	    e->y_root);
-    {
-	char buf[256];
-	int cx, cy;
-	key = get_key_for_coord(e->x_root,
-				e->y_root,
-				&cx,
-				&cy);
+void magnify(int x, int y) {
+    int cx, cy;
+    key = get_key_for_coord(x,
+			    y,
+			    &cx,
+			    &cy);
+    printf("magnify key %s prev_key %s\n", key, prev_key);
+    if (strcmp(key, prev_key)) {
+	prev_key = key;
hunk ./main.c 54
+	    char buf[256];
hunk ./main.c 56
-	    gtk_window_get_size(GTK_WINDOW(window), &sizex, &sizey);
-	    gtk_window_move(GTK_WINDOW(window),
-			    cx - sizex/2,
-			    cy - sizey - 20);
+
hunk ./main.c 60
+	    gtk_window_get_size(GTK_WINDOW(window), &sizex, &sizey);
+	    gtk_window_move(GTK_WINDOW(window),
+			    cx - sizex/2,
+			    cy - sizey - 40);
hunk ./main.c 72
+void motion_notify(GtkWidget *widget, GdkEventMotion *e) {
+    g_print("motion %f %f\n",
+	    e->x_root,
+	    e->y_root);
+    magnify(e->x_root,
+	    e->y_root);
+}
hunk ./main.c 84
+    magnify(e->x_root,
+	    e->y_root);
hunk ./main.c 102
+    magnify(0,0);
hunk ./main.c 158
-// change text
hunk ./main.c 159
+// better text placement
+// rethink layout api
+// libfakekey-dev libgtk2.0-dev
}
