aboutsummaryrefslogtreecommitdiffstats
path: root/lwlib (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year to 2025Paul Eggert2025-01-0114-14/+14
| | | | Run "TZ=UTC0 admin/update-copyright".
* Fix occasional crash in lwlib due to uninitialized dataPip Cet2024-12-092-1/+5
| | | | | | | Crash observed on cfarm's cfarm210 machine, which is a Solaris 10 zone on an M3000 server. * lwlib/xlwmenu.c (XlwMenuInitialize): Initialize menu.font.
* Standardize possessive apostrophe usage in manuals, docs, and commentsStefan Kangas2024-07-251-1/+1
| | | | | See the note in admin/notes/documentation. Ref: https://lists.gnu.org/r/emacs-devel/2012-02/msg00649.html
* Enable compiling Emacs with implicit Make rules suppressedPo Lu2024-06-141-0/+1
| | | | | | | | | | | * lib/Makefile.in (.SUFFIXES): * lwlib/Makefile.in (.SUFFIXES): * oldXMenu/Makefile.in (.SUFFIXES): * src/Makefile.in (.SUFFIXES): Register .c as a default suffix, for this list is emptied when `-r' is provided to Make.
* lwlib: pacify gcc -Wmissing-variable-declarationsPaul Eggert2024-06-032-7/+1
| | | | | | * lwlib/lwlib.c (lwlib_toolkit_type): Remove unused var. * lwlib/xlwmenu.c (submenu_destroyed): Now static. * src/xmenu.c (widget_id_tick): Declare extern, as a FIXME.
* Revert "Add new `swap` macro and use it"Po Lu2024-01-061-2/+12
| | | | | | | typeof is an extension which does not exist in Standard C, so macros using it are unsuitable for inclusion in Emacs. This reverts commit 37889523278fe65733938fb11c3701898309961c.
* Add new `swap` macro and use itStefan Kangas2024-01-061-12/+2
| | | | | | | | | | | | | | | | | | | | | | | A `swap` macro prevents programming errors and is more concise. It is a natural addition to our existing `min` and `max` macros. * src/lisp.h (swap): New macro. * lwlib/xlwmenu.c (draw_shadow_rectangle, draw_shadow_rhombus): * src/androidterm.c (android_get_surrounding_text): * src/buffer.c (Fmake_overlay, modify_overlay, Fmove_overlay): * src/dispnew.c (swap_glyphs_in_rows, reverse_rows): * src/editfns.c (Finsert_buffer_substring) (Fcompare_buffer_substrings): * src/eval.c (run_hook_wrapped_funcall): * src/fns.c (extract_data_from_object): * src/regex-emacs.c (forall_firstchar_1): * src/textconv.c (textconv_query, get_extracted_text) (get_surrounding_text): * src/textprop.c (validate_interval_range) (verify_interval_modification): * src/w32uniscribe.c (OTF_INT16_VAL): * src/xfaces.c (load_face_colors): * src/xterm.c (SWAPCARD32): Prefer using above macro to open-coding.
* ; Add 2024 to copyright yearsPo Lu2024-01-0214-14/+14
|
* Fix dependency bug when building lwlibPaul Eggert2023-01-131-1/+1
| | | | | | | | * lwlib/Makefile.in (DEPFLAGS): Use OBJS to calculate dependency file names, not ALLOBJS. This fixes a typo introduced in 2015-05-15 "Replace AC_SUBST_FILE in configure with include in Makefiles" that caused lwlib/*.o to not be rebuilt sometimes when that was needed.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-0114-14/+14
|
* Fix unlikely core dump with XawPaul Eggert2022-08-251-0/+2
| | | | | * lwlib/lwlib-Xaw.c (make_dialog): Don’t dump core if calloc fails. Caught with --enable-gcc-warnings.
* Fix calculation of default highlightForeground in the lucid menu barPo Lu2022-07-201-36/+61
| | | | | | | | | * lwlib/xlwmenu.c (xlwMenuResources, display_menu_item) (make_drawing_gcs, make_shadow_gcs, openXftFont, XlwMenuRealize) (XlwMenuSetValues): Use -1 as the default for highlight_foreground. Replace that with the normal foreground when creating GCs. Reported by Colin Baxter <m43cap@yandex.com>.
* Colored menu highlight in Lucid backendManuel Giraud2022-07-163-107/+267
| | | | | | | | * lwlib/xlwmenuP.h: * lwlib/xlwmenu.h: * lwlib/xlwmenu.c: Introduce resources to handle colored highlighting of menu entries. * doc/emacs/xresources.texi (Lucid Resources): Documentation.
* ; * lwlib/xlwmenu.c (make_shadow_gcs): Remove "a = a" pattern.Manuel Giraud2022-07-111-4/+0
| | | | | * lwlib/xlwmenu.c (make_shadow_gcs): Remove code that sets a value to itself (bug#56479).
* Fix recent change to xlwmenu.cPo Lu2022-06-211-6/+16
| | | | | | | | | * lwlib/xlwmenu.c (ungrab_all): Ungrab keyboard if it was grabbed. This handles `lucid--menu-grab-keyboard' changing while the menu is open. (XlwMenuDestroy): (pop_up_menu): Record if the keyboard was grabbed.
* ; * lwlib/xlwmenu.c (ungrab_all): Fix typo.Eli Zaretskii2022-06-211-1/+1
|
* Make Lucid menus work from the keyboard also when uninstalledLars Ingebrigtsen2022-06-211-7/+3
| | | | | | * lwlib/xlwmenu.c (ungrab_all, pop_up_menu): Use it. * src/keyboard.c (syms_of_keyboard): New variable (bug#46990).
* * lwlib/lwlib.c (lw_separator_p): Fix empty strings being separators.Po Lu2022-05-061-4/+8
|
* Implement `pre_activate' callbacks for Motif menusPo Lu2022-03-051-2/+19
| | | | | | * lwlib/lwlib-Xm.c (make_menu_in_widget): Add xm_pop_up_callback as the popup callback. (xm_pop_up_callback): New function.
* Fix crashes and other bugs on LessTifPo Lu2022-03-011-0/+2
| | | | | | | * lwlib/lwlib-Xm.c (make_menu_in_widget): XmIsRowColumn is broken on the latest LessTif release, so avoid that here. * src/xfns.c (x_window): Add PropertyChangeMask which LessTif doesn't do itself.
* Fix Motif menu help text in submenusPo Lu2022-03-011-30/+26
| | | | | | | | | * lwlib/lwlib-Xm.c (xm_arm_callback): (make_menu_in_widget): (update_one_menu_entry): (xm_update_one_widget): (do_call): Pass instance to arm callback and use wv as user data instead of call data.
* Don't send help-echo on menu button arming not caused by motion eventsPo Lu2022-02-271-1/+6
| | | | | * lwlib/lwlib-Xm.c (xm_arm_callback): Ignore arming if the arm was not caused by an EnterNotify or MotionNotify event.
* Fix menu bar not opening after popup menu is dismissed on LucidPo Lu2022-02-081-1/+2
| | | | | * lwlib/xlwmenu.c (XlwMenuDestroy): Only set submenu_destroyed if menu bar widget.
* * lwlib/xlwmenu.c (pop_up_menu): Fix cast.Po Lu2022-02-071-1/+1
|
* * lwlib/xlwmenu.c (pop_up_menu): Work around motion problems on XI2.Po Lu2022-02-061-0/+2
|
* Merge from origin/emacs-28Eli Zaretskii2022-01-0114-14/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-0114-14/+14
| |
* | * lwlib/xlwmenu.c (fit_to_screen): Adjust correctly for child menus.Po Lu2021-12-281-4/+12
| |
* | Fix menu placement on multiple-display setups when using lwlibPo Lu2021-12-281-23/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lwlib/xlwmenu.c (fit_to_screen): (pop_up_menu): Adjust menu position based on dimensions of the current monitor's workarea. (bug#52809) * src/xfns.c (x_get_monitor_attributes): Stop testing for the RandR extension here. (xlw_monitor_dimensions_at_pos_1): (xlw_monitor_dimensions_at_pos): New functions. * src/xterm.c (x_term_init): Query for the RandR extension when connecting to a display. * src/xterm.h (xlw_monitor_dimensions_at_pos): New prototype.
* | Re-enable the disabledForeground X resource.Gregory Heytings2021-11-241-1/+0
| | | | | | | | | | | | | | | | | | * doc/emacs/xresources.texi (Lucid Resources): Document the resource. Also document the 'cursor' resource (bug#52052). * lwlib/xlwmenu.c (make_drawing_gcs): Re-enable the use of the disabledForeground resource. The use of this X resource was disabled without reason in commit ef93458b2f8 by overwriting its value with the value of the foreground resource.
* | Implement the buttonForeground resourceGregory Heytings2021-11-201-0/+30
| | | | | | | | | | * lwlib/xlwmenu.c (draw_shadow_rectangle, draw_shadow_rhombus): Use the buttonForeground resource color (bug#51988).
* | New X resource to control the border thickness of menusGregory Heytings2021-11-163-1/+7
|/ | | | | | | | | | * lwlib/xlwmenu.h (XtNborderThickness, XtCBorderThickness): New X resource name. * lwlib/xlwmenuP.h (XlwMenuPart): New border_thickness field. * lwlib/xlwmenu.c (xlwMenuResources): Access the new resource. (draw_shadow_rectangle): Use the new resource value. * doc/emacs/xresources.texi (Lucid Resources): Document the new resource (bug#51867).
* Base the "extraclean" Make rule on "maintainer-clean"Glenn Morris2021-05-091-2/+2
| | | | | | | | | | | | | | | | * Makefile.in (FIND_DELETE): New, set by configure. (extraclean_dirs): Remove. (extraclean): Make it just a small variation on maintainer-clean. * admin/charsets/Makefile.in (extraclean): * admin/grammars/Makefile.in (extraclean): * admin/unidata/Makefile.in (extraclean): * leim/Makefile.in (extraclean): * lib-src/Makefile.in (extraclean): * lisp/Makefile.in (extraclean): * lwlib/Makefile.in (extraclean): * nt/Makefile.in (extraclean): * src/Makefile.in (extraclean): Remove target. * lib/Makefile.in (extraclean): Merge into maintainer-clean.
* Fix 'extraclean' targetsEli Zaretskii2021-04-011-2/+2
| | | | | | | | | | | | * GNUmakefile: Add description of 'extraclean'. * Makefile.in (extraclean_dirs): Add lwlib. * lwlib/Makefile.in (clean mostlyclean extraclean): Add 'extraclean' target. * lisp/Makefile.in (extraclean): Remove ${loaddefs}, not just ${LOADDEFS}. Delete all backup and autosave files.
* Simplify silent-rules build machineryGlenn Morris2021-03-061-17/+2
| | | | | | | | | | | | | | * src/verbose.mk.in: New file. * configure.ac (AM_V, AM_DEFAULT_V): Remove output variables. (src/verbose.mk): New output file. * Makefile.in, admin/charsets/Makefile.in: * admin/grammars/Makefile.in, admin/unidata/Makefile.in: * doc/emacs/Makefile.in, doc/lispintro/Makefile.in: * doc/lispref/Makefile.in, doc/misc/Makefile.in, leim/Makefile.in: * lib-src/Makefile.in, lib/Makefile.in, lisp/Makefile.in: * lwlib/Makefile.in, nt/Makefile.in, oldXMenu/Makefile.in: * src/Makefile.in, src/verbose.mk.in, test/Makefile.in: Include src/verbose.mk rather than repeatedly defining AM_V_at etc.
* Update copyright year to 2021Paul Eggert2021-01-0114-14/+14
| | | | Run "TZ=UTC0 admin/update-copyright".
* Fix Xaw widget text disappearing when built with cairo (bug#43418)YAMAMOTO Mitsuharu2020-12-061-4/+11
| | | | | * lwlib/lwlib-utils.c (crxft_font_open_name): Use FcFontMatch to get a pattern to pass to cairo_ft_font_face_create_for_pattern.
* Update copyright year to 2020Paul Eggert2020-01-0114-14/+14
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Avoid some strlen work, primarily via strnlenPaul Eggert2019-06-251-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * admin/merge-gnulib (GNULIB_MODULES): Add strnlen. * lib-src/etags.c (find_entries): * src/emacs.c (main): * src/nsmenu.m (parseKeyEquiv:): * src/nsterm.m (ns_xlfd_to_fontname): * src/term.c (vfatal): Prefer !*X to !strlen (X). * lib-src/etags.c (pfnote, add_regex): * lib-src/pop.c (pop_open): * lib-src/update-game-score.c (main): * lwlib/lwlib.c (lw_separator_p): * src/doprnt.c (doprnt): * src/emacs.c (main): * src/inotify.c (inotifyevent_to_event): * src/keyboard.c (menu_separator_name_p, parse_tool_bar_item): * src/sysdep.c (get_current_dir_name_or_unreachable): * src/xdisp.c (store_mode_line_string): Use strnlen to avoid unnecessary work with strlen. * lib-src/etags.c (Prolog_functions, prolog_pr) (Erlang_functions, erlang_func): Prefer ptrdiff_t to size_t when either will do. (prolog_pr, erlang_func): New arg LASTLEN, to avoid unnecessary strlen call. All callers changed. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib/strnlen.c, m4/strnlen.m4: New files, copied from Gnulib. * lwlib/lwlib.c (lw_separator_p): * src/json.c (json_has_prefix): Use strncmp to avoid unecessary work with strlen + memcmp. * src/process.c (set_socket_option): Use SBYTES instead of strlen.
* Avoid empty menu bar on Xaw with cairoYAMAMOTO Mitsuharu2019-06-101-0/+5
| | | | | * lwlib/lwlib-utils.c (crxft_font_open_name) [USE_CAIRO]: Return NULL if font extents are bogus.
* Don't link libXft when using cairoYAMAMOTO Mitsuharu2019-04-246-32/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Check cairo early. Don't try Xft if cairo is used. * lwlib/lwlib-utils.h [USE_CAIRO]: Include cairo.h and fontconfig.h. (XftFont, XftDraw, XftColor, XGlyphInfo) [USE_CAIRO]: New typedefs. (XftFontOpenName, XftFontClose, XftDrawCreate, XftDrawDestroy) (XftDrawRect, XftDrawStringUtf8, XftTextExtentsUtf8) [USE_CAIRO]: New macros. (crxft_font_open_name, crxft_font_close, crxft_draw_create) (crxft_draw_rect, crxft_draw_string, crxft_text_extents) [USE_CAIRO]: New externs. * lwlib/lwlib-utils.c [USE_CAIRO]: Include math.h, cairo-ft.h, and cairo-xlib.h. (crxft_font_open_name, crxft_font_close, crxft_draw_create) (crxft_set_source_color, crxft_draw_rect, crxft_draw_string) (crxft_text_extents) [USE_CAIRO]: New Xft compatibility functions. * lwlib/xlwmenuP.h [USE_CAIRO]: Include lwlib-utils.h. * lwlib/xlwmenu.c (display_menu_item) [USE_CAIRO]: Call cairo_surface_mark_dirty and cairo_surface_flush. * lwlib/lwlib-Xaw.c [USE_CAIRO]: Include stdlib.h and lwlib-utils.h. (draw_text) [USE_CAIRO]: Call cairo_surface_flush. * src/xsettings.c [USE_CAIRO]: Include fontconfig.h (apply_xft_settings) [!HAVE_XFT]: Don't call XftDefaultSubstitute or XftDefaultSet. * lwlib/lwlib-Xaw.c: * lwlib/lwlib-int.h: * lwlib/xlwmenu.c: * lwlib/xlwmenuP.h: * src/xrdb.c: * src/xsettings.c: * src/xterm.c: Replace all #ifdef HAVE_XFT with #if defined USE_CAIRO || defined HAVE_XFT. * src/xfns.c (x_default_font_parameter): Replace #ifdef HAVE_XFT with #if defined USE_CAIRO || defined HAVE_XFT.
* Release xft_data in widget destroy callback to avoid visual distractionYAMAMOTO Mitsuharu2019-04-232-29/+24
| | | | | | | | | * lwlib/lwlib-int.h (struct _widget_instance) [HAVE_XFT]: Remove nr_xft_data. * lwlib/lwlib-Xaw.c (find_xft_data, xaw_update_one_widget) [HAVE_XFT]: Loop while widget member is not NULL instead of using nr_xft_data. (xaw_destroy_instance) [HAVE_XFT]: Move xft_data release code from here ... (destroy_xft_data) [HAVE_XFT]: ... to here. (make_dialog) [HAVE_XFT]: Add destroy_xft_data as destroy callback for dialog.
* Fix text metrics calculation in Xft support for lwlibYAMAMOTO Mitsuharu2019-04-212-2/+2
| | | | | * lwlib/lwlib-Xaw.c (get_text_width_and_height) [HAVE_XFT]: * lwlib/xlwmenu.c (string_width) [HAVE_XFT]: Use xOff member instead of width.
* * lwlib/lwlib-Xaw.c (draw_text) [HAVE_XFT]: Fix memory leak.YAMAMOTO Mitsuharu2019-04-211-5/+6
|
* Merge from origin/emacs-26Paul Eggert2018-12-3114-14/+14
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-0114-14/+14
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
| * More porting to GCC 8 of --enable-gcc-warningsPaul Eggert2018-12-173-14/+4
| | | | | | | | | | | | | | | | | | | | Backport from master. I ran into this when building Emacs 26 with GCC 8 on Fedora 29 x86. * lwlib/lwlib-Xaw.h (xaw_update_one_value, xaw_popup_menu): * lwlib/lwlib-Xlw.h (xlw_update_one_value, xlw_pop_instance): * lwlib/lwlib.h (lw_allow_resizing, lw_set_main_areas) [!USE_MOTIF]: No longer const. * src/emacs-module.c: Ignore -Wcast-function-type.
* | Fix ‘make clean’ with a file named ‘-.o’Paul Eggert2018-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem reported by T.V Raman in: https://lists.gnu.org/r/emacs-devel/2018-09/msg00866.html * Makefile.in (clean, extraclean): * doc/emacs/Makefile.in (mostlyclean): * doc/lispintro/Makefile.in (mostlyclean): * doc/lispref/Makefile.in (mostlyclean): * doc/misc/Makefile.in (mostlyclean, clean): * etc/refcards/Makefile (clean): * lib-src/Makefile.in (mostlyclean, extraclean): * lib/Makefile.in (clean): * lwlib/Makefile.in (clean mostlyclean): * oldXMenu/Makefile.in (clean mostlyclean): * src/Makefile.in (mostlyclean, extraclean): * test/Makefile.in (mostlyclean): Say ‘rm ./*.o’ instead of ‘rm *.o’ to avoid undesirable failure when a file name begins with ‘-’.
* | Merge from origin/emacs-26Glenn Morris2018-06-181-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | 5bdc344 ; Reduce quoting for SELECTOR in 'make -C test' (Bug#31744) b6b793b ; test/Makefile.in: Add TEST_INTERACTIVE option (Bug#31744). 1aa906f Make 'tags' targets respect --with-silent-rules (Bug#31744) Conflicts: test/Makefile.in test/README
| * Make 'tags' targets respect --with-silent-rules (Bug#31744)Noam Postavsky2018-06-121-1/+1
| | | | | | | | | | | | | | * lwlib/Makefile.in (TAGS): * lisp/Makefile.in (TAGS): * src/Makefile.in (TAGS): Use AM_V_GEN and AM_V_at. * src/Makefile.in: Note that TAGS are generated in build dir.