From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#35468: [PATCH] Refactor draw_glyph_string on X and w32 Date: Fri, 3 May 2019 22:12:36 +0100 Message-ID: <20190503211236.GB77011@breton.holly.idiocy.org> References: <877ebeor2d.fsf@gmail.com> <83tveit5ph.fsf@gnu.org> <87pnp5oqu1.fsf@gmail.com> <877ebcogg4.fsf@gmail.com> <83sgu0rsue.fsf@gnu.org> <20190430201129.GA73973@breton.holly.idiocy.org> <837ebaqdme.fsf@gnu.org> <20190501210847.GA74837@breton.holly.idiocy.org> <87ef5gn2q5.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="250331"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.11.3 (2019-02-01) Cc: 35468@debbugs.gnu.org To: Alex Gramiak Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 03 23:13:20 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 1hMfUe-0012u5-2z for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 May 2019 23:13:20 +0200 Original-Received: from localhost ([127.0.0.1]:47303 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMfUU-00080h-RX for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 May 2019 17:13:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMfUO-00080Q-DR for bug-gnu-emacs@gnu.org; Fri, 03 May 2019 17:13:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMfUM-0002m0-Qy for bug-gnu-emacs@gnu.org; Fri, 03 May 2019 17:13:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36237) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hMfUM-0002le-LL for bug-gnu-emacs@gnu.org; Fri, 03 May 2019 17:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hMfUM-0005Id-AU for bug-gnu-emacs@gnu.org; Fri, 03 May 2019 17:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 May 2019 21:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35468 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 35468-submit@debbugs.gnu.org id=B35468.155691796820350 (code B ref 35468); Fri, 03 May 2019 21:13:02 +0000 Original-Received: (at 35468) by debbugs.gnu.org; 3 May 2019 21:12:48 +0000 Original-Received: from localhost ([127.0.0.1]:49781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMfU7-0005IA-R4 for submit@debbugs.gnu.org; Fri, 03 May 2019 17:12:48 -0400 Original-Received: from mail-wm1-f48.google.com ([209.85.128.48]:37452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMfU5-0005Hx-Md for 35468@debbugs.gnu.org; Fri, 03 May 2019 17:12:46 -0400 Original-Received: by mail-wm1-f48.google.com with SMTP id y5so8213697wma.2 for <35468@debbugs.gnu.org>; Fri, 03 May 2019 14:12:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=RNyLLxlPhr9G1kqnkxklq3dW8kuKN9Y0L/4cuj/VpJg=; b=t7BZugmCCxbeEYKjMzOWuChfXRDSE0BGN6MwJ/9TbjklGXPYDhCq0uVvDe8jTZQnwt L5pUxae/TzwcsbFRXKRbwqIzRyc8uDz6fvl+KniNmcVlzABRfhvAd9Q0jYkNSX6D5/uJ vd3wynndAyaeZMGi/lCSKz4yk0wGiAlyySkhmJ1XuBb3MOVdC5Nvg6rUzmtJGL+s8Jv0 QKJs7AGu/iEkdwY3twF0rvQfPCxlXq2rOcDE41Q9ofIJG5G1E//1zEYZjRoA9YEu4A3g I/iv85ZsgEm8zNZfuroGmIHVe/IxfVdpTWBHeHZTdUvfnR3VZmt+QYdBnwGpDEgECWM0 XLtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=RNyLLxlPhr9G1kqnkxklq3dW8kuKN9Y0L/4cuj/VpJg=; b=jF6z1H1AdCLXQZupuQIkD/IkJffXhy2dMhi47FQw/DD7bxZeenujWqAgcm+Ccu7vPX tdWr73Q641gcU9t8bjirWrSEDdxG26lz5iGkRiTVbqYTcaTmRBYs6M0EIqQCXVeQVlA4 2QKvyjyEELB/UqwstXY2Fb+ixY6F7qH7qvoZQU0tOyZSK2hnX2hHn2idhnc6RL5/lev7 FZUn0syxBqZHRvEIrYLs2A3RPbouqhPicMNwc1BD0qTO9JMX8pxXvaBQoUPDRd+xjV8a MGhZeZaJ6V6ekT5JiAnPrxHtRtXhqtl4t9xX34AV6BzDFDSLJzVE2C+vja9CBVU2zmks 9aHw== X-Gm-Message-State: APjAAAUlg6X2O8S0xWZcOo6NRRCX+KYKHEhukNcNTGVpT3KytwvK3T8n pgZkkjTj9EuQ1N6351z7bkc= X-Google-Smtp-Source: APXvYqw1p7OEUmODvNW6nYg3sgIGUw5dyDQclfpbGuCaZBV25lbevH879gE5YOFPXlDP8DNLy7Bskw== X-Received: by 2002:a7b:cb4e:: with SMTP id v14mr7423888wmj.52.1556917959824; Fri, 03 May 2019 14:12:39 -0700 (PDT) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-c8db-4b16-8787-1926.holly.idiocy.org. [2001:8b0:3f8:8129:c8db:4b16:8787:1926]) by smtp.gmail.com with ESMTPSA id x81sm498093wmg.8.2019.05.03.14.12.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 May 2019 14:12:38 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87ef5gn2q5.fsf@gmail.com> 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:158685 Archived-At: On Thu, May 02, 2019 at 12:14:10PM -0600, Alex Gramiak wrote: > Alan Third writes: > > > It looks exactly the same to me with or without the code. Perhaps I’d > > see something different if I was using some theme which defined mouse > > face differently. > > > > I really don’t see any reason why NS should behave differently from > > the other terms here. > > There's a similar block in ns_maybe_dumpglyphs_background. Could you > test with that block removed as well? Also, there's a conditional check > (s->hl != DRAW_CURSOR) there that's not present in the other versions; > could you see if that's necessary? Removing the block in ns_maybe_dumpglyphs_background seems to make no difference here. Removing the DRAW_CURSOR check results in the cursor being drawn as a blank (background colour) rectangle on occasion. I’m not sure what the difference is, but there are a couple of comments in nsterm.m which reference NS drawing the cursor differently to other terms, i.e. /* We draw the cursor (with NSRectFill), then draw the glyph on top (other terminals do it the other way round). We must set w->phys_cursor_width to the cursor width. For bar cursors, that is CURSOR_WIDTH; for box cursors, it is the glyph width. */ and /* NOTE: under NS this is NOT used to draw cursors, but we must avoid overwriting cursor (usually when cursor on a tab). */ and I suspect this check is related. -- Alan Third