1. 10 Jul, 2011 1 commit
  2. 24 Jun, 2011 1 commit
  3. 12 Jun, 2011 1 commit
  4. 11 Jun, 2011 1 commit
    • Paul Eggert's avatar
      * buffer.c (Qclone_number): Remove for now, as it's unused. · 4475bec4
      Paul Eggert authored
      (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
      (record_buffer): Remove unused local.
      * frame.c (other_visible_frames, frame_buffer_list): Now static.
      (set_frame_buffer_list): Remove; unused.
      * frame.h (other_visible_frames): Remove decl.
      * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
      * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
      (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
      if HAVE_GPM.
      * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
      * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
      Define only if HAVE_GPM.
      * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
      (update_hints_inhibit): Remove; never set.  All uses removed.
      * widgetprv.h (emacsFrameClassRec): Remove decl.
      * window.c (delete_deletable_window): Now returns void, since it
      wasn't returning anything.
      (compare_window_configurations): Remove unused locals.
      * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
      * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
      Omit no-longer-needed #ifdef USE_X_TOOLKIT, since USE_X_TOOLKIT is
      implied by USE_GTK || USE_MOTIF.
      (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
      the same widths as pointers.  This follows up on the 2011-05-06 patch.
      * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
      * xterm.h: Likewise.
      (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
      4475bec4
  5. 09 Jun, 2011 1 commit
  6. 12 May, 2011 3 commits
    • Paul Eggert's avatar
      Be more systematic about user-interface timestamps. · 08dc5ae6
      Paul Eggert authored
      Before, the code sometimes used 'Time', sometimes 'unsigned long',
      and sometimes 'EMACS_UINT', to represent these timestamps.  This
      change causes it to use 'Time' uniformly, as that's what X uses.
      This makes the code easier to follow, and makes it easier to catch
      integer overflow bugs such as Bug#8664.
      * frame.c (Fmouse_position, Fmouse_pixel_position):
      Use Time, not unsigned long, for user-interface timestamps.
      * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
      (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
      * keyboard.h (last_event_timestamp): Likewise.
      * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
      * menu.h (xmenu_show): Likewise.
      * term.c (term_mouse_position): Likewise.
      * termhooks.h (struct input_event.timestamp): Likewise.
      (struct terminal.mouse_position_hook): Likewise.
      * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
      * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
      * systime.h (Time): New decl.  Pull it in from <X11/X.h> if
      HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
      what it was before.
      * menu.h, termhooks.h: Include "systime.h", for Time.
      08dc5ae6
    • Paul Eggert's avatar
      * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes · 3e26f69c
      Paul Eggert authored
      that always fit in int.  Use a sentinel instead of a counter, to
      avoid a temp and to allay GCC's concerns about possible int overflow.
      3e26f69c
    • Paul Eggert's avatar
  7. 09 May, 2011 2 commits
    • Andreas Schwab's avatar
      25fb3d74
    • Eli Zaretskii's avatar
      Backport revisions... · 14fe7b53
      Eli Zaretskii authored
      Backport revisions 2011-04-24T05:30:24Z!eggert@cs.ucla.edu..2011-04-25T19:40:22Z!eggert@cs.ucla.edu (inclusive) from trunk (bug#8623)
      
      	The next log entry shows the actual changes by Paul Eggert.
      
       Fix a problem with aliasing and vector headers.
       GCC 4.6.0 optimizes based on type-based alias analysis.  For
       example, if b is of type struct buffer * and v of type struct
       Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
       != &v->size, and therefore "v->size = 1; b->size = 2; return
       v->size;" must therefore return 1.  This assumption is incorrect
       for Emacs, since it type-puns struct Lisp_Vector * with many other
       types.  To fix this problem, this patch adds a new type struct
       vector_header that documents the constraints on layout of vectors
       and pseudovectors, and helps optimizing compilers not get fooled
       by Emacs's type punning.  It also adds the macros XSETTYPED_PVECTYPE
       XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
       src/lisp.h (XVECTOR_SIZE): New convenience macro.  All previous uses of
       XVECTOR (foo)->size replaced to use this macro, to avoid the hassle
       of writing XVECTOR (foo)->header.size.
       src/lisp.h: Say "vectorlike header" rather than "vector header.
       (struct vectorlike_header): Rename from struct vector_header.
       (XVECTORLIKE_HEADER_SIZE): Renamed from XVECTOR_HEADER_SIZE.
       All uses changed.
       (XVECTOR_HEADER_SIZE): New macro, for use in XSETPSEUDOVECTOR.
       (XSETTYPED_PVECTYPE): New macro, specifying the name of the size
       member.
       (XSETPVECTYPE): Rewrite in terms of new macro.
       (XSETPVECTYPESIZE): New macro, specifying both type and size.
       This is a bit clearer, and further avoids the possibility of
       undesirable aliasing.
       (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
       (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR
       and XVECTOR_HEADER_SIZE.
       (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
       since Lisp_Subr is a special case (no "next" field).
       (ASIZE): Rewrite in terms of XVECTOR_SIZE.
       (struct vector_header): New type.
       (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
       object, to help avoid aliasing.
       (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
       (SUBRP): Likewise, since Lisp_Subr is a special case.
       src/lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
       (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
       (struct Lisp_Hash_Table): Combine first two members into a single
       struct vector_header member.  All uses of "size" and "next" members
       changed to be "header.size" and "header.next".
       src/buffer.h (struct buffer): Likewise.
       src/font.h (struct font_spec, struct font_entity, struct font): Likewise.
       src/frame.h (struct frame): Likewise.
       src/process.h (struct Lisp_Process): Likewise.
       src/termhooks.h (struct terminal): Likewise.
       src/window.c (struct save_window_data, struct saved_window): Likewise.
       src/window.h (struct window): Likewise.
       src/alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
       Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
       src/buffer.c (init_buffer_once): Likewise.
       src/lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
       special case.
       src/process.c (Fformat_network_address): Use local var for size,
       for brevity.
       src/fns.c (vector): Remove; this old hack is no longer needed.
       src/bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
      14fe7b53
  8. 03 May, 2011 1 commit
  9. 29 Apr, 2011 2 commits
    • Paul Eggert's avatar
      * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t. · d01a7826
      Paul Eggert authored
      (EMACS_UINTPTR): Likewise, with uintptr_t.
      d01a7826
    • Paul Eggert's avatar
      Prefer intptr_t/uintptr_t for integers the same widths as pointers. · 8ac068ac
      Paul Eggert authored
      This removes an assumption that EMACS_INT and long are the same
      width as pointers.  The assumption is true for Emacs porting targets
      now, but we want to make other targets possible.
      * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
      (EMACS_INTPTR, EMACS_UINTPTR): New macros.
      In the rest of the code, change types of integers that hold casted
      pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
      replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
      (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
      (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
      No need to cast type when ORing.
      (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
      * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
      * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
      assume EMACS_INT is the same width as char *.
      * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
      (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
      Remove no-longer-needed casts.
      (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
      (xg_tool_bar_help_callback, xg_make_tool_item):
      Use EMACS_INTPTR to hold an integer
      that will be cast to void *; this can avoid a GCC warning
      if EMACS_INT is not the same width as void *.
      * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
      * xdisp.c (display_echo_area_1, resize_mini_window_1):
      (current_message_1, set_message_1):
      Use a local to convert to proper width without a cast.
      * xmenu.c (dialog_selection_callback): Likewise.
      8ac068ac
  10. 25 Apr, 2011 2 commits
    • Paul Eggert's avatar
      * lisp.h: (XVECTOR_SIZE): Remove. All uses replaced with ASIZE. · 77b37c05
      Paul Eggert authored
      (ASIZE): Now contains previous implementation of XVECTOR_SIZE
      instead of invoking XVECTOR_SIZE.
      77b37c05
    • Paul Eggert's avatar
      lisp.h: Fix a problem with aliasing and vector headers. · eab3844f
      Paul Eggert authored
      GCC 4.6.0 optimizes based on type-based alias analysis.  For
      example, if b is of type struct buffer * and v of type struct
      Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
      != &v->size, and therefore "v->size = 1; b->size = 2; return
      v->size;" must therefore return 1.  This assumption is incorrect
      for Emacs, since it type-puns struct Lisp_Vector * with many other
      types.  To fix this problem, this patch adds a new type struct
      vector_header that documents the constraints on layout of vectors
      and pseudovectors, and helps optimizing compilers not get fooled
      by Emacs's type punning.  It also adds the macros XSETTYPED_PVECTYPE
      XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
      * lisp.h (XVECTOR_SIZE): New convenience macro.  All previous uses of
      XVECTOR (foo)->size replaced to use this macro, to avoid the hassle
      of writing XVECTOR (foo)->header.size.
      (XVECTOR_HEADER_SIZE): New macro, for use in XSETPSEUDOVECTOR.
      (XSETTYPED_PVECTYPE): New macro, specifying the name of the size
      member.
      (XSETPVECTYPE): Rewrite in terms of new macro.
      (XSETPVECTYPESIZE): New macro, specifying both type and size.
      This is a bit clearer, and further avoids the possibility of
      undesirable aliasing.
      (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
      (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR
      and XVECTOR_HEADER_SIZE.
      (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
      since Lisp_Subr is a special case (no "next" field).
      (ASIZE): Rewrite in terms of XVECTOR_SIZE.
      (struct vector_header): New type.
      (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
      object, to help avoid aliasing.
      (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
      (SUBRP): Likewise, since Lisp_Subr is a special case.
      * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
      (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
      (struct Lisp_Hash_Table): Combine first two members into a single
      struct vector_header member.  All uses of "size" and "next" members
      changed to be "header.size" and "header.next".
      * buffer.h (struct buffer): Likewise.
      * font.h (struct font_spec, struct font_entity, struct font): Likewise.
      * frame.h (struct frame): Likewise.
      * process.h (struct Lisp_Process): Likewise.
      * termhooks.h (struct terminal): Likewise.
      * window.c (struct save_window_data, struct saved_window): Likewise.
      * window.h (struct window): Likewise.
      * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
      Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
      * buffer.c (init_buffer_once): Likewise.
      * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
      special case.
      * process.c (Fformat_network_address): Use local var for size,
      for brevity.
      eab3844f
  11. 16 Apr, 2011 3 commits
  12. 14 Apr, 2011 2 commits
  13. 11 Apr, 2011 2 commits
    • Paul Eggert's avatar
      Declare Lisp_Object Q* variables to be 'static' if not exproted. · 955cbe7b
      Paul Eggert authored
      This makes it easier for human readers (and static analyzers)
      to see whether these variables are used from other modules.
      * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
      * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
      * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
      * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
      * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
      * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
      * xmenu.c, xselect.c:
      Declare Q* vars static if they are not used in other modules.
      * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
      * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
      Remove decls of unexported vars.
      * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
      955cbe7b
    • Paul Eggert's avatar
      Make Emacs functions such as Fatom 'static' by default. · 16a97296
      Paul Eggert authored
      This makes it easier for human readers (and static analyzers)
      to see whether these functions can be called from other modules.
      DEFUN now defines a static function.  To make the function external
      so that it can be used in other C modules, use the new macro DEFUE.
      * lisp.h (DEFINE_FUNC): New macro, with the old contents of DEFUN.
      (DEFUN): Rewrite in terms of DEFINE_FUNC.  It now generates a
      static function definition.  Use DEFUE if you want an extern one.
      (DEFUE, INFUN): New macros.
      (Funibyte_char_to_multibyte, Fsyntax_table_p, Finit_image_library):
      (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
      (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
      (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
      Remove decls, since these functions are now static.
      (Funintern, Fget_internal_run_time): New decls, since these functions
      were already external.
      * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
      * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
      * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
      * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
      * keyboard.c, keymap.c, lread.c:
      * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
      * syntax.c, term.c, terminal.c, textprop.c, undo.c:
      * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
      Mark functions with DEFUE instead of DEFUN,
      if they are used in other modules.
      * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
      decls for now-static functions.
      * buffer.h (Fdelete_overlay): Remove decl.
      * callproc.c (Fgetenv_internal): Mark as internal.
      * composite.c (Fremove_list_of_text_properties): Remove decl.
      (Fcomposition_get_gstring): New forward static decl.
      * composite.h (Fcomposite_get_gstring): Remove decl.
      * dired.c (Ffile_attributes): New forward static decl.
      * doc.c (Fdocumntation_property): New forward static decl.
      * eval.c (Ffetch_bytecode): New forward static decl.
      (Funintern): Remove extern decl; now in .h file where it belongs.
      * fileio.c (Fmake_symbolic_link): New forward static decl.
      * image.c (Finit_image_library): New forward static decl.
      * insdel.c (Fcombine_after_change_execute): Make forward decl static.
      * intervals.h (Fprevious_property_change):
      (Fremove_list_of_text_properties): Remove decls.
      * keyboard.c (Fthis_command_keys): Remove decl.
      (Fcommand_execute): New forward static decl.
      * keymap.c (Flookup_key): New forward static decl.
      (Fcopy_keymap): Now static.
      * keymap.h (Flookup_key): Remove decl.
      * process.c (Fget_process): New forward static decl.
      (Fprocess_datagram_address): Mark as internal.
      * syntax.c (Fsyntax_table_p): New forward static decl.
      (skip_chars): Remove duplicate decl.
      * textprop.c (Fprevious_property_change): New forward static decl.
      * window.c (Fset_window_fringes, Fset_window_scroll_bars):
      Now internal.
      (Fset_window_margins, Fset_window_vscroll): New forward static decls.
      * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
      16a97296
  14. 09 Apr, 2011 1 commit
  15. 08 Apr, 2011 1 commit
    • Chong Yidong's avatar
      Fix more GCC strict-aliasing warnings. · 65969f63
      Chong Yidong authored
      * src/ftfont.c (get_adstyle_property, ftfont_pattern_entity): Use
      unsigned char, to match FcChar8 type definition.
      
      * src/xmenu.c (create_and_show_popup_menu):
      * src/xselect.c (x_decline_selection_request)
      (x_reply_selection_request): Avoid type-punned deref of X events.
      65969f63
  16. 05 Apr, 2011 1 commit
  17. 26 Mar, 2011 1 commit
    • Juanma Barranquero's avatar
      src/*.h: Remove unused parameters and functions. · f868cd8a
      Juanma Barranquero authored
      * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
      
      * keyboard.c (timer_check): Remove parameter `do_it_now',
        unused since 1996-04-12T06:01:29Z!rms@gnu.org.
        (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
        unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
      
      * keyboard.c (read_char):
      * w32menu.c (w32_menu_display_help):
      * xmenu.c (show_help_event, menu_help_callback):
        Adjust calls to `show_help_echo'.
      
      * gtkutil.c (xg_maybe_add_timer):
      * keyboard.c (readable_events):
      * process.c (wait_reading_process_output):
      * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
      
      * insdel.c (adjust_markers_gap_motion):
        Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
        (gap_left, gap_right): Don't call it.
      f868cd8a
  18. 22 Mar, 2011 1 commit
  19. 08 Mar, 2011 1 commit
    • Jan D's avatar
      Updates for compiling with Gtk+ 3.0 (--with-x-toolkit=gtk3). · 0afb4571
      Jan D authored
      * configure.in: Require 3.0 for --with-gtk3.  Add HAVE_GTK3.
      
      * doc/emacs/xresources.texi (GTK resources): ~/.emacs.d/gtkrc does not work
      for Gtk+ 3.
      
      * src/gtkutil.c: Include gtkx.h if HAVE_GTK3.  If ! HAVE_GTK3, define
      gdk_window_get_screen, gdk_window_get_geometry,
      gdk_x11_window_lookup_for_display and GDK_KEY_g.
      (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
      (xg_get_pixbuf_from_pixmap): New function.
      (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
      to Pixmap, take frame as parameter, remove GdkColormap parameter.
      Call xg_get_pixbuf_from_pixmap instead of
      gdk_pixbuf_get_from_drawable.
      (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
      xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
      (xg_check_special_colors): Use GtkStyleContext and its functions
      for HAVE_GTK3.
      (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
      (xg_prepare_tooltip, create_dialog, menubar_map_cb)
      (xg_update_frame_menubar, xg_tool_bar_detach_callback)
      (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes): Call
      gtk_widget_get_preferred_size.
      (xg_frame_resized): gdk_window_get_geometry only takes 5
      parameters.
      (xg_win_to_widget, xg_event_is_for_menubar): Call
      gdk_x11_window_lookup_for_display.
      (xg_set_widget_bg): New function.
      (delete_cb): New function.
      (xg_create_frame_widgets): connect delete-event to delete_cb.
      Call xg_set_widget_bg.  Only set backgrund pixmap for ! HAVE_GTK3
      (xg_set_background_color): Call xg_set_widget_bg.
      (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
      (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
      Only call gtk_range_set_update_policy if ! HAVE_GTK3.
      (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
      if ! HAVE_GTK3.
      (update_frame_tool_bar): Call gtk_widget_hide.
      (xg_initialize): Use GDK_KEY_g.
      
      * src/xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
      
      * src/xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
      if ! HAVE_GTK3
      (x_session_initialize): Call gdk_x11_set_sm_client_id.
      
      * src/xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
      (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
      Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
      
      * src/xterm.h (DEFAULT_GDK_DISPLAY): New define.
      (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
      for ! HAVE_GTK3.
      (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
      0afb4571
  20. 07 Mar, 2011 3 commits
  21. 06 Mar, 2011 2 commits
  22. 14 Feb, 2011 1 commit
    • Jan Djärv's avatar
      Use *font for Xft font names for Lucid menus and dialogs. · 3928f2b6
      Jan Djärv authored
      * doc/emacs/xresources.texi (X Resources): Remove *faceName and replace it with
      *font for Lucid.
      
      * lwlib/lwlib-Xaw.c (make_dialog): Use *font even for Xft fonts.  Try
      XLoadQueryFont first and then Xft fonts.
      
      * lwlib/xlwmenu.c (xlwmenu_default_font): Remove, does not work for
      multi-display.
      (xlwMenuResources): Remove XtNfaceName and XtNdefaultFace.
      Make XtNFont a String resource.
      (make_windows_if_needed): Call XFlush so later changes are seen by the
      X server.
      (remap_menubar): Use XtMoveWidget and then
      XtResizeWidget/XtResizeWindow after XtPopup.  Works better with
      Compiz.
      (make_drawing_gcs): Check if mw->menu.font is set.
      (getDefaultXftFont): New function.
      (openXftFont): faceName is now fontName.  Try XLoadQueryFont first
      and then XftFontOpenName.
      (XlwMenuInitialize): Initialize mw->menu.font with XLoadQueryFont.
      (XlwMenuClassInitialize): Remove initialization of
      xlwmenu_default_font.
      (fontname_changed): Renamed from facename_changed.
      (XlwMenuSetValues): Use facename_changed.
      
      * lwlib/xlwmenu.h: Remove Xt[CN]faceName and Xt[NC]defaultFace.
      
      * lwlib/xlwmenuP.h (_XlwMenu_part): Remove faceName.  Add fontName.
      
      * src/xmenu.c (apply_systemfont_to_dialog): Apply to *dialog.font.
      (apply_systemfont_to_menu): Set resources *menubar*font and
      *popup*font.  Remove defflt.
      (set_frame_menubar, create_and_show_popup_menu): Call
      apply_systemfont_to_menu before lw_create_widget.
      
      * src/xrdb.c (x_load_resources): For LUCID and XFT, don't put a
      resource that specifies helvetica for menus and dialogs.
      3928f2b6
  23. 05 Feb, 2011 1 commit
  24. 26 Jan, 2011 1 commit
  25. 25 Jan, 2011 1 commit
  26. 23 Jan, 2011 1 commit
  27. 02 Jan, 2011 1 commit
  28. 13 Nov, 2010 1 commit