~compiz-team/compiz-core/0.9.5

« back to all changes in this revision

Viewing changes to src/timer/src/privatetimeoutsource.h

Fix some of the GLib mainloop implementation in compiz

1. Don't use Glib::RefPtr for sources as they are broken (unref will cause a crash on a destroyed source)
2. Don't g_main_context_iteration in order to flush the event queue
3. Use XFlush instead
4. Handle signals using glib's signal sources so that they are safely dispatched back to the mainloop
5. Enabled failing Xig Tests

Merge lp:~smspillaz/compiz-core/compiz-core.glib-mainloop-fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
{
35
35
    public:
36
36
 
37
 
        static Glib::RefPtr <CompTimeoutSource> create  (Glib::RefPtr <Glib::MainContext> &ctx);
 
37
        virtual ~CompTimeoutSource ();
 
38
 
 
39
        static CompTimeoutSource * create  (Glib::RefPtr <Glib::MainContext> &ctx);
38
40
        sigc::connection connect (const sigc::slot <bool> &slot);
39
41
 
40
42
    protected:
45
47
        bool callback ();
46
48
 
47
49
        explicit CompTimeoutSource (Glib::RefPtr <Glib::MainContext> &ctx);
48
 
        virtual ~CompTimeoutSource ();
49
50
 
50
51
    friend class CompTimer;
51
52
};