Page 1 of 1

DisableWindow() moves window position

Posted: Fri May 09, 2014 8:12 am
by wombats
Hi,

When DisableWindow() is called on a maximized window that has a position greater than 0, 0, it moves the window. This doesn't work well with creating modal dialogs.

Code: Select all

Enumeration  
  #Window
  #Button
EndEnumeration

Procedure OnButtonClick()
  DisableWindow(#Window, 1)
EndProcedure
  
OpenWindow(#Window, 100, 100, 640, 480, "", #PB_Window_Maximize | #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget)
  
ButtonGadget(#Button, 10, 10, 90, 32, "Click")
BindGadgetEvent(#Button, @OnButtonClick())
  
Repeat
  WaitWindowEvent()
Until Quit = 1
It doesn't happen if you reenable the window right away in the procedure, so I didn't put that in there. Make sure you run this with the debugger enabled so you can quit it easily.

Re: [5.22] DisableWindow() moves window position

Posted: Fri May 09, 2014 4:58 pm
by IdeasVacuum
Confirm that the Window doesn't move on WindowsXP 32bit, so looking like a Linux issue (or 'feature').

Re: [5.22] DisableWindow() moves window position

Posted: Mon Sep 14, 2015 9:46 am
by Fred
Doesn't seems to happen here, so may be it's X server dependant ?