Commit 1f5cf200 authored by Dmitry Antipov's avatar 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.
parent d2b36813
2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
* 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 <dmantipov@yandex.ru> 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
Hook scanning and indentation functions to find_newline. This helps Hook scanning and indentation functions to find_newline. This helps
......
...@@ -872,29 +872,23 @@ xg_clear_under_internal_border (struct frame *f) ...@@ -872,29 +872,23 @@ xg_clear_under_internal_border (struct frame *f)
if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0) if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0)
{ {
GtkWidget *wfixed = f->output_data.x->edit_widget; GtkWidget *wfixed = f->output_data.x->edit_widget;
gtk_widget_queue_draw (wfixed); gtk_widget_queue_draw (wfixed);
gdk_window_process_all_updates (); gdk_window_process_all_updates ();
x_clear_area (FRAME_X_DISPLAY (f),
FRAME_X_WINDOW (f), x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0, 0,
0, 0, FRAME_PIXEL_WIDTH (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), 0, 0,
x_clear_area (FRAME_X_DISPLAY (f), FRAME_INTERNAL_BORDER_WIDTH (f), FRAME_PIXEL_HEIGHT (f));
FRAME_X_WINDOW (f),
0, 0, x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0,
FRAME_INTERNAL_BORDER_WIDTH (f), FRAME_PIXEL_HEIGHT (f) - FRAME_INTERNAL_BORDER_WIDTH (f),
FRAME_PIXEL_HEIGHT (f), 0); FRAME_PIXEL_WIDTH (f), FRAME_INTERNAL_BORDER_WIDTH (f));
x_clear_area (FRAME_X_DISPLAY (f),
FRAME_X_WINDOW (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),
FRAME_PIXEL_WIDTH (f), 0, FRAME_INTERNAL_BORDER_WIDTH (f), FRAME_PIXEL_HEIGHT (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);
} }
} }
...@@ -3751,14 +3745,11 @@ xg_update_scrollbar_pos (struct frame *f, ...@@ -3751,14 +3745,11 @@ xg_update_scrollbar_pos (struct frame *f,
gtk_widget_queue_draw (wfixed); gtk_widget_queue_draw (wfixed);
gdk_window_process_all_updates (); gdk_window_process_all_updates ();
if (oldx != -1 && oldw > 0 && oldh > 0) if (oldx != -1 && oldw > 0 && oldh > 0)
{ /* Clear under old scroll bar position. This must be done after
/* Clear under old scroll bar position. This must be done after the gtk_widget_queue_draw and gdk_window_process_all_updates
the gtk_widget_queue_draw and gdk_window_process_all_updates above. */
above. */ x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
x_clear_area (FRAME_X_DISPLAY (f), oldx, oldy, oldw, oldh);
FRAME_X_WINDOW (f),
oldx, oldy, oldw, oldh, 0);
}
/* GTK does not redraw until the main loop is entered again, but /* 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 if there are no X events pending we will not enter it. So we sync
......
...@@ -1186,7 +1186,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) ...@@ -1186,7 +1186,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
block_input (); block_input ();
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
0, y, width, height, False); 0, y, width, height);
unblock_input (); unblock_input ();
} }
...@@ -1197,7 +1197,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) ...@@ -1197,7 +1197,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
block_input (); block_input ();
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
0, y, width, height, False); 0, y, width, height);
unblock_input (); unblock_input ();
} }
...@@ -1295,8 +1295,8 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) ...@@ -1295,8 +1295,8 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
if (height > 0 && width > 0) if (height > 0 && width > 0)
{ {
block_input (); block_input ();
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
0, y, width, height, False); 0, y, width, height);
unblock_input (); unblock_input ();
} }
......
...@@ -698,10 +698,10 @@ x_after_update_window_line (struct window *w, struct glyph_row *desired_row) ...@@ -698,10 +698,10 @@ x_after_update_window_line (struct window *w, struct glyph_row *desired_row)
block_input (); block_input ();
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 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), x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
FRAME_PIXEL_WIDTH (f) - width, FRAME_PIXEL_WIDTH (f) - width,
y, width, height, False); y, width, height);
unblock_input (); unblock_input ();
} }
} }
...@@ -2968,10 +2968,10 @@ x_delete_glyphs (struct frame *f, register int n) ...@@ -2968,10 +2968,10 @@ x_delete_glyphs (struct frame *f, register int n)
If they are <= 0, this is probably an error. */ If they are <= 0, this is probably an error. */
void 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); 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) ...@@ -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. */ this case, no clear_frame is generated to reduce flickering. */
if (width > 0 && height > 0) if (width > 0 && height > 0)
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
left, top, width, left, top, width, window_box_height (w));
window_box_height (w), False);
window = XCreateWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), window = XCreateWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
/* Position and size of scroll bar. */ /* 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 ...@@ -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." */ zero-height areas; that means "clear to end of window." */
if (start > 0) if (start > 0)
x_clear_area (FRAME_X_DISPLAY (f), w, x_clear_area (FRAME_X_DISPLAY (f), w,
/* x, y, width, height, and exposures. */
VERTICAL_SCROLL_BAR_LEFT_BORDER, VERTICAL_SCROLL_BAR_LEFT_BORDER,
VERTICAL_SCROLL_BAR_TOP_BORDER, VERTICAL_SCROLL_BAR_TOP_BORDER,
inside_width, start, inside_width, start);
False);
/* Change to proper foreground color if one is specified. */ /* Change to proper foreground color if one is specified. */
if (f->output_data.x->scroll_bar_foreground_pixel != -1) 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 ...@@ -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." */ clear zero-height areas; that means "clear to end of window." */
if (end < inside_height) if (end < inside_height)
x_clear_area (FRAME_X_DISPLAY (f), w, x_clear_area (FRAME_X_DISPLAY (f), w,
/* x, y, width, height, and exposures. */
VERTICAL_SCROLL_BAR_LEFT_BORDER, VERTICAL_SCROLL_BAR_LEFT_BORDER,
VERTICAL_SCROLL_BAR_TOP_BORDER + end, VERTICAL_SCROLL_BAR_TOP_BORDER + end,
inside_width, inside_height - end, inside_width, inside_height - end);
False);
} }
unblock_input (); unblock_input ();
...@@ -5189,11 +5183,11 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio ...@@ -5189,11 +5183,11 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
#ifdef USE_TOOLKIT_SCROLL_BARS #ifdef USE_TOOLKIT_SCROLL_BARS
if (fringe_extended_p) if (fringe_extended_p)
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 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 else
#endif #endif
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
left, top, width, height, False); left, top, width, height);
unblock_input (); unblock_input ();
} }
...@@ -5228,10 +5222,10 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio ...@@ -5228,10 +5222,10 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
{ {
if (fringe_extended_p) if (fringe_extended_p)
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 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 else
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
left, top, width, height, False); left, top, width, height);
} }
#ifdef USE_GTK #ifdef USE_GTK
xg_update_scrollbar_pos (f, xg_update_scrollbar_pos (f,
...@@ -5255,12 +5249,10 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio ...@@ -5255,12 +5249,10 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
if (VERTICAL_SCROLL_BAR_WIDTH_TRIM) if (VERTICAL_SCROLL_BAR_WIDTH_TRIM)
{ {
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
left, top, VERTICAL_SCROLL_BAR_WIDTH_TRIM, left, top, VERTICAL_SCROLL_BAR_WIDTH_TRIM, height);
height, False);
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
left + width - VERTICAL_SCROLL_BAR_WIDTH_TRIM, left + width - VERTICAL_SCROLL_BAR_WIDTH_TRIM,
top, VERTICAL_SCROLL_BAR_WIDTH_TRIM, top, VERTICAL_SCROLL_BAR_WIDTH_TRIM, height);
height, False);
} }
/* Clear areas not covered by the scroll bar because it's not as /* 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 ...@@ -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)) if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w))
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
left + area_width - rest, top, left + area_width - rest, top, rest, height);
rest, height, False);
else else
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 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, ...@@ -6122,11 +6113,10 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
{ {
#ifdef USE_GTK #ifdef USE_GTK
/* This seems to be needed for GTK 2.6. */ /* This seems to be needed for GTK 2.6. */
x_clear_area (event.xexpose.display, x_clear_area (event.xexpose.display,
event.xexpose.window, event.xexpose.window,
event.xexpose.x, event.xexpose.y, event.xexpose.x, event.xexpose.y,
event.xexpose.width, event.xexpose.height, event.xexpose.width, event.xexpose.height);
FALSE);
#endif #endif
if (!FRAME_VISIBLE_P (f)) if (!FRAME_VISIBLE_P (f))
{ {
...@@ -7349,8 +7339,7 @@ x_define_frame_cursor (struct frame *f, Cursor cursor) ...@@ -7349,8 +7339,7 @@ x_define_frame_cursor (struct frame *f, Cursor cursor)
static void static void
x_clear_frame_area (struct frame *f, int x, int y, int width, int height) 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_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), x, y, width, height);
x, y, width, height, False);
#ifdef USE_GTK #ifdef USE_GTK
/* Must queue a redraw, because scroll bars might have been cleared. */ /* Must queue a redraw, because scroll bars might have been cleared. */
if (FRAME_GTK_WIDGET (f)) if (FRAME_GTK_WIDGET (f))
......
...@@ -968,7 +968,7 @@ extern bool x_alloc_lighter_color_for_widget (Widget, Display *, Colormap, ...@@ -968,7 +968,7 @@ extern bool x_alloc_lighter_color_for_widget (Widget, Display *, Colormap,
#endif #endif
extern bool x_alloc_nearest_color (struct frame *, Colormap, XColor *); extern bool x_alloc_nearest_color (struct frame *, Colormap, XColor *);
extern void x_query_color (struct frame *f, 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 #if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK
extern void x_mouse_leave (struct x_display_info *); extern void x_mouse_leave (struct x_display_info *);
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment