- gint winx, winy, winwidth, winheight;
- gdk_window_get_position(event->window, &winx, &winy);
- gdk_drawable_get_size(GDK_DRAWABLE(event->window), &winwidth, &winheight);
+ int winwidth = gtk_widget_get_allocated_width( GTK_WIDGET(textview) );
+ int winheight = gtk_widget_get_allocated_height( GTK_WIDGET(textview) );