mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-23 05:15:58 +01:00
Retry atomic commit on failure
So we don't lose any previously "good" properties that were set.
This commit is contained in:
parent
0aa00da1f3
commit
6717b78bd6
1 changed files with 7 additions and 0 deletions
|
@ -53,6 +53,13 @@ static bool atomic_commit(int drm_fd, struct atomic *atom,
|
||||||
int ret = drmModeAtomicCommit(drm_fd, atom->req, flags, output);
|
int ret = drmModeAtomicCommit(drm_fd, atom->req, flags, output);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
wlr_log_errno(L_ERROR, "Atomic commit failed");
|
wlr_log_errno(L_ERROR, "Atomic commit failed");
|
||||||
|
|
||||||
|
// Try to commit without new changes
|
||||||
|
drmModeAtomicSetCursor(atom->req, atom->cursor);
|
||||||
|
ret = drmModeAtomicCommit(drm_fd, atom->req, flags, output);
|
||||||
|
if (ret) {
|
||||||
|
wlr_log_errno(L_ERROR, "Atomic commit failed");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
drmModeAtomicSetCursor(atom->req, 0);
|
drmModeAtomicSetCursor(atom->req, 0);
|
||||||
|
|
Loading…
Reference in a new issue