Page 1 of 1

ResizeWindow() fires a #PB_Event_SizeWindow

Posted: Thu Aug 21, 2014 8:28 pm
by uwekel
Hi,

i you resize a window programmatically with ResizeWindow(), a #PB_Event_SizeWindow will be fired. This happen on Linux but not on Windows. PB never does fire events on programmical changes.

Here is some code to test:

Code: Select all

Procedure Resized()
  Debug "Resized"
EndProcedure
  
OpenWindow(0, 0, 0, 300, 300, "Test", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_SizeGadget)
ButtonGadget(0, 10, 10, 100, 32, "Resize")
BindEvent(#PB_Event_SizeWindow, @Resized(), 0)

Repeat
  Select WaitWindowEvent()
  Case #PB_Event_SizeWindow
    Debug "SizeWindowEvent"
  Case #PB_Event_Gadget
    ResizeWindow(0, #PB_Ignore, #PB_Ignore, 400, 400)
  Case #PB_Event_CloseWindow
    Break
  EndSelect
ForEver
Best regards
Uwe

Re: PB5.30 x86:ResizeWindow() fires a #PB_Event_SizeWindow

Posted: Mon Sep 14, 2015 10:38 am
by Fred
The problem is on Linux the events are send after resizing the window, by the Window Manager so we get no clue if it's a programmic event of a user event.