From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Cursor in non-selected windows is 1 pixel too small Date: Sat, 11 Mar 2006 14:09:22 +0200 Message-ID: References: <44081767.4010004@iue.tuwien.ac.at> <44096641.8080505@iue.tuwien.ac.at> <44096CE7.9050202@iue.tuwien.ac.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1142079043 13136 80.91.229.2 (11 Mar 2006 12:10:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 11 Mar 2006 12:10:43 +0000 (UTC) Cc: gritsch@iue.tuwien.ac.at, emacs-devel@gnu.org, storm@cua.dk Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 11 13:10:40 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FI2vU-0008T3-Nw for ged-emacs-devel@m.gmane.org; Sat, 11 Mar 2006 13:10:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FI2vS-0000j2-Lg for ged-emacs-devel@m.gmane.org; Sat, 11 Mar 2006 07:10:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FI2v8-0000hC-CU for emacs-devel@gnu.org; Sat, 11 Mar 2006 07:10:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FI2v6-0000gp-OI for emacs-devel@gnu.org; Sat, 11 Mar 2006 07:10:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FI2v6-0000gl-GX for emacs-devel@gnu.org; Sat, 11 Mar 2006 07:10:04 -0500 Original-Received: from [192.114.186.66] (helo=romy.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FI2yc-0004aH-4C for emacs-devel@gnu.org; Sat, 11 Mar 2006 07:13:42 -0500 Original-Received: from HOME-C4E4A596F7 (IGLD-83-130-214-30.inter.net.il [83.130.214.30]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id DSN34504 (AUTH halo1); Sat, 11 Mar 2006 14:09:21 +0200 (IST) Original-To: YAMAMOTO Mitsuharu In-reply-to: (message from YAMAMOTO Mitsuharu on Sun, 05 Mar 2006 18:14:03 +0900) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:51461 Archived-At: > Date: Sun, 05 Mar 2006 18:14:03 +0900 > From: YAMAMOTO Mitsuharu > Cc: Eli Zaretskii , > Markus Gritsch , emacs-devel@gnu.org > > Also works for Mac, because some adjustment is made in the drawing > routine mac_draw_rectangle (in macterm.c) so it simulates > XDrawRectangle. > > SetRect (&r, x, y, x + width + 1, y + height + 1); > FrameRect (&r); Yes, and then all the callers of mac_draw_rectangle except x_draw_hollow_cursor need to subtract 1 from width and height. Funny. I modified mac_draw_rectangle to not add 1 to these two dimensions, and then removed the decrements from its callers. > By the way, Quartz 2D (as opposed to QuickDraw above) needs another > kind of adjustment to get the same result: > > CGContextStrokeRect (context, > CGRectMake (x + 0.5f, y + 0.5f, width, height)); I cannot find this code in Emacs. > The W32 port seems to have an adjustment for the cursor width in > get_phys_cursor_geometry: > > wd = glyph->pixel_width - 1; > #ifdef HAVE_NTGUI > wd++; /* Why? */ > #endif > > So, wherever we add adjustment, it should be done in a consistent way > between width and height, I think. I didn't do anything about this bit.