summaryrefslogtreecommitdiff
path: root/vdagent/vdagent.cpp
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2013-07-17 20:12:37 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2013-07-17 20:45:21 +0200
commit3bf46bc2b2a041dcc278a881e5822643a9e4604d (patch)
treeb8f1e8dbcb6b4cc51a1a63d43fb8e3b9ee73dead /vdagent/vdagent.cpp
parent846a787c9f4049ca957b09e9a3f3b02ed771873b (diff)
dos2unix
Diffstat (limited to 'vdagent/vdagent.cpp')
-rw-r--r--vdagent/vdagent.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/vdagent/vdagent.cpp b/vdagent/vdagent.cpp
index e5567f3..fd084a8 100644
--- a/vdagent/vdagent.cpp
+++ b/vdagent/vdagent.cpp
@@ -450,7 +450,7 @@ void VDAgent::input_desktop_message_loop()
vd_printf("WTSRegisterSessionNotification() failed: %lu", GetLastError());
}
if (_system_version == SYS_VER_WIN_7_CLASS) {
- _add_clipboard_listener(_hwnd);
+ _add_clipboard_listener(_hwnd);
} else {
_hwnd_next_viewer = SetClipboardViewer(_hwnd);
}
@@ -463,7 +463,7 @@ void VDAgent::input_desktop_message_loop()
_pending_input = false;
}
if (_system_version == SYS_VER_WIN_7_CLASS) {
- _remove_clipboard_listener(_hwnd);
+ _remove_clipboard_listener(_hwnd);
} else {
ChangeClipboardChain(_hwnd, _hwnd_next_viewer);
}
@@ -948,9 +948,9 @@ void VDAgent::on_clipboard_grab()
set_clipboard_owner(owner_guest);
} else {
UINT format = 0;
- while (format = EnumClipboardFormats(format)) {
- vd_printf("Unsupported clipboard format %u", format);
- }
+ while (format = EnumClipboardFormats(format)) {
+ vd_printf("Unsupported clipboard format %u", format);
+ }
}
}
@@ -1053,7 +1053,7 @@ bool VDAgent::handle_clipboard_request(VDAgentClipboardRequest* clipboard_reques
uint8_t* new_data = NULL;
long new_size;
size_t len = 0;
- CxImage image;
+ CxImage image;
if (_clipboard_owner != owner_guest) {
vd_printf("Received clipboard request from client while clipboard is not owned by guest");
@@ -1087,19 +1087,19 @@ bool VDAgent::handle_clipboard_request(VDAgentClipboardRequest* clipboard_reques
DWORD cximage_format = get_cximage_format(clipboard_request->type);
HPALETTE pal = 0;
- ASSERT(cximage_format);
- if (IsClipboardFormatAvailable(CF_PALETTE)) {
+ ASSERT(cximage_format);
+ if (IsClipboardFormatAvailable(CF_PALETTE)) {
pal = (HPALETTE)GetClipboardData(CF_PALETTE);
}
- if (!image.CreateFromHBITMAP((HBITMAP)clip_data, pal)) {
- vd_printf("Image create from handle failed");
- break;
- }
- if (!image.Encode(new_data, new_size, cximage_format)) {
- vd_printf("Image encode to type %u failed", clipboard_request->type);
- break;
- }
- vd_printf("Image encoded to %lu bytes", new_size);
+ if (!image.CreateFromHBITMAP((HBITMAP)clip_data, pal)) {
+ vd_printf("Image create from handle failed");
+ break;
+ }
+ if (!image.Encode(new_data, new_size, cximage_format)) {
+ vd_printf("Image encode to type %u failed", clipboard_request->type);
+ break;
+ }
+ vd_printf("Image encoded to %lu bytes", new_size);
break;
}
}
@@ -1124,8 +1124,8 @@ bool VDAgent::handle_clipboard_request(VDAgentClipboardRequest* clipboard_reques
break;
case VD_AGENT_CLIPBOARD_IMAGE_PNG:
case VD_AGENT_CLIPBOARD_IMAGE_BMP:
- memcpy(clipboard->data, new_data, new_size);
- image.FreeMemory(new_data);
+ memcpy(clipboard->data, new_data, new_size);
+ image.FreeMemory(new_data);
break;
}
CloseClipboard();