- /* Calculate the position of the 'more' tag */
- gint promptwidth, promptheight;
- pango_layout_get_pixel_size(win->pager_layout, &promptwidth, &promptheight);
-
- gint winx, winy, winwidth, winheight;
- gdk_window_get_position(event->window, &winx, &winy);
- gdk_drawable_get_size(GDK_DRAWABLE(event->window), &winwidth, &winheight);
-
- /* Draw the 'more' tag */
- GdkGC *context = gdk_gc_new(GDK_DRAWABLE(event->window));
- gdk_draw_layout(event->window, context,
- winx + winwidth - promptwidth,
- winy + winheight - promptheight,
- win->pager_layout);
-
- return FALSE; /* Propagate event further */
-}
-
-gboolean
-pager_after_expose_event(GtkTextView *textview, GdkEventExpose *event, winid_t win)
-{
- printf("pager check (expose)...\n");
- g_idle_add(pager_check, win);
-
-// /* Move the pager to the last visible character in the buffer */
-// gint view_height, scroll_distance;
-// move_pager_and_get_scroll_distance( GTK_TEXT_VIEW(win->widget), &view_height, &scroll_distance, FALSE );
-//
-// if(view_height <= 1)
-// /* Paging is unusable when window is too small */
-// return FALSE;
-//
-// if(!win->currently_paging) {
-// if(scroll_distance > view_height) {
-// start_paging(win);
-// /* Seriously... */
-// /* COMPAT: */
-//#if GTK_CHECK_VERSION(2,14,0)
-// gdk_window_invalidate_rect(gtk_widget_get_window(win->widget), NULL, TRUE);
-//#else
-// gdk_window_invalidate_rect(win->widget->window, NULL, TRUE);
-//#endif
-// }
-// else if(scroll_distance > 0) {
-// if(win->input_request_type != INPUT_REQUEST_NONE) {
-// GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(win->widget));
-// GtkTextMark *end = gtk_text_buffer_get_mark(buffer, "end_position");
-//
-// gtk_text_view_scroll_mark_onscreen(GTK_TEXT_VIEW(win->widget), end);
-// }
-// }
-// }