aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Djärv2003-03-14 19:13:17 +0000
committerJan Djärv2003-03-14 19:13:17 +0000
commit0cb35f4e5eee28ef019aaccc03e65b02556b8521 (patch)
treeecebd3b0a9fb7e2baede1924e126060a3a11618b
parentcea9be546103f4ab47fb4a18bc3db06bbd49efe5 (diff)
downloademacs-0cb35f4e5eee28ef019aaccc03e65b02556b8521.tar.gz
emacs-0cb35f4e5eee28ef019aaccc03e65b02556b8521.zip
Clear frame didn't redraw scrollbars, fixed that.
-rw-r--r--src/ChangeLog3
-rw-r--r--src/gtkutil.c25
-rw-r--r--src/xterm.c5
3 files changed, 27 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c962b2b6f63..6f811fa752c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,7 @@
12003-03-14 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 12003-03-14 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 2
3 * xterm.c (x_clear_frame): Call xg_frame_cleared for GTK.
4
3 * gtkutil.c (struct xg_last_sb_pos): New structure. 5 * gtkutil.c (struct xg_last_sb_pos): New structure.
4 (handle_fixed_child): New function. 6 (handle_fixed_child): New function.
5 (xg_resize_widgets): Call handle_fixed_child on all scroll bar widgets 7 (xg_resize_widgets): Call handle_fixed_child on all scroll bar widgets
@@ -11,6 +13,7 @@
11 and force a redraw on the scroll bar. 13 and force a redraw on the scroll bar.
12 (xg_set_toolkit_scroll_bar_thumb): Do not change/redraw scroll bar 14 (xg_set_toolkit_scroll_bar_thumb): Do not change/redraw scroll bar
13 if xg_last_sb_pos shows the positions are up to date. 15 if xg_last_sb_pos shows the positions are up to date.
16 (xg_frame_cleared): New function.
14 17
152003-03-13 Kenichi Handa <handa@m17n.org> 182003-03-13 Kenichi Handa <handa@m17n.org>
16 19
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 51cc2f1cf1b..0b8f9294612 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -316,6 +316,24 @@ static handle_fixed_child (w, client_data)
316 } 316 }
317} 317}
318 318
319/* This gets called after the frame F has been cleared. Since that is
320 done with X calls, we need to redraw GTK widget (scroll bars). */
321void
322xg_frame_cleared (f)
323 FRAME_PTR f;
324{
325 GtkWidget *wfixed = f->output_data.x->edit_widget;
326
327 if (wfixed)
328 {
329 gtk_container_foreach (GTK_CONTAINER (wfixed),
330 (GtkCallback) handle_fixed_child,
331 NULL);
332 gtk_container_set_reallocate_redraws (GTK_CONTAINER (wfixed), TRUE);
333 gdk_window_process_all_updates ();
334 }
335}
336
319/* Function to handle resize of our widgets. Since Emacs has some layouts 337/* Function to handle resize of our widgets. Since Emacs has some layouts
320 that does not fit well with GTK standard containers, we do most layout 338 that does not fit well with GTK standard containers, we do most layout
321 manually. 339 manually.
@@ -346,12 +364,7 @@ xg_resize_widgets (f, pixelwidth, pixelheight)
346 364
347 gtk_widget_size_allocate (x->edit_widget, &all); 365 gtk_widget_size_allocate (x->edit_widget, &all);
348 366
349 gtk_container_foreach (GTK_CONTAINER (x->edit_widget), 367 xg_frame_cleared (f);
350 (GtkCallback) handle_fixed_child,
351 NULL);
352 gtk_container_set_reallocate_redraws (GTK_CONTAINER (x->edit_widget),
353 TRUE);
354 gdk_window_process_all_updates ();
355 368
356 change_frame_size (f, rows, columns, 0, 1, 0); 369 change_frame_size (f, rows, columns, 0, 1, 0);
357 SET_FRAME_GARBAGED (f); 370 SET_FRAME_GARBAGED (f);
diff --git a/src/xterm.c b/src/xterm.c
index 5feea82f3c1..0c15e6a5fdc 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -5343,6 +5343,11 @@ x_clear_frame ()
5343 x_scroll_bar_clear (f); 5343 x_scroll_bar_clear (f);
5344 5344
5345 XFlush (FRAME_X_DISPLAY (f)); 5345 XFlush (FRAME_X_DISPLAY (f));
5346
5347#ifdef USE_GTK
5348 xg_frame_cleared (f);
5349#endif
5350
5346 UNBLOCK_INPUT; 5351 UNBLOCK_INPUT;
5347} 5352}
5348 5353