DisableWindow() moves window position

Linux specific forum
wombats
Enthusiast
Enthusiast
Posts: 720
Joined: Thu Dec 29, 2011 5:03 pm

DisableWindow() moves window position

Post 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.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: [5.22] DisableWindow() moves window position

Post by IdeasVacuum »

Confirm that the Window doesn't move on WindowsXP 32bit, so looking like a Linux issue (or 'feature').
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Fred
Administrator
Administrator
Posts: 18350
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [5.22] DisableWindow() moves window position

Post by Fred »

Doesn't seems to happen here, so may be it's X server dependant ?
Post Reply