aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2013-12-09 19:20:34 +0200
committerEli Zaretskii2013-12-09 19:20:34 +0200
commitcc24ef09f8c050808f9f4989e49122b206e8c934 (patch)
tree578b29e1c9dd276a965e7b2559f8b09c21df9a83 /src
parent439b1ae89e7c0660ef0a8fa540b12977e38dedf8 (diff)
parentad8a47b89fc3c5a3302255f318b1ed805838cf72 (diff)
downloademacs-cc24ef09f8c050808f9f4989e49122b206e8c934.tar.gz
emacs-cc24ef09f8c050808f9f4989e49122b206e8c934.zip
Merge from trunk.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog141
-rw-r--r--src/ChangeLog.34
-rw-r--r--src/Makefile.in2
-rw-r--r--src/alloc.c5
-rw-r--r--src/emacs.c5
-rw-r--r--src/eval.c2
-rw-r--r--src/frame.c4
-rw-r--r--src/frame.h13
-rw-r--r--src/gtkutil.c4
-rw-r--r--src/keyboard.c10
-rw-r--r--src/nsterm.h1
-rw-r--r--src/nsterm.m25
-rw-r--r--src/w32term.c8
-rw-r--r--src/window.c1
-rw-r--r--src/xmenu.c2
-rw-r--r--src/xterm.c3
-rw-r--r--src/xterm.h2
17 files changed, 170 insertions, 62 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e67fdada36f..0970bf62b52 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,66 @@
12013-12-09 Dmitry Antipov <dmantipov@yandex.ru>
2
3 * gtkutil.c (USE_NEW_GTK_FONT_CHOOSER) [HAVE_FREETYPE]:
4 Avoid unused macro warning if configured --without-xft.
5
62013-12-09 Jan Djärv <jan.h.d@swipnet.se>
7
8 * alloc.c (Fmemory_limit): Avoid compiler warning. Return 0 always.
9
102013-12-08 Jan Djärv <jan.h.d@swipnet.se>
11
12 * nsterm.m (updateFrameSize:): Fix GNUStep toolbar not updating.
13
14 * emacs.c (main): Call fixup_locale a second time for GNUStep.
15
162013-12-08 Martin Rudalics <rudalics@gmx.at>
17
18 * frame.c (x_set_font): Mark frame as garbaged (Bug#16028).
19
202013-12-08 Paul Eggert <eggert@cs.ucla.edu>
21
22 Use libcrypto's checksum implementations if available, for speed.
23 * Makefile.in (LIB_CRYPTO): New macro.
24 (LIBES): Use it.
25
26 * frame.h (SET_FRAME_VISIBLE): Now an inline function.
27 The macro didn't conform to C99 due to type mismatch,
28 which caused compilation failure with Sun C 5.12,
29 and it was confusing anyway. Include window.h to declare
30 redisplay_other_windows.
31
322013-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
33
34 * window.c (set_window_buffer): Update mode line (bug#16084).
35
362013-12-07 Paul Eggert <eggert@cs.ucla.edu>
37
38 Fix minor problems found by static checking.
39 * keyboard.c (poll_for_input_1, input_polling_used):
40 Define only if HAVE_NTGUI.
41 * xmenu.c (popup_activate_callback): Omit unnecessary
42 check against USE_X_TOOLKIT, which must be defined here anyway.
43 * xterm.c, xterm.h (x_dispatch_event) [! (USE_X_TOOLKIT || USE_MOTIF)]:
44 Now static.
45
462013-12-07 Martin Rudalics <rudalics@gmx.at>
47
48 * w32term.c (w32_read_socket): Fix int/Lisp_Object type mixup.
49
12013-12-07 Jan Djärv <jan.h.d@swipnet.se> 502013-12-07 Jan Djärv <jan.h.d@swipnet.se>
2 51
52 * gtkutil.c (tb_size_cb): Call xg_height_or_width_changed.
53
54 * nsterm.m (x_set_window_size): Remove fprintf.
55 (init): Define always. Set applicationDidFinishLaunchingCalled
56 for GNUStep.
57 (applicationDidFinishLaunching:):
58 Set applicationDidFinishLaunchingCalled.
59 (applicationDidBecomeActive:): Call applicationDidFinishLaunching if
60 not called.
61
62 * nsterm.h (EmacsApp): Add applicationDidFinishLaunchingCalled.
63
3 Pixel resize changes for NS (Bug#16049). 64 Pixel resize changes for NS (Bug#16049).
4 * nsterm.m (x_set_window_size): Change parameters rows/cols to 65 * nsterm.m (x_set_window_size): Change parameters rows/cols to
5 height/width. row/cols are locals. 66 height/width. row/cols are locals.
@@ -7,8 +68,8 @@
7 (updateFrameSize:): Remove gsextra. Adjust for pixelwise resize. 68 (updateFrameSize:): Remove gsextra. Adjust for pixelwise resize.
8 (windowWillResize): Remove gsextra. Calculate extra as in 69 (windowWillResize): Remove gsextra. Calculate extra as in
9 updateFrameSize. 70 updateFrameSize.
10 (x_new_font): Don't change frame size if fullscreen. Change 71 (x_new_font): Don't change frame size if fullscreen.
11 size pixelwise. 72 Change size pixelwise.
12 73
13 * nsfns.m (Fx_create_frame): Call change_frame_size twice as per 74 * nsfns.m (Fx_create_frame): Call change_frame_size twice as per
14 comment in xfns.c. Change to pixelwise call. 75 comment in xfns.c. Change to pixelwise call.
@@ -210,8 +271,8 @@
210 ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER. 271 ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER.
211 (struct glyph_matrix): Replace window_left_col and 272 (struct glyph_matrix): Replace window_left_col and
212 window_top_line by window_pixel_left and window_pixel_top. 273 window_top_line by window_pixel_left and window_pixel_top.
213 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P): Minor 274 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P):
214 rewrite. 275 Minor rewrite.
215 (enum face_id): Add WINDOW_DIVIDER_FACE_ID. 276 (enum face_id): Add WINDOW_DIVIDER_FACE_ID.
216 (draw_window_divider, move_it_to, x_draw_right_divider) 277 (draw_window_divider, move_it_to, x_draw_right_divider)
217 (x_draw_bottom_divider, change_frame_size): Add or fix 278 (x_draw_bottom_divider, change_frame_size): Add or fix
@@ -226,8 +287,8 @@
226 (init_display): Adjusts calls of change_frame_size. 287 (init_display): Adjusts calls of change_frame_size.
227 (change_frame_size, change_frame_size_1): Handle pixelwise 288 (change_frame_size, change_frame_size_1): Handle pixelwise
228 changes. 289 changes.
229 * frame.c (Qright_divider_width, Qbottom_divider_width): New 290 * frame.c (Qright_divider_width, Qbottom_divider_width):
230 Lisp objects. 291 New Lisp objects.
231 (set_menu_bar_lines_1, set_menu_bar_lines, make_frame) 292 (set_menu_bar_lines_1, set_menu_bar_lines, make_frame)
232 (make_terminal_frame, Fmake_terminal_frame, Fframe_parameters) 293 (make_terminal_frame, Fmake_terminal_frame, Fframe_parameters)
233 (x_set_internal_border_width, x_set_vertical_scroll_bars) 294 (x_set_internal_border_width, x_set_vertical_scroll_bars)
@@ -238,15 +299,15 @@
238 (Fframe_text_width, Fframe_text_height, Fscroll_bar_width) 299 (Fframe_text_width, Fframe_text_height, Fscroll_bar_width)
239 (Ffringe_width, Fborder_width, Fright_divider_width) 300 (Ffringe_width, Fborder_width, Fright_divider_width)
240 (Fbottom_divider_width): New functions, defsubr them. 301 (Fbottom_divider_width): New functions, defsubr them.
241 (Fset_frame_height, Fset_frame_width, Fset_frame_size): New 302 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
242 argument pixelwise. 303 New argument pixelwise.
243 (struct frame_parm_table): New members Qright_divider_width and 304 (struct frame_parm_table): New members Qright_divider_width and
244 Qbottom_divider_width. 305 Qbottom_divider_width.
245 (x_set_frame_parameters): Handle parameters for pixelwise sizes. 306 (x_set_frame_parameters): Handle parameters for pixelwise sizes.
246 (x_report_frame_params): Handle Qright_divider_width and 307 (x_report_frame_params): Handle Qright_divider_width and
247 Qbottom_divider_width. 308 Qbottom_divider_width.
248 (x_set_right_divider_width, x_set_bottom_divider_width): New 309 (x_set_right_divider_width, x_set_bottom_divider_width):
249 functions. 310 New functions.
250 (frame_resize_pixelwise): New option. 311 (frame_resize_pixelwise): New option.
251 * frame.h (struct frame): Add tool_bar_height, menu_bar_height, 312 * frame.h (struct frame): Add tool_bar_height, menu_bar_height,
252 new_pixelwise, right_divider_width and bottom_divider_width; 313 new_pixelwise, right_divider_width and bottom_divider_width;
@@ -257,8 +318,8 @@
257 FRAME_TEXT_WIDTH respectively. 318 FRAME_TEXT_WIDTH respectively.
258 (FRAME_MENU_BAR_HEIGHT, FRAME_TOOL_BAR_HEIGHT) 319 (FRAME_MENU_BAR_HEIGHT, FRAME_TOOL_BAR_HEIGHT)
259 (FRAME_RIGHT_DIVIDER_WIDTH, FRAME_BOTTOM_DIVIDER_WIDTH) 320 (FRAME_RIGHT_DIVIDER_WIDTH, FRAME_BOTTOM_DIVIDER_WIDTH)
260 (FRAME_TEXT_TO_PIXEL_WIDTH, FRAME_PIXEL_TO_TEXT_WIDTH): New 321 (FRAME_TEXT_TO_PIXEL_WIDTH, FRAME_PIXEL_TO_TEXT_WIDTH):
261 macros. 322 New macros.
262 (FRAME_TOP_MARGIN_HEIGHT, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH) 323 (FRAME_TOP_MARGIN_HEIGHT, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH)
263 (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH, FRAME_SCROLL_BAR_AREA_WIDTH) 324 (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH, FRAME_SCROLL_BAR_AREA_WIDTH)
264 (SET_FRAME_COLS, SET_FRAME_WIDTH, SET_FRAME_HEIGHT) 325 (SET_FRAME_COLS, SET_FRAME_WIDTH, SET_FRAME_HEIGHT)
@@ -268,8 +329,8 @@
268 * fringe.c (draw_fringe_bitmap_1): Handle right divder. 329 * fringe.c (draw_fringe_bitmap_1): Handle right divder.
269 * gtkutil.c (xg_frame_resized, xg_frame_set_char_size) 330 * gtkutil.c (xg_frame_resized, xg_frame_set_char_size)
270 (x_wm_set_size_hint): Handle frame pixel sizes. 331 (x_wm_set_size_hint): Handle frame pixel sizes.
271 * indent.c (compute_motion, Fcompute_motion): Call 332 * indent.c (compute_motion, Fcompute_motion):
272 window_body_width instead of window_body_cols. 333 Call window_body_width instead of window_body_cols.
273 * keyboard.c (Qright_divider, Qbottom_divider): New symbols. 334 * keyboard.c (Qright_divider, Qbottom_divider): New symbols.
274 (make_lispy_position): Handle right and bottom dividers. 335 (make_lispy_position): Handle right and bottom dividers.
275 (Fsuspend_emacs): Pixelize call of change_frame_size. 336 (Fsuspend_emacs): Pixelize call of change_frame_size.
@@ -277,13 +338,13 @@
277 * lisp.h: Extern set_frame_param. 338 * lisp.h: Extern set_frame_param.
278 * nsfns.m (x_set_tool_bar_lines): Pixelize call of 339 * nsfns.m (x_set_tool_bar_lines): Pixelize call of
279 x_set_window_size. 340 x_set_window_size.
280 (Fx_create_frame): Add entry for vertical_drag_cursor. Pixelize 341 (Fx_create_frame): Add entry for vertical_drag_cursor.
281 call of change_frame_size. 342 Pixelize call of change_frame_size.
282 * nsterm.h (struct ns_output): Add vertical_drag_cursor. 343 * nsterm.h (struct ns_output): Add vertical_drag_cursor.
283 * nsterm.m (ns_update_window_end): Optionally draw right 344 * nsterm.m (ns_update_window_end): Optionally draw right
284 divider. 345 divider.
285 (x_set_window_size): Add argument pixelwise. Call 346 (x_set_window_size): Add argument pixelwise.
286 check_frame_size and change_frame_size with pixelwise zero. 347 Call check_frame_size and change_frame_size with pixelwise zero.
287 (ns_draw_window_divider): New function. 348 (ns_draw_window_divider): New function.
288 (ns_redisplay_interface): Add ns_draw_window_divider. 349 (ns_redisplay_interface): Add ns_draw_window_divider.
289 (updateFrameSize:): Call change_frame_size with pixelwise zero. 350 (updateFrameSize:): Call change_frame_size with pixelwise zero.
@@ -294,12 +355,12 @@
294 * w32fns.c (x_set_mouse_color): Handle vertical drag cursor. 355 * w32fns.c (x_set_mouse_color): Handle vertical drag cursor.
295 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise. 356 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
296 (w32_createwindow): Use scroll bar area width. 357 (w32_createwindow): Use scroll bar area width.
297 (w32_wnd_proc): Handle bottom divider width. For 358 (w32_wnd_proc): Handle bottom divider width.
298 WM_WINDOWPOSCHANGING return zero if we resize pixelwise. 359 For WM_WINDOWPOSCHANGING return zero if we resize pixelwise.
299 (Fx_create_frame): Default divider width parameters. Caclulate 360 (Fx_create_frame): Default divider width parameters.
300 sizes pixelwise. Add vertical drag cursor support. 361 Caclulate sizes pixelwise. Add vertical drag cursor support.
301 (x_create_tip_frame): Default divider widths to zero. Pixelize 362 (x_create_tip_frame): Default divider widths to zero.
302 call to change_frame_size. 363 Pixelize call to change_frame_size.
303 (Fx_show_tip): Add handling of divider widths. Pixelize window 364 (Fx_show_tip): Add handling of divider widths. Pixelize window
304 position and sizes. 365 position and sizes.
305 (Fw32_frame_rect): New function. 366 (Fw32_frame_rect): New function.
@@ -314,8 +375,8 @@
314 (x_update_window_end): Handle right divider. 375 (x_update_window_end): Handle right divider.
315 (w32_draw_fringe_bitmap, x_scroll_run) 376 (w32_draw_fringe_bitmap, x_scroll_run)
316 (w32_set_vertical_scroll_bar): Pixelize scrollbar widths. 377 (w32_set_vertical_scroll_bar): Pixelize scrollbar widths.
317 (w32_read_socket): Handle SIZE_MAXIMIZED separately. Calculate 378 (w32_read_socket): Handle SIZE_MAXIMIZED separately.
318 new frame sizes pixelwise. 379 Calculate new frame sizes pixelwise.
319 (x_new_font): Pixelize call to x_set_window_size. 380 (x_new_font): Pixelize call to x_set_window_size.
320 (x_check_fullscreen): Pixelize call to change_frame_size. 381 (x_check_fullscreen): Pixelize call to change_frame_size.
321 (x_set_window_size_1, x_set_window_size): New argument 382 (x_set_window_size_1, x_set_window_size): New argument
@@ -334,16 +395,16 @@
334 (Fset_window_new_pixel, window_resize_apply_total) 395 (Fset_window_new_pixel, window_resize_apply_total)
335 (Fwindow_resize_apply_total): New functions. 396 (Fwindow_resize_apply_total): New functions.
336 (window_body_height, window_body_width): Rename from 397 (window_body_height, window_body_width): Rename from
337 window_body_lines. New argument PIXELWISE. Calculate 398 window_body_lines. New argument PIXELWISE.
338 pixelwise. 399 Calculate pixelwise.
339 (Fwindow_body_height, Fwindow_body_width): New argument 400 (Fwindow_body_height, Fwindow_body_width): New argument
340 PIXELWISE. 401 PIXELWISE.
341 (coordinates_in_window, window_relative_x_coord): Use window's 402 (coordinates_in_window, window_relative_x_coord): Use window's
342 pixel width instead of total width. 403 pixel width instead of total width.
343 (replace_window, recombine_windows): Initialize pixel values. 404 (replace_window, recombine_windows): Initialize pixel values.
344 (resize_root_window, resize_frame_windows, grow_mini_window) 405 (resize_root_window, resize_frame_windows, grow_mini_window)
345 (shrink_mini_window): New argument PIXELWISE. Calculate 406 (shrink_mini_window): New argument PIXELWISE.
346 pixelwise. 407 Calculate pixelwise.
347 (Fdelete_other_windows_internal, adjust_window_margins) 408 (Fdelete_other_windows_internal, adjust_window_margins)
348 (window_resize_check, window_resize_apply) 409 (window_resize_check, window_resize_apply)
349 (Fdelete_window_internal, Fresize_mini_window_internal) 410 (Fdelete_window_internal, Fresize_mini_window_internal)
@@ -368,11 +429,11 @@
368 slots in save_window_data and saved_window. 429 slots in save_window_data and saved_window.
369 (Fset_window_scroll_bars): Fix doc-string. 430 (Fset_window_scroll_bars): Fix doc-string.
370 (window_resize_pixelwise): New variable. 431 (window_resize_pixelwise): New variable.
371 (coordinates_in_window, Fcoordinates_in_window_p): Handle 432 (coordinates_in_window, Fcoordinates_in_window_p):
372 dividers. 433 Handle dividers.
373 (make_parent_window): Adjust sequence_number. 434 (make_parent_window): Adjust sequence_number.
374 (Fwindow_right_divider_width, Fwindow_bottom_divider_width): New 435 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
375 functions. 436 New functions.
376 * window.h (struct window): New members new_pixel, pixel_left, 437 * window.h (struct window): New members new_pixel, pixel_left,
377 pixel_top, pixel_width, pixel_height. Restore sequence_number. 438 pixel_top, pixel_width, pixel_height. Restore sequence_number.
378 (wset_new_pixel): New function. 439 (wset_new_pixel): New function.
@@ -406,10 +467,10 @@
406 encountered. 467 encountered.
407 (Fwindow_text_pixel_size): New function. 468 (Fwindow_text_pixel_size): New function.
408 (resize_mini_window, update_tool_bar): Calculate pixelwise. 469 (resize_mini_window, update_tool_bar): Calculate pixelwise.
409 (tool_bar_lines_needed): Rename to tool_bar_height. Calculate 470 (tool_bar_lines_needed): Rename to tool_bar_height.
410 pixelwise. 471 Calculate pixelwise.
411 (Ftool_bar_lines_needed): Rename to Ftool_bar_height. Calculate 472 (Ftool_bar_lines_needed): Rename to Ftool_bar_height.
412 pixelwise. 473 Calculate pixelwise.
413 (redisplay_tool_bar): Calculate pixelwise. 474 (redisplay_tool_bar): Calculate pixelwise.
414 (redisplay_window): Calculate pixelwise. Handle dividers. 475 (redisplay_window): Calculate pixelwise. Handle dividers.
415 (draw_glyphs, x_clear_end_of_line, note_mouse_highlight) 476 (draw_glyphs, x_clear_end_of_line, note_mouse_highlight)
@@ -424,8 +485,8 @@
424 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise. 485 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
425 (x_set_scroll_bar_default_width): Default actual width to 16. 486 (x_set_scroll_bar_default_width): Default actual width to 16.
426 (Fx_create_frame): Set sizes pixelwise. 487 (Fx_create_frame): Set sizes pixelwise.
427 (x_create_tip_frame): Default divider widths to zero. Pixelize 488 (x_create_tip_frame): Default divider widths to zero.
428 call of change_frame_size. 489 Pixelize call of change_frame_size.
429 (Fx_show_tip): Handle divider widths. Initial pixel position 490 (Fx_show_tip): Handle divider widths. Initial pixel position
430 and sizes. 491 and sizes.
431 (frame_parm_handler x_frame_parm_handlers): Add divider widths. 492 (frame_parm_handler x_frame_parm_handlers): Add divider widths.
diff --git a/src/ChangeLog.3 b/src/ChangeLog.3
index fb1b96f738c..ff0f4bf7ae8 100644
--- a/src/ChangeLog.3
+++ b/src/ChangeLog.3
@@ -12845,8 +12845,8 @@
12845 longer DEFVARed: they are already declared in window.c. 12845 longer DEFVARed: they are already declared in window.c.
12846 12846
12847 * screen.c (window_from_coordinates): Use Fnext_window, even if 12847 * screen.c (window_from_coordinates): Use Fnext_window, even if
12848 MULTI_SCREEN, to obtain the next window. This is an test. 12848 MULTI_SCREEN, to obtain the next window. This is a test.
12849 Also, new paramater part returns text or modeline symbol. 12849 Also, new parameter part returns text or modeline symbol.
12850 (Flocate_window_from_coordinates): Pass &part to 12850 (Flocate_window_from_coordinates): Pass &part to
12851 window_from_coordinates. 12851 window_from_coordinates.
12852 (coordinates_in_window): Don't say modeline if window_height is 1, 12852 (coordinates_in_window): Don't say modeline if window_height is 1,
diff --git a/src/Makefile.in b/src/Makefile.in
index 7d91928acfe..cef1ba5ed2e 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -139,6 +139,7 @@ M17N_FLT_LIBS = @M17N_FLT_LIBS@
139 139
140LIB_ACL=@LIB_ACL@ 140LIB_ACL=@LIB_ACL@
141LIB_CLOCK_GETTIME=@LIB_CLOCK_GETTIME@ 141LIB_CLOCK_GETTIME=@LIB_CLOCK_GETTIME@
142LIB_CRYPTO=@LIB_CRYPTO@
142LIB_EACCESS=@LIB_EACCESS@ 143LIB_EACCESS=@LIB_EACCESS@
143LIB_FDATASYNC=@LIB_FDATASYNC@ 144LIB_FDATASYNC=@LIB_FDATASYNC@
144LIB_TIMER_TIME=@LIB_TIMER_TIME@ 145LIB_TIMER_TIME=@LIB_TIMER_TIME@
@@ -403,6 +404,7 @@ ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj)
403LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ 404LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \
404 $(LIBX_OTHER) $(LIBSOUND) \ 405 $(LIBX_OTHER) $(LIBSOUND) \
405 $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_ACL) $(LIB_CLOCK_GETTIME) \ 406 $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_ACL) $(LIB_CLOCK_GETTIME) \
407 $(LIB_CRYPTO) \
406 $(LIB_EACCESS) $(LIB_FDATASYNC) $(LIB_TIMER_TIME) $(DBUS_LIBS) \ 408 $(LIB_EACCESS) $(LIB_FDATASYNC) $(LIB_TIMER_TIME) $(DBUS_LIBS) \
407 $(LIB_EXECINFO) $(XRANDR_LIBS) $(XINERAMA_LIBS) \ 409 $(LIB_EXECINFO) $(XRANDR_LIBS) $(XINERAMA_LIBS) \
408 $(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \ 410 $(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \
diff --git a/src/alloc.c b/src/alloc.c
index f076075a94f..aeda42637cd 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -6633,7 +6633,12 @@ We divide the value by 1024 to make sure it fits in a Lisp integer. */)
6633{ 6633{
6634 Lisp_Object end; 6634 Lisp_Object end;
6635 6635
6636#ifdef HAVE_NS
6637 /* Avoid warning. sbrk has no relation to memory allocated anyway. */
6638 XSETINT (end, 0);
6639#else
6636 XSETINT (end, (intptr_t) (char *) sbrk (0) / 1024); 6640 XSETINT (end, (intptr_t) (char *) sbrk (0) / 1024);
6641#endif
6637 6642
6638 return end; 6643 return end;
6639} 6644}
diff --git a/src/emacs.c b/src/emacs.c
index af69e2c4efe..9c5a33d5a89 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1217,6 +1217,11 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1217 1217
1218#ifdef HAVE_NS 1218#ifdef HAVE_NS
1219 ns_pool = ns_alloc_autorelease_pool (); 1219 ns_pool = ns_alloc_autorelease_pool ();
1220#ifdef NS_IMPL_GNUSTEP
1221 /* GNUStep stupidly resets our locale settings after we made them. */
1222 fixup_locale ();
1223#endif
1224
1220 if (!noninteractive) 1225 if (!noninteractive)
1221 { 1226 {
1222#ifdef NS_IMPL_COCOA 1227#ifdef NS_IMPL_COCOA
diff --git a/src/eval.c b/src/eval.c
index 81666830f4e..1dca9295cfb 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -3597,7 +3597,7 @@ NFRAMES and BASE specify the activation frame to use, as in `backtrace-frame'.
3597 /* The specpdl entries normally contain the symbol being bound along with its 3597 /* The specpdl entries normally contain the symbol being bound along with its
3598 `old_value', so it can be restored. The new value to which it is bound is 3598 `old_value', so it can be restored. The new value to which it is bound is
3599 available in one of two places: either in the current value of the 3599 available in one of two places: either in the current value of the
3600 variable (if it hasn't been rebount yet) or in the `old_value' slot of the 3600 variable (if it hasn't been rebound yet) or in the `old_value' slot of the
3601 next specpdl entry for it. 3601 next specpdl entry for it.
3602 `backtrace_eval_unrewind' happens to swap the role of `old_value' 3602 `backtrace_eval_unrewind' happens to swap the role of `old_value'
3603 and "new value", so we abuse it here, to fetch the new value. 3603 and "new value", so we abuse it here, to fetch the new value.
diff --git a/src/frame.c b/src/frame.c
index 03bdf696c47..e13c3768e12 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -3314,9 +3314,13 @@ x_set_font (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
3314#endif 3314#endif
3315 /* Recalculate toolbar height. */ 3315 /* Recalculate toolbar height. */
3316 f->n_tool_bar_rows = 0; 3316 f->n_tool_bar_rows = 0;
3317
3317 /* Ensure we redraw it. */ 3318 /* Ensure we redraw it. */
3318 clear_current_matrices (f); 3319 clear_current_matrices (f);
3319 3320
3321 /* Attempt to hunt down bug#16028. */
3322 SET_FRAME_GARBAGED (f);
3323
3320 recompute_basic_faces (f); 3324 recompute_basic_faces (f);
3321 3325
3322 do_pending_window_change (0); 3326 do_pending_window_change (0);
diff --git a/src/frame.h b/src/frame.h
index 8369cf6b17e..0f6a674dc06 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -25,6 +25,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
25 25
26#include "dispextern.h" 26#include "dispextern.h"
27#include "termhooks.h" 27#include "termhooks.h"
28#include "window.h"
28 29
29INLINE_HEADER_BEGIN 30INLINE_HEADER_BEGIN
30 31
@@ -956,10 +957,14 @@ default_pixels_per_inch_y (void)
956 if some changes were applied to it while it wasn't visible (and hence 957 if some changes were applied to it while it wasn't visible (and hence
957 wasn't redisplayed). */ 958 wasn't redisplayed). */
958 959
959#define SET_FRAME_VISIBLE(f, v) \ 960INLINE void
960 (((f)->visible == 0 || ((f)->visible == 2)) && ((v) == 1) \ 961SET_FRAME_VISIBLE (struct frame *f, int v)
961 ? redisplay_other_windows () : 0, \ 962{
962 (f)->visible = (eassert (0 <= (v) && (v) <= 2), (v))) 963 eassert (0 <= v && v <= 2);
964 if (v == 1 && f->visible != 1)
965 redisplay_other_windows ();
966 f->visible = v;
967}
963 968
964/* Set iconify of frame F. */ 969/* Set iconify of frame F. */
965 970
diff --git a/src/gtkutil.c b/src/gtkutil.c
index ef422989c61..e5d6414cf75 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -78,6 +78,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
78#define remove_submenu(w) gtk_menu_item_remove_submenu ((w)) 78#define remove_submenu(w) gtk_menu_item_remove_submenu ((w))
79#endif 79#endif
80 80
81#ifdef HAVE_FREETYPE
81#if GTK_CHECK_VERSION (3, 2, 0) 82#if GTK_CHECK_VERSION (3, 2, 0)
82#define USE_NEW_GTK_FONT_CHOOSER 1 83#define USE_NEW_GTK_FONT_CHOOSER 1
83#else 84#else
@@ -89,6 +90,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
89#define gtk_font_chooser_set_font(x, y) \ 90#define gtk_font_chooser_set_font(x, y) \
90 gtk_font_selection_dialog_set_font_name (x, y) 91 gtk_font_selection_dialog_set_font_name (x, y)
91#endif 92#endif
93#endif /* HAVE_FREETYPE */
92 94
93#ifndef HAVE_GTK3 95#ifndef HAVE_GTK3
94#ifdef USE_GTK_TOOLTIP 96#ifdef USE_GTK_TOOLTIP
@@ -4350,7 +4352,7 @@ tb_size_cb (GtkWidget *widget,
4350 size hints if tool bar size changes. Seen on Fedora 18 at least. */ 4352 size hints if tool bar size changes. Seen on Fedora 18 at least. */
4351 struct frame *f = user_data; 4353 struct frame *f = user_data;
4352 if (xg_update_tool_bar_sizes (f)) 4354 if (xg_update_tool_bar_sizes (f))
4353 x_wm_set_size_hint (f, 0, 0); 4355 xg_height_or_width_changed (f);
4354} 4356}
4355 4357
4356/* Create a tool bar for frame F. */ 4358/* Create a tool bar for frame F. */
diff --git a/src/keyboard.c b/src/keyboard.c
index b50c06b4154..913a277ca79 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1954,10 +1954,8 @@ int poll_suppress_count;
1954 1954
1955static struct atimer *poll_timer; 1955static struct atimer *poll_timer;
1956 1956
1957/* Poll for input, so that we catch a C-g if it comes in. This 1957#ifdef HAVE_NTGUI
1958 function is called from x_make_frame_visible, see comment 1958/* Poll for input, so that we catch a C-g if it comes in. */
1959 there. */
1960
1961void 1959void
1962poll_for_input_1 (void) 1960poll_for_input_1 (void)
1963{ 1961{
@@ -1965,6 +1963,7 @@ poll_for_input_1 (void)
1965 && !waiting_for_input) 1963 && !waiting_for_input)
1966 gobble_input (); 1964 gobble_input ();
1967} 1965}
1966#endif
1968 1967
1969/* Timer callback function for poll_timer. TIMER is equal to 1968/* Timer callback function for poll_timer. TIMER is equal to
1970 poll_timer. */ 1969 poll_timer. */
@@ -2016,6 +2015,8 @@ start_polling (void)
2016#endif 2015#endif
2017} 2016}
2018 2017
2018#ifdef HAVE_NTGUI
2019
2019/* True if we are using polling to handle input asynchronously. */ 2020/* True if we are using polling to handle input asynchronously. */
2020 2021
2021bool 2022bool
@@ -2030,6 +2031,7 @@ input_polling_used (void)
2030 return 0; 2031 return 0;
2031#endif 2032#endif
2032} 2033}
2034#endif
2033 2035
2034/* Turn off polling. */ 2036/* Turn off polling. */
2035 2037
diff --git a/src/nsterm.h b/src/nsterm.h
index 976347ad3b4..0215f13dffd 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -90,6 +90,7 @@ typedef float EmacsCGFloat;
90 BOOL isFirst; 90 BOOL isFirst;
91#endif 91#endif
92#ifdef NS_IMPL_GNUSTEP 92#ifdef NS_IMPL_GNUSTEP
93 BOOL applicationDidFinishLaunchingCalled;
93@public 94@public
94 int nextappdefined; 95 int nextappdefined;
95#endif 96#endif
diff --git a/src/nsterm.m b/src/nsterm.m
index 37edfb238a9..9c87923f32e 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1320,8 +1320,6 @@ x_set_window_size (struct frame *f,
1320 [view setRows: rows andColumns: cols]; 1320 [view setRows: rows andColumns: cols];
1321 [window setFrame: wr display: YES]; 1321 [window setFrame: wr display: YES];
1322 1322
1323 fprintf (stderr, "\tx_set_window_size %d, %d\t%d, %d\n", cols, rows, pixelwidth, pixelheight);
1324
1325 /* This is a trick to compensate for Emacs' managing the scrollbar area 1323 /* This is a trick to compensate for Emacs' managing the scrollbar area
1326 as a fixed number of standard character columns. Instead of leaving 1324 as a fixed number of standard character columns. Instead of leaving
1327 blank space for the extra, we chopped it off above. Now for 1325 blank space for the extra, we chopped it off above. Now for
@@ -4410,15 +4408,22 @@ ns_term_shutdown (int sig)
4410 4408
4411@implementation EmacsApp 4409@implementation EmacsApp
4412 4410
4413#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
4414- (id)init 4411- (id)init
4415{ 4412{
4416 if (self = [super init]) 4413 if (self = [super init])
4417 self->isFirst = YES; 4414 {
4415#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
4416 self->isFirst = YES;
4417#endif
4418#ifdef NS_IMPL_GNUSTEP
4419 self->applicationDidFinishLaunchingCalled = NO;
4420#endif
4421 }
4418 4422
4419 return self; 4423 return self;
4420} 4424}
4421 4425
4426#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
4422- (void)run 4427- (void)run
4423{ 4428{
4424 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 4429 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
@@ -4605,6 +4610,9 @@ ns_term_shutdown (int sig)
4605 -------------------------------------------------------------------------- */ 4610 -------------------------------------------------------------------------- */
4606{ 4611{
4607 NSTRACE (applicationDidFinishLaunching); 4612 NSTRACE (applicationDidFinishLaunching);
4613#ifdef NS_IMPL_GNUSTEP
4614 ((EmacsApp *)self)->applicationDidFinishLaunchingCalled = YES;
4615#endif
4608 [NSApp setServicesProvider: NSApp]; 4616 [NSApp setServicesProvider: NSApp];
4609 ns_send_appdefined (-2); 4617 ns_send_appdefined (-2);
4610} 4618}
@@ -4732,6 +4740,10 @@ not_in_argv (NSString *arg)
4732{ 4740{
4733 NSTRACE (applicationDidBecomeActive); 4741 NSTRACE (applicationDidBecomeActive);
4734 4742
4743#ifdef NS_IMPL_GNUSTEP
4744 if (! applicationDidFinishLaunchingCalled)
4745 [self applicationDidFinishLaunching:notification];
4746#endif
4735 //ns_app_active=YES; 4747 //ns_app_active=YES;
4736 4748
4737 ns_update_auto_hide_menu_bar (); 4749 ns_update_auto_hide_menu_bar ();
@@ -5670,6 +5682,11 @@ not_in_argv (NSString *arg)
5670 5682
5671 if (! [self isFullscreen]) 5683 if (! [self isFullscreen])
5672 { 5684 {
5685#ifdef NS_IMPL_GNUSTEP
5686 // GNUStep does not always update the tool bar height. Force it.
5687 if (toolbar) update_frame_tool_bar (emacsframe);
5688#endif
5689
5673 extra = FRAME_NS_TITLEBAR_HEIGHT (emacsframe) 5690 extra = FRAME_NS_TITLEBAR_HEIGHT (emacsframe)
5674 + FRAME_TOOLBAR_HEIGHT (emacsframe); 5691 + FRAME_TOOLBAR_HEIGHT (emacsframe);
5675 } 5692 }
diff --git a/src/w32term.c b/src/w32term.c
index 9c74304a83a..64febea6a1a 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -4764,9 +4764,9 @@ w32_read_socket (struct terminal *terminal,
4764 record_asynch_buffer_change (); 4764 record_asynch_buffer_change ();
4765 } 4765 }
4766 4766
4767 if (get_frame_param (f, Qfullscreen) == Qnil) 4767 if (EQ (get_frame_param (f, Qfullscreen), Qnil))
4768 set_frame_param (f, Qfullscreen, Qmaximized); 4768 set_frame_param (f, Qfullscreen, Qmaximized);
4769 else if (get_frame_param (f, Qfullscreen) != Qmaximized) 4769 else if (! EQ (get_frame_param (f, Qfullscreen), Qmaximized))
4770 set_frame_param (f, Qmaximized, Qmaximized); 4770 set_frame_param (f, Qmaximized, Qmaximized);
4771 4771
4772 break; 4772 break;
@@ -4803,9 +4803,9 @@ w32_read_socket (struct terminal *terminal,
4803 record_asynch_buffer_change (); 4803 record_asynch_buffer_change ();
4804 } 4804 }
4805 4805
4806 if (get_frame_param (f, Qfullscreen) == Qmaximized) 4806 if (EQ (get_frame_param (f, Qfullscreen), Qmaximized))
4807 set_frame_param (f, Qfullscreen, Qnil); 4807 set_frame_param (f, Qfullscreen, Qnil);
4808 else if (get_frame_param (f, Qmaximized) != Qnil) 4808 else if (! EQ (get_frame_param (f, Qmaximized), Qnil))
4809 set_frame_param (f, Qmaximized, Qnil); 4809 set_frame_param (f, Qmaximized, Qnil);
4810 4810
4811 break; 4811 break;
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
diff --git a/src/xmenu.c b/src/xmenu.c
index d587610fdd7..fb3baa01ef4 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -510,9 +510,7 @@ static void
510popup_activate_callback (Widget widget, LWLIB_ID id, XtPointer client_data) 510popup_activate_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
511{ 511{
512 popup_activated_flag = 1; 512 popup_activated_flag = 1;
513#ifdef USE_X_TOOLKIT
514 x_activate_timeout_atimer (); 513 x_activate_timeout_atimer ();
515#endif
516} 514}
517#endif 515#endif
518 516
diff --git a/src/xterm.c b/src/xterm.c
index e8e69c666ee..90c7c36c44f 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -248,6 +248,9 @@ static void x_sync_with_move (struct frame *, int, int, int);
248static int handle_one_xevent (struct x_display_info *, 248static int handle_one_xevent (struct x_display_info *,
249 const XEvent *, int *, 249 const XEvent *, int *,
250 struct input_event *); 250 struct input_event *);
251#if ! (defined USE_X_TOOLKIT || defined USE_MOTIF)
252static int x_dispatch_event (XEvent *, Display *);
253#endif
251/* Don't declare this _Noreturn because we want no 254/* Don't declare this _Noreturn because we want no
252 interference with debugging failing X calls. */ 255 interference with debugging failing X calls. */
253static void x_connection_closed (Display *, const char *); 256static void x_connection_closed (Display *, const char *);
diff --git a/src/xterm.h b/src/xterm.h
index 3d954fb8600..eff75403476 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -945,7 +945,9 @@ extern void x_clear_area (Display *, Window, int, int, int, int);
945extern void x_mouse_leave (struct x_display_info *); 945extern void x_mouse_leave (struct x_display_info *);
946#endif 946#endif
947 947
948#if defined USE_X_TOOLKIT || defined USE_MOTIF
948extern int x_dispatch_event (XEvent *, Display *); 949extern int x_dispatch_event (XEvent *, Display *);
950#endif
949extern int x_x_to_emacs_modifiers (struct x_display_info *, int); 951extern int x_x_to_emacs_modifiers (struct x_display_info *, int);
950extern int x_display_pixel_height (struct x_display_info *); 952extern int x_display_pixel_height (struct x_display_info *);
951extern int x_display_pixel_width (struct x_display_info *); 953extern int x_display_pixel_width (struct x_display_info *);