From dfa51adfe3b00e10beffb778d1d630469b5ecfd0 Mon Sep 17 00:00:00 2001 From: Jeff Walsh Date: Wed, 12 May 2021 21:27:59 +1000 Subject: [PATCH] * src/pgtkterm.c remove duplicated code * src/pgtkterm.c (pgtk_update_window_begin): (pgtk_update_window_end): (pgtk_redisplay_interface): Remove duplicate code and default to the generic gui_update_window_begin/end implementations --- src/pgtkterm.c | 80 ++------------------------------------------------ 1 file changed, 2 insertions(+), 78 deletions(-) diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 5331b67e33..8d22f8cad1 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -3193,33 +3193,6 @@ pgtk_update_begin (struct frame *f) pgtk_clear_under_internal_border (f); } -/* Start update of window W. */ - -static void -pgtk_update_window_begin (struct window *w) -{ - struct frame *f = XFRAME (WINDOW_FRAME (w)); - Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); - - w->output_cursor = w->cursor; - - block_input (); - - if (f == hlinfo->mouse_face_mouse_frame) - { - /* Don't do highlighting for mouse motion during the update. */ - hlinfo->mouse_face_defer = true; - - /* If F needs to be redrawn, simply forget about any prior mouse - highlighting. */ - if (FRAME_GARBAGED_P (f)) - hlinfo->mouse_face_window = Qnil; - } - - unblock_input (); -} - - /* Draw a vertical window border from (x,y0) to (x,y1) */ static void @@ -3297,55 +3270,6 @@ pgtk_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1) pgtk_end_cr_clip (f); } -/* End update of window W. - - Draw vertical borders between horizontally adjacent windows, and - display W's cursor if CURSOR_ON_P is non-zero. - - MOUSE_FACE_OVERWRITTEN_P non-zero means that some row containing - glyphs in mouse-face were overwritten. In that case we have to - make sure that the mouse-highlight is properly redrawn. - - W may be a menu bar pseudo-window in case we don't have X toolkit - support. Such windows don't have a cursor, so don't display it - here. */ - -static void -pgtk_update_window_end (struct window *w, bool cursor_on_p, - bool mouse_face_overwritten_p) -{ - if (!w->pseudo_window_p) - { - block_input (); - - if (cursor_on_p) - display_and_set_cursor (w, true, - w->output_cursor.hpos, w->output_cursor.vpos, - w->output_cursor.x, w->output_cursor.y); - - if (draw_window_fringes (w, true)) - { - if (WINDOW_RIGHT_DIVIDER_WIDTH (w)) - gui_draw_right_divider (w); - else - gui_draw_vertical_border (w); - } - - unblock_input (); - } - - /* If a row with mouse-face was overwritten, arrange for - XTframe_up_to_date to redisplay the mouse highlight. */ - if (mouse_face_overwritten_p) - { - Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame)); - - hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; - hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; - hlinfo->mouse_face_window = Qnil; - } -} - /* End update of frame F. This function is installed as a hook in update_end. */ @@ -3698,8 +3622,8 @@ pgtk_flush_display (struct frame *f) gui_clear_end_of_line, pgtk_scroll_run, pgtk_after_update_window_line, - pgtk_update_window_begin, - pgtk_update_window_end, + NULL, // gui_update_window_begin, + NULL, // gui_update_window_end, pgtk_flush_display, gui_clear_window_mouse_face, gui_get_glyph_overhangs, -- 2.31.1