Implement RandR 1.5 support (#2580)
This comes with the intentionally undocumented --disable-randr15 command line flag and disable-randr15 configuration directive. We will add documentation before the release if and only if it turns out that users actually need to use this flag in their setups. Ideally, nobody would need to use the flag and everything would just keep working, but it’s better to be safe than sorry. fixes #1799
This commit is contained in:
committed by
GitHub
parent
f2ffd8d864
commit
633a9f7b14
@ -65,7 +65,7 @@ for my $line (@raw_lines) {
|
||||
my $current_state;
|
||||
|
||||
for my $line (@lines) {
|
||||
if (my ($state) = ($line =~ /^state ([A-Z_]+):$/)) {
|
||||
if (my ($state) = ($line =~ /^state ([A-Z0-9_]+):$/)) {
|
||||
#say "got a new state: $state";
|
||||
$current_state = $state;
|
||||
} else {
|
||||
@ -155,12 +155,20 @@ for my $state (@keys) {
|
||||
# to generate a format string. The format uses %d for <number>s,
|
||||
# literal numbers or state IDs and %s for NULL, <string>s and literal
|
||||
# strings.
|
||||
|
||||
# remove the function name temporarily, so that the following
|
||||
# replacements only apply to the arguments.
|
||||
my ($funcname) = ($fmt =~ /^(.+)\(/);
|
||||
$fmt =~ s/^$funcname//;
|
||||
|
||||
$fmt =~ s/$_/%d/g for @keys;
|
||||
$fmt =~ s/\$([a-z_]+)/%s/g;
|
||||
$fmt =~ s/\&([a-z_]+)/%ld/g;
|
||||
$fmt =~ s/"([a-z0-9_]+)"/%s/g;
|
||||
$fmt =~ s/(?:-?|\b)[0-9]+\b/%d/g;
|
||||
|
||||
$fmt = $funcname . $fmt;
|
||||
|
||||
say $callfh " case $call_id:";
|
||||
say $callfh " result->next_state = $next_state;";
|
||||
say $callfh '#ifndef TEST_PARSER';
|
||||
|
Reference in New Issue
Block a user