Mercurial > emacs
comparison src/xterm.c @ 50177:297925dd73b1
New approach to scrolling and scroll bars for better redraw and smoother
scroll bar behaviour.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Mon, 17 Mar 2003 23:03:53 +0000 |
parents | 0e12b5894d99 |
children | 160bd7db88a1 |
comparison
equal
deleted
inserted
replaced
50176:45278f351181 | 50177:297925dd73b1 |
---|---|
6393 } | 6393 } |
6394 | 6394 |
6395 | 6395 |
6396 #else /* !USE_MOTIF, i.e. Xaw or GTK */ | 6396 #else /* !USE_MOTIF, i.e. Xaw or GTK */ |
6397 #ifdef USE_GTK | 6397 #ifdef USE_GTK |
6398 /* Scroll bar callback for Gtk scroll bars. WIDGET is the scroll | 6398 /* Scroll bar callback for GTK scroll bars. WIDGET is the scroll |
6399 bar adjustment widget. DATA is a pointer to the scroll_bar structure. */ | 6399 bar adjustment widget. DATA is a pointer to the scroll_bar structure. */ |
6400 | 6400 |
6401 static void | 6401 static void |
6402 xg_scroll_callback (widget, data) | 6402 xg_scroll_callback (widget, data) |
6403 GtkWidget *widget; | 6403 GtkWidget *widget; |
6451 } | 6451 } |
6452 else | 6452 else |
6453 { | 6453 { |
6454 part = scroll_bar_handle; | 6454 part = scroll_bar_handle; |
6455 whole = adj->upper - adj->page_size; | 6455 whole = adj->upper - adj->page_size; |
6456 portion = min (position, whole); | 6456 portion = min ((int)position, whole); |
6457 bar->dragging = make_number (portion); | 6457 bar->dragging = make_number ((int)portion); |
6458 } | 6458 } |
6459 | 6459 |
6460 if (part >= 0) | 6460 if (part >= 0) |
6461 { | 6461 { |
6462 xg_ignore_next_thumb = 1; | |
6463 window_being_scrolled = bar->window; | 6462 window_being_scrolled = bar->window; |
6464 last_scroll_bar_part = part; | 6463 last_scroll_bar_part = part; |
6465 x_send_scroll_bar_event (bar->window, part, portion, whole); | 6464 x_send_scroll_bar_event (bar->window, part, portion, whole); |
6466 } | 6465 } |
6467 } | 6466 } |