Ticket UUID: | a84b20eddf1b699aaf9fe0cd6136b0e7a6098ea5 | |||
Title: | Tk scrollbar issues on macOS | |||
Type: | Bug | Version: | 8.6.8 | |
Submitter: | anonymous | Created on: | 2018-08-10 21:08:34 | |
Subsystem: | 16. [scrollbar] | Assigned To: | fvogel | |
Priority: | 5 Medium | Severity: | Important | |
Status: | Closed | Last Modified: | 2018-10-18 20:28:43 | |
Resolution: | Fixed | Closed By: | fvogel | |
Closed on: | 2018-10-18 20:28:43 | |||
Description: |
The following Tcl script is given. package require Tk scrollbar .vbar -width 12 text .edit pack .vbar -side right -fill y pack .edit -side left -fill both -expand 1 .vbar configure -command {.edit yview} .edit configure -yscrollcommand {.vbar set} bind .vbar {<Button-1> } { set cx %x set cy %y set dz [.vbar identify $cx $cy] puts "You clicked at ($cx,$cy) on $dz.\n" } for {set i 1} {$i <= 256} {incr i} { .edit insert "$i.0" "This is the line number $i.\n" } Run the script on macOS 10.13 with tclsh8.6 or wish8.6 (8.6.8). In the console you'll see that when clicking on the slider, at the top of the vertical scrollbar, the identified region is "through1". Clicking below the slider, shows that the scrollbar considers the click still being on the slider. This problem does not manifest on Tcl/Tk 8.5 on macOS. | |||
User Comments: |
fvogel added on 2018-10-18 20:28:43:
Merged to core-8-6-branch and trunk. At this point scrollbar.test runs 100% PASS on all 3 plaftorms (Win Vista, Linux Debian 8 and macOS 10.12). kevin_walzer added on 2018-09-25 12:08:08: I rebuilt Tk and see the results you are seeing. I may have misread the output before. fvogel added on 2018-09-25 06:09:06: Well, it was not the way I found the fix. I rather found that this commit [8ad750dca9] was wrong (some amount of the tkMacOSXScrlbr.c part of it, at least). I will use more days before merging, I need to test further. About your remark: "I see most of the development test and all of the deployment tests pass now": This sounds very strange to me. There should be no difference in test results between the two targets. There was in the past and it always indicated some weird problem of crunched variable that we could find with a lot of luck and the help of -fstack-protector-all option of gcc. On my side, in the current state of the fv-macos-scrollbar-tests branch I see exactly 4 tests failures for scrollbar.test, and they are the same four for both the development and deployment targets, and they are those I derscribed in [f792b457eb]. That is sane. Seeing something different on your side make me wonder if you cleaned enough (I do make clean AND rm -rf .../build AND rm -rf in the install dir as well). kevin_walzer added on 2018-09-25 02:41:13: Francois, thank you for the fix. It appears you have simply done what I said I was doing, that is, incorporating the Unix metrics into the Mac code (TkpScrollbarPosition), but I inexplicably omitted and/or changed portion of it. I see most of the development test and all of the deployment tests pass now, and the scrolling behavior in the test script above is now correct (and virtually identical to the older Cocoa implementation in 8.5). Please go ahead and merge these to core-8-6-branch and trunk and I will close the various scrolling tickets both at Tk and Python. I greatly appreciate your work here. fvogel added on 2018-09-24 20:06:09: The fix I provided for [050d1ea747] should work for the present ticket as well. Kevin Walzer, could you please confirm by operational testing? fvogel added on 2018-09-24 12:56:50: I'm pretty sure I have the fix for this. Gimme a few days... kevin_walzer added on 2018-09-24 12:07:18: Re-opening because bug still appears at times. kevin_walzer added on 2018-08-12 15:01:18: Fix committed to trunk and core-8-6-branch. kevin_walzer added on 2018-08-11 14:49:58: Just committed branch mac-scrollbar-fix that seems to address the issue. Please test. vtudorache added on 2018-08-11 12:38:18: I created the ticket. The issue is that, in some situations, the scroll slider can't be moved. This can be arranged in the UI, sure, but it wold be better if all worked as expected. kevin_walzer added on 2018-08-11 02:24:01: I see the behavior, but I am not clear on what the problem exactly is. What is the issue? How does this scrolling behavior interfere with the operation of the scroll widget? bll added on 2018-08-10 21:37:04: See also: https://core.tcl.tk/tk/info/1875c1f30f2d1723 kw seems to be unable to replicate this issue. I can replicate it on mac os x 10.12.6. |