wait_for_event
wait_for_map
wait_for_unmap
+ $x
);
my $tester = Test::Builder->new();
my $_sync_window = undef;
my $tmp_socket_path = undef;
+our $x;
+
BEGIN {
my $window_count = 0;
sub counter_window {
strict->import;
warnings->import;
+ $x ||= i3test::X11->new;
@_ = ($class);
goto \&Exporter::import;
}
return $_cached_socket_path;
}
- my $x = X11::XCB::Connection->new;
my $atom = $x->atom(name => 'I3_SOCKET_PATH');
my $cookie = $x->get_property(0, $x->get_root_window(), $atom->id, GET_PROPERTY_TYPE_ANY, 0, 256);
my $reply = $x->get_property_reply($cookie->{sequence});
# vim:ts=4:sw=4:expandtab
use i3test;
-use X11::XCB qw(:all);
-
-BEGIN {
- use_ok('X11::XCB::Window');
-}
-
-my $x = X11::XCB::Connection->new;
+use X11::XCB 'WINDOW_CLASS_INPUT_OUTPUT';
my $original_rect = X11::XCB::Rect->new(x => 0, y => 0, width => 30, height => 30);
#
# checks if i3 supports I3_SYNC
#
-use X11::XCB qw(:all);
-use X11::XCB::Connection;
use i3test;
-my $x = X11::XCB::Connection->new;
-
my $result = sync_with_i3($x);
ok($result, 'syncing was successful');
use i3test;
-my $x = X11::XCB::Connection->new;
-
fresh_workspace;
#####################################################################
# vim:ts=4:sw=4:expandtab
use i3test;
-use X11::XCB qw(:all);
-
-BEGIN {
- use_ok('X11::XCB::Window');
-}
-
-my $x = X11::XCB::Connection->new;
+use X11::XCB 'WINDOW_CLASS_INPUT_OUTPUT';
my $original_rect = X11::XCB::Rect->new(x => 0, y => 0, width => 30, height => 30);
# vim:ts=4:sw=4:expandtab
use i3test;
-use X11::XCB qw(:all);
-
-BEGIN {
- use_ok('X11::XCB::Window');
-}
-
-my $x = X11::XCB::Connection->new;
+use X11::XCB 'WINDOW_CLASS_INPUT_OUTPUT';
# Create a floating window which is smaller than the minimum enforced size of i3
my $window = $x->root->create_child(
# vim:ts=4:sw=4:expandtab
use i3test;
-use X11::XCB qw(:all);
+use X11::XCB 'WINDOW_CLASS_INPUT_OUTPUT';
use List::Util qw(first);
my $i3 = i3(get_socket_path());
}
}
-BEGIN {
- use_ok('X11::XCB::Window');
-}
-
-my $x = X11::XCB::Connection->new;
-
##################################
# map a window, then fullscreen it
##################################
use i3test;
-my $x = X11::XCB::Connection->new;
-
my $tmp = fresh_workspace;
#####################################################################
# vim:ts=4:sw=4:expandtab
use i3test;
-use X11::XCB qw(:all);
+use X11::XCB 'PROP_MODE_REPLACE';
use List::Util qw(first);
-BEGIN {
- use_ok('X11::XCB::Connection') or BAIL_OUT('Cannot load X11::XCB::Connection');
-}
-
-my $x = X11::XCB::Connection->new;
-
#####################################################################
# verify that there is no dock window yet
#####################################################################
use i3test;
-my $x = X11::XCB::Connection->new;
-
fresh_workspace;
cmd 'split h';
use i3test;
use File::Temp;
-my $x = X11::XCB::Connection->new;
-
my $tmp = fresh_workspace;
cmd 'split h';
# vim:ts=4:sw=4:expandtab
use i3test;
-use X11::XCB qw(:all);
-
-BEGIN {
- use_ok('X11::XCB::Connection') or BAIL_OUT('Cannot load X11::XCB::Connection');
-}
-
-my $x = X11::XCB::Connection->new;
fresh_workspace;
# vim:ts=4:sw=4:expandtab
use i3test;
-use X11::XCB qw(:all);
use List::Util qw(first);
-BEGIN {
- use_ok('X11::XCB::Connection') or BAIL_OUT('Cannot load X11::XCB::Connection');
-}
-
-my $x = X11::XCB::Connection->new;
-
my $tmp = fresh_workspace;
#####################################################################
# vim:ts=4:sw=4:expandtab
use i3test;
-use X11::XCB qw(:all);
-
-BEGIN {
- use_ok('X11::XCB::Connection') or BAIL_OUT('Cannot load X11::XCB::Connection');
-}
-
-my $x = X11::XCB::Connection->new;
my $tmp = fresh_workspace;
# Tests all kinds of matching methods
#
use i3test;
-use X11::XCB qw(:all);
+use X11::XCB qw(PROP_MODE_REPLACE WINDOW_CLASS_INPUT_OUTPUT);
my $tmp = fresh_workspace;
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
# Open a new window
-my $x = X11::XCB::Connection->new;
my $window = open_window($x);
my $content = get_ws_content($tmp);
ok(@{$content} == 1, 'window mapped');
# 4) move a container in a different direction so that we need to go up in tree
#
use i3test;
-use X11::XCB::Connection;
-my $x = X11::XCB::Connection->new;
my $i3 = i3(get_socket_path());
my $tmp = fresh_workspace;
# Check if the focus is correctly restored after closing windows.
#
use i3test;
-use X11::XCB qw(:all);
use List::Util qw(first);
-my $x = X11::XCB::Connection->new;
-
my $i3 = i3(get_socket_path());
my $tmp = fresh_workspace;
# We move the pointer out of our way to avoid a bug where the focus will
# be set to the window under the cursor
-my $x = X11::XCB::Connection->new;
$x->root->warp_pointer(0, 0);
my $tmp = get_unused_workspace();
#
use i3test;
-my $x = X11::XCB::Connection->new;
-
my $tmp = fresh_workspace;
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
# vim:ts=4:sw=4:expandtab
use i3test;
-use X11::XCB qw(:all);
-use X11::XCB::Connection;
-
-my $x = X11::XCB::Connection->new;
my $tmp = fresh_workspace;
# Regression test: when only having a floating window on a workspace, it should not be deleted.
use i3test;
-use X11::XCB qw(:all);
-
-BEGIN {
- use_ok('X11::XCB::Window');
-}
my $i3 = i3(get_socket_path());
ok(workspace_exists($tmp), "workspace $tmp exists");
-my $x = X11::XCB::Connection->new;
-
# Create a floating window which is smaller than the minimum enforced size of i3
my $window = open_floating_window($x);
ok($window->mapped, 'Window is mapped');
# to a different workspace.
use i3test;
-use X11::XCB qw(:all);
-
-BEGIN {
- use_ok('X11::XCB::Window');
-}
my $i3 = i3(get_socket_path());
# 1: open a floating window, get it mapped
#############################################################################
-my $x = X11::XCB::Connection->new;
-
# Create a floating window which is smaller than the minimum enforced size of i3
my $window = open_floating_window($x);
ok($window->mapped, 'Window is mapped');
# if only a floating window is present on the workspace.
use i3test;
-use X11::XCB qw(:all);
-
-BEGIN {
- use_ok('X11::XCB::Window');
-}
my $i3 = i3(get_socket_path());
# 1: open a floating window, get it mapped
#############################################################################
-my $x = X11::XCB::Connection->new;
-
# Create a floating window
my $window = open_floating_window($x);
ok($window->mapped, 'Window is mapped');
# Check if numbered workspaces and named workspaces are sorted in the right way
# in get_workspaces IPC output (necessary for i3bar etc.).
use i3test;
-use X11::XCB qw(:all);
-
-BEGIN {
- use_ok('X11::XCB::Window');
-}
my $i3 = i3(get_socket_path());
-my $x = X11::XCB::Connection->new;
sub check_order {
my ($msg) = @_;
# Regression: Check if the focus stays the same when switching the layout
# bug introduced by 77d0d42ed2d7ac8cafe267c92b35a81c1b9491eb
use i3test;
-use X11::XCB qw(:all);
-
-BEGIN {
- use_ok('X11::XCB::Window');
-}
my $i3 = i3(get_socket_path());
-my $x = X11::XCB::Connection->new;
sub check_order {
my ($msg) = @_;
# vim:ts=4:sw=4:expandtab
# Tests resizing tiling containers
use i3test;
-use X11::XCB qw(:all);
-
-BEGIN {
- use_ok('X11::XCB::Window');
-}
-
-my $x = X11::XCB::Connection->new;
my $tmp = fresh_workspace;
#
use i3test;
use List::Util qw(sum);
-use X11::XCB::Connection;
-
-my $x = X11::XCB::Connection->new;
my $tmp = fresh_workspace;
#
# This testcase checks that the tree is properly flattened after moving.
#
-use X11::XCB qw(:all);
use i3test;
-my $x = X11::XCB::Connection->new;
-
my $tmp = fresh_workspace;
my $left = open_window($x);
#!perl
# vim:ts=4:sw=4:expandtab
#
-use X11::XCB qw(:all);
use i3test;
-BEGIN {
- use_ok('X11::XCB::Window');
-}
-
-my $x = X11::XCB::Connection->new;
-
my $tmp = fresh_workspace;
my $left = open_window($x);
# Regression test for moving a con outside of a floating con when there are no
# tiling cons on a workspace
#
-use X11::XCB qw(:all);
-use Time::HiRes qw(sleep);
use i3test;
-BEGIN {
- use_ok('X11::XCB::Window');
-}
-
-my $x = X11::XCB::Connection->new;
-
my $tmp = fresh_workspace;
my $left = open_window($x);
# Regression test for correct focus behaviour when moving a floating con to
# another workspace.
#
-use X11::XCB qw(:all);
use i3test;
-BEGIN {
- use_ok('X11::XCB::Window');
-}
-
-my $x = X11::XCB::Connection->new;
-
my $tmp = fresh_workspace;
# open a tiling window on the first workspace
#
# Regression test for inplace restarting with dock clients
#
-use X11::XCB qw(:all);
use i3test;
-BEGIN {
- use_ok('X11::XCB::Window');
-}
-
-my $x = X11::XCB::Connection->new;
-
my $tmp = fresh_workspace;
#####################################################################
#
# Test if the requested width/height is set after making the window floating.
#
-use X11::XCB qw(:all);
use i3test;
my $tmp = fresh_workspace;
-my $x = X11::XCB::Connection->new;
-
# Create a floating window which is smaller than the minimum enforced size of i3
my $window = open_window($x, { rect => [ 0, 0, 400, 150 ] });
#
# Regression test for closing one of multiple dock clients
#
-use X11::XCB qw(:all);
use i3test;
-BEGIN {
- use_ok('X11::XCB::Window');
-}
-
-my $x = X11::XCB::Connection->new;
-
my $tmp = fresh_workspace;
#####################################################################
# Test to see if i3 combines the geometry of all children in a split container
# when setting the split container to floating
#
-use X11::XCB qw(:all);
use i3test;
-BEGIN {
- use_ok('X11::XCB::Window');
-}
-
-my $x = X11::XCB::Connection->new;
-
my $tmp = fresh_workspace;
#####################################################################
# Test if new containers get focused when there is a fullscreen container at
# the time of launching the new one.
#
-use X11::XCB qw(:all);
use i3test;
-BEGIN {
- use_ok('X11::XCB::Window');
-}
-
-my $x = X11::XCB::Connection->new;
my $i3 = i3(get_socket_path());
my $tmp = fresh_workspace;
#
# Regression test: level up should be a noop during fullscreen mode
#
-use X11::XCB qw(:all);
use i3test;
-BEGIN {
- use_ok('X11::XCB::Window');
-}
-
-my $x = X11::XCB::Connection->new;
-
my $tmp = fresh_workspace;
#####################################################################
#
# Tests if the WM_TAKE_FOCUS protocol is correctly handled by i3
#
-use X11::XCB qw(:all);
use i3test;
-use v5.10;
-
-my $x = X11::XCB::Connection->new;
subtest 'Window without WM_TAKE_FOCUS', sub {
fresh_workspace;
# restart.
# found in eb8ad348b28e243cba1972e802ca8ee636472fc9
#
-use X11::XCB qw(:all);
use List::Util qw(first);
use i3test;
-my $x = X11::XCB::Connection->new;
my $i3 = i3(get_socket_path());
my $tmp = fresh_workspace;
my $window = open_window($x);
# Regression test for setting the urgent hint on dock clients.
# found in 4be3178d4d360c2996217d811e61161c84d25898
#
-use X11::XCB qw(:all);
use i3test;
+use X11::XCB 'WINDOW_CLASS_INPUT_OUTPUT';
-BEGIN {
- use_ok('X11::XCB::Window');
-}
-
-my $x = X11::XCB::Connection->new;
my $i3 = i3(get_socket_path());
my $tmp = fresh_workspace;
# Tests if WM_STATE is WM_STATE_NORMAL when mapped and WM_STATE_WITHDRAWN when
# unmapped.
#
-use X11::XCB qw(:all);
use i3test;
-
-my $x = X11::XCB::Connection->new;
+use X11::XCB qw(ICCCM_WM_STATE_NORMAL ICCCM_WM_STATE_WITHDRAWN);
my $window = open_window($x);
#
use i3test;
-my $x = X11::XCB::Connection->new;
-
sub two_windows {
my $tmp = fresh_workspace;
# !NO_I3_INSTANCE! will prevent complete-run.pl from starting i3
#
#
-use X11::XCB qw(:all);
-use X11::XCB::Connection;
use i3test;
-
-my $x = X11::XCB::Connection->new;
+use X11::XCB qw(PROP_MODE_REPLACE WINDOW_CLASS_INPUT_OUTPUT);
##############################################################
# 1: test the following directive:
# Tests if assignments work
#
use i3test;
-use X11::XCB qw(:all);
-use X11::XCB::Connection;
-use v5.10;
-
-my $x = X11::XCB::Connection->new;
+use X11::XCB qw(PROP_MODE_REPLACE WINDOW_CLASS_INPUT_OUTPUT);
# TODO: move to X11::XCB
sub set_wm_class {
#
use i3test;
-use X11::XCB qw(:all);
-use X11::XCB::Connection;
-
-my $x = X11::XCB::Connection->new;
#####################################################################
# 1: check that with an empty config, cons are place next to each
# Verifies that i3 survives inplace restarts with fullscreen containers
#
use i3test;
-use X11::XCB qw(:all);
-use X11::XCB::Connection;
-
-my $x = X11::XCB::Connection->new;
fresh_workspace;
#
use i3test;
-my $x = i3test::X11->new;
-
#####################################################################
# 1: test the wrapping behaviour without force_focus_wrapping
#####################################################################
#
# checks if i3 starts up on workspace '1' or the first configured named workspace
#
-use X11::XCB qw(:all);
-use X11::XCB::Connection;
use i3test;
-my $x = X11::XCB::Connection->new;
-
##############################################################
# 1: i3 should start with workspace '1'
##############################################################
# assigned to an invisible workspace
#
use i3test;
-use X11::XCB qw(:all);
-use X11::XCB::Connection;
-use v5.10;
-
-my $x = X11::XCB::Connection->new;
+use X11::XCB qw(PROP_MODE_REPLACE WINDOW_CLASS_INPUT_OUTPUT);
# TODO: move to X11::XCB
sub set_wm_class {
use i3test;
-my $x = X11::XCB::Connection->new;
-
#####################################################################
# 1: check that new windows start with 'normal' border unless configured
# otherwise
use POSIX qw(mkfifo);
use File::Temp qw(:POSIX);
-my $x = X11::XCB::Connection->new;
use ExtUtils::PkgConfig;
# setup dependency on libstartup-notification using pkg-config
#
use i3test;
-use X11::XCB::Connection;
-
-my $x = X11::XCB::Connection->new;
my $config = <<EOT;
# i3 config file (v4)