diff options
| author | Mario Torre <neugens@limasoftware.net> | 2008-05-07 14:21:57 +0000 |
|---|---|---|
| committer | Mario Torre <neugens@limasoftware.net> | 2008-05-07 14:21:57 +0000 |
| commit | 13809b05ad9c542eae3af83d671996fb0415bfae (patch) | |
| tree | bac0d94bb7a2d0234774dfb787e26673d630562e /gnu/java/awt/peer/x/XWindowPeer.java | |
| parent | 485d2c4f9dd73e2193c1c40d6f0972a798521a7a (diff) | |
| download | classpath-13809b05ad9c542eae3af83d671996fb0415bfae.tar.gz | |
2008-05-07 Mario Torre <neugens@aicas.com>
* gnu/java/awt/peer/x/XEventPump.java (handleEvent): xEvent.code is now
masked to identify and react to syntetic events.
Added UnmapNotify, DestroyNotify and ClientMessage to the list of event
handled.
* gnu/java/awt/peer/x/XFramePeer.java (getState): initial implementation.
* gnu/java/awt/peer/x/XGraphics2D.java (setPaint): fix NPE, this is a
workaround, the code have to be fixed in a better way.
* gnu/java/awt/peer/x/XWindowPeer.java (getXwindow): new method to allow
access to the underling xwindow.
(standardSelect): add more events for notification.
(XWindowPeer): call set_wm_delete_window to ask the WM to notify us
when a delete event occur.
Diffstat (limited to 'gnu/java/awt/peer/x/XWindowPeer.java')
| -rw-r--r-- | gnu/java/awt/peer/x/XWindowPeer.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gnu/java/awt/peer/x/XWindowPeer.java b/gnu/java/awt/peer/x/XWindowPeer.java index f9184ed1c..985c9af85 100644 --- a/gnu/java/awt/peer/x/XWindowPeer.java +++ b/gnu/java/awt/peer/x/XWindowPeer.java @@ -73,10 +73,12 @@ public class XWindowPeer | Event.POINTER_MOTION_MASK //| Event.RESIZE_REDIRECT_MASK | Event.EXPOSURE_MASK - //| Event.PROPERTY_CHANGE_MASK + | Event.PROPERTY_CHANGE_MASK | Event.STRUCTURE_NOTIFY_MASK + | Event.SUBSTRUCTURE_NOTIFY_MASK | Event.KEY_PRESS_MASK | Event.KEY_RELEASE_MASK + //| Event.VISIBILITY_CHANGE_MASK ; /** @@ -110,8 +112,10 @@ public class XWindowPeer int h = Math.max(window.getHeight(), 1); xwindow = new Window(dev.getDisplay().default_root, x, y, w, h, 0, atts); xwindow.select_input(standardSelect); + dev.getEventPump().registerWindow(xwindow, window); - + xwindow.set_wm_delete_window(); + boolean undecorated; if (awtComponent instanceof Frame) { @@ -303,4 +307,9 @@ public class XWindowPeer XGraphicsDevice dev = XToolkit.getDefaultDevice(); dev.getEventPump().unregisterWindow(xwindow); } + + public Window getXwindow() + { + return xwindow; + } } |
