ZeroBraneEduPack
ZeroBraneEduPack copied to clipboard
windowing problems with wx.wxRESIZE_BORDER in turtle.lua
I use Kubuntu LTS 20.04 and somehow when starting scripts using turtle.lua the window is not usable. The appearance is very thin and small. I debugged and found that wxRESIZE_BORDER could be the cause because if I remove it the window displays as normal.
My workaround:
--- a/turtle.lua
+++ b/turtle.lua
@@ -174,7 +174,6 @@ local function open(name)
wx.wxSize(defaultSize, defaultSize),
wx.wxDEFAULT_FRAME_STYLE + wx.wxSTAY_ON_TOP
- wx.wxRESIZE_BORDER - wx.wxMAXIMIZE_BOX)
- frame:SetClientSize(defaultSize, defaultSize)
frame:Connect(wx.wxEVT_CLOSE_WINDOW,
function(event)
I can add the following patch, but it's still not clear to me why it would behave this way on Linux:
diff --git a/turtle.lua b/turtle.lua
index 36c8a57..5ea1e41 100644
--- a/turtle.lua
+++ b/turtle.lua
@@ -174,7 +174,7 @@ local function open(name)
wx.wxSize(defaultSize, defaultSize),
wx.wxDEFAULT_FRAME_STYLE + wx.wxSTAY_ON_TOP
- wx.wxRESIZE_BORDER - wx.wxMAXIMIZE_BOX)
- frame:SetClientSize(defaultSize, defaultSize)
+ if not linux then frame:SetClientSize(defaultSize, defaultSize) end
frame:Connect(wx.wxEVT_CLOSE_WINDOW,
function(event)
@vnaum, does this fix the issue for you?
It does fix it. Thanks a lot for great program!