From: Dmitry Antipov Date: Thu, 29 Aug 2013 07:27:27 +0000 (+0400) Subject: * xterm.c (x_clear_area): Lost 7th arg because it is always False. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1686^2~58 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1f5cf2009af2779ad81412b9d111b37f6e2fd841;p=emacs.git * xterm.c (x_clear_area): Lost 7th arg because it is always False. (x_after_update_window_line, x_scroll_bar_create): (x_scroll_bar_set_handle, XTset_vertical_scroll_bar): (handle_one_xevent, x_clear_frame_area): * gtkutil.c (xg_clear_under_internal_border, xg_update_scrollbar_pos): * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Adjust users. * xterm.h (x_clear_area): Adjust prototype. --- diff --git a/src/ChangeLog b/src/ChangeLog index 2105391755b..a2a58487672 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2013-08-29 Dmitry Antipov + + * xterm.c (x_clear_area): Lost 7th arg because it is always False. + (x_after_update_window_line, x_scroll_bar_create): + (x_scroll_bar_set_handle, XTset_vertical_scroll_bar): + (handle_one_xevent, x_clear_frame_area): + * gtkutil.c (xg_clear_under_internal_border, xg_update_scrollbar_pos): + * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Adjust users. + * xterm.h (x_clear_area): Adjust prototype. + 2013-08-29 Dmitry Antipov Hook scanning and indentation functions to find_newline. This helps diff --git a/src/gtkutil.c b/src/gtkutil.c index f03ca592834..a1d217e06ed 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -872,29 +872,23 @@ xg_clear_under_internal_border (struct frame *f) if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0) { GtkWidget *wfixed = f->output_data.x->edit_widget; + gtk_widget_queue_draw (wfixed); gdk_window_process_all_updates (); - x_clear_area (FRAME_X_DISPLAY (f), - FRAME_X_WINDOW (f), - 0, 0, - FRAME_PIXEL_WIDTH (f), - FRAME_INTERNAL_BORDER_WIDTH (f), 0); - x_clear_area (FRAME_X_DISPLAY (f), - FRAME_X_WINDOW (f), - 0, 0, - FRAME_INTERNAL_BORDER_WIDTH (f), - FRAME_PIXEL_HEIGHT (f), 0); - x_clear_area (FRAME_X_DISPLAY (f), - FRAME_X_WINDOW (f), - 0, FRAME_PIXEL_HEIGHT (f) - FRAME_INTERNAL_BORDER_WIDTH (f), - FRAME_PIXEL_WIDTH (f), - FRAME_INTERNAL_BORDER_WIDTH (f), 0); - x_clear_area (FRAME_X_DISPLAY (f), - FRAME_X_WINDOW (f), - FRAME_PIXEL_WIDTH (f) - FRAME_INTERNAL_BORDER_WIDTH (f), - 0, - FRAME_INTERNAL_BORDER_WIDTH (f), - FRAME_PIXEL_HEIGHT (f), 0); + + x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0, 0, + FRAME_PIXEL_WIDTH (f), FRAME_INTERNAL_BORDER_WIDTH (f)); + + x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0, 0, + FRAME_INTERNAL_BORDER_WIDTH (f), FRAME_PIXEL_HEIGHT (f)); + + x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0, + FRAME_PIXEL_HEIGHT (f) - FRAME_INTERNAL_BORDER_WIDTH (f), + FRAME_PIXEL_WIDTH (f), FRAME_INTERNAL_BORDER_WIDTH (f)); + + x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + FRAME_PIXEL_WIDTH (f) - FRAME_INTERNAL_BORDER_WIDTH (f), + 0, FRAME_INTERNAL_BORDER_WIDTH (f), FRAME_PIXEL_HEIGHT (f)); } } @@ -3751,14 +3745,11 @@ xg_update_scrollbar_pos (struct frame *f, gtk_widget_queue_draw (wfixed); gdk_window_process_all_updates (); if (oldx != -1 && oldw > 0 && oldh > 0) - { - /* Clear under old scroll bar position. This must be done after - the gtk_widget_queue_draw and gdk_window_process_all_updates - above. */ - x_clear_area (FRAME_X_DISPLAY (f), - FRAME_X_WINDOW (f), - oldx, oldy, oldw, oldh, 0); - } + /* Clear under old scroll bar position. This must be done after + the gtk_widget_queue_draw and gdk_window_process_all_updates + above. */ + x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + oldx, oldy, oldw, oldh); /* GTK does not redraw until the main loop is entered again, but if there are no X events pending we will not enter it. So we sync diff --git a/src/xfns.c b/src/xfns.c index 0c91e298ec8..48bf04dea13 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1186,7 +1186,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) block_input (); x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - 0, y, width, height, False); + 0, y, width, height); unblock_input (); } @@ -1197,7 +1197,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) block_input (); x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - 0, y, width, height, False); + 0, y, width, height); unblock_input (); } @@ -1295,8 +1295,8 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) if (height > 0 && width > 0) { block_input (); - x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - 0, y, width, height, False); + x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + 0, y, width, height); unblock_input (); } diff --git a/src/xterm.c b/src/xterm.c index ef2a2bc8c8c..2ece8c40d2d 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -698,10 +698,10 @@ x_after_update_window_line (struct window *w, struct glyph_row *desired_row) block_input (); x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - 0, y, width, height, False); + 0, y, width, height); x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), FRAME_PIXEL_WIDTH (f) - width, - y, width, height, False); + y, width, height); unblock_input (); } } @@ -2968,10 +2968,10 @@ x_delete_glyphs (struct frame *f, register int n) If they are <= 0, this is probably an error. */ void -x_clear_area (Display *dpy, Window window, int x, int y, int width, int height, int exposures) +x_clear_area (Display *dpy, Window window, int x, int y, int width, int height) { eassert (width > 0 && height > 0); - XClearArea (dpy, window, x, y, width, height, exposures); + XClearArea (dpy, window, x, y, width, height, False); } @@ -4927,8 +4927,7 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height) this case, no clear_frame is generated to reduce flickering. */ if (width > 0 && height > 0) x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - left, top, width, - window_box_height (w), False); + left, top, width, window_box_height (w)); window = XCreateWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), /* Position and size of scroll bar. */ @@ -5064,11 +5063,9 @@ x_scroll_bar_set_handle (struct scroll_bar *bar, int start, int end, int rebuild zero-height areas; that means "clear to end of window." */ if (start > 0) x_clear_area (FRAME_X_DISPLAY (f), w, - /* x, y, width, height, and exposures. */ VERTICAL_SCROLL_BAR_LEFT_BORDER, VERTICAL_SCROLL_BAR_TOP_BORDER, - inside_width, start, - False); + inside_width, start); /* Change to proper foreground color if one is specified. */ if (f->output_data.x->scroll_bar_foreground_pixel != -1) @@ -5091,12 +5088,9 @@ x_scroll_bar_set_handle (struct scroll_bar *bar, int start, int end, int rebuild clear zero-height areas; that means "clear to end of window." */ if (end < inside_height) x_clear_area (FRAME_X_DISPLAY (f), w, - /* x, y, width, height, and exposures. */ VERTICAL_SCROLL_BAR_LEFT_BORDER, VERTICAL_SCROLL_BAR_TOP_BORDER + end, - inside_width, inside_height - end, - False); - + inside_width, inside_height - end); } unblock_input (); @@ -5189,11 +5183,11 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio #ifdef USE_TOOLKIT_SCROLL_BARS if (fringe_extended_p) x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - sb_left, top, sb_width, height, False); + sb_left, top, sb_width, height); else #endif x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - left, top, width, height, False); + left, top, width, height); unblock_input (); } @@ -5228,10 +5222,10 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio { if (fringe_extended_p) x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - sb_left, top, sb_width, height, False); + sb_left, top, sb_width, height); else x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - left, top, width, height, False); + left, top, width, height); } #ifdef USE_GTK xg_update_scrollbar_pos (f, @@ -5255,12 +5249,10 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio if (VERTICAL_SCROLL_BAR_WIDTH_TRIM) { x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - left, top, VERTICAL_SCROLL_BAR_WIDTH_TRIM, - height, False); + left, top, VERTICAL_SCROLL_BAR_WIDTH_TRIM, height); x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), left + width - VERTICAL_SCROLL_BAR_WIDTH_TRIM, - top, VERTICAL_SCROLL_BAR_WIDTH_TRIM, - height, False); + top, VERTICAL_SCROLL_BAR_WIDTH_TRIM, height); } /* Clear areas not covered by the scroll bar because it's not as @@ -5274,11 +5266,10 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio { if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)) x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - left + area_width - rest, top, - rest, height, False); + left + area_width - rest, top, rest, height); else x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - left, top, rest, height, False); + left, top, rest, height); } } @@ -6122,11 +6113,10 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, { #ifdef USE_GTK /* This seems to be needed for GTK 2.6. */ - x_clear_area (event.xexpose.display, - event.xexpose.window, - event.xexpose.x, event.xexpose.y, - event.xexpose.width, event.xexpose.height, - FALSE); + x_clear_area (event.xexpose.display, + event.xexpose.window, + event.xexpose.x, event.xexpose.y, + event.xexpose.width, event.xexpose.height); #endif if (!FRAME_VISIBLE_P (f)) { @@ -7349,8 +7339,7 @@ x_define_frame_cursor (struct frame *f, Cursor cursor) static void x_clear_frame_area (struct frame *f, int x, int y, int width, int height) { - x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - x, y, width, height, False); + x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), x, y, width, height); #ifdef USE_GTK /* Must queue a redraw, because scroll bars might have been cleared. */ if (FRAME_GTK_WIDGET (f)) diff --git a/src/xterm.h b/src/xterm.h index 723550c57c4..26f6095d727 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -968,7 +968,7 @@ extern bool x_alloc_lighter_color_for_widget (Widget, Display *, Colormap, #endif extern bool x_alloc_nearest_color (struct frame *, Colormap, XColor *); extern void x_query_color (struct frame *f, XColor *); -extern void x_clear_area (Display *, Window, int, int, int, int, int); +extern void x_clear_area (Display *, Window, int, int, int, int); #if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK extern void x_mouse_leave (struct x_display_info *); #endif