@@ -244,6 +244,8 @@ clipboard(Config) ->
244244 wxTextCtrl :connect (Ctrl , command_text_paste , [{skip , true }]),
245245 wxWindow :show (Frame ),
246246
247+ BlockWxDialogs = wxLogNull :new (),
248+
247249 CB = ? mt (wxClipboard , wxClipboard :get ()),
248250 wxClipboard :usePrimarySelection (CB ),
249251 ? m (false , wx :is_null (CB )),
@@ -271,17 +273,18 @@ clipboard(Config) ->
271273 Paste = ? mt (wxTextDataObject , wxTextDataObject :new ([{text ," From Erlang" }])),
272274 case wxClipboard :addData (CB ,Paste ) of
273275 true ->
274- ? log (" Put text on clipboard~n " , []);
276+ ? log (" Put text on clipboard~n " , []),
277+ ? log (" Flushing ~n " ,[]),
278+ wxClipboard :flush (CB ),
279+ ? log (" Stopping ~n " ,[]);
275280 false ->
276281 ? log (" Couldn't copy data to clipboard~n " ,[])
277282 end ,
278283 wxClipboard :close (CB );
279284 false ->
280285 ? log (" Clipboard open failed~n " ,[])
281286 end ,
282- ? log (" Flushing ~n " ,[]),
283- wxClipboard :flush (CB ),
284- ? log (" Stopping ~n " ,[]),
287+ wxLogNull :destroy (BlockWxDialogs ),
285288 wx_test_lib :wx_destroy (Frame ,Config ).
286289
287290
0 commit comments