summaryrefslogtreecommitdiff
path: root/src/w32fns.c
Commit message (Collapse)AuthorAgeFilesLines
* Avoid starting threads by w32-shell-executeEli Zaretskii2015-04-231-1/+26
| | | | | * src/w32fns.c (Fw32_shell_execute): Convert "file:///" URLs into local file names, before invoking ShellExecute. (Bug#20220)
* Partially revert the fix for bug #11732Eli Zaretskii2015-03-071-5/+9
| | | | | | | | | src/w32fns.c <ImmReleaseContext_Proc, ImmSetCompositionWindow_Proc>: Fix typedefs to be consistent with the corresponding w32 API signatures. (w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Don't invoke DefWindowProc if we successfully handled the message, as doing so causes problems in displaying selection dialogs.
* Merge from origin/emacs-24Paul Eggert2015-03-031-0/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f160106 Avoid assertion violations in Rmail due to newline cache 1b0ebbd browse-url-firefox: update for firefox 36's removal of -remote 1817892 Avoid erratic behavior of menu-bar tooltips on w32 (Bug#19925) 0260932 Bump python.el version b0adfc7 Spelling fixes 35f047c * src/fileio.c (Fmake_temp_name): Doc tweaks. 6f2971a * lisp/comint.el (comint-line-beginning-position): Revert searching 65d8ac7 Mention in admin/notes/repo how to mark commits not to be merged. 86fe750 # Remove NEWS temporary markup 4fa778b erc.el: Add old version header for package.el compatibilty 9366f05 Tramp: Disable paging with PAGER=cat Conflicts: admin/notes/repo etc/NEWS lisp/ChangeLog lisp/erc/ChangeLog src/ChangeLog
| * Avoid erratic behavior of menu-bar tooltips on w32 (Bug#19925)Eli Zaretskii2015-02-231-0/+10
| | | | | | | | | | | | | | | | src/w32fns.c (Fw32__menu_bar_in_use): New internal function. lisp/frame.el (blink-cursor-timer-function): Don't increment blink-cursor-blinks-done counter when a menu is active on a w32 frame.
* | Redo the whole window offsets and coordinate translation for X.Jan D2015-02-251-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * frame.h (struct frame): Remove x_pixels_diff, y_pixels_diff. * w32fns.c (x_real_positions): Remove setting of x_pixels_diff, y_pixels_diff. * xfns.c (x_real_pos_and_offsets): New function, basically the code from x_real_positions. (x_real_positions): Call x_real_pos_and_offsets. (x_relative_mouse_position): Use XTranslateCoordinates instead of OUTER_TO_INNER_DIFF macros. (Fx_frame_geometry): Get offsets with x_real_pos_and_offsets, border from window attributes. Adjust tool bar and menu widths. * xmenu.c (create_and_show_popup_menu): Use XTranslateCoordinates instead of OUTER_TO_INNER_DIFF macros. * xterm.h (struct x_output): Remove x_pixels_outer_diff, y_pixels_outer_diff, FRAME_OUTER_TO_INNER_DIFF_X, FRAME_OUTER_TO_INNER_DIFF_Y. Declare x_real_pos_and_offsets.
* | Fix display of IME window on MS-Windows (Bug#11732)Fujii Hironori2015-02-191-5/+7
| | | | | | | | | | | | | | | | src/w32fns.c (w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Pass the message to DefWindowProc, after positioning the IME window, to trigger its display. Copyright-paperwork-exempt: yes
* | Try to improve handling of fullwidth/-height frames.Martin Rudalics2015-02-071-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * frame.el (frame-notice-user-settings): Update `frame-size-history'. (make-frame): Update `frame-size-history'. Call `frame-after-make-frame'. * faces.el (face-set-after-frame-default): Remove call to frame-can-run-window-configuration-change-hook. * frame.c (frame_size_history_add): New function. (frame_inhibit_resize): Consider frame_inhibit_implied_resize only after frame's after_make_frame slot is true. Inhibit resizing fullwidth-/height frames in one direction only. Update frame_size_history. (adjust_frame_size): Call frame_size_history_add. (make_frame): Initalize after_make_frame slot. (Fmake_terminal_frame): Adjust adjust_frame_size call. (Fcan_run_window_configuration_change_hook): Rename to Fframe_after_make_frame. Set after_make_frame slot. Return second argument. (x_set_frame_parameters): Postpone handling fullscreen parameter until after width and height parameters have been set. Apply width and height changes only if can_x_set_window_size is true. Update frame_size_history. (Qadjust_frame_size_1, Qadjust_frame_size_2) (Qadjust_frame_size_3, QEmacsFrameResize, Qframe_inhibit_resize) (Qx_set_fullscreen, Qx_check_fullscreen, Qx_set_window_size_1) (Qxg_frame_resized, Qxg_frame_set_char_size_1) (Qxg_frame_set_char_size_2, Qxg_frame_set_char_size_3) (Qxg_change_toolbar_position, Qx_net_wm_state) (Qx_handle_net_wm_state, Qtb_size_cb, Qupdate_frame_tool_bar) (Qfree_frame_tool_bar): New symbol for updating frame_size_history. (Qtip_frame, Qterminal_frame): New symbols. (Vframe_adjust_size_history): Rename to frame_size_history. * frame.h (struct frame): Rename can_run_window_configuration_change_hook slot to after_make_frame. (frame_size_history_add): Extern. * gtkutil.c (xg_frame_resized): Call frame_size_history_add. Don't set FRAME_PIXEL_WIDTH and FRAME_PIXEL_HEIGHT here. (xg_frame_set_char_size): Try to preserve the status of fullwidth/-height frames. Call frame_size_history_add. (tb_size_cb, update_frame_tool_bar, free_frame_tool_bar) (xg_change_toolbar_position): Call frame_size_history_add. * w32fns.c (x_change_tool_bar_height): Handle frame's fullscreen status. (Fx_create_frame): Process fullscreen parameter after frame has been resized. (x_create_tip_frame): Pass Qtip_frame to adjust_frame_size. (Fx_frame_geometry): Don't pollute pure storage. * w32term.c (w32_read_socket): For WM_WINDOWPOSCHANGED, WM_ACTIVATE and WM_ACTIVATEAPP set frame's visibility before calling w32fullscreen_hook. For WM_DISPLAYCHANGE call w32fullscreen_hook immediately. (x_fullscreen_adjust, x_check_fullscreen): Remove. (w32fullscreen_hook): Call change_frame_size just as with a "normal" frame resize operation. Call do_pending_window_change. (x_set_window_size): Try to handle fullwidth and fullheight more accurately. Don't rely on w32_enable_frame_resize_hack. (w32_enable_frame_resize_hack): Remove variable. * widget.c (EmacsFrameResize): Remove dead code. Call frame_size_history_add * window.c (run_window_configuration_change_hook): Check f->after_make_frame instead of f->can_run_window_configuration_change_hook. * xfns.c (x_change_tool_bar_height): Handle frame's fullscreen status. (Fx_create_frame): Process fullscreen parameter after frame has been resized. (Fx_frame_geometry): Don't pollute pure storage. * xterm.c (x_net_wm_state, x_handle_net_wm_state): Call frame_size_history_add. (do_ewmh_fullscreen): Handle x_frame_normalize_before_maximize. (x_check_fullscreen): Count in menubar when calling XResizeWindow. Wait for ConfigureNotify event. Call frame_size_history_add. (x_set_window_size_1): Remove PIXELWISE argument. Try to handle changing a fullheight frame's width or a fullwidth frame's height. Call frame_size_history_add. (x_set_window_size): Simplify xg_frame_set_char_size and x_set_window_size_1 calls. (x_frame_normalize_before_maximize): New variable.
* | Use bool, not int, to track face changesPaul Eggert2015-01-281-4/+4
| | | | | | | | | | | | | | * xfaces.c (face_change): Rename from face_change_count, and change from int to bool. The var is now true (instead of nonzero) if attributes have changed; this is simpler. All uses changed. Fixes: bug#19698
* | Merge from origin/emacs-24Fabián Ezequiel Gallina2015-01-281-14/+46
|\ \ | |/ | | | | | | | | | | | | a3505cb doc/lispref/variables.texi (Creating Buffer-Local): Improve indexing (Bug#19608) d132c7b erc-backend.el: Give hook-name a default value of nil and add-to-list unconditionally. Fixes debbugs:19363 61cc7bf Fix support of non-ASCII frame titles on MS-Windows (Bug#19590) 1e5902a * filenotify.el (file-notify--descriptor): Do not cons for remote files. b1ea160 Handle watching of several files in the same directory for inotify.
| * Fix support of non-ASCII frame titles on MS-Windows (Bug#19590)Eli Zaretskii2015-01-141-14/+46
| | | | | | | | | | | | | | src/w32fns.c (w32_set_title_bar_text): New function, including support for titles with non-ASCII characters outside of the current system codepage. (x_set_name, x_set_title): Use it.
* | Merge from origin/emacs-24Fabián Ezequiel Gallina2015-01-281-11/+24
|\ \ | |/ | | | | | | | | | | d279e66 Fix assertion violations in try_window_id (Bug#19511) 031eadc Fix dired quoting bug with "Hit`N`Hide" 5981b4b More doc fixes for bug#19502 -- make documentation less X-specific. 143516c src/emacs.c (syms_of_emacs) <system-configuration>: Doc fix. (Bug#19502)
| * More doc fixes for bug#19502 -- make documentation less X-specific.Eli Zaretskii2015-01-041-11/+24
| | | | | | | | | | | | | | | | | | doc/lispref/frames.texi (Display Feature Testing): Make the description of x-server-version and x-server-vendor less X-specific. Make doc strings on X and w32 identical. src/w32fns.c (Fx_server_version, Fx_server_vendor): Doc fix. src/xfns.c (Fx_server_version, Fx_server_vendor): Doc fix.
| * Update copyright year to 2015Paul Eggert2015-01-011-1/+1
| | | | | | | | Run admin/update-copyright.
* | Use bool for boolean in w32fns.cEli Zaretskii2015-01-251-38/+41
| | | | | | | | | | | | | | | | | | src/w32fns.c (w32_defined_color, x_decode_color) (Fxw_color_defined_p, Fxw_color_values, x_set_icon_type) (x_set_menu_bar_lines, x_change_tool_bar_height) (x_set_internal_border_width, x_explicitly_set_name) (x_implicitly_set_name, Fx_create_frame, w32_window) (x_create_tip_frame, Fx_show_tip): Use bool where appropriate.
* | Prefer xlispstrdup to avoid dumb calls to strlenDmitry Antipov2015-01-201-1/+1
| | | | | | | | | | | | | | * nsfont.m (ns_get_family): * nsterm.m (ns_term_init): * w32fns.c (w32_window): * xfns.c (x_window, Fx_select_font): Use xlispstrdup.
* | Fix problems with 32-bit wide-int build exposed by MinGWEli Zaretskii2015-01-131-15/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lisp.h (XPNTR): Move definition to after XTYPE, to avoid compilation error in an unoptimized build when !USE_LSB_TAG. src/w32heap.c (DUMPED_HEAP_SIZE): For 32-bit wide-int build, use the same larger value as for the 64-bit build. src/w32term.h (SCROLL_BAR_PACK): Cast the result to UINT_PTR to avoid compiler warnings. src/w32proc.c (Fw32_get_codepage_charset, Fw32_set_keyboard_layout): Avoid compiler warnings about cast from integer to pointer of different size. src/w32menu.c (menubar_selection_callback, w32_menu_show): Cast to UINT_PTR instead of EMACS_INT, to avoid compiler warnings about casting from integer to pointer of different size. (add_menu_item): Pass the help-echo string as a pointer to Lisp_String, not as a Lisp_Object. (w32_menu_display_help): Use make_lisp_ptr to reconstruct a Lisp string object from its C pointer. src/w32fns.c (w32_msg_pump) <WM_EMACS_UNREGISTER_HOT_KEY>: Use make_lisp_ptr instead of XIL, to reconstruct a Lisp_Cons from its C pointer. <WM_EMACS_TOGGLE_LOCK_KEY>: msg.lparam is now a C integer. (Fx_create_frame): Type-cast the result of XFASTINT to avoild compiler warnings about size differences. (Fw32_unregister_hot_key): Pass the tail of w32_grabbed_keys as a pointer to a Lisp_Cons struct, not as a disguised EMACS_INT. (Fw32_toggle_lock_key): Pass the new state of the key as a C integer; use -1 for nil. Doc fix. src/.gdbinit (xgetsym): New subroutine. (xsymname, xsymbol): Use it. (xprintsym): No need to call xgetptr.
* | Adjust frame heights to real height of tool bar.Martin Rudalics2015-01-121-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * frame.el (frame-notice-user-settings): Remove code dealing with frame-initial-frame-tool-bar-height. Turn off `tool-bar-mode' only if `window-system-frame-alist' or `default-frame-alist' ask for it. (make-frame): Update frame-adjust-size-history if needed. * dispnew.c (change_frame_size_1): Pass Qchange_frame_size to adjust_frame_size. * frame.c (frame_default_tool_bar_height): New variable. (adjust_frame_size): Possibly add requested adjustment to Vframe_adjust_size_history. (make_frame): Initialize tool_bar_redisplayed_once slot. (Fset_frame_height, Fset_frame_width, Fset_frame_size): Clarify doc-string. Call adjust_frame_size unconditionally (the frame's text size may remain unaltered but the pixel size may change). (x_figure_window_size): If frame_default_tool_bar_height was set, use it instead of calculating the tool bar height from DEFAULT_TOOL_BAR_IMAGE_HEIGHT. Don't set Vframe_initial_frame_tool_bar_height. (Qchange_frame_size, Qxg_frame_set_char_size) (Qset_window_configuration, Qx_create_frame_1) (Qx_create_frame_2): New symbols. (Vframe_initial_frame_tool_bar_height): Remove. (Vframe_adjust_size_history): New history variable for debugging frame size adjustments. * frame.h (struct frame): New boolean slot tool_bar_redisplayed_once. (frame_default_tool_bar_height): Extern. * gtkutil.c (xg_frame_set_char_size): Pass Qxg_frame_set_char_size to adjust_frame_size. * nsfns.m (Fx_create_frame): Pass Pass Qx_create_frame_1 and Qx_create_frame_2 to adjust_frame_size. * w32fns.c (x_change_tool_bar_height): Call adjust_frame_size with inhibit 1 when we have not redisplayed the tool bar yet. (Fx_create_frame): Pass Pass Qx_create_frame_1 and Qx_create_frame_2 to adjust_frame_size. * w32menu.c (set_frame_menubar): Simplify adjust_frame_size call. * window.c (Fset_window_configuration): Pass Qset_window_configuration to adjust_frame_size. * xdisp.c (redisplay_tool_bar): Assign new height to frame_default_tool_bar_height. (redisplay_internal): If we haven't redisplayed this frame's tool bar, call redisplay_tool_bar early so we can adjust the frame size accordingly. * xfns.c (x_change_tool_bar_height): Call adjust_frame_size with inhibit 1 when we have not redisplayed the tool bar yet. (Fx_create_frame): Pass Pass Qx_create_frame_1 and Qx_create_frame_2 to adjust_frame_size.
* | MS-Windows followup for change in semantics of XIL and XLI. (Bug#15880)Eli Zaretskii2015-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/w32fns.c (Fw32_register_hot_key): Use XINT instead of XLI. src/w32notify.c (Fw32notify_add_watch, w32_get_watch_object): Use make_pointer_integer instead of XIL. (Fw32notify_rm_watch): Use XINTPTR instead of XLI. src/w32inevt.c (handle_file_notifications): Use make_pointer_integer instead of XIL. Put a list of the descriptor, action, and file name in event->arg, instead of spreading them between event->code and event->arg. src/w32term.c (queue_notifications): Use make_pointer_integer instead of XIL. Put a list of the descriptor, action, and file name in event->arg, instead of spreading them between event->code and event->arg. src/keyboard.c (kbd_buffer_get_event) [HAVE_W32NOTIFY]: Adjust Lisp event creation to changes in w32term.c and w32inevt.c above.
* | Fix fallout from "Qnil is zero" change in the display engine. (Bug#19535)Eli Zaretskii2015-01-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/xdisp.c (next_element_from_c_string): Use Lisp integer zero as the object. (set_cursor_from_row, try_cursor_movement, dump_glyph) (insert_left_trunc_glyphs, append_space_for_newline) (extend_face_to_end_of_line, highlight_trailing_whitespace) (find_row_edges, ROW_GLYPH_NEWLINE_P, Fmove_point_visually) (Fbidi_resolved_levels, produce_special_glyphs) (rows_from_pos_range, mouse_face_from_buffer_pos) (note_mouse_highlight): Use nil as the object for glyphs inserted by the display engine, and test with NILP instead of INTEGERP. src/w32fns.c (Fx_show_tip): Use NILP to test for glyphs inserted by the display engine. src/xfns.c (Fx_show_tip): Use NILP to test for glyphs inserted by the display engine. src/dispextern.h (struct glyph, struct it): Update comments for the OBJECT members.
* | MS-Windows followup to previous commitEli Zaretskii2015-01-051-13/+0
| | | | | | | | | | | | | | src/w32proc.c, src/w32.h, src/w32fns.c, src/w32font.c, src/w32menu.c: src/w32notify.c, src/w32proc.c, src/w32select.c, src/w32term.c: src/w32uniscribe.c: Remove declarations of Q* variables that represent symbols.
* | Update copyright year to 2015Paul Eggert2015-01-011-1/+1
| | | | | | | | Run admin/update-copyright.
* | * src/: Various fixes to use bool type and constants.Stefan Monnier2014-12-151-2/+2
| | | | | | | | | | | | * src/dispnew.c (update_single_window): Remove arg `force_p' since it's always true. * src/xfaces.c (clear_face_cache): Use bool for the argument type.
* | Merge branch 'emacs-24'.Paul Eggert2014-11-281-1/+8
|\ \ | |/
| * Fix bug #19141 with UNCs in w32-shell-execute.Eli Zaretskii2014-11-251-1/+8
| | | | | | | | | | src/w32fns.c (Fw32_shell_execute): Convert forward slashes in DOCUMENT to backslashes, if DOCUMENT is a file.
* | Don't shrink frame when using desktop-save-mode (Bug#19048).“Martin2014-11-221-14/+6
| | | | | | | | | | | | | | | | | | | | | | * w32fns.c (x_set_tool_bar_lines): Always call x_change_tool_bar_height (Bug#19048). (x_change_tool_bar_height): Mark frame as garbaged since adjust_frame_size might not have done that. * xfns.c (x_set_tool_bar_lines): Always call x_change_tool_bar_height (Bug#19048). (x_change_tool_bar_height): Mark frame as garbaged since adjust_frame_size might not have done that.
* | Spelling fixes.Paul Eggert2014-11-161-1/+1
| |
* | Run `window-configuration-change-hook' only after all faces have been realized.Martin Rudalics2014-11-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * frame.c (adjust_frame_size): Call x_set_window_size only if f->can_x_set_window_size is set. (make_frame): Initialize f->can_x_set_window_size and f->can_run_window_configuration_change_hook. (Fcan_run_window_configuration_change_hook): New function. * frame.h (frame): Split `official' into `can_x_set_window_size' and `can_run_window_configuration_change_hook'. * nsfns.m (Fx_create_frame): Set f->can_x_set_window_size. * w32fns.c (Fx_create_frame, x_create_tip_frame): Set f->can_x_set_window_size. * window.c (run_window_configuration_change_hook): Return immediately if either f->can_x_set_window_size or f->can_run_window_configuration_change_hook are false. (Fset_window_configuration): Instead of f->official set f->can_x_set_window_size. * xfns.c (Fx_create_frame, x_create_tip_frame): Set f->can_x_set_window_size. * faces.el (face-set-after-frame-default): Enable running `window-configuration-change-hook'.
* | Improve inhibiting of implied frame resizes.Martin Rudalics2014-11-071-26/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * frames.texi (Size and Position): Rewrite description of `frame-inhibit-implied-resize'. * cus-start.el (frame-resize-pixelwise): Fix group. (frame-inhibit-implied-resize): Add entry. * dispnew.c (change_frame_size_1): Fix call of adjust_frame_size. * frame.c (Qsize, Qframe_position, Qframe_outer_size) (Qframe_inner_size, Qexternal_border_size, Qtitle_height) (Qmenu_bar_external, Qmenu_bar_size, Qtool_bar_external) (Qtool_bar_size): New constants. (frame_inhibit_resize, adjust_frame_size): New argument to handle case where frame_inhibit_implied_resize is a list. (Fmake_terminal_frame, Fset_frame_height, Fset_frame_width) (Fset_frame_size, x_set_left_fringe, x_set_right_fringe) (x_set_right_divider_width, x_set_bottom_divider_width) (x_set_vertical_scroll_bars, x_set_horizontal_scroll_bars) (x_set_scroll_bar_width, x_set_scroll_bar_height): Update callers. (frame-inhibit-implied-resize): Rewrite doc-string. * frame.h (frame_inhibit_resize, adjust_frame_size): Fix external declarations. (Qframe_position, Qframe_outer_size) (Qframe_inner_size, Qexternal_border_size, Qtitle_height) (Qmenu_bar_external, Qmenu_bar_size, Qtool_bar_external) (Qtool_bar_size): Extern them. * gtkutil.c (FRAME_TOTAL_PIXEL_HEIGHT, FRAME_TOTAL_PIXEL_WIDTH) (xg_height_or_width_changed): Remove. (xg_frame_set_char_size): Adjust adjust_frame_size calls. (menubar_map_cb, xg_update_frame_menubar, free_frame_menubar) (tb_size_cb, update_frame_tool_bar, free_frame_tool_bar) (xg_change_toolbar_position): Call adjust_frame_size directly. * nsfns.m (x_set_internal_border_width, Fx_create_frame): Fix calls of adjust_frame_size. * w32fns.c (x_set_internal_border_width, x_set_menu_bar_lines) (Fx_create_frame, x_create_tip_frame): Adjust adjust_frame_size calls. (x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that frame can get resized when tool-bar-lines parameter changes from or to zero. (Fw32_frame_menu_bar_size): Return fourth value. (Fw32_frame_rect): Block input around system calls (Fx_frame_geometry): New function. * w32menu.c (set_frame_menubar): Adjust adjust_frame_size call. * w32term.c (x_new_font): Adjust adjust_frame_size call. * widget.c (EmacsFrameSetCharSize): Adjust frame_inhibit_resize call. * window.c (Fset_window_configuration): Adjust adjust_frame_size call. * xfns.c (x_set_menu_bar_lines, x_set_internal_border_width) (Fx_create_frame): Adjust adjust_frame_size calls. (x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that frame can get resized when tool-bar-lines parameter changes from or to zero. (Fx_frame_geometry): New function. * xmenu.c (update_frame_menubar): On Lucid call adjust_frame_size with one pixel less height to avoid that repeatedly adding/removing the menu bar grows the frame. (free_frame_menubar): On Motif arrange to optionally preserve the old frame height when removing the menu bar. * xterm.c (x_new_font): Adjust adjust_frame_size call.
* | Handle wrapped menu bar lines when resizing frames with Windows API.Martin Rudalics2014-10-211-0/+29
| | | | | | | | | | | | | | * w32fns.c (Fw32_frame_menu_bar_size): New function. * w32term.c (x_set_window_size): Account for wrapped menu bar lines when setting up frame height (Bug#15174 and Bug#18720). (w32_add_wrapped_menu_bar_lines): New variable.
* | Cleanup terminal handling code.Dmitry Antipov2014-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dispextern.h (get_named_tty): Remove prototype but... * termhooks.h (get_named_terminal): ...resurrect it under more meaningful name. (get_terminal): Likewise, but with... (decode_live_terminal): ...this name. (decode_tty_terminal): Add prototype. * term.c (get_tty_terminal): Remove. (get_named_tty): Remove. (Ftty_display_color_p, Ftty_display_color_cells, Ftty_type) (Fcontrolling_tty_p, Fsuspend_tty, Fresume_tty): Use decode_tty_terminal. (Ftty_no_underline, Ftty_top_frame): Use decode_live_terminal. * terminal.c (get_terminal): Refactor to... (decode_terminal, decode_live_terminal): ...new functions. (decode_tty_terminal): Replacement for get_tty_terminal. (get_named_terminal): Likewise for get_named_tty. * coding.c (Fset_terminal_coding_system_internal) (Fterminal_coding_system, Fset_keyboard_coding_system_internal): (Fkeyboard_coding_system): * composite.c (Fcomposition_get_gstring): * dispnew.c (Fsend_string_to_terminal): * frame.c (Fmake_terminal_frame): * nsfns.m (check_ns_display_info): * w32fns.c, xfns.c (check_x_display_info): * xselect.c (frame_for_x_selection): Use decode_live_terminal. * keyboard.c (handle_interrupt_signal, handle_interrupt) (Fset_quit_char): Use get_named_terminal. (Fset_output_flow_control, Fset_input_meta_mode): Use decode_tty_terminal.
* | Accept terminal devices on MS-Windows in APIs that accept frame or display.Eli Zaretskii2014-10-081-6/+15
| | | | | | | | | | src/w32fns.c (check_x_display_info): Accept terminal objects as argument, to follow what xfns.c does.
* | * fileio.c (emacs_readlinkat, Finsert_file_contents):Dmitry Antipov2014-10-031-1/+2
| | | | | | | | * w32fns.c, xfns.c (x_create_tip_frame): Use AUTO_STRING.
* | Merge from emacs-24Stefan Monnier2014-09-301-17/+30
|\ \ | |/
| * Fix creation of frames on MS-Windows: don't cons Lisp objects in input thread.Eli Zaretskii2014-09-301-17/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | src/w32fns.c (w32_createwindow): Accept an additional argument, an array of 2 values specifying the coordinates of the frame's top-left corner. Use these values instead of calling x_get_arg, which can cons Lisp objects, and therefore cannot be called except from the main thread. Remove redundant tests for the default values. (my_create_window): Move the calculation of the coordinates of the frame's top-left edge here. Pass them to the input thread via the second parameter of the WM_EMACS_CREATEWINDOW message. See http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00892.html for the details.
* | Default to stack objects on DOS_NT platforms as well.Eli Zaretskii2014-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | src/w32term.h (ALIGN_STACK) [__GNUC__]: Define to __attribute__((force_align_arg_pointer)) for GCC 4.2 and later. src/lisp.h (USE_STACK_LISP_OBJECTS): Remove the !DOS_NT condition. src/w32proc.c (enum_locale_fn, enum_codepage_fn): Add the ALIGN_STACK attribute. src/w32fns.c (w32_monitor_enum): Add the ALIGN_STACK attribute. src/w32uniscribe.c (add_opentype_font_name_to_list): Add the ALIGN_STACK attribute. src/w32font.c (add_font_name_to_list, add_font_entity_to_list) (add_one_font_entity_to_list): Add the ALIGN_STACK attribute.
* | * lisp.h (lispstpcpy): Rename from lispstrcpy, and act like stpcpy.Paul Eggert2014-09-231-1/+1
| | | | | | | | | | | | All callers changed. * xterm.c (x_term_init): Use new functionality to avoid two needs to compute a string length.
* | Use known length of a Lisp string to copy it faster.Dmitry Antipov2014-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp.h (lispstrcpy): New function. Add comment. * callproc.c (child_setup): * dbusbind.c (xd_append_arg): * doc.c (get_doc_string): * font.c (Ffont_xlfd_name): * frame.c (xrdb_get_resource): * process.c (Fmake_network_process, network_interface_info): * w32fns.c (Fx_open_connection): * w32proc.c (sys_spawnve): * xfns.c (select_visual): * xfont.c (xfont_list): * xsmfns.c (x_session_initialize): * xterm.c (x_term_init): Use it.
* | Clean up initialization and customization of horizontal scroll bars.Martin Rudalics2014-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * frame.el (frame-initialize): Remove horizontal-scroll-bars from frame-initial-frame-alist. * scroll-bar.el (previous-horizontal-scroll-bar-mode) (horizontal-scroll-bar-mode-explicit) (set-horizontal-scroll-bar-mode, get-horizontal-scroll-bar-mode) (toggle-horizontal-scroll-bar): Remove. (horizontal-scroll-bar-mode): Remove defcustom. (horizontal-scroll-bar-mode): Fix doc-string. (scroll-bar-toolkit-scroll) (scroll-bar-toolkit-horizontal-scroll): Add doc-strings stubs. * buffer.c (scroll-bar-height): Fix typo in doc-string. * frame.c (Vdefault_frame_horizontal_scroll_bars): Remove variable. * nsfns.m (Fx_create_frame): * w32fns.c (Fx_create_frame): * xfns.c (Fx_create_frame): Default horizontal scroll bars to nil.
* | Complete pixelwise frame/window resizing, add horizontal scrollbar support.Martin Rudalics2014-07-271-141/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * frame.el (frame-notice-user-settings): Rewrite using frame-initial-frame-tool-bar-height. * menu-bar.el (menu-bar-horizontal-scroll-bar) (menu-bar-no-horizontal-scroll-bar): New functions. (menu-bar-showhide-scroll-bar-menu): Add bindings for horizontal scroll bars. * scroll-bar.el (scroll-bar-lines) (set-horizontal-scroll-bar-mode) (get-horizontal-scroll-bar-mode, horizontal-scroll-bar-mode) (scroll-bar-horizontal-drag-1, scroll-bar-horizontal-drag) (scroll-bar-toolkit-horizontal-scroll): New functions. (horizontal-scroll-bar-mode) (previous-horizontal-scroll-bar-mode) (horizontal-scroll-bar-mode-explicit): New variables. (horizontal-scroll-bar-mode): New option. (toggle-horizontal-scroll-bar): Do something. (top-level): Bind horizontal-scroll-bar mouse-1. * startup.el (tool-bar-originally-present): Remove variable. (command-line): Don't set tool-bar-originally-present. * window.el (window-min-height): Update doc-string. (window--dump-frame): Dump horizontal scroll bar values. (window--min-size-1): Handle minibuffer window separately. Count in margins and horizontal scroll bar. Return safe value iff IGNORE equals 'safe. (frame-windows-min-size): New function (used by frame resizing routines). (fit-frame-to-buffer, fit-window-to-buffer): Count in horizontal scroll bars. (window--sanitize-window-sizes): New function. (window-split-min-size): Remove. (split-window): Count divider-width. Don't use `window-split-min-size' any more. Reword error messages. Sanitize windows sizes after splitting. * buffer.h (struct buffer): New fields scroll_bar_height and horizontal_scroll_bar_type. * buffer.c (bset_scroll_bar_height) (bset_horizontal_scroll_bar_type): New functions. (Fbuffer_swap_text): Handle old_pointm field. (init_buffer_once): Set defaults for scroll_bar_height and horizontal_scroll_bar_type. (syms_of_buffer): New variables scroll_bar_height and horizontal_scroll_bar_type. * dispextern.h (window_part): Rename ON_SCROLL_BAR to ON_VERTICAL_SCROLL_BAR. Add ON_HORIZONTAL_SCROLL_BAR. (set_vertical_scroll_bar): Remove prototype. (x_change_tool_bar_height): Add prototype. * dispnew.c (adjust_frame_glyphs_for_frame_redisplay) (window_to_frame_vpos, update_frame_1, scrolling, init_display): Use FRAME_TOTAL_COLS and FRAME_TOTAL_LINES instead of FRAME_COLS and FRAME_LINES. (adjust_frame_glyphs_for_window_redisplay): Rearrange lines. (update_window): Start mode_line_row->y after horizontal scroll bar. (change_frame_size_1): Call adjust_frame_size. (init_display): When changing the size of a tty frame do not pass height of menu bar. (Qframe_windows_min_size): New symbol. * frame.h (struct frame): List tool bar fields after menu bar fields. Add official, total_lines, horizontal_scroll_bars, config_scroll_bar_height and config_scroll_bar_lines fields. (FRAME_HAS_HORIZONTAL_SCROLL_BARS) (FRAME_CONFIG_SCROLL_BAR_HEIGHT, FRAME_CONFIG_SCROLL_BAR_LINES) (FRAME_SCROLL_BAR_AREA_HEIGHT, FRAME_SCROLL_BAR_COLS) (FRAME_SCROLL_BAR_LINES, FRAME_TOTAL_LINES, SET_FRAME_LINES) (FRAME_WINDOWS_HEIGHT): New macros. (SET_FRAME_HEIGHT, FRAME_TEXT_LINES_TO_PIXEL_HEIGHT) (FRAME_PIXEL_Y_TO_LINE, FRAME_PIXEL_HEIGHT_TO_TEXT_LINES) (FRAME_TEXT_TO_PIXEL_HEIGHT): Separately count top margin and horizontal scroll bar. (frame_inhibit_resize, adjust_frame_size) (frame_windows_min_size): Add declarations. (Qscroll_bar_height, Qhorizontal_scroll_bars) (x_set_scroll_bar_default_height, x_set_left_fringe) (x_set_right_fringe, x_set_vertical_scroll_bars) (x_set_horizontal_scroll_bars, x_set_scroll_bar_width) (x_set_scroll_bar_height): Add external declarations. * frame.c: (frame_inhibit_resize, frame_windows_min_size) (adjust_frame_size): New functions. (make_frame): Initial horizontal_scroll_bars field. Use SET_FRAME_LINES. Don't allow horizontal scroll bar in minibuffer window. (make_initial_frame, make_terminal_frame): No horizontal scroll bar in initial and terminal frames. Use adjust_frame_size. (Fframe_total_cols): Fix doc-string. (Fframe_total_lines, Fscroll_bar_height): New Lisp functions. (Fset_frame_height, Fset_frame_width, Fset_frame_size): Rewrite using adjust_frame_size. (Qscroll_bar_height, Qhorizontal_scroll_bars) (Qframe_windows_min_size): New symbols. (x_set_frame_parameters): Remove call of check_frame_size. (x_report_frame_params): Return scroll_bar_height value. (x_set_left_fringe, x_set_right_fringe): New functions. (adjust_frame_height, x_set_internal_border_width) (x_set_fringe_width): Remove. (x_set_internal_border_width, x_set_vertical_scroll_bars) (x_set_scroll_bar_width, x_set_right_divider_width) (x_set_bottom_divider_width): Rewrite using adjust_frame_size. (x_set_horizontal_scroll_bars, x_set_scroll_bar_height): New functions. (x_figure_window_size): Rewrite to make frame display the expected number of lines. (Vdefault_frame_scroll_bars): Rewrite doc-string. (Vdefault_frame_horizontal_scroll_bars) (Vframe_initial_frame_tool_bar_height) (frame_inhibit_implied_resize): New variables. * fringe.c (compute_fringe_widths): Remove. * gtkutil.h (YG_SB_MIN, YG_SB_MAX, YG_SB_RANGE): Define. (xg_create_horizontal_scroll_bar) (xg_update_horizontal_scrollbar_pos) (xg_set_toolkit_horizontal_scroll_bar_thumb) (xg_get_default_scrollbar_height) (xg_clear_under_internal_border): Extern. * gtkutil.c (xg_frame_resized): Don't call do_pending_window_change. (xg_frame_set_char_size): Use adjust_frame_size. (style_changed_cb): Call update_theme_scrollbar_height and x_set_scroll_bar_default_height. (x_wm_set_size_hint): Don't call check_frame_size. (update_theme_scrollbar_height) (xg_get_default_scrollbar_height) (xg_create_horizontal_scroll_bar) (xg_update_horizontal_scrollbar_pos) (xg_set_toolkit_horizontal_scroll_bar_thumb): New functions. (xg_create_scroll_bar): Set horizontal slot of bar. (xg_initialize): Call update_theme_scrollbar_height. (xg_clear_under_internal_border): No more static. * insdel.c (adjust_suspend_auto_hscroll): New function. (adjust_markers_for_delete, adjust_markers_for_insert) (adjust_markers_for_replace): Call adjust_suspend_auto_hscroll. * keyboard.c (readable_events, discard_mouse_events) (make_lispy_event): Handle horizontal scroll bar click events. (Fsuspend_emacs): When changing the size of a tty frame do not pass height of menu bar. (Qbefore_handle, Qhorizontal_handle, Qafter_handle, Qleft) (Qright, Qleftmost, Qrightmost): New symbols. * menu.c (Fx_popup_dialog): Use FRAME_TOTAL_LINES instead of FRAME_LINES. * minibuf.c (read_minibuf): Initialize suspend_auto_hscroll. * nsfns.m (x_set_internal_border_width): New function. * nsterm.m (ns_draw_fringe_bitmap, ns_set_vertical_scroll_bar): Remove extended fringe code. (x_set_window_size, x_new_font): Don't call compute_fringe_widths. * term.c (Fresume_tty): When changing the size of a tty frame do not pass height of menu bar. (clear_tty_hooks, set_tty_hooks): Clear horizontal_scroll_bar_hook. (init_tty): Frame has no horizontal scroll bars. * termhooks.h (enum scroll_bar_part): Add scroll_bar_move_ratio, scroll_bar_before_handle, scroll_bar_horizontal_handle, scroll_bar_after_handle, scroll_bar_left_arrow, scroll_bar_right_arrow, scroll_bar_to_leftmost and scroll_bar_to_rightmost entries. (enum event_kind): Add HORIZONTAL_SCROLL_BAR_CLICK_EVENT (struct terminal): Add set_horizontal_scroll_bar_hook. * w32console.c (initialize_w32_display): Clear horizontal_scroll_bar_hook. * w32fns.c (x_set_mouse_color): Use FRAME_W32_DISPLAY instead of FRAME_X_DISPLAY. (x_clear_under_internal_border, x_set_internal_border_width): New functions. (x_set_menu_bar_lines): Rewrite using frame_inhibit_resize. Set windows_or_buffers_changed when adding the menu bar. (x_set_tool_bar_lines): Rewrite using adjust_frame_size. (x_change_tool_bar_height, x_set_scroll_bar_default_height) (w32_createhscrollbar): New functions. (w32_createscrollbar): Rename to w32_createvscrollbar. (w32_createwindow): Init WND_HSCROLLBAR_INDEX. (w32_name_of_message): Replace WM_EMACS_CREATESCROLLBAR by WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR. Add WM_EMACS_SHOWCURSOR. (w32_wnd_proc): Handle WM_HSCROLL case. In WM_WINDOWPOSCHANGING case do not artificially impose WM size hints. Handle WM_EMACS_SHOWCURSOR case. Replace WM_EMACS_CREATESCROLLBAR case by WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR cases. (my_create_tip_window): Replace WND_SCROLLBAR_INDEX by WND_VSCROLLBAR_INDEX and WND_HSCROLLBAR_INDEX. (unwind_create_frame_1): Remove. (Fx_create_frame): Make both scrollbars the system standard width and height. Use official field of frame structure to inhibit running window-configuration-change-hook. (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size pixelwise. Handle frame's official field. (w32_frame_parm_handlers): Remove x_set_fringe_width entries. Add x_set_scroll_bar_height, x_set_horizontal_scroll_bars, x_set_left_fringe and x_set_right_fringe. * w32inevt.c (resize_event, maybe_generate_resize_event): Do not pass height of menu bar to change_frame_size. * w32menu.c (set_frame_menubar): Rewrite using frame_inhibit_resize. * w32term.h (struct w32_display_info): Add horizontal_scroll_bar_cursor and cursor_display_counter. (struct scroll_bar): Add horizontal. (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT) (HORIZONTAL_SCROLL_BAR_LEFT_RANGE) (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH) (HORIZONTAL_SCROLL_BAR_LEFT_BORDER) (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER) (HORIZONTAL_SCROLL_BAR_TOP_BORDER) (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER) (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): New macros. (WM_EMACS_CREATEVSCROLLBAR, WM_EMACS_CREATEHSCROLLBAR): Define instead of WM_EMACS_CREATESCROLLBAR. (WND_VSCROLLBAR_INDEX, WND_HSCROLLBAR_INDEX): Define instead of WND_SCROLLBAR_INDEX. * w32term.c (horizontal_scroll_bar_min_handle) (horizontal_scroll_bar_left_border) (horizontal_scroll_bar_right_border): New integers. (x_set_frame_alpha): Replace x_highlight_frame by w32_focus_frame. (x_window_to_scroll_bar): New argument "type". Update callers accordingly. (w32_set_horizontal_scroll_bar_thumb) (x_horizontal_scroll_bar_report_motion) (w32_set_horizontal_scroll_bar) (w32_horizontal_scroll_bar_handle_click) (x_horizontal_scroll_bar_report_motion): New functions. (w32_mouse_position): Discriminate horizontal and vertical scrollbar cases. (my_create_scrollbar): Replace with two new functions my_create_vscrollbar and my_create_hscrollbar. (x_scroll_bar_create): New argument "horizontal". Update callers accordingly. (x_scroll_bar_remove, w32_condemn_scroll_bars) (w32_redeem_scroll_bar, x_scroll_bar_clear): Handle horizontal scroll bar case. (w32_read_socket): Handle WM_HSCROLL cae. (x_new_font): Don't recompute fringe widths. Use frame_inhibit_resize. Calculate new menu bar height iff we build without toolkit. Always clear under internal border. (x_set_window_size): Don't check frame size or recompute fringes. Reset fullscreen status before applying sizes. Always resize as requested by pixelwise argument. Don't call do_pending_window_change. (x_wm_set_size_hint): Add call for FRAME_SCROLL_BAR_AREA_HEIGHT. (w32_initialize_display_info): Initialize dpyinfo's horizontal_scroll_bar_cursor entry. (w32_create_terminal): Add set_horizontal_scroll_bar_hook. (w32_initialize): Init horizontal_scroll_bar_min_handle and horizontal_scroll_bar_left_border. (w32fullscreen_hook): Intermittently resize window to normal when switching from fullscreen to maximized state. (run_window_configuration_change_hook): Don't run it if frame is not official yet. (unwind_change_frame): Remove. (Fset_window_configuration): Rewrite using frame's official field. * widget.c (set_frame_size): Don't call compute_fringe_widths. (EmacsFrameSetCharSize): Obey frame_inhibit_resize. * window.h (struct window): New fields old_pointm, horizontal_scroll_bar, horizontal_scroll_bar_type, hscroll_whole, scroll_bar_height and suspend_auto_hscroll. (wset_horizontal_scroll_bar, wset_horizontal_scroll_bar_type): New functions. (sanitize_window_sizes): Extern. (MINI_NON_ONLY_WINDOW_P, MINI_ONLY_WINDOW_P, WINDOW_PSEUDO_P) (WINDOW_TOPMOST_P, WINDOW_HAS_HORIZONTAL_SCROLL_BAR) (WINDOW_CONFIG_SCROLL_BAR_HEIGHT) (WINDOW_CONFIG_SCROLL_BAR_LINES) (WINDOW_SCROLL_BAR_LINES, WINDOW_SCROLL_BAR_AREA_HEIGHT): New macros. (WINDOW_LEFT_FRINGE_COLS, WINDOW_RIGHT_FRINGE_COLS) (WINDOW_FRINGE_COLS, WINDOW_FRINGE_EXTENDED_P): Remove macros. (WINDOW_VERTICAL_SCROLL_BAR_TYPE) (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT) (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT) (WINDOW_HAS_VERTICAL_SCROLL_BAR): Minor rewrite. (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT) (WINDOW_SCROLL_BAR_AREA_Y): Count in scroll bar height. * window.c (wset_old_pointm, Fwindow_scroll_bar_height) (Fwindow_old_point, sanitize_window_sizes): New functions. (Qwindow_sanitize_window_sizes): New symbol. (window_body_height): Count in horizontal scroll bar. (set_window_hscroll, Fscroll_left, Fscroll_right): Set suspend_auto_hscroll slot. (Fwindow_inside_edges): Count fringes pixelwise. (coordinates_in_window, Fcoordinates_in_window_p): Consider horizontal scroll bar. (check_frame_size, adjust_window_margins): Remove functions and corresponding calls. (set_window_buffer): Initialize old_pointm and horizontal scroll bars. (temp_output_buffer_show): Reset hscroll related fields. Initialize old_pointm. (make_parent_window): Initialize old_pointm. (make_window): Initialize old_pointm, horizontal scroll bar type, and scroll bar height. (resize_frame_windows): Don't count top margin in new sizes. Don't use safe sizes when shrinking a frame; let the window manager do the clipping. (Fsplit_window_internal): Inherit horizontal scroll bar type and height. (Fdelete_window_internal): Unchain old_pointm marker. (window_scroll_pixel_based, Fscroll_other_window): Adjust old_pointm. (Fwindow_text_width, Fwindow_text_height): New argument "pixelwise". (struct saved_window): New fields, old_pointm, hscroll_whole, suspend_auto_hscroll, scroll_bar_height and horizontal_scroll_bar_type. (Fset_window_configuration, save_window_save): Set new fields of saved_window. (apply_window_adjustment): Don't call adjust_window_margins. (set_window_margins): Don't change margins if new sizes don't fit into window. (set_window_scroll_bars): New argument "horizontal_type". Handle horizontal scroll bars. Don't change scroll bars if they don't fit into window. (Fset_window_scroll_bars): New argument "horizontal_type". (Fwindow_scroll_bars): Return values for horizontal scroll bars. (compare_window_configurations): Compare horizontal scroll bar settings. * xdisp.c (window_text_bottom_y, window_box_height): Count in horizontal scroll bar height. (pixel_to_glyph_coords, init_xdisp): Use FRAME_TOTAL_LINES instead of FRAME_LINES. (remember_mouse_glyph): Case ON_SCROLL_BAR changed to ON_VERTICAL_SCROLL_BAR. (with_echo_area_buffer): Initialize old_pointm. (with_echo_area_buffer_unwind_data): Store old_pointm values in vector. (unwind_with_echo_area_buffer): Handle old_pointm. (update_tool_bar): Set do_update when the tool bar window has at least one line (since this is what the user sets). (MAX_FRAME_TOOL_BAR_HEIGHT): Remove macro. (redisplay_tool_bar): Return early when toolbar has zero lines. Call x_change_tool_bar_height. Don't use max_tool_bar_height. (hscroll_window_tree): Handle suspension of auto_hscroll and old_pointm. (set_horizontal_scroll_bar): New function. (redisplay_window): Set ignore_mouse_drag_p when tool bar has more than one line. Handle horizontal scroll bars. (note_mouse_highlight): Handle horizontal scrol bars. (expose_frame): Set dimensions of XRectangle from frame's text sizes. (Vvoid_text_area_pointer): Update doc-string. * xfns.c (x_set_menu_bar_lines): Use adjust_frame_size. (x_change_tool_bar_height, x_set_scroll_bar_default_height) (x_set_internal_border_width): New functions. (x_set_tool_bar_lines): Call x_change_tool_bar_height. (unwind_create_frame_1): Remove. (Fx_create_frame): Handle horizontal scroll bars. Use official field of frame structure to inhibit running window-configuration-change-hook. (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size pixelwise. Handle frame's official field. (x_frame_parm_handlers): Add x_set_scroll_bar_height, x_set_horizontal_scroll_bars, x_set_left_fringe, x_set_right_fringe. * xmenu.c (update_frame_menubar, free_frame_menubar): Use adjust_frame_size. * xterm.h (struct x_display_info): Add horizontal_scroll_bar_cursor and Xatom_Horizontal_Scrollbar slots. (struct scroll_bar): Add horizontal slot. (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT) (HORIZONTAL_SCROLL_BAR_LEFT_RANGE) (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH): New macros. (HORIZONTAL_SCROLL_BAR_LEFT_BORDER) (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER) (HORIZONTAL_SCROLL_BAR_TOP_BORDER) (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER) (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): Define. (x_clear_under_internal_border): Remove. * xterm.c (XTmouse_position): Handle horizontal scroll bars. (x_window_to_scroll_bar): New argument TYPE. Update callers. (x_send_scroll_bar_event, x_scroll_bar_create): New arguments HORIZONTAL. Update callers. (horizontal_action_hook_id): New action hook id. (x_horizontal_scroll_bar_to_input_event) (x_create_horizontal_toolkit_scroll_bar) (xt_horizontal_action_hook) (x_set_toolkit_horizontal_scroll_bar_thumb) (XTset_horizontal_scroll_bar, x_net_wm_state) (x_horizontal_scroll_bar_report_motion): New functions. (xg_scroll_callback, x_scroll_bar_handle_click): Handle horizontal scroll bars. (SCROLL_BAR_HORIZONTAL_NAME): Define. (XTset_vertical_scroll_bar): Attempt to clear areas not covered by scroll bar. (XTcondemn_scroll_bars, XTredeem_scroll_bar): Rewrite. Handle horizontal scroll bars. (handle_one_xevent): Handle horizontal scroll bar events. Call x_net_wm_state. (x_set_window_size_1, x_wm_set_size_hint): Don't call check_frame_size. (x_set_window_size): Don't call check_frame_size and do_pending_window_change. (x_term_init): Init horizontal_scroll_bar_cursor display info. (x_create_terminal): Add set_horizontal_scroll_bar_hook. (x_scroll_bar_set_handle): Add some checks when calling x_clear_area.
* | Provisionally fix Windows build broken by last commit.Martin Rudalics2014-07-251-1/+1
| | | | | | | | | | * w32fns.c (menubar_in_use): No more static. * w32term.c (current_popup_menu, menubar_in_use): Declare.
* | Move hourglass machinery to RIF.Dmitry Antipov2014-07-251-61/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dispextern.h (struct redisplay_interface): New members show_hourglass and hide_hourglass. Indent comments. (show_hourglass, hide_hourglass): Remove prototypes. * nsterm.m (show_hourgass, hide_hourglass): Refactor to ... (ns_show_hourglass, ns_hide_hourglass): ... new no-ops. (ns_redisplay_interface): Add them. * w32fns.c (show_hourglass, hide_hourglass): Refactor to ... * w32term.c (w32_show_hourglass, w32_hide_hourglass): ... these. (w32_arrow_cursor): New function to hack around non-GUI frames. (w32_redisplay_interface): Add new functions. * w32term.h (w32_arror_cursor): Add prototype. * xdisp.c (show_hourglass): New function, refactored out from platform-dependend code. (cancel_hourglass): Now call to RIF function. * xfns.c (show_hourglass, hide_hourglass): Refactor to ... * xterm.c (x_show_hourglass, x_hide_hourglass): ... these. (x_redisplay_interface): Add new functions.
* | Merge from emacs-24; up to 2014-06-22T05:00:14Z!dmantipov@yandex.ruGlenn Morris2014-07-121-1/+5
|\ \ | |/
| * Document the behavior of file selection dialogs on Windows 7 (bug #17950).Eli Zaretskii2014-07-121-1/+5
| | | | | | | | | | | | | | | | | | | | etc/PROBLEMS: Mention the problem from bug #17950. src/w32fns.c (Fx_file_dialog): Mention in the doc string the behavior on Windows 7 and later when the function is repeatedly invoked with the same value of DIR. src/xfns.c (Fx_file_dialog) [USE_MOTIF, USE_GTK]: Update the doc string to match the one in w32fns.c.
* | On MS-Windows, display busy cursor on all GUI frames.Dmitry Antipov2014-07-031-75/+32
| | | | | | | | | | | | | | | | | | This is similar to what we have on X. Quickly tested by Dani Moncayo. * w32fns.c (toplevel): Remove hourglass_hwnd; no longer used. (w32_show_hourglass, w32_hide_hourglass, w32_note_current_window): Likewise. (hide_hourglass, show_hourglass): Redesign to match X counterparts. * xdisp.c (start_hourglass): Remove Windows-specific bits.
* | * xfns.c (Qsuppress_icon): Remove; no real users.Dmitry Antipov2014-06-291-4/+0
| | | | | | | | | | | | (syms_of_xfns): Don't DEFSYM it. Remove ancient comments. * w32fns.c (Qsuppress_icon): Remove, for the same reason. (syms_of_w32fns): Don't DEFSYM it.
* | "the the", "from from" and "and and".Mario Lang2014-06-231-1/+1
| |
* | Merge from emacs-24; up to 2014-05-26T10:21:18Z!rgm@gnu.orgGlenn Morris2014-05-251-1/+13
|\ \ | |/
| * Fix bug #17524 with crashes in creating a new frame with invalid font.Eli Zaretskii2014-05-201-1/+13
| | | | | | | | | | | | | | | | src/w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: If we are unwinding when frame's faces were not initialized yet, increment the frame's image-cache reference count before calling x_free_frame_resources. Don't dereference dpyinfo->terminal->image_cache if it is NULL.
* | Merge from emacs-24; up to 2014-05-08T03:34:20Z!rgm@gnu.orgGlenn Morris2014-05-071-4/+6
|\ \ | |/
| * Fix tooltips pulling Emacs window to front on windows-nt, bug #17408.Jarek Czekalski2014-05-061-4/+6
| | | | | | | | | | * w32fns.c (Fx_show_tip): Add SWP_NOOWNERZORDER flag to SetWindowPos invocations.