~ubuntu-branches/ubuntu/oneiric/compiz/oneiric

« back to all changes in this revision

Viewing changes to src/privatestackdebugger.h

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2011-09-22 14:49:10 UTC
  • mfrom: (0.168.11 upstream)
  • Revision ID: package-import@ubuntu.com-20110922144910-gb11l2dir5s7zh4d
Tags: 1:0.9.5.94+bzr20110919-0ubuntu1
* New upstream snapshot:
  - "maximized windows fail to update their input extents when undecorated"
    (LP: #853734)
  - Panel shadow conflicts with Window shadow in Ubuntu Classic Desktop
    Session (LP: #731685)
  - "unity-window-decorator: When switching between windows, Orca does not
    speak the title of the focused window (LP: #724093)
  - Dash and launcher appear underneath windows (LP: #805087)
  - A minimized window 'remains' behind on the desktop if
    /apps/<…>/show_minimized_windows is set to true (LP: #847967)
  - compiz and X can disagree on stacking order (LP: #845765)
  - Should keep a list last sent and last recv from server (LP: #841727)
  - Minimize animation flickr when for maximized apps (LP: #737125)
  - Dash and launcher appear underneath windows (LP: #805087)
  - Stacking problem when switching between apps with multiple windows
    (LP: #802527)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright © 2011 Canonical Ltd.
 
3
 *
 
4
 * Permission to use, copy, modify, distribute, and sell this software
 
5
 * and its documentation for any purpose is hereby granted without
 
6
 * fee, provided that the above copyright notice appear in all copies
 
7
 * and that both that copyright notice and this permission notice
 
8
 * appear in supporting documentation, and that the name of
 
9
 * Canonical Ltd. not be used in advertising or publicity pertaining to
 
10
 * distribution of the software without specific, written prior permission.
 
11
 * Canonical Ltd. makes no representations about the suitability of this
 
12
 * software for any purpose. It is provided "as is" without express or
 
13
 * implied warranty.
 
14
 *
 
15
 * CANONICAL, LTD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 
16
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
 
17
 * NO EVENT SHALL CANONICAL, LTD. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
 
18
 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
 
19
 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
 
20
 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
 
21
 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
22
 *
 
23
 * Authored by: Sam Spilsbury <sam.spilsbury@canonical.com>
 
24
 */
 
25
 
 
26
/* FIXME: Define CompWindowList somewhere else
 
27
 * so that this can be come a truly standalone
 
28
 * object */
 
29
#include <core/core.h>
 
30
 
 
31
#ifndef _COMPIZ_PRIVATESTACKDEBUGGER_H
 
32
#define _COMPIZ_PRIVATESTACKDEBUGGER_H
 
33
 
 
34
class StackDebugger
 
35
{
 
36
    public:
 
37
 
 
38
        typedef std::list<XEvent> eventList;
 
39
 
 
40
        StackDebugger (Display *, Window, boost::function<eventList ()> evProc);
 
41
        ~StackDebugger ();
 
42
 
 
43
        eventList loadStack (CompWindowList &serverWindows, bool wait = false);
 
44
        void windowsChanged (bool change) { mWindowsChanged = change; };
 
45
        void serverWindowsChanged (bool change) { mServerWindowsChanged = change; };
 
46
        bool windowsChanged () { return mWindowsChanged; }
 
47
        bool serverWindowsChanged () { return mServerWindowsChanged; }
 
48
        void overrideRedirectRestack (Window toplevel, Window sibling);
 
49
        void removeServerWindow (Window);
 
50
        void addDestroyedFrame (Window);
 
51
        void removeDestroyedFrame (Window);
 
52
        bool stackChange ();
 
53
        bool cmpStack (CompWindowList &windows,
 
54
                       CompWindowList &serverWindows,
 
55
                       bool verbose = false);
 
56
        bool timedOut ();
 
57
 
 
58
        bool checkSanity (CompWindowList &serverWindows, bool verbose = false);
 
59
 
 
60
        static StackDebugger * Default ();
 
61
        static void SetDefault (StackDebugger *);
 
62
 
 
63
    private:
 
64
 
 
65
        std::list <Window> mDestroyedFrames;
 
66
 
 
67
        unsigned int mServerNChildren;
 
68
        Window       *mServerChildren;
 
69
        bool         mWindowsChanged;
 
70
        bool         mServerWindowsChanged;
 
71
        Window       mRoot;
 
72
        Display      *mDpy;
 
73
        boost::function<eventList ()> getEventsProc;
 
74
        bool         mTimeoutRequired;
 
75
        CompWindowList mLastServerWindows;
 
76
};
 
77
 
 
78
#endif