unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 51251@debbugs.gnu.org
Subject: bug#51251: 29.0.50; Moving cursor on top of raised box leaves artifacts around in NS port
Date: Sun, 17 Oct 2021 21:14:39 +0800	[thread overview]
Message-ID: <87czo3bxog.fsf@yahoo.com> (raw)
In-Reply-To: 87czo3bxog.fsf.ref@yahoo.com

[-- Attachment #1: Type: text/plain, Size: 597 bytes --]


Move the cursor over a raised box, like the buttons in a customize
buffer.  Parts of the cursor will remain in the box even after the
cursor is moved out of the button.

I was told that this also occurs on macOS.

I've attached a patch that fixes the problem for me, but it hasn't been
tested on macOS.

(BTW, I'm noticing a general lack of interest in the NS port, where
features from the other ports can take months or even years to land,
especially WRT to GNUStep support.  If there's a list of TODOs with the
NS port, please let me know.  I'd be happy to help bring it up-to-spec.)

Thanks.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-erasing-cursor-on-top-of-raised-boxes-in-NS-port.patch --]
[-- Type: text/x-patch, Size: 1119 bytes --]

From 960f0eb9ab657af85c532574b937d8851049b178 Mon Sep 17 00:00:00 2001
From: Po Lu <luangruo@yahoo.com>
Date: Sun, 17 Oct 2021 21:12:03 +0800
Subject: [PATCH] Fix erasing cursor on top of raised boxes in NS port

* src/nsterm.m (ns_draw_relief): Clear top and bottom line areas
first, if required.
---
 src/nsterm.m | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/nsterm.m b/src/nsterm.m
index c6f80f8035..007a69ac70 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -3516,6 +3516,12 @@ larger if there are taller display elements (e.g., characters
 
   [(raised_p ? lightCol : darkCol) set];
 
+  if (top_p)
+    {
+      NSRectFill (NSMakeRect (NSMinX (outer), NSMinY (outer),
+			      NSWidth (outer), hthickness));
+    }
+
   if (top_p || left_p)
     {
       NSBezierPath *p = [NSBezierPath bezierPath];
@@ -3555,6 +3561,12 @@ larger if there are taller display elements (e.g., characters
       [p closePath];
       [p fill];
     }
+
+  if (bottom_p)
+    {
+      NSRectFill (NSMakeRect (NSMinX (outer), NSMaxY (inner),
+			      NSWidth (outer), hthickness));
+    }
 }
 
 
-- 
2.31.1


[-- Attachment #3: Type: text/plain, Size: 3187 bytes --]


In GNU Emacs 29.0.50 (build 283, x86_64-pc-linux-gnu, NS gnustep-gui-0.29.0)
 of 2021-10-17 built on trinity
Repository revision: e5daab7a59da403c668ac727aaa9177c46b81360
Repository branch: master
Windowing system distributor 'GNU', version 10.3.29
System Description: Fedora 34 (Workstation Edition)

Configured using:
 'configure --with-ns'

Configured features:
ACL DBUS GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBSELINUX LIBSYSTEMD
LIBXML2 MODULES NOTIFY INOTIFY NS PDUMPER PNG RSVG SECCOMP SOUND THREADS
TIFF TOOLKIT_SCROLL_BARS XIM ZLIB

Important settings:
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr help-fns radix-tree cl-print debug backtrace
help-mode find-func emacsbug message rmc puny rfc822 mml mml-sec epa
derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs time-date
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils cus-theme eieio-custom xwidget url-handlers image-mode dired
dired-loaddefs exif browse-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map url-vars mailcap bookmark text-property-search
wid-browse tree-widget seq gv subr-x byte-opt bytecomp byte-compile
cconv cus-edit pp cus-start cus-load wid-edit cl-loaddefs cl-lib ispell
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize
mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify gnustep ns
lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 96866 10077)
 (symbols 48 10162 1)
 (strings 32 31452 3082)
 (string-bytes 1 950843)
 (vectors 16 19045)
 (vector-slots 8 253053 19351)
 (floats 8 49 45)
 (intervals 56 453 0)
 (buffers 992 15))

       reply	other threads:[~2021-10-17 13:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87czo3bxog.fsf.ref@yahoo.com>
2021-10-17 13:14 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-10-17 18:37   ` bug#51251: 29.0.50; Moving cursor on top of raised box leaves artifacts around in NS port Alan Third
2021-10-18  0:10     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-19 20:27       ` 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=87czo3bxog.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=51251@debbugs.gnu.org \
    --cc=luangruo@yahoo.com \
    /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).