fix bug that click event is triggered by pressing space on disabled button
This commit is contained in:
parent
e5a935ab83
commit
39c3f85627
@ -1019,7 +1019,7 @@ namespace detail
|
|||||||
else if((keyboard::space == os_code) && msgwnd->flags.space_click_enabled)
|
else if((keyboard::space == os_code) && msgwnd->flags.space_click_enabled)
|
||||||
{
|
{
|
||||||
//Clicked by spacebar
|
//Clicked by spacebar
|
||||||
if((nullptr == pressed_wd) && (nullptr == pressed_wd_space))
|
if((nullptr == pressed_wd) && (nullptr == pressed_wd_space) && msgwnd->flags.enabled)
|
||||||
{
|
{
|
||||||
arg_mouse arg;
|
arg_mouse arg;
|
||||||
arg.alt = modifiers_status.alt;
|
arg.alt = modifiers_status.alt;
|
||||||
@ -1122,7 +1122,7 @@ namespace detail
|
|||||||
msgwnd = brock.focus();
|
msgwnd = brock.focus();
|
||||||
if(msgwnd)
|
if(msgwnd)
|
||||||
{
|
{
|
||||||
if(msgwnd == pressed_wd_space)
|
if((msgwnd == pressed_wd_space) && msgwnd->flags.enabled)
|
||||||
{
|
{
|
||||||
msgwnd->set_action(mouse_action::normal);
|
msgwnd->set_action(mouse_action::normal);
|
||||||
|
|
||||||
|
@ -1386,7 +1386,7 @@ namespace detail
|
|||||||
else if ((VK_SPACE == wParam) && msgwnd->flags.space_click_enabled)
|
else if ((VK_SPACE == wParam) && msgwnd->flags.space_click_enabled)
|
||||||
{
|
{
|
||||||
//Clicked by spacebar
|
//Clicked by spacebar
|
||||||
if (nullptr == pressed_wd && nullptr == pressed_wd_space)
|
if ((nullptr == pressed_wd) && (nullptr == pressed_wd_space) && msgwnd->flags.enabled)
|
||||||
{
|
{
|
||||||
arg_mouse arg;
|
arg_mouse arg;
|
||||||
arg.alt = false;
|
arg.alt = false;
|
||||||
@ -1468,7 +1468,7 @@ namespace detail
|
|||||||
msgwnd = brock.focus();
|
msgwnd = brock.focus();
|
||||||
if (msgwnd)
|
if (msgwnd)
|
||||||
{
|
{
|
||||||
if (msgwnd == pressed_wd_space)
|
if ((msgwnd == pressed_wd_space) && msgwnd->flags.enabled)
|
||||||
{
|
{
|
||||||
msgwnd->set_action(mouse_action::normal);
|
msgwnd->set_action(mouse_action::normal);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user