|
2026-11-11
| ||
| 12:02 | • Closed ticket [ac7f7719]: tk panedwindow: cursor changing code does not work well plus 7 other changes artifact: b654579c user: nemethi | |
| 11:52 | Fix for [ac7f771957]: tk panedwindow: cursor changing code does not work well check-in: 740eeb89 user: csaba tags: core-8-6-branch | |
| 11:42 | Fix for [ac7f771957]: tk panedwindow: cursor changing code does not work well check-in: d6b577ac user: csaba tags: core-9-0-branch | |
| 11:35 | Fix for [ac7f771957]: tk panedwindow: cursor changing code does not work well check-in: f5e8761e user: csaba tags: trunk, main | |
|
2026-10-29
| ||
| 09:24 | • Ticket [ac7f7719] tk panedwindow: cursor changing code does not work well status still Open with 3 other changes artifact: b677182e user: serhiy.storchaka | |
| 09:22 | See [ac7f771957]: panedwindow identify: report the sash only for its own pixels (backport of [23aa8b82e3]) check-in: e17aecfc user: serhiy.storchaka tags: core-8-6-branch | |
| 09:22 | See [ac7f771957]: panedwindow identify: report the sash only for its own pixels (backport of [23aa8b82e3]) check-in: 685a4a06 user: serhiy.storchaka tags: core-9-0-branch | |
| 02:25 | • Ticket [ac7f7719] tk panedwindow: cursor changing code does not work well status still Open with 4 other changes artifact: 4f65395b user: marc_culler | |
| 02:13 | • Ticket [ac7f7719]: 4 changes artifact: f77d1fd5 user: marc_culler | |
| 02:06 | • Ticket [ac7f7719]: 5 changes artifact: dde90b41 user: marc_culler | |
|
2026-10-28
| ||
| 19:22 | • Ticket [ac7f7719]: 2 changes artifact: aa2e57a6 user: serhiy.storchaka | |
| 19:22 | • Open ticket [ac7f7719]. artifact: 94f9b3db user: serhiy.storchaka | |
|
2026-10-26
| ||
| 18:42 | • Ticket [ac7f7719]: 3 changes artifact: a1f1bb0d user: serhiy.storchaka | |
| 18:30 | • Closed ticket [ac7f7719]. artifact: 06a1763d user: oehhar | |
|
2026-10-09
| ||
| 17:19 | • Ticket [ac7f7719]: 3 changes artifact: b381a686 user: serhiy.storchaka | |
| 17:15 | See [ac7f771957]: panedwindow sash cursor: set it also when the pointer enters on the sash, keep it while the sash is dragged, and forget the cursor state of a destroyed widget. Tests panedwindow-30.1 to 30.4. check-in: 07861e3a user: serhiy.storchaka tags: panedwindow-sash-cursor | |
| 16:36 | • Open ticket [ac7f7719]: tk panedwindow: cursor changing code does not work well plus 5 other changes artifact: 8937b912 user: jan.nijtmans | |
| 15:52 | • Pending ticket [ac7f7719]. artifact: 70aee176 user: jan.nijtmans | |
| 15:49 | See: [ac7f771957]: panedwindow identify: report the sash only for its own pixels check-in: 23aa8b82 user: jan.nijtmans tags: trunk, main | |
|
2026-10-04
| ||
| 12:06 | • Open ticket [ac7f7719]: tk panedwindow: cursor changing code does not work well plus 2 other changes artifact: ab335608 user: serhiy.storchaka | |
| 11:59 | • Ticket [ac7f7719]: 3 changes artifact: a8c4ef7e user: serhiy.storchaka | |
| 11:51 | panedwindow identify: report the sash only for its own pixels. The far bounds of the sash and the handle were inclusive, and a handle wider than the sash was counted twice, so identify reported the sash for the first pixel of the next pane, and with a handle wider than the sash for several more pixels, depending on -handlesize. Found while checking [ac7f771957]. Merge the identify tests which only differed in coordinates. closed check-in: 33a24bdf user: serhiy.storchaka tags: panedwindow-identify-bounds | |
|
2021-03-04
| ||
| 01:23 | • Ticket [ac7f7719] tk panedwindow: cursor changing code does not work well status still Pending with 3 other changes artifact: b61fd371 user: chrstphrchvz | |
|
2021-03-03
| ||
| 11:23 | • Ticket [08eb057d] Aqua: cleanup Carbon-era cursor variables status still Closed with 5 other changes artifact: 5b4663aa user: chrstphrchvz | |
|
2020-10-29
| ||
| 19:34 | • Pending ticket [ac7f7719]: tk panedwindow: cursor changing code does not work well plus 3 other changes artifact: eb4e00ab user: bll | |
|
2020-09-18
| ||
| 13:12 | • Ticket [ac7f7719]: 3 changes artifact: dcadf33f user: chrstphrchvz | |
|
2020-09-15
| ||
| 23:38 | • Ticket [ac7f7719]: 3 changes artifact: 069f6be8 user: bll | |
| 21:27 | • Ticket [ac7f7719]: 3 changes artifact: 20788e02 user: chrstphrchvz | |
| 15:12 | • Ticket [ac7f7719]: 3 changes artifact: b749d93b user: bll | |
| 14:58 | • Ticket [ac7f7719]: 3 changes artifact: ad750265 user: bll | |
| 08:12 | • Ticket [ac7f7719]: 3 changes artifact: 56cf39ff user: chrstphrchvz | |
| 08:10 | • Ticket [6b51f22b] macos: mac_styles testing status still Open with 3 other changes artifact: e5d3b5a8 user: chrstphrchvz | |
| 00:36 | • Ticket [ac7f7719] tk panedwindow: cursor changing code does not work well status still Open with 3 other changes artifact: 6e2ec99e user: bll | |
| 00:27 | • Ticket [ac7f7719]: 3 changes artifact: fdd7c327 user: bll | |
| 00:24 | • Ticket [ac7f7719]: 3 changes artifact: a0c3dc6e user: bll | |
| 00:21 | • New ticket [ac7f7719]. artifact: c8d53a08 user: bll | |
| Ticket UUID: | ac7f771957ea4d98639adf89dc8aa82846b8a155 | |||
| Title: | tk panedwindow: cursor changing code does not work well | |||
| Type: | Bug | Version: | 8.6.18, 9.0.5, 9.1.1 | |
| Submitter: | bll | Created on: | 2020-09-15 00:21:02 | |
| Subsystem: | 21. [panedwindow] | Assigned To: | chrstphrchvz | |
| Priority: | 5 Medium | Severity: | Minor | |
| Status: | Closed | Last Modified: | 2026-11-11 12:02:25 | |
| Resolution: | Fixed | Closed By: | nemethi | |
| Closed on: | 2026-11-11 12:02:25 | |||
| Description: |
As reported in: https://core.tcl-lang.org/tk/info/6b51f22bff0548df , the tk panedwindow does not handle cursor changes well. The ttk panedwindow cursor changes can be slightly improved. | |||
| User Comments: |
nemethi (claiming to be Csaba Nemethi) added on 2026-11-11 12:02:25:
Serhiy, many thanks for both panedwindow-related branches! Merged branch panedwindow-sash-cursor into main, core-9-0-branch, and core-8-6-branch by commits [f5e8761e], [d6b577ac], and [740eeb89]. Closing the ticket. serhiy.storchaka added on 2026-10-29 09:24:23: Marc, panedwindow-identify-bounds was already merged into main by [23aa8b82e3] on 2026-10-09, so the current main should behave as the branch. Only panedwindow-sash-cursor is not merged. Backported [23aa8b82e3] to 9.0 ([685a4a06de]) and 8.6 ([e17aecfc86]). marc_culler (claiming to be Marc Culler) added on 2026-10-29 02:25:31: I tried merging panedwindow-sash-cursor into panedwindow-identify-bounds. (That required `fossil merge --force` because the panedwindow-identify-bounds leaf had already been closed. I think we would be wise not to rusn too much with these fixes.) Anyway, that fixed the problem of the cursor reverting to the pointer during the drag. The only remaining issue that I saw was that sometimes the push-me-pull-you cursor reverts to the pointer when I click the mouse button. And that is pretty minor. This is on an M4 macOS 27 macbook air. marc_culler (claiming to be Marc Culler) added on 2026-10-29 02:13:28: A tried again after re-reading the ticket to see when the cursor reverts to the pointer. I think it is true that it happens when the cursor gets more than a certain (small) distance from the sash. And moving the mouse very slowly prevents this from happening. Is this the problem fixed by panedwindow-sash-cursor? I will try that one too. marc_culler (claiming to be Marc Culler) added on 2026-10-29 02:06:48: I tested the panedwindow-identify-bounds branch on macOS 27, and compared against main, using the "Horizontal paned window" demo. My conclusions were: * panedwindow-identify-bounds is a huge improvement; * there is room for more improvement. Specifically, with trunk it took me 5 tries to get the push-me-pull-you cursor to activate. With panedwindow-identify-bounds I got it on the first try. However, when dragging the sash the cursor reverts to the default arrow cursor at some random point during the drag, and that default cursor remains until the mouse button is released. (Well, actually, I was using a trackpad, so until I lift my finger off of the pad.) serhiy.storchaka added on 2026-10-26 18:42:33: The cursor problems on Windows described on 2026-10-09 are not fixed by [23aa8b82e3]: their fix is in branch panedwindow-sash-cursor, not merged yet. Should the ticket stay open until it is? oehhar added on 2026-10-26 18:30:51: Bugfix branch merged by Jan by commit [23aa8b82]. Closing bug. Thanks, Harald serhiy.storchaka added on 2026-10-09 17:19:42: On Windows, two problems remained after panedwindow-identify-bounds:
Proposed fix in branch panedwindow-sash-cursor: the cursor is also set on <Enter>, is kept while a sash is dragged and updated after the release, and the cursor state of a destroyed panedwindow is forgotten, so that a new one with the same name does not inherit it. Tests panedwindow-30.1 to 30.4. I tested it on Windows. The bindings are not platform-specific, so I expect that it fixes macOS too, but it may need tweaking there. Can someone check it on macOS? jan.nijtmans added on 2026-10-09 16:36:35: > Does this fix everything described in this ticket? My guess is, the answer is "no". I rebase the bug-ac7f7719 branch to trunk, so it's possible to continue development with it. Anyone? jan.nijtmans added on 2026-10-09 15:52:03: The branch "panedwindow-identify-bounds looks good to me. Now merged to trunk. Does this fix everything described in this ticket? serhiy.storchaka added on 2026-10-04 11:59:58: On X11 (8.6.10, 8.6.18, 9.0.5, 9.1) the sash cursor is reset as soon as the pointer enters a pane. But identify reported the sash for the first pixel of the next pane, and with a handle wider than the sash for several more pixels, depending on -handlesize. On such pixels the cursor and the result of a click disagree. Fixed in branch panedwindow-identify-bounds. Can the problem still be reproduced on macOS with it? To see the difference, run this and move the pointer from the left pane over the sash into the right pane. The line at the bottom turns red where identify reports the sash or handle while the pointer is over a pane (21 pixels of the right pane without the fix):
panedwindow .p -showhandle 1 -handlesize 20 -handlepad 40 \
-sashwidth 2 -sashpad 2 -bd 0
.p add [frame .p.left -bg lightblue -width 150 -height 120] \
[frame .p.right -bg lightgreen -width 150 -height 120]
label .info -width 50 -anchor w -font TkFixedFont
pack .p -fill both -expand 1
pack .info -fill x
proc show {X Y} {
set x [expr {$X - [winfo rootx .p]}]
set y [expr {$Y - [winfo rooty .p]}]
set id [.p identify $x $y]
set w [winfo containing $X $Y]
set bad [expr {$id ne "" && $w ne ".p"}]
.info configure -text [format "x=%3d y=%3d identify: %-9s under pointer: %s" \
$x $y [expr {$id eq "" ? "-" : $id}] $w] \
-bg [expr {$bad ? "red" : [. cget -bg]}]
}
bind all <Motion> {show %X %Y}
The branch bug-ac7f7719 is not mergeable as is: it keeps the panedwindow in a single global Priv(panedwindowname). chrstphrchvz added on 2021-03-04 01:23:21: After reading through [6b51f22bff] again, I now see that the idea in my previous comment (i.e. make the sash a contained widget with Leave/Enter bindings) was already brought up in Marc's comments @ 2020-09-14 16:38:50 and 2020-09-14 21:12:09. But the idea is arguably unfit for 8.6, because it means introducing a contained widget to panedwindow which it is not documented/implemented as already having. To be truly 8.6 compatible, the sash would have to be inaccessible to Tk programs (e.g. unable to configure or bind to it by ordinary means). I agree with Marc that the original panedwindow design is flawed. If the Ttk panedwindow is not so flawed, then I personally might prefer that no one bother to salvage the original panedwindow, and that it be avoided in 8.5/8.6 and removed in 8.7. chrstphrchvz added on 2020-09-18 13:12:46: Something that occurred to me: the lack of an event for a container widget to detect the pointer entering a contained widget might be considered a non-issue. The standard recipe might be to use additional contained widget(s) adjacent to the one of interest, and set Leave bindings for the adjacent widget(s). In the case of the window pane, that would mean making the sash another contained widget which has its Leave binding check if the pointer has entered one of the paned widgets. bll added on 2020-09-15 23:38:47: Ok, that's a different issue. tk panedwindow has a bind PanedWindow <Motion> ... so the motion is only applicable to and sent to the PanedWindow class. I agree, that a general EnterChild/LeaveChild event would would be useful. chrstphrchvz added on 2020-09-15 21:27:24: I have not yet tried or reviewed the bug-ac7f7719 work. To clarify what I meant: using a script like
place [frame .f -background red -width 50 -height 50] -x 75 -y 75
bind all <Enter> {puts {Enter %W %X %Y}}
bind all <Leave> {puts {Leave %W %X %Y}}
bind all <Motion> {puts {Motion %W %X %Y}}
(The system "Mouse Keys" feature for exact 1-pixel pointer movement is useful here, avoiding noisy motion events from high-precision hardware which get rounded for Tk.) On actual X11, I observe that if the pointer moves, there is always a motion event for the widget containing the pointer: Motion . 91 185 Motion . 92 185 Motion . 93 185 Enter .f 94 185 Motion .f 94 185 Motion .f 95 185 Motion .f 96 185 Motion .f 95 185 Motion .f 94 185 Leave .f 93 185 Motion . 93 185 Motion . 92 185 Motion . 91 185 On Aqua and Windows, there is instead no motion event if there was simultaneously any enter/leave events: Motion . 77 155 Motion . 78 155 Motion . 79 155 Enter .f 80 155 Motion .f 81 155 Motion .f 82 155 Motion .f 81 155 Motion .f 80 155 Leave .f 79 155 Motion . 78 155 Motion . 77 155 Motion . 76 185 The non-X11 pointer event abstraction (Tk_UpdatePointer()) could still use some work to address this inconsistency. But to correct myself, there would still be the half of the problem where a container widget needs to detect when the pointer enters a contained widget, even on actual X11. bll added on 2020-09-15 15:12:40: I didn't mention that the fix is in branch [bug-ac7f7719] bll added on 2020-09-15 14:58:03: The problem is not limited to aqua. I do not see motion events sent within contained widgets on X11. - The motion event is only sent to the container widget, not the child window panes. Therefore, the panedwindow widget would only receive motion events at its outside edges (the border) and within the sash, never over the child windows. - The old panedwindow implementation had no method of knowing when the pointer was within a child window. The implementor used an after statment with a time of 150 milliseconds(!) to check where the pointer was. 150 milliseconds is a ridiculously long time to check for pointer movement. - In ttk::panedwindow, someone actually wrote code to create a virtual <<EnteredChild>> event to get around the problem. Perhaps I could have made the simple change of using 10 milliseconds in the after statement. But the whole implementation seemed poor and inefficient, so a proper rewrite was in order. I suspect many of the underlying implementation reasons are lost in history. Enter/Leave for child windows would be useful in general. Motion for a window and all its children would be useful. chrstphrchvz added on 2020-09-15 08:12:07: Subscribing myself, since it appears others have come across the panedwindow cursor issue(s) I alluded to in [08eb057dea] but never reported. My impression of at least one root cause was that the panedwindow cursor handling is using timer events to work around the fact that X11 pointer event abstraction/emulation on non-X11 thought it was correct for a container widget to not be sent motion events when the cursor enters/leaves a contained widget. But I observe such motion events being sent anyways on X11. So I think that the X11 emulation behavior might be incorrect, and the whole panedwindow cursor handling mess could be avoided if non-X11 likewise sent those motion events. bll added on 2020-09-15 00:27:02: It appears that the panedwindow tests still work, so maybe I didn't break anything too badly. bll added on 2020-09-15 00:24:07: Proposed code in branch : bug-ac7f7719 Still needs more testing. | |||
