This seems to have been asked before but I still can't find an answer.
It all works fine on Windows - the mouse cursor simply goes into the minimally-resized window and redrawing stops. With OSX though, the window resizes to the cursor and out to it's minimum size again - hence the flicker.
Any ideas or solutions would be very welcome.
While I'm here ...
I once found a method on this forum to set the mouse position but I can't seem to find it now.
Again, if someone could be so kind ...
Dave
Flicker free window resize to minimum width/height - OSX
Re: Flicker free window resize to minimum width/height - OSX
Code: Select all
OpenWindow(0,#PB_Ignore,#PB_Ignore,400,300,"WindowBounds",#PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_ScreenCentered)
WindowBounds(0,300,200,500,400)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
Re: Flicker free window resize to minimum width/height - OSX
Thanks for the reply. WindowBounds() eh? I don't know how I missed that.
Any clue on the mouse position (OSX) thing?
Dave
Any clue on the mouse position (OSX) thing?
Dave
Re: Flicker free window resize to minimum width/height - OSX
Like that?
Code: Select all
ImportC ""
CGWarpMouseCursorPosition(x.CGFloat,y.CGFloat)
EndImport
OpenWindow(0,#PB_Ignore,#PB_Ignore,400,300,"cursor movement",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
ButtonGadget(0,10,10,200,30,"Move cursor to center")
ButtonGadget(1,190,260,200,30,"Move cursor to center")
Repeat
ev = WaitWindowEvent()
If ev = #PB_Event_Gadget
CGWarpMouseCursorPosition(WindowX(0,#PB_Window_InnerCoordinate)+200,WindowY(0,#PB_Window_InnerCoordinate)+150)
EndIf
Until ev = #PB_Event_CloseWindow