Xojo Linux 2021r1 QC issues? Or just me?


I wonder how many of these Linux problems can really be blamed on Xojo. It appears that the vast majority of problems are text related—font metrics in particular. But Xojo isn’t alone in this regard. I’ve encountered this in a number of different Linux applications. I may be off base here, but I’m guessing that the problems originate in the GTK library, and there’s no one size fits all solution, because it also appears to be hardware dependent (screen resolution, graphics hardware, etc.). The GTK library and video drivers should be taking care of these differences, but it appears that they’re not. So, even if the Xojo team is able to get the GUI looking good on one hardware platform, there’s no guarantee that it will be acceptable on a different one. Linux has come a long way over the years, but it still appears to have quite a few problems trying to behave consistently across different hardware platforms.

Yes, I know what you’re saying - In the early days some of that was more of an an issue, but for the last decade or so we’ve had pretty good Linux performance across most all the desktop hardware we’ve been running - and much less headaches like we’ve had with various Windows graphics card drivers & updates.

Other cross-p IDE’s and apps have figured out how to handle fonts pretty well in Linux across different configurations - for instance Eclipse and Libre Office come to mind.

And we are using the Xojo recommended distro here - Linux Mint 20.1 Cinnamon, stock install. Which I was assuming that they are testing against. But in talking with Xojo recently they say they aren’t focused as much on Linux as they are on Mac/ Windows. OK - I see that. Oh well.

Yes, it’s unfortunate. I’m hoping that will change as the number of Linux users continues to increase.

And there will be plenty of Pi users, waiting in the wings.

With a number of workarounds for all the issues I’ve filed feedbacks for, my app works fairly well under Mint 20.1 and on the Pi. But I have no workaround for the 100% CPU usage issue or the print-related crashes.

Just to help rule out hardware problems - we tried the same Xojo Linux Mint setup across several hardware combos - Intel i3 thru i7 / AMD Ryzen CPU’s, and Nvidia / AMD / Intel graphics chips, different motherboards, etc. Unless we’re extremely unlucky with hardware, Xojo Linux 2021r1 seems to have the same font rendering issue across all hardware we tested - and Xojo is the only application we saw exhibiting that problem. Qt, Eclipse, Open Office etc. are rendering fonts just fine, in any size, on all the test hardware we have in the lab. BricsCad (x-platform CAD) did have a problem rendering some menus under Linux a couple years ago, but they seemed to have sorted that out last year.

And I have this problem: after installing Linux in Hojo, the keyboard does not work. Either there is some problem with the drivers, or with the keyboard itself. I have already updated what I could, but there is no result. Maybe because my Logitech keyboard is already old? I was thinking about buying a new keyboard. Can you tell me if any of these keyboards are good for me?

Make sure your bug report includes screenshots.

I’ve always had formatting issues on Linux. I created a routine to adjust things (see below), I call this from the Open event in every window. This app hasn’t been used on Linux in the last few years so I’m not sure how things have changed. Note I also have some adjustments for dark mode for objects that exist on most of my windows. I’ll be looking at it again in the next few weeks as I’m anticipating some new Linux users.

I just did a fresh install of Mint/Cinnamon on an old Dell Latitude E6500, then installed Xojo. IDE looks fine on this computer. However as expected there are minor formatting issues with lots of controls.

Don’t expect this code to work as-is with your project, its a concept showing how you can adjust things at runtime so you don’t need a separate project for Linux.

Public Sub AdjustControls(w As window)
  ' Adjust controls
  Dim i As Int32, r As Rectangle, t As Label
  For i =0 To w.ControlCount-1
    #If TargetLinux Then
      If (w.Control(i) IsA PopupMenu) Then
        PopupMenu(w.Control(i)).Height = PopupMenu(w.Control(i)).Height + 6
        PopupMenu(w.Control(i)).Top = PopupMenu(w.Control(i)).Top -2 // just a little tweak
      If (w.Control(i) IsA BevelButton) Then
        ' If parent is not a window then icon needs adjustment
        If Not (BevelButton(w.Control(i)).Parent IsA Window) Then
          BevelButton(w.Control(i)).IconDX = -18
          BevelButton(w.Control(i)).IconDY = -10
      ' PushButtons are too tall on Linux but changes to the height or font size are ignored
      'If (w.Control(i) IsA PushButton) Then
      'PushButton(w.Control(i)).Height = 22
      'End If
    If DarkMode Or Color.IsDarkMode Then
      If w.Control(i).Name.Left(10) = "RectUpdate" Then
        r = Rectangle(w.Control(i))
        r.BottomRightColor = &ceeeeee
        r.TopLeftColor = &ceeeeee
        r.FillColor = &c000000
      End If
      If w.Control(i).Name.Left(10) = "UpdateInfo" Then
        t = Label(w.Control(i))
        t.TextColor = &ceeeeee
      End If
    End If
End Sub

Well, just about anything to help. This is what Xojo Linux’s own gold-standard example looks like - WITH “Normalize Controls” turned on for Linux build. Oops. Looks like normalize doesn’t know about custom controls…

Check out modGTK3 on this forum thread.. Seriously good stuff. :slight_smile:

Normalize controls is ModGTK3.

Wait - does that mean I can stop including modGTK in my projects with that toggle enabled? Could you clarify a little @Greg_O_Lone ?

It does. There’s a copy of ModGTK3 built-in to the Xojo framework which is included in your project and initialized simply by activating that feature.

1 Like

So I should remove the one I have included, and I suppose the Xojo built-in one gets updated from time to time? Mine doesn’t of course. :dizzy_face:

Thanks, Greg. While I didn’t know this, it is not surprising. However, I find I’m still better off with the external classes. Without it I still see some weirdness, notably in pushbuttons. When I get a little time I’ll make an example for Feedback.

Tim, don’t dump it just yet :slight_smile:

No indeed. I tried dumping it and also removing the initialisation code from my app’s startup, and setting Normalise to on. The result was I was back to having no correction of controls at all.

Or does @Greg_O_Lone mean that having the Normalise switch on mean that ModGTK3 is included, but that one still has to initialise it?

Setting the switch to true also initializes it when your app starts. It is meant to be a set and forget kind of thing.

I checked the version we have and it’s from April 2020. I see that there has been a few checkins since then.

Mmm, that’s what I thought. When it didn’t seem to work I rapidly restored the previous saved version from Time Machine.