projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't call ReleaseCapture() on any mouse-button-up event. Instead,
[u/mdw/putty]
/
windows
/
window.c
diff --git
a/windows/window.c
b/windows/window.c
index
216c170
..
416be3f
100644
(file)
--- a/
windows/window.c
+++ b/
windows/window.c
@@
-1325,7
+1325,7
@@
debug(("\n rect: [%d,%d %d,%d]\n", newrc.left, newrc.top, newrc.right,
#ifdef FIXME_REMOVE_BEFORE_CHECKIN
debug(("general_textout: done, xn=%d\n", xn));
#endif
#ifdef FIXME_REMOVE_BEFORE_CHECKIN
debug(("general_textout: done, xn=%d\n", xn));
#endif
- assert(xn - x
=
= lprc->right - lprc->left);
+ assert(xn - x
>
= lprc->right - lprc->left);
}
/*
}
/*
@@
-2335,26
+2335,32
@@
static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
switch (message) {
case WM_LBUTTONDOWN:
button = MBT_LEFT;
switch (message) {
case WM_LBUTTONDOWN:
button = MBT_LEFT;
+ wParam |= MK_LBUTTON;
press = 1;
break;
case WM_MBUTTONDOWN:
button = MBT_MIDDLE;
press = 1;
break;
case WM_MBUTTONDOWN:
button = MBT_MIDDLE;
+ wParam |= MK_MBUTTON;
press = 1;
break;
case WM_RBUTTONDOWN:
button = MBT_RIGHT;
press = 1;
break;
case WM_RBUTTONDOWN:
button = MBT_RIGHT;
+ wParam |= MK_RBUTTON;
press = 1;
break;
case WM_LBUTTONUP:
button = MBT_LEFT;
press = 1;
break;
case WM_LBUTTONUP:
button = MBT_LEFT;
+ wParam &= ~MK_LBUTTON;
press = 0;
break;
case WM_MBUTTONUP:
button = MBT_MIDDLE;
press = 0;
break;
case WM_MBUTTONUP:
button = MBT_MIDDLE;
+ wParam &= ~MK_MBUTTON;
press = 0;
break;
case WM_RBUTTONUP:
button = MBT_RIGHT;
press = 0;
break;
case WM_RBUTTONUP:
button = MBT_RIGHT;
+ wParam &= ~MK_RBUTTON;
press = 0;
break;
default:
press = 0;
break;
default:
@@
-2413,7
+2419,8
@@
static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
TO_CHR_X(X_POS(lParam)),
TO_CHR_Y(Y_POS(lParam)), wParam & MK_SHIFT,
wParam & MK_CONTROL, is_alt_pressed());
TO_CHR_X(X_POS(lParam)),
TO_CHR_Y(Y_POS(lParam)), wParam & MK_SHIFT,
wParam & MK_CONTROL, is_alt_pressed());
- ReleaseCapture();
+ if (!(wParam & (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON)))
+ ReleaseCapture();
}
}
return 0;
}
}
return 0;
@@
-4920,8
+4927,6
@@
static DWORD WINAPI clipboard_read_threadfunc(void *param)
static int process_clipdata(HGLOBAL clipdata, int unicode)
{
static int process_clipdata(HGLOBAL clipdata, int unicode)
{
- static wchar_t *converted = 0;
-
sfree(clipboard_contents);
clipboard_contents = NULL;
clipboard_length = 0;
sfree(clipboard_contents);
clipboard_contents = NULL;
clipboard_length = 0;