Skip to content
4 changes: 2 additions & 2 deletions doc/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ Notes
<gridsize=""/> <!-- Initial window grid size as "width,height" in text cells. If empty or "0,0", the OS window manager determines the size. -->
<wincoor=""/> <!-- Initial window coordinates "x,y" (top-left corner in physical pixels). If empty, the OS window manager determines the position. -->
<winstate="normal"/> <!-- Initial window state: "normal" | "maximized" | "minimized". -->
<blinkrate=400ms/> <!-- Cursor/text blink rate (SGR 5/6). Set to zero to disable blinking. -->
<blinkrate=400ms/> <!-- Text blink rate (SGR 5/6). Set to zero to disable blinking. -->
<quality=80/> <!-- 1-100: JPEG compression quality for raster graphics preview. -->
<fonts> <!-- Ordered font fallback list. Other available system fonts will be loaded dynamically. -->
<font*/> <!-- Clear previously defined fonts to start a new list. -->
Expand Down Expand Up @@ -984,7 +984,7 @@ Notes
<height=1/> <!-- Reserved space at the top of the desktop. -->
</panel>
<background> <!-- Desktop background settings. -->
<color fgc=whitedk bgc= #00007fFF/> <!-- Background color. -->
<color fgc=whitedk bgc= #00004080/> <!-- Desktop background color. -->
<tile=""/> <!-- Optional: Truecolor ANSI-art for the background. -->
</background>
</desktop>
Expand Down
2 changes: 1 addition & 1 deletion src/netxs/desktopio/application.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace netxs::app

namespace netxs::app::shared
{
static const auto version = "v2026.09.20";
static const auto version = "v2026.09.23";
static const auto repository = "https://github.com/directvt/vtm";
static const auto usr_config = "~/.config/vtm/settings.xml"s;
static const auto sys_config = "/etc/vtm/settings.xml"s;
Expand Down
2 changes: 1 addition & 1 deletion src/netxs/desktopio/canvas.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ namespace netxs
a{ c.chan.a * inv_255 }
{ }

operator argb() const { return argb{ r, g, b, a }; }
operator argb () const { return argb{ r, g, b, a }; }

bool operator > (auto n) const { return r > n || g > n || b > n || a > n; }
auto operator / (auto n) const { return irgb{ r / n, g / n, b / n, a / n }; } // 10% faster than divround.
Expand Down
19 changes: 14 additions & 5 deletions src/netxs/desktopio/controls.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,21 @@ namespace netxs
else if constexpr (std::is_same_v<std::decay_t<T>, twod>) return twod{ ::lua_tonumber(lua, idx), ::lua_tonumber(lua, idx + 1) };
else if constexpr (std::is_same_v<std::decay_t<T>, sptr<ui::base>>)
{
if (auto ptr = (ui::base*)::lua_touserdata(lua, idx)) // Get ui::base*.
{
auto object_ptr = ptr->This();
return object_ptr;
auto object_ptr = sptr<ui::base>{};
if (type == LUA_TTABLE)
{
auto abs_idx = ::lua_absindex(lua, idx);
::lua_pushstring(lua, "__self");
auto raw_type = ::lua_rawget(lua, abs_idx); // Push ptr to stack.
if (raw_type == LUA_TLIGHTUSERDATA)
if (auto ptr = (ui::base*)::lua_touserdata(lua, -1))
{
object_ptr = ptr->This();
}
//luna::vtmlua_log(lua);
::lua_pop(lua, 1); // Pop ptr from stack.
}
return sptr<ui::base>{};
return object_ptr;
}
}
if constexpr (is_string_v || is_cstring_v) return text{ fallback };
Expand Down
8 changes: 4 additions & 4 deletions src/netxs/desktopio/generics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ namespace netxs::generics
friend auto operator + (iter i, si32 n) { i += n; return i; }
friend auto operator + (si32 n, iter i) { i += n; return i; }
friend auto operator - (iter i, si32 n) { i -= n; return i; }
reference operator[](difference_type n) const { return *(*this + (si32)n); }
reference operator [] (difference_type n) const { return *(*this + (si32)n); }
};

ring(si32 ring_size, si32 grow_by = 0, si32 grow_mx = 0)
Expand Down Expand Up @@ -1137,9 +1137,9 @@ namespace netxs::generics
handle_type h;
bool done;

void operator++() { h.resume(); done = h.done(); }
auto& operator*() const { return *(h.promise().current_value); }
auto operator!=(iterator const& other) const { return done != other.done; }
void operator ++ () { h.resume(); done = h.done(); }
auto& operator * () const { return *(h.promise().current_value); }
auto operator != (iterator const& other) const { return done != other.done; }
};

auto begin()
Expand Down
6 changes: 3 additions & 3 deletions src/netxs/desktopio/geometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ namespace netxs
constexpr auto operator ~ () const { return xy2d{ y, x }; }

//In C++11, signed shift left of a negative number is always undefined
//void operator>>= (T i) { x >>=i; y >>=i; }
//void operator<<= (T i) { x <<=i; y <<=i; }
//void operator >>= (T i) { x >>=i; y >>=i; }
//void operator <<= (T i) { x <<=i; y <<=i; }
//
//In C++11, signed shift left of a negative number is always undefined
//xy2d operator << (T i) const { return { x << i, y << i }; }
Expand Down Expand Up @@ -753,7 +753,7 @@ namespace netxs
base _data;
rect _area;
rect _clip;
auto length() const { return _data.length(); }
auto length() const { return _data.size(); }
auto begin() { return _data.begin(); }
auto begin() const { return _data.begin(); }
auto data() { return _data.data(); }
Expand Down
Loading