From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii 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 19:10:18 +0300 Message-ID: <86msm99zmd.fsf@gnu.org> References: <56cc929b-5491-4ed4-a527-d0b1a369e625@gutov.dev> <86o76sea9d.fsf@gnu.org> <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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26869"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dmitry@gutov.dev, 71866@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 22 18:11:26 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 1sVvdD-0006hm-Vk for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 Jul 2024 18:11:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVvcx-0003zB-4f; Mon, 22 Jul 2024 12:11:07 -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 1sVvcp-0003N6-Ke for bug-gnu-emacs@gnu.org; Mon, 22 Jul 2024 12:10:59 -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 1sVvcp-0008O7-6m for bug-gnu-emacs@gnu.org; Mon, 22 Jul 2024 12:10:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sVvcr-0006j4-Tu for bug-gnu-emacs@gnu.org; Mon, 22 Jul 2024 12:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Jul 2024 16:11:01 +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.172166463625817 (code B ref 71866); Mon, 22 Jul 2024 16:11:01 +0000 Original-Received: (at 71866) by debbugs.gnu.org; 22 Jul 2024 16:10:36 +0000 Original-Received: from localhost ([127.0.0.1]:58492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sVvcR-0006iL-IT for submit@debbugs.gnu.org; Mon, 22 Jul 2024 12:10:35 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sVvcO-0006i4-I5 for 71866@debbugs.gnu.org; Mon, 22 Jul 2024 12:10:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sVvcD-0008Fc-8y; Mon, 22 Jul 2024 12:10:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=URCtRPhX77lPOT19u0J6MLp+ZzpFBlN6DoxH7HUPbaI=; b=OuoNgLR3DB8Y DqK3gDVuLA90jd4iLZqgwSqFRatpJ90aZnr7OsTJKy/A4vlBGsRBb2Q9IqZ+43gNRHr+EBpWIX55O 0tz+iKt9WKtChKLtsyNi8A+N4hdomNTpE87ZXJEf7wtDfyUPH9nEqFRuTV/FBZgqQWxbZ7OCaPEYM 1VlqT/VNipXP7k9yqr9irYPp4ZG9O6ys+m8yESPSNOdAYV64tPobZllegGzzqtLdDijWKf4xOtrvN DAg9fQlH0Tf045jfXUWRAtyqpaLlk7XirJJWkx+CJlTiVQKgKQYTfdm5ADznXLxc9iC5ubrmLHso8 tY6GXD7VLr1uscCfzBoVWA==; In-Reply-To: (message from Alan Third on Mon, 22 Jul 2024 16:27:30 +0100) 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:289123 Archived-At: > Date: Mon, 22 Jul 2024 16:27:30 +0100 > From: Alan Third > Cc: Dmitry Gutov , 71866@debbugs.gnu.org > > On Mon, Jul 22, 2024 at 05:45:44PM +0300, Eli Zaretskii wrote: > > > > Thanks. There's a disturbing discrepancy between what the debugger > > says about the calls to ns_draw_window_cursor and what I see on > > display. For example, there are only 2 events where one of the two > > Emacs frames begins showing a filled-block cursor (from some other > > cursor display): at step "1" and step "3". But the backtraces you > > collected tell a different story: the only calls with > > FILLED_BOX_CURSOR are at steps "1" and "7". At step "3", the debugger > > claims we called ns_draw_window_cursor with NO_CURSOR, whereas the > > video clearly shows that the cursor is drawn as a filled block! This > > issue alone already makes all this quite mysterious and hard to > > interpret. > > > > Moreover, the only event in the video where a previously-displayed > > cursor disappears in one of the windows is the last part, where you > > type "c" and the debugger says "Process 7616 resuming". And that > > happens without ns_draw_window_cursor being called! > > > > So I think there's some factor at work here that we are not > > considering. Perhaps it's the macOS window-system or something. > > Hi Eli, > > The macOS display system is inherently double buffered, so there's no > way to draw directly to the screen. This means any action taken won't > be displayed on the screen until the NS run loop has run at least > once. That occurs in the ns_select and ns_read_socket functions. 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?