From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#35464: [PATCH] Refactor update_window_begin and update_window_end hooks Date: Sun, 28 Apr 2019 19:45:22 +0300 Message-ID: <83v9yyt6xp.fsf@gnu.org> References: <87k1ffnnn2.fsf@gmail.com> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="197968"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 35464@debbugs.gnu.org To: Alex Gramiak Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 28 18:46:15 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hKmwQ-000pOI-Qx for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Apr 2019 18:46:14 +0200 Original-Received: from localhost ([127.0.0.1]:46439 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKmwP-0004EB-Os for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Apr 2019 12:46:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKmwJ-0004E3-4s for bug-gnu-emacs@gnu.org; Sun, 28 Apr 2019 12:46:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hKmwE-0007nz-EU for bug-gnu-emacs@gnu.org; Sun, 28 Apr 2019 12:46:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52384) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hKmwE-0007nX-3x for bug-gnu-emacs@gnu.org; Sun, 28 Apr 2019 12:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hKmwE-00062t-0c for bug-gnu-emacs@gnu.org; Sun, 28 Apr 2019 12:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Apr 2019 16:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35464 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 35464-submit@debbugs.gnu.org id=B35464.155646994823213 (code B ref 35464); Sun, 28 Apr 2019 16:46:01 +0000 Original-Received: (at 35464) by debbugs.gnu.org; 28 Apr 2019 16:45:48 +0000 Original-Received: from localhost ([127.0.0.1]:37695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKmvz-00062K-LF for submit@debbugs.gnu.org; Sun, 28 Apr 2019 12:45:48 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKmvw-000625-Sz for 35464@debbugs.gnu.org; Sun, 28 Apr 2019 12:45:46 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38223) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKmvq-0007P7-Tf; Sun, 28 Apr 2019 12:45:39 -0400 Original-Received: from [176.228.60.248] (port=1993 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hKmvm-0005I6-Mb; Sun, 28 Apr 2019 12:45:36 -0400 In-reply-to: <87k1ffnnn2.fsf@gmail.com> (message from Alex Gramiak on Sat, 27 Apr 2019 15:28:49 -0600) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:158398 Archived-At: > From: Alex Gramiak > Date: Sat, 27 Apr 2019 15:28:49 -0600 > > 1) Is it okay to not use reset_mouse_highlight in the generic version > (ns_update_window_end still uses it)? See commit 60ae3d09932f for why > reset_mouse_highlight was removed in the x/w32 versions. Don't know, the problem was specific to X. I think we should leave the code there, the NS port has enough redisplay problems already. > 2) Should the #if 0 section be removed in w32_update_window_begin? Yes, I think we can remove that. > @@ -13145,8 +13069,8 @@ static struct redisplay_interface x_redisplay_interface = > gui_clear_end_of_line, > x_scroll_run, > x_after_update_window_line, > - x_update_window_begin, > - x_update_window_end, > + gui_update_window_begin, > + gui_update_window_end, > x_flip_and_flush, > gui_clear_window_mouse_face, > gui_get_glyph_overhangs, This looks like a step in the wrong direction to me: the different implementations are all almost completely identical, except that w32 has a small quirk there. So I'd say make a single function window_update_begin, that will be called directly (not via a hook pointer), and make the w32 part be an optional hook called only if non-NULL. Also, please don't add gui_* functions extracted from the *term.c files in xdisp.c, as that file is already too large. Renaming existing functions in xdisp.c is OK, as well as adding static utility functions. But for new gui_* functions that were originally in xterm.c etc., I'd prefer a new file, let's call it gui_term.c. Thanks.