mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-30 07:57:59 +01:00
Synchronize access to GlWindow. This seems to help with freezing
This commit is contained in:
parent
a5b0e187a0
commit
b7d17d594c
1 changed files with 3 additions and 3 deletions
|
@ -37,7 +37,7 @@ public class GLWindow extends DropTarget {
|
||||||
/**
|
/**
|
||||||
* Gets or creates the current GLWindow context.
|
* Gets or creates the current GLWindow context.
|
||||||
*/
|
*/
|
||||||
public static GLWindow current() {
|
public static synchronized GLWindow current() {
|
||||||
if (instance == null) {
|
if (instance == null) {
|
||||||
instance = new GLWindow();
|
instance = new GLWindow();
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ public class GLWindow extends DropTarget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clearDropTargetListener() {
|
public synchronized void clearDropTargetListener() {
|
||||||
if (ready && dropListener != null) {
|
if (ready && dropListener != null) {
|
||||||
removeDropTargetListener(dropListener);
|
removeDropTargetListener(dropListener);
|
||||||
dropListener = null;
|
dropListener = null;
|
||||||
|
@ -226,7 +226,7 @@ public class GLWindow extends DropTarget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDropTargetListener(DropTargetListener dtl) {
|
public synchronized void setDropTargetListener(DropTargetListener dtl) {
|
||||||
if (!ready) {
|
if (!ready) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue