MonitorManager: split the XRandR parts in a subclass

Instead of keeping a forest of if backend else ..., use a subclass
and virtual functions to discriminate between XRandR and the
dummy backend (which lives in the parent class togheter with the
common code)

https://bugzilla.gnome.org/show_bug.cgi?id=705670
This commit is contained in:
Giovanni Campagna
2013-07-29 13:00:15 +02:00
committed by Giovanni Campagna
parent 5086626805
commit 46de0ed462
6 changed files with 1034 additions and 980 deletions

View File

@@ -40,23 +40,11 @@
#include <clutter/clutter.h>
#include <libupower-glib/upower.h>
#ifdef HAVE_RANDR
#include <X11/extensions/Xrandr.h>
#include <X11/extensions/dpms.h>
#endif
#include <meta/main.h>
#include <meta/errors.h>
#include "monitor-private.h"
#ifdef HAVE_WAYLAND
#include "meta-wayland-private.h"
#endif
#include "meta-dbus-xrandr.h"
#define ALL_WL_TRANSFORMS ((1 << (WL_OUTPUT_TRANSFORM_FLIPPED_270 + 1)) - 1)
/* These two structures represent the intended/persistent configuration,
/* These structures represent the intended/persistent configuration,
as stored in the monitors.xml file.
*/