aboutsummaryrefslogtreecommitdiffstats
path: root/win/rfb_win32/Clipboard.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2024-11-22 13:23:03 +0100
committerPierre Ossman <ossman@cendio.se>2024-11-22 13:23:03 +0100
commit9366d8e54c5ee1c2cfcf333a17b7fd4bdbd13993 (patch)
tree3fd8306bb874e1198a49f9a9ee9a7f417d10da92 /win/rfb_win32/Clipboard.cxx
parentcd52658ff6e73aa1c36f01a8486ba346a869c848 (diff)
parent0af41e7fed978f934f3dc6ca8c99599a212467c5 (diff)
downloadtigervnc-9366d8e54c5ee1c2cfcf333a17b7fd4bdbd13993.tar.gz
tigervnc-9366d8e54c5ee1c2cfcf333a17b7fd4bdbd13993.zip
Merge branch 'master' of https://github.com/madnicendio/tigervnc
Diffstat (limited to 'win/rfb_win32/Clipboard.cxx')
-rw-r--r--win/rfb_win32/Clipboard.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/win/rfb_win32/Clipboard.cxx b/win/rfb_win32/Clipboard.cxx
index 8577df46..2a2be1d5 100644
--- a/win/rfb_win32/Clipboard.cxx
+++ b/win/rfb_win32/Clipboard.cxx
@@ -43,11 +43,11 @@ static LogWriter vlog("Clipboard");
Clipboard::Clipboard()
: MsgWindow("Clipboard"), notifier(nullptr), next_window(nullptr) {
next_window = SetClipboardViewer(getHandle());
- vlog.debug("registered clipboard handler");
+ vlog.debug("Registered clipboard handler");
}
Clipboard::~Clipboard() {
- vlog.debug("removing %p from chain (next is %p)", getHandle(), next_window);
+ vlog.debug("Removing %p from chain (next is %p)", getHandle(), next_window);
ChangeClipboardChain(getHandle(), next_window);
}
@@ -56,26 +56,26 @@ Clipboard::processMessage(UINT msg, WPARAM wParam, LPARAM lParam) {
switch (msg) {
case WM_CHANGECBCHAIN:
- vlog.debug("change clipboard chain (%I64x, %I64x)",
+ vlog.debug("Change clipboard chain (%I64x, %I64x)",
(long long)wParam, (long long)lParam);
if ((HWND) wParam == next_window)
next_window = (HWND) lParam;
else if (next_window != nullptr)
SendMessage(next_window, msg, wParam, lParam);
else
- vlog.error("bad clipboard chain change!");
+ vlog.error("Bad clipboard chain change!");
break;
case WM_DRAWCLIPBOARD:
{
HWND owner = GetClipboardOwner();
if (owner == getHandle()) {
- vlog.debug("local clipboard changed by me");
+ vlog.debug("Local clipboard changed by me");
} else {
- vlog.debug("local clipboard changed by %p", owner);
+ vlog.debug("Local clipboard changed by %p", owner);
if (notifier == nullptr)
- vlog.debug("no clipboard notifier registered");
+ vlog.debug("No clipboard notifier registered");
else
notifier->notifyClipboardChanged(IsClipboardFormatAvailable(CF_UNICODETEXT));
}
@@ -151,18 +151,18 @@ Clipboard::setClipText(const char* text) {
throw rdr::win32_error("unable to set Win32 clipboard", GetLastError());
clip_handle = nullptr;
- vlog.debug("set clipboard");
+ vlog.debug("Set clipboard");
} catch (std::exception& e) {
vlog.debug("%s", e.what());
}
// - Close the clipboard
if (!CloseClipboard())
- vlog.debug("unable to close Win32 clipboard: %lu", GetLastError());
+ vlog.debug("Unable to close Win32 clipboard: %lu", GetLastError());
else
- vlog.debug("closed clipboard");
+ vlog.debug("Closed clipboard");
if (clip_handle) {
- vlog.debug("freeing clipboard handle");
+ vlog.debug("Freeing clipboard handle");
GlobalFree(clip_handle);
}
}