emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cursor in non-selected windows is 1 pixel too small


From: Kim F. Storm
Subject: Re: Cursor in non-selected windows is 1 pixel too small
Date: Sat, 04 Mar 2006 23:19:40 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> Date: Sat, 04 Mar 2006 11:33:11 +0100
>> From: Markus Gritsch <address@hidden>
>> CC:  address@hidden
>> 
>> I am also using WinXP. The attached screenshot shows an Emacs started 
>> with -q. The cursor seen there in the lower window is clearly one pixel 
>> smaller in vertical direction.
>
> Well, I wouldn't say it's ``clearly one pixel smaller''.  Perhaps I'm
> too blind.
>
> Anyway, I eventually convinced myself you were right.  Does the
> following patch give good results?
>
>> You are of course running a recent CVS Emacs, arn't you?
>
> Yes.
>
> Btw, I'm not sure I understand why xdisp.c:get_phys_cursor_geometry
> decrements by one the value of height it computes:
>
>   *heightp = h - 1;
>
> Kim, can you comment on that?

The code in xdisp.c:get_phys_cursor_geometry is simply based on the
code in xterm.c, w32term.c and macterm.c when I merged the X, W32, and
MAC codes for cursor display.  I didn't validate that the functionality
was sensible -- only that the code on all three cases was identical.

>  Is it possible that this problem is not
> specific to MS-Windows?

I believe it works for X, fails for w32, and ... MAC?

However, it does seem to make sense to fix the height returned by
get_phys_cursor_geometry (don't subtract 1), and then fix the use
in xterm.c and macterm.c(?) to subtract 1 from the returned height.
(and leave w32termc. as is).

Will you make those changes?

>
>
> Index: src/w32term.c
> ===================================================================
> RCS file: /cvsroot/emacs/emacs/src/w32term.c,v
> retrieving revision 1.238
> diff -u -p -r1.238 w32term.c
> --- src/w32term.c     6 Feb 2006 15:23:22 -0000       1.238
> +++ src/w32term.c     4 Mar 2006 14:11:40 -0000
> @@ -4946,7 +4946,7 @@ x_draw_hollow_cursor (w, row)
>    /* Compute frame-relative coordinates for phys cursor.  */
>    rect.left = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x);
>    rect.top = get_phys_cursor_geometry (w, row, cursor_glyph, &h);
> -  rect.bottom = rect.top + h;
> +  rect.bottom = rect.top + h + 1;
>    rect.right = rect.left + w->phys_cursor_width;
>  
>    hdc = get_frame_dc (f);
>
>
> _______________________________________________
> Emacs-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-devel
>
>

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]