mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
MonitorConfig: Use new UPower API
The "changed" signal was removed. Use "notify" instead to track just the lid-is-closed state.
This commit is contained in:
parent
656d079ffc
commit
a9a10aaa20
@ -76,7 +76,7 @@ MUTTER_PC_MODULES="
|
|||||||
xcomposite >= 0.2 xfixes xrender xdamage xi >= 1.6.0
|
xcomposite >= 0.2 xfixes xrender xdamage xi >= 1.6.0
|
||||||
$CLUTTER_PACKAGE >= 1.15.90
|
$CLUTTER_PACKAGE >= 1.15.90
|
||||||
cogl-1.0 >= 1.15.6
|
cogl-1.0 >= 1.15.6
|
||||||
upower-glib > 0.9.11
|
upower-glib >= 0.99.0
|
||||||
gnome-desktop-3.0
|
gnome-desktop-3.0
|
||||||
"
|
"
|
||||||
|
|
||||||
|
@ -99,8 +99,9 @@ static gboolean meta_monitor_config_assign_crtcs (MetaConfiguration *config,
|
|||||||
GPtrArray *crtcs,
|
GPtrArray *crtcs,
|
||||||
GPtrArray *outputs);
|
GPtrArray *outputs);
|
||||||
|
|
||||||
static void power_client_changed_cb (UpClient *client,
|
static void power_client_changed_cb (UpClient *client,
|
||||||
gpointer user_data);
|
GParamSpec *pspec,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
free_output_key (MetaOutputKey *key)
|
free_output_key (MetaOutputKey *key)
|
||||||
@ -232,7 +233,7 @@ meta_monitor_config_init (MetaMonitorConfig *self)
|
|||||||
self->up_client = up_client_new ();
|
self->up_client = up_client_new ();
|
||||||
self->lid_is_closed = up_client_get_lid_is_closed (self->up_client);
|
self->lid_is_closed = up_client_get_lid_is_closed (self->up_client);
|
||||||
|
|
||||||
g_signal_connect_object (self->up_client, "changed",
|
g_signal_connect_object (self->up_client, "notify::lid-is-closed",
|
||||||
G_CALLBACK (power_client_changed_cb), self, 0);
|
G_CALLBACK (power_client_changed_cb), self, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1344,8 +1345,9 @@ turn_off_laptop_display (MetaMonitorConfig *self,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
power_client_changed_cb (UpClient *client,
|
power_client_changed_cb (UpClient *client,
|
||||||
gpointer user_data)
|
GParamSpec *pspec,
|
||||||
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
MetaMonitorManager *manager = meta_monitor_manager_get ();
|
MetaMonitorManager *manager = meta_monitor_manager_get ();
|
||||||
MetaMonitorConfig *self = user_data;
|
MetaMonitorConfig *self = user_data;
|
||||||
|
Loading…
Reference in New Issue
Block a user