1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-25 07:28:20 +00:00
Commit Graph

137 Commits

Author SHA1 Message Date
Jan Djärv
7aad87e884 Set _NET_WM_WINDOW_TYPE in menus. Looks bad with compiz otherwise.
xlwmenu.c (set_window_type): New function.
(make_windows_if_needed, XlwMenuRealize): Call set_window_type.
2010-04-17 20:18:12 +02:00
Jan D
f0bd159891 Don't redraw lucid menus more than needed. Use double buffer to reduce flicker.
* xlwmenu.c: Include Shell.h, remove duplicate declaration of
XlwMenuRedisplay.
(display_menu_item): Replace ws->window with ws->pixmap, remove
call to XftDrawRect.
(display_menu): Remove this and that argument.  Remove
just_compute_this_one_p. Fill pixmap at start and copy it to window
at end.
(expose_cb): New function.
(make_windows_if_needed): Replace XCreateWindow with XtCreatePopup.
Add eventhandler for expose to expose_cb.  Remove creation of
xft_draw.
(create_pixmap_for_menu): New function.
(remap_menubar): Pop down menus that aren't the same as in old_stack.
Set width, heigh, x, y on widget with XtVaSetValues.  Call
create_pixmap_for_menu.
Replace XUnmapWindow with XtPopdown.
Remowe two last parameters to display_menu.
(map_event_to_widget_value, XlwMenuRedisplay, Key, Select)
(pop_up_menu): Remowe two last parameters to display_menu.
(XlwMenuRealize): Call create_pixmap_for_menu, set w and pixmap.
Remove call to XftDrawCreate.
(XlwMenuDestroy): Free pixmap.  Call XtDestroyWidget instead of
XDestroyWindow.
(handle_motion_event): Only call handle_single_motion_event once.

* xlwmenuP.h (window_state): Add pixmap and w.
2010-04-17 19:43:03 +02:00
YAMAMOTO Mitsuharu
b117f7cc49 xlwmenu.c (facename_changed): Put function in #ifdef HAVE_XFT. 2010-04-16 10:08:29 +09:00
Dan Nicolaescu
76bd82023f Use autoconf, not cpp for some variables.
* Makefile.in (C_SWITCH_SYSTEM, C_SWITCH_MACHINE)
(C_SWITCH_X_SITE): Define using autoconf.

* Makefile.in (C_SWITCH_SYSTEM, C_SWITCH_MACHINE)
(C_SWITCH_X_SITE): Define using autoconf.

* Makefile.in (C_SWITCH_SYSTEM, C_SWITCH_MACHINE): Define using
autoconf, not cpp.
(ALL_CFLAGS): Use them as make variables.
2010-04-11 13:17:24 -07:00
Jan Djärv
1ecb2d3f03 Use XFT in Lucid dialogs if available.
* xmenu.c (apply_systemfont_to_dialog): New.
	(create_and_show_dialog): Call apply_systemfont_to_dialog if HAVE_XFT.

	* lwlib-Xaw.c (widget_xft_data): New for Xft data.
	(fill_xft_data, openFont, get_text_width_and_height)
	(draw_text, set_text, find_xft_data, command_press)
	(command_reset): New functions.
	(xaw_update_one_widget): Call set_text for dialog and buttons
	if HAVE_XFT.  Also set internalHeight for buttons.
	(xaw_destroy_instance): Free all Xft related data.
	(button_actions, buttonTrans): New structures.
	(make_dialog): Call XtAppAddActions for button_actions.
	Find xft font to use and call fill_xft_data for widgets.
	(xaw_create_dialog): Pass instance parameter to make_dialog.

	* lwlib-int.h (_widget_instance): Add Xft data if HAVE_XFT.
	Override translations for buttons.  If depth is 16 or more, tell
	Xaw3d to not be nice to colormap.
	Remove separator widget, use XtNhorizDistance on first right button
	instead.

	* xresources.texi (Lucid Resources): Mention faceName for dialogs.
2010-04-11 20:25:09 +02:00
Jan Djärv
99852628a8 Lucid menus can now use Xft for fonts.
* xsettings.c (current_font, SYSTEM_FONT, XSETTINGS_FONT_NAME): New.
(parse_xft_settings): Also check for XSETTINGS_FONT_NAME and save that
in current_font.
(init_gconf): Read value of SYSTEM_FONT and save it in current_font.
(Ffont_get_system_normal_font, xsettings_get_system_normal_font): New
functions.
(syms_of_xsettings): Initialize current_font. defsubr
Sfont_get_system_normal_font.

* xsettings.h (Ffont_get_system_normal_font,
xsettings_get_system_normal_font): Declare.

* xfns.c (extern xlwmenu_default_font): Remove.
(Fx_create_frame): Remove setting of xlwmenu_default_font, moved
to xlwmenu.c.

* menu.c (digest_single_submenu): If USE_LUCID and HAVE_XFT, encode
menu items in UTF-8.

* xmenu.c: include xsettings.h and xlwmenu.h if USE_LUCID.
(apply_systemfont_to_menu): New function.
(set_frame_menubar, create_and_show_popup_menu): Call
apply_systemfont_to_menu.

* xlwmenu.c (xlwmenu_default_font): Make static.
(xlwMenuResources): Add XtNfaceName and XtNdefaultFace.
(string_width): Use XftTextExtentsUtf8 if HAVE_XFT.
(MENU_FONT_HEIGHT, MENU_FONT_ASCENT): Add versions for
HAVE_XFT.
(size_menu): Set max_rest_width in window_state structure.
(display_menu_item): If HAVE_XFT and xft_draw is set, use
XftDrawRect and XftDrawStringUtf8 to draw text.
(make_windows_if_needed): Set max_rest_width and xft_draw
in windows[i].
(openXftFont): New.
(XlwMenuInitialize): Call openXftFont if HAVE_XFT. If mw->menu.font
is not set, load font fixed and save it in xlwmenu_default_font.
(XlwMenuInitialize): Set max_rest_width and xft_draw in windows[0].
(XlwMenuClassInitialize): Initialize xlwmenu_default_font.
(XlwMenuRealize): Set xft_fg, xft_bg, xft_disabled_fg and
windows[0].xft_draw if xft_font is set.
(XlwMenuDestroy): Destroy all xft_draw and close xft_font.
(facename_changed): New.
(XlwMenuSetValues): Call facename_changed. If face name did change,
close old fonts and destroy xft_draw:s.  Then create new ones.

* xlwmenu.h (XtNfaceName, XtCFaceName, XtNdefaultFace,
XtCDefaultFace): New.

* xlwmenuP.h (_window_state): Add max_rest_width and xft_draw.
(_XlwMenu_part): Add faceName,xft_fg, xft_bg, xft_disabled_fg and
xft_font.

* xresources.texi (Lucid Resources): Mention faceName to set Xft fonts.
2010-04-08 18:20:32 +02:00
Chong Yidong
288f9fc069 Bump version to 24.0.50. 2010-03-10 10:17:13 -05:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Juanma Barranquero
5ce6e4f452 Fix typos in ChangeLogs. 2009-12-29 02:57:40 +01:00
Dan Nicolaescu
d7306fe6b1 * alloc.c: Do not define struct catchtag.
* eval.c: Move struct catchtag definition ...
* lisp.h: ... here.

* image.c: Move png.h #include earlier to avoid warnings.

* xterm.c:
* xsmfns.c:
* xselect.c:
* xrdb.c:
* xmenu.c:
* xftfont.c:
* xfont.c:
* xfns.c:
* xfaces.c:
* xdisp.c:
* window.c:
* widget.c:
* w32xfns.c:
* w32uniscribe.c:
* w32term.c:
* w32select.c:
* w32reg.c:
* w32proc.c:
* w32menu.c:
* w32inevt.c:
* w32heap.c:
* w32font.c:
* w32fns.c:
* w32console.c:
* w32.c:
* w16select.c:
* vm-limit.c:
* unexsol.c:
* unexec.c:
* unexcw.c:
* unexaix.c:
* undo.c:
* tparam.c:
* textprop.c:
* terminfo.c:
* terminal.c:
* termcap.c:
* term.c:
* syntax.c:
* sound.c:
* sheap.c:
* search.c:
* scroll.c:
* region-cache.c:
* regex.c:
* ralloc.c:
* process.c:
* print.c:
* msdos.c:
* minibuf.c:
* menu.c:
* marker.c:
* macros.c:
* keymap.c:
* keyboard.c:
* intervals.c:
* insdel.c:
* indent.c:
* gtkutil.c:
* ftxfont.c:
* ftfont.c:
* fringe.c:
* frame.c:
* fontset.c:
* font.c:
* fns.c:
* floatfns.c:
* filelock.c:
* fileio.c:
* emacs.c:
* editfns.c:
* dosfns.c:
* doprnt.c:
* doc.c:
* dispnew.c:
* dired.c:
* dbusbind.c:
* data.c:
* composite.c:
* coding.c:
* cmds.c:
* cm.c:
* chartab.c:
* charset.c:
* character.c:
* ccl.c:
* category.c:
* casetab.c:
* casefiddle.c:
* callproc.c:
* callint.c:
* bytecode.c:
* buffer.c:
* atimer.c: Include setjmp.h.  (Bug#4643)

* xlwmenu.c:
* lwlib.c:
* lwlib-utils.c:
* lwlib-Xm.c:
* lwlib-Xlw.c:
* lwlib-Xaw.c: Include setjmp.h.
2009-10-19 04:27:09 +00:00
Chong Yidong
7024347875 Add "Branch for 23.1" ChangeLog entry. 2009-06-21 14:35:26 +00:00
Glenn Morris
f5d0ac07d6 Add 2009 to copyright years. 2009-01-08 03:38:51 +00:00
Juanma Barranquero
f013149203 Fix typos and author's names. 2008-12-19 01:50:43 +00:00
Juanma Barranquero
10d1d0af5f Fix typos. 2008-09-24 01:16:16 +00:00
Dan Nicolaescu
77ccee0959 * config.in: Regenerate.
* s/ms-w32.h (subprocesses): Define unconditionally.
* s/template.h (subprocesses): Update comment.
* s/vms.h (subprocesses):
* s/usg5-4.h (subprocesses):
* s/hpux10-20.h (subprocesses):
* s/gnu-linux.h (subprocesses):
* s/cygwin.h (subprocesses):
* s/bsd-common.h (subprocesses):
* s/aix4-2.h (subprocesses):
* s/darwin.h (subprocesses): Do not define, defined by default now.

* Makefile.in (C_SWITCH_SITE, LD_SWITCH_SITE): Remove, unused.
Remove all references.
(temacs): Add GNUStep specific ld flags.

* Makefile.in (ALL_CFLAGS): Remove reference to C_SWITCH_SITE.

* config.nt (C_SWITCH_SITE, LD_SWITCH_SITE): Do not undefine.

* Makefile.in (ALL_CFLAGS): Remove reference to C_SWITCH_SITE.

* configure.in (LD_SWITCH_SITE): Remove, set the values directly
in src/Makefile.in.
(static): Remove, autoconf would always comment it out anyway.
(subprocesses): Define unconditionally.
2008-07-23 06:26:32 +00:00
Juanma Barranquero
ba60bd44c7 Fix typos. 2008-07-18 15:42:14 +00:00
Dan Nicolaescu
f2a77c3a41 * unexnext.c:
* m/ews4800.h:
* m/hp9000s300.h:
* m/ibm370aix.h:
* m/mips-siemens.h:
* m/ncr386.h:
* m/next.h:
* m/pmax.h:
* m/powerpcle.h:
* m/tandem-s2.h:
* s/386bsd.h:
* s/bsd386.h:
* s/bsd4-1.h:
* s/bsd4-2.h:
* s/bsdos2-1.h:
* s/bsdos2.h:
* s/bsdos3.h:
* s/bsdos4.h:
* s/nextstep.h:
* s/ultrix4-3.h:
* s/usg5-0.h:
* s/usg5-2-2.h:
* s/usg5-2.h:
* s/usg5-4-3.h:
* s/ux4800.h:
* s/uxpds.h:
* s/uxpv.h: Remove support for obsolete systems.
* s/hpux.h, s/hpux10.h, s/hpux8.h, s/hpux9.h, s/hpux9shr.h:
Remove, insert contents in s/hpux-10.20.h
* s/aix3-1.h, s/aix3-2-5.h, s/aix3-2.h, s/aix4-1.h, s/aix4.h:
Remove, insert contents in s/aix-4.2.h
* s/usg5-3.h: Remove, insert contents in s/usg5-4.h.
* s/bsd4-3.h: Rename to ..
* s/bsd-common.h: ... this.
* src/data.c:
* src/doc.c:
* src/ecrt0.c:
* src/emacs.c:
* src/fileio.c:
* src/floatfns.c:
* src/keyboard.c:
* src/mem-limits.h:
* src/print.c:
* src/process.c:
* src/sysdep.c:
* src/syssignal.h:
* src/systty.h:
* src/syswait.h:
* src/term.c:
* src/unexec.c:
* src/unexelf.c:
* src/unexhp9k800.c:
* src/m/hp800.h:
* src/m/ibmrs6000.h:
* src/m/mips.h:
* src/m/vax.h:
* src/s/darwin.h:
* src/s/freebsd.h:
* src/s/gnu.h:
* src/s/ms-w32.h:
* src/s/msdos.h:
* src/s/netbsd.h:
* src/s/template.h: Remove references to obsolete variables.

* Makefile.in: Add dependencies for all unexec files.
(admindir): Remove unused variable.
(UNEXEC_SRC): Remove references.

* config.nt: Remove reference to UNEXEC_SRC.

* lwlib.c: Remove references to obsolete variables.

* fakemail.c: Remove references to obsolete variables.

* os.texi: Remove references to obsolete systems.

* configure.in:
* configure: Remove references to obsolete systems.
2008-06-26 04:24:54 +00:00
Jim Meyering
70fdbb46cd Make "xfree (NULL)" a no-op; remove useless if-before-xfree.
* src/alloc.c (xfree): Return right away for a NULL arg.
* src/lread.c (nosuffix): Remove now-useless if-before-xfree tests.
* src/gtkutil.c (xg_gtk_scroll_destroy): Likewise.
* src/mac.c (create_apple_event_from_event_ref): Likewise.
(create_apple_event_from_drag_ref, cfstring_create_normalized): Likewise.
* src/doprnt.c (doprnt1): Likewise.
* src/frame.c (frame): Likewise.
* src/keyboard.c (wipe_kboard): Likewise.
* src/macterm.c (x_free_frame_resources, xlfdpat_destroy, XFreePixmap):
(init_font_name_table, mac_unload_font, x_delete_display): Likewise.
* src/term.c (tty_default_color_capabilities, maybe_fatal)
(delete_tty): Likewise.
* src/w16select.c (string): Likewise.
* src/w32.c (w32_get_resource, SET_ENV_BUF_SIZE): Likewise.
* src/w32bdf.c (w32_free_bdf_font): Likewise.
* src/w32fns.c (w32_unload_font): Likewise.
* src/w32font.c (w32font_close): Likewise.
* src/window.c (size_window): Likewise.
* src/xselect.c (receive_incremental_selection): Likewise.
* src/xterm.c (x_free_frame_resources, x_delete_display): Likewise.
* src/mactoolbox.c (create_apple_event_from_drag_ref): Likewise.
* src/w32.c (stat): Likewise.
2008-06-02 06:09:17 +00:00
Jim Meyering
c2cd06e61e remove useless if-before-free tests
* lib-src/ebrowse.c (xfree): Likewise.
* lib-src/etags.c (process_file_name, free_tree, free_fdesc): Likewise.
(popclass_above, Prolog_functions, Erlang_functions): Likewise.
* lib-src/pop.c (pop_quit): Likewise.
* lwlib/lwlib-Xm.c (xm_update_one_value): Likewise.
* lwlib/lwlib.c (safe_free_str, free_widget_value_tree): Likewise.
* src/editfns.c (Fset_time_zone_rule): Likewise.
* src/lread.c (nosuffix): Likewise.
* src/ralloc.c (get_bloc): Likewise.
* src/regex.c (reg_free): Likewise.
* src/xftfont.c (xftfont_open, xftfont_close): Likewise.
* src/xrdb.c (get_user_app, get_environ_db, x_load_resources): Likewise.
* src/xsmfns.c (smc_save_yourself_CB): Likewise.
2008-06-02 06:00:54 +00:00
Glenn Morris
05a3a78950 Switch to recommended form of GPLv3 permissions notice. 2008-05-09 04:57:14 +00:00
Stefan Monnier
73d798d5ae * configure.in: Define USE_LUCID/USE_MOTIF in config.h.
* lwlib/Makefile.in (TOOLKIT_DEFINES): Remove.
* src/Makefile.in (TOOLKIT_DEFINES): Remove.
(LIBW): Use a bit less #if, remove left over OPEN_LOOK stuff.
2008-04-18 15:48:06 +00:00
Kenichi Handa
880820fe87 (Fdefine_charset_internal): Change the way of
registering charsets in Vcharset_order_list.
(syms_of_charset): Make the charset `eight-bit' supplementary.
2008-03-27 11:36:43 +00:00
Miles Bader
59ce725a3b Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-987
2008-01-08 20:46:54 +00:00
Juanma Barranquero
79a2d0fc16 *** empty log message *** 2008-01-07 15:20:21 +00:00
Glenn Morris
b9b14d130b Add 2008 to copyright years. 2008-01-07 08:31:52 +00:00
Miles Bader
8d9cc0b7ea Merge multi-tty branch
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-866
2007-08-29 05:28:10 +00:00
Miles Bader
9aecacd08a Merge from emacs--rel--22
Patches applied:

 * emacs--rel--22  (patch 70-73)

   - Update from CVS

2007-07-25  Glenn Morris  <rgm@gnu.org>

   * Relicense all FSF files to GPLv3 or later.

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-828
2007-07-26 05:28:10 +00:00
Glenn Morris
cacc7b5131 Switch license to GPLv3 or later. 2007-07-25 07:11:02 +00:00
Glenn Morris
4a9f99bdfb Switch license to GPLv3 or later. 2007-07-25 05:08:27 +00:00
Chong Yidong
52a0e11160 * lwlib-Xaw.c, lwlib.c: Link to xaw3d if available. 2007-06-13 17:34:43 +00:00
Chong Yidong
7dfc4cda5d Version 22.1 released. 2007-06-02 11:07:00 +00:00
Glenn Morris
7073bb78e0 *** empty log message *** 2007-02-28 04:38:24 +00:00
Glenn Morris
7f6d64f85a Switch to standard GPL text for license. 2007-02-11 00:15:39 +00:00
Glenn Morris
b3d90e4611 Update copyright for years from Emacs 21 to present (mainly adding
2001).
2007-01-16 03:47:24 +00:00
Jan Djärv
3fcd018655 (enter_hook, leave_hook): New functions
(xlw_create_menubar, xlw_create_popup_menu): Connect XtNenter/leave
to enter/leave_hook.
2007-01-01 15:20:33 +00:00
Eli Zaretskii
818f5ca242 Remove -unix from coding: tags. 2006-12-22 23:37:42 +00:00
Juanma Barranquero
33462dfacd Add "add-log-time-zone-rule: t" to Local Variables section. 2006-11-10 00:21:57 +00:00
Chong Yidong
41c98a5ec0 * Makefile.in (lwlib-utils.o): Use CPPFLAGS. 2006-10-30 23:12:40 +00:00
Jay Belanger
45a2056c56 *** empty log message *** 2006-09-15 17:47:12 +00:00
Jan Djärv
1f5df1f783 * xlwmenu.c: Include xterm.h if emacs instead of declaring functions
used.
 (string_width): Declare as static.
 (Start, pop_up_menu): Set is_hint to 0 before calling
 handle_motion_event.
 (pop_up_menu): Return value and parameters for x_catch_errors and
 x_uncatch_errors changed.
2006-05-23 07:19:45 +00:00
Thien-Thi Nguyen
5b0d63bc36 Update years in copyright notice; nfc. 2006-02-05 23:44:47 +00:00
Dan Nicolaescu
43f15d4afe * xlwmenu.c (find_next_selectable):
(find_prev_selectable): Add missing parameter
declarations.

* xfaces.c (lookup_derived_face): Add parameter type.

* xdisp.c (cursor_row_fully_visible_p): Add parameter type.

* marker.c (verify_bytepos): Add parameter type.

* process.c (get_operating_system_release): Move prototype ...

* systime.h (get_operating_system_release): ... here.

* xterm.c (set_vertical_scroll_bar): Move prototype ...

* xterm.h: ... here.

* fns.c (internal_equal, seed_random): Fix prototypes.
(internal_equal): Add missing parameter.
2005-09-27 18:48:59 +00:00
Dan Nicolaescu
c5caf98146 Fix the return type for x_clear_errors and
x_uncatch_errors.
2005-09-24 20:37:14 +00:00
Jan Djärv
7537ab9c84 * lwlib-Xm.c (make_menu_in_widget): Disable drag and drop for
labels in menu bar.
2005-07-19 09:06:47 +00:00
Lute Kamstra
a0ec7a4a17 *** empty log message *** 2005-07-05 12:22:32 +00:00
Jan Djärv
52a9f3a0d6 Reenable support for I18N to Lucid menus.
* xlwmenuP.h (_XlwMenu_part): Add fontSet resource.

 * xlwmenu.c (string_width):
 (MENU_FONT_HEIGHT, MENU_FONT_ASCENT): Ditto.
 (display_menu_item, make_drawing_gcs, XlwMenuInitialize)
 (XlwMenuSetValues):  Use font if fontSet is NULL, use only
 font for !HAVE_X_I18N.
 (xlwMenuResources): Add fontSet resource.
2005-04-01 18:42:56 +00:00
Jan Djärv
937a855ded * xlwmenuP.h: Temporary #undef HAVE_X_I18N until FontSet for UTF-8
on XFree86 is investigated.
* xlwmenu.c: Ditto.
2005-03-22 21:40:27 +00:00
Stefan Monnier
423a3f5901 Add support for I18N to Lucid menus.
* xlwmenuP.h (struct _XlwMenu_part) [HAVE_X_I18N]: Change `font' to be
a fontset.  Add a `font_extents' element.

* xlwmenu.c (xlwMenuResources) [HAVE_X_I18N]: Use a fontset for the
`font' resource.
(string_width) [HAVE_X_I18N]: Use XmbTextExtents;
(MENU_FONT_HEIGHT, MENU_FONT_ASCENT): New macros.
(arrow_width, toggle_button_width, size_menu_item, draw_arrow)
(draw_toggle, draw_radio, display_menu_item): Use them.
(display_menu_item) [HAVE_X_I18N]: Use XmbDrawString.
(make_drawing_gcs) [HAVE_X_I18N]: Don't mess with fonts.
(XlwMenuInitialize) [HAVE_X_I18N]: Initialize font_extents.
(XlwMenuSetValues) [HAVE_X_I18N]: Refresh font_extents if font changes.
2005-03-18 04:19:41 +00:00
Stefan Monnier
3c916d6555 (xm_update_label, xm_update_list): Use the recommended
XmStringCreateLocalized function.  Add missing copyright.
2005-03-17 19:03:16 +00:00
Stefan Monnier
9f9e527507 *** empty log message *** 2005-03-17 17:17:57 +00:00