javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/Shell.java
changeset 79 2f468c1958d0
parent 48 e0d6e9bd3ca7
equal deleted inserted replaced
76:4ad59aaee882 79:2f468c1958d0
   420     addListener (SWT.Deiconify,typedListener);
   420     addListener (SWT.Deiconify,typedListener);
   421     addListener (SWT.Activate, typedListener);
   421     addListener (SWT.Activate, typedListener);
   422     addListener (SWT.Deactivate, typedListener);
   422     addListener (SWT.Deactivate, typedListener);
   423 }
   423 }
   424 
   424 
       
   425 void checkNoBackground() {
       
   426     if((style & SWT.NO_BACKGROUND) != 0) {
       
   427         if(handle != 0) {
       
   428             OS.QWidget_setAttribute(handle, OS.QT_WA_NOSYSTEMBACKGROUND, true);
       
   429         }
       
   430         if(scrollAreaHandle != 0) {
       
   431             OS.QWidget_setAttribute(scrollAreaHandle, OS.QT_WA_NOSYSTEMBACKGROUND, true);
       
   432         }
       
   433         if(topHandle != 0) {
       
   434             OS.QWidget_setAttribute(topHandle, OS.QT_WA_NOSYSTEMBACKGROUND, true);
       
   435         }
       
   436     }
       
   437 }
       
   438 
   425 /**
   439 /**
   426  * Requests that the window manager close the receiver in
   440  * Requests that the window manager close the receiver in
   427  * the same way it would be closed when the user clicks on
   441  * the same way it would be closed when the user clicks on
   428  * the "close box" or performs some other platform specific
   442  * the "close box" or performs some other platform specific
   429  * key or mouse combination that indicates the window
   443  * key or mouse combination that indicates the window
   591     }
   605     }
   592     
   606     
   593     // Shell must not by default accept focus by clicking. 
   607     // Shell must not by default accept focus by clicking. 
   594     int policy = OS.QWidget_focusPolicy(topHandle) & ~OS.QT_FOCUSPOLICY_CLICKFOCUS;
   608     int policy = OS.QWidget_focusPolicy(topHandle) & ~OS.QT_FOCUSPOLICY_CLICKFOCUS;
   595     OS.QWidget_setFocusPolicy(topHandle, policy);
   609     OS.QWidget_setFocusPolicy(topHandle, policy);
       
   610     policy = OS.QWidget_focusPolicy(scrollAreaHandle) & ~OS.QT_FOCUSPOLICY_CLICKFOCUS;
       
   611     OS.QWidget_setFocusPolicy(scrollAreaHandle, policy);
       
   612     policy = OS.QWidget_focusPolicy(handle) & ~OS.QT_FOCUSPOLICY_CLICKFOCUS;
       
   613     OS.QWidget_setFocusPolicy(handle, policy);
       
   614     
       
   615     // The Shell should not become active when Shell.setVisible(true) is called.
       
   616     OS.QWidget_setAttribute(topHandle, OS.QT_WA_SHOWWITHOUTACTIVATING, true);
   596 
   617 
   597     // Stand-alone Composites, Shells, Canvases set the CANVAS flag
   618     // Stand-alone Composites, Shells, Canvases set the CANVAS flag
   598     state |= WidgetState.HANDLE | WidgetState.CANVAS;
   619     state |= WidgetState.HANDLE | WidgetState.CANVAS;
   599 }
   620 }
   600 
   621