<html><head></head><body>Maybe<br><br>batch(Window, Fun) -><br>ok = wxWindow:freeze(Window),<br>try<br>   Fun()<br>after -><br>   ok = wxWindow:thaw(Window)<br>end.<br><br>would be better<br><br><div class="gmail_quote">On 26 January 2020 12:59:23 pm AEDT, zxq9 <zxq9@zxq9.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">On 2020/01/21 20:16, Dan Gudmundsson wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;">One thing that have changed is wxWidgets version, i.e. upgrade<br></blockquote>from 2.8<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;">to 3.0.3 (soon to be 3.1 on windows),<br>but I don't know what is causing this, nor how where is should be<br></blockquote>fixed<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> in the application code,<br>   wx wrapper or wxwidgets library.<br></blockquote></blockquote><br>Hi, again.<br><br>After confirming the behavior (and also finding that freeze/1, [make <br>stuff], thaw/1 doesn't work on Windows) someone in the SO Erlang channel <br>found this bug that has been around forever and seems to apply only to <br>wxMSW:<br><br><a href="https://trac.wxwidgets.org/ticket/10748">https://trac.wxwidgets.org/ticket/10748</a><br><br>The description is exactly the problem I see. Hopefully they'll get this <br>cleared up. It is a very weird problem. I imagine I can create a <br>workaround, but will need a few hours to mess with it to figure out a way.<br><br>If they fix freeze/thaw on all platforms then a non-hacky implementation <br>of batch/1 could be:<br><br><br>   -spec batch(Window, Fun) -> Result<br>       when Window :: wx:wx_object(),<br>            Fun    :: fun(),<br>            Result :: term().<br><br>   batch(Window, Fun) -><br>       ok = wxWindow:freeze(Window),<br>       Result = Fun(),<br>       ok = wxWindow:thaw(Window),<br>       Result.<br><br>Fingers crossed this is addressed in 3.1.<br><br>-Craig<br></pre></blockquote></div><br>-- <br>Kind regards,<br>Dmitry Belyaev</body></html>