diff options
| author | Stefan Monnier | 2013-12-07 22:07:11 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2013-12-07 22:07:11 -0500 |
| commit | 0d9cba29b6737857ea47b9c7d9d9947791e1a5d6 (patch) | |
| tree | da6d9e104cde8190d871747c3cd610dbe69e714e /src | |
| parent | 67840e6629754dc1a9196fed4910b58e4e7abd89 (diff) | |
| download | emacs-0d9cba29b6737857ea47b9c7d9d9947791e1a5d6.tar.gz emacs-0d9cba29b6737857ea47b9c7d9d9947791e1a5d6.zip | |
* src/window.c (set_window_buffer): Update mode line.
Fixes: debbugs:16084
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 88 | ||||
| -rw-r--r-- | src/window.c | 1 |
2 files changed, 47 insertions, 42 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c7776762b8d..2f571aa7b1d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2013-12-08 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * window.c (set_window_buffer): Update mode line (bug#16084). | ||
| 4 | |||
| 1 | 2013-12-07 Paul Eggert <eggert@cs.ucla.edu> | 5 | 2013-12-07 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 6 | ||
| 3 | Fix minor problems found by static checking. | 7 | Fix minor problems found by static checking. |
| @@ -19,8 +23,8 @@ | |||
| 19 | * nsterm.m (x_set_window_size): Remove fprintf. | 23 | * nsterm.m (x_set_window_size): Remove fprintf. |
| 20 | (init): Define always. Set applicationDidFinishLaunchingCalled | 24 | (init): Define always. Set applicationDidFinishLaunchingCalled |
| 21 | for GNUStep. | 25 | for GNUStep. |
| 22 | (applicationDidFinishLaunching:): Set | 26 | (applicationDidFinishLaunching:): |
| 23 | applicationDidFinishLaunchingCalled, | 27 | Set applicationDidFinishLaunchingCalled. |
| 24 | (applicationDidBecomeActive:): Call applicationDidFinishLaunching if | 28 | (applicationDidBecomeActive:): Call applicationDidFinishLaunching if |
| 25 | not called. | 29 | not called. |
| 26 | 30 | ||
| @@ -33,8 +37,8 @@ | |||
| 33 | (updateFrameSize:): Remove gsextra. Adjust for pixelwise resize. | 37 | (updateFrameSize:): Remove gsextra. Adjust for pixelwise resize. |
| 34 | (windowWillResize): Remove gsextra. Calculate extra as in | 38 | (windowWillResize): Remove gsextra. Calculate extra as in |
| 35 | updateFrameSize. | 39 | updateFrameSize. |
| 36 | (x_new_font): Don't change frame size if fullscreen. Change | 40 | (x_new_font): Don't change frame size if fullscreen. |
| 37 | size pixelwise. | 41 | Change size pixelwise. |
| 38 | 42 | ||
| 39 | * nsfns.m (Fx_create_frame): Call change_frame_size twice as per | 43 | * nsfns.m (Fx_create_frame): Call change_frame_size twice as per |
| 40 | comment in xfns.c. Change to pixelwise call. | 44 | comment in xfns.c. Change to pixelwise call. |
| @@ -236,8 +240,8 @@ | |||
| 236 | ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER. | 240 | ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER. |
| 237 | (struct glyph_matrix): Replace window_left_col and | 241 | (struct glyph_matrix): Replace window_left_col and |
| 238 | window_top_line by window_pixel_left and window_pixel_top. | 242 | window_top_line by window_pixel_left and window_pixel_top. |
| 239 | (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P): Minor | 243 | (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P): |
| 240 | rewrite. | 244 | Minor rewrite. |
| 241 | (enum face_id): Add WINDOW_DIVIDER_FACE_ID. | 245 | (enum face_id): Add WINDOW_DIVIDER_FACE_ID. |
| 242 | (draw_window_divider, move_it_to, x_draw_right_divider) | 246 | (draw_window_divider, move_it_to, x_draw_right_divider) |
| 243 | (x_draw_bottom_divider, change_frame_size): Add or fix | 247 | (x_draw_bottom_divider, change_frame_size): Add or fix |
| @@ -252,8 +256,8 @@ | |||
| 252 | (init_display): Adjusts calls of change_frame_size. | 256 | (init_display): Adjusts calls of change_frame_size. |
| 253 | (change_frame_size, change_frame_size_1): Handle pixelwise | 257 | (change_frame_size, change_frame_size_1): Handle pixelwise |
| 254 | changes. | 258 | changes. |
| 255 | * frame.c (Qright_divider_width, Qbottom_divider_width): New | 259 | * frame.c (Qright_divider_width, Qbottom_divider_width): |
| 256 | Lisp objects. | 260 | New Lisp objects. |
| 257 | (set_menu_bar_lines_1, set_menu_bar_lines, make_frame) | 261 | (set_menu_bar_lines_1, set_menu_bar_lines, make_frame) |
| 258 | (make_terminal_frame, Fmake_terminal_frame, Fframe_parameters) | 262 | (make_terminal_frame, Fmake_terminal_frame, Fframe_parameters) |
| 259 | (x_set_internal_border_width, x_set_vertical_scroll_bars) | 263 | (x_set_internal_border_width, x_set_vertical_scroll_bars) |
| @@ -264,15 +268,15 @@ | |||
| 264 | (Fframe_text_width, Fframe_text_height, Fscroll_bar_width) | 268 | (Fframe_text_width, Fframe_text_height, Fscroll_bar_width) |
| 265 | (Ffringe_width, Fborder_width, Fright_divider_width) | 269 | (Ffringe_width, Fborder_width, Fright_divider_width) |
| 266 | (Fbottom_divider_width): New functions, defsubr them. | 270 | (Fbottom_divider_width): New functions, defsubr them. |
| 267 | (Fset_frame_height, Fset_frame_width, Fset_frame_size): New | 271 | (Fset_frame_height, Fset_frame_width, Fset_frame_size): |
| 268 | argument pixelwise. | 272 | New argument pixelwise. |
| 269 | (struct frame_parm_table): New members Qright_divider_width and | 273 | (struct frame_parm_table): New members Qright_divider_width and |
| 270 | Qbottom_divider_width. | 274 | Qbottom_divider_width. |
| 271 | (x_set_frame_parameters): Handle parameters for pixelwise sizes. | 275 | (x_set_frame_parameters): Handle parameters for pixelwise sizes. |
| 272 | (x_report_frame_params): Handle Qright_divider_width and | 276 | (x_report_frame_params): Handle Qright_divider_width and |
| 273 | Qbottom_divider_width. | 277 | Qbottom_divider_width. |
| 274 | (x_set_right_divider_width, x_set_bottom_divider_width): New | 278 | (x_set_right_divider_width, x_set_bottom_divider_width): |
| 275 | functions. | 279 | New functions. |
| 276 | (frame_resize_pixelwise): New option. | 280 | (frame_resize_pixelwise): New option. |
| 277 | * frame.h (struct frame): Add tool_bar_height, menu_bar_height, | 281 | * frame.h (struct frame): Add tool_bar_height, menu_bar_height, |
| 278 | new_pixelwise, right_divider_width and bottom_divider_width; | 282 | new_pixelwise, right_divider_width and bottom_divider_width; |
| @@ -283,8 +287,8 @@ | |||
| 283 | FRAME_TEXT_WIDTH respectively. | 287 | FRAME_TEXT_WIDTH respectively. |
| 284 | (FRAME_MENU_BAR_HEIGHT, FRAME_TOOL_BAR_HEIGHT) | 288 | (FRAME_MENU_BAR_HEIGHT, FRAME_TOOL_BAR_HEIGHT) |
| 285 | (FRAME_RIGHT_DIVIDER_WIDTH, FRAME_BOTTOM_DIVIDER_WIDTH) | 289 | (FRAME_RIGHT_DIVIDER_WIDTH, FRAME_BOTTOM_DIVIDER_WIDTH) |
| 286 | (FRAME_TEXT_TO_PIXEL_WIDTH, FRAME_PIXEL_TO_TEXT_WIDTH): New | 290 | (FRAME_TEXT_TO_PIXEL_WIDTH, FRAME_PIXEL_TO_TEXT_WIDTH): |
| 287 | macros. | 291 | New macros. |
| 288 | (FRAME_TOP_MARGIN_HEIGHT, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH) | 292 | (FRAME_TOP_MARGIN_HEIGHT, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH) |
| 289 | (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH, FRAME_SCROLL_BAR_AREA_WIDTH) | 293 | (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH, FRAME_SCROLL_BAR_AREA_WIDTH) |
| 290 | (SET_FRAME_COLS, SET_FRAME_WIDTH, SET_FRAME_HEIGHT) | 294 | (SET_FRAME_COLS, SET_FRAME_WIDTH, SET_FRAME_HEIGHT) |
| @@ -294,8 +298,8 @@ | |||
| 294 | * fringe.c (draw_fringe_bitmap_1): Handle right divder. | 298 | * fringe.c (draw_fringe_bitmap_1): Handle right divder. |
| 295 | * gtkutil.c (xg_frame_resized, xg_frame_set_char_size) | 299 | * gtkutil.c (xg_frame_resized, xg_frame_set_char_size) |
| 296 | (x_wm_set_size_hint): Handle frame pixel sizes. | 300 | (x_wm_set_size_hint): Handle frame pixel sizes. |
| 297 | * indent.c (compute_motion, Fcompute_motion): Call | 301 | * indent.c (compute_motion, Fcompute_motion): |
| 298 | window_body_width instead of window_body_cols. | 302 | Call window_body_width instead of window_body_cols. |
| 299 | * keyboard.c (Qright_divider, Qbottom_divider): New symbols. | 303 | * keyboard.c (Qright_divider, Qbottom_divider): New symbols. |
| 300 | (make_lispy_position): Handle right and bottom dividers. | 304 | (make_lispy_position): Handle right and bottom dividers. |
| 301 | (Fsuspend_emacs): Pixelize call of change_frame_size. | 305 | (Fsuspend_emacs): Pixelize call of change_frame_size. |
| @@ -303,13 +307,13 @@ | |||
| 303 | * lisp.h: Extern set_frame_param. | 307 | * lisp.h: Extern set_frame_param. |
| 304 | * nsfns.m (x_set_tool_bar_lines): Pixelize call of | 308 | * nsfns.m (x_set_tool_bar_lines): Pixelize call of |
| 305 | x_set_window_size. | 309 | x_set_window_size. |
| 306 | (Fx_create_frame): Add entry for vertical_drag_cursor. Pixelize | 310 | (Fx_create_frame): Add entry for vertical_drag_cursor. |
| 307 | call of change_frame_size. | 311 | Pixelize call of change_frame_size. |
| 308 | * nsterm.h (struct ns_output): Add vertical_drag_cursor. | 312 | * nsterm.h (struct ns_output): Add vertical_drag_cursor. |
| 309 | * nsterm.m (ns_update_window_end): Optionally draw right | 313 | * nsterm.m (ns_update_window_end): Optionally draw right |
| 310 | divider. | 314 | divider. |
| 311 | (x_set_window_size): Add argument pixelwise. Call | 315 | (x_set_window_size): Add argument pixelwise. |
| 312 | check_frame_size and change_frame_size with pixelwise zero. | 316 | Call check_frame_size and change_frame_size with pixelwise zero. |
| 313 | (ns_draw_window_divider): New function. | 317 | (ns_draw_window_divider): New function. |
| 314 | (ns_redisplay_interface): Add ns_draw_window_divider. | 318 | (ns_redisplay_interface): Add ns_draw_window_divider. |
| 315 | (updateFrameSize:): Call change_frame_size with pixelwise zero. | 319 | (updateFrameSize:): Call change_frame_size with pixelwise zero. |
| @@ -320,12 +324,12 @@ | |||
| 320 | * w32fns.c (x_set_mouse_color): Handle vertical drag cursor. | 324 | * w32fns.c (x_set_mouse_color): Handle vertical drag cursor. |
| 321 | (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise. | 325 | (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise. |
| 322 | (w32_createwindow): Use scroll bar area width. | 326 | (w32_createwindow): Use scroll bar area width. |
| 323 | (w32_wnd_proc): Handle bottom divider width. For | 327 | (w32_wnd_proc): Handle bottom divider width. |
| 324 | WM_WINDOWPOSCHANGING return zero if we resize pixelwise. | 328 | For WM_WINDOWPOSCHANGING return zero if we resize pixelwise. |
| 325 | (Fx_create_frame): Default divider width parameters. Caclulate | 329 | (Fx_create_frame): Default divider width parameters. |
| 326 | sizes pixelwise. Add vertical drag cursor support. | 330 | Caclulate sizes pixelwise. Add vertical drag cursor support. |
| 327 | (x_create_tip_frame): Default divider widths to zero. Pixelize | 331 | (x_create_tip_frame): Default divider widths to zero. |
| 328 | call to change_frame_size. | 332 | Pixelize call to change_frame_size. |
| 329 | (Fx_show_tip): Add handling of divider widths. Pixelize window | 333 | (Fx_show_tip): Add handling of divider widths. Pixelize window |
| 330 | position and sizes. | 334 | position and sizes. |
| 331 | (Fw32_frame_rect): New function. | 335 | (Fw32_frame_rect): New function. |
| @@ -340,8 +344,8 @@ | |||
| 340 | (x_update_window_end): Handle right divider. | 344 | (x_update_window_end): Handle right divider. |
| 341 | (w32_draw_fringe_bitmap, x_scroll_run) | 345 | (w32_draw_fringe_bitmap, x_scroll_run) |
| 342 | (w32_set_vertical_scroll_bar): Pixelize scrollbar widths. | 346 | (w32_set_vertical_scroll_bar): Pixelize scrollbar widths. |
| 343 | (w32_read_socket): Handle SIZE_MAXIMIZED separately. Calculate | 347 | (w32_read_socket): Handle SIZE_MAXIMIZED separately. |
| 344 | new frame sizes pixelwise. | 348 | Calculate new frame sizes pixelwise. |
| 345 | (x_new_font): Pixelize call to x_set_window_size. | 349 | (x_new_font): Pixelize call to x_set_window_size. |
| 346 | (x_check_fullscreen): Pixelize call to change_frame_size. | 350 | (x_check_fullscreen): Pixelize call to change_frame_size. |
| 347 | (x_set_window_size_1, x_set_window_size): New argument | 351 | (x_set_window_size_1, x_set_window_size): New argument |
| @@ -360,16 +364,16 @@ | |||
| 360 | (Fset_window_new_pixel, window_resize_apply_total) | 364 | (Fset_window_new_pixel, window_resize_apply_total) |
| 361 | (Fwindow_resize_apply_total): New functions. | 365 | (Fwindow_resize_apply_total): New functions. |
| 362 | (window_body_height, window_body_width): Rename from | 366 | (window_body_height, window_body_width): Rename from |
| 363 | window_body_lines. New argument PIXELWISE. Calculate | 367 | window_body_lines. New argument PIXELWISE. |
| 364 | pixelwise. | 368 | Calculate pixelwise. |
| 365 | (Fwindow_body_height, Fwindow_body_width): New argument | 369 | (Fwindow_body_height, Fwindow_body_width): New argument |
| 366 | PIXELWISE. | 370 | PIXELWISE. |
| 367 | (coordinates_in_window, window_relative_x_coord): Use window's | 371 | (coordinates_in_window, window_relative_x_coord): Use window's |
| 368 | pixel width instead of total width. | 372 | pixel width instead of total width. |
| 369 | (replace_window, recombine_windows): Initialize pixel values. | 373 | (replace_window, recombine_windows): Initialize pixel values. |
| 370 | (resize_root_window, resize_frame_windows, grow_mini_window) | 374 | (resize_root_window, resize_frame_windows, grow_mini_window) |
| 371 | (shrink_mini_window): New argument PIXELWISE. Calculate | 375 | (shrink_mini_window): New argument PIXELWISE. |
| 372 | pixelwise. | 376 | Calculate pixelwise. |
| 373 | (Fdelete_other_windows_internal, adjust_window_margins) | 377 | (Fdelete_other_windows_internal, adjust_window_margins) |
| 374 | (window_resize_check, window_resize_apply) | 378 | (window_resize_check, window_resize_apply) |
| 375 | (Fdelete_window_internal, Fresize_mini_window_internal) | 379 | (Fdelete_window_internal, Fresize_mini_window_internal) |
| @@ -394,11 +398,11 @@ | |||
| 394 | slots in save_window_data and saved_window. | 398 | slots in save_window_data and saved_window. |
| 395 | (Fset_window_scroll_bars): Fix doc-string. | 399 | (Fset_window_scroll_bars): Fix doc-string. |
| 396 | (window_resize_pixelwise): New variable. | 400 | (window_resize_pixelwise): New variable. |
| 397 | (coordinates_in_window, Fcoordinates_in_window_p): Handle | 401 | (coordinates_in_window, Fcoordinates_in_window_p): |
| 398 | dividers. | 402 | Handle dividers. |
| 399 | (make_parent_window): Adjust sequence_number. | 403 | (make_parent_window): Adjust sequence_number. |
| 400 | (Fwindow_right_divider_width, Fwindow_bottom_divider_width): New | 404 | (Fwindow_right_divider_width, Fwindow_bottom_divider_width): |
| 401 | functions. | 405 | New functions. |
| 402 | * window.h (struct window): New members new_pixel, pixel_left, | 406 | * window.h (struct window): New members new_pixel, pixel_left, |
| 403 | pixel_top, pixel_width, pixel_height. Restore sequence_number. | 407 | pixel_top, pixel_width, pixel_height. Restore sequence_number. |
| 404 | (wset_new_pixel): New function. | 408 | (wset_new_pixel): New function. |
| @@ -432,10 +436,10 @@ | |||
| 432 | encountered. | 436 | encountered. |
| 433 | (Fwindow_text_pixel_size): New function. | 437 | (Fwindow_text_pixel_size): New function. |
| 434 | (resize_mini_window, update_tool_bar): Calculate pixelwise. | 438 | (resize_mini_window, update_tool_bar): Calculate pixelwise. |
| 435 | (tool_bar_lines_needed): Rename to tool_bar_height. Calculate | 439 | (tool_bar_lines_needed): Rename to tool_bar_height. |
| 436 | pixelwise. | 440 | Calculate pixelwise. |
| 437 | (Ftool_bar_lines_needed): Rename to Ftool_bar_height. Calculate | 441 | (Ftool_bar_lines_needed): Rename to Ftool_bar_height. |
| 438 | pixelwise. | 442 | Calculate pixelwise. |
| 439 | (redisplay_tool_bar): Calculate pixelwise. | 443 | (redisplay_tool_bar): Calculate pixelwise. |
| 440 | (redisplay_window): Calculate pixelwise. Handle dividers. | 444 | (redisplay_window): Calculate pixelwise. Handle dividers. |
| 441 | (draw_glyphs, x_clear_end_of_line, note_mouse_highlight) | 445 | (draw_glyphs, x_clear_end_of_line, note_mouse_highlight) |
| @@ -450,8 +454,8 @@ | |||
| 450 | (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise. | 454 | (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise. |
| 451 | (x_set_scroll_bar_default_width): Default actual width to 16. | 455 | (x_set_scroll_bar_default_width): Default actual width to 16. |
| 452 | (Fx_create_frame): Set sizes pixelwise. | 456 | (Fx_create_frame): Set sizes pixelwise. |
| 453 | (x_create_tip_frame): Default divider widths to zero. Pixelize | 457 | (x_create_tip_frame): Default divider widths to zero. |
| 454 | call of change_frame_size. | 458 | Pixelize call of change_frame_size. |
| 455 | (Fx_show_tip): Handle divider widths. Initial pixel position | 459 | (Fx_show_tip): Handle divider widths. Initial pixel position |
| 456 | and sizes. | 460 | and sizes. |
| 457 | (frame_parm_handler x_frame_parm_handlers): Add divider widths. | 461 | (frame_parm_handler x_frame_parm_handlers): Add divider widths. |
diff --git a/src/window.c b/src/window.c index d1f3dd599b1..426edc6099c 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -3365,6 +3365,7 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, | |||
| 3365 | /* Maybe we could move this into the `if' but it's not obviously safe and | 3365 | /* Maybe we could move this into the `if' but it's not obviously safe and |
| 3366 | I doubt it's worth the trouble. */ | 3366 | I doubt it's worth the trouble. */ |
| 3367 | wset_redisplay (w); | 3367 | wset_redisplay (w); |
| 3368 | w->update_mode_line = true; | ||
| 3368 | 3369 | ||
| 3369 | /* We must select BUFFER for running the window-scroll-functions. */ | 3370 | /* We must select BUFFER for running the window-scroll-functions. */ |
| 3370 | /* We can't check ! NILP (Vwindow_scroll_functions) here | 3371 | /* We can't check ! NILP (Vwindow_scroll_functions) here |