[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ff-cvs] libvob/org/nongnu/libvob/impl/gl GLScreen.java
From: |
Tuomas J. Lukka |
Subject: |
[ff-cvs] libvob/org/nongnu/libvob/impl/gl GLScreen.java |
Date: |
Mon, 25 Aug 2003 03:42:52 -0400 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Branch:
Changes by: Tuomas J. Lukka <address@hidden> 03/08/25 03:42:52
Modified files:
org/nongnu/libvob/impl/gl: GLScreen.java
Log message:
Allow null binder
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/impl/gl/GLScreen.java.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
Patches:
Index: libvob/org/nongnu/libvob/impl/gl/GLScreen.java
diff -u libvob/org/nongnu/libvob/impl/gl/GLScreen.java:1.9
libvob/org/nongnu/libvob/impl/gl/GLScreen.java:1.10
--- libvob/org/nongnu/libvob/impl/gl/GLScreen.java:1.9 Mon Aug 18 03:46:15 2003
+++ libvob/org/nongnu/libvob/impl/gl/GLScreen.java Mon Aug 25 03:42:51 2003
@@ -37,7 +37,7 @@
import org.nongnu.libvob.gl.*;
public class GLScreen extends GLRenderingSurface implements GraphicsAPI.Window
{
-public static final String rcsid = "$Id: GLScreen.java,v 1.9 2003/08/18
07:46:15 tjl Exp $";
+public static final String rcsid = "$Id: GLScreen.java,v 1.10 2003/08/25
07:42:51 tjl Exp $";
public static boolean dbg = false;
private static void pa(String s) { System.out.println("GLScreen:: " + s); }
@@ -46,7 +46,8 @@
class GLEventHandler implements GL.EventHandler {
public void repaint() {
if(dbg) pa("GLScreen repaint ");
- binder.repaint();
+ if(binder != null)
+ binder.repaint();
}
public void keystroke(String s) {
if(dbg) pa("GLScreen keyevent "+s);
@@ -72,7 +73,8 @@
if(s.startsWith("Ctrl-Shift-")) {
s = "Alt-" + s.substring("Ctrl-Shift-".length());
}
- binder.keystroke(s);
+ if(binder != null)
+ binder.keystroke(s);
}
boolean didDrag = false;
@@ -101,6 +103,7 @@
public void mouse(int x, int y, int button, int what,
int modifiers) {
+ if(binder == null) return;
// Handle mouse wheel.
if(button == 4 || button == 5) {
int r = (button == 4 ? 1 : -1);
@@ -150,11 +153,13 @@
}
public void timeout(int id) {
- binder.timeout(timeouts.remove(new Integer(id)));
+ if(binder != null)
+ binder.timeout(timeouts.remove(new Integer(id)));
}
public void windowClosed() {
- binder.windowClosed();
+ if(binder != null)
+ binder.windowClosed();
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [ff-cvs] libvob/org/nongnu/libvob/impl/gl GLScreen.java,
Tuomas J. Lukka <=