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