aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiles Bader2005-03-10 23:36:47 +0000
committerMiles Bader2005-03-10 23:36:47 +0000
commit4a670293279d61e9bdf88d9a86caefc6de4e60e3 (patch)
tree29d376c4c602d6ecac1d7d31d56030dc9e8087ca /src
parent8ab43fb27aa9d02d0ed06e0080f9b4f6e76b94ae (diff)
parent14f56b66c3b1641c90d1390a1381bc27aa91c0e1 (diff)
downloademacs-4a670293279d61e9bdf88d9a86caefc6de4e60e3.tar.gz
emacs-4a670293279d61e9bdf88d9a86caefc6de4e60e3.zip
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-24
Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0 (patch 166-172) - Update from CVS - Tweak obsolete function/variable warning message - Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/gnus--rel--5.10 (patch 38) - Update from CVS
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog16
-rw-r--r--src/dispextern.h1
-rw-r--r--src/gtkutil.c9
-rw-r--r--src/keyboard.c18
-rw-r--r--src/xdisp.c30
-rw-r--r--src/xfns.c8
6 files changed, 61 insertions, 21 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 34ef6c228bb..24db3a9c55a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,19 @@
12005-03-10 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2
3 * xfns.c (hourglass_started): New function.
4
5 * dispextern.h: Declare hourglass_started.
6
7 * keyboard.c (Fexecute_extended_command): Restart hourglass
8 after call to Fcompleting_read if already started.
9
10 * gtkutil.c (xg_update_scrollbar_pos): Call x_sync so that the
11 GTK main loop is entered in xterm.c, thus doing the redraw.
12
132005-03-10 Kim F. Storm <storm@cua.dk>
14
15 * xdisp.c (pos_visible_p): Fix X value in last line of buffer.
16
12005-03-08 Kenichi Handa <handa@m17n.org> 172005-03-08 Kenichi Handa <handa@m17n.org>
2 18
3 * frame.c (x_set_font): Call set_default_ascii_font if an 19 * frame.c (x_set_font): Call set_default_ascii_font if an
diff --git a/src/dispextern.h b/src/dispextern.h
index feeae776149..b69f56d27b5 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2817,6 +2817,7 @@ EXFUN (Fx_show_tip, 6);
2817EXFUN (Fx_hide_tip, 0); 2817EXFUN (Fx_hide_tip, 0);
2818extern void start_hourglass P_ ((void)); 2818extern void start_hourglass P_ ((void));
2819extern void cancel_hourglass P_ ((void)); 2819extern void cancel_hourglass P_ ((void));
2820extern int hourglass_started P_ ((void));
2820extern int display_hourglass_p; 2821extern int display_hourglass_p;
2821 2822
2822/* Returns the background color of IMG, calculating one heuristically if 2823/* Returns the background color of IMG, calculating one heuristically if
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 6dcba3036c0..8bd83e40043 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -2999,9 +2999,14 @@ xg_update_scrollbar_pos (f, scrollbar_id, top, left, width, height)
2999 GtkWidget *wparent = gtk_widget_get_parent (wscroll); 2999 GtkWidget *wparent = gtk_widget_get_parent (wscroll);
3000 3000
3001 /* Move and resize to new values. */ 3001 /* Move and resize to new values. */
3002 gtk_widget_set_size_request (wscroll, width, height);
3003 gtk_fixed_move (GTK_FIXED (wfixed), wparent, left, top); 3002 gtk_fixed_move (GTK_FIXED (wfixed), wparent, left, top);
3004 3003 gtk_widget_set_size_request (wscroll, width, height);
3004 gtk_widget_queue_draw (wparent);
3005 gdk_window_process_all_updates ();
3006 /* GTK does not redraw until the main loop is entered again, but
3007 if there are no X events pending we will not enter it. So we sync
3008 here to get some events. */
3009 x_sync (f);
3005 SET_FRAME_GARBAGED (f); 3010 SET_FRAME_GARBAGED (f);
3006 cancel_mouse_face (f); 3011 cancel_mouse_face (f);
3007 } 3012 }
diff --git a/src/keyboard.c b/src/keyboard.c
index 525958020af..77e7cf48139 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1350,6 +1350,11 @@ DEFUN ("top-level", Ftop_level, Stop_level, 0, 0, "",
1350 cancel_hourglass (); 1350 cancel_hourglass ();
1351#endif 1351#endif
1352 1352
1353 /* Unblock input if we enter with input blocked. This may happen if
1354 redisplay traps e.g. during tool-bar update with input blocked. */
1355 while (INPUT_BLOCKED_P)
1356 UNBLOCK_INPUT;
1357
1353 return Fthrow (Qtop_level, Qnil); 1358 return Fthrow (Qtop_level, Qnil);
1354} 1359}
1355 1360
@@ -9709,6 +9714,15 @@ DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_
9709 Lisp_Object saved_keys, saved_last_point_position_buffer; 9714 Lisp_Object saved_keys, saved_last_point_position_buffer;
9710 Lisp_Object bindings, value; 9715 Lisp_Object bindings, value;
9711 struct gcpro gcpro1, gcpro2, gcpro3; 9716 struct gcpro gcpro1, gcpro2, gcpro3;
9717#ifdef HAVE_X_WINDOWS
9718 /* The call to Fcompleting_read wil start and cancel the hourglass,
9719 but if the hourglass was already scheduled, this means that no
9720 hourglass will be shown for the actual M-x command itself.
9721 So we restart it if it is already scheduled. Note that checking
9722 hourglass_shown_p is not enough, normally the hourglass is not shown,
9723 just scheduled to be shown. */
9724 int hstarted = hourglass_started ();
9725#endif
9712 9726
9713 saved_keys = Fvector (this_command_key_count, 9727 saved_keys = Fvector (this_command_key_count,
9714 XVECTOR (this_command_keys)->contents); 9728 XVECTOR (this_command_keys)->contents);
@@ -9740,6 +9754,10 @@ DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_
9740 Qt, Qnil, Qextended_command_history, Qnil, 9754 Qt, Qnil, Qextended_command_history, Qnil,
9741 Qnil); 9755 Qnil);
9742 9756
9757#ifdef HAVE_X_WINDOWS
9758 if (hstarted) start_hourglass ();
9759#endif
9760
9743 if (STRINGP (function) && SCHARS (function) == 0) 9761 if (STRINGP (function) && SCHARS (function) == 0)
9744 error ("No command name given"); 9762 error ("No command name given");
9745 9763
diff --git a/src/xdisp.c b/src/xdisp.c
index 3499e95d383..b9ef2830959 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1301,6 +1301,7 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p)
1301 /* Note that we may overshoot because of invisible text. */ 1301 /* Note that we may overshoot because of invisible text. */
1302 if (IT_CHARPOS (it) >= charpos) 1302 if (IT_CHARPOS (it) >= charpos)
1303 { 1303 {
1304 int top_x = it.current_x;
1304 int top_y = it.current_y; 1305 int top_y = it.current_y;
1305 int bottom_y = (last_height = 0, line_bottom_y (&it)); 1306 int bottom_y = (last_height = 0, line_bottom_y (&it));
1306 int window_top_y = WINDOW_HEADER_LINE_HEIGHT (w); 1307 int window_top_y = WINDOW_HEADER_LINE_HEIGHT (w);
@@ -1309,15 +1310,12 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p)
1309 visible_p = bottom_y > window_top_y; 1310 visible_p = bottom_y > window_top_y;
1310 else if (top_y < it.last_visible_y) 1311 else if (top_y < it.last_visible_y)
1311 visible_p = 1; 1312 visible_p = 1;
1312 if (visible_p && x) 1313 if (visible_p)
1313 { 1314 {
1314 *x = it.current_x; 1315 *x = top_x;
1315 *y = max (top_y + max (0, it.max_ascent - it.ascent), window_top_y); 1316 *y = max (top_y + max (0, it.max_ascent - it.ascent), window_top_y);
1316 if (rtop) 1317 *rtop = max (0, window_top_y - top_y);
1317 { 1318 *rbot = max (0, bottom_y - it.last_visible_y);
1318 *rtop = max (0, window_top_y - top_y);
1319 *rbot = max (0, bottom_y - it.last_visible_y);
1320 }
1321 } 1319 }
1322 } 1320 }
1323 else 1321 else
@@ -1330,18 +1328,12 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p)
1330 if (charpos < IT_CHARPOS (it)) 1328 if (charpos < IT_CHARPOS (it))
1331 { 1329 {
1332 visible_p = 1; 1330 visible_p = 1;
1333 if (x) 1331 move_it_to (&it2, charpos, -1, -1, -1, MOVE_TO_POS);
1334 { 1332 *x = it2.current_x;
1335 move_it_to (&it2, charpos, -1, -1, -1, MOVE_TO_POS); 1333 *y = it2.current_y + it2.max_ascent - it2.ascent;
1336 *x = it2.current_x; 1334 *rtop = max (0, -it2.current_y);
1337 *y = it2.current_y + it2.max_ascent - it2.ascent; 1335 *rbot = max (0, ((it2.current_y + it2.max_ascent + it2.max_descent)
1338 if (rtop) 1336 - it.last_visible_y));
1339 {
1340 *rtop = max (0, -it2.current_y);
1341 *rbot = max (0, ((it2.current_y + it2.max_ascent + it2.max_descent)
1342 - it.last_visible_y));
1343 }
1344 }
1345 } 1337 }
1346 } 1338 }
1347 1339
diff --git a/src/xfns.c b/src/xfns.c
index 8267709767f..c45845e00ce 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4275,6 +4275,14 @@ static Lisp_Object Vhourglass_delay;
4275static void show_hourglass P_ ((struct atimer *)); 4275static void show_hourglass P_ ((struct atimer *));
4276static void hide_hourglass P_ ((void)); 4276static void hide_hourglass P_ ((void));
4277 4277
4278/* Return non-zero if houglass timer has been started or hourglass is shown. */
4279
4280int
4281hourglass_started ()
4282{
4283 return hourglass_shown_p || hourglass_atimer != NULL;
4284}
4285
4278 4286
4279/* Cancel a currently active hourglass timer, and start a new one. */ 4287/* Cancel a currently active hourglass timer, and start a new one. */
4280 4288