Skip to content

Commit

Permalink
Merge pull request #651 from o-sdn-o/gui-bridge
Browse files Browse the repository at this point in the history
Try to fix clipboard locking
  • Loading branch information
o-sdn-o authored Oct 15, 2024
2 parents 4c7bee5 + c146bf4 commit 2cf564b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/netxs/desktopio/application.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace netxs::app

namespace netxs::app::shared
{
static const auto version = "v0.9.99.21";
static const auto version = "v0.9.99.22";
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
3 changes: 2 additions & 1 deletion src/netxs/desktopio/canvas.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,11 +511,12 @@ namespace netxs
}
}
// argb: Darken the color.
void shadow(byte k = 39)
auto shadow(byte k = 39)
{
chan.r = chan.r < k ? 0x00 : chan.r - k;
chan.g = chan.g < k ? 0x00 : chan.g - k;
chan.b = chan.b < k ? 0x00 : chan.b - k;
return *this;
}
// argb: Lighten the color.
void bright(si32 factor = 1)
Expand Down
6 changes: 4 additions & 2 deletions src/netxs/desktopio/geometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,13 +323,15 @@ namespace netxs
return *this;
}
// rect: Return circumscribed rect.
static constexpr rect unite(rect r1, rect r2)
static constexpr rect unite(rect r1, rect r2, auto... rn)
{
r1.normalize_itself();
r2.normalize_itself();
auto tl = std::min(r1.coor, r2.coor);
auto br = std::max(r1.coor + r1.size, r2.coor + r2.size );
return { tl, br - tl};
auto ur = rect{ tl, br - tl};
if constexpr (sizeof...(rn)) return unite(ur, rn...);
else return ur;
}
// rect: Return true in case of normalized rectangles are overlapped.
constexpr bool overlap(rect r) const
Expand Down
8 changes: 4 additions & 4 deletions src/netxs/desktopio/gui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1920,10 +1920,10 @@ namespace netxs::gui

title titles; // winbase: UI header/footer.
focus wfocus; // winbase: UI focus.
layer master; // winbase: Layer index for Client.
layer blinky; // winbase: Layer index for blinking characters.
layer header; // winbase: Layer index for Header.
layer footer; // winbase: Layer index for Footer.
layer master; // winbase: Layer for Client.
layer blinky; // winbase: Layer for blinking characters.
layer header; // winbase: Layer for Header.
layer footer; // winbase: Layer for Footer.
fonts fcache; // winbase: Font cache.
glyph gcache; // winbase: Glyph cache.
blink blinks; // winbase: Blinking layer state.
Expand Down
3 changes: 2 additions & 1 deletion src/netxs/desktopio/logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
//
#pragma once

#include "ptr.hpp"

#include <vector>
#include <mutex>
#include <functional>
#include <unordered_map>

Expand Down
2 changes: 1 addition & 1 deletion src/netxs/desktopio/system.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2092,7 +2092,7 @@ namespace netxs::os
sync(error, mime::textonly);
return;
}
std::this_thread::yield();
os::sleep(15ms);
}
if (auto seqno = ::GetClipboardSequenceNumber(); seqno != os::clipboard::sequence)
{
Expand Down

0 comments on commit 2cf564b

Please sign in to comment.