mirror of
https://github.com/VallierDev/uu-remote-linux.git
synced 2026-11-16 08:50:40 +01:00
Wayland: a failed output-power handshake must not block screencopy (#65)
Output power management is optional: the engine comment already says so, but uu_wl_wake() only tolerated a *missing* power manager. When the compositor offers zwlr_output_power_manager_v1 and then refuses the mode (headless outputs, outputs without DPMS), power_failed is set and the function reported an error. capture::keep_display_awake() propagates that error and video.rs aborts the whole capture task with '?', so a client could connect but never received a frame. Treat a failed power handshake like a missing one: skip waking the screen and keep streaming.
This commit is contained in:
1 parent
c1b8bfe1b3
commit
c45e4749b5
1 file changed
+5
-1
@@ -601,7 +601,11 @@ end:
|
||||
int uu_wl_wake(void) {
|
||||
pthread_mutex_lock(&lock); int result=-1;
|
||||
/* Output power management is optional; missing it must not block screencopy. */
|
||||
if(initialized && !power) result=0;
|
||||
if(initialized && (!power || power_failed)) {
|
||||
/* No power manager, or the compositor refused the mode (outputs without DPMS,
|
||||
headless outputs): streaming continues, the screen simply stays as it is. */
|
||||
result=0;
|
||||
}
|
||||
if(initialized && power && !power_failed) {
|
||||
zwlr_output_power_v1_set_mode(power,ZWLR_OUTPUT_POWER_V1_MODE_ON);
|
||||
if(sync_display()==0 && !power_failed) result=0;
|
||||
|
||||
Reference in new issue
Block a user