- // Spin up the root terminal
- root = new TTerminalWidget(getDesktop(), 0, 0,
- getDesktop().getWidth(), getDesktop().getHeight(),
- new TAction() {
- public void DO() {
- // TODO: if root's parent is TSplitPane, call
- // TSplitPane.removeSplit(TWidget).
- if (root != null) {
- root.remove();
- }
+ // TTerminalWidget can request the text-block mouse pointer be
+ // suppressed, but the default TDesktop will ignore it. Let's set a
+ // new TDesktop to pass that mouse pointer visibility option to
+ // TApplication.
+ setDesktop(new TDesktop(this) {
+ @Override
+ public boolean hasHiddenMouse() {
+ TWidget active = getActiveChild();
+ if (active instanceof TTerminalWidget) {
+ return ((TTerminalWidget) active).hasHiddenMouse();