From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Cursor in non-selected windows is 1 pixel too small Date: Sun, 05 Mar 2006 18:14:03 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <44081767.4010004@iue.tuwien.ac.at> <44096641.8080505@iue.tuwien.ac.at> <44096CE7.9050202@iue.tuwien.ac.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1141550082 16545 80.91.229.2 (5 Mar 2006 09:14:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 5 Mar 2006 09:14:42 +0000 (UTC) Cc: Eli Zaretskii , Markus Gritsch , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 05 10:14:36 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 1FFpJy-0007jg-9N for ged-emacs-devel@m.gmane.org; Sun, 05 Mar 2006 10:14:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FFpK4-0003Em-Ct for ged-emacs-devel@m.gmane.org; Sun, 05 Mar 2006 04:14:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FFpJm-00036u-DF for emacs-devel@gnu.org; Sun, 05 Mar 2006 04:14:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FFpJi-00035I-Rj for emacs-devel@gnu.org; Sun, 05 Mar 2006 04:14:21 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FFpJi-00035E-HJ for emacs-devel@gnu.org; Sun, 05 Mar 2006 04:14:18 -0500 Original-Received: from [133.82.132.2] (helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FFpLf-0007sK-P0; Sun, 05 Mar 2006 04:16:20 -0500 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id BFA1B2CB7; Sun, 5 Mar 2006 18:14:03 +0900 (JST) Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/22.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) 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:51225 Archived-At: >>>>> On Sat, 04 Mar 2006 23:19:40 +0100, storm@cua.dk (Kim F. Storm) said: >> Is it possible that this problem is not specific to MS-Windows? > I believe it works for X, fails for w32, and ... MAC? 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); 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)); > 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). 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. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp