git://git.nikiroo.be
/
fanfix-jexer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72b6bd9
)
#34 call onResize() when window size is changed
author
Kevin Lamonte
<kevin.lamonte@gmail.com>
Tue, 24 Apr 2018 21:56:47 +0000
(17:56 -0400)
committer
Kevin Lamonte
<kevin.lamonte@gmail.com>
Tue, 24 Apr 2018 21:56:47 +0000
(17:56 -0400)
src/jexer/TApplication.java
patch
|
blob
|
blame
|
history
diff --git
a/src/jexer/TApplication.java
b/src/jexer/TApplication.java
index 7f491a5ba712dad54431dcea705128cc1eab0169..96dad6cc0b0cece1541d43dccab333b813f233d0 100644
(file)
--- a/
src/jexer/TApplication.java
+++ b/
src/jexer/TApplication.java
@@
-2063,6
+2063,9
@@
public class TApplication implements Runnable {
}
TWindow w = sorted.get(i);
+ int oldWidth = w.getWidth();
+ int oldHeight = w.getHeight();
+
w.setX(logicalX * newWidth);
w.setWidth(newWidth);
if (i >= ((a - 1) * b)) {
@@
-2072,6
+2075,12
@@
public class TApplication implements Runnable {
w.setY((logicalY * newHeight1) + 1);
w.setHeight(newHeight1);
}
+ if ((w.getWidth() != oldWidth)
+ || (w.getHeight() != oldHeight)
+ ) {
+ w.onResize(new TResizeEvent(TResizeEvent.Type.WIDGET,
+ w.getWidth(), w.getHeight()));
+ }
}
}
}