unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Keith David Bershatsky <esq@lawlist.com>
To: Eli Zaretskii <eliz@gnu.org>
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	[thread overview]
Message-ID: <m2wokc74ov.wl%esq@lawlist.com> (raw)

Thank you, Eli, for reviewing/responding to this particular thread.

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.  */

B.  expose_window (#<window 3 on *scratch*>):  vpos (3)
    fr->x (0) | fr->y (258) | fr->width (595) | fr->height (16)
    r.x (0) | r.y (256) | r.width (591) | r.height (16)

mc_ns_draw_window_cursor (#<window 6 on *MC-TEST*>):
  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)

mc_ns_draw_window_cursor (#<window 6 on *MC-TEST*>):
  x (35) | fx (45) | y (0) | fy (274) | hpos (5) | vpos (0)
  wd (3) | h (16) | RGB (0.000000/1.000000/1.000000)
  cursor_type (BAR_CURSOR) | glyph_flavor (MC_GLYPH)


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

> Date: [04-02-2019 07:48:11] <02 Apr 2019 17:48:11 +0300>
> From: Eli Zaretskii <eliz@gnu.org>
> To: Keith David Bershatsky <esq@lawlist.com>
> CC: emacs-devel@gnu.org
> Subject: Re: Drawing dirty rectangles with expose_window:  row->clip = fr
> 
> > Date: Mon, 01 Apr 2019 18:55:46 -0700
> > From: Keith David Bershatsky <esq@lawlist.com>
> >
> > Even though ns_clip_to_rect returns TRUE, "row->clip = fr;" in expose_window can sometimes prevent glyphs from being drawn within the rectangle that is passed as an argument of ns_clip_to_rect.  This has the effect of permitting fake cursors to be drawn, but then glyphs cannot be drawn on top of hollow/box fake cursors.
> >
> > How can I reconcile a false_positive with ns_clip_to_rect?
> 
> Is the fake cursor entirely inside the rectangle described by 'fr', or
> is it or some of its parts outside?
> 
> > Or, perhaps "row->clip = fr;" in expose_window needs to be adjusted to permit the drawing of glyphs?
> 
> It already is, AFAIU.  Barring bugs, that is.



             reply	other threads:[~2019-04-02 16:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02 16:27 Keith David Bershatsky [this message]
2019-04-02 16:51 ` Drawing dirty rectangles with expose_window: row->clip = fr Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2019-04-03 19:28 Keith David Bershatsky
2019-04-02 20:42 Keith David Bershatsky
2019-04-02 17:42 Keith David Bershatsky
2019-04-02  1:55 Keith David Bershatsky
2019-04-02 14:48 ` Eli Zaretskii
2019-04-02 19:34 ` Alan Third

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2wokc74ov.wl%esq@lawlist.com \
    --to=esq@lawlist.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).