tests: lib/i3test: Use //= instead of unless exists $args{key} (Thanks mxf)
This commit is contained in:
parent
378611c11c
commit
761dac5514
|
@ -144,11 +144,11 @@ sub open_window {
|
||||||
|
|
||||||
my $dont_map = delete $args{dont_map};
|
my $dont_map = delete $args{dont_map};
|
||||||
|
|
||||||
$args{class} = WINDOW_CLASS_INPUT_OUTPUT unless exists $args{class};
|
$args{class} //= WINDOW_CLASS_INPUT_OUTPUT;
|
||||||
$args{rect} = [ 0, 0, 30, 30 ] unless exists $args{rect};
|
$args{rect} //= [ 0, 0, 30, 30 ];
|
||||||
$args{background_color} = '#c0c0c0' unless exists $args{background_color};
|
$args{background_color} //= '#c0c0c0';
|
||||||
$args{event_mask} = [ 'structure_notify' ] unless exists $args{event_mask};
|
$args{event_mask} //= [ 'structure_notify' ];
|
||||||
$args{name} = 'Window ' . counter_window() unless exists $args{name};
|
$args{name} //= 'Window ' . counter_window();
|
||||||
|
|
||||||
my $window = $x->root->create_child(%args);
|
my $window = $x->root->create_child(%args);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue