Menu ▾ ▴

#2917 review how GUI locations are recorded, after seeing that there's an issue on Macs

nextrelease
open
nobody
None
5
5 hours ago
19 hours ago
No

Dave showed me where the CDF file dialog gets bigger and bigger as he goes in and out of the GUI. Every time its entered its size when exiting is recorded, and this should not be getting bigger and bigger. I know there was some kludgy code on Windows calculating sizes, and this should all be reviewed.

Discussion

  • Jeremy Faden

    Jeremy Faden - 6 hours ago

    You can see this on Linux, too.

     
  • Jeremy Faden

    Jeremy Faden - 5 hours ago

    There are automatic resize events which are happening after the size is set. I added a listener and I can see the event comes from:

    WindowManager$2.componentResized:363    
    AWTEventMulticaster.componentResized:168    
    AWTEventMulticaster.componentResized:167    
    Component.processComponentEvent:6452    
    Component.processEvent:6406 
    Container.processEvent:2266 
    Window.processEvent:2056    
    Component.dispatchEventImpl:5001    
    Container.dispatchEventImpl:2324    
    Window.dispatchEventImpl:2780   
    Component.dispatchEvent:4833    
    EventQueue.dispatchEventImpl:775    
    EventQueue$4.run:720    
    EventQueue$4.run:714    
    AccessController.executePrivileged:776  
    AccessController.doPrivileged:399   
    ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege:86  
    ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege:97  
    EventQueue$5.run:747    
    EventQueue$5.run:745    
    AccessController.executePrivileged:776  
    AccessController.doPrivileged:399   
    ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege:86  
    EventQueue.dispatchEvent:744    
    EventDispatchThread.pumpOneEventForFilters:203  
    EventDispatchThread.pumpEventsForFilter:124 
    EventDispatchThread.pumpEventsForFilter:117 
    WaitDispatchSupport$2.run:191   
    WaitDispatchSupport$4.run:236   
    WaitDispatchSupport$4.run:234   
    AccessController.executePrivileged:776  
    AccessController.doPrivileged:318   
    WaitDispatchSupport.enter:234   
    Dialog.show:1080    
    Component.show:1728 
    Component.setVisible:1675   
    Window.setVisible:1036  
    Dialog.setVisible:1016  
    WindowManager.showModalDialog:410   
    

    So I think the sizing needs to happen after setVisible.

     
  • Jeremy Faden

    Jeremy Faden - 5 hours ago

    This fixes the problem on Linux, will change other platforms later this morning.