Comments (4)
I was able to change between windows using
Ctrl + Tab
, the problem was only when the mouse passed over the console after the first launch, which is the bug I described
I know that through the keyboard you can switch between windows, but the bug was due to an improper focus in the Application.Begin
method and the CanFocus
property. Please test with PR #3548 and check if it is working properly. Thanks.
from terminal.gui.
Thank you for presenting this issue. From what I noticed there is a contradiction in how views are drawn and how views are focused.
The FocusFirst
instruction is trying to focus on the first focusable view but the drawing is drawing the last visible view which will be overlapped. It turns out that the most focused view does not correspond to the focused superview and this is incorrect.
from terminal.gui.
I changed the code to allowing toggling between windows.
Application.Init ();
var top = new Toplevel ();
foreach (var arg in new [] { "1", "2" })
{
var win = new Window ()
{
Title = arg,
};
var editor = new TextView ()
{
Width = Dim.Fill (),
Height = Dim.Fill (),
Text = arg
};
win.Add (editor);
top.Add (win);
}
MenuItem mi = null;
View focused = null;
var menuBar = new MenuBar
{
Menus =
[
new()
{
Title = "Foo",
Children =
[
mi = new()
{
Title = "Set win 1 CanFocus to false",
Action = () =>
{
if (top.Focused.Title == "1")
{
if (focused is null)
{
focused = top.Focused;
}
else if (focused != top.Focused)
{
focused.CanFocus = true;
focused = top.Focused;
}
focused.CanFocus = false;
mi.Title = "Set win 2 CanFocus to false";
}
else
{
focused.CanFocus = true;
focused = top.Focused;
focused.CanFocus = false;
mi.Title = "Set win 1 CanFocus to false";
}
}
},
]
},
],
};
top.Add (menuBar);
Application.Run (top);
top.Dispose ();
Application.Shutdown ();
from terminal.gui.
I changed the code to allowing toggling between windows.
I was able to change between windows using Ctrl + Tab
, the problem was only when the mouse passed over the console after the first launch, which is the bug I described
from terminal.gui.
Related Issues (20)
- Make the PowerShell modules arch-agnostic for now HOT 3
- Fail gracefully for impossible hosts HOT 4
- Rename `StateChangedEventArgs<T>` to `CancelEventArgs<T>` HOT 63
- A more reliable means of avoiding errors caused by stdin or stdout redirection
- (Internal) Better regexes for TODO-list items
- Clicking the StatusBar causes the event to be executed more than once. HOT 1
- `Dim.Auto (Content)` is broken if subviews use `Pos.Center` etc... HOT 3
- `StatusBar` should clip, not overwrite, when last item doesn't fit HOT 1
- `TextField` prevents default `Button` from working in some cases HOT 7
- Some more prep for revamped sourcegens and CI HOT 2
- Enabling trim mode breaks program at runtime (v2 only) HOT 16
- v1 - Example.cs does not work HOT 5
- `Button` with `ShadowStyle.Opaque` is broken HOT 5
- `DateField` unit tests fail on `macos.latest` HOT 4
- The exclusion of `.orig` files in `.gitignore` is no longer working
- Color ToString returns "Red" instead of "# HOT 4
- Release v1.17.1 HOT 1
- Localization not working on self-contained single-file. HOT 19
- Post-V2: Rewrite `TextFormatter`
- Feedback: Example HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terminal.gui.