Skip to content

Commit

Permalink
Remove reflection hack to set WM_CLASS (#4034)
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-beetz authored and Siedlerchr committed May 15, 2018
1 parent 468cce9 commit 3a0474d
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/main/java/org/jabref/gui/GUIGlobals.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

import java.awt.Color;
import java.awt.Font;
import java.awt.Toolkit;

import org.jabref.Globals;
import org.jabref.gui.keyboard.EmacsKeyBindings;
import org.jabref.logic.l10n.Localization;
import org.jabref.logic.util.OS;
import org.jabref.preferences.JabRefPreferences;

import org.slf4j.Logger;
Expand Down Expand Up @@ -61,19 +59,6 @@ public static void init() {

GUIGlobals.currentFont = new Font(Globals.prefs.get(JabRefPreferences.FONT_FAMILY),
Globals.prefs.getInt(JabRefPreferences.FONT_STYLE), Globals.prefs.getInt(JabRefPreferences.FONT_SIZE));

// Set WM_CLASS using reflection for certain Un*x window managers
if (!OS.WINDOWS && !OS.OS_X) {
try {
Toolkit xToolkit = Toolkit.getDefaultToolkit();
java.lang.reflect.Field awtAppClassNameField = xToolkit.getClass().getDeclaredField("awtAppClassName");
awtAppClassNameField.setAccessible(true);
awtAppClassNameField.set(xToolkit, "org-jabref-JabRefMain");
} catch (Exception e) {
// ignore any error since this code only works for certain toolkits
}
}

}

public static void setFont(int size) {
Expand Down

0 comments on commit 3a0474d

Please sign in to comment.