summaryrefslogtreecommitdiff
path: root/lwlib
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* | More porting to GCC 8 of --enable-gcc-warningsPaul Eggert2018-05-033-14/+4
|/ | | | | | | | * 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.
* Update copyright year to 2018Paul Eggert2018-01-0114-14/+14
| | | | Run admin/update-copyright.
* Merge from GnulibPaul Eggert2017-10-011-4/+4
| | | | | | | | | | | | This is mostly to change http: to https: in licenses. * COPYING, build-aux/config.guess, build-aux/config.sub: * doc/emacs/doclicense.texi, doc/emacs/gpl.texi: * doc/lispintro/doclicense.texi, doc/lispref/doclicense.texi: * doc/lispref/gpl.texi, doc/misc/doclicense.texi: * doc/misc/gpl.texi, etc/COPYING, leim/COPYING: * lib-src/COPYING, lib/COPYING, lisp/COPYING, lwlib/COPYING: * msdos/COPYING, nt/COPYING, src/COPYING: Copy from Gnulib.
* Prefer HTTPS to HTTP for gnu.orgPaul Eggert2017-09-291-1/+1
| | | | | This catches some URLs I missed in my previous scan, or perhaps were added after the scan.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-1314-14/+14
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Streamline dependency-file generationPaul Eggert2017-03-211-18/+10
| | | | | | | | | | | | | | | * configure.ac (AUTODEPEND_PARENTS): New var. mkdir the dependency directories here, to simplify ‘make’. Remove dependency files just before outputting Makefiles, so that they are preserved if ‘configure’ exits early due to some other problem. * lib/Makefile.in, lwlib/Makefile.in, oldXMenu/Makefile.in: * src/Makefile.in: Adjust deps strategies to be similar, as follows: (MKDEPDIR): Remove. All uses removed. This cuts down on the number of processes spun off by ‘make’. (clean mostlyclean): Remove $(DEPDIR) contents, not $(DEPDIR) itself. (distclean): Remove $(DEPDIR) itself. * lwlib/Makefile.in (all): Move to front, so that depdir includes do not alter default action.
* Tweak X toolkit code to pacify modern GCCPaul Eggert2017-03-104-24/+21
| | | | | | | | | | | | | | | | | | | | * lwlib/lwlib-Xaw.c, lwlib/lwlib-Xm.c, lwlib/lwlib.c: Don’t include <stdlib.h>, since this code now calls emacs_abort rather than abort. * lwlib/lwlib-Xaw.c (make_dialog, xaw_generic_callback) (wm_delete_window): * lwlib/lwlib-Xm.c (make_menu_in_widget, do_call): * lwlib/lwlib.c (instantiate_widget_instance, lw_make_widget): * lwlib/xlwmenu.c (abort_gracefully, draw_separator) (separator_height, XlwMenuInitialize): Use emacs_abort, not abort. Without this change, some calls to ‘abort’ were invalid, as stdlib.h was not always included. * src/widget.c (resources, emacsFrameClassRec): * src/xfns.c (x_window) [USE_X_TOOLKIT]: * src/xmenu.c (create_and_show_popup_menu) [USE_X_TOOLKIT]: * src/xterm.c (emacs_options) [USE_X_TOOLKIT}: (x_term_init) [USE_X_TOOLKIT]: Cast string constants to char * to pacify --enable-gcc-warnings.
* Remove @SET_MAKE@ from manually-maintained filesPaul Eggert2017-01-071-1/+0
| | | | | | Emacs now assumes GNU Make, so @SET_MAKE@ is no longer needed. * Makefile.in, lwlib/Makefile.in, nextstep/Makefile.in: * src/Makefile.in: Remove @SET_MAKE@.