It is currently Fri Aug 14, 2020 9:30 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: #PB_Event_SizeWindow works different with #Window=0
PostPosted: Sat Jul 25, 2020 7:12 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Apr 21, 2005 2:38 pm
Posts: 1750
Location: Germany
In his posting "Window resize events" WilliamL has posted an example which generates on MacOS multiple resize events on #PB_Event_SizeWindow with #Window=1 or higher or with #PB_Any. But with #Window=0 always only one resize event is generated.

I have found this bug testing with the following MacOS versions:
  • MacOS 10.6.8 'Snow Leopard'
  • MacOS 10.13.6 'High Sierra'
  • MacOS 10.14.6 'Mojave'
  • MacOS 10.15.6 'Catalina'

I was able to find out that the bug was introduced between PB 5.42 and 5.43 (no difference between x86 and x64):
5.72 +
5.62 +
5.51 +
5.50 +
5.46 +
5.43 +
5.42 -
5.31 -

The bug may have been introduced in responce to the thread [Done] dozens SizeWindow events after resizing a window where Fred at the end remarked "Fixed."

By the way I had already posted in 2014 this cross-platform example in the German forum that demonstrates how to detect the end of a window resizing action in Linux, MacOS and Windows by using PostEvent() to generate a new custom event to indicate that the resizing has been finished.

Unfortunately PureBasic's handling of #PB_Event_SizeWindow events is different on all 3 supported operating systems when resizing a window:
  • Linux: multiple #PB_Event_SizeWindow events are generated.
  • MacOS: for a window with #Window=0 only one #PB_Event_SizeWindow event is generated; for #Window<>0 multiple #PB_Event_SizeWindow events are generated.
  • Windows: only one #PB_Event_SizeWindow event is generated.

You may also take a look into this even more detailed analysis based on an example from mk-soft.

Therefore I would suggest that on all 3 operating systems multiple #PB_Event_SizeWindow events should be generated during the resizing of a window and that a new event (for example #PB_Event_SizeWindowFinished) should be generated at the end of a resizing as demonstrated in my cross-platform example which works in Linux (GTK2 and GTK3), MacOS and Windows...


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye