~brandontschaefer/compiz/lp1002246_fix

« back to all changes in this revision

Viewing changes to tests/system/xorg-gtest/include/compiz-xorg-gtest.h

Send cached geometry and "none" as the stack-sibling in synthetic configure notify effects.

We don't need to grab the server and query for the current geometry and stack position, upon reading section 4.1.5 of the ICCCM, it seems that clients don't need to know about the stack sibling in synthetic ConfigureNotify events (and other window managers don't do this either).

This really helps with performance, since we're not constantly blocking on the server to process our geometry updates.

(First commit of many, required to fix LP: #1027211). Fixes: https://bugs.launchpad.net/bugs/1027211.

Approved by Daniel van Vugt, PS Jenkins bot, MC Return.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include <xorg/gtest/xorg-gtest.h>
30
30
 
31
31
using ::testing::MatcherInterface;
 
32
using ::testing::MatchResultListener;
32
33
 
33
34
namespace compiz
34
35
{
36
37
    {
37
38
        typedef  ::testing::MatcherInterface <const XEvent &> XEventMatcher;
38
39
 
 
40
        class PrivatePropertyNotifyXEventMatcher;
 
41
        class PropertyNotifyXEventMatcher :
 
42
            public compiz::testing::XEventMatcher
 
43
        {
 
44
            public:
 
45
 
 
46
                PropertyNotifyXEventMatcher (Display *dpy,
 
47
                                             const std::string &propertyName);
 
48
 
 
49
                virtual bool MatchAndExplain (const XEvent &event, MatchResultListener *listener) const;
 
50
                virtual void DescribeTo (std::ostream *os) const;
 
51
 
 
52
            private:
 
53
 
 
54
                std::auto_ptr <PrivatePropertyNotifyXEventMatcher> priv;
 
55
        };
 
56
 
 
57
        class PrivateConfigureNotifyXEventMatcher;
 
58
        class ConfigureNotifyXEventMatcher :
 
59
            public compiz::testing::XEventMatcher
 
60
        {
 
61
            public:
 
62
 
 
63
                ConfigureNotifyXEventMatcher (Window       above,
 
64
                                              unsigned int border,
 
65
                                              int          x,
 
66
                                              int          y,
 
67
                                              unsigned int width,
 
68
                                              unsigned int height);
 
69
 
 
70
                virtual bool MatchAndExplain (const XEvent &event, MatchResultListener *listener) const;
 
71
                virtual void DescribeTo (std::ostream *os) const;
 
72
 
 
73
            private:
 
74
 
 
75
                std::auto_ptr <PrivateConfigureNotifyXEventMatcher> priv;
 
76
        };
 
77
 
 
78
        Window CreateNormalWindow (Display *dpy);
 
79
 
39
80
        std::list <Window> NET_CLIENT_LIST_STACKING (Display *);
40
81
        bool AdvanceToNextEventOnSuccess (Display *dpy,
41
82
                                          bool waitResult);