Skip to content

Commit

Permalink
directvt#571 WIP: Fix GUI window dragging on Windows8
Browse files Browse the repository at this point in the history
  • Loading branch information
o-sdn-o committed Oct 1, 2024
1 parent defb3ea commit 30aa594
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/netxs/desktopio/console.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ namespace netxs::ui
debug{*this },
paint{ canal, props.vtmode },
conio{ canal, *this },
direct{ props.vtmode == svga::dtvt },
direct{ !!(vtmode & (ui::console::direct | ui::console::gui)) },
local{ true },
yield{ faux },
fullscreen{ faux }
Expand Down
7 changes: 4 additions & 3 deletions src/netxs/desktopio/gui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -701,9 +701,10 @@ namespace netxs::gui
};
for (auto& f : fallback) if ((f.color || f.fixed) && hittest(f.fontface[0].faceinst)) return f;
for (auto& f : fallback) if ((!f.color && !f.fixed) && hittest(f.fontface[0].faceinst)) return f;
static auto empty_font = typeface{};
//todo enqueue font fallback lookup and return empty_font;
if (index_ready <= 0) // Font index is not ready yet.
{
static auto empty_font = typeface{};
if constexpr (debugmode) log("%%Font fallback index is not ready yet", prompt::gui);
index_ready--;
return empty_font;
Expand Down Expand Up @@ -741,7 +742,7 @@ namespace netxs::gui
if ((fontstat[i].s & fontcat::valid) && try_font(fontstat[i].i, faux)) return fallback.back();
}
log("%%No fonts found in the system", prompt::gui);
return fallback.emplace_back(); // Should never happen.
return empty_font; // Should never happen.
}

~fonts()
Expand Down Expand Up @@ -884,7 +885,7 @@ namespace netxs::gui
};

shaper fontshaper{ *this };
fonts(std::list<text>& /*family_names*/, si32 /*cell_height*/)
fonts(std::list<text>& /*family_names*/, si32 /*cell_height*/, auto ...)
{ }
auto& take_font(utfx /*base_char*/)
{
Expand Down

0 comments on commit 30aa594

Please sign in to comment.