diff options
| author | Ian Pun | 2016-09-06 19:22:53 +0000 |
|---|---|---|
| committer | Eric Williams | 2016-09-08 16:09:09 +0000 |
| commit | 52881b02b736327002428947c3a54bd5fb1b6761 (patch) | |
| tree | 506162796f0bac634cd8338b68c5e731d231e80b | |
| parent | c0f3a812f8a537ea7f9a870f20d7542e62fac10c (diff) | |
| download | eclipse.platform.swt-52881b02b736327002428947c3a54bd5fb1b6761.tar.gz eclipse.platform.swt-52881b02b736327002428947c3a54bd5fb1b6761.tar.xz eclipse.platform.swt-52881b02b736327002428947c3a54bd5fb1b6761.zip | |
Bug 69650 - Focus lost when focused widget is disposed
Applied purposed patch of Billy Biggs in order to set focus correctly if
widget is destroyed. Original comments indicated patch is unfinished and
potentially "dangerous", but I did not see severe use cases with it.
Tested on all versions of GTK3 and also GTK2.
Change-Id: I214c8efaabf159411b019c5a10ecf2bf7ea61c0a
Signed-off-by: Ian Pun <ipun@redhat.com>
| -rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java index 9d94298b5e..eccd99be13 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java @@ -4005,7 +4005,9 @@ void releaseParent () { @Override void releaseWidget () { + boolean hadFocus = display.getFocusControl() == this; super.releaseWidget (); + if (hadFocus) fixFocus (this); if (display.currentControl == this) display.currentControl = null; display.removeMouseHoverTimeout (handle); long /*int*/ imHandle = imHandle (); |
