From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tak Kunihiro Newsgroups: gmane.emacs.bugs Subject: bug#57995: with pixel-scroll-precision-mode Date: Mon, 07 Nov 2022 18:34:41 +0900 Message-ID: References: <87bkr7eqk0.fsf@yahoo.com> <87edvya7pt.fsf@yahoo.com> <20220927.131552.1724748853665316882.tkk@misasa.okayama-u.ac.jp> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30905"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin) Cc: tkk@misasa.okayama-u.ac.jp, 57995@debbugs.gnu.org To: luangruo@yahoo.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 07 10:35:33 2022 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 1oryXV-0007pp-Ke for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 07 Nov 2022 10:35:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oryXC-0001fF-38; Mon, 07 Nov 2022 04:35:15 -0500 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 1oryX0-0001eb-Td for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2022 04:35:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oryX0-0004dH-GU for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2022 04:35:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oryX0-0000Af-CY for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2022 04:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tak Kunihiro Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Nov 2022 09:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57995 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 57995-submit@debbugs.gnu.org id=B57995.1667813693639 (code B ref 57995); Mon, 07 Nov 2022 09:35:02 +0000 Original-Received: (at 57995) by debbugs.gnu.org; 7 Nov 2022 09:34:53 +0000 Original-Received: from localhost ([127.0.0.1]:33348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oryWq-0000AE-M7 for submit@debbugs.gnu.org; Mon, 07 Nov 2022 04:34:53 -0500 Original-Received: from mail-pf1-f180.google.com ([209.85.210.180]:42970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oryWo-00009y-MC for 57995@debbugs.gnu.org; Mon, 07 Nov 2022 04:34:51 -0500 Original-Received: by mail-pf1-f180.google.com with SMTP id b185so10057971pfb.9 for <57995@debbugs.gnu.org>; Mon, 07 Nov 2022 01:34:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=DzG8MH8jimXRGbfeGu5PsX6cRhLx7gJy/ZQ+2oTj0ng=; b=dF/fCTVoReLz3+wfImDb2G6ZZkywSKH/OSsVfYUtZKSWpp4dGfKjf7q4QosE1uHfE0 ziQoGnZOs2hPzINDKq+6QNsRqc8gbBDMfM3UFmmKg4NIgB/adJbaMJrCl5KjNaTCXVjl fnAOEaARRWcWBfqGr4AVlYMwfy/AX7M8ldrf+ZS9SI0U6YeNfLawRNDe6JUpCcqYQySG iYe30jE49H0YsiWqVatDcXDsiuQygxYOCA+rXbC6W3YfwEn4ANknzJ9QQpcXgdRaKb9A cBNpBEbspfUcLfRf1k8DHuT+K20eCfC7gzr9Wmouk2qP2KewAJV+Hqq3M1fcyU4hCrS3 gm3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=DzG8MH8jimXRGbfeGu5PsX6cRhLx7gJy/ZQ+2oTj0ng=; b=XdjpAweNCgV2hVwJCviTbMFyMgmm9nc30dQPAtZem/HPeNhOW1upmxCzhYj2gb70E9 PtgcXvjdUfU6TSmyiJ5JqP1kz1W39c1IAIL7alIBIJnRRKSvImg36h0IRjZFSZlTuJVC mRC6GCWMFh7IKxnvMeVoRMseQbjDxfHIlIfH6efdpXxQfzCbB0bgo8BB8K7TxQsaovnG q9IRwUfWnOM8QYsJUVmm+qNppdwkn9Ck8xzQhSx0mU5KKKLI2oxN0BeKKMR0pInKiGNV xilylwuXovKmjr465PNZq6JIIOXnQlKoNwA7RKiS6LuQmDEMmfcUmKQPBPGC2NF99pIB sNBQ== X-Gm-Message-State: ACrzQf0qkmKEAYjqbv0w287ugwbrUy1w+3ko5QVLi+bxHuWXHy2hBwZ1 uSMWxEUIF3fIkgfnNfh5XOY= X-Google-Smtp-Source: AMsMyM6Hlg9vgvK7+WAPj6ZQP9fDIY85kQp2xYNsnd5KQCrArLkHTWZOUF1euK6h3m0RldfqkDQ8GQ== X-Received: by 2002:aa7:8c44:0:b0:56c:f21f:5e0e with SMTP id e4-20020aa78c44000000b0056cf21f5e0emr49227794pfd.35.1667813684884; Mon, 07 Nov 2022 01:34:44 -0800 (PST) Original-Received: from DreamMini2019.local ([150.46.201.82]) by smtp.gmail.com with ESMTPSA id d16-20020a170902ced000b0017f49b41c12sm4538995plg.173.2022.11.07.01.34.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 01:34:44 -0800 (PST) X-Google-Original-From: Tak Kunihiro In-Reply-To: <20220927.131552.1724748853665316882.tkk@misasa.okayama-u.ac.jp> (Tak Kunihiro's message of "Tue, 27 Sep 2022 13:15:52 +0900 (JST)") 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:247267 Archived-At: I set a break point to line 7363 and run Emacs. Event stops at line 7373. I'm not familiar with neither lldb and gdb. Please tell me the next step specifically. TIA $ ./configure CFLAGS="-g -O0" $ make $ make install $ lldb nextstep/Emacs.app/Contents/MacOS/Emacs (lldb) br set --file src/nsterm.m --line 7363 (lldb) run -Q M-: (setq mouse-wheel-tilt-scroll t) M-: (pixel-scroll-precision-mode 1) (lldb) * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 frame #0: 0x000000010031f749 Emacs`-[EmacsView mouseDown:](self=0x0000000103023790, _cmd="mouseDown:", theEvent=0x0000600003706b80) at nsterm.m:7373:5 7350 #if defined (NS_IMPL_GNUSTEP) || MAC_OS_X_VERSION_MIN_REQUIRED < 1070 7351 { 7352 CGFloat delta = [theEvent deltaY]; 7353 /* Mac notebooks send wheel events with delta equal to 0 7354 when trackpad scrolling. */ 7355 if (delta == 0) 7356 { 7357 delta = [theEvent deltaX]; 7358 if (delta == 0) 7359 { 7360 NSTRACE_MSG ("deltaIsZero"); 7361 return; 7362 } 7363 emacs_event->kind = HORIZ_WHEEL_EVENT; 7364 } 7365 else 7366 emacs_event->kind = WHEEL_EVENT; 7367 7368 emacs_event->code = 0; 7369 emacs_event->modifiers = EV_MODIFIERS (theEvent) | 7370 ((delta > 0) ? up_modifier : down_modifier); 7371 } 7372 #endif -> 7373 } 7374 else 7375 { 7376 Lisp_Object tab_bar_arg = Qnil; Target 0: (Emacs) stopped. > I do not know how to call debugger. > It will take a while to respond! > >>>>> With pixel-scroll-precision-mode, and does >>>>> not work. Is this expected behavior? >>>>> >>>>> 1. emacs -Q >>>>> 2. (setq mouse-wheel-tilt-scroll t) >>>>> 3. or scrolls buffer. >>>>> 4. (pixel-scroll-precision-mode 1) >>>>> 5. Then or does not scroll buffer. >>>> >>>> Thanks for reporting this bug. Could you please include the output from >>>> `report-emacs-bug', as this is likely a system-specific issue? >>> >>> No buffer scroll with and by mouse with Mac. >>> I confirm that I can scroll buffer with swipe-right and swipe-left by >>> touchpad with MacBook. >> >> Right, thanks. Could you please run Emacs underneath a debugger (GDB or >> LLDB), and see whether or not this code around line 7342 of nsterm.m is >> ever hit: >> >> CGFloat delta = [theEvent deltaY]; >> /* Mac notebooks send wheel events with delta equal to 0 >> when trackpad scrolling. */ >> if (delta == 0) >> { >> delta = [theEvent deltaX]; >> if (delta == 0) >> { >> NSTRACE_MSG ("deltaIsZero"); >> return; >> } >> emacs_event->kind = HORIZ_WHEEL_EVENT; <================ >> } >> else >> emacs_event->kind = WHEEL_EVENT; >> >> emacs_event->code = 0; >> emacs_event->modifiers = EV_MODIFIERS (theEvent) | >> ((delta > 0) ? up_modifier : down_modifier); >> >> when you try to scroll left or right with your mouse while >> pixel-scroll-precision-mode is enabled?