mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-14 03:32:22 -05:00
SWT: register error handler early
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1688 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
91c5e51ec4
commit
6c95dd0184
@ -171,6 +171,12 @@ public class SwtGatewayTray implements DavGatewayTrayInterface {
|
|||||||
* Create tray icon and register frame listeners.
|
* Create tray icon and register frame listeners.
|
||||||
*/
|
*/
|
||||||
public void init() {
|
public void init() {
|
||||||
|
// register error handler to avoid application crash on concurrent X access from SWT and AWT
|
||||||
|
try {
|
||||||
|
OS.gdk_error_trap_push();
|
||||||
|
} catch (NoClassDefFoundError e) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
final String systemLookAndFeelClassName = UIManager.getSystemLookAndFeelClassName();
|
final String systemLookAndFeelClassName = UIManager.getSystemLookAndFeelClassName();
|
||||||
try {
|
try {
|
||||||
// workaround for bug when SWT and AWT both try to access Gtk
|
// workaround for bug when SWT and AWT both try to access Gtk
|
||||||
@ -308,11 +314,6 @@ public class SwtGatewayTray implements DavGatewayTrayInterface {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// register error handler to avoid application crash on concurrent X access from SWT and AWT
|
|
||||||
if (systemLookAndFeelClassName.indexOf("gtk") >=0) {
|
|
||||||
OS.gdk_error_trap_push();
|
|
||||||
}
|
|
||||||
|
|
||||||
// display settings frame on first start
|
// display settings frame on first start
|
||||||
if (Settings.isFirstStart()) {
|
if (Settings.isFirstStart()) {
|
||||||
// create frame on first call
|
// create frame on first call
|
||||||
|
Loading…
Reference in New Issue
Block a user