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#73838: 31.0.50; Problems in note_mouse_highlight if -nw Date: Wed, 16 Oct 2024 18:38:05 +0300 Message-ID: <86r08goy76.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23036"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73838@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 16 17:39:12 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 1t167C-0005nd-Ni for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Oct 2024 17:39:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t166m-0000an-V5; Wed, 16 Oct 2024 11:38:44 -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 1t166l-0000aD-H0 for bug-gnu-emacs@gnu.org; Wed, 16 Oct 2024 11:38:43 -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 1t166l-0001fF-99 for bug-gnu-emacs@gnu.org; Wed, 16 Oct 2024 11:38:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=WAwe8qKGdQn93+vgohS5Ddj8siBF1yDXtcQ20BtPIL0=; b=cArm74woEAdxIThFBXmNuXAguIINVGeo/qIxNzTFp2/AEW/kYjTgiShaSIPlAGT3yIWaPYuBd3gqe8HFEntgb5vv18eBAMF6GdLoJTSc/GfQnarqOcF9eA4g12rCApjy4EwjDDhULMTGsTAsIj+3Wmmwn0RXpSpdyfrIqqFlTjpdYDz4AlwL+pGk+PNvOLaKBCyOBWxKQ71X3lMOOYN1yhIuxMOqXK8Y+pr8KYqd9goNHtfngTxBSlPgR3IKNWtYQ/EzCkDhu3rTJ/6u7kKsgBgXMJ15ynubFxahYLqsDWvaGJOGU3PxqDmrmX7n6RgrHbGy8hO98T2uX6KCypwuIQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t1674-0007OM-UE for bug-gnu-emacs@gnu.org; Wed, 16 Oct 2024 11:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Oct 2024 15:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73838 X-GNU-PR-Package: emacs Original-Received: via spool by 73838-submit@debbugs.gnu.org id=B73838.172909311728374 (code B ref 73838); Wed, 16 Oct 2024 15:39:02 +0000 Original-Received: (at 73838) by debbugs.gnu.org; 16 Oct 2024 15:38:37 +0000 Original-Received: from localhost ([127.0.0.1]:60136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t166e-0007Na-VT for submit@debbugs.gnu.org; Wed, 16 Oct 2024 11:38:37 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38094) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t166d-0007NK-1l for 73838@debbugs.gnu.org; Wed, 16 Oct 2024 11:38:35 -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 1t166E-0001dH-0V; Wed, 16 Oct 2024 11:38:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=WAwe8qKGdQn93+vgohS5Ddj8siBF1yDXtcQ20BtPIL0=; b=akAnhp9IOmxkHsos48hp LwGgZNyTZUZeA3T3c5cKGlF+65ZwBG0FEUVEpR8hkX0DRv1ZMc7WRfFPBpmIPP19pVPDCHW4gxbgK 49bsoxoq8PXPKxx09/ygQmjakZwwzlgs5FMbQ/md3imzkD5BB3NIACQiToTts0282EN8A5Cgufu6k cqtCClJ0Gr8JC+D91P6pZ+30U5GTwbUAzPq+ROlFm57cx9kjiCRoNQ3YRoJVlODr5Dt0DdW1o8vhr nRLj47bhW1ir84M5/UdA1IoTuV+onOK2wYP6vNKk4obMA02Cg0vCWOpjDc0zGTXM4UEEMCo3XCQ0C 2S0y/HZpbiephw==; In-Reply-To: (message from Gerd =?UTF-8?Q?M=C3=B6llmann?= on Wed, 16 Oct 2024 16:19:53 +0200) 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:293679 Archived-At: > From: Gerd Möllmann > Date: Wed, 16 Oct 2024 16:19:53 +0200 > > I'd like to propose a change like in the attached patch (from my tty > child frames branch). It fixes the case I mentioned above. I'd like to understand why these changes are needed. Could you please elaborate on each and every change? > if (EQ (window, f->menu_bar_window)) > { > - cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor; > + if (FRAME_WINDOW_P (f)) > + cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor; Can a TTY frame have a menu-bar window? AFAIK, a menu bar is just a frame glyph row on TTY frames, it is not a window. > if (EQ (window, f->tab_bar_window)) > { > note_tab_bar_highlight (f, x, y); > - if (tab_bar__dragging_in_progress) > - cursor = FRAME_OUTPUT_DATA (f)->hand_cursor; > - else > - cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor; > + if (FRAME_WINDOW_P (f)) > + { > + if (tab_bar__dragging_in_progress) > + cursor = FRAME_OUTPUT_DATA (f)->hand_cursor; > + else > + cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor; > + } Same question here about tab-bar window. > if (EQ (window, f->tool_bar_window)) > { > note_tool_bar_highlight (f, x, y); > - cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor; > + if (FRAME_WINDOW_P (f)) > + cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor; > goto set_cursor; Same question here about tool-bar window. > #ifdef HAVE_WINDOW_SYSTEM > if (part == ON_LEFT_MARGIN || part == ON_RIGHT_MARGIN) > { > - cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor; > + if (FRAME_WINDOW_P (f)) > + cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor; This part I could understand. > #ifdef HAVE_WINDOW_SYSTEM > if (part == ON_VERTICAL_BORDER) > { > - cursor = FRAME_OUTPUT_DATA (f)->horizontal_drag_cursor; > + if (FRAME_WINDOW_P (f)) > + cursor = FRAME_OUTPUT_DATA (f)->horizontal_drag_cursor; Do we have vertical borders on TTY frames? If yes, this is also understood. > else if (part == ON_RIGHT_DIVIDER) > { > - cursor = FRAME_OUTPUT_DATA (f)->horizontal_drag_cursor; > + if (FRAME_WINDOW_P (f)) > + cursor = FRAME_OUTPUT_DATA (f)->horizontal_drag_cursor; > help_echo_string = build_string ("drag-mouse-1: resize"); > goto set_cursor; Do we have right dividers on TTY frames? > @@ -36244,7 +36253,8 @@ note_mouse_highlight (struct frame *f, int x, int y) > || minibuf_level > || NILP (Vresize_mini_windows)) > { > - cursor = FRAME_OUTPUT_DATA (f)->vertical_drag_cursor; > + if (FRAME_WINDOW_P (f)) > + cursor = FRAME_OUTPUT_DATA (f)->vertical_drag_cursor; > help_echo_string = build_string ("drag-mouse-1: resize"); Same question about bottom dividers as above about right dividers. > else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE) > { > - cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor; > + if (FRAME_WINDOW_P (f)) > + cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor; How can fringes happen on a TTY frame? > else if (part == ON_VERTICAL_SCROLL_BAR > || part == ON_HORIZONTAL_SCROLL_BAR) > - cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor; > - else > + { > + if (FRAME_WINDOW_P (f)) > + cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor; > + } > + else if (FRAME_WINDOW_P (f)) > cursor = FRAME_OUTPUT_DATA (f)->text_cursor; > #endif How can scroll bars happen on TTY frames?