Page 1 of 1

Ubuntu 24.04 - gadgets in windows

Posted: Thu Jun 12, 2025 9:15 am
by marcoagpinto
Heya, guys,

It this normal?: I compiled my app in Ubuntu 24.04 and it in the subwindows shows the close and minimise gadgets.

Can't it work like Windows 11 and open subwindows without these two gadgets?

Thanks!

Re: Ubuntu 24.04 - gadgets in windows

Posted: Thu Jun 12, 2025 9:29 am
by Fred
Code ?

Re: Ubuntu 24.04 - gadgets in windows

Posted: Thu Jun 12, 2025 9:44 am
by marcoagpinto
Fred wrote: Thu Jun 12, 2025 9:29 amCode ?
@Fred

Please notice I am not saying it is a bug since I don't know, I just raised the question because it works differently in Windows 11 and in Ubuntu 24.04.

Here is the code:

Code: Select all

OpenWindow(1,10,10,640,480,"Testing",#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_SizeGadget)    
OpenWindow(2,0,0,320,240,"About",#PB_Window_WindowCentered,WindowID(1))
DisableWindow(1,#True)


  okay=#False
  Repeat
      
    event=WaitWindowEvent()
      
     
    If event=#PB_Event_CloseWindow
      okay=#True     
    EndIf      
      

  Until okay=#True

    
  ; Close the About window and activate the main window
  DisableWindow(1,#False)
  CloseWindow(2)
Thank you!

Re: Ubuntu 24.04 - gadgets in windows

Posted: Thu Jun 12, 2025 2:39 pm
by moulder61
@marcoagpinto

In Void Linux using PB611 on a GTK based system, I'm not getting the Minimise gadget on the "About" window.

The main window is disabled, so if it didn't have the Close gadget, how would you close the window?

Presumably you would need a "Close" or "Quit" button in the "About" window, which would mean the Close gadget would be excess to requirements, so maybe go for #PB_Window_BorderLess to get around it?

Just a thought/idea/senseless comment.

Moulder.

Image

Re: Ubuntu 24.04 - gadgets in windows

Posted: Thu Jun 12, 2025 4:26 pm
by marcoagpinto
@Moulder

I don't need a quit gadget in the about window because I have there other ways of exiting it, such as clicking anywhere in the window.

This code was just an example to show what appears on Ubuntu.
Image

Image


EDIT: I have just noticed a bug!!! On Ubuntu, the TextGadget with the PureBasic information isn't centred on Ubuntu. This is a bug.

Re: Ubuntu 24.04 - gadgets in windows

Posted: Thu Jun 12, 2025 8:15 pm
by moulder61
@marcopagpinto.

If someone clicks the menu for "About", they know what the window is for, and if you have other methods of exiting the About window, it doesn't really need a titlebar. :P

Regarding the off centre text, that looks more like a justification issue.

Moulder.

P.S. I just saw your other post where mk-soft might have answered this? Ignore my senseless comment. :wink: