~smspillaz/compiz-core/compiz-core.fix_936675

« back to all changes in this revision

Viewing changes to include/core/modifierhandler.h

There's a lot of refactoring that makes it possible to get PrivateScreen under test. The inital purpose was to get "updatePlugins" under test.

To do this it was necessary to start disentagling the CompScreen interface used by much of the code from the implementation - the result is a CompScreenImpl object that has the actual functionality.

Significantly, it is now possible to mock CompScreen - and a couple of tests for PrivateScreen::updatePlugins are added.

These tests highlight a number of issues with initialisation and cleanup which will be addressed later. But it's probably good to make the refactoring work available for comment sooner rather than later.

I realise that these tests are far from "unit tests" but the interface to PrivateScreen is messy, involving globals, and dependencies on public state. (And at least they don't hit the filesystem.)

Merged from lp:~alan-griffiths/compiz-core/test-PrivateScreen-updatePlugins

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
         */
99
99
        const XModifierKeymap * modMap ();
100
100
 
101
 
        friend class CompScreen;
 
101
        friend class CompScreenImpl;
102
102
 
103
103
    private:
104
104