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

backends: keep a pointer to the monitor manager in GfOutput

Based on mutter commit:
mutter@e0d839ae
parent 5612c9d4
......@@ -1664,6 +1664,7 @@ gf_monitor_manager_xrandr_read_current (GfMonitorManager *manager)
GBytes *edid;
output = g_object_new (GF_TYPE_OUTPUT, NULL);
output->monitor_manager = manager;
output->winsys_id = resources->outputs[i];
output->name = g_strdup (xrandr_output->name);
......
......@@ -29,6 +29,7 @@
#include "gf-monitor-manager-enums-private.h"
#include "gf-monitor-manager-types-private.h"
#include "gf-monitor-manager.h"
G_BEGIN_DECLS
......@@ -54,65 +55,70 @@ typedef struct
struct _GfOutput
{
GObject parent;
GObject parent;
GfMonitorManager *monitor_manager;
/* The CRTC driving this output, NULL if the output is not enabled */
GfCrtc *crtc;
GfCrtc *crtc;
/* The low-level ID of this output, used to apply back configuration */
glong winsys_id;
gchar *name;
gchar *vendor;
gchar *product;
gchar *serial;
gint width_mm;
gint height_mm;
glong winsys_id;
gchar *name;
gchar *vendor;
gchar *product;
gchar *serial;
gint width_mm;
gint height_mm;
GfConnectorType connector_type;
GfConnectorType connector_type;
GfCrtcMode *preferred_mode;
GfCrtcMode **modes;
guint n_modes;
GfCrtcMode *preferred_mode;
GfCrtcMode **modes;
guint n_modes;
GfCrtc **possible_crtcs;
guint n_possible_crtcs;
GfCrtc **possible_crtcs;
guint n_possible_crtcs;
GfOutput **possible_clones;
guint n_possible_clones;
GfOutput **possible_clones;
guint n_possible_clones;
gint backlight;
gint backlight_min;
gint backlight_max;
gint backlight;
gint backlight_min;
gint backlight_max;
/* Used when changing configuration */
gboolean is_dirty;
gboolean is_dirty;
/* The low-level bits used to build the high-level info in GfLogicalMonitor */
gboolean is_primary;
gboolean is_presentation;
gboolean is_underscanning;
gboolean supports_underscanning;
gboolean is_primary;
gboolean is_presentation;
gboolean is_underscanning;
gboolean supports_underscanning;
gpointer driver_private;
GDestroyNotify driver_notify;
gpointer driver_private;
GDestroyNotify driver_notify;
/* Get a new preferred mode on hotplug events, to handle
* dynamic guest resizing
*/
gboolean hotplug_mode_update;
gint suggested_x;
gint suggested_y;
gboolean hotplug_mode_update;
gint suggested_x;
gint suggested_y;
GfTileInfo tile_info;
GfTileInfo tile_info;
};
#define GF_TYPE_OUTPUT (gf_output_get_type ())
G_DECLARE_FINAL_TYPE (GfOutput, gf_output, GF, OUTPUT, GObject)
void gf_output_parse_edid (GfOutput *output,
GBytes *edid);
GfMonitorManager *gf_output_get_monitor_manager (GfOutput *output);
void gf_output_parse_edid (GfOutput *output,
GBytes *edid);
gboolean gf_output_is_laptop (GfOutput *output);
gboolean gf_output_is_laptop (GfOutput *output);
G_END_DECLS
......
......@@ -68,6 +68,12 @@ gf_output_init (GfOutput *output)
{
}
GfMonitorManager *
gf_output_get_monitor_manager (GfOutput *output)
{
return output->monitor_manager;
}
void
gf_output_parse_edid (GfOutput *output,
GBytes *edid)
......
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