I’m having some issues when compiling my app for Linux. Windows and Mac are working as expected. I’m running the latest Xojo IDE (2023) but I was seeing the same issues in 2020. I’m using Ubuntu 22.
My window is a Global Floating Window, but it’s not acting like one. It doesn’t float above everything else and it also has a close button which it shouldn’t. I tried adding this declare I found in the forums, but it didn’t solve the issue.
if TargetLinux then
Soft Declare Sub gtk_window_set_keep_above Lib "libgtk-3.so" (WindowRef As Integer,b as Boolean)
gtk_window_set_keep_above Me.Handle,True
end
I have my window set to Main Screen, which usually has it open somewhat centered. However on Linux it’s opening in the upper left corner. I tired trying to code the window to center with the following, but that had no effect either.
Downloaded the most recent version of Mint (Cinnamon) and everything works fine! I did have to use the declare to get the floating window to work. Very impressed with Mint so far.
Interesting, since I had both the latest versions of Ubuntu and Mint. Mint is based off of Ubuntu, but works much better, including Window positioning.
So, a follow up question. I just now converted my project to API 2. Only a few minor syntax changes where needed. However, my Linux declare for keeping the floating window actually floating now gives me an error I’ve not seen before.
This is the declare that worked fine (on x11) with API 1.
if TargetLinux then
Soft Declare Sub gtk_window_set_keep_above Lib "libgtk-3.so" (WindowRef As Integer,b as Boolean)
gtk_window_set_keep_above Me.Handle,True
end
Now with API 2 I get this error.
MAIN_WINDOW.Opening, line 4
Parameter “WindowRef” expects type Integer, but this is type Ptr.
gtk_window_set_keep_above Me.Handle,True