From f7260808ed569abef328bad1ab0981d68297ba9f Mon Sep 17 00:00:00 2001 From: Seb Shader Date: Fri, 28 Oct 2022 18:22:37 -0700 Subject: [PATCH] fix more scroll issues on linux (pass y coord of sub-canvasses to mousewheel event) --- color-themes-plugin.tcl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/color-themes-plugin.tcl b/color-themes-plugin.tcl index 60b6d1e..534beb9 100644 --- a/color-themes-plugin.tcl +++ b/color-themes-plugin.tcl @@ -211,6 +211,7 @@ proc ::color-themes::click {box} { proc ::color-themes::scroll {box coord units boxincr} { variable num_themes # not sure of a better way to simulate hovering.. + #::pdwindow::post "box: $box coord: $coord units: $units boxincr: $boxincr\n" set ocanvy [.colortheme_dialog.theme_list.c canvasy 0] .colortheme_dialog.theme_list.c yview scroll [expr {- ($units)}] units {::color-themes::motion} [expr max(0, min($box + int($coord + \ @@ -321,9 +322,9 @@ proc ::color-themes::opendialog {} { if {$::windowingsystem eq "x11"} { # from http://wiki.tcl.tk/3893 bind .colortheme_dialog.theme_list.c.f$counter.c \ - {event generate %W -delta 1} + {event generate %W -delta 1 -y %y} bind .colortheme_dialog.theme_list.c.f$counter.c \ - {event generate %W -delta -1} + {event generate %W -delta -1 -y %y} } bind .colortheme_dialog.theme_list.c.f$counter.c \ [list {::color-themes::motion} $counter]