Commit 8665784c authored by Alberts Muktupāvels's avatar Alberts Muktupāvels
Browse files

backends: keep a pointer to the monitor manager in GfCrtc

Based on mutter commit:
mutter@cfee5879
parent bb92dac1
......@@ -29,6 +29,7 @@
#include "gf-monitor-manager-enums-private.h"
#include "gf-monitor-manager-types-private.h"
#include "gf-monitor-manager.h"
#include "gf-rectangle.h"
G_BEGIN_DECLS
......@@ -37,6 +38,8 @@ struct _GfCrtc
{
GObject parent;
GfMonitorManager *monitor_manager;
glong crtc_id;
GfRectangle rect;
GfCrtcMode *current_mode;
......@@ -88,6 +91,8 @@ G_DECLARE_FINAL_TYPE (GfCrtc, gf_crtc, GF, CRTC, GObject)
#define GF_TYPE_CRTC_MODE (gf_crtc_mode_get_type ())
G_DECLARE_FINAL_TYPE (GfCrtcMode, gf_crtc_mode, GF, CRTC_MODE, GObject)
GfMonitorManager *gf_crtc_get_monitor_manager (GfCrtc *crtc);
G_END_DECLS
#endif
......@@ -48,3 +48,9 @@ static void
gf_crtc_init (GfCrtc *crtc)
{
}
GfMonitorManager *
gf_crtc_get_monitor_manager (GfCrtc *crtc)
{
return crtc->monitor_manager;
}
......@@ -1624,6 +1624,7 @@ gf_monitor_manager_xrandr_read_current (GfMonitorManager *manager)
xrandr_crtc = XRRGetCrtcInfo (xrandr->xdisplay, resources, resources->crtcs[i]);
crtc = g_object_new (GF_TYPE_CRTC, NULL);
crtc->monitor_manager = manager;
crtc->crtc_id = resources->crtcs[i];
crtc->rect.x = xrandr_crtc->x;
crtc->rect.y = xrandr_crtc->y;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment