diff options
| author | Karoly Lorentey | 2005-02-04 15:36:07 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-02-04 15:36:07 +0000 |
| commit | 077f3dd9e0510164a37dcdfa69db9fe0b48675d9 (patch) | |
| tree | 6e117d59746e46bf69ee1c8cf0b71521d672f783 /src | |
| parent | 44d7460c77fa0c27513944bb8b6f819976b01cda (diff) | |
| parent | e67d06eb0d71b8d769b467a8cea28aa8d761a906 (diff) | |
| download | emacs-077f3dd9e0510164a37dcdfa69db9fe0b48675d9.tar.gz emacs-077f3dd9e0510164a37dcdfa69db9fe0b48675d9.zip | |
Merged from miles@gnu.org--gnu-2005 (patch 76-78)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-76
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-77
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-78
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-288
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 31 | ||||
| -rw-r--r-- | src/dispnew.c | 5 | ||||
| -rw-r--r-- | src/gtkutil.c | 2 | ||||
| -rw-r--r-- | src/mac.c | 2 | ||||
| -rw-r--r-- | src/macfns.c | 2 | ||||
| -rw-r--r-- | src/macterm.c | 6 | ||||
| -rw-r--r-- | src/xfaces.c | 8 | ||||
| -rw-r--r-- | src/xfns.c | 8 | ||||
| -rw-r--r-- | src/xmenu.c | 17 |
9 files changed, 60 insertions, 21 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6dd4211364f..eb8bab64362 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,34 @@ | |||
| 1 | 2005-02-03 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * xmenu.c (menubar_selection_callback): Force out GTK buffered | ||
| 4 | events so the menu event comes after them. This is to prevent sit-for | ||
| 5 | from exiting on buffered events directly after a menu selection, | ||
| 6 | lisp code for Help => About Emacs uses sit-for. | ||
| 7 | |||
| 8 | * gtkutil.c (create_menus): Connect selection-done event instead of | ||
| 9 | the deactivate event to deactivate_cb. This will make the last | ||
| 10 | leave event come before the call to deactivate_cb, so the leave | ||
| 11 | event does not make sit-for exit after a menu selection. | ||
| 12 | |||
| 13 | 2005-02-03 Kim F. Storm <storm@cua.dk> | ||
| 14 | |||
| 15 | * dispnew.c (build_frame_matrix_from_leaf_window) | ||
| 16 | [!GLYPH_DEBUG]: Fix xassert. | ||
| 17 | |||
| 18 | * xfaces.c (x_free_gc) [!GLYPH_DEBUG]: Fix xassert. | ||
| 19 | |||
| 20 | * xfns.c (unwind_create_frame) [!GLYPH_DEBUG]: Fix xassert. | ||
| 21 | |||
| 22 | 2005-02-03 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 23 | |||
| 24 | * mac.c: Use MAC_OS_X_VERSION_MAX_ALLOWED to conditionalize by | ||
| 25 | the compiling OS version. | ||
| 26 | |||
| 27 | * macfns.c (x_create_tip_frame): Likewise. | ||
| 28 | |||
| 29 | * macterm.c (mac_draw_string_common, x_make_frame_visible): | ||
| 30 | Likewise. | ||
| 31 | |||
| 1 | 2005-02-03 Richard M. Stallman <rms@gnu.org> | 32 | 2005-02-03 Richard M. Stallman <rms@gnu.org> |
| 2 | 33 | ||
| 3 | * xterm.c (x_error_quitter): On GCC 3 and up, specify noinline. | 34 | * xterm.c (x_error_quitter): On GCC 3 and up, specify noinline. |
diff --git a/src/dispnew.c b/src/dispnew.c index 47e36aa991c..606e8331347 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Updating of data structures for redisplay. | 1 | /* Updating of data structures for redisplay. |
| 2 | Copyright (C) 1985,86,87,88,93,94,95,97,98,1999,2000,01,02,03,04 | 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1997, 1998, 1999, |
| 3 | Free Software Foundation, Inc. | 3 | 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -2775,7 +2775,6 @@ build_frame_matrix_from_leaf_window (frame_matrix, w) | |||
| 2775 | /* If rows are in sync, we don't have to copy glyphs because | 2775 | /* If rows are in sync, we don't have to copy glyphs because |
| 2776 | frame and window share glyphs. */ | 2776 | frame and window share glyphs. */ |
| 2777 | 2777 | ||
| 2778 | #if GLYPH_DEBUG | ||
| 2779 | strcpy (w->current_matrix->method, w->desired_matrix->method); | 2778 | strcpy (w->current_matrix->method, w->desired_matrix->method); |
| 2780 | add_window_display_history (w, w->current_matrix->method, 0); | 2779 | add_window_display_history (w, w->current_matrix->method, 0); |
| 2781 | #endif | 2780 | #endif |
diff --git a/src/gtkutil.c b/src/gtkutil.c index aecc4e2eaea..6bf0c25f350 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -1905,7 +1905,7 @@ create_menus (data, f, select_cb, deactivate_cb, highlight_cb, | |||
| 1905 | 1905 | ||
| 1906 | if (deactivate_cb) | 1906 | if (deactivate_cb) |
| 1907 | g_signal_connect (G_OBJECT (wmenu), | 1907 | g_signal_connect (G_OBJECT (wmenu), |
| 1908 | "deactivate", deactivate_cb, 0); | 1908 | "selection-done", deactivate_cb, 0); |
| 1909 | 1909 | ||
| 1910 | g_signal_connect (G_OBJECT (wmenu), | 1910 | g_signal_connect (G_OBJECT (wmenu), |
| 1911 | "grab-notify", G_CALLBACK (menu_grab_callback), 0); | 1911 | "grab-notify", G_CALLBACK (menu_grab_callback), 0); |
| @@ -2858,7 +2858,7 @@ select_and_poll_event (n, rfds, wfds, efds, timeout) | |||
| 2858 | return r; | 2858 | return r; |
| 2859 | } | 2859 | } |
| 2860 | 2860 | ||
| 2861 | #ifndef MAC_OS_X_VERSION_10_2 | 2861 | #if MAC_OS_X_VERSION_MAX_ALLOWED < 1020 |
| 2862 | #undef SELECT_INVALIDATE_CFSOCKET | 2862 | #undef SELECT_INVALIDATE_CFSOCKET |
| 2863 | #endif | 2863 | #endif |
| 2864 | 2864 | ||
diff --git a/src/macfns.c b/src/macfns.c index 416522b49b9..26d63ec99af 100644 --- a/src/macfns.c +++ b/src/macfns.c | |||
| @@ -3882,7 +3882,7 @@ x_create_tip_frame (dpyinfo, parms, text) | |||
| 3882 | SetRect (&r, 0, 0, 1, 1); | 3882 | SetRect (&r, 0, 0, 1, 1); |
| 3883 | #if TARGET_API_MAC_CARBON | 3883 | #if TARGET_API_MAC_CARBON |
| 3884 | if (CreateNewWindow (kHelpWindowClass, | 3884 | if (CreateNewWindow (kHelpWindowClass, |
| 3885 | #ifdef MAC_OS_X_VERSION_10_2 | 3885 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 |
| 3886 | kWindowIgnoreClicksAttribute | | 3886 | kWindowIgnoreClicksAttribute | |
| 3887 | #endif | 3887 | #endif |
| 3888 | kWindowNoUpdatesAttribute | | 3888 | kWindowNoUpdatesAttribute | |
diff --git a/src/macterm.c b/src/macterm.c index 16878f9a45a..21effb23cfa 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -729,7 +729,7 @@ mac_draw_string_common (display, w, gc, x, y, buf, nchars, mode, | |||
| 729 | int nchars, mode, bytes_per_char; | 729 | int nchars, mode, bytes_per_char; |
| 730 | { | 730 | { |
| 731 | SetPortWindowPort (w); | 731 | SetPortWindowPort (w); |
| 732 | #ifdef MAC_OS_X_VERSION_10_2 | 732 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 |
| 733 | UInt32 textFlags, savedFlags; | 733 | UInt32 textFlags, savedFlags; |
| 734 | if (!NILP(Vmac_use_core_graphics)) { | 734 | if (!NILP(Vmac_use_core_graphics)) { |
| 735 | textFlags = kQDUseCGTextRendering; | 735 | textFlags = kQDUseCGTextRendering; |
| @@ -746,7 +746,7 @@ mac_draw_string_common (display, w, gc, x, y, buf, nchars, mode, | |||
| 746 | 746 | ||
| 747 | MoveTo (x, y); | 747 | MoveTo (x, y); |
| 748 | DrawText (buf, 0, nchars * bytes_per_char); | 748 | DrawText (buf, 0, nchars * bytes_per_char); |
| 749 | #ifdef MAC_OS_X_VERSION_10_2 | 749 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 |
| 750 | if (!NILP(Vmac_use_core_graphics)) | 750 | if (!NILP(Vmac_use_core_graphics)) |
| 751 | SwapQDTextFlags(savedFlags); | 751 | SwapQDTextFlags(savedFlags); |
| 752 | #endif | 752 | #endif |
| @@ -5451,7 +5451,7 @@ x_make_frame_visible (f) | |||
| 5451 | else | 5451 | else |
| 5452 | RepositionWindow (FRAME_MAC_WINDOW (f), | 5452 | RepositionWindow (FRAME_MAC_WINDOW (f), |
| 5453 | FRAME_MAC_WINDOW (sf), | 5453 | FRAME_MAC_WINDOW (sf), |
| 5454 | #ifdef MAC_OS_X_VERSION_10_2 | 5454 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 |
| 5455 | kWindowCascadeStartAtParentWindowScreen | 5455 | kWindowCascadeStartAtParentWindowScreen |
| 5456 | #else | 5456 | #else |
| 5457 | kWindowCascadeOnParentWindowScreen | 5457 | kWindowCascadeOnParentWindowScreen |
diff --git a/src/xfaces.c b/src/xfaces.c index 0c4665a4cb6..a0ac3867ef6 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* xfaces.c -- "Face" primitives. | 1 | /* xfaces.c -- "Face" primitives. |
| 2 | Copyright (C) 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004 | 2 | Copyright (C) 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 |
| 3 | Free Software Foundation. | 3 | Free Software Foundation. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| @@ -741,9 +741,7 @@ x_free_gc (f, gc) | |||
| 741 | GC gc; | 741 | GC gc; |
| 742 | { | 742 | { |
| 743 | BLOCK_INPUT; | 743 | BLOCK_INPUT; |
| 744 | #if GLYPH_DEBUG | 744 | IF_DEBUG (xassert (--ngcs >= 0)); |
| 745 | xassert (--ngcs >= 0); | ||
| 746 | #endif | ||
| 747 | XFreeGC (FRAME_X_DISPLAY (f), gc); | 745 | XFreeGC (FRAME_X_DISPLAY (f), gc); |
| 748 | UNBLOCK_INPUT; | 746 | UNBLOCK_INPUT; |
| 749 | } | 747 | } |
| @@ -776,7 +774,7 @@ x_free_gc (f, gc) | |||
| 776 | GC gc; | 774 | GC gc; |
| 777 | { | 775 | { |
| 778 | BLOCK_INPUT; | 776 | BLOCK_INPUT; |
| 779 | xassert (--ngcs >= 0); | 777 | IF_DEBUG (xassert (--ngcs >= 0)); |
| 780 | xfree (gc); | 778 | xfree (gc); |
| 781 | UNBLOCK_INPUT; | 779 | UNBLOCK_INPUT; |
| 782 | } | 780 | } |
diff --git a/src/xfns.c b/src/xfns.c index eaae071ef26..48967575f0c 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Functions for the X window system. | 1 | /* Functions for the X window system. |
| 2 | Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 99, 2000,01,02,03,04 | 2 | Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, |
| 3 | Free Software Foundation. | 3 | 2001, 2002, 2003, 2004, 2005 Free Software Foundation. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -4108,7 +4108,7 @@ Value is VALUE. */) | |||
| 4108 | 4108 | ||
| 4109 | if (! NILP (outer_p)) w = FRAME_OUTER_WINDOW (f); | 4109 | if (! NILP (outer_p)) w = FRAME_OUTER_WINDOW (f); |
| 4110 | else w = FRAME_X_WINDOW (f); | 4110 | else w = FRAME_X_WINDOW (f); |
| 4111 | 4111 | ||
| 4112 | XChangeProperty (FRAME_X_DISPLAY (f), w, | 4112 | XChangeProperty (FRAME_X_DISPLAY (f), w, |
| 4113 | prop_atom, target_type, element_format, PropModeReplace, | 4113 | prop_atom, target_type, element_format, PropModeReplace, |
| 4114 | data, nelements); | 4114 | data, nelements); |
| @@ -5293,7 +5293,7 @@ or directory must exist. ONLY-DIR-P is ignored." */) | |||
| 5293 | if (keysym == XK_g && (event.xkey.state & ControlMask) != 0) | 5293 | if (keysym == XK_g && (event.xkey.state & ControlMask) != 0) |
| 5294 | XtUnmanageChild (dialog); | 5294 | XtUnmanageChild (dialog); |
| 5295 | } | 5295 | } |
| 5296 | 5296 | ||
| 5297 | (void) x_dispatch_event (&event, FRAME_X_DISPLAY (f)); | 5297 | (void) x_dispatch_event (&event, FRAME_X_DISPLAY (f)); |
| 5298 | } | 5298 | } |
| 5299 | 5299 | ||
diff --git a/src/xmenu.c b/src/xmenu.c index f6e0523378f..b6a5186f1f1 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -1445,9 +1445,9 @@ menu_highlight_callback (widget, id, call_data) | |||
| 1445 | /* Find the menu selection and store it in the keyboard buffer. | 1445 | /* Find the menu selection and store it in the keyboard buffer. |
| 1446 | F is the frame the menu is on. | 1446 | F is the frame the menu is on. |
| 1447 | MENU_BAR_ITEMS_USED is the length of VECTOR. | 1447 | MENU_BAR_ITEMS_USED is the length of VECTOR. |
| 1448 | VECTOR is an array of menu events for the whole menu. | 1448 | VECTOR is an array of menu events for the whole menu. */ |
| 1449 | */ | 1449 | |
| 1450 | void | 1450 | static void |
| 1451 | find_and_call_menu_selection (f, menu_bar_items_used, vector, client_data) | 1451 | find_and_call_menu_selection (f, menu_bar_items_used, vector, client_data) |
| 1452 | FRAME_PTR f; | 1452 | FRAME_PTR f; |
| 1453 | int menu_bar_items_used; | 1453 | int menu_bar_items_used; |
| @@ -1554,6 +1554,17 @@ menubar_selection_callback (widget, client_data) | |||
| 1554 | if (! cb_data || ! cb_data->cl_data || ! cb_data->cl_data->f) | 1554 | if (! cb_data || ! cb_data->cl_data || ! cb_data->cl_data->f) |
| 1555 | return; | 1555 | return; |
| 1556 | 1556 | ||
| 1557 | /* When a menu is popped down, X generates a focus event (i.e. focus | ||
| 1558 | goes back to the frame below the menu). Since GTK buffers events, | ||
| 1559 | we force it out here before the menu selection event. Otherwise | ||
| 1560 | sit-for will exit at once if the focus event follows the menu selection | ||
| 1561 | event. */ | ||
| 1562 | |||
| 1563 | BLOCK_INPUT; | ||
| 1564 | while (gtk_events_pending ()) | ||
| 1565 | gtk_main_iteration (); | ||
| 1566 | UNBLOCK_INPUT; | ||
| 1567 | |||
| 1557 | find_and_call_menu_selection (cb_data->cl_data->f, | 1568 | find_and_call_menu_selection (cb_data->cl_data->f, |
| 1558 | cb_data->cl_data->menu_bar_items_used, | 1569 | cb_data->cl_data->menu_bar_items_used, |
| 1559 | cb_data->cl_data->menu_bar_vector, | 1570 | cb_data->cl_data->menu_bar_vector, |