PureBasic 6.10 Beta 6: OpenWindow with PB_Window_Maximize

Post bugreports for the Linux version here
OBrien
New User
New User
Posts: 9
Joined: Fri Dec 22, 2023 10:37 pm

PureBasic 6.10 Beta 6: OpenWindow with PB_Window_Maximize

Post by OBrien »

Hi all,

Created Windows with the flag #PB_Window_Maximize gets the wrong width/height (only the hard codeded width/height or required size).

Code: Select all


Define.i Win=1

OpenWindow(Win, 0,0,0,0,"Test", #PB_Window_Maximize)
Debug WindowWidth(Win)
Debug WindowHeight(Win)

Repeat
  E = WaitWindowEvent()
Until E = #PB_Event_CloseWindow
Can anyone confirm the issue, please?

OS: Linux Mint 21.2
juergenkulow
Enthusiast
Enthusiast
Posts: 557
Joined: Wed Sep 25, 2019 10:18 am

Re: PureBasic 6.10 Beta 6: OpenWindow with PB_Window_Maximize

Post by juergenkulow »

I don't see the bug on my machine.

Code: Select all

Define.i Win=1

OpenWindow(Win, 0,0,0,0,"Test", #PB_Window_Maximize)

Repeat
  E = WaitWindowEvent(100)
  If ElapsedMilliseconds()<1000
    Debug Str(WindowWidth(Win))+"x"+Str(WindowHeight(Win))+" ms:"+Str(ElapsedMilliseconds())
  EndIf 
Until E = #PB_Event_CloseWindow
; 30x30 ms:835
; 30x30 ms:835
; 30x30 ms:835
; 30x30 ms:838
; 30x30 ms:838
; 30x30 ms:838
; 30x30 ms:838
; 30x30 ms:842
; 30x30 ms:842
; 30x30 ms:842
; 30x30 ms:842
; 30x30 ms:842
; 30x30 ms:843
; 30x30 ms:843
; 30x30 ms:888
; 30x30 ms:898
; 30x30 ms:898
; 1200x1892 ms:898
; 1200x1892 ms:898
; 1200x1892 ms:900
; 1200x1892 ms:900
; 1200x1892 ms:900
; 1200x1892 ms:900
; 1200x1892 ms:903
; 1200x1892 ms:903
; 1200x1892 ms:905
; 1200x1892 ms:905
; 1200x1892 ms:907
; 1200x1892 ms:907
; 1200x1892 ms:962
; 1200x1892 ms:963
; 1200x1892 ms:986
OBrien
New User
New User
Posts: 9
Joined: Fri Dec 22, 2023 10:37 pm

Re: PureBasic 6.10 Beta 6: OpenWindow with PB_Window_Maximize

Post by OBrien »

This worked until Beta 3.

When i get the width/height later, for example in a Event, it works:

Code: Select all

Global.i Win=1, Btn=1

Procedure TestSize()
  Debug "Width : " + Str(WindowWidth(Win))
  Debug "Height: " + Str(WindowHeight(Win))
EndProcedure

OpenWindow(Win, 0,0,0,0,"Test", #PB_Window_Maximize)
ButtonGadget(Btn,10,10,100,30,"Get Size")
BindGadgetEvent(Btn,@TestSize())

Debug "Stqrtup Width : " + Str(WindowWidth(Win))
Debug "Startup Height: " + Str(WindowHeight(Win))

Repeat
  E = WaitWindowEvent()
Until E = #PB_Event_CloseWindow
Post Reply