2 # vim:ts=4:sw=4:expandtab
4 # Checks if size hints are interpreted correctly.
8 my $x = X11::XCB::Connection->new;
10 my $tmp = fresh_workspace;
12 ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
14 my $win = open_window($x, { dont_map => 1 });
15 # XXX: we should check screen size. in screens with an AR of 2.0,
16 # this is not a good idea.
17 my $aspect = X11::XCB::Sizehints::Aspect->new;
18 $aspect->min_num(600);
19 $aspect->min_den(300);
20 $aspect->max_num(600);
21 $aspect->max_den(300);
25 $win->hints->aspect($aspect);
30 my $rect = $win->rect;
31 my $ar = $rect->width / $rect->height;
32 diag("Aspect ratio = $ar");
33 ok(($ar > 1.90) && ($ar < 2.10), 'Aspect ratio about 2.0');