565
579
currentWidth + (left + right),
566
580
currentHeight + (top + bottom)));
583
TEST_F (CompizXorgSystemConfigureWindowTest, SetFrameExtentsUnmapped)
585
::Display *dpy = Display ();
587
Window client = ct::CreateNormalWindow (dpy);
588
WaitForWindowCreation (client);
590
/* Set frame extents and get a response */
596
int currentX, currentY;
597
unsigned int currentWidth, currentHeight;
598
ASSERT_TRUE (QueryGeometry (dpy,
605
/* We should get a response with our frame extents but it shouldn't actually
606
* do anything to the client as it is unmapped */
607
SendSetFrameExtentsRequest (client, left, right, top, bottom);
608
ASSERT_TRUE (VerifySetFrameExtentsResponse (client, left, right, top, bottom));
610
ASSERT_TRUE (VerifyWindowSize (client,
617
TEST_F (CompizXorgSystemConfigureWindowTest, SetFrameExtentsCorrectMapBehaviour)
619
::Display *dpy = Display ();
621
Window client = ct::CreateNormalWindow (dpy);
622
WaitForWindowCreation (client);
624
/* Set frame extents and get a response */
630
int currentX, currentY;
631
unsigned int currentWidth, currentHeight;
632
ASSERT_TRUE (QueryGeometry (dpy,
639
SendSetFrameExtentsRequest (client, left, right, top, bottom);
640
ASSERT_TRUE (VerifySetFrameExtentsResponse (client, left, right, top, bottom));
643
XMapRaised (dpy, client);
644
WaitForReparentAndMap (dpy, client);
646
/* Check the geometry of the frame */
647
Window frame = GetTopParent (dpy, client);
648
ASSERT_TRUE (VerifyWindowSize (frame,
651
currentWidth + (left + right),
652
currentHeight + (top + bottom)));
654
/* Wrapper geometry is extents.xy, size.wh */
656
Window wrapper = GetImmediateParent (dpy, client, root);
657
ASSERT_TRUE (VerifyWindowSize (wrapper,
664
TEST_F (CompizXorgSystemConfigureWindowTest, SetFrameExtentsConsistentBehaviourAfterMap)
666
::Display *dpy = Display ();
668
Window client = ct::CreateNormalWindow (dpy);
669
WaitForWindowCreation (client);
671
/* Set frame extents and get a response */
677
int currentX, currentY;
678
unsigned int currentWidth, currentHeight;
679
ASSERT_TRUE (QueryGeometry (dpy,
686
SendSetFrameExtentsRequest (client, left, right, top, bottom);
687
ASSERT_TRUE (VerifySetFrameExtentsResponse (client, left, right, top, bottom));
690
XMapRaised (dpy, client);
691
WaitForReparentAndMap (dpy, client);
693
/* Send it another frame extents request */
697
SendSetFrameExtentsRequest (client, left, right, top, bottom);
698
ASSERT_TRUE (VerifySetFrameExtentsResponse (client, left, right, top, bottom));
700
/* Check the geometry of the frame */
701
Window frame = GetTopParent (dpy, client);
702
ASSERT_TRUE (VerifyWindowSize (frame,
705
currentWidth + (left + right),
706
currentHeight + (top + bottom)));
708
/* Wrapper geometry is extents.xy, size.wh */
710
Window wrapper = GetImmediateParent (dpy, client, root);
711
ASSERT_TRUE (VerifyWindowSize (wrapper,