Fixed mapping of new client sysparam values.

This commit is contained in:
Armin Novak 2019-05-15 15:25:04 +02:00
parent 8dcac1adad
commit 8666d7e59b
3 changed files with 70 additions and 3 deletions

View File

@ -203,9 +203,18 @@ static UINT rail_send_client_sysparam(RailClientContext* context,
length += sysparam->highContrast.colorSchemeLength + 10;
break;
default:
length += 8;
case SPI_SETFILTERKEYS:
length += 20;
break;
case SPI_SETSTICKYKEYS:
case SPI_SETCARETWIDTH:
case SPI_SETTOGGLEKEYS:
length += 4;
break;
default:
return ERROR_BAD_ARGUMENTS;
}
s = rail_pdu_init(length);

View File

@ -1320,6 +1320,16 @@ static UINT rail_send_client_sysparam_order(railPlugin* rail, const RAIL_SYSPARA
length += 1;
break;
case SPI_SETCARETWIDTH:
case SPI_SETSTICKYKEYS:
case SPI_SETTOGGLEKEYS:
length += 4;
break;
case SPI_SETFILTERKEYS:
length += 20;
break;
case SPI_SET_WORK_AREA:
case SPI_DISPLAY_CHANGE:
case SPI_TASKBAR_POS:
@ -1449,6 +1459,50 @@ static UINT rail_send_client_sysparams_order(railPlugin* rail, RAIL_SYSPARAM_ORD
}
}
if (sysparam->params & SPI_MASK_SET_CARET_WIDTH)
{
sysparam->param = SPI_SETCARETWIDTH;
if ((error = rail_send_client_sysparam_order(rail, sysparam)))
{
WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %"PRIu32"!", error);
return error;
}
}
if (sysparam->params & SPI_MASK_SET_STICKY_KEYS)
{
sysparam->param = SPI_SETSTICKYKEYS;
if ((error = rail_send_client_sysparam_order(rail, sysparam)))
{
WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %"PRIu32"!", error);
return error;
}
}
if (sysparam->params & SPI_MASK_SET_TOGGLE_KEYS)
{
sysparam->param = SPI_SETTOGGLEKEYS;
if ((error = rail_send_client_sysparam_order(rail, sysparam)))
{
WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %"PRIu32"!", error);
return error;
}
}
if (sysparam->params & SPI_MASK_SET_FILTER_KEYS)
{
sysparam->param = SPI_SETFILTERKEYS;
if ((error = rail_send_client_sysparam_order(rail, sysparam)))
{
WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %"PRIu32"!", error);
return error;
}
}
return error;
}

View File

@ -81,7 +81,11 @@ enum SPI_MASK
SPI_MASK_TASKBAR_POS = 0x00000040,
SPI_MASK_SET_HIGH_CONTRAST = 0x00000080,
SPI_MASK_SET_SCREEN_SAVE_ACTIVE = 0x00000100,
SPI_MASK_SET_SET_SCREEN_SAVE_SECURE = 0x00000200
SPI_MASK_SET_SET_SCREEN_SAVE_SECURE = 0x00000200,
SPI_MASK_SET_CARET_WIDTH = 0x00000400,
SPI_MASK_SET_STICKY_KEYS = 0x00000800,
SPI_MASK_SET_TOGGLE_KEYS = 0x00001000,
SPI_MASK_SET_FILTER_KEYS = 0x00002000,
};
/* Client System Parameters Update PDU