From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.devel Subject: Re: Drawing dirty rectangles with expose_window: row->clip = fr Date: Tue, 02 Apr 2019 10:42:17 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="241765"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 02 19:42:35 2019 Return-path: Envelope-to: ged-emacs-devel@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 1hBNQg-0010mJ-Se for ged-emacs-devel@m.gmane.org; Tue, 02 Apr 2019 19:42:35 +0200 Original-Received: from localhost ([127.0.0.1]:43960 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBNQf-0006Gr-Ge for ged-emacs-devel@m.gmane.org; Tue, 02 Apr 2019 13:42:33 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBNQX-0006GY-PF for emacs-devel@gnu.org; Tue, 02 Apr 2019 13:42:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hBNQV-00057j-CI for emacs-devel@gnu.org; Tue, 02 Apr 2019 13:42:25 -0400 Original-Received: from gateway21.websitewelcome.com ([192.185.46.113]:28326) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hBNQS-00051i-8Q for emacs-devel@gnu.org; Tue, 02 Apr 2019 13:42:21 -0400 Original-Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 1D12A400CD424 for ; Tue, 2 Apr 2019 12:42:19 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id BNQQhEChN2PzOBNQQhq1x9; Tue, 02 Apr 2019 12:42:19 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date: Sender:Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=TUsi12kJ4Ych+ayqE+cuFQeMCLR8ZPHN/bBlJ1l13d8=; b=JwOLHYQbrRGhKQX//y5NCLF8xv Pgy1PMykU5ezlcCWV6ybSYuNNVgGbYhRfu9HFW3qv4Trq7kI99AJTt75PStp9MhkMMPcW6sUYuSom ToTJ28Wl/nzQzdqiyJjxN7em4SCqI1HWXdaaQBU6AhdiGOtwdDBciWxdp9fUU4wk8LS2BPJE8VTIA snk38h1FKL5QRX5RMCbsDR9vsDj3yxBEBa6xHOmUT0l3NluTSMb2NHSD3y5JJCZx3ECRq6uPUoPzS 3sg5PwgfNnCd/7ktYYWm3BIVPaP+utDqXH/PIXeCVTz+BwsCSx4FXtSkXwGoa7rKpMYubFwj28uY2 XiqDIgjA==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:50361 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.91) (envelope-from ) id 1hBNQQ-001RF7-9c; Tue, 02 Apr 2019 12:42:18 -0500 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.239.195 X-Source-L: No X-Exim-ID: 1hBNQQ-001RF7-9c X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.local) [45.48.239.195]:50361 X-Source-Auth: lawlist X-Email-Count: 1 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 192.185.46.113 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:234884 Archived-At: Sorry, I misspoke ... I had erroneously placed a condition that inhibited an important message that we need here. It is actually the first call to expose_line within expose_window where we see the issue occur, and that is why commenting out "row->clip = fr" makes the issue go away. The FRAME_BOX_CURSOR is a variant of box/hollow cursors. The box/hollow cursor family is drawn with NSRectFill, and then draw_glyphs writes a glyph on top of the fake cursor if there is a character there. EXAMPLE: On the first line of the bottom window (split frame with even top/bottom windows), we have a sentence: "This is a test!" We draw a box/hollow family cursor at HPOS 6, which lands on top of the letter "s". One or more colored rectangles is/are drawn on top of the letter "s", effectively erasing the letter "s" completely. draw_glyphs then writes a _new_ letter "s" on top of the colored rectangles. In the current issue, the colored rectangles are drawn on top of the letter "s" at HPOS 6. However, the call to draw_glyphs does not result in a _new_ letter "s" being drawn on top of the colored rectangles. "row->clip = fr" prevents the _new_ letter "s" from being drawn on the glass. The expose_window XRectangle dimensions are as follows: fr->x (0) | fr->y (258) | fr->width (595) | fr->height (16) The expose_line XRectangle dimensions are as follows: r.x (0) | r.y (0) | r.width (591) | r.height (0) The box/hollow family cursor NSRect dimensions are as follows: fx (52) | fy (274) | w (7) | h (16) The relevant STDERR printout is as follows: expose_window (2, 274, 591, 0) A. expose_window (#): vpos (0) fr->x (0) | fr->y (258) | fr->width (595) | fr->height (16) r.x (0) | r.y (0) | r.width (591) | r.height (0) [expose_line is called] [expose_area is called] mc_ns_draw_window_cursor (#): x (42) | fx (52) | y (0) | fy (274) | hpos (6) | vpos (0) wd (7) | h (16) | RGB (1.000000/0.000000/0.270588) cursor_type (FRAMED_BOX_CURSOR) | glyph_flavor (MC_GLYPH) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > Date: [04-02-2019 09:51:49] <02 Apr 2019 19:51:49 +0300> > From: Eli Zaretskii > To: Keith David Bershatsky > CC: emacs-devel@gnu.org > Subject: Re: Drawing dirty rectangles with expose_window: row->clip = fr > > > Date: Tue, 02 Apr 2019 09:27:44 -0700 > > From: Keith David Bershatsky > > Cc: emacs-devel@gnu.org > > > > In this example, there is one frame with two windows in a top/bottom equal split. The top window (*scratch*) does not have any fake cursors. The bottom window (*MC-TEST*) does have fake cursors. It appears that expose_window is drawing the mode-line of the top window, and the rectangle extends down into the first line of the bottom window that has fake cursors. The fake cursors draw on the first line of the bottom window, but the glyphs do not draw on top of the box/hollow cursors. This happens at the section of expose_window where it has the comment: > > > > /* Display the mode line if there is one. */ > > I don't think I understand you answer. > > What is the height of the mode line? is it 16 pixels or less? IOW, > how do you conclude that the rectangle 'fr' extends beyond the mode > line? > > I also don't understand the meaning of this part: > > The fake cursors draw on the first line of the bottom window, but > the glyphs do not draw on top of the box/hollow cursors. > > Which glyphs "do not draw on top of the box/hollow cursors"?