equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. |
2 * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Sun designates this |
7 * published by the Free Software Foundation. Sun designates this |
51 void initDispatching() { |
51 void initDispatching() { |
52 XToolkit.awtLock(); |
52 XToolkit.awtLock(); |
53 try { |
53 try { |
54 XToolkit.addEventDispatcher(handle, this); |
54 XToolkit.addEventDispatcher(handle, this); |
55 XlibWrapper.XSelectInput(XToolkit.getDisplay(), handle, |
55 XlibWrapper.XSelectInput(XToolkit.getDisplay(), handle, |
56 XlibWrapper.StructureNotifyMask | XlibWrapper.PropertyChangeMask); |
56 XConstants.StructureNotifyMask | XConstants.PropertyChangeMask); |
57 } |
57 } |
58 finally { |
58 finally { |
59 XToolkit.awtUnlock(); |
59 XToolkit.awtUnlock(); |
60 } |
60 } |
61 container.notifyChildEmbedded(handle); |
61 container.notifyChildEmbedded(handle); |
339 childResized(); |
339 childResized(); |
340 } |
340 } |
341 public void dispatchEvent(XEvent xev) { |
341 public void dispatchEvent(XEvent xev) { |
342 int type = xev.get_type(); |
342 int type = xev.get_type(); |
343 switch (type) { |
343 switch (type) { |
344 case XlibWrapper.PropertyNotify: |
344 case XConstants.PropertyNotify: |
345 handlePropertyNotify(xev); |
345 handlePropertyNotify(xev); |
346 break; |
346 break; |
347 case XlibWrapper.ConfigureNotify: |
347 case XConstants.ConfigureNotify: |
348 handleConfigureNotify(xev); |
348 handleConfigureNotify(xev); |
349 break; |
349 break; |
350 } |
350 } |
351 } |
351 } |
352 |
352 |