#include "terminal.h"
#include "storage.h"
#include "win_res.h"
+#include "winsecur.h"
#ifndef NO_MULTIMON
#include <multimon.h>
#define WHEEL_DELTA 120
#endif
+/* VK_PACKET, used to send Unicode characters in WM_KEYDOWNs */
+#ifndef VK_PACKET
+#define VK_PACKET 0xE7
+#endif
+
static Mouse_Button translate_button(Mouse_Button button);
static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
return 1;
}
+ /*
+ * Protect our process
+ */
+ {
+#ifndef UNPROTECT
+ char *error = NULL;
+ if (! setprocessacl(error)) {
+ char *message = dupprintf("Could not restrict process ACL: %s",
+ error);
+ logevent(NULL, message);
+ sfree(message);
+ sfree(error);
+ }
+#endif
+ }
/*
* Process the command line.
*/
unsigned char buf[20];
int len;
- if (wParam == VK_PROCESSKEY) { /* IME PROCESS key */
+ if (wParam == VK_PROCESSKEY || /* IME PROCESS key */
+ wParam == VK_PACKET) { /* 'this key is a Unicode char' */
if (message == WM_KEYDOWN) {
MSG m;
m.hwnd = hwnd;