547 | 547 |
cmd '[id=' . $first->id . '] move position center';
|
548 | 548 |
is ($x->input_focus, $second->id, 'centering scratchpad window does not show it');
|
549 | 549 |
|
|
550 |
###################################################################################
|
|
551 |
# Verify that a scratchpad container with child containers that was open in
|
|
552 |
# another workspace is moved to the current workspace (with all its children)
|
|
553 |
# after a scratchpad show.
|
|
554 |
################################################################################
|
|
555 |
|
|
556 |
kill_all_windows;
|
|
557 |
open_window;
|
|
558 |
open_window;
|
|
559 |
# This is to dodge the edge case were the whole workspace is moved
|
|
560 |
# window-by-window into the scratchpad.
|
|
561 |
cmd 'layout tabbed';
|
|
562 |
cmd 'focus parent';
|
|
563 |
cmd 'move to scratchpad';
|
|
564 |
$ws = fresh_workspace;
|
|
565 |
cmd 'scratchpad show';
|
|
566 |
# Case 1: a parent node in the scratchpad does not lose children
|
|
567 |
# Note on the layout: there should be a floating tabbed container, which is
|
|
568 |
# represented as follows:
|
|
569 |
# [workspace object] -> [floating_nodes] -> [tabbed node container] -> [the 2 children we expect]
|
|
570 |
is(scalar @{get_ws($ws)->{floating_nodes}->[0]->{nodes}->[0]->{nodes}}, 2, 'both windows moved from scratchpad to this workspace');
|
|
571 |
|
|
572 |
# Case 2: a parent node in the scratchpad from another workspace does not lose children
|
|
573 |
$ws = fresh_workspace;
|
|
574 |
cmd 'scratchpad show';
|
|
575 |
is(scalar @{get_ws($ws)->{floating_nodes}->[0]->{nodes}->[0]->{nodes}}, 2, 'both windows moved from scratchpad focused on other workspace to this workspace');
|
550 | 576 |
|
551 | 577 |
done_testing;
|