1. 27 Aug, 2013 1 commit
    • Dmitry Antipov's avatar
      * lisp.h (Mouse_HLInfo): Move from here... · 9fed9729
      Dmitry Antipov authored
      * dispextern.h (Mouse_HLInfo): ...to here and offload lisp.h.
      (reset_mouse_highlight): New function.
      * msdos.c (dos_set_window_size, IT_update_begin)
      (internal_terminal_init):
      * nsterm.m (ns_update_window_end, x_free_frame_resources)
      (ns_initialize_display_info):
      * w32console.c (initialize_w32_display):
      * w32term.c (x_update_window_end, x_free_frame_resources)
      (w32_initialize_display_info):
      * xterm.c (x_update_window_end, x_free_frame_resources, x_term_init):
      * window.c (Fdelete_other_windows_internal):
      * xdisp.c (clear_mouse_face, cancel_mouse_face): Use it.
      * termchar.h (toplevel):
      * xterm.h (toplevel): Include dispextern.h.
      9fed9729
  2. 23 Aug, 2013 1 commit
    • Dmitry Antipov's avatar
      Minor cleanup for redisplay interface and few related functions. · 9997ec56
      Dmitry Antipov authored
      * frame.h (enum text_cursor_kinds): Move from here...
      * dispextern.h (enum text_cursor_kinds): ...to here.
      (toplevel): Drop unnecessary declarations.
      (struct redisplay_interface): Use bool and enum text_cursor_kinds
      in update_window_end_hook and draw_window_cursor functions.
      (display_and_set_cursor, x_update_cursor): Adjust prototypes.
      * nsterm.m (ns_update_window_end, ns_draw_window_cursor):
      * w32term.c (x_update_window_end,w32_draw_window_cursor):
      * xterm.c (x_update_window_end, x_draw_window_cursor):
      * xdisp.c (display_and_set_cursor, update_window_cursor)
      (update_cursor_in_window_tree, x_update_cursor): Use bool and
      enum text_cursor_kinds where appropriate.
      9997ec56
  3. 14 Aug, 2013 1 commit
    • Dmitry Antipov's avatar
      Utility function and macro to copy Lisp string to C string. · 5b71542d
      Dmitry Antipov authored
      * lisp.h (xlispstrdupa): New macro.
      (xlispstrdup): New prototype.
      * alloc.c (xlispstrdup): New function.
      * callint.c (Fcall_interactively):
      * fileio.c (Ffile_name_directory, Fexpand_file_name)
      (Fsubstitute_in_file_name):
      * frame.c (Fmake_terminal_frame): Use xlispstrdupa.
      * image.c (x_create_bitmap_from_file):
      * w32term.c (w32_term_init):
      * xterm.c (x_term_init): Use xlispstrdup.
      5b71542d
  4. 13 Aug, 2013 2 commits
    • Eli Zaretskii's avatar
      Fix the Windows build broken by 2013-08-13T15:29:25Z!dmantipov@yandex.ru. · 2fa611b7
      Eli Zaretskii authored
       src/window.c (Fwindow_margins): Return nil when there's no marginal
       area, as per the documented API.
       src/w32term.c (x_scroll_bar_create): Use ALLOCATE_PSEUDOVECTOR, not
       Fmake_vector, as scroll bar's struct members are not all Lisp
       objects now.  This avoids crashes in GC.
       src/w32term.h (struct scroll_bar): Convert fringe_extended_p to a
       bool, so its address could be taken.
      2fa611b7
    • Dmitry Antipov's avatar
      * window.h (WINDOW_FRINGE_EXTENDED_P): New macro. · c8ae93b0
      Dmitry Antipov authored
      * nsterm.m (ns_set_vertical_scroll_bar): Use it.  Use convenient
      bool instead of BOOL.
      * w32term.h (struct scroll_bar): Convert fringe_extended_p
      from Lisp_Object to bitfield.  Adjust comment.
      * w32term.c (x_scroll_bar_create): Adjust user.
      Use WINDOW_FRINGE_EXTENDED_P and bool for boolean.
      * xterm.c (XTset_vertical_scroll_bar): Likewise.
      Use bool for boolean.
      * xterm.h (struct scroll_bar): Prefer commonly used `unsigned'
      to `unsigned int' when defining a bitfield.
      c8ae93b0
  5. 08 Aug, 2013 1 commit
    • Dmitry Antipov's avatar
      Redesign redisplay interface to drop global variable updated_window. · 65620264
      Dmitry Antipov authored
      Always pass currently updated window as a parameter to update routines.
      * dispextern.h (updated_window): Remove declaration.
      (struct redisplay_interface): Pass window parameter to
      write_glyphs, insert_glyphs, clear_end_of_line, cursor_to
      and after_update_window_hook.
      (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line, x_cursor_to):
      Adjust prototypes.
      * dispnew.c (updated_window): Remove.
      (redraw_overlapped_rows, update_marginal_area, update_text_area)
      (update_window_line): Adjust to match redisplay interface changes.
      * nsterm.m (ns_update_window_begin, ns_update_window_end)
      (ns_scroll_run, ns_after_update_window_line):
      * w32term.c (x_update_window_begin, x_update_window_end)
      (x_after_update_window_line, x_scroll_run):
      * xterm.c (x_update_window_begin, x_update_window_end)
      (x_after_update_window_line, x_scroll_run):
      * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
      Likewise.  Adjust comments where appropriate.
      (x_cursor_to): Simplify because this is always called during window
      update (but install debugging check anyway).
      (expose_window): Check must_be_updated_p flag to see whether this
      function is called during window update.
      65620264
  6. 07 Aug, 2013 1 commit
  7. 03 Aug, 2013 1 commit
    • Dmitry Antipov's avatar
      Drop FRAME_PTR typedef. · a10c8269
      Dmitry Antipov authored
      * composite.c, font.c, font.h, fontset.c, fontset.h, frame.c, frame.h:
      * ftfont.c, ftxfont.c, gtkutil.c, gtkutil.h, image.c, keyboard.c:
      * menu.c, menu.h, msdos.c, nsfns.m, nsfont.m, nsmenu.m, nsterm.h:
      * nsterm.m, scroll.c, term.c, w32fns.c, w32font.c, w32font.h:
      * w32inevt.c, w32inevt.h, w32menu.c, w32notify.c, w32term.c, w32term.h:
      * w32uniscribe.c, w32xfns.c, widget.c, window.c, xdisp.c, xfaces.c:
      * xfns.c, xfont.c, xftfont.c, xmenu.c, xselect.c, xterm.c:
      All related users changed.
      a10c8269
  8. 02 Aug, 2013 1 commit
  9. 01 Aug, 2013 1 commit
    • Dmitry Antipov's avatar
      Do not use pure Xism x_wm_set_icon_position in non-X ports. · 52b8a085
      Dmitry Antipov authored
      * frame.c (x_set_frame_parameters): Call to x_wm_set_icon_position
      only if HAVE_X_WINDOWS is in use.
      * frame.h (x_set_frame_parameters): Move under HAVE_X_WINDOWS.
      * nsterm.m (x_wm_set_icon_position): Remove no-op.
      * w32term.c (x_wm_set_icon_position): Likewise.
      * w32fns.c (x_icon): Adjust user.
      52b8a085
  10. 30 Jul, 2013 1 commit
    • Dmitry Antipov's avatar
      * fringe.c (draw_window_fringes, update_window_fringes) · d7e6881a
      Dmitry Antipov authored
      (compute_fringe_widths):
      * w32term.c (x_draw_glyph_string):
      * window.c (candidate_window_p, Frecenter):
      * xfaces.c (realize_basic_faces, realize_default_face)
      (Fbitmap_space_p, Finternal_set_lisp_face_attribute)
      (x_update_menu_appearance, face_attr_equal_p, lface_equal_p):
      * xfns.c (x_set_cursor_color, xic_free_xfontset):
      * xmenu.c (Fx_menu_bar_open_internal):
      * xselect.c (x_reply_selection_request, Fx_get_atom_name):
      * xsettings.c (xft_settings_event):
      * xterm.c (x_draw_glyph_string, x_had_errors_p):
      Use bool for booleans.  Adjust style and comments where
      appropriate.
      * dispextern.h (draw_window_fringes, update_window_fringes)
      (compute_fringe_widths):
      * xterm.h (x_had_errors_p): Adjust prototype.
      d7e6881a
  11. 27 Jul, 2013 1 commit
    • Eli Zaretskii's avatar
      Fix focus-out events on MS-Windows. · e95da6d3
      Eli Zaretskii authored
       src/w32term.c (w32_read_socket) <WM_KILLFOCUS>: Call
       w32_detect_focus_change instead of doing part of its job by hand.
       This fixes the problem whereby FOCUS_OUT events were not sent to
       the event queue.
      e95da6d3
  12. 26 Jul, 2013 1 commit
    • Eli Zaretskii's avatar
      Fix bug #14841 with invisible frames on MS-Windows. · a8f93651
      Eli Zaretskii authored
       src/w32term.c (w32_read_socket) <WM_EMACS_PAINT>: Warn about frame
       being re-exposed only if it didn't ask to become visible.
       <WM_SIZE>: Under SIZE_RESTORED, only set the frame visible if it
       was previously iconified.
       (x_iconify_frame): Mark the frame iconified.
      a8f93651
  13. 18 Jul, 2013 1 commit
  14. 13 Jul, 2013 1 commit
  15. 06 Jul, 2013 1 commit
    • Paul Eggert's avatar
      Use emacs_open more consistently when opening files. · 406af475
      Paul Eggert authored
      This handles EINTR more consistently now, and makes it easier
      to introduce other uniform changes to file descriptor handling.
      * src/systdio.h: New file.
      * src/buffer.c (mmap_init):
      * cygw32.c (chdir_to_default_directory):
      * dispnew.c (Fopen_termscript):
      * emacs.c (Fdaemon_initialized):
      * fileio.c (Fdo_auto_save):
      * image.c (slurp_file, png_load_body, jpeg_load_body):
      * keyboard.c (Fopen_dribble_file):
      * lread.c (Fload):
      * print.c (Fredirect_debugging_output):
      * sysdep.c (get_up_time, procfs_ttyname, procfs_get_total_memory):
      * termcap.c (tgetent):
      * unexaix.c, unexcoff.c (unexec, adjust_lnnoptrs):
      * unexcw.c, unexelf.c, unexhp9k800.c, unexmacosx.c (unexec):
      * w32term.c (w32_initialize) [CYGWIN]:
      * xfaces.c (Fx_load_color_file):
      Use emacs_open instead of plain open, and emacs_fopen instead of
      plain fopen.
      * dispnew.c, fileio.c, image.c, keyboard.c, lread.c, print.c, sysdep.c:
      * xfaces.c: Include sysstdio.h rather than stdio.h, for emacs_fopen.
      * callproc.c (default_output_mode): New constant.
      (Fcall_process): Use it to call emacs_open instead of plain creat.
      * dispnew.c (Fopen_termscript): Fix minor race in opening termscript.
      * sysdep.c (emacs_open): Add commentary and don't call file name "path".
      (emacs_fopen): New function.
      * unexaix.c, unexcoff.c, unexelf.c, unexhp9k800.c, unexmacosx.c:
      Include <lisp.h>, for emacs_open.
      * unexelf.c (fatal): Remove decl; not needed with <lisp.h> included.
      406af475
  16. 04 Jul, 2013 1 commit
  17. 20 Jun, 2013 1 commit
    • Eli Zaretskii's avatar
      Yet another attempt at fixing bugs #14602, 14630, 14669. · b932cad7
      Eli Zaretskii authored
       src/w32fns.c (w32_wnd_proc): Don't compute the header line and mode
       line dimensions here, to avoid race conditions with the main
       thread.
       src/w32term.c (w32_draw_window_cursor): Compute the header line and
       mode line dimensions here.
       <w32_system_caret_window, w32_system_caret_hdr_height>:
       <w32_system_caret_mode_height>: New variables.
       src/w32term.h: Declare them.
      b932cad7
  18. 03 Jun, 2013 1 commit
    • Eli Zaretskii's avatar
      * configure.ac (HAVE_GFILENOTIFY): Do not change $LIBS. · 7f203aa1
      Eli Zaretskii authored
      (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): Substitute.
      
      * nt/config.nt: Add HAVE_GFILENOTIFY, HAVE_W32NOTIFY and USE_FILE_NOTIFY.
      
      * src/Makefile.in (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): New variables.
      (ALL_CFLAGS): Add $(GFILENOTIFY_CFLAGS).
      (LIBES): Add $(GFILENOTIFY_LIBS).
      
      * src/w32inevt.c (handle_file_notifications): Add dummy implementation
      for !HAVE_W32NOTIFY.
      
      * src/w32term.c: Wrap code with HAVE_W32NOTIFY.
      7f203aa1
  19. 14 Apr, 2013 1 commit
    • Erik Charlebois's avatar
      * src/w32fns.c (w32_fullscreen_rect): New function to compute the · 1f635a07
      Erik Charlebois authored
      window rectangle for the given fullscreen mode.
      (w32_wnd_proc): When in a fullscreen mode, WM_WINDOWPOSCHANGING
      no longer tunes the window size.  This keeps the window's edges
      flush with the screen and allows the taskbar to hide itself in
      fullboth.
      * src/w32term.c (w32fullscreen_hook): fullboth now shows without
      window decorations and uses the entire screen.
      1f635a07
  20. 01 Apr, 2013 1 commit
  21. 26 Mar, 2013 1 commit
  22. 24 Mar, 2013 1 commit
  23. 23 Mar, 2013 2 commits
    • Eli Zaretskii's avatar
      Fix fullscreen resizing of multiple frames on MS-Windows. · cdc0d0bd
      Eli Zaretskii authored
       src/w32term.h (struct w32_output): New members normal_width,
       normal_height, normal_top, normal_left, and prev_fsmode.
       (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP)
       (FRAME_NORMAL_LEFT, FRAME_PREV_FSMODE): New macros to access these
       members of a frame.
       src/w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH,
       FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static
       variables, to save and restore frame dimensions.  Use
       FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
       after returning from a 'fullscreen' configuration.  use
       SendMessage instead of PostMessage to send the SC_RESTORE message,
       to avoid races between the main thread and the input thread.
      cdc0d0bd
    • Eli Zaretskii's avatar
      Fix bug #14032 with restoring frame dimensions on MS-Windows. · b5b7745f
      Eli Zaretskii authored
       src/w32term.c (w32fullscreen_hook): Record last value of the frame's
       'fullscreen' parameter.  Always record previous width and height
       of the frame, except when switching out of maximized modes, so
       that they could be restored correctly, instead of resetting to the
       default frame dimensions.  Send SC_RESTORE command to the frame,
       unless we are going to send SC_MAXIMIZE, to restore the frame
       resize hints in the mouse pointer shown by the window manager.
       src/frame.c (get_frame_param): Now extern for WINDOWSNT as well.
       src/lisp.h (get_frame_param): Adjust conditions for prototype
       declaration.
      b5b7745f
  24. 15 Mar, 2013 1 commit
  25. 14 Mar, 2013 1 commit
    • Eli Zaretskii's avatar
      Fix bug #13953 with spontaneous frame resizes on MS-Windows. · a5cc4dde
      Eli Zaretskii authored
       src/w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
       and incorrect code.  Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
       and WM_ACTIVATEAPP.
       (w32fullscreen_hook): If the frame is visible, reset
       f->want_fullscreen flag after changing the frame size.  If the
       frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
      a5cc4dde
  26. 13 Mar, 2013 1 commit
  27. 10 Mar, 2013 1 commit
    • Daniel Colascione's avatar
      2013-03-10 Daniel Colascione <dancol@dancol.org> · 819e2da9
      Daniel Colascione authored
      	* w32term.h (GUISTR, GUI_ENCODE_FILE, GUI_ENCODE_SYSTEM, GUI_FN)
      	(GUI_SDATA, guichar_t): Macros to abstract out differences between
      	NTGUI_UNICODE and !NTGUI_UNICODE builds, some moved out of
      	w32fns.c.
      
      	* w32term.c (construct_drag_n_drop): Use the above macros to make
      	drag-and-drop work for non-ASCII filenames in cygw32 builds.
      
      	* w32fns.c (x_set_name, x_set_title): Use the above macros to
      	properly display non-ASCII frame titles in cygw32 builds.
      
      	* w32fns.c (Fw32_shell_execute): Use the above macros to properly
      	call ShellExecute in cygw32 builds.
      
      	* w32fn.c (Fx_file_dialog): Use the above macros to simplify the
      	common file dialog code.
      
      	* w32fns.c (Ffile_system_info): Remove from cygw32 builds, which
      	can just use du like other systems.
      
      	* coding.c (from_unicode_buffer): Declare.
      	* coding.c (from_unicode_buffer): Implement.
      819e2da9
  28. 16 Feb, 2013 1 commit
  29. 24 Jan, 2013 1 commit
    • Dmitry Antipov's avatar
      Drop async_visible and async_iconified fields of struct frame. · edfa7fa0
      Dmitry Antipov authored
      This is possible because async input is gone; for details, see
      http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00734.html.
      * frame.h (struct frame): Remove async_visible and async_iconified
      members, convert garbaged to unsigned bitfield.  Adjust comments.
      (FRAME_SAMPLE_VISIBILITY): Remove.  Adjust all users.
      (SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED): New macros.
      * frame.c, gtkutil.c, term.c, w32fns.c, window.c, xdisp.c:
      Consistently use SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED,
      FRAME_VISIBLE_P and FRAME_ICONIFIED_P macros where appropriate.
      * w32term.c: Ditto.
      (w32_read_socket): Save iconified state to generate DEICONIFY_EVENT
      properly.  Likewise for obscured.
      * xterm.c: Ditto.
      (handle_one_xevent): Save visible state go generate ICONIFY_EVENT
      properly.
      * nsterm.m: Ditto.
      (windowDidDeminiaturize): Generate DEICONIFY_EVENT.
      edfa7fa0
  30. 23 Jan, 2013 1 commit
  31. 09 Jan, 2013 1 commit
  32. 04 Jan, 2013 2 commits
  33. 01 Jan, 2013 1 commit
  34. 22 Dec, 2012 1 commit
  35. 10 Dec, 2012 1 commit
  36. 04 Dec, 2012 1 commit
    • Dmitry Antipov's avatar
      * lisp.h (Mouse_HLInfo): Remove set-but-unused mouse_face_image_state · 350f51ad
      Dmitry Antipov authored
      member.  Adjust users.  Convert mouse_face_past_end, mouse_face_defer
      and mouse_face_hidden members to a bitfields.
      * frame.h (struct frame): Remove set-but-not-used space_width member.
      (FRAME_SPACE_WIDTH): Remove.
      * nsterm.m, w32term.c, xterm.c: Adjust users.
      * termchar.h (struct tty_display_info): Remove set-but-unused se_is_so
      member.  Adjust users.  Convert term_initted, delete_in_insert_mode,
      costs_set, insert_mode, standout_mode, cursor_hidden and flow_control
      members to a bitfields.
      350f51ad
  37. 01 Dec, 2012 1 commit