Mercurial > hg > xemacs-beta
comparison src/scrollbar-msw.c @ 664:6e99cc8c6ca5
[xemacs-hg @ 2001-09-18 05:04:26 by ben]
fileio.c: Fix various C++ compile errors in Andy's recent code.
callint.c, editfns.c, emacs.c, lread.c, redisplay-x.c: Fix sign-compare warnings.
scrollbar-msw.c: Fix crash under MS Windows. See comment around line 223 for
explanation.
font-lock.el: fix problem when you insert a comment on the line before a line of
code: if we use the following char, then when you hit backspace,
the following line of code turns the comment color.
configure.in: Don't use -Wshadow when compiling with g++ or you get buried in
silly warnings. This patch was already applied but somehow got
unapplied. Stephen?
author | ben |
---|---|
date | Tue, 18 Sep 2001 05:06:57 +0000 |
parents | af57a77cbc92 |
children | fdefd0186b75 |
comparison
equal
deleted
inserted
replaced
663:ebdebdbf3f84 | 664:6e99cc8c6ca5 |
---|---|
1 /* scrollbar implementation -- mswindows interface. | 1 /* scrollbar implementation -- mswindows interface. |
2 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. | 2 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. |
3 Copyright (C) 1994 Amdahl Corporation. | 3 Copyright (C) 1994 Amdahl Corporation. |
4 Copyright (C) 1995 Sun Microsystems, Inc. | 4 Copyright (C) 1995 Sun Microsystems, Inc. |
5 Copyright (C) 1995 Darrell Kindred <dkindred+@cmu.edu>. | 5 Copyright (C) 1995 Darrell Kindred <dkindred+@cmu.edu>. |
6 Copyright (C) 2001 Ben Wing. | |
6 | 7 |
7 This file is part of XEmacs. | 8 This file is part of XEmacs. |
8 | 9 |
9 XEmacs is free software; you can redistribute it and/or modify it | 10 XEmacs is free software; you can redistribute it and/or modify it |
10 under the terms of the GNU General Public License as published by the | 11 under the terms of the GNU General Public License as published by the |
216 Lisp_Object ptr; | 217 Lisp_Object ptr; |
217 VOID_TO_LISP (ptr, v); | 218 VOID_TO_LISP (ptr, v); |
218 assert (OPAQUE_PTRP (ptr)); | 219 assert (OPAQUE_PTRP (ptr)); |
219 ptr = Fgethash (ptr, Vmswindows_scrollbar_instance_table, Qnil); | 220 ptr = Fgethash (ptr, Vmswindows_scrollbar_instance_table, Qnil); |
220 sb = XSCROLLBAR_INSTANCE (ptr); | 221 sb = XSCROLLBAR_INSTANCE (ptr); |
221 win = real_window (sb->mirror, 0); | 222 /* #### we're still hitting an abort here with 0 as the second |
223 parameter, although only occasionally. It seems that sometimes we | |
224 receive events for scrollbars that don't exist anymore. I assume | |
225 it must happen like this: The user does something that causes a | |
226 scrollbar to disappear (e.g. Alt-TAB, causing recomputation of | |
227 everything in the new frame) and then immediately uses the mouse | |
228 wheel, generating scrollbar events. Both events get posted before | |
229 we have a chance to process them, and in processing the first, the | |
230 scrollbar mentioned in the second disappears. */ | |
231 win = real_window (sb->mirror, 1); | |
232 if (NILP (win)) | |
233 return; | |
222 frame = WINDOW_FRAME (XWINDOW (win)); | 234 frame = WINDOW_FRAME (XWINDOW (win)); |
223 f = XFRAME (frame); | 235 f = XFRAME (frame); |
224 } | 236 } |
225 | 237 |
226 /* SB_LINEDOWN == SB_CHARLEFT etc. This is the way they will | 238 /* SB_LINEDOWN == SB_CHARLEFT etc. This is the way they will |