From ccde06428c0537c7dab519f09572d7181bc104c8 Mon Sep 17 00:00:00 2001 From: Dmitry Sapozhnikov <11535558+o-sdn-o@users.noreply.github.com> Date: Thu, 8 Dec 2022 16:46:16 +0500 Subject: [PATCH] #273 Fix clipboard forwarding --- src/netxs/apps/term.hpp | 13 +++++-- src/netxs/console/console.hpp | 71 ++++++++++++++++++----------------- 2 files changed, 46 insertions(+), 38 deletions(-) diff --git a/src/netxs/apps/term.hpp b/src/netxs/apps/term.hpp index 530c5dadb2..ffe57d0221 100644 --- a/src/netxs/apps/term.hpp +++ b/src/netxs/apps/term.hpp @@ -250,10 +250,15 @@ namespace netxs::app::term auto arg_shadow = view{ arg }; auto term_type = shared::app_class(arg_shadow); arg = arg_shadow; - if (term_type == shared::app_type::normal) window->plugin() - ->plugin() - ->plugin() - ->plugin(); + if (term_type == shared::app_type::normal) + { + window->plugin() + ->plugin() + ->plugin() + ->plugin(); + } + else window->plugin(faux); + auto object = window->attach(ui::fork::ctor(axis::Y)) ->colors(cB.fgc(), cB.bgc()); auto term_stat_area = object->attach(slot::_2, ui::fork::ctor(axis::Y)); diff --git a/src/netxs/console/console.hpp b/src/netxs/console/console.hpp index ae3dde226b..e98d00fcef 100644 --- a/src/netxs/console/console.hpp +++ b/src/netxs/console/console.hpp @@ -4168,7 +4168,7 @@ namespace netxs::console public: focus(base&&) = delete; - focus(base& boss) + focus(base& boss, bool visible = true) : skill{ boss } { boss.SUBMIT_T(tier::general, e2::form::proceed::functor, memo, proc) @@ -4252,43 +4252,46 @@ namespace netxs::console boss.SIGNAL(tier::anycast, e2::form::highlight::any, faux); } }; - boss.SUBMIT_T(tier::release, e2::render::prerender, memo, parent_canvas) + if (visible) { - //todo revise, too many fillings (mold's artifacts) - auto normal = boss.base::color(); - auto title_fg_color = rgba{ 0xFFffffff }; - if (!pool.empty()) + boss.SUBMIT_T(tier::release, e2::render::prerender, memo, parent_canvas) { - auto bright = skin::color(tone::brighter); - auto shadow = skin::color(tone::shadower); - //todo unify, make it more contrast - shadow.alpha(0x80); - bright.fgc(title_fg_color); - shadow.fgc(title_fg_color); - auto fillup = [&](auto bright, auto shadow) - { - parent_canvas.fill(shadow); - }; - if (normal.bgc().alpha()) + //todo revise, too many fillings (mold's artifacts) + auto normal = boss.base::color(); + auto title_fg_color = rgba{ 0xFFffffff }; + if (!pool.empty()) { - auto fuse_bright = [&](cell& c) { c.fuse(normal); c.fuse(bright); }; - auto fuse_shadow = [&](cell& c) { c.fuse(normal); c.fuse(shadow); }; - fillup(fuse_shadow, fuse_bright); - } - else - { - auto only_bright = [&](cell& c) { c.fuse(bright); }; - auto only_shadow = [&](cell& c) { c.fuse(shadow); }; - fillup(only_shadow, only_bright); + auto bright = skin::color(tone::brighter); + auto shadow = skin::color(tone::shadower); + //todo unify, make it more contrast + shadow.alpha(0x80); + bright.fgc(title_fg_color); + shadow.fgc(title_fg_color); + auto fillup = [&](auto bright, auto shadow) + { + parent_canvas.fill(shadow); + }; + if (normal.bgc().alpha()) + { + auto fuse_bright = [&](cell& c) { c.fuse(normal); c.fuse(bright); }; + auto fuse_shadow = [&](cell& c) { c.fuse(normal); c.fuse(shadow); }; + fillup(fuse_shadow, fuse_bright); + } + else + { + auto only_bright = [&](cell& c) { c.fuse(bright); }; + auto only_shadow = [&](cell& c) { c.fuse(shadow); }; + fillup(only_shadow, only_bright); + } + // Draw the border around + auto area = parent_canvas.full(); + auto mark = skin::color(tone::kb_focus); + mark.fgc(title_fg_color); //todo unify, make it more contrast + auto fill = [&](cell& c) { c.fuse(mark); }; + parent_canvas.cage(area, dot_21, fill); } - // Draw the border around - auto area = parent_canvas.full(); - auto mark = skin::color(tone::kb_focus); - mark.fgc(title_fg_color); //todo unify, make it more contrast - auto fill = [&](cell& c) { c.fuse(mark); }; - parent_canvas.cage(area, dot_21, fill); - } - }; + }; + } } };