Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can you prevent a QB64 program from being maximized under Linux?
#1
All my QB64 programs under Linux (KDE Neon) can be resized/maximized anytime.  I'd like to prevent that.   Is there a way?  I tried $RESIZE:OFF but it doesn't seem to stop it.

- Dav

Find my programs here in Dav's QB64 Corner
Reply
#2
https://qb64phoenix.com/qb64wiki/index.php/RESIZE

Did you also try this statement?

Remember that QB64PE is less ready on Linux than on Windows with GUI-heavy stuff. It's primarily because there are two GUI frameworks to worry about, the GNOME Tool Kit (GTK) and the Qt by KDE. Freeglut has to communicate with either one, but it might be better to access the framework directly. It's hard because stuff keeps being changed on Qt and recently they moved up from v5 to v6 and there's full speed ahead for KDE Plasma v6. GTK could go back to v2 which is clunky but it's used by many programs around for decades like Audacity, GIMP and Libreoffice.

You might want to return to Windows and compile to EXE file, then run those programs through Wine. I know it's a lame way to distribute programs but otherwise trying to control when to resize and maximize could really put off a seasoned user of Linux trying to use your program.
Reply
#3
Hey thanks for the reply and suggestion, mnrvovfrc. I played around with _RESIZE, tried to override the sizing with it.  I thought this code would do it to force deminsions, but still no go.  Guess I’ll just have to live with it.

$RESIZE:ON

DO
   IF _RESIZE THEN
      SCREEN 12 ‘ or whatever
   END IF
LOOP

- Dav

Find my programs here in Dav's QB64 Corner
Reply
#4
I like the workaround, Dav.
Tread on those who tread on you

Reply
#5
(07-31-2023, 01:12 PM)Dav Wrote: Hey thanks for the reply and suggestion, mnrvovfrc. I played around with _RESIZE, tried to override the sizing with it.  I thought this code would do it to force deminsions, but still no go.  Guess I’ll just have to live with it.

$RESIZE:ON

DO
   IF _RESIZE THEN
      SCREEN 12 ‘ or whatever
   END IF
LOOP

- Dav
I'd change this just a wee bit, @Dav.

$RESIZE:ON

DO
   IF _RESIZE THEN
      SCREEN 12 ‘ or whatever
      Do: _Limit 60: Loop Until _Resize = 0
   END IF
LOOP

QB64 can be picky about how _RESIZE is reported.  Sometimes the call back to Screen 12 will get reported as a resize event, making your screen resize itself multiple times (and maybe even endlessly!).  

Anytime you're using _RESIZE to manually set the size of the screen, you want to make certain to clear that flag afterwards so that you don't end up endlessly tripping the resize routine over and over with it.  Wink
Reply
#6
Thanks for the tip, Steve.  Yeah that's a better way.

Unfortunately though there doesn't seem to be a way to prevent a window resize in the linux distros I've been playing with.  No biggie. I've been hopping around a bunch of distros.  I've landed back on Linux Mint, it runs pretty snappy off my USB Thumb drive on a ThinkPad T430.  

I find I'm using Linux more than Windows lately.  Many windows programs I have run under wine, which is nice.  The QB64PE Windows 32bit version runs fine under wine, as well as the compiled programs (no resize problem with them either).

- Dav

Find my programs here in Dav's QB64 Corner
Reply




Users browsing this thread: 6 Guest(s)