Remove recently added BUFFER arg of `window-text-pixel-size'.
[emacs.git] / lwlib / ChangeLog
blob8d536f0b3ad2e864afa384c22c8403fc87a960f7
1 2015-01-04  Paul Eggert  <eggert@cs.ucla.edu>
3         Less 'make' chatter for lwlib
4         * Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0, am__v_GEN_1)
5         (AM_V_at, am__v_at_, am__v_at_0, am__v_at_1): New macros.
6         (liblw.a): Use them.
8 2014-12-25  Paul Eggert  <eggert@cs.ucla.edu>
10         * xlwmenu.c (resource_widget_value):
11         Rewrite to avoid the need for strcat, typically by using stpcpy
12         and/or lispstpcpy.  strcat tends to be part of O(N**2) algorithms.
14 2014-10-20  Glenn Morris  <rgm@gnu.org>
16         * Merge in all changes up to 24.4 release.
18 2014-09-01  Paul Eggert  <eggert@cs.ucla.edu>
20         --enable-silent-rules now suppresses more chatter.
21         * Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_CC, am__v_CC_)
22         (am__v_CC_0, am__v_CC_1): New macros, taken from Automake.
23         (.c.o): Use them.
25 2014-07-15  Dmitry Antipov  <dmantipov@yandex.ru>
27         * lwlib.h (toplevel): Use unsigned int for LWLIB_ID.
29 2014-06-28  Glenn Morris  <rgm@gnu.org>
31         * Makefile.in: Use gcc auto-dependency information.
32         Move old dependency information to new file deps.mk.
33         (MKDIR_P, DEPFLAGS, MKDEPDIR, lwlib_deps_frag):
34         New, set by configure.
35         (DEPDIR): New variable.
36         (ALL_CFLAGS): Add DEPFLAGS.
37         (.c.o): Add MKDEPDIR.
38         (clean, mostlyclean): Delete DEPDIR.
39         * deps.mk, autodeps.mk: New files.
41 2014-06-17  Paul Eggert  <eggert@cs.ucla.edu>
43         Omit redundant extern decls.
44         From Dmitry Antipov.
45         * lwlib-Xm.c (lw_motif_widget_p, xm_update_one_value)
46         (xm_create_dialog, xm_destroy_instance, xm_popup_menu)
47         (xm_set_keyboard_focus, xm_set_main_areas): Remove decls.
49 2014-06-15  Glenn Morris  <rgm@gnu.org>
51         * Makefile.in ($(globals_h)): Use `make -C' rather than `cd && make'.
53         * Makefile.in (mostlyclean, clean, distclean, maintainer-clean):
54         Declare as PHONY.
55         (bootstrap-clean): New.
57 2014-06-13  Glenn Morris  <rgm@gnu.org>
59         * Makefile.in ($(globals_h)):
60         GNU make automatically passes command-line arguments to sub-makes.
62 2014-06-04  Dmitry Antipov  <dmantipov@yandex.ru>
64         * lwlib-widget.h (widget_value) [USE_X_TOOLKIT]: Use X toolkit
65         fields conditionally.
67 2014-06-03  Paul Eggert  <eggert@cs.ucla.edu>
69         Do not require libXt-devel when building with gtk.
70         * lwlib-widget.h: New file, with contents taken from lwlib.h.
71         (widget_value) [HAVE_NTGUI]: New member 'title'.
72         * lwlib.h: Include lwlib-widget.h.
73         (change_type, enum button_type, widget_value):
74         Move to lwlib-widget.h.
76 2014-06-03  Dmitry Antipov  <dmantipov@yandex.ru>
78         * xlwmenu.c (openXftFont): Do not load regular X font here.
79         (XlwMenuInitialize): Remove ancient #if 0 code.
80         (XlwMenuDestroy): Likewise.  Free regular X font here.
82 2014-06-02  Dmitry Antipov  <dmantipov@yandex.ru>
84         Use common memory management functions for widgets.
85         * lwlib.h (widget_value): Do not maintain a free list any more.
86         (malloc_widget_value, free_widget_value): Remove prototypes.
87         * lwlib.c (malloc_widget_value, free_widget_value):
88         (widget_value_free_list, malloc_cpt): Remove.
89         (free_widget_value_tree, copy_widget_value_tree): Adjust users.
91 2014-05-30  Dmitry Antipov  <dmantipov@yandex.ru>
93         Use common string allocation and freeing functions where applicable.
94         * lwlib.h (safe_strdup): Remove prototype.
95         * lwlib.c (safe_strdup, safe_free_str): Remove.
96         (copy_widget_value_tree, allocate_widget_info, free_widget_info):
97         (merge_widget_value): Prefer xstrdup, xfree and dupstring.
98         * lwlib-Xm.c (make_destroyed_instance, xm_update_one_value): Ditto.
100 2013-12-14  Paul Eggert  <eggert@cs.ucla.edu>
102         Use bool for boolean, focusing on headers.
103         * xlwmenuP.h (XlwMenu_part): Use bool_bf for boolean bit-fields.
105 2013-11-14  Paul Eggert  <eggert@cs.ucla.edu>
107         * lwlib.c (safe_strdup): Prefer tail calls.
109 2013-11-02  Glenn Morris  <rgm@gnu.org>
111         Use relative filenames in TAGS files.
112         * Makefile.in (abs_srcdir): Remove it again.
113         (ctagsfiles, TAGS): Use relative filenames.
115         * Makefile.in (abs_srcdir): New, set by configure.
116         (ETAGS, ctagsfiles): New variables.
117         (TAGS): Use ETAGS, ctagsfiles.  Use absolute filenames again.
119 2013-10-24  Glenn Morris  <rgm@gnu.org>
121         * Makefile.in (abs_top_srcdir): New, set by configure.
123 2013-09-04  Paul Eggert  <eggert@cs.ucla.edu>
125         Makefile improvements.
126         * Makefile.in (all): Put this first.  Don't use double-colon
127         rules, as they are not portable according to POSIX.  Mark as phony.
129 2013-06-30  Paul Eggert  <eggert@cs.ucla.edu>
131         Fix minor problems found by static checking.
132         * lwlib-Xaw.h (xaw_update_one_value, xaw_popup_menu):
133         * lwlib-Xlw.h (xlw_update_one_value, xlw_pop_instance):
134         * lwlib.h (lw_allow_resizing, lw_set_main_areas) [!USE_MOTIF]:
135         Now const.
137 2012-10-06  Ulrich Müller  <ulm@gentoo.org>
139         * Makefile.in (AR, ARFLAGS): Get values from configure.
141 2012-08-16  Paul Eggert  <eggert@cs.ucla.edu>
143         Use ASCII tests for character types.
144         * lwlib-Xaw.c, lwlib.c, xlwmenu.c:
145         Don't include <ctype.h>; no longer needed.
146         * lwlib-Xaw.c (openFont):
147         * xlwmenu.c (openXftFont): Test just for ASCII digits.
149 2012-08-01  Glenn Morris  <rgm@gnu.org>
151         * Makefile.in (config_h): Add conf_post.h.
153 2012-07-31  Dmitry Antipov  <dmantipov@yandex.ru>
155         Avoid unused variable warning if --with-x-toolkit=motif.
156         * lwlib-Xm.c (make_menu_in_widget): Remove unused variable.
158 2012-07-06  Paul Eggert  <eggert@cs.ucla.edu>
160         Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
161         * lwlib.c: Include c-strcase.h.
162         (lwlib_strcasecmp): Remove.  All uses replaced with c_strcasecmp.
164 2012-06-26  Paul Eggert  <eggert@cs.ucla.edu>
166         Clean out last vestiges of the old HAVE_CONFIG_H stuff.
167         * Makefile.in (ALL_CFLAGS): Remove -DHAVE_CONFIG_H.
168         * lwlib-Xaw.c, lwlib-Xlw.c, lwlib-Xm.c, lwlib-utils.c, lwlib.c:
169         * xlwmenu.c: Include <config.h> unconditionally.
171 2012-06-25  Dmitry Antipov  <dmantipov@yandex.ru>
173         * lwlib.c (my_strcasecmp): Rename to lwlib_strcasecmp, which
174         may be defined to library function strcasecmp if available.
176 2012-06-24  Paul Eggert  <eggert@cs.ucla.edu>
178         Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
179         * xlwmenu.c (abort_gracefully):
180         Use _Noreturn rather than NO_RETURN.
181         No need for separate decl merely because of _Noreturn.
183 2012-05-31  Paul Eggert  <eggert@cs.ucla.edu>
185         Remove obsolete '#define static' cruft.
186         * xlwmenu.c [emacs]: Include "bitmaps/gray.xbm".
187         (gray_bitmap_width, gray_bitmap_height, gray_bitmap_bits) [!emacs]:
188         Remove; all uses replaced with definiens.
190 2012-04-18  Paul Eggert  <eggert@cs.ucla.edu>
192         configure: new option --enable-gcc-warnings (Bug#11207)
193         * Makefile.in (C_WARNINGS_SWITCH): Remove.
194         (WARN_CFLAGS, WERROR_CFLAGS): New macros.
195         (ALL_CFLAGS): Use new macros rather than old.
197 2012-04-11  Glenn Morris  <rgm@gnu.org>
199         * Makefile.in (C_SWITCH_X_SYSTEM): Remove.
200         (ALL_CFLAGS): Remove C_SWITCH_X_SYSTEM.
202 2011-10-13  Dmitry Antipov  <dmantipov@yandex.ru>
204         * lwlib-Xaw.c (openFont, xaw_destroy_instance): Replace free with
205         xfree to avoid crash when xmalloc overrun checking is enabled.
206         * lwlib-Xm.c (free_destroyed_instance, xm_update_one_value): Ditto.
207         * lwlib-utils.c (XtApplyToWidgets): Ditto.
208         * lwlib.c (safe_free_str, free_widget_value, free_widget_value_tree)
209         (free_widget_info, free_widget_instance, name_to_widget): Ditto.
210         * xlwmenu.c (openXftFont): Ditto.
212 2011-06-27  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
214         * Makefile.in (ALL_CFLAGS): Add -I../lib for generated header files
215         in out-of-tree build.
217 2011-06-06  Paul Eggert  <eggert@cs.ucla.edu>
219         * Makefile.in (ALL_CFLAGS): Add -I$(srcdir)/../lib.
220         This is needed because lisp.h includes intprops.h now (Bug#8794).
222 2011-04-16  Paul Eggert  <eggert@cs.ucla.edu>
224         Static checks with GCC 4.6.0 and non-default toolkits.
226         * lwlib-Xm.c (make_dialog): Rename local to avoid shadowing.
227         (make_menu_in_widget): Add cast to avoid warning.
228         * lwlib-utils.c (XtCompositeChildren): Likewise.
230         * lwlib.c (EXPLAIN, destroy_one_instance): Avoid "else;".
231         (first_child) [USE_MOTIF]: Protoize.
233         * lwlib-utils.h, lwlib-utils.c (XtSafelyDestroyWidget): Remove; unused.
235         * xlwmenu.c (XlwMenuSetValues): Rename/ move locals to avoid shadowing.
236         (MINL): Define only if not emacs.
238 2011-03-07  Chong Yidong  <cyd@stupidchicken.com>
240         * Version 23.3 released.
242 2011-02-14  Jan Djärv  <jan.h.d@swipnet.se>
244         * xlwmenu.h: Remove Xt[CN]faceName and Xt[NC]defaultFace.
246         * xlwmenuP.h (_XlwMenu_part): Remove faceName.  Add fontName.
248         * xlwmenu.c (xlwmenu_default_font): Remove, does not work for
249         multi-display.
250         (xlwMenuResources): Remove XtNfaceName and XtNdefaultFace.
251         Make XtNFont a String resource.
252         (make_windows_if_needed): Call XFlush so later changes are seen by the
253         X server.
254         (remap_menubar): Use XtMoveWidget and then
255         XtResizeWidget/XtResizeWindow after XtPopup.  Works better with
256         Compiz.
257         (make_drawing_gcs): Check if mw->menu.font is set.
258         (getDefaultXftFont): New function.
259         (openXftFont): faceName is now fontName.  Try XLoadQueryFont first
260         and then XftFontOpenName.
261         (XlwMenuInitialize): Initialize mw->menu.font with XLoadQueryFont.
262         (XlwMenuClassInitialize): Remove initialization of
263         xlwmenu_default_font.
264         (fontname_changed): Renamed from facename_changed.
265         (XlwMenuSetValues): Use facename_changed.
267         * lwlib-Xaw.c (make_dialog): Use *font even for Xft fonts.  Try
268         XLoadQueryFont first and then Xft fonts.
270 2011-02-13  Glenn Morris  <rgm@gnu.org>
272         * lwlib-utils.c (index, rindex): Don't undef (neither used in lwlib/,
273         nor set in config.h).
275 2011-02-11  Glenn Morris  <rgm@gnu.org>
277         * Makefile.in (USE_X_TOOLKIT, RM, TOOLKIT_DEFINES): Remove.
278         (ALL_CFLAGS): Remove -I.
279         (config_h, lisp_h, src_h): New variables.
280         (globals_h): Rename from $globals.
281         ($(globals_h)): Check cd exit status.
282         (lwlib.o): Remove special rule.
283         (lwlib-utils.o, lwlib.o, lwlib-Xlw.o, lwlib-Xaw.o, lwlib-Xm.o)
284         (xlwmenu.o): Add lisp.h and config.h to prereqs.
285         (lwlib-utils.o): Add lwlib.h to prereqs.
286         (lwlib.o): Add lwlib-utils.h and lwlib-Xm.h to prereqs.
287         (lwlib-Xlw.o): Add xlwmenu.h to prereqs.
288         (xlwmenu.o): Add ../src/xterm.h to prereqs.
289         (mostlyclean): Forget about "core" files.
291 2011-02-10  Glenn Morris  <rgm@gnu.org>
293         * lwlib-Xaw.c, lwlib-Xlw.c, lwlib-Xm.c, lwlib-utils.c, lwlib.c:
294         * xlwmenu.c: Standardize on <> for includes from the ../src directory.
296 2011-02-09  Glenn Morris  <rgm@gnu.org>
298         * Makefile.in (@SET_MAKE@): New, set by configure.
299         (globals): New variable and rule.
300         (lwlib-utils.o, lwlib.o, lwlib-Xlw.o, lwlib-Xaw.o, lwlib-Xm.o)
301         (xlwmenu.o): Add dependency on src/globals.h.
303 2011-01-31  Jan Djärv  <jan.h.d@swipnet.se>
305         * lwlib-Xm.c (make_destroyed_instance):
306         * lwlib-utils.c (XtApplyToWidgets):
307         * lwlib.c (safe_strdup, malloc_widget_value)
308         (allocate_widget_info, allocate_widget_instance): Use xmalloc
309         instead of malloc.
311 2011-01-25  Werner Meisner  <weme24@gmx.net>
313         * lwlib-Xm.c (xm_update_menu): Avoid a NULL pointer dereference
314         (Bug#7690).
316 2010-09-26  Dan Nicolaescu  <dann@ics.uci.edu>
318         Use const for some pointer arguments.
319         * lwlib.h (my_strcasecmp, safe_strcmp, name_to_widget)
320         (find_in_table, dialog_spec_p, lw_separator_p):
321         * lwlib.c (my_strcasecmp, safe_strcmp, name_to_widget)
322         (find_in_table, dialog_spec_p, lw_separator_p): Use const.
324 2010-09-20  Dan Nicolaescu  <dann@ics.uci.edu>
326         * lwlib.h (lw_register_widget, lw_create_widget):
327         * lwlib.c (allocate_widget_info, lw_register_widget)
328         (lw_create_widget, separator_table): Use const.
330 2010-07-29  Dan Nicolaescu  <dann@ics.uci.edu>
332         * xlwmenu.c (abort_gracefully): Mark as NO_RETURN.
334 2010-07-26  Dan Nicolaescu  <dann@ics.uci.edu>
336         * xlwmenu.h (xlwmenu_window_p, xlwmenu_redisplay): Add declarations.
338 2010-07-12  Andreas Schwab  <schwab@linux-m68k.org>
340         * Makefile.in (C_WARNINGS_SWITCH, PROFILING_CFLAGS): Set from
341         substitution.
342         (ALL_CFLAGS): Add ${C_WARNINGS_SWITCH} and ${PROFILING_CFLAGS}.
344 2010-07-08  Jan Djärv  <jan.h.d@swipnet.se>
346         * xlwmenu.c (size_menu_item): Change from K&R to prototype.
347         Change label_width and height to int.
348         (draw_arrow, draw_shadow_rectangle, draw_shadow_rhombus)
349         (draw_separator, display_menu, fit_to_screen, motion_event_is_in_menu)
350         (map_event_to_widget_value): Reformat.
351         (display_menu_item): Change from K&R to prototype.
353         * lwlib.c (allocate_widget_info, lw_register_widget): Change from K&R
354         to prototype.
355         (lw_internal_update_other_instances, merge_widget_value): Reformat.
357         * lwlib-int.h (widget_creation_function): Fix prototype.
359         * lwlib-Xm.c (x_print_complete_resource_name)
360         (make_destroyed_instance, free_destroyed_instance, first_child)
361         (lw_motif_widget_p, resource_motif_string, destroy_all_children)
362         (xm_arm_callback, xm_update_label, xm_update_list)
363         (xm_update_pushbutton, xm_update_cascadebutton)
364         (xm_update_toggle, xm_update_radiobox, make_menu_in_widget)
365         (update_one_menu_entry, xm_update_menu, xm_update_text)
366         (xm_update_text_field, xm_update_one_widget)
367         (xm_update_one_value, activate_button, dialog_key_cb)
368         (make_dialog, mark_dead_instance_destroyed)
369         (find_matching_instance, recenter_widget, recycle_instance)
370         (xm_create_dialog, make_menubar, remove_grabs, make_popup_menu)
371         (make_main, xm_destroy_instance, xm_popup_menu)
372         (set_min_dialog_size, xm_pop_instance, do_call)
373         (xm_internal_update_other_instances, xm_generic_callback)
374         (xm_nosel_callback, xm_pull_down_callback, xm_pop_down_callback)
375         (xm_set_keyboard_focus, xm_set_main_areas, xm_manage_resizing): Change
376         from K&R to prototype.
378         * lwlib-Xlw.c (x_print_complete_resource_name): Change from K&R to
379         prototype.
380         (xlw_update_one_value): Reformat.
382         * lwlib-Xaw.c (xaw_generic_callback, command_reset)
383         (xaw_update_one_value): Reformat.
384         (xaw_update_one_widget): Reformat and remove dead code.
385         (xaw_scrollbar_scroll, xaw_scrollbar_jump, xaw_create_scrollbar)
386         (xaw_update_scrollbar): Remove (not used).
387         (make_dialog): Change from K&R to prototype.  Remove dead code.
388         (xaw_creation_table): Remove scrollbar entry.
390 2010-07-08  Dan Nicolaescu  <dann@ics.uci.edu>
392         * lwlib.c (allocate_widget_instance, get_widget_info)
393         (get_widget_instance, find_instance, set_one_value)
394         (update_one_widget_instance, update_all_widget_values)
395         (lw_modify_all_widgets, lw_get_widget, lw_make_widget)
396         (lw_create_widget, lw_pop_all_widgets, lw_show_busy)
397         (lw_refigure_widget, lw_allow_resizing): Remove alternative K&R
398         declarations.
399         * lwlib-Xlw.c (xlw_update_one_widget, xlw_pop_instance): Likewise.
400         * lwlib-Xaw.c (xaw_update_one_widget, xaw_pop_instance):
401         Likewise.
402         * lwlib-Xm.c (P_): Remove.
404 2010-07-07  Andreas Schwab  <schwab@linux-m68k.org>
406         * lwlib.c (lwlib_memset, lwlib_bcopy): Remove.
407         (malloc_widget_value, free_widget_info, allocate_widget_instance)
408         (lw_separator_p): Replace lwlib_memset, lwlib_bcopy, bzero, bcmp by
409         memset, memcpy, memcmp.
410         * lwlib-utils.c (XtApplyToWidgets): Likewise.
411         * xlwmenu.c (XlwMenuInitialize): Likewise.
412         * lwlib.h (lwlib_bcopy): Remove declaration.
414 2010-07-05  Jan Djärv  <jan.h.d@swipnet.se>
416         * xlwmenu.c (XlwMenuSetValues, XlwMenuInitialize): Correct prototype.
417         (display_menu_item): Remove unused variable gi.
418         (make_windows_if_needed): Remove unused variable screen.
419         (XlwMenuRedisplay): Remove unused variable i.
421         * lwlib-Xaw.c: Include <ctype.h> for isdigit.
422         (fill_xft_data, set_text): Remove unused variable screen.
423         (draw_text): Cast bp to FcChar8*.
424         (find_xft_data): Return 0 if inst or xft_data is not set.
425         (wm_delete_window): Correct prototype.  Initialize widget to 0
426         and return if widget is still 0 after loop.
428 2010-07-04  Dan Nicolaescu  <dann@ics.uci.edu>
430         * lwlib-Xaw.c: Convert function definitions to standard C.
431         * lwlib-Xlw.c:
432         * lwlib-utils.c:
433         * lwlib.c:
434         * lwlib.h:
435         * xlwmenu.c: Likewise.
437 2010-07-02  Jan Djärv  <jan.h.d@swipnet.se>
439         * lwlib-Xm.c: Remove __P and P_ from .c and .m files.
440         * lwlib-Xm.c:
441         * lwlib.c:
442         * xlwmenu.c: Likewise.
444         Remove P_ and __P macros.
445         * lwlib-Xaw.h: Remove P_ and __P macros.
446         * lwlib-Xlw.h:
447         * lwlib-Xm.h:
448         * lwlib-int.h:
449         * lwlib-utils.h:
450         * lwlib.h: Likewise.
452 2010-05-15  Glenn Morris  <rgm@gnu.org>
454         * Makefile.in (mostlyclean): Remove references to non-existent files.
456 2010-05-13  Jan Djärv  <jan.h.d@swipnet.se>
458         * lwlib-Xaw.c (make_dialog): Remove extra arg to XtVaGetSubresources.
460 2010-05-08  Jan Djärv  <jan.h.d@swipnet.se>
462         * xlwmenu.c (XlwMenuDestroy): Remove XtDestroyWidget on subwidgets
463         (Bug #6127).
465 2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
467         * Version 23.2 released.
469 2010-05-06  Glenn Morris  <rgm@gnu.org>
471         * Makefile.in (CPP, LN_S, TOP, LN): Remove unused variables.
473 2010-05-04  Glenn Morris  <rgm@gnu.org>
475         * Makefile.in (C_SWITCH_SYSTEM, C_SWITCH_MACHINE):
476         Use @C_SWITCH_SYSTEM@, @C_SWITCH_MACHINE@ instead of
477         @c_switch_system@, @c_switch_machine@.
479 2010-04-27  Dan Nicolaescu  <dann@ics.uci.edu>
481         * Makefile.in (C_SWITCH_X_SYSTEM): Define using autoconf.
483 2010-04-21  Jan Djärv  <jan.h.d@swipnet.se>
485         * xlwmenu.c (expose_cb):
486         * lwlib-Xaw.c (fill_xft_data): Declarations before code.
488 2010-04-17  Jan Djärv  <jan.h.d@swipnet.se>
490         * xlwmenu.c: Include Shell.h, remove duplicate declaration of
491         XlwMenuRedisplay.
492         (display_menu_item): Replace ws->window with ws->pixmap, remove
493         call to XftDrawRect.
494         (display_menu): Remove this and that argument.
495         Remove just_compute_this_one_p.  Fill pixmap at start and copy it to
496         window at end.
497         (expose_cb): New function.
498         (make_windows_if_needed): Replace XCreateWindow with XtCreatePopup.
499         Add eventhandler for expose to expose_cb.  Remove creation of xft_draw.
500         (create_pixmap_for_menu): New function.
501         (remap_menubar): Pop down menus that aren't the same as in old_stack.
502         Set width, height, x, y on widget with XtVaSetValues.
503         Call create_pixmap_for_menu.
504         Replace XUnmapWindow with XtPopdown.
505         Remowe two last parameters to display_menu.
506         (map_event_to_widget_value, XlwMenuRedisplay, Key, Select)
507         (pop_up_menu): Remowe two last parameters to display_menu.
508         (XlwMenuRealize): Call create_pixmap_for_menu, set w and pixmap.
509         Remove call to XftDrawCreate.
510         (XlwMenuDestroy): Free pixmap.  Call XtDestroyWidget instead of
511         XDestroyWindow.
512         (handle_motion_event): Only call handle_single_motion_event once.
513         (set_window_type): New function.
514         (make_windows_if_needed, XlwMenuRealize): Call set_window_type.
516         * xlwmenuP.h (window_state): Add pixmap and w.
518 2010-04-16  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
520         * xlwmenu.c (facename_changed): Put function in #ifdef HAVE_XFT.
522 2010-04-11  Dan Nicolaescu  <dann@ics.uci.edu>
524         * Makefile.in (C_SWITCH_SYSTEM, C_SWITCH_MACHINE)
525         (C_SWITCH_X_SITE): Define using autoconf.
527 2010-04-11  Jan Djärv  <jan.h.d@swipnet.se>
529         * lwlib-Xaw.c (widget_xft_data): New for Xft data.
530         (fill_xft_data, openFont, get_text_width_and_height)
531         (draw_text, set_text, find_xft_data, command_press)
532         (command_reset): New functions.
533         (xaw_update_one_widget): Call set_text for dialog and buttons
534         if HAVE_XFT.  Also set internalHeight for buttons.
535         (xaw_destroy_instance): Free all Xft related data.
536         (button_actions, buttonTrans): New structures.
537         (make_dialog): Call XtAppAddActions for button_actions.
538         Find xft font to use and call fill_xft_data for widgets.
539         (xaw_create_dialog): Pass instance parameter to make_dialog.
541         * lwlib-int.h (_widget_instance): Add Xft data if HAVE_XFT.
542         Override translations for buttons.  If depth is 16 or more, tell
543         Xaw3d to not be nice to colormap.
544         Remove separator widget, use XtNhorizDistance on first right button
545         instead.
547 2010-04-08  Jan Djärv  <jan.h.d@swipnet.se>
549         * xlwmenu.c (xlwmenu_default_font): Make static.
550         (xlwMenuResources): Add XtNfaceName and XtNdefaultFace.
551         (string_width): Use XftTextExtentsUtf8 if HAVE_XFT.
552         (MENU_FONT_HEIGHT, MENU_FONT_ASCENT): Add versions for
553         HAVE_XFT.
554         (size_menu): Set max_rest_width in window_state structure.
555         (display_menu_item): If HAVE_XFT and xft_draw is set, use
556         XftDrawRect and XftDrawStringUtf8 to draw text.
557         (make_windows_if_needed): Set max_rest_width and xft_draw
558         in windows[i].
559         (openXftFont): New.
560         (XlwMenuInitialize): Call openXftFont if HAVE_XFT.  If mw->menu.font
561         is not set, load font fixed and save it in xlwmenu_default_font.
562         (XlwMenuInitialize): Set max_rest_width and xft_draw in windows[0].
563         (XlwMenuClassInitialize): Initialize xlwmenu_default_font.
564         (XlwMenuRealize): Set xft_fg, xft_bg, xft_disabled_fg and
565         windows[0].xft_draw if xft_font is set.
566         (XlwMenuDestroy): Destroy all xft_draw and close xft_font.
567         (facename_changed): New.
568         (XlwMenuSetValues): Call facename_changed.  If face name did change,
569         close old fonts and destroy xft_draw:s.  Then create new ones.
571         * xlwmenu.h (XtNfaceName, XtCFaceName, XtNdefaultFace,
572         XtCDefaultFace): New.
574         * xlwmenuP.h (_window_state): Add max_rest_width and xft_draw.
575         (_XlwMenu_part): Add faceName, xft_fg, xft_bg, xft_disabled_fg and
576         xft_font.
578 2010-03-10  Chong Yidong  <cyd@stupidchicken.com>
580         * Branch for 23.2.
582 2009-10-19  Dan Nicolaescu  <dann@ics.uci.edu>
584         * xlwmenu.c:
585         * lwlib.c:
586         * lwlib-utils.c:
587         * lwlib-Xm.c:
588         * lwlib-Xlw.c:
589         * lwlib-Xaw.c: Include setjmp.h.
591 2009-06-21  Chong Yidong  <cyd@stupidchicken.com>
593         * Branch for 23.1.
595 2008-07-23  Dan Nicolaescu  <dann@ics.uci.edu>
597         * Makefile.in (ALL_CFLAGS): Remove reference to C_SWITCH_SITE.
599 2008-06-26  Dan Nicolaescu  <dann@ics.uci.edu>
601         * lwlib.c: Remove references to obsolete variables.
603 2008-06-02  Jim Meyering  <meyering@redhat.com>
605         Remove useless if-before-free tests.
606         * lwlib-Xm.c (xm_update_one_value): Likewise.
607         * lwlib.c (safe_free_str, free_widget_value_tree): Likewise.
609 2008-04-18  Stefan Monnier  <monnier@iro.umontreal.ca>
611         * Makefile.in (TOOLKIT_DEFINES): Remove.
613 2007-08-29  Károly Lőrentey  <lorentey@elte.hu>
615         * xlwmenu.c (XlwMenuRealize): Ignore X errors while setting up
616         cursor shape.
618 2007-07-25  Glenn Morris  <rgm@gnu.org>
620         * Relicense all FSF files to GPLv3 or later.
622         * COPYING: Switch to GPLv3.
624 2007-06-13  Chong Yidong  <cyd@stupidchicken.com>
626         * lwlib-Xaw.c, lwlib.c: Link to xaw3d if available.
628 2007-06-02  Chong Yidong  <cyd@stupidchicken.com>
630         * Version 22.1 released.
632 2007-02-28  Glenn Morris  <rgm@gnu.org>
634         * Makefile.in (distclean): Delete Makefile.
635         (maintainer-clean): Delete TAGS.
637 2007-01-01  Jan Djärv  <jan.h.d@swipnet.se>
639         * xlwmenu.c (xlwMenuResources): Add XtNleaveCallback, XtNenterCallback.
640         (display_menu, map_event_to_widget_value): Generate enter and
641         leave callbacks.
642         (pop_up_menu): Initialize mw->menu.inside_entry.
644         * xlwmenu.h (XtNleaveCallback, XtNenterCallback): New strings.
646         * xlwmenuP.h (_XlwMenu_part): Add enter/leave callbacks and
647         inside_entry.
649         * lwlib-Xlw.c (enter_hook, leave_hook): New functions.
650         (xlw_create_menubar, xlw_create_popup_menu): Connect XtNenter/leave
651         to enter/leave_hook.
653 2006-10-30  Chong Yidong  <cyd@stupidchicken.com>
655         * Makefile.in (lwlib-utils.o): Use CPPFLAGS.
657 2006-09-15  Jay Belanger  <belanger@truman.edu>
659         * COPYING: Replace "Library Public License" by "Lesser Public
660         License" throughout.
662 2006-05-23  Jan Djärv  <jan.h.d@swipnet.se>
664         * xlwmenu.c: Include xterm.h if emacs instead of declaring functions
665         used.
666         (string_width): Declare as static.
667         (Start, pop_up_menu): Set is_hint to 0 before calling
668         handle_motion_event.
669         (pop_up_menu): Return value and parameters for x_catch_errors and
670         x_uncatch_errors changed.
672 2005-09-27  Dan Nicolaescu  <dann@ics.uci.edu>
674         * xlwmenu.c (find_next_selectable, find_prev_selectable):
675         Add missing parameter declarations.
677 2005-09-24  Dan Nicolaescu  <dann@ics.uci.edu>
679         * xlwmenu.c: Fix the return type for x_clear_errors and
680         x_uncatch_errors.
682 2005-07-19  Jan Djärv  <jan.h.d@swipnet.se>
684         * lwlib-Xm.c (make_menu_in_widget): Disable drag and drop for
685         labels in menu bar.
687 2005-07-04  Lute Kamstra  <lute@gnu.org>
689         Update FSF's address in GPL notices.
691 2005-04-01  Jan Djärv  <jan.h.d@swipnet.se>
693         Reenable support for I18N to Lucid menus.
695         * xlwmenuP.h (_XlwMenu_part): Add fontSet resource.
697         * xlwmenu.c (string_width, MENU_FONT_HEIGHT, MENU_FONT_ASCENT): Ditto.
698         (display_menu_item, make_drawing_gcs, XlwMenuInitialize)
699         (XlwMenuSetValues): Use font if fontSet is NULL, use only
700         font for !HAVE_X_I18N.
701         (xlwMenuResources): Add fontSet resource.
703 2005-03-22  Jan Djärv  <jan.h.d@swipnet.se>
705         * xlwmenuP.h: Temporary #undef HAVE_X_I18N until FontSet for UTF-8
706         on XFree86 is investigated.
708         * xlwmenu.c: Ditto.
710 2005-03-17  Stefan Monnier  <monnier@iro.umontreal.ca>
712         Add support for I18N to Lucid menus.
714         * xlwmenuP.h (struct _XlwMenu_part) [HAVE_X_I18N]: Change `font' to be
715         a fontset.  Add a `font_extents' element.
717         * xlwmenu.c (xlwMenuResources) [HAVE_X_I18N]: Use a fontset for the
718         `font' resource.
719         (string_width) [HAVE_X_I18N]: Use XmbTextExtents.
720         (MENU_FONT_HEIGHT, MENU_FONT_ASCENT): New macros.
721         (arrow_width, toggle_button_width, size_menu_item, draw_arrow)
722         (draw_toggle, draw_radio, display_menu_item): Use them.
723         (display_menu_item) [HAVE_X_I18N]: Use XmbDrawString.
724         (make_drawing_gcs) [HAVE_X_I18N]: Don't mess with fonts.
725         (XlwMenuInitialize) [HAVE_X_I18N]: Initialize font_extents.
726         (XlwMenuSetValues) [HAVE_X_I18N]: Refresh font_extents if font changes.
728         * lwlib-Xm.c (xm_update_label, xm_update_list): Use the recommended
729         XmStringCreateLocalized function.  Add missing copyright.
731         * lwlib-Xm.h: Add missing copyright and license notice.
733 2005-03-12  Stefan Monnier  <monnier@iro.umontreal.ca>
735         * xlwmenuP.h:
736         * xlwmenu.h: Add missing copyright and license notice.
738 2004-12-27  Jan Djärv  <jan.h.d@swipnet.se>
740         * xlwmenu.c (xlwMenuActionsList): Install MenuGadgetEscape as an
741         action procedure for compatibility with Lesstif/Motif.
743         * Makefile.in (mostlyclean): Don't remove *~ on clean.
745 2004-12-26  Jan Djärv  <jan.h.d@swipnet.se>
747         * lwlib-Xaw.c: Put <KeyPress>Escape in dialogOverride so dialogs only
748         pops down on Escape, not any keypress.
750 2004-11-01  Jan Djärv  <jan.h.d@swipnet.se>
752         * xlwmenu.c (find_first_selectable, find_next_selectable)
753         (find_prev_selectable): Rename parameter skip_no_call_data to
754         skip_titles.  Recognize titles as having no call_data and no contents.
755         (Down, Up): Comment update.
757 2004-08-30  Jan Djärv  <jan.h.d@swipnet.se>
759         * lwlib.h (_widget_value): Add lname and lkey.
761 2004-01-12  Jan Djärv  <jan.h.d@swipnet.se>
763         * xlwmenuP.h (_XlwMenu_part): Add top_depth.
765         * xlwmenu.h: Removed declaration of pop_up_menu.
767         * xlwmenu.c (Start): Get correct time if time in event is CurrentTime.
768         (find_first_selectable, find_next_selectable)
769         (find_prev_selectable): Add parameter skip_no_call_data to skip
770         over items with no call data (popup menu titles).
771         (Down, Up): Compare old_depth to top_depth instead of 2.
772         Pass True to find_*_selectable:s new parameter if this is a popup menu.
773         (Left, Right): Compare old_depth to top_depth instead of 2.
774         Pass 0 to find_*_selectable:s new parameter.
775         (pop_up_menu): Set top_depth to 1 for pop up menus and 2 for
776         menu bar menus, to enable keyboard traversal of popups.
778         * lwlib-Xm.c (dialog_key_cb): New function.
779         (make_dialog): Add event handlers to dialog_key_cb for key press
780         so we can pop down on ESC.
782         * lwlib-Xlw.c (xlw_popup_menu): Replace call to pop_up_menu with
783         XtCallActionProc ("start").  Use a full XEvent since "start" copies it.
785         * lwlib-Xaw.c (make_dialog): Add override so dialog pops down on ESC.
786         (wm_delete_window): If widget isn't a shell, use the parent.
788 2003-05-22  Dave Love  <fx@gnu.org>
790         * xlwmenu.c: Include lisp.h, not ../src/lisp.h.
791         (make_drawing_gcs): Remove unused `xswa', `mask'.
793         * lwlib-Xlw.c: Include lisp.h, not ../src/lisp.h.
794         (lw_lucid_widget_p): Remove unused `mw'.
795         (xlw_update_one_widget, xlw_pop_instance) [PROTOTYPES]:
796         Provide ISO C arglists.
798 2003-04-30  Lute Kamstra  <lute@gnu.org>
800         * Makefile.in: Make things function properly in case both LessTif
801         and Open Motif are installed.
803 2003-01-26  Jan Djärv  <jan.h.d@swipnet.se>
805         * lwlib-Xm.c (update_one_menu_entry): Deallocate widget_list.
806         (destroy_all_children): Call it self to destroy sub menu children.
808 2002-12-22  Richard M. Stallman  <rms@gnu.org>
810         * xlwmenu.c (pop_new_stack_if_no_contents): Do nothing if
811         new_depth is 1.
812         (remap_menubar): Don't look in new_stack[0].
813         (Left): At level 1, do the same thing Right does.
815 2002-11-21  Dave Love  <fx@gnu.org>
817         * lwlib-Xaw.c [PROTOTYPES]: Provide ISO C arglists for functions
818         with Boolean args.
820 2002-11-20  Dave Love  <fx@gnu.org>
822         * lwlib.c: Remove obsolete USE_OLIT code.
823         [PROTOTYPES]: Provide ISO C arglists for functions with Boolean args.
824         (lwlib_memset): Declare length arg as size_t.
825         (malloc_widget_value): Cast arg of lwlib_memset.
827         * xlwmenu.c (separator_height): Prototype.
829 2002-05-07  Miles Bader  <miles@gnu.org>
831         * xlwmenu.c (make_drawing_gcs): The scaling factor passed to
832         `x_alloc_lighter_color_for_widget' is a float, not an int, and
833         it's a multiplicative factor, so the name `delta' is inaccurate.
834         Always base disabled foreground on the normal foreground.
835         Don't use the temporary variable `temp'.
837 2002-05-06  Pavel Janík  <Pavel@Janik.cz>
839         * xlwmenu.c (xlwMenuResources): New resource.
840         (find_next_selectable): Return current item when the menu is not
841         popped up.
842         Rename `inactive_gc' to `disabled_gc'.
843         Use lighter/darker color for disabled menu items instead of using
844         stipple.  Use stipple only when better color can not be
845         determined automatically.
847         * xlwmenu.h (XtNdisabledForeground, XtCDisabledForeground):
848         New resource names.
850         * xlwmenuP.h (_XlwMenu_part): Add new member `disabled_foreground'.
851         Rename `inactive_gc' to `disabled_gc'.
853 2002-04-29  Pavel Janík  <Pavel@Janik.cz>
855         * xlwmenu.c <XtNmargin, XtNverticalSpacing, XmNshadowThickness>:
856         Change default values.
858 2002-04-28  Jan Djärv  <jan.h.d@swipnet.se>
860         * xlwmenu.c: Do not grab keyboard if installation-directory is
861         non-nil (not installed Emacs).  To simplify debugging.
863 2002-04-28  Pavel Janík  <Pavel@Janik.cz>
865         * Makefile.in: Remove OpenLook file dependencies.
866         (xrdb-cpp.o): Remove target.
867         Remove unused defines.
869         * xrdb.c, xrdb-cpp.c, Imakefile, dispatch.c, dispatch.h:
870         Remove unused file.
872         * lwlib.c (instantiate_widget_instance): Remove duplicated prototype.
874 2002-04-25  Pavel Janík  <Pavel@Janik.cz>
876         * lwlib-Xol.c, lwlib-Xol.h, lwlib-Xolmb.c, lwlib-Xolmb.h
877         * lwlib-XolmbP.h: Remove file.
879 2002-04-22  Jan Djärv  <jan.h.d@swipnet.se>
881         * lwlib-Xm.c: Removed compiler warning.
883         * xlwmenu.c: Add calls to GrabKeyboard to remove strange
884         interactions with window managers that steal keypresses.
885         Call ungrab_all instead of XtUngrabPointer.
886         (pop_up_menu): Add call to XtGrabKeyboard.
887         (ungrab_all): New function.
889 2002-04-20  Pavel Janík  <Pavel@Janik.cz>
891         * xlwmenu.c (find_next_selectable): New function.
892         (Down, Up, Right): Use it.
893         (find_next_selectable): Prevent endless loops when only one item
894         is enabled in the menu.
896 2002-04-19  Pavel Janík  <Pavel@Janik.cz>
898         These changes allow moving in menu via keyboard.
900         * xlwmenu.c (xlwMenuTranslations, xlwMenuActionsList):
901         Add translations for cursor keys and RET.
902         (find_next_selectable, find_prev_selectable): New functions used
903         for finding menu-items.
904         (Down, Up, Left, Right): New functions.
906 2002-04-19  Eli Zaretskii  <eliz@is.elta.co.il>
908         * Makefile.in (TAGS): Don't use -t, it's the default behavior for
909         etags, so it barfs if invoked with -t.
911 2002-03-17  Richard M. Stallman  <rms@gnu.org>
913         * lwlib.c (P_): Definitions deleted.
915 2002-03-16  Eli Zaretskii  <eliz@is.elta.co.il>
917         * lwlib.c (P_): Don't define if already defined.
919 2002-01-27  Pavel Janík  <Pavel@Janik.cz>
921         * lwlib-Xaw.c (xaw_update_scrollbar, xaw_scrollbar_scroll)
922         (xaw_scrollbar_jump): Put whole functions in #if 0.
924 2002-01-09  Pavel Janík  <Pavel@Janik.cz>
926         * lwlib-Xaw.c (xaw_create_dialog): Initialize icon_name to
927         suppress compiler warnings.
929 2001-12-18  Pavel Janík  <Pavel@Janik.cz>
931         * lwlib.c (separator_names): Add missing braces around initializers.
933 2001-12-08  Pavel Janík  <Pavel@Janik.cz>
935         * COPYING: New file.
937 2001-12-01  Richard M. Stallman  <rms@gnu.org>
939         * lwlib.h (_widget_value): `help' has type Lisp_Object.
941         * xlwmenu.c, lwlib-Xaw.c, lwlib-Xlw.c: Include ../src/lisp.h.
942         * lwlib-Xm.c, lwlib-Xol.c, lwlib-Xolmb.c: Include ../src/lisp.h.
943         * lwlib-utils.c: Include ../src/lisp.h.
945         * lwlib.c: Include ../src/lisp.h.  Don't declare xmalloc.
946         (free_widget_value_tree): Don't free `help' field.
947         (copy_widget_value_tree): Copy `help' simply, without safe_strdup.
948         (merge_widget_value): Compare and copy `help' simply.
950 2001-11-28  Richard M. Stallman  <rms@gnu.org>
952         * Makefile.in (TAGS): Find the source files in $(srcdir).
954 2001-10-20  Gerd Moellmann  <gerd@gnu.org>
956         * (Version 21.1 released.)
958 2001-10-09  Gerd Moellmann  <gerd@gnu.org>
960         * lwlib-Xaw.c (xaw_create_scrollbar) [!0]: Return NULL.
961         From Hallvard B Furuseth <h.b.furuseth@usit.uio.no>.
963 2001-10-05  Gerd Moellmann  <gerd@gnu.org>
965         * Branch for 21.1.
967 2001-04-30  Gerd Moellmann  <gerd@gnu.org>
969         * xlwmenu.c (xlwmenu_window_p): New function.
971 2001-03-23  Gerd Moellmann  <gerd@gnu.org>
973         * lwlib-Xlw.c (x_print_complete_resource_name) [0]: New function.
975 2001-03-22  Gerd Moellmann  <gerd@gnu.org>
977         * lwlib-Xm.c (x_print_complete_resource_name) [0]: New function.
979 2001-03-13  Gerd Moellmann  <gerd@gnu.org>
981         * lwlib-Xm.c (make_menu_in_widget): Remove code forcing LessTif to
982         recompute centered text; it works fine without with current LessTif.
984         * lwlib-Xm.c (make_menu_in_widget): Add an XmNpopdownCallback
985         instead of an XmNunmapCallback.
986         (xm_unmap_callback): Remove.
988         * lwlib-Xm.c (make_menubar): Take out code in #if 0.
990         * lwlib-Xm.c (xm_popup_menu): Don't set XmNmenuPost unless
991         necessary.  From Rick Scott <rwscott@alumni.uwaterloo.ca>.
993 2001-02-28  Gerd Moellmann  <gerd@gnu.org>
995         * lwlib-Xm.c (xm_arm_callback): Don't compare widgets with `None',
996         use NULL instead.
998         * lwlib-Xaw.c (xaw_update_one_widget): Use XtSetSensitive instead
999         of setting the value of XtNsensitive.
1001         * lwlib-Xm.c (xm_update_radiobox, update_one_menu_entry)
1002         (xm_update_one_widget): Use XtSetSensitive instead of setting the
1003         value of XmNsensitive.  From Rick Scott <rwscott@alumni.uwaterloo.ca>.
1005 2000-12-14  Dave Love  <fx@gnu.org>
1007         * xlwmenu.c (gray_bitmap_bits): Remove `unsigned' from declaration.
1009 2000-12-11  Dave Love  <fx@gnu.org>
1011         * xlwmenu.c (draw_separator) <SEPARATOR_SHADOW_ETCHED_IN_DASH>:
1012         <SEPARATOR_SHADOW_ETCHED_OUT_DASH>: Fix call of draw_separator.
1014 2000-12-07  Gerd Moellmann  <gerd@gnu.org>
1016         * lwlib-Xm.c (xm_arm_callback): Fix last change.
1018 2000-11-30  Gerd Moellmann  <gerd@gnu.org>
1020         * lwlib-Xm.c (xm_arm_callback): Handle case that W is null;
1021         also see comment there.
1023 2000-11-21  Gerd Moellmann  <gerd@gnu.org>
1025         * xlwmenu.c (xlwmenu_redisplay): New function.
1027 2000-09-30  Stefan Monnier  <monnier@cs.yale.edu>
1029         * lwlib.c (lw_separator_p): Init separator_p (bug with "-- some text").
1031 2000-09-28  Sam Steingold  <sds@gnu.org>
1033         * xlwmenu.c: Before including <X11/Xos.h> on SUN, define SUNOS41
1034         to avoid redefining struct timeval and struct timezone.
1036 2000-09-04  Miles Bader  <miles@gnu.org>
1038         * xlwmenu.c (XlwMenuSetValues): Only frob the display if the menu
1039         is actually displayed.
1040         (remap_menubar): Only include the menu-margin in the initial X & Y
1041         positions for horizontal menu-bars.
1042         (fit_to_screen): If moving a sub-menu to the left-side, increment
1043         its x-position by the shadow-thickness to make it look more
1044         attached to the invoking menu-item (similarly to the way it would
1045         be displayed on the right side).
1047 2000-09-03  Miles Bader  <miles@gnu.org>
1049         * xlwmenu.c (x_alloc_lighter_color_for_widget): New extern declaration.
1050         (make_shadow_gcs) [emacs]: Use x_alloc_lighter_color_for_widget to
1051         do shadow calculation.
1052         (make_shadow_gcs): Remove code that tests whether the top shadow
1053         is dimmer than the bottom shadow--it shouldn't ever happen.
1055 2000-08-30  Miles Bader  <miles@gnu.org>
1057         * xlwmenu.c (XlwMenuSetValues): If the background color has
1058         changed, re-make the shadow-gcs too.
1060 2000-08-03  Gerd Moellmann  <gerd@gnu.org>
1062         * lwlib.c, lwlib-Xm.c, lwlib-Xaw.c: Use NULL at the end of the
1063         variable argument lists of XtVaSetValues and XtVaGetValues
1064         functions because 0 is not sufficient on systems where sizeof
1065         (int) < sizeof (void *).
1067 2000-07-19  Gerd Moellmann  <gerd@gnu.org>
1069         * xlwmenu.c [emacs]: Don't include <X11/bitmaps/gray> because that
1070         leads to redefinition errors when static is defined as empty in
1071         config.h.  Refer to the gray bitmap in xfns.c, instead.
1073 2000-07-18  Dave Love  <fx@gnu.org>
1075         * lwlib-utils.c (XtApplyToWidgets): Cast args of lwlib_bcopy.
1077 2000-06-23  Dave Love  <fx@gnu.org>
1079         * lwlib-Xlw.c (xlw_popup_menu): Cast arg of pop_up_menu.
1081         * lwlib-utils.c: Include lwlib.h.
1083 2000-06-16  Gerd Moellmann  <gerd@gnu.org>
1085         * xlwmenuP.h (_XlwMenu_part): Add free_top_shadow_color_p and
1086         free_bottom_shadow_color_p.
1088         * xlwmenu.c (make_shadow_gcs): Set free_top_shadow_color_p
1089         and free_top_shadow_color_p flags in the menu widget if
1090         top and bottom shadow colors must be freed.
1091         (release_shadow_gcs): Free colors only if they must be freed.
1093 2000-06-12  Gerd Moellmann  <gerd@gnu.org>
1095         * xlwmenu.c (make_shadow_gcs): Free and copy colors so that
1096         color reference counts are right.
1097         (release_shadow_gcs): Free colors.
1099 2000-06-06  Dave Love  <fx@gnu.org>
1101         * xlwmenu.c (x_alloc_nearest_color_for_widget, x_catch_errors)
1102         (x_uncatch_errors, x_had_errors_p, x_clear_errors): Add prototypes
1103         -- should be moved into separate header.
1104         (make_shadow_gcs) <x_alloc_nearest_color_for_widget>: Cast first arg.
1105         (Start) <pop_up_menu>: Cast second arg.
1107         * lwlib.c (P_): Use PROTOTYPES.
1108         (safe_strdup): Declare arg const.
1109         (lw_modify_all_widgets) <!info>: Return 0.
1111         * lwlib-Xm.c (P_): Use PROTOTYPES.
1113         * xlwmenu.h, lwlib.h, lwlib-utils.h, lwlib-int.h, lwlib-Xm.h:
1114         * lwlib-Xlw.h, lwlib-Xaw.h: Enable prototypes.
1116         * lwlib-Xaw.c (xaw_popup_menu): Add EVENT arg.
1118         * Makefile.in (lwlib.o): Depend on lwlib-Xlw.h.
1119         (lwlib-Xlw.o): Depend on lwlib-Xlw.h.
1120         (lwlib-Xaw.o): Depend on lwlib-Xaw.h.
1121         (lwlib-Xm.o): Depend on lwlib-Xm.h.
1123 2000-03-12  Gerd Moellmann  <gerd@gnu.org>
1125         * lwlib-Xm.c (make_menubar) [LESSTIF_VERSION]: Don't set
1126         XmNresizeHeight and XmNresizeWidth.
1128 2000-03-08  Dave Love  <fx@gnu.org>
1130         * Makefile.in (liblw.a): Don't bother testing for ranlib failing
1131         since configure sets it up.
1133 2000-03-06  Gerd Moellmann  <gerd@gnu.org>
1135         * lwlib-Xm.c (make_menubar): Set XmNresizeHeight and
1136         XmNresizeWidth resources only if LESSTIF_VERSION is defined.
1138 2000-03-05  Gerd Moellmann  <gerd@gnu.org>
1140         * lwlib-Xm.c (xm_manage_resizing): Rewritten.
1142         * lwlib.c (lw_modify_all_widgets): Return non-zero if widget
1143         tree was changed.
1144         (merge_widget_value): Add parameter CHANGE_P.  Set *CHANGE_P
1145         to 1 if a change occurs.
1147         * lwlib.h (lw_modify_all_widgets): Change prototype.
1149 2000-03-04  Gerd Moellmann  <gerd@gnu.org>
1151         * xlwmenu.c (make_shadow_gcs): Use the widget's colormap instead
1152         of the screen's default colormap.
1154 2000-02-18  Gerd Moellmann  <gerd@gnu.org>
1156         * lwlib.c (merge_widget_value): Fix incorrect assignment of
1157         safe_strdup'd help string.
1159 2000-01-25  Gerd Moellmann  <gerd@gnu.org>
1161         * lwlib-Xm.c (make_menu_in_widget): Don't add XmNpopdownCallback,
1162         add XmNunmapCallback.
1163         (xm_unmap_callback): New function.
1164         (xm_pull_down_callback): Call pre-activate callback only if
1165         parent is the menu bar.
1167 2000-01-17  Gerd Moellmann  <gerd@gnu.org>
1169         * lwlib-Xm.c (xm_arm_callback): New function.
1170         (make_menu_in_widget): Set xm_arm_callback as XmNarmCallback and
1171         XmNdisarmCallback for buttons (not supported for other widgets).
1172         (make_menubar): Set XmNresizeHeight and XmNresizeWidth to False.
1174         * lwlib-Xlw.c (highlight_hook): New function.
1175         (xlw_create_menubar, xlw_create_popup_menu): Add highlight_hook as
1176         callback XtNhighlightCallback.
1178         * lwlib.c (copy_widget_value_tree): Copy help string.
1179         (free_widget_value_tree): Free help string.
1180         (merge_widget_value): Handle help string.
1181         (allocate_widget_info, lw_register_widget, lw_create_widget):
1182         Add parameter HIGHLIGHT_CB.
1183         (lw_get_widget_instance): New function.
1185         * lwlib-int.h: Add prototype for lw_get_widget_instance.
1187         * lwlib.h (_widget_value): Add help string.
1189         * xlwmenu.c (xlwMenuResources): All XtNhighlightCallback.
1190         (remap_menubar): Call highlight callback.
1192         * xlwmenu.h (XtNhighlightCallback): New define.
1194         * xlwmenuP.h (_XlwMenu_part): Add `highlight' callback list.
1196 1999-10-19  Paul Eggert  <eggert@twinsun.com>
1198         Add support for large files, plus some locale improvements.
1200         * dispatch.c, lwlib-Xaw.c, lwlib-Xlw.c, lwlib-Xm.c, lwlib.c, xlwmenu.c,
1201         * xrdb-cpp.c, xrdb.c:
1202         Include <config.h> before any system include files.
1204         * lwlib-Xm.c, lwlib.c:
1205         Do not include <stdlib.h> or <string.h>, as <config.h> does this.
1207 1999-10-07  Gerd Moellmann  <gerd@gnu.org>
1209         * lwlib-Xm.c (make_menu_in_widget, update_one_menu_entry):
1210         Use widgets instead of gadgets to be able to set colors.
1212 1999-09-17  Richard Stallman  <rms@gnu.org>
1214         * lwlib-Xaw.c (wm_delete_window): Check all the shell's children,
1215         not just the first, to find the dialog box.
1217 1999-09-14  Gerd Moellmann  <gerd@gnu.org>
1219         * lwlib.c (lw_separator_p): Check for new-style separators differently.
1221 1999-09-10  Gerd Moellmann  <gerd@gnu.org>
1223         * lwlib.c (lw_separator_p): Add `--:space' with the same
1224         meaning as `--:noLine'.
1226 1999-09-06  Gerd Moellmann  <gerd@gnu.org>
1228         * lwlib.c (lw_separator_p): Add alternative separator type names.
1230 1999-09-03  Gerd Moellmann  <gerd@gnu.org>
1232         * xlwmenu.c (make_shadow_gcs): Call x_alloc_nearest_color_for_widget.
1234 1999-07-12  Gerd Moellmann  <gerd@gnu.org>
1236         * lwlib-Xm.c: Add function prototypes.
1238         * lwlib-Xm.c (xm_update_label): Use val->name to look up
1239         a label string from resources.
1240         (xm_update_label): Add some comments.
1242 1999-07-12  Gerd Moellmann  <gerd@gnu.org>
1244         * xlwmenu.c (all_dashes_p): Removed.
1245         (size_menu_item): Call lw_separator_p.
1246         (display_menu_item): Ditto.
1247         (display_menu): Ditto.
1248         (draw_separator): New.
1249         (display_menu_item): Call it.
1250         (separator_height): New.
1251         (size_menu_item): Call it.
1253         * lwlib-Xm.c (all_dashes_p): Removed.
1254         (make_menu_in_widget): Use lw_separator_p.  Set Motif separator type.
1256         * lwlib.c (lw_separator_p): New.
1258         * lwlib.h (enum menu_separator): New.
1260 1999-07-12  Gerd Moellmann  <gerd@gnu.org>
1262         * lwlib-Xm.c (make_menu_in_widget): Set alignment of menu
1263         title after all widgets have been created.
1265 1999-07-12  Gerd Moellmann  <gerd@gnu.org>
1267         * xlwmenu.c (toggle_button_width): Renamed from
1268         toggle_or_radio_button_width.
1269         (radio_button_width): New.
1270         (size_menu_item): Use new functions.
1271         (draw_shadow_rhombus): New.
1272         (draw_radio): Use radio_button_width and draw_shadow_rhombus.
1273         (draw_toggle): Use toggle_button_width.
1275 1999-07-12  Gerd Moellmann  <gerd@gnu.org>
1277         * lwlib-Xm.c (xm_update_toggle): Add callback xm_generic_callback
1278         instead of xm_internal_update_other_instances.
1280         * lwlib-Xm.c (make_menu_in_widget): Do help button before managing
1281         children to get it to the right place.
1282         (make_menu_in_widget): Create toggle buttons.
1283         (update_one_menu_entry): Update toggle buttons.
1285         * xlwmenu.c (size_menu_item): Add parameter button_width.
1286         (size_menu): Compute button_width.
1287         (toggle_or_radio_button_width): New.
1288         (draw_toggle): New.
1289         (draw_radio): New.
1290         (draw_shadow_rectangle): Add parameter `down_p'.
1292         * xlwmenuP.h (_window_state): Add button_width.
1294 1999-07-12  Gerd Moellmann  <gerd@gnu.org>
1296         * xlwmenu.c (make_shadow_gcs) [emacs]: Use x_alloc_nearest_color.
1298         * lwlib.c (merge_widget_value): Handle button_type.
1299         (copy_widget_value_tree): Copy button_type.
1301         * lwlib.h (enum button_type): New.
1302         (_widget_value): New member button_type.
1304 1999-07-12  Gerd Moellmann  <gerd@gnu.org>
1306         * lwlib-Xm.c (make_menu_in_widget): Test for menubar widgets
1307         using XmNrowColumnType.
1309 1999-07-12  Gerd Moellmann  <gerd@gnu.org>
1311         * xlwmenu.c (abort_gracefully): New.
1312         (display_menu): Use it instead of abort.
1313         (size_menu): Ditto.
1315 1999-07-12  Gerd Moellmann  <gerd@gnu.org>
1317         * xlwmenu.c (xlwMenuResources): Change previously unused
1318         XtNmargin to 4.
1319         (size_menu): Take margin into account.
1320         (display_menu_item): Ditto.
1321         (remap_menubar): Ditto.
1322         (draw_arrow): Draw it 3D.
1324 1999-07-12  Richard Stallman  <rms@gnu.org>
1326         * Version 20.4 released.
1328 1998-08-19  Richard Stallman  <rms@psilocin.ai.mit.edu>
1330         * Version 20.3 released.
1332 1998-07-30  Paul Eggert  <eggert@twinsun.com>
1334         * Makefile.in (lwlib-utils.o, lwlib.o, lwlib-Xlw.o)
1335         (lwlib-Xaw.o, lwlib-Xm.o, lwlib-Xol.o, lwlib-Xolmb.o):
1336         Add dependencies to corresponding .c files for Solaris 2.x VPATH make.
1338 1998-04-06  Andreas Schwab  <schwab@gnu.org>
1340         * lwlib.c: Always declare xmalloc.
1341         [USE_XAW]: Include <X11/Xaw/Paned.h>.
1342         (lwlib_memset, lwlib_bcopy): Explicitly declare return type.
1344 1997-12-20  Richard Stallman  <rms@psilocin.gnu.org>
1346         * lwlib-Xm.c (update_one_menu_entry):
1347         Add conditional in case XmNpositionIndex is missing.
1349 1997-09-19  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
1351         * Version 20.2 released.
1353         * xlwmenu.c (motion_event_is_in_menu): Extend the left and
1354         top windows by the shadow width.
1356 1997-09-15  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
1358         * Version 20.1 released.
1360 1997-07-23  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
1362         * xlwmenu.c (display_menu): If an item is disabled,
1363         don't display its submenu (if any).
1365 1997-05-01  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
1367         * xlwmenu.c (pop_up_menu): Update the call to x_catch_errors.
1369 1997-01-21  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
1371         * xlwmenu.c (fit_to_screen): If new menu would overlap the previous
1372         one from the side, try moving it up or down.
1374 1996-08-11  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
1376         * Version 19.33 released.
1378         * lwlib-Xm.c (update_one_menu_entry): Fix previous change:
1379         When XmIsCascadeButton, don't call XmCreateCascadeButtonGadget,
1380         just modify the existing one.
1382 1996-08-09  Marcus G. Daniels  <marcus@sayre.sysc.pdx.edu>
1384         * lwlib.c (merge_widget_value): Undo previous change.
1386         * lwlib-Xm.c (update_one_menu_entry): When creating a pulldown
1387         in an existing but empty menu item, in order to get a new functional
1388         pulldown, the menu item must be switched from an XmPushButtonGadget
1389         into a XmCascadeButtonGadget.
1391 1996-07-31  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
1393         * Version 19.32 released.
1395 1996-07-31  Marcus G. Daniels  <marcus@sayre.sysc.pdx.edu>
1397         * lwlib-Xm.c (make_menubar): Turn off menu accelerator.
1399 1996-07-24  Marcus G. Daniels  <marcus@sayre.sysc.pdx.edu>
1401         * lwlib.c (merge_widget_value) [USE_MOTIF]: Pass along the change
1402         flag from merged_contents.
1404 1996-07-13  Karl Heuer  <kwzh@gnu.ai.mit.edu>
1406         * lwlib-Xm.c (xm_update_menu): Fix loop termination test.
1408 1996-07-07  Karl Heuer  <kwzh@gnu.ai.mit.edu>
1410         * lwlib-Xm.h, lwlib-Xm.c, lwlib.h, lwlib.c: Undo previous change.
1412 1996-07-03  Marcus G. Daniels  <marcus@sayre.sysc.pdx.edu>
1414         * lwlib-Xm.h: Declare lw_motif_menu_related_event_p.
1416         * lwlib-Xm.c (lw_motif_menu_related_event_p): A predicate to
1417         identify keyboard events intended only for menus.
1419         * lwlib.h: Declare lw_toolkit_related_event_p.
1421         * lwlib.c (lw_toolkit_related_event_p): A predicate to identify
1422         toolkit-specific events.
1424 1996-06-07  Marcus G. Daniels  <marcus@sayre.sysc.pdx.edu>
1426         * lwlib-Xm.c (make_menu_in_widget): Set mapping delay
1427         for cascade buttons to zero.
1429 1996-05-25  Karl Heuer  <kwzh@gnu.ai.mit.edu>
1431         * Version 19.31 released.
1433 1996-03-31  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1435         * lwlib-Xm.c (destroy_all_children): When freeing a cascade button,
1436         free its submenu too.
1437         (make_menu_in_widget): Use a cascade button gadget, not a widget.
1438         Include Xm/CascadeBG.h.
1440 1996-03-29  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1442         * Makefile.in (tags): New target.
1444 1996-03-28  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1446         * Makefile.in (TAGS): Renamed from `tags' and fixed to work.
1448 1996-03-26  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1450         * Makefile.in (xlwmenu.o): New explicit target.
1452 1996-03-24  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1454         * lwlib.h (struct widget_value): New field this_one_change.
1455         * lwlib.c (merge_widget_value): Set the this_one_change field.
1456         * lwlib-Xm.c (destroy_all_children): New arg first_child_to_destroy.
1457         (make_menu_in_widget): New arg keep_first_children.
1458         (xm_update_menu): Preserve the first children even if later ones
1459         have a structural change.
1460         (update_one_menu_entry): Use this_one_change field.
1462 1996-03-01  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1464         * xlwmenu.c (motion_event_is_in_menu): Make x and y signed.
1466 1996-02-25  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1468         * lwlib.c (lw_window_is_in_menubar) [USE_MOTIF]:
1469         With Motif, the window WIN can be the menu bar widget itself.
1471 1996-02-21  Richard Stallman  <rms@whiz-bang.gnu.ai.mit.edu>
1473         * lwlib.c (free_widget_value_tree, merge_widget_value):
1474         Use XtFree for the toolkit_data.
1476 1996-02-19  Karl Heuer  <kwzh@gnu.ai.mit.edu>
1478         * lwlib.c (lw_internal_update_other_instances): Move static var
1479         outside the function, and rename it to lwlib_updating.
1481 1996-01-04  Paul Eggert  <eggert@twinsun.com>
1483         * lwlib.c (instantiate_widget_instance): Renamed from
1484         instanciate_widget_instance (spelling correction).
1485         All callers changed.
1487 1995-12-31  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1489         * xlwmenu.c (xlwMenuActionsList): Add "key" and "nothing".
1490         (xlwMenuTranslations): Add translations for Key, KeyUp,
1491         and for the modifier keysyms.
1492         (Nothing, Key): New functions.
1494 1995-12-24  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1496         * xlwmenu.c (XlwMenuSetValues): Do redisplay if non-null contents
1497         get replaced by empty contents.
1499         * lwlib.c (merge_widget_value): Treat disappearance of entire contents
1500         as a STRUCTURAL_CHANGE.
1502 1995-12-20  Richard Stallman  <rms@whiz-bang.gnu.ai.mit.edu>
1504         * lwlib-utils.c: Add #undef for index and rindex.
1506 1995-11-24  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1508         * Version 19.30 released.
1510 1995-11-13  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1512         * xlwmenu.c (display_menu_item): Fix previous change.
1514 1995-11-04  Richard Stallman  <rms@whiz-bang.gnu.ai.mit.edu>
1516         * xlwmenu.c (display_menu_item): Don't treat buttons specially.
1518 1995-08-14  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1520         * Makefile.in (RANLIB): Get this var from configure.
1522 1995-08-02  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1524         * lwlib.c (lw_popup_menu): New arg `event', passed along.
1525         * lwlib-Xlw.c (xlw_popup_menu): New arg `event'.
1526         * lwlib-Xm.c (xm_popup_menu): New arg `event'.
1528 1995-06-19  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1530         * Version 19.29 released.
1532 1995-06-11  Richard Stallman  <rms@gnu.ai.mit.edu>
1534         * lwlib.c (lwlib_toolkit_type): New variable.
1536 1995-05-26  Richard Stallman  <rms@gnu.ai.mit.edu>
1538         * xlwmenu.c (Drag): Do nothing unless menu.popped_up field is set.
1540 1995-05-22  Karl Heuer  <kwzh@hal.gnu.ai.mit.edu>
1542         * xlwmenu.c (XlwMenuInitialize): Cast XCreatePixmapFromBitmapData args.
1544 1995-05-20  Karl Heuer  <kwzh@nutrimat.gnu.ai.mit.edu>
1546         * lwlib.c: Don't use prototype.
1547         * lwlib-Xm.c (activate_button, xm_update_cascadebutton): Likewise.
1549 1995-05-05  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1551         * lwlib.c (lw_refigure_widget) [USE_MOTIF]: Fix backward if.
1553 1995-05-04  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1555         * Makefile.in (ALL_CFLAGS): Add -I../src.
1557 1995-05-03  Morten Welinder  <terra+@cs.cmu.edu>
1559         * lwlib.c [__osf__]: Include string.h and stdlib.h.
1560         [__osf__] (xmalloc): Declared.
1562 1995-04-13  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1564         * lwlib-Xm.c (update_one_menu_entry, make_menu_in_widget):
1565         Specify more useful names in XmCreatePulldownMenu calls.
1567         * lwlib-Xaw.c (xaw_pop_instance): Make x, y, w, h unsigned.
1569         * xlwmenu.c (size_menu): Make height and label_width unsigned.
1570         (fit_to_screen): Make screen_width and screen_height unsigned.
1571         (motion_event_is_in_menu): Make x, y unsigned.
1573 1995-04-09  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1575         * lwlib-utils.c: If HAVE_CONFIG_H, include config.h.
1577         * Makefile.in (ALL_CFLAGS): Define HAVE_CONFIG_H.
1578         Add -I${srcdir}/../src.
1580 1995-04-08  Paul Reilly  <pmr@geech.gnu.ai.mit.edu>
1582         * lwlib-Xm.c: Remove function prototypes.
1583         (xm_pop_down_callback): Call the deactivation callback only when
1584         popping down the top level submenu.
1586 1995-04-07  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1588         * Makefile.in (lwlib.o): Depend on Makefile.
1590         * lwlib-Xm.h: Remove function prototypes.
1592         * lwlib-Xm.c (remove_grabs): Use type Widget for `menu'.
1594 1995-02-15  Paul Reilly  <pmr@geech.gnu.ai.mit.edu>
1596         * Makefile.in (ALL_CFLAGS): Allow include files to be found in
1597         `srcdir'.
1599 1995-02-07  Richard Stallman  <rms@pogo.gnu.ai.mit.edu>
1601         * Makefile.in (maintainer-clean): Renamed from realclean.
1603 1994-11-28  Richard Stallman  <rms@bethel>
1605         * lwlib-int.h (safe_strdup): Don't use ANSI argument prototype.
1607 1994-11-15  Paul Reilly  <pmr@duality.gnu.ai.mit.edu>
1609         * lwlib.c (lw_refigure_widget): Use the macro USE_XAW rather than XAW.
1611 1994-11-08  Paul Reilly  <pmr@duality.gnu.ai.mit.edu>
1613         * lwlib-Xm.c (make_menu_in_widget): Differentiate a separator
1614         entry ("--") from a title.
1615         (xm_pop_down_callback): Filter all but the last pop down callbacks.
1617 1994-11-07  Paul Reilly  <pmr@duality.gnu.ai.mit.edu>
1619         * lwlib-Xm.c (update_one_menu_entry): Use the parent of the
1620         cascade button as the parent of the pulldown, rather than the
1621         cascade button itself.  This works around a Motif SIGSEGV in the
1622         function `InSharedMenuHierarchy'.
1624 1994-10-26  Richard Stallman  <rms@duality.gnu.ai.mit.edu>
1626         * xlwmenu.c (pop_up_menu): Pass a Display * to x_catch_errors, etc.
1628 1994-10-26  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1630         * xlwmenu.c (xlwmenu_default_font): New global variable.
1631         (XlwMenuInitialize): Use xlwmenu_default_font to default
1632         the font if necessary.  Make mw, itself, an argument.
1634         * xlwmenu.c (pop_up_menu): Pass a Display * to x_catch_errors, etc.
1636 1994-10-08  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1638         * xlwmenu.c (fit_to_screen): Don't put the menu off the left or top.
1640 1994-10-02  Paul Reilly  <pmr@geech.gnu.ai.mit.edu>
1642         * xlwmenu.c (display_menu_item): Add support for displaying the
1643         title in pop up menus.
1645         * lwlib.c (lw_set_main_areas): Use xm_set_main_areas().
1646         (lw_manage_resizing): Use xm_manage_resizing() for Emacs/Motif.
1648 1994-09-25  Paul Reilly  <pmr@geech.gnu.ai.mit.edu>
1650         * lwlib-Xaw.c (xaw_create_main): New function to support the
1651         toolkit independent creation of the main Emacs widget.  *
1652         lwlib-Xlw.c (xlw_create_menubar): When compiling under Emacs, set
1653         resizing resources to disable showGrip and to enable both
1654         resizeToPreferred and allowShellResize.
1656         * lwlib-Xm.h: Declare xm_set_main_areas, xm_manage_resizing.
1658         * lwlib-Xm.c (make_menu_in_widget): Add support for displaying a
1659         title in pop up menus.
1660         (make_main, xm_set_main_areas, xm_manage_resizing): New functions to
1661         create and manage a Motif Main Window widget.
1663         * xlwmenu.c: Add #include <X11/ObjectP.h> for X11R4.
1665 1994-09-18  Frederic Pierresteguy  <F.Pierresteguy@frcl.bull.fr>
1667         * lwlib-Xm.c (make_dialog): When there is more than two pushbuttons,
1668         set XmPACK_TIGHT and XmHORIZONTAL to the rowcolumn.  Also add a
1669         margin of 10 pixels.
1671 1994-09-16  Paul Reilly  <pmr@geech.gnu.ai.mit.edu>
1673         * lwlib-Xm.c (make_main): New function to support toolkit
1674         independent creation of the main Emacs widget.
1675         (make_destroyed_instance): Use safe_strdup() instead of strdup().
1677         * lwlib-int.h: Declare safe_strdup.
1679         * lwlib.c (lw_refigure_widget): New function.  Handle geometry
1680         management inside lwlib instead of in Emacs.
1681         (lw_window_is_in_menubar): New function.  Determine if the pointer
1682         is in a menubar.
1683         (lw_set_main_areas): New function.  Set the main window widgets for
1684         Motif.
1686         * lwlib.h: Declare lw_refigure_widget(), lw_window_is_in_menubar(),
1687         lw_set_main_areas().
1689         * xlwmenu.h: Define Xt{Ns,CS}howGrip, Xt{Nr,CR}esizeToPreferred, and
1690         Xt{Na,CA}llowResize.
1692         * xlwmenu.c (Start): Use pop_up_menu() to post the submenus.
1693         (Select): Remove the pointer grab when popping down a menubar submenu.
1694         (pop_up_menu): Handle popping up submenus from a menubar, i.e. when
1695         the menu widget parent is not a shell widget.
1697 1994-08-25  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1699         * xlwmenu.c (pop_up_menu): Clear next_release_must_exit.
1700         (Start): Clear next_release_must_exit when popping up the menu.
1702 1994-08-24  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1704         * xlwmenu.c (Start): Set menu_post_event or next_release_must_exit.
1705         (Select): Do nothing if the menu should be left posted.
1707 1994-07-28  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
1709         * xlwmenu.c (make_windows_if_needed, pop_up_menu):
1710         Enable mouse motion events even when no button down.
1712 1994-07-11  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1714         * xlwmenu.c (pointer_grabbed): New variable.
1715         (pop_up_menu): Set the variable.
1716         (XlwMenuDestroy): Maybe call XtUngrabPointer.
1718 1994-05-25  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1720         * lwlib.c (max): Function deleted.  Define as macro instead,
1721         but only if not already defined.
1723 1994-05-20  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1725         * xlwmenu.c (xlwMenuResources): Use XtRDimension for shadow thickness.
1727 1994-05-19  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1729         * lwlib-Xaw.c (xaw_pop_instance): Use XtSetValues, not XtMoveWidget.
1731 1994-05-16  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1733         * lwlib.c (lwlib_memset: New function, used instead of memset.
1734         All callers changed.
1735         * lwlib.c (lwlib_bcopy): New function.
1736         * lwlib-utils.c (XtApplyToWidgets): Use lwlib_bcopy.
1738         * lwlib.c: Delete definitions for use of alloca.
1739         (name_to_widget): Use xmalloc, not alloca.
1741 1994-05-12  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1743         * xlwmenu.c (XlwMenuDestroy): Set new var submenu_destroyed.
1744         (XlwMenuRedisplay): If it's set, truncate the old_depth to 1.
1746 1994-05-09  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1748         * xrdb-cpp.c: Don't include string.h, unistd.h, stdlib.h.
1749         * lwlib-Xaw.c: Don't include string.h, unistd.h, stdlib.h.
1750         * lwlib-utils.c (XtApplyToWidgets): Use bcopy, not memcpy.
1751         * lwlib-utils.c: Don't include string.h, unistd.h, stdlib.h, memory.h.
1752         * xlwmenu.c: Don't include string.h, unistd.h, stdlib.h.
1753         * lwlib.c: Don't include string.h, unistd.h, stdlib.h.
1754         (safe_strdup): No longer static.
1755         * lwlib-Xm.c: Use safe_strdup, not strdup.
1757         * xlwmenu.c (string_width): No longer static.
1759 1994-05-06  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1761         * xlwmenuP.h (struct _XlwMenu_part): Use Pixel and Cursor
1762         for foreground and cursor_shape fields.
1764         * xlwmenu.c (XlwMenuSetValues): Check for change of font.
1766 1994-04-28  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1768         * Makefile.in: Delete all SRCS variables (unused).
1769         (lwlib.o, xrdb-cpp.o): Mention srcdir in dep.
1771 1994-04-15  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1773         * Makefile.in (ALL_CFLAGS): Don't define THIS_IS_X11R4.
1775         * xrdb.c: Define HAVE_X11R5 as in xterm.h.
1776         Include X11/Xlib.h, X11/cursorfont.h and X11/Xutil.h.
1777         (_XtDisplayInitialize): Test HAVE_X11R5.
1779         * dispatch.c: Define HAVE_X11R5 as in xterm.h.
1780         Include X11/Xlib.h, X11/cursorfont.h and X11/Xutil.h.
1781         (_XtConvertTypeToMask): Conditionalize on HAVE_X11R5.
1782         (WouldDispatchEvent): Likewise.
1784 1994-04-12  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1786         * lwlib-Xaw.c (xaw_generic_callback): Declare without arg names.
1788 1994-04-01  Frederic Pierresteguy  (fp@hal.gnu.ai.mit.edu)
1790         * lwlib-Xaw.c (make_dialog): Don't allow any geometry request from the
1791         user.
1793 1994-03-22  Frederic Pierresteguy  (fp@mole.gnu.ai.mit.edu)
1795         * xlwmenu.c (XlwMenuResize): Don't allow the popup menu to resize
1796         itself.  Therefore reset the size to its initial value.
1798 1994-03-19  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1800         * lwlib-Xaw.c (xaw_update_one_widget): Finish replacing XtVaSetValues.
1801         Don't test for scrollbar widget.
1803 1994-03-14  Frederic Pierresteguy  (fp@gnu.ai.mit.edu)
1805         * lwlib-int.h: Declare lw_get_widget_info.
1807         * lwlib.c (lw_get_widget_info): Comment out arg in function decl.
1809         * lwlib-Xaw.h: Comment out args in function decls.
1810         * lwlib-Xaw.c: Convert all function definitions to non-prototype K&R.
1811         (xaw_update_one_widget - case dialogWidgetClass): Call XtSetValues,
1812         not XtVaSetValues.
1814 1994-03-11  Frederic Pierresteguy  (F.Pierresteguy@frcl.bull.fr)
1816         * xlwmenu.c (display_menu_item): Modify parameters to draw_arrow to
1817         right justify the arrow in the pane.
1819         * lwlib.c: If not defined USE_MOTIF and defined USE_LUCID then
1820         define USE_XAW.
1822         * Makefile.in (LUCID_SRCS, LUCID_OBJS): Add the target lwlib-Xaw.[oc].
1824         * lwlib.c, lwlib-int.h: Merged from Lucid 19.9 release.
1825         * lwlib.c (_AIX): Replace the AIXV3 directive.
1826         (USE_XAW): New macro to conditionalize the use of the athena toolkit.
1827         (lw_get_widget_info): New function.
1828         (set_one_value): Handle USE_XAW.
1829         (instanciate_widget_instance): Likewise.
1830         (destroy_one_instance): Likewise.
1831         (lw_pop_all_widgets): Likewise.
1832         (lw_pop_down_all_widgets): Likewise.
1833         (get_one_value): Likewise.
1835         * lwlib-Xaw.c, lwlib-Xaw.h: New files.
1837 1994-02-23  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1839         * xlwmenu.c (XlwMenuInitialize, XlwMenuDestroy): Undo previous changes.
1841         * lwlib-Xlw.c (xlw_create_menubar, xlw_create_popup_menu):
1842         Use XtCreate..., not XtVaCreate...
1843         No need to copy instance->info->val any more.
1844         (xlw_update_one_widget): Use XtSetValues, not XtVaSetValues.
1846 1994-02-21  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1848         * xlwmenu.c (pop_up_menu): Call XtUngrabPointer if XtGrabPointer fails.
1850 1994-02-19  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1852         * Makefile.in (xrdb-cpp.o, lwlib.o): Put ALL_CFLAGS after other flags.
1854         * lwlib-Xlw.c (xlw_create_menubar): Don't call free_widget_value.
1855         Use malloc for allocation.
1856         (xlw_create_popup_menu): Likewise.
1858 1994-02-18  Frederic Pierresteguy  (fp@mole.gnu.ai.mit.edu)
1860         * lwlib.c (malloc_cpt): New static variable.
1861         (malloc_widget_value): Increment malloc_cpt when allocating a cell.
1862         (free_widget_value): Really free the cells when the number of
1863         allocated ones is bigger than 25.
1865         * lwlib-Xlw.c (xlw_create_menubar): Call malloc_widget_value and
1866         free_widget_value instead of XtMalloc and XtFree.
1867         (xlw_create_popup_menu): Likewise.
1869 1994-02-17  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1871         * Makefile.in (ALL_CFLAGS): Specify -Demacs.
1873         * xlwmenu.c (pop_up_menu) [emacs]: Catch and ignore X protocol errors
1874         in XtGrabPointer.
1876 1994-02-17  Frederic Pierresteguy  (fp@mole.gnu.ai.mit.edu)
1878         * lwlib-Xlw.c (xlw_create_popup_menu): Pass tem to
1879         XtVaCreateManagedWidget, not instance->info->val.
1880         (xlw_create_menubar): Likewise.
1882 1994-02-15  Frederic Pierresteguy  (fp@mole.gnu.ai.mit.edu)
1884         * lwlib-Xlw.c (xlw_create_popup_menu): Copy instance->info->val
1885         before calling XtVaCreateManagedWidget and then free the copy.
1886         (xlw_create_menubar): Likewise.
1888 1994-02-11  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1890         * xlwmenu.c (XlwMenuInitialize): Copy mw->menu.contents.
1891         (XlwMenuDestroy): Free mw->menu.contents.
1893 1994-02-09  Frederic Pierresteguy  (fp@mole.gnu.ai.mit.edu)
1895         * xlwmenu.c (display_menu_item): Call draw_shadow_rectangle to make
1896         visible/invisible the selection of the menubar items.
1898 1994-02-08  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
1900         * lwlib.c (strcasecmp): Renamed to my_strcasecmp.
1901         (find_in_table): Changed only caller.
1903 1994-02-04  Frederic Pierresteguy  (fp@mole.gnu.ai.mit.edu)
1905         * xlwmenu.c (display_menu_item): When dealing with the menubar,
1906         always call XDrawRectangle to clear the selection after popping down
1907         the pulldown menu.
1909 1994-02-01  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1911         * lwlib.c: Include ctype.h.
1913 1994-01-31  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1915         * lwlib.c (strcasecmp): New function.
1917 1994-01-30  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1919         * xlwmenu.c, lwlib.c, lwlib-Xlw.c, lwlib-utils.c:
1920         Convert all function definitions to non-prototype K&R.
1922         * lwlib-Xlw.h: Comment out args in function decls.
1923         * lwlib.h: Comment out args in function decls.
1924         * lwlib-utils.h: Comment out args in function decls.
1926 1994-01-29  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1928         * lwlib.c: Include StringDefs.h after lwlib.h.
1930 1994-01-22  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
1932         * Makefile (xrdb-cpp.o, lwlib.o): Use $(srcdir) and file name
1933         instead of $*.
1934         (dispatch.o, xrdb.o, lwlib-Xm.o): Rules removed; they were
1935         superfluous and didn't work when configured outside srcdir.
1936         The implicit .c.o rule works fine.
1938 1994-01-21  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1940         * xlwmenu.c (resource_widget_value): Avoid using strdup.
1942 1994-01-18  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
1944         * Makefile.in: New file.
1946         * lwlib-Xolmb.c: Renamed from lwlib-Xol-mb.c.
1947         * lwlib-Xolmb.h: Renamed from lwlib-Xol-mb.h.
1948         * lwlib-XolmbP.h: Renamed from lwlib-Xol-mbP.h.
1950         * lwlib-int.h: Renamed from lwlib-internal.h.
1954 ;; Local Variables:
1955 ;; coding: utf-8
1956 ;; End:
1958   Copyright (C) 1995-1999, 2001-2015 Free Software Foundation, Inc.
1960   This file is part of GNU Emacs.
1962   GNU Emacs is free software: you can redistribute it and/or modify
1963   it under the terms of the GNU General Public License as published by
1964   the Free Software Foundation, either version 3 of the License, or
1965   (at your option) any later version.
1967   GNU Emacs is distributed in the hope that it will be useful,
1968   but WITHOUT ANY WARRANTY; without even the implied warranty of
1969   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1970   GNU General Public License for more details.
1972   You should have received a copy of the GNU General Public License
1973   along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.