1. 04 Nov, 2010 1 commit
    • Jan Djärv's avatar
      Get window position by reading _NET_FRAME_EXTENTS (Bug#5721). · d75c9992
      Jan Djärv authored
      * src/xfns.c (x_real_positions): Try to get _NET_FRAME_EXTENTS first
      before traversing window tree (Bug#5721).
      
      * src/xterm.c (x_term_init): Initialize Xatom_net_frame_extents.
      
      * src/xterm.h (struct x_display_info): Xatom_net_frame_extents is new.
      d75c9992
  2. 01 Nov, 2010 1 commit
    • Eli Zaretskii's avatar
      Finish coding mouse highlight redesigned for portability. · bbf534ce
      Eli Zaretskii authored
      Not compiled yet.
      
       nsterm.m (ns_update_window_begin, ns_update_window_end)
       (ns_update_end, x_destroy_window, ns_frame_up_to_date)
       (ns_dumpglyphs_box_or_relief, ns_maybe_dumpglyphs_background)
       (ns_dumpglyphs_image, ns_dumpglyphs_stretch)
       (ns_initialize_display_info, keyDown, mouseMoved, mouseExited):
       Replace Display_Info with Mouse_HLInfo everywhere where
       mouse_face_* members were accessed for mouse highlight purposes.
       xterm.c (x_update_window_begin, x_update_window_end)
       (x_update_end, XTframe_up_to_date, x_set_mouse_face_gc)
       (handle_one_xevent, x_free_frame_resources, x_term_init): Replace
       Display_Info with Mouse_HLInfo everywhere where mouse_face_*
       members were accessed for mouse highlight purposes.
       w32term.c (x_update_window_begin, x_update_window_end)
       (x_update_end, w32_read_socket, x_free_frame_resources)
       (w32_initialize_display_info): Replace Display_Info with
       Mouse_HLInfo everywhere where mouse_face_* members were accessed
       for mouse highlight purposes.
       xdisp.c (show_mouse_face, note_mode_line_or_margin_highlight)
       (note_mouse_highlight) [HAVE_WINDOW_SYSTEM]: Don't run GUI code
       unless the frame is on a window-system.
      bbf534ce
  3. 31 Oct, 2010 2 commits
  4. 29 Oct, 2010 1 commit
  5. 25 Oct, 2010 2 commits
  6. 24 Oct, 2010 2 commits
  7. 09 Oct, 2010 1 commit
  8. 08 Oct, 2010 1 commit
  9. 03 Oct, 2010 1 commit
  10. 20 Sep, 2010 1 commit
  11. 12 Sep, 2010 1 commit
    • Jan D's avatar
      Fix bug 7013, only do send event if wanted state != current state. · 5f61a25c
      Jan D authored
      * xterm.c (get_current_vm_state): New function.
      (do_ewmh_fullscreen): Call get_current_vm_state and compare with
      want_fullscreen so set_wm_state calls are few (Bug#7013).
      (x_handle_net_wm_state): Move code to get_current_vm_state and
      call that function.
      5f61a25c
  12. 02 Sep, 2010 1 commit
    • Jan Djärv's avatar
      Removed cut-buffer code. · 6d7cc563
      Jan Djärv authored
      * lisp/mouse-sel.el (mouse-sel-get-selection-function):
      x-cut-buffer-or-selection-value renamed to x-selection-value.
      (x-select-text): Optional push removed.
      
      * lisp/select.el (x-get-cut-buffer, x-set-cut-buffer): Remove.
      
      * lisp/simple.el (interprogram-cut-function): Remove mention of PUSH.
      
      * lisp/w32-fns.el (x-last-selected-text):
      x-cut-buffer-or-selection-value renamed to x-selection-value.
      (x-cut-buffer-max): Remove.
      (x-select-text): Remove argument PUSH, update documentation.
      
      * lisp/emacs-lisp/cl-macs.el (x-get-cutbuffer, x-get-cut-buffer): Remove.
      
      * lisp/term/ns-win.el (x-setup-function-keys, ns-last-selected-text):
      x-cut-buffer-or-selection-value renamed to x-selection-value
      (x-selection-value): Renamed from x-cut-buffer-or-selection-value.
      (x-select-text): Remove argument PUSH, update documentation.
      
      * lisp/term/pc-win.el (x-last-selected-text):
      x-cut-buffer-or-selection-value renamed to x-selection-value
      (x-select-text): Remove argument PUSH, update documentation.
      
      * lisp/term/x-win.el: Update documentation for x-last-selected-text-*.
      (x-last-selected-text-cut, x-last-selected-text-cut-encoded)
      (x-last-cut-buffer-coding, x-cut-buffer-max): Remove.
      (x-select-text): Remove argument PUSH, update documentation.  Remove
      cut-buffer code.
      (x-selection-value-internal): Was previously x-selection-value.
      (x-selection-value): Renamed from x-cut-buffer-or-selection-value.
      Update documentation, remove cut-buffer code.  Call
      x-selection-value-internal.
      (x-clipboard-yank): Call x-selection-value-internal.
      (x-initialize-window-system): Remove setting of x-cut-buffer-max.
      
      * src/xselect.c: Remove declaration of cut-buffer objects and functions.
      (symbol_to_x_atom): Remove mapping to XA_CUT_BUFFERn.
      (x_atom_to_symbol): Remove mapping to QCUT_BUFFERn.
      (Fx_get_cut_buffer_internal, Fx_store_cut_buffer_internal)
      (Fx_rotate_cut_buffers_internal): Remove.
      (syms_of_xselect): Remove defsubr of above.
      Remove intern of QCUT_BUFFERn.
      
      * src/xterm.c (x_term_init): Don't set dpyinfo->cut_buffers_initialized.
      
      * src/xterm.h (struct dpyinfo): Remove cut_buffers_initialized.
      6d7cc563
  13. 18 Aug, 2010 2 commits
  14. 14 Aug, 2010 1 commit
    • Eli Zaretskii's avatar
      Fix cursor drawing on stretch glyphs in R2L lines. · b236615c
      Eli Zaretskii authored
       xterm.c (x_draw_stretch_glyph_string):
       w32term.c (x_draw_stretch_glyph_string): In R2L rows, display the
       cursor on the right edge of the stretch glyph.
       xdisp.c (window_box_right_offset, window_box_right): Fix commentary.
      b236615c
  15. 11 Aug, 2010 1 commit
    • Jan D's avatar
      Fix -Wwrite_strings in general and for Gtk+ specific code. · 42ca4633
      Jan D authored
      * callproc.c (synch_process_death): Make const.
      (Fcall_process): Make signame const.
      
      * emacs.c (main): Pass char[] to putenv instead of literal.
      
      * floatfns.c (matherr): Use a const char* variable for x->name.
      
      * font.c (font_open_by_name): Make name const.
      
      * font.h (font_open_by_name): Make name const.
      
      * gtkutil.c (get_utf8_string): Always return an allocated string.
      Parameter is const.
      (create_dialog, xg_create_one_menuitem, create_menus)
      (xg_item_label_same_p, xg_update_menu_item): Free result from
      get_utf8_string.
      (xg_separator_p, xg_item_label_same_p): label is const.
      
      * gtkutil.h: Replace widget_value with struct _widget_value.
      (enum button_type, struct _widget_value): Remove and use the one from
      keyboard.h.
      
      * keyboard.h (_widget_value): Add defined USE_GTK.  Replace Boolean
      with unsigned char and XtPointer with void *.
      
      * menu.c (Fx_popup_menu): error_name is const.
      
      * menu.h (w32_menu_show, ns_menu_show, xmenu_show): error parameter
      is const char **.
      
      * w32menu.c (w32_menu_show):
      * nsmenu.m (ns_menu_show): error parameter is const char **.
      
      * process.h (synch_process_death): Is const char*.
      
      * xmenu.c (Fx_popup_dialog): error_name is const char*.
      (xmenu_show): error parameter is const char **. pane_string is const
      char *.
      (button_names): Is const char *.
      (xdialog_show): error_name and pane_string is const.
      
      * xrdb.c (get_system_app): Make path const and use char *p for non-const
      char.
      
      * xselect.c (Fx_get_atom_name): Use char empty[] instead of literal "".
      
      * xsmfns.c (NOSPLASH_OPT): Change to char[].
      (smc_save_yourself_CB): Do xstrdup on all ->type and ->name for
      props.  Free them at the end.
      
      * xterm.c (emacs_class): New char[] for EMACS_CLASS.
      (xim_open_dpy, xim_initialize, xim_close_dpy): Use emacs_class.
      (x_term_init): Use char[] display_opt and name_opt instead of
      string literal. file is const char*.
      42ca4633
  16. 08 Aug, 2010 1 commit
    • Dan Nicolaescu's avatar
      Use const char* instead of char*. · 675e2c69
      Dan Nicolaescu authored
      * src/xterm.c (x_create_toolkit_scroll_bar):
      * src/xfont.c (xfont_list_pattern):
      * src/xfns.c (x_default_scroll_bar_color_parameter)
      (xic_create_fontsetname, x_default_font_parameter)
      (x_screen_planes):
      * src/xdisp.c (c_string_pos, number_of_chars, reseat_to_string)
      (store_mode_line_string, decode_mode_spec, display_string):
      * src/menu.c (digest_single_submenu):
      * src/keymap.h (initial_define_key, initial_define_lispy_key):
      * src/keymap.c (initial_define_key, initial_define_lispy_key):
      * src/image.c (image_error, image_keyword):
      * src/gtkutil.h (xg_create_widget, xg_create_scroll_bar):
      * src/gtkutil.c (xg_create_widget, xg_create_scroll_bar):
      * src/ftfont.c (struct fc_charset_table, ftfont_spec_pattern)
      (ftfont_list, ftfont_match):
      * src/frame.c (frame_parm_table):
      * src/font.h (font_intern_prop, font_parse_xlfd, font_parse_fcname)
      (font_unparse_fcname, font_unparse_fcname, font_open_by_name)
      (font_add_log, font_deferred_log):
      * src/font.c (font_intern_prop, font_parse_xlfd, font_parse_fcname)
      (font_unparse_fcname, font_unparse_fcname, font_open_by_name)
      (font_add_log, font_deferred_log):
      * src/emacs.c (argmatch):
      * src/dispextern.h (struct it):
      * src/coding.c (ENCODE_DESIGNATION):
      * src/charset.c (define_charset_internal): Use const.
      675e2c69
  17. 06 Aug, 2010 1 commit
  18. 05 Aug, 2010 1 commit
    • Dan Nicolaescu's avatar
      Remove extern declarations in .c files, .h files have them. · 04bab72c
      Dan Nicolaescu authored
      * src/data.c:
      * src/dired.c:
      * src/editfns.c:
      * src/filelock.c:
      * src/fns.c:
      * src/font.c:
      * src/fontset.c:
      * src/frame.c:
      * src/fringe.c:
      * src/ftfont.c:
      * src/gtkutil.c:
      * src/indent.c:
      * src/keyboard.c:
      * src/keymap.c:
      * src/lread.c:
      * src/menu.c:
      * src/print.c:
      * src/search.c:
      * src/sound.c:
      * src/window.c:
      * src/xdisp.c:
      * src/xfaces.c:
      * src/xfns.c:
      * src/xfont.c:
      * src/xftfont.c:
      * src/xmenu.c:
      * src/xterm.c: Remove declarations.
      04bab72c
  19. 02 Aug, 2010 1 commit
  20. 01 Aug, 2010 1 commit
    • Jan D's avatar
      Use Gtk+ tooltips by default for Gtk+ Emacs. · aa1859f5
      Jan D authored
      * lisp/cus-start.el (x-gtk-use-system-tooltips): New variable.
      
      * src/gtkutil.c (hierarchy_ch_cb, qttip_cb, xg_prepare_tooltip)
      (xg_show_tooltip, xg_hide_tooltip, xg_free_frame_widgets): New
      functions.
      (xg_create_frame_widgets): Set ttip_* to 0.  Set a dummy tooltip
      text so qttip_cb is called.  Connect query-tooltip to qttip_cb.
      Remove code that is commented out.
      
      * src/gtkutil.h (xg_free_frame_widgets, xg_prepare_tooltip)
      (xg_show_tooltip, xg_hide_tooltip): Declare.
      
      * src/xfns.c (x_gtk_use_system_tooltips): New variable.
      (Fx_show_tip): If USE_GTK and x_gtk_use_system_tooltips, call
      new gtkutil tooltip functions to show the tooltip.
      (Fx_hide_tip): Call xg_hide_tooltip.
      (syms_of_xfns): Defvar x-gtk-use-system-tooltips.
      
      * src/xterm.c (x_clear_frame): Check FRAME_GTK_WIDGET (f) before
      calling gtk_widget_queue_draw.
      (x_free_frame_resources): Call xg_free_frame_widgets.
      
      * src/xterm.h (struct x_output): Add ttip_widget, ttip_window and
      ttip_lbl.
      aa1859f5
  21. 29 Jul, 2010 2 commits
    • Jan Djärv's avatar
      Add ability to put Gtk+ tool bar on the left/right/bottom or top. Default top. · bfeabdc3
      Jan Djärv authored
      * lisp/menu-bar.el (menu-bar-showhide-tool-bar-menu-customize-enable-left)
      (menu-bar-showhide-tool-bar-menu-customize-disable)
      (menu-bar-showhide-tool-bar-menu-customize-enable-right)
      (menu-bar-showhide-tool-bar-menu-customize-enable-top)
      (menu-bar-showhide-tool-bar-menu-customize-enable-bottom): New functions
      (menu-bar-showhide-tool-bar-menu): If tool bar is moveable,
      make a menu for Options => toolbar that can move it.
      
      * src/frame.c (Qtool_bar_position): New variable.
      (make_frame): Set tool_bar_position to Qtop.
      (frame_parms): Add tool-bar-position.
      (x_report_frame_params): Store tool_bar_position.
      (x_set_fringe_width): Reset wm size hint after fringe changes.
      
      * src/frame.h (struct frame): Add tool_bar_position.
      (Qbottom): Declare.
      
      * src/gtkutil.c (FRAME_TOTAL_PIXEL_WIDTH): New macro.
      (xg_frame_set_char_size): Add FRAME_TOOLBAR_WIDTH to pixelwidth.
      (xg_height_or_width_changed): Use FRAME_TOTAL_PIXEL_WIDTH.
      (xg_create_frame_widgets): Create a hobox for placing widgets
      vertically.  Use gtk_box_pack_start.
      (xg_height_or_width_changed): Renamed from xg_height_changed.
      (x_wm_set_size_hint): Add FRAME_TOOLBAR_WIDTH to base_width.
      (xg_update_frame_menubar, free_frame_menubar): Change to
      xg_height_or_width_changed.
      (xg_tool_bar_detach_callback): Update left/right/top/bottom tool bar
      size correctly.  Remove hardcoded 4, instead use handlebox size -
      toolbar size.
      (xg_tool_bar_attach_callback): Update left/right/top/bottom tool bar
      size correctly.  Use handlebox size + toolbar size as additional
      size.
      (xg_pack_tool_bar): POS is a new parameter.
      Set orientation of tool bar based on pos.
      Only make handlebox_widget if NULL.
      Check if tool bar goes to vbox or hbox depending on pos.
      (xg_update_tool_bar_sizes): New function.
      (update_frame_tool_bar): Remove old_req, new_req. Do not get tool bar
      height, call xg_update_tool_bar_sizes instead.
      (free_frame_tool_bar): Remove from hbox or vbox depending on
      toolbar_in_hbox,  Set all FRAME_TOOLBAR_*_(WIDTH|HEIGHT) to zero.
      (xg_change_toolbar_position): New function.
      
      * src/gtkutil.h (xg_change_toolbar_position): Declare.
      
      * src/window.c (calc_absolute_offset): Check for FRAME_TOOLBAR_TOP_HEIGHT
      and FRAME_TOOLBAR_LEFT_WIDTH.
      
      * src/xfns.c (x_set_tool_bar_position): New function.
      (xic_set_statusarea): Use FRAME_TOOLBAR_TOP_HEIGHT.
      (x_frame_parm_handlers): Add x_set_tool_bar_position.
      (syms_of_xfns): if USE_GTK, provide move-toolbar.
      
      * src/xterm.c (x_set_window_size_1): Add FRAME_TOOLBAR_WIDTH to pixelwidth.
      
      * src/xterm.h (struct x_output): Add toolbar_top_height,
      toolbar_bottom_height, toolbar_left_width, toolbar_right_width.  Remove
      toolbar_height.
      if USE_GTK: Add hbox_widget and toolbar_in_hbox.
      (FRAME_TOOLBAR_TOP_HEIGHT, FRAME_TOOLBAR_BOTTOM_HEIGHT)
      (FRAME_TOOLBAR_LEFT_WIDTH, FRAME_TOOLBAR_RIGHT_WIDTH): New macros.
      (FRAME_TOOLBAR_HEIGHT): Is now TOP_HEIGHT + BOTTOM_HEIGHT.
      bfeabdc3
    • Dan Nicolaescu's avatar
      Remove extern declarations from .c files, and them to .h files. · e6cba650
      Dan Nicolaescu authored
      * src/xsmfns.c (Vuser_login_name):
      * src/xrdb.c (Vdouble_click_time):
      * src/xfaces.c (xic_create_fontsetname):
      * src/w32select.c (waiting_for_input):
      * src/print.c (minibuffer_auto_raise):
      * src/msdos.c (Qhelp_echo):
      * src/macros.c (real_this_command):
      * src/keymap.c (Voverriding_local_map):
      * src/xterm.c (poll_for_input_1, gray_bitmap_width)
      (gray_bitmap_height, gray_bitmap_bits;
      * src/xmenu.c ( Voverriding_local_map)
      (Voverriding_local_map_menu_flag; Qmenu_item; use_dialog_box)
      (use_file_dialog, Xt_app_con):
      * src/xdisp.c (minibuffer_auto_raise, Voverriding_local_map)
      (Voverriding_local_map_menu_flag, Qmenu_item, Qface, Qinvisible)
      (Qwidth, Qinvisible, Qwindow, Qpriority, Qtool_bar_lines)
      (Qtool_bar_lines, ignore_mouse_drag_p):
      * src/minibuf.c (Voverriding_local_map, Qfield, Qfront_sticky)
      (Qrear_nonsticky, nconc2):
      * src/keyboard.c (current_global_map, minibuf_level, Qmenu_item)
      (Vhistory_length, Vtranslation_table_for_input, Qcomposition)
      (Qdisplay, Qafter_string, Qbefore_string, Qundefined):
      * src/fileio.c (use_dialog_box, use_file_dialog, Vuser_login_name)
      (minibuf_level, minibuffer_auto_raise, lisp_time_argument):
      * src/eval.c (Qinteractive_form, Qrisky_local_variable, Qfunction)
      (gc_in_progress):
      * src/doc.c (Voverriding_local_map, Qremap):
      * src/dired.c (completion_ignore_case, Qcompletion_ignore_case)
      (Vcompletion_regexp_list):
      * src/coding.c (Qmac, Qinsert_file_contents, Qwrite_region)
      (Qcompletion_ignore_case):
      * src/callint.c (Qcursor_in_echo_area, Qfile_directory_p, Qonly)
      (Vhistory_length, Vthis_original_command, real_this_command)
      (Qface, Qminibuffer_prompt, history_delete_duplicates):
      * src/image.c (Qrisky_local_variable):
      * src/fontset.c (QCname):
      * src/fns.c (minibuffer_auto_raise, QCname):
      * src/dispnew.c (char_ins_del_cost):
      * src/composite.c (font_fill_lglyph_metrics):
      * src/cmds.c (Qface, Vtranslation_table_for_input):
      * src/charset.c (map_char_table_for_charset, Qfile_name_handler_alist):
      * src/ccl.c (charset_unicode):
      * src/callproc.c (Vtemporary_file_directory):
      * src/buffer.c (emacs_strerror): Remove extern declarations.
      
      Remove extern declarations from .c files, and them to .h files.
      * src/keyboard.h (Qhelp_echo, waiting_for_input)
      (input_available_clear_time, ignore_mouse_drag_p)
      (Vdouble_click_time, real_this_command, Vthis_original_command):
      * src/keymap.h (Qremap, Qmenu_item, Voverriding_local_map)
      (Voverriding_local_map_menu_flag):
      * src/lisp.h (Qinteractive_form, use_file_dialog)
      (Qcursor_in_echo_area, QCascent, QCmargin, QCrelief, Qcount)
      (Qextension_data, QCconversion, QCcolor_symbols, QCheuristic_mask)
      (QCindex, QCmatrix, QCcolor_adjustment, QCmask)
      (Qrisky_local_variable, map_char_table_for_charset, Vprint_level)
      (Qfunction, debug_on_next_call, Qfield)
      (Vinhibit_field_text_motion, Vuser_login_name, lisp_time_argument)
      (Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string)
      (Qfile_directory_p, Qinsert_file_contents)
      (Qcompletion_ignore_case, Qcompletion_ignore_case)
      (Vcompletion_regexp_list, Vhistory_length, completion_ignore_case)
      (history_delete_duplicates, minibuffer_auto_raise, Qonly)
      (Qfile_name_handler_alist, Qfront_sticky, Qrear_nonsticky)
      (Qminibuffer_prompt)
      (Vtemporary_file_directory,char_ins_del_vector, Qface):
      * src/xterm.h (gray_bitmap_width, gray_bitmap_height)
      (gray_bitmap_bits, xic_create_fontsetname):
      * src/coding.h (Vtranslation_table_for_input): Add extern declarations.
      
      * src/data.c (Qwindow): Make non-static, used from other files too.
      * src/frame.c (validate_x_resource_name): Remove shadow definition for i.
      e6cba650
  22. 27 Jul, 2010 1 commit
    • Dan Nicolaescu's avatar
      Use const, move declarations to header files. · eec47d6b
      Dan Nicolaescu authored
      * src/buffer.c (Fset_buffer_multibyte): Remove local extern declaration.
      
      * src/character.c (strwidth, parse_str_to_multibyte): Add const.
      
      * src/character.h (strwidth, parse_str_to_multibyte): Likewise.
      
      * src/charset.c (add_to_log): Remove declaration.
      
      * src/composite.c (syms_of_composite): Remove local extern declarations.
      
      * src/data.c (Finteractive_form): Use const.
      
      * src/dired.c (scmp): Add const.
      (directory_files_internal): Remove local extern declaration.
      
      * src/dispextern.h (add_to_log): Remove declaration.
      (x_get_arg, x_frame_get_arg, x_frame_get_and_record_arg)
      (x_frame_get_and_record_arg, x_default_parameter): Add const.
      
      * src/dispnew.c: Remove duplicate #include <unistd.h>.
      (update_window, update_frame_1, init_display): Remove local extern
      declarations.
      
      * src/editfns.c (region_limit, syms_of_editfns): Remove local extern
      declarations.
      
      * src/emacs.c (main): Remove local extern declaration.
      
      * src/font.c (Qnormal, QCtype, QCfamily, QCweight, QCslant, QCwidth)
      (QCheight, QCsize, QCname): Remove declarations.
      
      * src/frame.c (x_get_resource_string, x_get_string_resource)
      (x_get_arg, x_frame_get_arg, x_frame_get_and_record_arg)
      (x_default_parameter): Use const.
      
      * src/image.c (QCwidth, QCheight, QCforeground, QCbackground, QCfile)
      (QCdata, QCtype, Qcenter): Remove declarations.
      
      * src/keyboard.h (do_mouse_tracking): Add declaration.
      
      * src/minibuf.c (Qmouse_face): Remove declaration.
      
      * src/msdos.c (IT_note_mouse_highlight): Remove local extern declaration.
      
      * src/xdisp.c (do_mouse_tracking): Remove declaration.
      (add_to_log): Use const.
      
      * src/xfaces.c (Qmouse_face): Remove declaration.
      (face_color_gray_p, tty_defined_color, defined_color)
      (face_color_gray_p, face_color_supported_p). Add const.
      
      * src/xfns.c: Include xlwmenu.h when USE_LUCID.
      (x_defined_color, xic_set_xfontset): Use const.
      (Fx_hide_tip): Remove local extern declaration.
      
      * src/xselect.c (selection_data_to_lisp_data)
      (x_property_data_to_lisp):
      * src/xrdb.c (x_get_string_resource, file_p)
      (x_get_customization_string, magic_file_p, search_magic_path)
      (get_system_app, get_user_app, x_load_resources, x_get_resource)
      (x_get_string_resource): Use const.
      
      * src/xterm.c (xlwmenu_window_p, xlwmenu_redisplay): Remove declarations.
      (x_text_icon, x_check_errors, x_connection_closed): Use const.
      
      * src/xterm.h (x_get_customization_string, x_load_resources)
      (x_get_resource, x_text_icon, x_text_icon, x_check_errors)
      (x_check_errors, x_property_data_to_lisp, defined_color)
      (xic_set_xfontset, x_defined_color): Use const.
      eec47d6b
  23. 15 Jul, 2010 1 commit
  24. 14 Jul, 2010 3 commits
    • Jan D's avatar
      Fix frame size when scroll bar width not an integral of column width. · 6b2c4bd9
      Jan D authored
      xterm.c (x_set_window_size_1): scroll_bar_actual_width is always
      SCROLL_BAR_COLS * COLUMN_WIDTH for the purpose of frame sizing.
      6b2c4bd9
    • Jan D's avatar
      Fix menu bar activation with click for Motif/Lesstif. · cf28cebc
      Jan D authored
      * src/xdisp.c (pending_menu_activation): Remove extern declaration.
      (prepare_menu_bars): Remove setting of pending_menu_activation.
      
      * src/xmenu.c (pending_menu_activation): Remove.
      (x_activate_menubar): Set popup_activated_flag for Xt also. Remove
      setting of pending_menu_activation.
      (set_frame_menubar): Remove check of pending_menu_activation.
      Declare menubar_size before code.  Correct spelling in comment.
      
      * src/xterm.c (xm_scroll_callback, x_process_timeouts): K&R => prototype.
      (SET_SAVED_KEY_EVENT): Remove (not used).
      (SET_SAVED_MENU_EVENT): Rename to SET_SAVED_BUTTON_EVENT and
      remove size parameter.
      (handle_one_xevent): Check popup_activated () for menu for Xt also.
      Remove #ifdef USE_GTK around finish = X_EVENT_DROP.
      Remove #ifdef USE_MOTIF code that did SET_SAVED_BUTTON_EVENT for
      ButtonRelease.
      cf28cebc
    • Jan D's avatar
      Fix menus as per bug 6499 and 6608. · b78f9767
      Jan D authored
      * gtkutil.c (xg_event_is_for_menubar): New function (Bug#6499).
      
      * gtkutil.h (xg_event_is_for_menubar): Declare.
      
      * xfns.c (x_menubar_window_to_frame): Take XEvent as second parameter
      instead of Window.  Call xg_event_is_for_menubar when
      USE_GTK (Bug#6499).
      
      * xmenu.c (x_activate_menubar): Revert previous fix for Bug#6499,
      i.e. don't put back ButtonRelease (Bug#6608).
      
      * xterm.c (handle_one_xevent): Pass event to x_menubar_window_to_frame.
      
      * xterm.h (x_menubar_window_to_frame): Second parameter is XEvent*.
      b78f9767
  25. 13 Jul, 2010 1 commit
    • Dan Nicolaescu's avatar
      Convert maybe_fatal to standard C. · b3ffc17c
      Dan Nicolaescu authored
      * src/lisp.h (verror): Declare.
      * src/eval.c (verror): New function containing the code from ...
      (error): ... this.  Call verror.
      * src/term.c (vfatal): New function containing the code from ...
      (fatal): ... this.  Call vfatal.
      (maybe_fatal): Convert to standard C, use variable number of
      arguments.  Declare as non-return.
      (init_tty): Fix maybe_fatal call.
      b3ffc17c
  26. 12 Jul, 2010 3 commits
    • Dan Nicolaescu's avatar
      Convert function definitions to standard C. · 0521f580
      Dan Nicolaescu authored
      * src/xterm.c (x_scroll_bar_set_handle, x_scroll_bar_expose)
      (_scroll_bar_note_movement): Convert definitions to standard C.
      * src/xmenu.c (menu_help_callback, pop_down_menu, xmenu_show):
      * src/xfns.c (hack_wm_protocols, x_window, x_window): Likewise.
      0521f580
    • Dan Nicolaescu's avatar
      Convert function definitions to standard C. · ebd15611
      Dan Nicolaescu authored
      * src/xterm.c (x_frame_of_widget, x_alloc_nearest_color_for_widget)
      (x_alloc_lighter_color_for_widget, cvt_string_to_pixel)
      (cvt_pixel_dtor, x_window_to_menu_bar, xt_action_hook)
      (xaw_jump_callback, xaw_scroll_callback)
      (x_create_toolkit_scroll_bar, x_set_toolkit_scroll_bar_thumb)
      (x_wm_set_size_hint, x_activate_timeout_atimer): Convert
      definitions to standard C.
      * src/xmenu.c (menubar_id_to_frame, popup_get_selection)
      (popup_activate_callback, popup_deactivate_callback)
      (menu_highlight_callback, menubar_selection_callback)
      (apply_systemfont_to_dialog, apply_systemfont_to_menu)
      (free_frame_menubar, popup_selection_callback, as)
      (create_and_show_popup_menu, dialog_selection_callback)
      (create_and_show_dialog):
      * src/xfns.c (hack_wm_protocols, x_window):
      * src/xfaces.c (x_update_menu_appearance):
      * src/widget.c (get_default_char_pixel_size, pixel_to_char_size)
      (char_to_pixel_size, round_size_to_char, get_wm_shell)
      (set_frame_size, update_wm_hints, setup_frame_gcs)
      (update_various_frame_slots, update_from_various_frame_slots)
      (EmacsFrameInitialize, EmacsFrameRealize, EmacsFrameResize)
      (EmacsFrameSetValues, EmacsFrameQueryGeometry)
      (EmacsFrameSetCharSize, widget_store_internal_border): Likewise.
      ebd15611
    • Andreas Schwab's avatar
      Convert old-style definitions · d5a3eaaf
      Andreas Schwab authored
      * editfns.c (transpose_markers): Convert old-style definition.
      * emacs.c (abort, shut_down_emacs, fixup_locale)
      (synchronize_system_time_locale)
      (synchronize_system_messages_locale, syms_of_emacs): Likewise.
      * floatfns.c (extract_float, matherr, init_floatfns)
      (syms_of_floatfns): Likewise.
      * fns.c (make_hash_table): Likewise.
      * ftfont.c (ftfont_get_otf, ftfont_otf_features)
      (ftfont_otf_capability, ftfont_get_glyph_id, ftfont_get_metrics)
      (ftfont_drive_otf, ftfont_shape_by_flt, ftfont_shape)
      (ftfont_variation_glyphs): Likewise.
      * gtkutil.c (xg_create_widget, xg_modify_menubar_widgets): Likewise.
      * keymap.c (describe_map_tree, describe_map, describe_vector): Likewise.
      * lread.c (read_filtered_event): Likewise.
      * minibuf.c (read_minibuf_noninteractive, read_minibuf): Likewise.
      * process.c (wait_reading_process_output): Likewise.
      * scroll.c (do_line_insertion_deletion_costs): Likewise.
      * search.c (search_buffer, boyer_moore): Likewise.
      * syntax.c (scan_sexps_forward): Likewise.
      * xdisp.c (try_scrolling): Likewise.
      * xfaces.c (face_at_buffer_position, face_for_overlay_string)
      (face_at_string_position): Likewise.
      * xfns.c (x_default_scroll_bar_color_parameter): Likewise.
      * xselect.c (x_get_window_property, receive_incremental_selection)
      (x_get_window_property_as_lisp_data, lisp_data_to_selection_data):
      Likewise.
      * xterm.c (x_draw_relief_rect, x_draw_box_rect): Likewise.
      d5a3eaaf
  27. 07 Jul, 2010 2 commits
    • Andreas Schwab's avatar
      Replace bcopy, bzero, bcmp by memcpy, memmove, memset, memcmp · 72af86bd
      Andreas Schwab authored
      * alloc.c (overrun_check_malloc, overrun_check_realloc)
      (overrun_check_free, xstrdup, allocate_string)
      (allocate_string_data, compact_small_strings, Fmake_string)
      (make_unibyte_string, make_multibyte_string)
      (make_string_from_bytes, make_specified_string, make_float)
      (Fcons, allocate_terminal, allocate_frame, make_pure_string)
      (Fgarbage_collect): Replace bcopy, safe_bcopy, bzero, bcmp by
      memcpy, memmove, memset, memcmp.
      * atimer.c (start_atimer, set_alarm): Likewise.
      * buffer.c (clone_per_buffer_values, report_overlay_modification)
      (mmap_realloc, init_buffer_once): Likewise.
      * callint.c (Fcall_interactively): Likewise.
      * callproc.c (Fcall_process, Fcall_process_region, child_setup)
      (getenv_internal_1): Likewise.
      * casefiddle.c (casify_object): Likewise.
      * ccl.c (ccl_driver): Likewise.
      * character.c (str_as_multibyte, str_to_multibyte): Likewise.
      * charset.c (load_charset_map_from_file)
      (load_charset_map_from_file, load_charset_map_from_vector)
      (Fdefine_charset_internal): Likewise.
      * cm.c (Wcm_clear): Likewise.
      * coding.c (decode_eol, decode_coding_object)
      (Fset_coding_system_priority, make_subsidiaries): Likewise.
      * data.c (Faset): Likewise.
      * dired.c (directory_files_internal, file_name_completion_stat):
      Likewise.
      * dispnew.c (new_glyph_matrix, adjust_glyph_matrix)
      (clear_glyph_row, copy_row_except_pointers)
      (copy_glyph_row_contents, new_glyph_pool, realloc_glyph_pool)
      (save_current_matrix, restore_current_matrix)
      (build_frame_matrix_from_leaf_window, mirrored_line_dance)
      (mirror_line_dance, scrolling_window): Likewise.
      * doc.c (Fsnarf_documentation, Fsubstitute_command_keys):
      Likewise.
      * doprnt.c (doprnt): Likewise.
      * editfns.c (Fuser_full_name, make_buffer_string_both)
      (Fmessage_box, Fformat, Ftranspose_regions): Likewise.
      * emacs.c (sort_args): Likewise.
      * eval.c (Fapply, Ffuncall): Likewise.
      * fileio.c (Ffile_name_directory, make_temp_name)
      (Fexpand_file_name, search_embedded_absfilename)
      (Fsubstitute_in_file_name, Ffile_symlink_p, Finsert_file_contents)
      (auto_save_error): Likewise.
      * fns.c (Fstring_equal, Fcopy_sequence, concat)
      (string_to_multibyte, Fstring_as_unibyte, Fstring_as_multibyte)
      (internal_equal, Fclear_string, larger_vector, copy_hash_table)
      (Fmake_hash_table): Likewise.
      * fringe.c (Fdefine_fringe_bitmap): Likewise.
      * ftfont.c (ftfont_text_extents): Likewise.
      * getloadavg.c (getloadavg): Likewise.
      * image.c (define_image_type, make_image, make_image_cache)
      (x_create_x_image_and_pixmap, xbm_image_p)
      (w32_create_pixmap_from_bitmap_data, xbm_load, xpm_lookup_color)
      (xpm_image_p, x_create_bitmap_from_xpm_data, xpm_load)
      (init_color_table, x_build_heuristic_mask, pbm_image_p, pbm_load)
      (png_image_p, png_read_from_memory, png_load, jpeg_image_p)
      (tiff_image_p, tiff_read_from_memory, gif_image_p)
      (gif_read_from_memory, gif_load, svg_image_p, gs_image_p):
      Likewise.
      * indent.c (scan_for_column, compute_motion): Likewise.
      * insdel.c (gap_left, gap_right, make_gap_smaller, copy_text)
      (insert_1_both, insert_from_gap, replace_range_2): Likewise.
      * intervals.c (reproduce_tree, reproduce_tree_obj): Likewise.
      * keyboard.c (echo_char, save_getcjmp, restore_getcjmp)
      (kbd_buffer_store_event_hold, apply_modifiers_uncached)
      (store_user_signal_events, menu_bar_items, tool_bar_items)
      (process_tool_bar_item, append_tool_bar_item)
      (read_char_minibuf_menu_prompt, read_key_sequence)
      (Fread_key_sequence, Fread_key_sequence_vector, Frecent_keys):
      Likewise.
      * keymap.c (current_minor_maps, Fdescribe_buffer_bindings):
      Likewise.
      * lisp.h (STRING_COPYIN): Likewise.
      * lread.c (Fload, read1, oblookup): Likewise.
      * msdos.c (Frecent_doskeys): Likewise.
      * nsfns.m (Fx_create_frame): Likewise.
      * nsfont.m (nsfont_open, nsfont_text_extents, ns_glyph_metrics):
      Likewise.
      * nsimage.m (EmacsImage-initFromSkipXBM:width:height:)
      (EmacsImage-initForXPMWithDepth:width:height:flip:length:):
      Likewise.
      * nsmenu.m (ns_update_menubar): Likewise.
      * nsterm.m (ns_draw_fringe_bitmap, ns_term_init): Likewise.
      * print.c (print_unwind, printchar, strout, print_string)
      (print_error_message): Likewise.
      * process.c (conv_lisp_to_sockaddr, set_socket_option)
      (Fmake_network_process, Fnetwork_interface_list)
      (Fnetwork_interface_info, read_process_output, Fprocess_send_eof)
      (init_process): Likewise.
      * ralloc.c (resize_bloc, r_alloc_sbrk, r_alloc_init): Likewise.
      * regex.c (init_syntax_once, regex_compile, re_compile_fastmap):
      Likewise.
      * scroll.c (do_scrolling, do_direct_scrolling)
      (scrolling_max_lines_saved): Likewise.
      * search.c (search_buffer, wordify, Freplace_match): Likewise.
      * sound.c (wav_init, au_init, Fplay_sound_internal): Likewise.
      * syntax.c (skip_chars, skip_syntaxes): Likewise.
      * sysdep.c (child_setup_tty, sys_subshell, emacs_get_tty)
      (emacs_set_tty): Likewise.
      * term.c (encode_terminal_code, calculate_costs)
      (produce_special_glyphs, create_tty_output, init_tty, delete_tty):
      Likewise.
      * termcap.c (tgetst1, gobble_line): Likewise.
      * termhooks.h (EVENT_INIT): Likewise.
      * tparam.c (tparam1): Likewise.
      * unexalpha.c (unexec): Likewise.
      * unexec.c (write_segment): Likewise.
      * unexmacosx.c (unexec_write_zero): Likewise.
      * w32fns.c (w32_wnd_proc, Fx_create_frame, x_create_tip_frame)
      (Fx_file_dialog, Fsystem_move_file_to_trash): Likewise.
      * w32font.c (w32font_list_family, w32font_text_extents)
      (w32font_list_internal, w32font_match_internal)
      (w32font_open_internal, compute_metrics, Fx_select_font):
      Likewise.
      * w32menu.c (set_frame_menubar, add_menu_item)
      (w32_menu_display_help, w32_free_submenu_strings): Likewise.
      * w32term.c (XCreateGC, w32_initialize_display_info): Likewise.
      * w32uniscribe.c (uniscribe_list_family): Likewise.
      * w32xfns.c (get_next_msg, post_msg, prepend_msg): Likewise.
      * window.c (make_window, replace_window, set_window_buffer)
      (Fsplit_window): Likewise.
      * xdisp.c (init_iterator, RECORD_OVERLAY_STRING, reseat_to_string)
      (add_to_log, message3, x_consider_frame_title)
      (append_space_for_newline, extend_face_to_end_of_line)
      (decode_mode_spec_coding, init_glyph_string): Likewise.
      * xfaces.c (x_create_gc, get_lface_attributes_no_remap)
      (Finternal_copy_lisp_face, Finternal_merge_in_global_face)
      (face_attr_equal_p, make_realized_face, make_face_cache)
      (free_realized_faces, lookup_named_face, smaller_face)
      (face_with_height, lookup_derived_face)
      (x_supports_face_attributes_p, Finternal_set_font_selection_order)
      (Finternal_set_font_selection_order, realize_default_face)
      (compute_char_face, face_at_buffer_position)
      (face_for_overlay_string, face_at_string_position, merge_faces):
      Likewise.
      * xfns.c (xic_create_fontsetname, Fx_create_frame)
      (Fx_window_property, x_create_tip_frame)
      (Fx_backspace_delete_keys_p): Likewise.
      * xfont.c (xfont_list, xfont_match, xfont_list_family)
      (xfont_text_extents): Likewise.
      * xmenu.c (set_frame_menubar, xmenu_show): Likewise.
      * xrdb.c (magic_file_p, x_get_resource): Likewise.
      * xselect.c (x_queue_event, x_get_window_property)
      (receive_incremental_selection): Likewise.
      * xsmfns.c (x_session_check_input): Likewise.
      * xterm.c (x_send_scroll_bar_event, SET_SAVED_MENU_EVENT)
      (handle_one_xevent, x_check_errors, xim_initialize, x_term_init):
      Likewise.
      * character.h (BCOPY_SHORT): Removed.
      * config.in: Regenerate.
      * dispnew.c (safe_bcopy): Only define as dummy if PROFILING.
      * emacs.c (main) [PROFILING]: Don't declare
      dump_opcode_frequencies.
      * lisp.h (safe_bcopy): Remove declaration.
      (memset) [!HAVE_MEMSET]: Declare.
      (memcpy) [!HAVE_MEMCPY]: Likewise.
      (memmove) [!HAVE_MEMMOVE]: Likewise.
      (memcmp) [!HAVE_MEMCMP]: Likewise.
      * s/ms-w32.h (bzero, bcopy, bcmp, GAP_USE_BCOPY)
      (BCOPY_UPWARD_SAFE, BCOPY_DOWNWARD_SAFE, HAVE_BCOPY, HAVE_BCMP):
      Don't define.
      (HAVE_MEMCMP, HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET): Define.
      * s/msdos.h (GAP_USE_BCOPY, BCOPY_UPWARD_SAFE)
      (BCOPY_DOWNWARD_SAFE): Don't define.
      * sysdep.c (memset) [!HAVE_MEMSET]: Define.
      (memcpy) [!HAVE_MEMCPY]: Define.
      (memmove) [!HAVE_MEMMOVE]: Define.
      (memcmp) [!HAVE_MEMCMP]: Define.
      
      * config.nt (HAVE_BCOPY, HAVE_BCMP): Remove undefs.
      (HAVE_MEMCPY, HAVE_MEMMOVE, HAVE_MEMSET, HAVE_MEMCMP): Add undefs.
      
      * sed2v2.inp (HAVE_MEMCPY, HAVE_MEMSET): Edit to 1.
      (HAVE_BZERO): Don't edit.
      
      * lwlib.c (lwlib_memset, lwlib_bcopy): Remove.
      (malloc_widget_value, free_widget_info, allocate_widget_instance)
      (lw_separator_p): Replace lwlib_memset, lwlib_bcopy, bzero, bcmp by
      memset, memcpy, memcmp.
      * lwlib-utils.c (XtApplyToWidgets): Likewise.
      * xlwmenu.c (XlwMenuInitialize): Likewise.
      * lwlib.h (lwlib_bcopy): Remove declaration.
      
      * ebrowse.c (add_sym, make_namespace): Replace bcopy, bzero by
      memcpy, memmove, memset.
      * pop.c (pop_retrieve, socket_connection, pop_getline): Likewise.
      
      * CPP-DEFINES (BCOPY_DOWNWARD_SAFE, BCOPY_UPWARD_SAFE)
      (GAP_USE_BCOPY, HAVE_BCMP, HAVE_BCOPY, bcmp, bcopy, bzero):
      Remove.
      
      * configure.in: Don't check for bcopy, bcmp, bzero.  Don't include
      <strings.h> and don't define bcopy, bzero, BCMP in config.h.
      72af86bd
    • Juanma Barranquero's avatar
      ed3751c8
  28. 06 Jul, 2010 1 commit
  29. 05 Jul, 2010 2 commits
    • Jan D's avatar
      Set _NET_WM(_ICON)_NAME as per Extended Window Manager Hints (Bug#6563). · 00be444c
      Jan D authored
      * xterm.h (Xatom_net_wm_name, Xatom_net_wm_icon_name): New.
      
      * xterm.c (x_term_init): Intern the _NET_WM_NAME and
      _NET_WM_ICON_NAME atoms.
      
      * xfns.c (x_set_name_internal): Set the EWMH _NET_WM_NAME
      and _NET_WM_ICON_NAME properties, too, matching what is
      done in the Gtk+ case.
      00be444c
    • YAMAMOTO Mitsuharu's avatar
      Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325). · 5a874e95
      YAMAMOTO Mitsuharu authored
      * dispextern.h (FRINGE_HEIGHT_BITS): New define.
      (struct glyph_row): New members left_fringe_offset and
      right_fringe_offset.
      
      * xterm.c (x_draw_fringe_bitmap): Don't clip bottom aligned bitmap
      specially.
      * w32term.c (w32_draw_fringe_bitmap): Likewise.
      * nsterm.m (ns_draw_fringe_bitmap): Likewise.
      
      * fringe.c (draw_fringe_bitmap_1): Don't clip bitmap here.
      Take account of	bitmap offset.
      (draw_window_fringes): Take account of window vscroll.
      (update_window_fringes): Likewise.  Extend top-aligned top indicator
      or bottom-aligned bottom indicator to adjacent rows if it doesn't fit
      in one row.  Don't set redraw_fringe_bitmaps_p outside row comparison.
      Set left_fringe_offset and right_fringe_offset (Bug#5634, Bug#6325).
      5a874e95