I've adjusted `show-scrollbars` to not trigger a refresh if the scrollbars are already shown as requested.
Meanwhile, I think you could work around the problem: Keep track in your code whether the scrollbars are already shown as needed, and skip the `show-scrollbars` call in that case. At Wed, 2 Dec 2015 19:56:07 -0800 (PST), Lehi Toskin wrote: > Short version: > show-scrollbars seems to be forcing my canvas object to call on-paint. The > problem is that on-paint contains calls to show-scrollbars and thus creates > an > infinite loop. > > Long version: > I have a canvas that displays an image and will enable or disable the > scrollbars based on how large the image is in relation to the current > dimensions of the canvas. On Linux and OSX the code operates as intended and > the user may resize the frame as much as desired with the scrollbars > appearing > or disappearing when appropriate. On Windows, however, simply getting the > canvas to display the image will trap itself inside an infinite loop because > the calls to show-scrollbars is making the canvas call on-paint. I have > narrowed it down to specifically that procedure because removing those calls > from on-paint allows the canvas to display the image properly. > > > I have tried all kinds of combinations of suspend- and resume-flush but > nothing seems to change this behavior. For reference, the relevant lines may > be found here: > https://github.com/lehitoskin/ivy/blob/master/base.rkt#L264-L310 > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.