projects
/
org.ibex.core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d848b6f
)
mac-specific AWT hacks, reenable resize
author
adam
<adam@megacz.com>
Sun, 23 Jan 2005 21:15:26 +0000
(21:15 +0000)
committer
adam
<adam@megacz.com>
Sun, 23 Jan 2005 21:15:26 +0000
(21:15 +0000)
darcs-hash:
20050123211526
-5007d-
bc448511f8f3cc7d2c4825cccf232312043bdc13
.gz
src/org/ibex/plat/AWT.java
patch
|
blob
|
history
diff --git
a/src/org/ibex/plat/AWT.java
b/src/org/ibex/plat/AWT.java
index
f3f53d2
..
ac10499
100644
(file)
--- a/
src/org/ibex/plat/AWT.java
+++ b/
src/org/ibex/plat/AWT.java
@@
-302,7
+302,7
@@
public class AWT extends JVM {
public void setIcon(Picture i) { if (frame != null) frame.setIconImage(((AWTPicture)i).i); }
public void _setSize(int width, int height) {
g = null;
public void setIcon(Picture i) { if (frame != null) frame.setIconImage(((AWTPicture)i).i); }
public void _setSize(int width, int height) {
g = null;
- //window.setSize(width + (insets.left + insets.right), height + (insets.top + insets.bottom));
+ window.setSize(width + (insets.left + insets.right), height + (insets.top + insets.bottom));
}
public void setInvisible(boolean b) { window.setVisible(!b); }
protected void _setMinimized(boolean b) { if (Log.on) Log.info(this, "JDK 1.1 platforms cannot minimize or unminimize windows"); }
}
public void setInvisible(boolean b) { window.setVisible(!b); }
protected void _setMinimized(boolean b) { if (Log.on) Log.info(this, "JDK 1.1 platforms cannot minimize or unminimize windows"); }
@@
-370,6
+370,12
@@
public class AWT extends JVM {
super.render();
}
super.render();
}
+ Insets getInsets() {
+ Insets ret = window.getInsets();
+ if (System.getProperty("os.name", "").equals("Mac OS X")) ret.bottom = -1 * ret.top;
+ return ret;
+ }
+
AWTSurface(Box root, boolean framed) {
super(root);
try {
AWTSurface(Box root, boolean framed) {
super(root);
try {
@@
-382,7
+388,7
@@
public class AWT extends JVM {
if (Log.on) Log.info(this, e);
}
if (Log.on) Log.info(this, e);
}
- insets = window.getInsets();
+ insets = getInsets();
window.addMouseListener(this);
window.addKeyListener(this);
window.addMouseListener(this);
window.addKeyListener(this);
@@
-448,14
+454,14
@@
public class AWT extends JVM {
public void componentResized(ComponentEvent e) {
// we have to periodically do this; I don't know why
public void componentResized(ComponentEvent e) {
// we have to periodically do this; I don't know why
- insets = window.getInsets();
+ insets = getInsets();
componentResized(window.getWidth() - insets.left - insets.right, window.getHeight() - insets.top - insets.bottom);
}
public void componentResized(int newwidth, int newheight) {
SizeChange(newwidth, newheight);
componentResized(window.getWidth() - insets.left - insets.right, window.getHeight() - insets.top - insets.bottom);
}
public void componentResized(int newwidth, int newheight) {
SizeChange(newwidth, newheight);
- //if (newwidth > root.width) Dirty(root.width, 0, newwidth-root.width, newheight);
- //if (newheight > root.height) Dirty(0, root.height, newwidth, newheight-root.height);
+ if (newwidth > root.width) Dirty(root.width, 0, newwidth-root.width, newheight);
+ if (newheight > root.height) Dirty(0, root.height, newwidth, newheight-root.height);
Refresh();
}
Refresh();
}