ZeroBraneEduPack icon indicating copy to clipboard operation
ZeroBraneEduPack copied to clipboard

windowing problems with wx.wxRESIZE_BORDER in turtle.lua

Open arkenidar opened this issue 4 years ago • 3 comments

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.

arkenidar avatar Dec 26 '20 18:12 arkenidar

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)

vnaum avatar Jan 16 '22 14:01 vnaum

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?

pkulchenko avatar Jan 17 '22 19:01 pkulchenko

It does fix it. Thanks a lot for great program!

vnaum avatar Jan 19 '22 13:01 vnaum