Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
d77e972
Minor edits
o-sdn-o Sep 11, 2025
2b75c7b
#86 WIP: Revise taskbar layout
o-sdn-o Sep 15, 2025
adc8c0d
#86 WIP: Don't reveal mouse on keypress if mouse is out
o-sdn-o Sep 15, 2025
4b36078
#86 WIP: Revise taskbar layout
o-sdn-o Sep 16, 2025
8f8f9e7
#86 WIP: Unfold taskbar on focus (+focus selected menu item at startup)
o-sdn-o Sep 16, 2025
72ca488
#86 WIP: Taskbar focus (fold/drop_bttn)
o-sdn-o Sep 16, 2025
011d340
#86 WIP: Don't focus taskbar items by mouse click
o-sdn-o Sep 17, 2025
92a2ddd
Fix mouse buttons sticking when dragging a GUI window
o-sdn-o Sep 17, 2025
dbf937d
#86 WIP: Don't cache gear.handled on key preview
o-sdn-o Sep 17, 2025
bb28a08
#86 WIP: Allow interrupt key processing
o-sdn-o Sep 17, 2025
1643e7d
#86 WIP: Implement vtm.taskbar.ActivateItem()
o-sdn-o Sep 18, 2025
8991867
#86 WIP: Make the rest taskbar UI elements focusable
o-sdn-o Sep 18, 2025
3bb1fcb
#86 WIP: Implement vtm.taskbar.ChangeWidthByStep(delta)
o-sdn-o Sep 18, 2025
9d7e4b2
#86 WIP: Implement vtm.taskbar.FocusTop/End()
o-sdn-o Sep 18, 2025
9c90148
#86 WIP: Implement taskbar items activation
o-sdn-o Sep 18, 2025
861ea71
#86 WIP: Implement vtm.taskbar.FocusByItem() (test, just iterate visu…
o-sdn-o Sep 18, 2025
e290aba
#86 WIP: Define keyboard focus switching logic
o-sdn-o Sep 19, 2025
af95369
#86 WIP: Define keyboard focus switching logic (xml+docs)
o-sdn-o Sep 19, 2025
9a99dff
#86 WIP: Define keyboard focus switching logic (vtm.taskbar.GetHeight())
o-sdn-o Sep 19, 2025
edf7216
#86 WIP: Implement vtm.taskbar.GetFocusedWeight()
o-sdn-o Sep 19, 2025
e5750dc
#86 WIP: Reveal the app close button on focus
o-sdn-o Sep 19, 2025
784f782
#86 WIP: Unfold app list on focus
o-sdn-o Sep 19, 2025
44c8f1e
#86 WIP: Make the shutdown button red on focus
o-sdn-o Sep 19, 2025
9317fa7
#86 WIP: Try to figure out how to iterate over a visual tree efficiently
o-sdn-o Sep 19, 2025
fee6e05
Try to fix dtvt::vtty:writer thread sync
o-sdn-o Sep 20, 2025
fba4a5a
#86 WIP: Jump over hidden taskbar items when moving focus
o-sdn-o Sep 20, 2025
858802f
#86 WIP: Fix visual tree iteration
o-sdn-o Sep 20, 2025
3ecfec6
#86 WIP: Revise vtm.taskbar.FocusNextItem()
o-sdn-o Sep 20, 2025
1c9876a
#86 WIP: Notify to scroll to focused item
o-sdn-o Sep 21, 2025
02b74c2
#86 WIP: Revise vtm.taskbar.FocusTop/End()
o-sdn-o Sep 21, 2025
ad9865c
#86 WIP: Fix vtm.desktop lua reference (workaround)
o-sdn-o Sep 21, 2025
04b0122
Refresh the taskbar user list on user disconnection
o-sdn-o Sep 21, 2025
b89d44a
#86 WIP: Fix vtm.desktop lua reference (workaround)
o-sdn-o Sep 21, 2025
6c1c894
#86 WIP: Fix vtm.desktop lua reference (workaround)
o-sdn-o Sep 21, 2025
2159fd5
#86 WIP: Fix taskbar item activation for running app
o-sdn-o Sep 21, 2025
d3cd4cc
Fix apple clang complaints
o-sdn-o Sep 22, 2025
fc80f29
Fix gcc complaints
o-sdn-o Sep 22, 2025
58f25b8
Fix apple clang complaints
o-sdn-o Sep 22, 2025
120bc00
#86 WIP: Implement backward traversal of the visual tree
o-sdn-o Sep 22, 2025
844bea4
v2025.09.22
o-sdn-o Sep 22, 2025
6fccdf7
#393: Fix Lua scripting default arguments
o-sdn-o Sep 22, 2025
c0570b8
#393: Allow passing floating values as integers
o-sdn-o Sep 22, 2025
93e8ea6
Update docs
o-sdn-o Sep 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ file(GLOB lua_src CONFIGURE_DEPENDS ${lua_SOURCE_DIR}/src/*.c)
list(REMOVE_ITEM lua_src ${lua_SOURCE_DIR}/src/lua.c ${lua_SOURCE_DIR}/src/luac.c)
add_library(lua ${lua_src})
target_include_directories(lua PUBLIC ${lua_SOURCE_DIR}/src)
target_sources(lua PRIVATE ${lua_src})
target_sources(lua PUBLIC ${lua_src})

add_executable(vtm "src/vtm.cpp" ${WIN32_RESOURCES})
# add_executable(term "src/netxs/apps/term.cpp")
Expand Down
72 changes: 65 additions & 7 deletions doc/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ Standard object names
| | | `vtm.applet.Restore()` | Restore applet window.
|`gear` | User mouse and keyboard | `vtm.gear.IsKeyRepeated() -> bool` | Returns true if the keyboard event is a key-repeat generated event.
| | | `vtm.gear.SetHandled()` | Set that the event is processed, and stop further processing.
| | | `vtm.gear.Interrupt()` | Interrupt the key event processing.
| | | `vtm.gear.RepeatWhilePressed(ref ObjectId)` | Capture the mouse by ObjectId and trigger the mouse button pressed event to repeat while pressed.
| | | `vtm.gear.Focus(ref ObjectId) -> bool` | Set input focus to the object. Returns true if focus is already set.
|`desktop` | Desktop environment | `vtm.desktop.Cleanup(bool b)` | Clean up temporary internal structures of the desktop environment and optionally report the state of registry objects.
Expand All @@ -599,6 +600,13 @@ Standard object names
| | | `vtm.desktop.Disconnect()` | Disconnect the current desktop user.
| | | `vtm.desktop.Run({ lua_table })` | Run the specified applet.
| | | `vtm.desktop.FocusNextWindow(int n)` | Set focus to the next (n=1) or previous (n=-1) desktop window.
|`taskbar` | Desktop taskbar | `vtm.taskbar.ActivateItem()` | Activate the focused UI element on the taskbar.
| | | `vtm.taskbar.FocusNextItem(si32 n, si32 min_w, si32 max_w = si32max)` | Move to the next(n>0)/prev(n<0) focusable element with `min_w` <= weight <= `max_w`, skipping (std::abs(n)-1) elements with `min_w` <= weight <= `max_w` and all elements with weight < `min_w`.
| | | `vtm.taskbar.FocusTop()` | Set focus to the first (top) focusable UI element among the elements on the taskbar.
| | | `vtm.taskbar.FocusEnd()` | Set focus to the last (bottom) focusable UI element among the elements on the taskbar.
| | | `vtm.taskbar.ChangeWidthByStep(int n)` | Change the taskbar width by step n.
| | | `vtm.taskbar.GetFocusedWeight() -> si32 w` | Get the weight of the focused taskbar element.
| | | `vtm.taskbar.GetHeight() -> si32 h1, h2` | Get taskbar height (h1) and line height (h2).
|`tile` | Tiling window manager | `vtm.tile.FocusNextPaneOrGrip(int n)` | Set focus to the next (n=1) or previous (n=-1) tile's pane or pane splitter.
| | | `vtm.tile.FocusNextPane(int n)` | Set focus to the next (n=1) or previous (n=-1) tile's pane.
| | | `vtm.tile.FocusNextGrip(int n)` | Set focus to the next (n=1) or previous (n=-1) pane splitter.
Expand Down Expand Up @@ -912,7 +920,7 @@ Notes
<height=1/> <!-- Desktop space reserved on top. -->
</panel>
<background> <!-- Desktop background. -->
<color fgc=whitedk bgc= #00007f80/> <!-- Desktop background color. -->
<color fgc=whitedk bgc= #00003f80/> <!-- Desktop background color. -->
<tile=""/> <!-- Truecolor ANSI-art can be used here. -->
</background>
</desktop>
Expand Down Expand Up @@ -1021,12 +1029,8 @@ Notes
<script=RollFontsForward on="Ctrl+Shift+F12" />
<script=ResetWheelAccumulator on="preview:-Ctrl" />
<script=ToggleDebugOverlay on="Space-Backspace | Backspace-Space"/>
<script=FocusTaskBar on="Esc+F1" />
<script=FocusTaskBar on="Alt+Z" />
<script=FocusTaskbar on="Esc+F1 | Alt+Z" />
</gate>
<taskbar script*> <!-- Taskbar bindings. -->
<script=FocusTaskBar on="-Esc"/>
</taskbar>
<desktop script*> <!-- Desktop bindings. -->
<script=FocusPrevWindow on="Ctrl+PageUp" />
<script=FocusNextWindow on="Ctrl+PageDown"/>
Expand All @@ -1035,6 +1039,22 @@ Notes
<script=RunApplication on="Alt+Shift+N" />
<script=RunInfoPage on="Esc+I" />
</desktop>
<taskbar=desktop script*> <!-- Taskbar bindings (including desktop bindings). -->
<script=FocusTaskbar on="-Esc | -Alt"/>
<script=FocusLeftTaskbarItem on="LeftArrow"/>
<script=FocusRightTaskbarItem on="RightArrow"/>
<script=FocusPrevTaskbarItem on="UpArrow"/>
<script=FocusNextTaskbarItem on="DownArrow"/>
<script=FocusPrevTaskbarPage on="PageUp"/>
<script=FocusNextTaskbarPage on="PageDown"/>
<script=FocusPrevTaskbarGroup on="Shift+Tab"/>
<script=FocusNextTaskbarGroup on="Tab"/>
<script=FocusTaskbarTop on="Home"/>
<script=FocusTaskbarEnd on="End"/>
<script=DecreaseTaskbarWidth on="Ctrl+LeftArrow"/>
<script=IncreaseTaskbarWidth on="Ctrl+RightArrow"/>
<script=ActivateTaskbarItem on="Space | Enter"/>
</taskbar>
<applet script*> <!-- Applet bindings. -->
<script=AlwaysOnTopApplet on="Esc+T" />
<script=CloseApplet on="Esc+W" />
Expand Down Expand Up @@ -1848,7 +1868,7 @@ Notes
<RunInfoPage ="vtm.desktop.Run({ title='Info-page', hidden=true, label='Info', type='info' });"/> <!-- Run Info-page. -->
<FocusPrevWindow ="vtm.desktop.FocusNextWindow(-1);"/> <!-- Switch focus to the prev window. -->
<FocusNextWindow ="vtm.desktop.FocusNextWindow( 1);"/> <!-- Switch focus to the next window. -->
<FocusTaskBar ="if (vtm.gear.Focus(vtm.taskbar)) then vtm.gear.Focus(vtm.desktop) end;"/> <!-- Set input focus to the taskbar or return focus back to the desktop. -->
<FocusTaskbar ="if (vtm.gear.Focus(vtm.taskbar)) then vtm.gear.Focus(vtm.desktop); vtm.gear.Interrupt(); end;"/> <!-- Set input focus to the taskbar or return focus back to the desktop. -->

<AlwaysOnTopApplet ="vtm.applet.ZOrder(vtm.applet.ZOrder()==1 and 0 or 1);"/> <!-- Request to toggle z-order window attribute. -1: backmost; 0: plain; 1: topmost. -->
<CloseApplet ="vtm.applet.Close();"/> <!-- Request to Close window. -->
Expand Down Expand Up @@ -1934,5 +1954,43 @@ Notes
<TerminalStdioLog ="vtm.terminal.LogMode(vtm.terminal.LogMode()==1 and 0 or 1);"/> <!-- Toggle stdin/stdout logging. -->
<TerminalRestart ="vtm.terminal.Restart();"/> <!-- Terminate runnning console apps and restart current session. -->
<IgnoreAltbuf ="if (vtm.terminal.AltbufMode()) then vtm.terminal.ForwardKeys(); return; end;"/> <!-- Forward the last key event to the terminal if the alternate buffer is active. -->

<!-- Taskbar focus layout.
Splitter(not focusable)
AppGroup(weight=100) CollapseButton(10) CloseAllButton(10)
RunningApp(50) CloseButton(10)
...
AppGroup(100)
UserListHeader(not focusable) UserListCollapseButton(100)
UserLabel(50)
...
UserLabel(50)
DisconnectButton(100) ShutdownButton(10)
Keyboard focus switching logic.
DownArrow Move to the next focusable element with a weight of at least 50, skipping elements with a lower weight.
UpArrow Move to the prev focusable element with a weight of at least 50, skipping elements with a lower weight.
RightArrow Move to the next focusable element with a weight of at least 10, skipping elements with a lower weight
LeftArrow Move to the prev focusable element with a weight no less than the CURRENT one, skipping elements with a lower weight.
Tab Move to the next focusable element with a weight of at least 100, skipping elements with a lower weight.
Shift+Tab Move to the prev focusable element with a weight of at least 100, skipping elements with a lower weight.
PageDown Move to the next focusable element skipping N elements with weight >= 50, where N=taskbar_height/(2*line_height).
PageUp Move to the prev focusable element skipping N elements with weight >= 50, where N=taskbar_height/(2*line_height).
Home Move to the first(top) focusable element with a weight of at least 100 in the visual tree.
End Move to the last(bottom) focusable element with a weight of at least 100 in the visual tree.
vtm.taskbar.FocusNextItem(si32 n, si32 min_w, si32 max_w = si32max); // Move to the next(n>0)/prev(n<0) focusable element with `min_w` <= weight <= `max_w`, skipping (std::abs(n)-1) elements with `min_w` <= weight <= `max_w` and all elements with weight < `min_w`.
-->
<FocusLeftTaskbarItem ="local w=vtm.taskbar.GetFocusedWeight(); vtm.taskbar.FocusNextItem(-1, w);"/>
<FocusRightTaskbarItem ="vtm.taskbar.FocusNextItem( 1, 10, 10);"/>
<FocusPrevTaskbarItem ="vtm.taskbar.FocusNextItem(-1, 50);"/>
<FocusNextTaskbarItem ="vtm.taskbar.FocusNextItem( 1, 50);"/>
<FocusPrevTaskbarPage ="local h1,h2=vtm.taskbar.GetHeight(); vtm.taskbar.FocusNextItem(-h1/(2*h2), 50);"/>
<FocusNextTaskbarPage ="local h1,h2=vtm.taskbar.GetHeight(); vtm.taskbar.FocusNextItem( h1/(2*h2), 50);"/>
<FocusPrevTaskbarGroup ="vtm.taskbar.FocusNextItem(-1, 100);"/>
<FocusNextTaskbarGroup ="vtm.taskbar.FocusNextItem( 1, 100);"/>
<FocusTaskbarTop ="vtm.taskbar.FocusTop();"/>
<FocusTaskbarEnd ="vtm.taskbar.FocusEnd();"/>
<DecreaseTaskbarWidth ="vtm.taskbar.ChangeWidthByStep(-1);"/>
<IncreaseTaskbarWidth ="vtm.taskbar.ChangeWidthByStep(1);"/>
<ActivateTaskbarItem ="vtm.taskbar.ActivateItem();"/>
</Scripting>
```
18 changes: 17 additions & 1 deletion doc/user-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,23 @@
</tr>
</thead>
<tbody>
<tr><th>Esc+F1 ¹ (Alt+Z on non-Windows platforms)</th> <td colspan="9">Focus taskbar</td></tr>
<tr><th>Esc+F1 ¹ / Alt+Z</th> <td colspan="9">Focus taskbar</td></tr>

<tr><th>Esc | Alt</th> <td colspan="3">Unfocus taskbar</td><td colspan="6"></td></tr>
<tr><th>LeftArrow</th> <td colspan="3">Focus left item</td><td colspan="6"></td></tr>
<tr><th>RightArrow</th> <td colspan="3">Focus right item</td><td colspan="6"></td></tr>
<tr><th>UpArrow</th> <td colspan="3">Focus the previous item</td><td colspan="6"></td></tr>
<tr><th>DownArrow</th> <td colspan="3">Focus the next item</td><td colspan="6"></td></tr>
<tr><th>PageUp</th> <td colspan="3">Move focus half a page up</td><td colspan="6"></td></tr>
<tr><th>PageDown</th> <td colspan="3">Move focus half a page down</td><td colspan="6"></td></tr>
<tr><th>Shift+Tab</th> <td colspan="3">Focus the previous item group</td><td colspan="6"></td></tr>
<tr><th>Tab</th> <td colspan="3">Focus the next item group</td><td colspan="6"></td></tr>
<tr><th>Home</th> <td colspan="3">Move focus to the top</td><td colspan="6"></td></tr>
<tr><th>End</th> <td colspan="3">Move focus to the bottom</td><td colspan="6"></td></tr>
<tr><th>Ctrl+LeftArrow</th> <td colspan="3">Decrease taskbar width</td><td colspan="6"></td></tr>
<tr><th>Ctrl+RightArrow</th> <td colspan="3">Increase taskbar width</td><td colspan="6"></td></tr>
<tr><th>Space | Enter</th> <td colspan="3">Activate focused item</td><td colspan="6"></td></tr>

<tr><th>Esc+I</th> <td colspan="9">Open Info-page</td></tr>
<tr><th>Ctrl-Alt (Alt+Shift+B on non-Windows platforms)</th><td colspan="9">Toggle exclusive keyboard mode</td></tr>
<tr><th>Alt+Shift+N</th> <td colspan="9">Run app</td></tr>
Expand Down
Loading
Loading