Skip to content

Commit 1b4f2c9

Browse files
Thomas Singerakurtakov
authored andcommitted
Control.gtk_event_after: simplify
no array is needed
1 parent d2cb26d commit 1b4f2c9

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
@@ -3731,10 +3731,9 @@ long gtk_event_after (long widget, long gdkEvent) {
37313731
}
37323732
case GDK.GDK_FOCUS_CHANGE: {
37333733
if (!isFocusHandle (widget)) break;
3734-
boolean [] focusIn = new boolean [1];
37353734
GdkEventFocus gdkEventFocus = new GdkEventFocus ();
37363735
GTK3.memmove (gdkEventFocus, gdkEvent, GdkEventFocus.sizeof);
3737-
focusIn[0] = gdkEventFocus.in != 0;
3736+
boolean focusIn = gdkEventFocus.in != 0;
37383737

37393738
/*
37403739
* Feature in GTK. The GTK combo box popup under some window managers
@@ -3746,7 +3745,7 @@ long gtk_event_after (long widget, long gdkEvent) {
37463745
* NOTE: This code runs for all menus.
37473746
*/
37483747
Display display = this.display;
3749-
if (focusIn[0]) {
3748+
if (focusIn) {
37503749
if (display.ignoreFocus) {
37513750
display.ignoreFocus = false;
37523751
break;
@@ -3761,7 +3760,7 @@ long gtk_event_after (long widget, long gdkEvent) {
37613760
}
37623761
}
37633762
}
3764-
sendFocusEvent (focusIn[0] ? SWT.FocusIn : SWT.FocusOut);
3763+
sendFocusEvent (focusIn ? SWT.FocusIn : SWT.FocusOut);
37653764
break;
37663765
}
37673766
}

0 commit comments

Comments
 (0)