diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2005-02-04 15:36:07 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2005-02-04 15:36:07 +0000 |
commit | 077f3dd9e0510164a37dcdfa69db9fe0b48675d9 (patch) | |
tree | 6e117d59746e46bf69ee1c8cf0b71521d672f783 /src | |
parent | 44d7460c77fa0c27513944bb8b6f819976b01cda (diff) | |
parent | e67d06eb0d71b8d769b467a8cea28aa8d761a906 (diff) | |
download | emacs-077f3dd9e0510164a37dcdfa69db9fe0b48675d9.tar.gz |
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 @@ +2005-02-03 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * xmenu.c (menubar_selection_callback): Force out GTK buffered + events so the menu event comes after them. This is to prevent sit-for + from exiting on buffered events directly after a menu selection, + lisp code for Help => About Emacs uses sit-for. + + * gtkutil.c (create_menus): Connect selection-done event instead of + the deactivate event to deactivate_cb. This will make the last + leave event come before the call to deactivate_cb, so the leave + event does not make sit-for exit after a menu selection. + +2005-02-03 Kim F. Storm <storm@cua.dk> + + * dispnew.c (build_frame_matrix_from_leaf_window) + [!GLYPH_DEBUG]: Fix xassert. + + * xfaces.c (x_free_gc) [!GLYPH_DEBUG]: Fix xassert. + + * xfns.c (unwind_create_frame) [!GLYPH_DEBUG]: Fix xassert. + +2005-02-03 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * mac.c: Use MAC_OS_X_VERSION_MAX_ALLOWED to conditionalize by + the compiling OS version. + + * macfns.c (x_create_tip_frame): Likewise. + + * macterm.c (mac_draw_string_common, x_make_frame_visible): + Likewise. + 2005-02-03 Richard M. Stallman <rms@gnu.org> * 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 @@ /* Updating of data structures for redisplay. - Copyright (C) 1985,86,87,88,93,94,95,97,98,1999,2000,01,02,03,04 - Free Software Foundation, Inc. + Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1997, 1998, 1999, + 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -2775,7 +2775,6 @@ build_frame_matrix_from_leaf_window (frame_matrix, w) /* If rows are in sync, we don't have to copy glyphs because frame and window share glyphs. */ -#if GLYPH_DEBUG strcpy (w->current_matrix->method, w->desired_matrix->method); add_window_display_history (w, w->current_matrix->method, 0); #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, if (deactivate_cb) g_signal_connect (G_OBJECT (wmenu), - "deactivate", deactivate_cb, 0); + "selection-done", deactivate_cb, 0); g_signal_connect (G_OBJECT (wmenu), "grab-notify", G_CALLBACK (menu_grab_callback), 0); diff --git a/src/mac.c b/src/mac.c index 99e0d44830b..cce1b858cb3 100644 --- a/src/mac.c +++ b/src/mac.c @@ -2858,7 +2858,7 @@ select_and_poll_event (n, rfds, wfds, efds, timeout) return r; } -#ifndef MAC_OS_X_VERSION_10_2 +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1020 #undef SELECT_INVALIDATE_CFSOCKET #endif 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) SetRect (&r, 0, 0, 1, 1); #if TARGET_API_MAC_CARBON if (CreateNewWindow (kHelpWindowClass, -#ifdef MAC_OS_X_VERSION_10_2 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 kWindowIgnoreClicksAttribute | #endif 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, int nchars, mode, bytes_per_char; { SetPortWindowPort (w); -#ifdef MAC_OS_X_VERSION_10_2 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 UInt32 textFlags, savedFlags; if (!NILP(Vmac_use_core_graphics)) { textFlags = kQDUseCGTextRendering; @@ -746,7 +746,7 @@ mac_draw_string_common (display, w, gc, x, y, buf, nchars, mode, MoveTo (x, y); DrawText (buf, 0, nchars * bytes_per_char); -#ifdef MAC_OS_X_VERSION_10_2 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 if (!NILP(Vmac_use_core_graphics)) SwapQDTextFlags(savedFlags); #endif @@ -5451,7 +5451,7 @@ x_make_frame_visible (f) else RepositionWindow (FRAME_MAC_WINDOW (f), FRAME_MAC_WINDOW (sf), -#ifdef MAC_OS_X_VERSION_10_2 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 kWindowCascadeStartAtParentWindowScreen #else 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 @@ /* xfaces.c -- "Face" primitives. - Copyright (C) 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Copyright (C) 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation. This file is part of GNU Emacs. @@ -741,9 +741,7 @@ x_free_gc (f, gc) GC gc; { BLOCK_INPUT; -#if GLYPH_DEBUG - xassert (--ngcs >= 0); -#endif + IF_DEBUG (xassert (--ngcs >= 0)); XFreeGC (FRAME_X_DISPLAY (f), gc); UNBLOCK_INPUT; } @@ -776,7 +774,7 @@ x_free_gc (f, gc) GC gc; { BLOCK_INPUT; - xassert (--ngcs >= 0); + IF_DEBUG (xassert (--ngcs >= 0)); xfree (gc); UNBLOCK_INPUT; } 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 @@ /* Functions for the X window system. - Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 99, 2000,01,02,03,04 - Free Software Foundation. + Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2001, 2002, 2003, 2004, 2005 Free Software Foundation. This file is part of GNU Emacs. @@ -4108,7 +4108,7 @@ Value is VALUE. */) if (! NILP (outer_p)) w = FRAME_OUTER_WINDOW (f); else w = FRAME_X_WINDOW (f); - + XChangeProperty (FRAME_X_DISPLAY (f), w, prop_atom, target_type, element_format, PropModeReplace, data, nelements); @@ -5293,7 +5293,7 @@ or directory must exist. ONLY-DIR-P is ignored." */) if (keysym == XK_g && (event.xkey.state & ControlMask) != 0) XtUnmanageChild (dialog); } - + (void) x_dispatch_event (&event, FRAME_X_DISPLAY (f)); } 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) /* Find the menu selection and store it in the keyboard buffer. F is the frame the menu is on. MENU_BAR_ITEMS_USED is the length of VECTOR. - VECTOR is an array of menu events for the whole menu. - */ -void + VECTOR is an array of menu events for the whole menu. */ + +static void find_and_call_menu_selection (f, menu_bar_items_used, vector, client_data) FRAME_PTR f; int menu_bar_items_used; @@ -1554,6 +1554,17 @@ menubar_selection_callback (widget, client_data) if (! cb_data || ! cb_data->cl_data || ! cb_data->cl_data->f) return; + /* When a menu is popped down, X generates a focus event (i.e. focus + goes back to the frame below the menu). Since GTK buffers events, + we force it out here before the menu selection event. Otherwise + sit-for will exit at once if the focus event follows the menu selection + event. */ + + BLOCK_INPUT; + while (gtk_events_pending ()) + gtk_main_iteration (); + UNBLOCK_INPUT; + find_and_call_menu_selection (cb_data->cl_data->f, cb_data->cl_data->menu_bar_items_used, cb_data->cl_data->menu_bar_vector, |