File tree 1 file changed +20
-0
lines changed 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -705,6 +705,26 @@ xrdp_init_xkb_layout(struct xrdp_client_info *client_info)
705
705
break ;
706
706
}
707
707
}
708
+ if (rdp_layout [0 ] == '\0' && (client_info -> keylayout & ~0xffff ) != 0 )
709
+ {
710
+ // We failed to match the layout, but we may be able
711
+ // to match on the lower 16-bits
712
+ int alt_layout = client_info -> keylayout & 0xffff ;
713
+ for (index = 0 ; index < items -> count ; index ++ )
714
+ {
715
+ item = (char * )list_get_item (items , index );
716
+ value = (char * )list_get_item (values , index );
717
+ int rdp_layout_id = g_htoi (value );
718
+ if (rdp_layout_id == alt_layout )
719
+ {
720
+ g_strncpy (rdp_layout , item , 255 );
721
+ LOG (LOG_LEVEL_INFO ,
722
+ "Failed to match layout %08X, but matched %04X to %s" ,
723
+ client_info -> keylayout , alt_layout , rdp_layout );
724
+ break ;
725
+ }
726
+ }
727
+ }
708
728
list_clear (items );
709
729
list_clear (values );
710
730
file_read_section (fd , section_layouts_map , items , values );
You can’t perform that action at this time.
0 commit comments