win32 layer mouse capture
parent
886c70100d
commit
1e6ec53a30
|
@ -1107,25 +1107,25 @@ win32_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){
|
||||||
case VK_CONTROL:case VK_LCONTROL:case VK_RCONTROL:
|
case VK_CONTROL:case VK_LCONTROL:case VK_RCONTROL:
|
||||||
case VK_MENU:case VK_LMENU:case VK_RMENU:
|
case VK_MENU:case VK_LMENU:case VK_RMENU:
|
||||||
{
|
{
|
||||||
switch (vk){
|
switch (vk){
|
||||||
case VK_CONTROL:case VK_LCONTROL:case VK_RCONTROL:
|
case VK_CONTROL:case VK_LCONTROL:case VK_RCONTROL:
|
||||||
{
|
{
|
||||||
if (is_right){
|
if (is_right){
|
||||||
controls->r_ctrl = down;
|
controls->r_ctrl = down;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
controls->l_ctrl = down;
|
controls->l_ctrl = down;
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
case VK_MENU:case VK_LMENU:case VK_RMENU:
|
case VK_MENU:case VK_LMENU:case VK_RMENU:
|
||||||
{
|
{
|
||||||
if (is_right){
|
if (is_right){
|
||||||
controls->r_alt = down;
|
controls->r_alt = down;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
controls->l_alt = down;
|
controls->l_alt = down;
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
}
|
}
|
||||||
|
@ -1245,6 +1245,7 @@ win32_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){
|
||||||
|
|
||||||
case WM_LBUTTONDOWN:
|
case WM_LBUTTONDOWN:
|
||||||
{
|
{
|
||||||
|
SetCapture(hwnd);
|
||||||
win32vars.got_useful_event = true;
|
win32vars.got_useful_event = true;
|
||||||
win32vars.input_chunk.trans.mouse_l_press = true;
|
win32vars.input_chunk.trans.mouse_l_press = true;
|
||||||
win32vars.input_chunk.pers.mouse_l = 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:
|
case WM_RBUTTONDOWN:
|
||||||
{
|
{
|
||||||
|
SetCapture(hwnd);
|
||||||
win32vars.got_useful_event = true;
|
win32vars.got_useful_event = true;
|
||||||
win32vars.input_chunk.trans.mouse_r_press = true;
|
win32vars.input_chunk.trans.mouse_r_press = true;
|
||||||
win32vars.input_chunk.pers.mouse_r = 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:
|
case WM_LBUTTONUP:
|
||||||
{
|
{
|
||||||
|
ReleaseCapture();
|
||||||
win32vars.got_useful_event = true;
|
win32vars.got_useful_event = true;
|
||||||
win32vars.input_chunk.trans.mouse_l_release = true;
|
win32vars.input_chunk.trans.mouse_l_release = true;
|
||||||
win32vars.input_chunk.pers.mouse_l = false;
|
win32vars.input_chunk.pers.mouse_l = false;
|
||||||
|
@ -1266,6 +1269,7 @@ win32_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){
|
||||||
|
|
||||||
case WM_RBUTTONUP:
|
case WM_RBUTTONUP:
|
||||||
{
|
{
|
||||||
|
ReleaseCapture();
|
||||||
win32vars.got_useful_event = true;
|
win32vars.got_useful_event = true;
|
||||||
win32vars.input_chunk.trans.mouse_r_release = true;
|
win32vars.input_chunk.trans.mouse_r_release = true;
|
||||||
win32vars.input_chunk.pers.mouse_r = false;
|
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_KILLFOCUS:
|
||||||
case WM_SETFOCUS:
|
case WM_SETFOCUS:
|
||||||
{
|
{
|
||||||
|
ReleaseCapture();
|
||||||
win32vars.got_useful_event = true;
|
win32vars.got_useful_event = true;
|
||||||
win32vars.input_chunk.pers.mouse_l = false;
|
win32vars.input_chunk.pers.mouse_l = false;
|
||||||
win32vars.input_chunk.pers.mouse_r = false;
|
win32vars.input_chunk.pers.mouse_r = false;
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
+ Fix: windows layer now generates layout independent key stroke events
|
+ Fix: windows layer now generates layout independent key stroke events
|
||||||
+ Fix: notepad like mode scrolling does not snap mark to cursor
|
+ Fix: notepad like mode scrolling does not snap mark to cursor
|
||||||
+ Fix: special case colors from the theme override general case colors
|
+ 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
|
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.
|
+ 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.
|
||||||
|
|
Loading…
Reference in New Issue