Skip to content

Commit 7add671

Browse files
Thomas Singerakurtakov
authored andcommitted
Control.gtk_event_after: simplify
no array is needed
1 parent 4c13551 commit 7add671

File tree

1 file changed

+3
-4
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets

1 file changed

+3
-4
lines changed

bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3736,10 +3736,9 @@ long gtk_event_after (long widget, long gdkEvent) {
37363736
}
37373737
case GDK.GDK_FOCUS_CHANGE: {
37383738
if (!isFocusHandle (widget)) break;
3739-
boolean [] focusIn = new boolean [1];
37403739
GdkEventFocus gdkEventFocus = new GdkEventFocus ();
37413740
GTK3.memmove (gdkEventFocus, gdkEvent, GdkEventFocus.sizeof);
3742-
focusIn[0] = gdkEventFocus.in != 0;
3741+
boolean focusIn = gdkEventFocus.in != 0;
37433742

37443743
/*
37453744
* Feature in GTK. The GTK combo box popup under some window managers
@@ -3751,7 +3750,7 @@ long gtk_event_after (long widget, long gdkEvent) {
37513750
* NOTE: This code runs for all menus.
37523751
*/
37533752
Display display = this.display;
3754-
if (focusIn[0]) {
3753+
if (focusIn) {
37553754
if (display.ignoreFocus) {
37563755
display.ignoreFocus = false;
37573756
break;
@@ -3766,7 +3765,7 @@ long gtk_event_after (long widget, long gdkEvent) {
37663765
}
37673766
}
37683767
}
3769-
sendFocusEvent (focusIn[0] ? SWT.FocusIn : SWT.FocusOut);
3768+
sendFocusEvent (focusIn ? SWT.FocusIn : SWT.FocusOut);
37703769
break;
37713770
}
37723771
}

0 commit comments

Comments
 (0)