Re: [AC21.4] New frames not displayed correctly if buffer tabs off
"Stephen J. Turnbull" <[email protected]>
| Newsgroups | gmane.emacs.xemacs.windows |
|---|---|
| Organization | The XEmacs Project |
| Message-ID | <[email protected]> |
>>>>> "Mike" == Mike Alexander <[email protected]> writes: Mike> How about 21.5? Has it been committed there? Not yet. Note that Mike Sperber has changed the window config code. If you are not familiar with his changes there, I don't think it's a good idea to commit this. Mike> I don't think the problem it fixes shows up [in 21.5]. Don't fix what ain't broke. :-) Mike S? (are you on XEmacs NT?) patch kept for Mike S's convenience: > APPROVE COMMIT 21.4 > > Thanks for the patch. > > This will appear in 21.4.13. > > - Vin > > Mike Alexander <[email protected]> writes: > >> A while back I mentioned [1] that frames other than the initial frame >> didn't display correctly in the native Windows version of XEmacs. My >> analysis of the problem in that message was wrong, but I think I found >> the actual problem and this patch seems to fix it. >> >> The problem is that when the frame is created the main window in the >> frame is not sized correctly (it ends up being something like 13 by 7 >> pixels). When redisplay_frame is called for the new frame for the first >> time it calls adjust_frame_size which on Windows eventually winds up in >> mswindows_set_frame_size. This method needs to call change_frame_size >> to cause XEmacs to recalculate the size of the windows in the frame. >> The problem doesn't show up if buffer tabs are on since the process of >> computing the tabs causes the window sizes to be recalculated and this >> happens late enough that the calculations are correct. You can also >> make the frame display correctly by resizing it, however slightly. >> Adding the call to change_frame_size to mswindows_set_frame_size seems >> correct since that's what gtk_set_frame_size does. >> >> >> [1] http://list-archive.xemacs.org/xemacs-nt/200302/msg00032.html >> >> -- >> >> Mike Alexander Arbortext, Inc. >> [email protected] +1-734-997-0200 >> >> >> >> src/ChangeLog addition: >> >> 2003-03-03 Mike Alexander <[email protected]> >> >> * frame-msw.c (mswindows_set_frame_size): Call change_frame_size. >> >> >> xemacs source patch: >> Diff command: C:/PROGRA~1/GNU/WinCvs~1.3/cvs -q diff -u >> Files affected: src/frame-msw.c >> >> Index: src/frame-msw.c >> =================================================================== >> RCS file: /pack/xemacscvs/XEmacs/xemacs/src/frame-msw.c,v >> retrieving revision 1.51 >> diff -u -u -r1.51 frame-msw.c >> --- src/frame-msw.c 2003/02/21 06:56:57 1.51 >> +++ src/frame-msw.c 2003/03/03 08:56:55 >> @@ -337,9 +337,14 @@ >> mswindows_set_frame_size (struct frame *f, int width, int height) >> { >> RECT rect; >> + int columns, rows; >> + >> rect.left = rect.top = 0; >> rect.right = width; >> rect.bottom = height; >> + >> + pixel_to_char_size (f, rect.right, rect.bottom, &columns, &rows); >> + change_frame_size (f, rows, columns, 0); >> >> /* This can call Lisp, because it runs the window procedure, which >> can call redisplay() */ -- Institute of Policy and Planning Sciences http://turnbull.sk.tsukuba.ac.jp University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN Ask not how you can "do" free software business; ask what your business can "do for" free software.