monitor-manager-xrandr: Use CurrentTime when applying configurations
This is what the xrandr CLI tool does and will allow us to do less work when we get RRScreenChangeNotify events. https://bugzilla.gnome.org/show_bug.cgi?id=738630
This commit is contained in:
parent
b3821c4f90
commit
016b8f5b4a
1 changed files with 3 additions and 5 deletions
|
@ -57,7 +57,6 @@ struct _MetaMonitorManagerXrandr
|
||||||
|
|
||||||
Display *xdisplay;
|
Display *xdisplay;
|
||||||
XRRScreenResources *resources;
|
XRRScreenResources *resources;
|
||||||
int time;
|
|
||||||
int rr_event_base;
|
int rr_event_base;
|
||||||
int rr_error_base;
|
int rr_error_base;
|
||||||
};
|
};
|
||||||
|
@ -413,7 +412,6 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
manager_xrandr->resources = resources;
|
manager_xrandr->resources = resources;
|
||||||
manager_xrandr->time = resources->configTimestamp;
|
|
||||||
manager->n_outputs = resources->noutput;
|
manager->n_outputs = resources->noutput;
|
||||||
manager->n_crtcs = resources->ncrtc;
|
manager->n_crtcs = resources->ncrtc;
|
||||||
manager->n_modes = resources->nmode;
|
manager->n_modes = resources->nmode;
|
||||||
|
@ -747,7 +745,7 @@ meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager,
|
||||||
XRRSetCrtcConfig (manager_xrandr->xdisplay,
|
XRRSetCrtcConfig (manager_xrandr->xdisplay,
|
||||||
manager_xrandr->resources,
|
manager_xrandr->resources,
|
||||||
(XID)crtc->crtc_id,
|
(XID)crtc->crtc_id,
|
||||||
manager_xrandr->time,
|
CurrentTime,
|
||||||
0, 0,
|
0, 0,
|
||||||
None,
|
None,
|
||||||
RR_Rotate_0,
|
RR_Rotate_0,
|
||||||
|
@ -777,7 +775,7 @@ meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager,
|
||||||
XRRSetCrtcConfig (manager_xrandr->xdisplay,
|
XRRSetCrtcConfig (manager_xrandr->xdisplay,
|
||||||
manager_xrandr->resources,
|
manager_xrandr->resources,
|
||||||
(XID)crtc->crtc_id,
|
(XID)crtc->crtc_id,
|
||||||
manager_xrandr->time,
|
CurrentTime,
|
||||||
0, 0,
|
0, 0,
|
||||||
None,
|
None,
|
||||||
RR_Rotate_0,
|
RR_Rotate_0,
|
||||||
|
@ -860,7 +858,7 @@ meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager,
|
||||||
ok = XRRSetCrtcConfig (manager_xrandr->xdisplay,
|
ok = XRRSetCrtcConfig (manager_xrandr->xdisplay,
|
||||||
manager_xrandr->resources,
|
manager_xrandr->resources,
|
||||||
(XID)crtc->crtc_id,
|
(XID)crtc->crtc_id,
|
||||||
manager_xrandr->time,
|
CurrentTime,
|
||||||
crtc_info->x, crtc_info->y,
|
crtc_info->x, crtc_info->y,
|
||||||
(XID)mode->mode_id,
|
(XID)mode->mode_id,
|
||||||
meta_monitor_transform_to_xrandr (crtc_info->transform),
|
meta_monitor_transform_to_xrandr (crtc_info->transform),
|
||||||
|
|
Loading…
Reference in a new issue