if (hasFocus) return;
if (getEditable ()) text.selectAll ();
hasFocus = true;
Shell shell = getShell ();
shell.removeListener (SWT.Deactivate, listener);
shell.addListener (SWT.Deactivate, listener);
Display display = getDisplay ();
display.removeFilter (SWT.FocusIn, filter);
display.addFilter (SWT.FocusIn, filter);
Event e = new Event ();
notifyListeners (SWT.FocusIn, e);