diff options
| author | Jan Djärv | 2007-11-18 13:54:46 +0000 |
|---|---|---|
| committer | Jan Djärv | 2007-11-18 13:54:46 +0000 |
| commit | 95fbaefc5f16818e3c5fe53e4fd08a382d5d5345 (patch) | |
| tree | abd1c87801f4ed282300936431b2c55c3714382a | |
| parent | 71f89cd9525a8f271e09eb7a1eac87ff01319110 (diff) | |
| download | emacs-95fbaefc5f16818e3c5fe53e4fd08a382d5d5345.tar.gz emacs-95fbaefc5f16818e3c5fe53e4fd08a382d5d5345.zip | |
(x_scroll_bar_set_handle, x_scroll_bar_handle_click)
(x_scroll_bar_note_movement): start, end, with, height in struct
scroll_bar are integers and not Lisp_Object, so remove XINT for them.
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/xterm.c | 28 |
2 files changed, 20 insertions, 14 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 09b004ecefd..04fa6aa9357 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2007-11-18 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * xterm.c (x_scroll_bar_set_handle, x_scroll_bar_handle_click) | ||
| 4 | (x_scroll_bar_note_movement): start, end, with, height in struct | ||
| 5 | scroll_bar are integers and not Lisp_Object, so remove XINT for them. | ||
| 6 | |||
| 1 | 2007-11-17 Dan Nicolaescu <dann@ics.uci.edu> | 7 | 2007-11-17 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 8 | ||
| 3 | * puresize.h (BASE_PURESIZE): Increase to 1190000. | 9 | * puresize.h (BASE_PURESIZE): Increase to 1190000. |
diff --git a/src/xterm.c b/src/xterm.c index b0897c16838..deb9b92cd36 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -4908,16 +4908,16 @@ x_scroll_bar_set_handle (bar, start, end, rebuild) | |||
| 4908 | 4908 | ||
| 4909 | /* If the display is already accurate, do nothing. */ | 4909 | /* If the display is already accurate, do nothing. */ |
| 4910 | if (! rebuild | 4910 | if (! rebuild |
| 4911 | && start == XINT (bar->start) | 4911 | && start == bar->start |
| 4912 | && end == XINT (bar->end)) | 4912 | && end == bar->end) |
| 4913 | return; | 4913 | return; |
| 4914 | 4914 | ||
| 4915 | BLOCK_INPUT; | 4915 | BLOCK_INPUT; |
| 4916 | 4916 | ||
| 4917 | { | 4917 | { |
| 4918 | int inside_width = VERTICAL_SCROLL_BAR_INSIDE_WIDTH (f, XINT (bar->width)); | 4918 | int inside_width = VERTICAL_SCROLL_BAR_INSIDE_WIDTH (f, bar->width); |
| 4919 | int inside_height = VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (f, XINT (bar->height)); | 4919 | int inside_height = VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (f, bar->height); |
| 4920 | int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, XINT (bar->height)); | 4920 | int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, bar->height); |
| 4921 | 4921 | ||
| 4922 | /* Make sure the values are reasonable, and try to preserve | 4922 | /* Make sure the values are reasonable, and try to preserve |
| 4923 | the distance between start and end. */ | 4923 | the distance between start and end. */ |
| @@ -4937,8 +4937,8 @@ x_scroll_bar_set_handle (bar, start, end, rebuild) | |||
| 4937 | } | 4937 | } |
| 4938 | 4938 | ||
| 4939 | /* Store the adjusted setting in the scroll bar. */ | 4939 | /* Store the adjusted setting in the scroll bar. */ |
| 4940 | XSETINT (bar->start, start); | 4940 | bar->start = start; |
| 4941 | XSETINT (bar->end, end); | 4941 | bar->end = end; |
| 4942 | 4942 | ||
| 4943 | /* Clip the end position, just for display. */ | 4943 | /* Clip the end position, just for display. */ |
| 4944 | if (end > top_range) | 4944 | if (end > top_range) |
| @@ -5358,7 +5358,7 @@ x_scroll_bar_expose (bar, event) | |||
| 5358 | 5358 | ||
| 5359 | BLOCK_INPUT; | 5359 | BLOCK_INPUT; |
| 5360 | 5360 | ||
| 5361 | x_scroll_bar_set_handle (bar, XINT (bar->start), XINT (bar->end), 1); | 5361 | x_scroll_bar_set_handle (bar, bar->start, bar->end, 1); |
| 5362 | 5362 | ||
| 5363 | /* Switch to scroll bar foreground color. */ | 5363 | /* Switch to scroll bar foreground color. */ |
| 5364 | if (f->output_data.x->scroll_bar_foreground_pixel != -1) | 5364 | if (f->output_data.x->scroll_bar_foreground_pixel != -1) |
| @@ -5370,8 +5370,8 @@ x_scroll_bar_expose (bar, event) | |||
| 5370 | 5370 | ||
| 5371 | /* x, y, width, height */ | 5371 | /* x, y, width, height */ |
| 5372 | 0, 0, | 5372 | 0, 0, |
| 5373 | XINT (bar->width) - 1 - width_trim - width_trim, | 5373 | bar->width - 1 - width_trim - width_trim, |
| 5374 | XINT (bar->height) - 1); | 5374 | bar->height - 1); |
| 5375 | 5375 | ||
| 5376 | /* Restore the foreground color of the GC if we changed it above. */ | 5376 | /* Restore the foreground color of the GC if we changed it above. */ |
| 5377 | if (f->output_data.x->scroll_bar_foreground_pixel != -1) | 5377 | if (f->output_data.x->scroll_bar_foreground_pixel != -1) |
| @@ -5439,7 +5439,7 @@ x_scroll_bar_handle_click (bar, event, emacs_event) | |||
| 5439 | holding it. */ | 5439 | holding it. */ |
| 5440 | if (event->type == ButtonPress | 5440 | if (event->type == ButtonPress |
| 5441 | && emacs_event->part == scroll_bar_handle) | 5441 | && emacs_event->part == scroll_bar_handle) |
| 5442 | XSETINT (bar->dragging, y - XINT (bar->start)); | 5442 | XSETINT (bar->dragging, y - bar->start); |
| 5443 | #endif | 5443 | #endif |
| 5444 | 5444 | ||
| 5445 | #ifndef USE_TOOLKIT_SCROLL_BARS | 5445 | #ifndef USE_TOOLKIT_SCROLL_BARS |
| @@ -5448,7 +5448,7 @@ x_scroll_bar_handle_click (bar, event, emacs_event) | |||
| 5448 | && ! NILP (bar->dragging)) | 5448 | && ! NILP (bar->dragging)) |
| 5449 | { | 5449 | { |
| 5450 | int new_start = y - XINT (bar->dragging); | 5450 | int new_start = y - XINT (bar->dragging); |
| 5451 | int new_end = new_start + (XINT (bar->end) - XINT (bar->start)); | 5451 | int new_end = new_start + bar->end - bar->start; |
| 5452 | 5452 | ||
| 5453 | x_scroll_bar_set_handle (bar, new_start, new_end, 0); | 5453 | x_scroll_bar_set_handle (bar, new_start, new_end, 0); |
| 5454 | bar->dragging = Qnil; | 5454 | bar->dragging = Qnil; |
| @@ -5496,9 +5496,9 @@ x_scroll_bar_note_movement (bar, event) | |||
| 5496 | /* Where should the handle be now? */ | 5496 | /* Where should the handle be now? */ |
| 5497 | int new_start = event->xmotion.y - XINT (bar->dragging); | 5497 | int new_start = event->xmotion.y - XINT (bar->dragging); |
| 5498 | 5498 | ||
| 5499 | if (new_start != XINT (bar->start)) | 5499 | if (new_start != bar->start) |
| 5500 | { | 5500 | { |
| 5501 | int new_end = new_start + (XINT (bar->end) - XINT (bar->start)); | 5501 | int new_end = new_start + bar->end - bar->start; |
| 5502 | 5502 | ||
| 5503 | x_scroll_bar_set_handle (bar, new_start, new_end, 0); | 5503 | x_scroll_bar_set_handle (bar, new_start, new_end, 0); |
| 5504 | } | 5504 | } |