diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2004-05-07 14:20:00 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2004-05-07 14:20:00 +0000 |
commit | 52f9ab73a16c71ffe7f8a1c25f9432bbe32f10cf (patch) | |
tree | 399c54ddfa7cac6c90a07a81308bf7f5e71b66bd /src/gtkutil.c | |
parent | b160ff41a813213adfa745a9d009ab638a22d7b1 (diff) | |
parent | a478f3e181bd9925ecb506abf4e49216d392124a (diff) | |
download | emacs-52f9ab73a16c71ffe7f8a1c25f9432bbe32f10cf.tar.gz emacs-52f9ab73a16c71ffe7f8a1c25f9432bbe32f10cf.tar.bz2 emacs-52f9ab73a16c71ffe7f8a1c25f9432bbe32f10cf.zip |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-268
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-269
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-270
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-271
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-272
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-273
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-274
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-275
Update from CVS: man/makefile.w32-in: Revert last change
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-276
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-277
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-278
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-279
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-280
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-281
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-282
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-283
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-284
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-285
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-286
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-157
Diffstat (limited to 'src/gtkutil.c')
-rw-r--r-- | src/gtkutil.c | 73 |
1 files changed, 8 insertions, 65 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c index 4d0b50573f7..82d5135d2bc 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -2760,18 +2760,16 @@ xg_update_scrollbar_pos (f, scrollbar_id, top, left, width, height, if (wscroll) { GtkWidget *wfixed = f->output_data.x->edit_widget; - int winextra = canon_width > width ? (canon_width - width) / 2 : 0; - int bottom = top + height; - gint slider_width; - int oldtop, oldleft, oldbottom; - GtkRequisition req; + gtk_container_set_reallocate_redraws (GTK_CONTAINER (wfixed), TRUE); - /* Get old values. */ - xg_find_top_left_in_fixed (wscroll, wfixed, &oldleft, &oldtop); - gtk_widget_size_request (wscroll, &req); - oldbottom = oldtop + req.height; + /* Move and resize to new values. */ + gtk_fixed_move (GTK_FIXED (wfixed), wscroll, left, top); + gtk_widget_set_size_request (wscroll, width, height); + /* Must force out update so changed scroll bars gets redrawn. */ + gdk_window_process_all_updates (); + /* Scroll bars in GTK has a fixed width, so if we say width 16, it will only be its fixed width (14 is default) anyway, the rest is blank. We are drawing the mode line across scroll bars when @@ -2799,62 +2797,7 @@ xg_update_scrollbar_pos (f, scrollbar_id, top, left, width, height, the scroll bar and the edge of the window and between the scroll bar and the fringe. */ - if (oldtop != -1 && oldleft != -1) - { - int gtkextral, gtkextrah; - int xl, xr, wbl, wbr; - int bottomdiff, topdiff; - - gtk_widget_style_get (wscroll, "slider_width", &slider_width, NULL); - gtkextral = width > slider_width ? (width - slider_width) / 2 : 0; - gtkextrah = gtkextral ? (width - slider_width - gtkextral) : 0; - - xl = real_left; - wbl = gtkextral + winextra; - wbr = gtkextrah + winextra; - xr = left + gtkextral + slider_width; - bottomdiff = abs (oldbottom - bottom); - topdiff = abs (oldtop - top); - - if (oldleft != left) - { - gdk_window_clear_area (wfixed->window, xl, top, wbl, height); - gdk_window_clear_area (wfixed->window, xr, top, wbr, height); - } - - if (oldtop > top) - { - gdk_window_clear_area (wfixed->window, xl, top, wbl, topdiff); - gdk_window_clear_area (wfixed->window, xr, top, wbr, topdiff); - } - else if (oldtop < top) - { - gdk_window_clear_area (wfixed->window, xl, oldtop, wbl, topdiff); - gdk_window_clear_area (wfixed->window, xr, oldtop, wbr, topdiff); - } - - if (oldbottom > bottom) - { - gdk_window_clear_area (wfixed->window, xl, bottom, wbl, - bottomdiff); - gdk_window_clear_area (wfixed->window, xr, bottom, wbr, - bottomdiff); - } - else if (oldbottom < bottom) - { - gdk_window_clear_area (wfixed->window, xl, oldbottom, wbl, - bottomdiff); - gdk_window_clear_area (wfixed->window, xr, oldbottom, wbr, - bottomdiff); - } - } - - /* Move and resize to new values. */ - gtk_fixed_move (GTK_FIXED (wfixed), wscroll, left, top); - gtk_widget_set_size_request (wscroll, width, height); - - /* Must force out update so changed scroll bars gets redrawn. */ - gdk_window_process_all_updates (); + XClearWindow (FRAME_X_DISPLAY (f), GTK_WIDGET_TO_X_WIN (wscroll)); SET_FRAME_GARBAGED (f); cancel_mouse_face (f); |