diff options
| author | Glenn Morris | 2014-06-01 17:18:22 -0700 |
|---|---|---|
| committer | Glenn Morris | 2014-06-01 17:18:22 -0700 |
| commit | 953e106ac84587e765244995687b088969b5f6e1 (patch) | |
| tree | a4d54b892e04b9123bc79ecffd69310f5807399e /src | |
| parent | eed652d649d28e9dafdb01f9c7425d7d28899e0d (diff) | |
| parent | afca0e759015ebc753b0c343ac45ac476dd31e9d (diff) | |
| download | emacs-953e106ac84587e765244995687b088969b5f6e1.tar.gz emacs-953e106ac84587e765244995687b088969b5f6e1.zip | |
Merge from emacs-24; up to 2014-05-29T17:16:00Z!dmantipov@yandex.ru
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 62 | ||||
| -rw-r--r-- | src/Makefile.in | 3 | ||||
| -rw-r--r-- | src/alloc.c | 1 | ||||
| -rw-r--r-- | src/cmds.c | 4 | ||||
| -rw-r--r-- | src/conf_post.h | 7 | ||||
| -rw-r--r-- | src/fileio.c | 2 | ||||
| -rw-r--r-- | src/frame.c | 2 | ||||
| -rw-r--r-- | src/lisp.h | 54 | ||||
| -rw-r--r-- | src/macuvs.h | 9 | ||||
| -rw-r--r-- | src/xterm.c | 13 |
10 files changed, 131 insertions, 26 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f5da7ce4ee3..2881574684c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,65 @@ | |||
| 1 | 2014-06-02 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * frame.c (x_set_frame_parameters): Don't read uninitialized storage. | ||
| 4 | |||
| 5 | 2014-06-02 Jan Djärv <jan.h.d@swipnet.se> | ||
| 6 | |||
| 7 | * xterm.c (xg_scroll_callback): Remove position, for jump set portion | ||
| 8 | to min(value, whole). | ||
| 9 | |||
| 10 | 2014-06-02 Paul Eggert <eggert@cs.ucla.edu> | ||
| 11 | |||
| 12 | Bring back the changes to GDB-visible symbols, but only on AIX. | ||
| 13 | And only if it's not pre-4.2 GCC. | ||
| 14 | * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros. | ||
| 15 | (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them. | ||
| 16 | (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val): | ||
| 17 | New macros. | ||
| 18 | |||
| 19 | 2014-06-02 Eli Zaretskii <eliz@gnu.org> | ||
| 20 | |||
| 21 | * fileio.c (Finsert_file_contents): Call prepare_to_modify_buffer | ||
| 22 | with PT, not GPT. (Bug#16433) | ||
| 23 | |||
| 24 | Revert last changes to GDB-visible symbols. | ||
| 25 | * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): Delete macros. | ||
| 26 | (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Don't use them. | ||
| 27 | (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val): | ||
| 28 | Delete macros. | ||
| 29 | |||
| 30 | 2014-06-02 Glenn Morris <rgm@gnu.org> | ||
| 31 | |||
| 32 | * cmds.c (Fself_insert_command): Allow zero repeat count. (Bug#17649) | ||
| 33 | |||
| 34 | 2014-06-02 Paul Eggert <eggert@cs.ucla.edu> | ||
| 35 | |||
| 36 | Fix port to 32-bit AIX with xlc (Bug#17598). | ||
| 37 | * alloc.c (gdb_make_enums_visible): Remove FLOAT_TO_STRING_BUFSIZE. | ||
| 38 | * conf_post.h (FLEXIBLE_ARRAY_MEMBER) [__IBMC__]: Don't define to empty. | ||
| 39 | * lisp.h (FLOAT_TO_STRING_BUFSIZE): Make it a macro, instead of an enum, | ||
| 40 | to work around a compiler bug in IBM xlc 12.1. | ||
| 41 | |||
| 42 | 2014-06-02 Eli Zaretskii <eliz@gnu.org> | ||
| 43 | |||
| 44 | * xterm.c (x_update_window_end): Don't invalidate the entire | ||
| 45 | mouse-highlight info, just signal frame_up_to_date_hook that mouse | ||
| 46 | highlight needs to be redisplayed. (Bug#17588) | ||
| 47 | |||
| 48 | 2014-06-02 Paul Eggert <eggert@cs.ucla.edu> | ||
| 49 | |||
| 50 | Port the GDB-visible symbols to AIX. | ||
| 51 | Without them, GDB doesn't work to debug Emacs, since the AIX linker | ||
| 52 | optimizes away the relevant external symbols. Use enums instead; | ||
| 53 | this suffices for the AIX port, which is 32-bit-only anyway. | ||
| 54 | * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros. | ||
| 55 | (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them. | ||
| 56 | (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val): | ||
| 57 | New macros. | ||
| 58 | |||
| 59 | Include sources used to create macuvs.h. | ||
| 60 | * Makefile.in ($(srcdir)/macuvs.h): New rule. | ||
| 61 | * macuvs.h: Use automatically-generated header. | ||
| 62 | |||
| 1 | 2014-06-01 Paul Eggert <eggert@cs.ucla.edu> | 63 | 2014-06-01 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 64 | ||
| 3 | Port signal-handling to DragonFly BSD (Bug#17646). | 65 | Port signal-handling to DragonFly BSD (Bug#17646). |
diff --git a/src/Makefile.in b/src/Makefile.in index 020ecd62a5e..697ff3a29f0 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -419,7 +419,8 @@ all: emacs$(EXEEXT) $(OTHER_FILES) | |||
| 419 | $(leimdir)/leim-list.el: bootstrap-emacs$(EXEEXT) | 419 | $(leimdir)/leim-list.el: bootstrap-emacs$(EXEEXT) |
| 420 | cd ../leim && $(MAKE) $(MFLAGS) leim-list.el EMACS="$(bootstrap_exe)" | 420 | cd ../leim && $(MAKE) $(MFLAGS) leim-list.el EMACS="$(bootstrap_exe)" |
| 421 | 421 | ||
| 422 | $(lispsource)/international/charprop.el: bootstrap-emacs$(EXEEXT) | 422 | $(srcdir)/macuvs.h $(lispsource)/international/charprop.el: \ |
| 423 | bootstrap-emacs$(EXEEXT) | ||
| 423 | cd ../admin/unidata && $(MAKE) $(MFLAGS) all EMACS="../$(bootstrap_exe)" | 424 | cd ../admin/unidata && $(MAKE) $(MFLAGS) all EMACS="../$(bootstrap_exe)" |
| 424 | 425 | ||
| 425 | ## The dumped Emacs is as functional and more efficient than | 426 | ## The dumped Emacs is as functional and more efficient than |
diff --git a/src/alloc.c b/src/alloc.c index d728c356109..60b035e6028 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -7200,7 +7200,6 @@ union | |||
| 7200 | enum char_bits char_bits; | 7200 | enum char_bits char_bits; |
| 7201 | enum CHECK_LISP_OBJECT_TYPE CHECK_LISP_OBJECT_TYPE; | 7201 | enum CHECK_LISP_OBJECT_TYPE CHECK_LISP_OBJECT_TYPE; |
| 7202 | enum DEFAULT_HASH_SIZE DEFAULT_HASH_SIZE; | 7202 | enum DEFAULT_HASH_SIZE DEFAULT_HASH_SIZE; |
| 7203 | enum FLOAT_TO_STRING_BUFSIZE FLOAT_TO_STRING_BUFSIZE; | ||
| 7204 | enum Lisp_Bits Lisp_Bits; | 7203 | enum Lisp_Bits Lisp_Bits; |
| 7205 | enum Lisp_Compiled Lisp_Compiled; | 7204 | enum Lisp_Compiled Lisp_Compiled; |
| 7206 | enum maxargs maxargs; | 7205 | enum maxargs maxargs; |
diff --git a/src/cmds.c b/src/cmds.c index b5aa69d6391..828fea3d753 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -280,8 +280,8 @@ At the end, it runs `post-self-insert-hook'. */) | |||
| 280 | bool remove_boundary = 1; | 280 | bool remove_boundary = 1; |
| 281 | CHECK_NUMBER (n); | 281 | CHECK_NUMBER (n); |
| 282 | 282 | ||
| 283 | if (XFASTINT (n) < 1) | 283 | if (XFASTINT (n) < 0) |
| 284 | error ("Nonpositive repetition argument %"pI"d", XFASTINT (n)); | 284 | error ("Negative repetition argument %"pI"d", XFASTINT (n)); |
| 285 | 285 | ||
| 286 | if (!EQ (Vthis_command, KVAR (current_kboard, Vlast_command))) | 286 | if (!EQ (Vthis_command, KVAR (current_kboard, Vlast_command))) |
| 287 | nonundocount = 0; | 287 | nonundocount = 0; |
diff --git a/src/conf_post.h b/src/conf_post.h index 6f6af3d3e02..9c82d7d2a71 100644 --- a/src/conf_post.h +++ b/src/conf_post.h | |||
| @@ -311,8 +311,13 @@ extern void _DebPrint (const char *fmt, ...); | |||
| 311 | and allocate (offsetof (struct s, name) + N * sizeof (t)) bytes. | 311 | and allocate (offsetof (struct s, name) + N * sizeof (t)) bytes. |
| 312 | 312 | ||
| 313 | This macro used to expand to something different on pre-C99 compilers. | 313 | This macro used to expand to something different on pre-C99 compilers. |
| 314 | IBM xlc 12.1 claims to do C99 but mishandles flexible array members. | ||
| 314 | FIXME: Remove it, and remove all uses. */ | 315 | FIXME: Remove it, and remove all uses. */ |
| 315 | #define FLEXIBLE_ARRAY_MEMBER | 316 | #ifdef __IBMC__ |
| 317 | # define FLEXIBLE_ARRAY_MEMBER 1 | ||
| 318 | #else | ||
| 319 | # define FLEXIBLE_ARRAY_MEMBER | ||
| 320 | #endif | ||
| 316 | 321 | ||
| 317 | /* Use this to suppress gcc's `...may be used before initialized' warnings. */ | 322 | /* Use this to suppress gcc's `...may be used before initialized' warnings. */ |
| 318 | #ifdef lint | 323 | #ifdef lint |
diff --git a/src/fileio.c b/src/fileio.c index dcee70aa8b4..8b20c65802d 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -4085,7 +4085,7 @@ by calling `format-decode', which see. */) | |||
| 4085 | && !NILP (BVAR (current_buffer, filename)) | 4085 | && !NILP (BVAR (current_buffer, filename)) |
| 4086 | && SAVE_MODIFF >= MODIFF) | 4086 | && SAVE_MODIFF >= MODIFF) |
| 4087 | we_locked_file = 1; | 4087 | we_locked_file = 1; |
| 4088 | prepare_to_modify_buffer (GPT, GPT, NULL); | 4088 | prepare_to_modify_buffer (PT, PT, NULL); |
| 4089 | } | 4089 | } |
| 4090 | 4090 | ||
| 4091 | move_gap_both (PT, PT_BYTE); | 4091 | move_gap_both (PT, PT_BYTE); |
diff --git a/src/frame.c b/src/frame.c index 1d5312b4758..4575ac0553e 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -2830,7 +2830,7 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist) | |||
| 2830 | /* If both of these parameters are present, it's more efficient to | 2830 | /* If both of these parameters are present, it's more efficient to |
| 2831 | set them both at once. So we wait until we've looked at the | 2831 | set them both at once. So we wait until we've looked at the |
| 2832 | entire list before we set them. */ | 2832 | entire list before we set them. */ |
| 2833 | int width, height; | 2833 | int width = 0, height = 0; |
| 2834 | bool width_change = 0, height_change = 0; | 2834 | bool width_change = 0, height_change = 0; |
| 2835 | 2835 | ||
| 2836 | /* Same here. */ | 2836 | /* Same here. */ |
diff --git a/src/lisp.h b/src/lisp.h index 5002fa2a282..028abe350c3 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -36,14 +36,40 @@ INLINE_HEADER_BEGIN | |||
| 36 | 36 | ||
| 37 | /* Define a TYPE constant ID as an externally visible name. Use like this: | 37 | /* Define a TYPE constant ID as an externally visible name. Use like this: |
| 38 | 38 | ||
| 39 | #define ID_val (some integer preprocessor expression) | ||
| 40 | #if ENUMABLE (ID_val) | ||
| 41 | DEFINE_GDB_SYMBOL_ENUM (ID) | ||
| 42 | #else | ||
| 39 | DEFINE_GDB_SYMBOL_BEGIN (TYPE, ID) | 43 | DEFINE_GDB_SYMBOL_BEGIN (TYPE, ID) |
| 40 | #define ID something | 44 | # define ID ID_val |
| 41 | DEFINE_GDB_SYMBOL_END (ID) | 45 | DEFINE_GDB_SYMBOL_END (ID) |
| 46 | #endif | ||
| 42 | 47 | ||
| 43 | This hack is for the benefit of compilers that do not make macro | 48 | This hack is for the benefit of compilers that do not make macro |
| 44 | definitions visible to the debugger. It's used for symbols that | 49 | definitions visible to the debugger. It's used for symbols that |
| 45 | .gdbinit needs, symbols whose values may not fit in 'int' (where an | 50 | .gdbinit needs, symbols whose values may not fit in 'int' (where an |
| 46 | enum would suffice). */ | 51 | enum would suffice). |
| 52 | |||
| 53 | Some GCC versions before GCC 4.2 omit enums in debugging output; | ||
| 54 | see GCC bug 23336. So don't use enums with older GCC. */ | ||
| 55 | |||
| 56 | #if !defined __GNUC__ || 4 < __GNUC__ + (2 <= __GNUC_MINOR__) | ||
| 57 | # define ENUMABLE(val) (INT_MIN <= (val) && (val) <= INT_MAX) | ||
| 58 | #else | ||
| 59 | # define ENUMABLE(val) 0 | ||
| 60 | #endif | ||
| 61 | |||
| 62 | /* On AIX 7.1 ENUMABLE should return true when possible, otherwise the | ||
| 63 | linker can optimize the symbols away, making it harder to debug. | ||
| 64 | This was discovered only late in the release process, so to play it | ||
| 65 | safe for now, non-AIX platforms do not use enums for debugging symbols. | ||
| 66 | FIXME: remove this comment and the following four lines of code. */ | ||
| 67 | #ifndef _AIX | ||
| 68 | # undef ENUMABLE | ||
| 69 | # define ENUMABLE(val) 0 | ||
| 70 | #endif | ||
| 71 | |||
| 72 | #define DEFINE_GDB_SYMBOL_ENUM(id) enum { id = id##_val }; | ||
| 47 | #if defined MAIN_PROGRAM | 73 | #if defined MAIN_PROGRAM |
| 48 | # define DEFINE_GDB_SYMBOL_BEGIN(type, id) type const id EXTERNALLY_VISIBLE | 74 | # define DEFINE_GDB_SYMBOL_BEGIN(type, id) type const id EXTERNALLY_VISIBLE |
| 49 | # define DEFINE_GDB_SYMBOL_END(id) = id; | 75 | # define DEFINE_GDB_SYMBOL_END(id) = id; |
| @@ -574,15 +600,25 @@ LISP_MACRO_DEFUN (XIL, Lisp_Object, (EMACS_INT i), (i)) | |||
| 574 | 600 | ||
| 575 | /* In the size word of a vector, this bit means the vector has been marked. */ | 601 | /* In the size word of a vector, this bit means the vector has been marked. */ |
| 576 | 602 | ||
| 603 | #define ARRAY_MARK_FLAG_val PTRDIFF_MIN | ||
| 604 | #if ENUMABLE (ARRAY_MARK_FLAG_val) | ||
| 605 | DEFINE_GDB_SYMBOL_ENUM (ARRAY_MARK_FLAG) | ||
| 606 | #else | ||
| 577 | DEFINE_GDB_SYMBOL_BEGIN (ptrdiff_t, ARRAY_MARK_FLAG) | 607 | DEFINE_GDB_SYMBOL_BEGIN (ptrdiff_t, ARRAY_MARK_FLAG) |
| 578 | #define ARRAY_MARK_FLAG PTRDIFF_MIN | 608 | # define ARRAY_MARK_FLAG ARRAY_MARK_FLAG_val |
| 579 | DEFINE_GDB_SYMBOL_END (ARRAY_MARK_FLAG) | 609 | DEFINE_GDB_SYMBOL_END (ARRAY_MARK_FLAG) |
| 610 | #endif | ||
| 580 | 611 | ||
| 581 | /* In the size word of a struct Lisp_Vector, this bit means it's really | 612 | /* In the size word of a struct Lisp_Vector, this bit means it's really |
| 582 | some other vector-like object. */ | 613 | some other vector-like object. */ |
| 614 | #define PSEUDOVECTOR_FLAG_val (PTRDIFF_MAX - PTRDIFF_MAX / 2) | ||
| 615 | #if ENUMABLE (PSEUDOVECTOR_FLAG_val) | ||
| 616 | DEFINE_GDB_SYMBOL_ENUM (PSEUDOVECTOR_FLAG) | ||
| 617 | #else | ||
| 583 | DEFINE_GDB_SYMBOL_BEGIN (ptrdiff_t, PSEUDOVECTOR_FLAG) | 618 | DEFINE_GDB_SYMBOL_BEGIN (ptrdiff_t, PSEUDOVECTOR_FLAG) |
| 584 | #define PSEUDOVECTOR_FLAG (PTRDIFF_MAX - PTRDIFF_MAX / 2) | 619 | # define PSEUDOVECTOR_FLAG PSEUDOVECTOR_FLAG_val |
| 585 | DEFINE_GDB_SYMBOL_END (PSEUDOVECTOR_FLAG) | 620 | DEFINE_GDB_SYMBOL_END (PSEUDOVECTOR_FLAG) |
| 621 | #endif | ||
| 586 | 622 | ||
| 587 | /* In a pseudovector, the size field actually contains a word with one | 623 | /* In a pseudovector, the size field actually contains a word with one |
| 588 | PSEUDOVECTOR_FLAG bit set, and one of the following values extracted | 624 | PSEUDOVECTOR_FLAG bit set, and one of the following values extracted |
| @@ -634,9 +670,15 @@ enum More_Lisp_Bits | |||
| 634 | XCONS (tem) is the struct Lisp_Cons * pointing to the memory for | 670 | XCONS (tem) is the struct Lisp_Cons * pointing to the memory for |
| 635 | that cons. */ | 671 | that cons. */ |
| 636 | 672 | ||
| 673 | /* Mask for the value (as opposed to the type bits) of a Lisp object. */ | ||
| 674 | #define VALMASK_val (USE_LSB_TAG ? - (1 << GCTYPEBITS) : VAL_MAX) | ||
| 675 | #if ENUMABLE (VALMASK_val) | ||
| 676 | DEFINE_GDB_SYMBOL_ENUM (VALMASK) | ||
| 677 | #else | ||
| 637 | DEFINE_GDB_SYMBOL_BEGIN (EMACS_INT, VALMASK) | 678 | DEFINE_GDB_SYMBOL_BEGIN (EMACS_INT, VALMASK) |
| 638 | #define VALMASK (USE_LSB_TAG ? - (1 << GCTYPEBITS) : VAL_MAX) | 679 | # define VALMASK VALMASK_val |
| 639 | DEFINE_GDB_SYMBOL_END (VALMASK) | 680 | DEFINE_GDB_SYMBOL_END (VALMASK) |
| 681 | #endif | ||
| 640 | 682 | ||
| 641 | /* Largest and smallest representable fixnum values. These are the C | 683 | /* Largest and smallest representable fixnum values. These are the C |
| 642 | values. They are macros for use in static initializers. */ | 684 | values. They are macros for use in static initializers. */ |
| @@ -3794,7 +3836,7 @@ extern void print_error_message (Lisp_Object, Lisp_Object, const char *, | |||
| 3794 | Lisp_Object); | 3836 | Lisp_Object); |
| 3795 | extern Lisp_Object internal_with_output_to_temp_buffer | 3837 | extern Lisp_Object internal_with_output_to_temp_buffer |
| 3796 | (const char *, Lisp_Object (*) (Lisp_Object), Lisp_Object); | 3838 | (const char *, Lisp_Object (*) (Lisp_Object), Lisp_Object); |
| 3797 | enum FLOAT_TO_STRING_BUFSIZE { FLOAT_TO_STRING_BUFSIZE = 350 }; | 3839 | #define FLOAT_TO_STRING_BUFSIZE 350 |
| 3798 | extern int float_to_string (char *, double); | 3840 | extern int float_to_string (char *, double); |
| 3799 | extern void init_print_once (void); | 3841 | extern void init_print_once (void); |
| 3800 | extern void syms_of_print (void); | 3842 | extern void syms_of_print (void); |
diff --git a/src/macuvs.h b/src/macuvs.h index 20879888f9a..2f52ce3da8e 100644 --- a/src/macuvs.h +++ b/src/macuvs.h | |||
| @@ -1,11 +1,4 @@ | |||
| 1 | /* UVS (Unicode Variation Sequence) table definitions. | 1 | /* Automatically generated by uvs.el. */ |
| 2 | |||
| 3 | This file is part of GNU Emacs. */ | ||
| 4 | |||
| 5 | /* This was generated from the Ideographic Variation Database file at | ||
| 6 | http://www.unicode.org/ivd/data/2012-03-02/IVD_Sequences.txt | ||
| 7 | using admin/mac/uvs.el in GNU Emacs, and distributed under | ||
| 8 | the Terms of Use in http://www.unicode.org/terms_of_use.html. */ | ||
| 9 | static const unsigned char mac_uvs_table_adobe_japan1_bytes[] = | 2 | static const unsigned char mac_uvs_table_adobe_japan1_bytes[] = |
| 10 | { | 3 | { |
| 11 | 0x00, 0x0e, 0x00, 0x01, 0x1f, 0x9e, 0x00, 0x00, | 4 | 0x00, 0x0e, 0x00, 0x01, 0x1f, 0x9e, 0x00, 0x00, |
diff --git a/src/xterm.c b/src/xterm.c index 83d3cb1ab73..c4b8db35f31 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -602,7 +602,13 @@ x_update_window_end (struct window *w, bool cursor_on_p, | |||
| 602 | /* If a row with mouse-face was overwritten, arrange for | 602 | /* If a row with mouse-face was overwritten, arrange for |
| 603 | XTframe_up_to_date to redisplay the mouse highlight. */ | 603 | XTframe_up_to_date to redisplay the mouse highlight. */ |
| 604 | if (mouse_face_overwritten_p) | 604 | if (mouse_face_overwritten_p) |
| 605 | reset_mouse_highlight (MOUSE_HL_INFO (XFRAME (w->frame))); | 605 | { |
| 606 | Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame)); | ||
| 607 | |||
| 608 | hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; | ||
| 609 | hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; | ||
| 610 | hlinfo->mouse_face_window = Qnil; | ||
| 611 | } | ||
| 606 | } | 612 | } |
| 607 | 613 | ||
| 608 | 614 | ||
| @@ -4428,14 +4434,11 @@ xg_scroll_callback (GtkRange *range, | |||
| 4428 | gpointer user_data) | 4434 | gpointer user_data) |
| 4429 | { | 4435 | { |
| 4430 | struct scroll_bar *bar = user_data; | 4436 | struct scroll_bar *bar = user_data; |
| 4431 | gdouble position; | ||
| 4432 | int part = -1, whole = 0, portion = 0; | 4437 | int part = -1, whole = 0, portion = 0; |
| 4433 | GtkAdjustment *adj = GTK_ADJUSTMENT (gtk_range_get_adjustment (range)); | 4438 | GtkAdjustment *adj = GTK_ADJUSTMENT (gtk_range_get_adjustment (range)); |
| 4434 | struct frame *f = g_object_get_data (G_OBJECT (range), XG_FRAME_DATA); | 4439 | struct frame *f = g_object_get_data (G_OBJECT (range), XG_FRAME_DATA); |
| 4435 | 4440 | ||
| 4436 | if (xg_ignore_gtk_scrollbar) return FALSE; | 4441 | if (xg_ignore_gtk_scrollbar) return FALSE; |
| 4437 | position = gtk_adjustment_get_value (adj); | ||
| 4438 | |||
| 4439 | 4442 | ||
| 4440 | switch (scroll) | 4443 | switch (scroll) |
| 4441 | { | 4444 | { |
| @@ -4447,7 +4450,7 @@ xg_scroll_callback (GtkRange *range, | |||
| 4447 | part = scroll_bar_handle; | 4450 | part = scroll_bar_handle; |
| 4448 | whole = gtk_adjustment_get_upper (adj) - | 4451 | whole = gtk_adjustment_get_upper (adj) - |
| 4449 | gtk_adjustment_get_page_size (adj); | 4452 | gtk_adjustment_get_page_size (adj); |
| 4450 | portion = min ((int)position, whole); | 4453 | portion = min ((int)value, whole); |
| 4451 | bar->dragging = portion; | 4454 | bar->dragging = portion; |
| 4452 | } | 4455 | } |
| 4453 | break; | 4456 | break; |