win32 layer mouse capture

master
Allen Webster 2020-05-01 12:35:43 -07:00
parent 886c70100d
commit 1e6ec53a30
2 changed files with 26 additions and 20 deletions

View File

@ -1245,6 +1245,7 @@ win32_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){
case WM_LBUTTONDOWN:
{
SetCapture(hwnd);
win32vars.got_useful_event = true;
win32vars.input_chunk.trans.mouse_l_press = true;
win32vars.input_chunk.pers.mouse_l = true;
@ -1252,6 +1253,7 @@ win32_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){
case WM_RBUTTONDOWN:
{
SetCapture(hwnd);
win32vars.got_useful_event = true;
win32vars.input_chunk.trans.mouse_r_press = true;
win32vars.input_chunk.pers.mouse_r = true;
@ -1259,6 +1261,7 @@ win32_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){
case WM_LBUTTONUP:
{
ReleaseCapture();
win32vars.got_useful_event = true;
win32vars.input_chunk.trans.mouse_l_release = true;
win32vars.input_chunk.pers.mouse_l = false;
@ -1266,6 +1269,7 @@ win32_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){
case WM_RBUTTONUP:
{
ReleaseCapture();
win32vars.got_useful_event = true;
win32vars.input_chunk.trans.mouse_r_release = true;
win32vars.input_chunk.pers.mouse_r = false;
@ -1274,6 +1278,7 @@ win32_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){
case WM_KILLFOCUS:
case WM_SETFOCUS:
{
ReleaseCapture();
win32vars.got_useful_event = true;
win32vars.input_chunk.pers.mouse_l = false;
win32vars.input_chunk.pers.mouse_r = false;

View File

@ -13,7 +13,8 @@
+ Fix: windows layer now generates layout independent key stroke events
+ Fix: notepad like mode scrolling does not snap mark to cursor
+ Fix: special case colors from the theme override general case colors
+ Fix: Paste fade range is updated with buffer edits
+ Fix: paste fade range is updated with buffer edits
+ Fix: on windows releasing click off window is detected
4.1.4
+ MAJOR: The clipboard history is now a fully custom layer implemented system. Users maintaining a customization layer should try to update their call sites to the old clipboard API. #define FCODER_TRANSITION_TO 4001004 to disable the transitional function wrappers when you are ready to make the transition.