forked from enlightenment/enlightenment
randr: store connection status in output
This commit is contained in:
parent
2e7964794b
commit
52751092f5
|
@ -377,7 +377,6 @@ _e_randr_load(void)
|
||||||
{
|
{
|
||||||
E_Config_Randr_Output *output_cfg = NULL;
|
E_Config_Randr_Output *output_cfg = NULL;
|
||||||
E_Randr_Output *output = NULL;
|
E_Randr_Output *output = NULL;
|
||||||
Ecore_X_Randr_Connection_Status status;
|
|
||||||
|
|
||||||
output_cfg = _e_randr_config_output_find(outputs[j]);
|
output_cfg = _e_randr_config_output_find(outputs[j]);
|
||||||
if (!output_cfg)
|
if (!output_cfg)
|
||||||
|
@ -392,10 +391,10 @@ _e_randr_load(void)
|
||||||
output->name = _e_randr_output_name_get(root, output->cfg->xid);
|
output->name = _e_randr_output_name_get(root, output->cfg->xid);
|
||||||
output->is_lid = _e_randr_is_lid(output);
|
output->is_lid = _e_randr_is_lid(output);
|
||||||
|
|
||||||
status = ecore_x_randr_output_connection_status_get(root, output->cfg->xid);
|
output->status = ecore_x_randr_output_connection_status_get(root, output->cfg->xid);
|
||||||
|
|
||||||
/* find a crtc if we want this output connected */
|
/* find a crtc if we want this output connected */
|
||||||
if (output->cfg->connect && (status == ECORE_X_RANDR_CONNECTION_STATUS_CONNECTED))
|
if (output->cfg->connect && (output->status == ECORE_X_RANDR_CONNECTION_STATUS_CONNECTED))
|
||||||
{
|
{
|
||||||
E_Randr_Crtc *crtc;
|
E_Randr_Crtc *crtc;
|
||||||
|
|
||||||
|
@ -667,6 +666,7 @@ _e_randr_event_cb_output_change(void *data EINA_UNUSED, int type EINA_UNUSED, vo
|
||||||
output->is_lid = _e_randr_is_lid(output);
|
output->is_lid = _e_randr_is_lid(output);
|
||||||
changed = EINA_TRUE;
|
changed = EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
output->status = ev->connection;
|
||||||
|
|
||||||
/* we know this output */
|
/* we know this output */
|
||||||
if (output->is_lid && _e_randr_lid_is_closed)
|
if (output->is_lid && _e_randr_lid_is_closed)
|
||||||
|
|
|
@ -49,6 +49,7 @@ struct _E_Randr_Output
|
||||||
char *name; // name of output
|
char *name; // name of output
|
||||||
Eina_Bool is_lid; // is this a laptop panel
|
Eina_Bool is_lid; // is this a laptop panel
|
||||||
Eina_Bool active; // if this output is active
|
Eina_Bool active; // if this output is active
|
||||||
|
Ecore_X_Randr_Connection_Status status;
|
||||||
|
|
||||||
E_Config_Randr_Output *cfg;
|
E_Config_Randr_Output *cfg;
|
||||||
E_Randr_Crtc *crtc;
|
E_Randr_Crtc *crtc;
|
||||||
|
|
Loading…
Reference in New Issue