From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#71866: 30.0.50; [macOS] Cursor hiding char behind it with certain theme customization Date: Mon, 22 Jul 2024 20:02:25 +0100 Message-ID: References: <72a0b2e2-600e-46f1-b583-0bed86f27d2d@gutov.dev> <86o76scaou.fsf@gnu.org> <86cyn7cito.fsf@gnu.org> <1659357b-5ca0-47a6-8ff3-4aa26017280b@gutov.dev> <86ttgibxqv.fsf@gnu.org> <7ae61592-8319-4b1a-b973-4015ff1db569@gutov.dev> <86wmlda3jb.fsf@gnu.org> <86msm99zmd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26493"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dmitry@gutov.dev, 71866@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 22 21:04:23 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sVyKd-0006iz-3g for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 Jul 2024 21:04:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVyKG-00005c-Jj; Mon, 22 Jul 2024 15:04:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sVyKE-0008WA-Uw for bug-gnu-emacs@gnu.org; Mon, 22 Jul 2024 15:03:58 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVyKE-0007jE-N4 for bug-gnu-emacs@gnu.org; Mon, 22 Jul 2024 15:03:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sVyKI-00039e-2l for bug-gnu-emacs@gnu.org; Mon, 22 Jul 2024 15:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Jul 2024 19:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71866 X-GNU-PR-Package: emacs Original-Received: via spool by 71866-submit@debbugs.gnu.org id=B71866.172167499012022 (code B ref 71866); Mon, 22 Jul 2024 19:04:02 +0000 Original-Received: (at 71866) by debbugs.gnu.org; 22 Jul 2024 19:03:10 +0000 Original-Received: from localhost ([127.0.0.1]:58608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sVyJS-00037m-2J for submit@debbugs.gnu.org; Mon, 22 Jul 2024 15:03:10 -0400 Original-Received: from dane.soverin.net ([185.233.34.24]:37821) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sVyJP-00037P-Pd for 71866@debbugs.gnu.org; Mon, 22 Jul 2024 15:03:08 -0400 Original-Received: from smtp.soverin.net (c04smtp-lb01.int.sover.in [10.10.4.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dane.soverin.net (Postfix) with ESMTPS id 4WSV5c3QNGzyw7; Mon, 22 Jul 2024 19:02:28 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [10.10.4.100]) by soverin.net (Postfix) with ESMTPSA id 4WSV5c0pNkzCw; Mon, 22 Jul 2024 19:02:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1721674948; bh=ZE6x8I0pmigRku+6lmiFz9m+DOd2MB0Q4VE3/3IS0BI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VcsJ4r8BlFSNH9IuQm9l5zbRcTKORkEykLFUVTGQ95/+TkjQmd3i03krDDjqjvZx8 UGawxr0zAZYKLqFHrEW4MyJVyegJnHx8buWimLoOczapY6kgDR10PnobKdFWCA4HJ+ VNNGbxuRJAbPsx2d7TiuwpXbJY+/9O48BOUhkUFCJbkQ+DN24laSeC/BGRo48s61bO uHYZA3UCv2ek0+AbiOeTzBatiYpoKIY2E+zg0DUOqjQLNJI6QBUE7JSCwRypP2g5Od Mdhg8lP1NNf46SMVIpc4VMQUV4bVNceLRcv5ES1NXZnxg66FcaVnysvIlRTQXNVA3M rDG2PhBMWCV3A== Mail-Followup-To: Alan Third , Eli Zaretskii , dmitry@gutov.dev, 71866@debbugs.gnu.org Content-Disposition: inline In-Reply-To: <86msm99zmd.fsf@gnu.org> X-Spampanel-Class: ham X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289129 Archived-At: On Mon, Jul 22, 2024 at 07:10:18PM +0300, Eli Zaretskii wrote: > So how would you suggest to arrange the breakpoints to be able to > match calls to ns_draw_window_cursor with what appears on the screen? > > Or maybe we can call some function after ns_draw_window_cursor returns > to make sure the results of ns_draw_window_cursor are immediately > shown on the glass? I'm not sure if it's possible. The whole thing runs asynchronously. The best bet would be to put this: [[FRAME_NS_VIEW (f) layer] display]; at the end of ns_draw_window_cursor and look at it after that, but the display function passes a bitmap off to a system that supposedly tells the graphics card to pull in the bitmap using DMA and display it, all in a separate thread. So whether it will work or not I don't know. It may be possible to access the bitmap and dump it to a file... CGContextRef context = [(EmacsLayer *)[FRAME_NS_VIEW (f) layer] getContext]; CGContextFlush (context); void *pixels = CGBitmapContextGetData (context); NSLog(@"pixels: %p, bytes: %lu, %lux%lu", pixels, CGBitmapContextGetHeight (context) * CGBitmapContextGetBytesPerRow (context), CGBitmapContextGetHeight (context), CGBitmapContextGetWidth (context)); Just before the final ns_unfocus in ns_draw_window_cursor should provide data about the image, and in lldb something like mem read -o ~/image.raw --count 10000 pixels --force should dump the raw pixels to disk and in theory imagemagick or something could read them, but I'm failing to make this work. I think count is not bytes, and either way I can't convince imagemagick to read the output. Sorry, I'm not a lot of help. -- Alan Third