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>
Hook scanning and indentation functions to find_newline. This helps
......
......@@ -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),
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), 0);
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);
}
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
......
......@@ -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 ();
}
......@@ -1296,7 +1296,7 @@ x_set_tool_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 ();
}
......
......@@ -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);
}
}
......@@ -6125,8 +6116,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
x_clear_area (event.xexpose.display,
event.xexpose.window,
event.xexpose.x, event.xexpose.y,
event.xexpose.width, event.xexpose.height,
FALSE);
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))
......
......@@ -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
......
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