We're often detecting for video regions, but not quite certain of the best way to indicate to the server that we've no longer got video regions being detected, and that we thusly need the server to go back to using fresh heuristics, rather than continuing to 'wait and see' about those that might otherwise be 'up in the air'.
I'm assuming a control channel would be worthwhile, but a dbus call would be especially useful.
Done in r14724 + r14727 fixup, you can reset the video region heuristics using:
xpra control :DISPLAY reset-video-region WINDOWID
ResetVideoRegion(WINDOWID)
This will reset everything except for the exclude regions list.
Did some testing with a trunk Fedora 25 r14735 server and client (two machines, same software versions):
Both the Control Channel and DBUS interfaces work with an important caveat -the control reset-video-region
turns video detection back on whereas the DBUS equivalent does not.
I'll pass back to you to decide:
or
They both turn video region detection back on since the code is the same: the dbus code (ResetVideoRegion
in xpra/server/dbus/dbus_server.py) calls the control interface code method (control_command_reset_video_region
in xpra/server/server_base.py).
Okay that's weird because I compared both methods and using the DBUS didn't reset video regions, whereas using the control channel did.
For a testing method I connected using Firefox with the OpenGL paint boxes on and looped a video on YouTube? - and using the control channels I set the video region to a small square on the top left of the window away from the video. When I reset it with the control channel, the heuristics found the video region immediately where it should be - and when I used the DBUS channel it didn't reset the video region.
I'll play around with it some more today.
Okay, I figured it out - the DBUS function you've provided asks for a Boolean rather than an integer for the $WID - following the server logs with -d dbus
shows that the only values that get passed to the server are 0 or 1 regardless of what I give as input using D-Feet.
I'll attach a screenshot from D-Feet to show what I mean.
Here's a log snippet of me feeding 4,5,6 into D-Feet:
2017-01-10 11:49:04,636 org.xpra.Server.Get(server-idle-timeout)=0 2017-01-10 11:49:04,636 org.xpra.Server.Get(sharing)=False 2017-01-10 11:49:04,636 org.xpra.Server.Get(idle-timeout)=0 2017-01-10 11:49:04,636 org.xpra.Server.Get(name)= 2017-01-10 11:49:04,636 org.xpra.Server.GetAll(org.xpra.Server)={'server-idle-timeout': 0, 'sharing': False, 'idle-timeout': 0, 'name': ''} 2017-01-10 11:49:04,636 org.xpra.Server.ResetVideoRegion(1) 2017-01-10 11:49:07,412 org.xpra.Server.Get(server-idle-timeout)=0 2017-01-10 11:49:07,412 org.xpra.Server.Get(sharing)=False 2017-01-10 11:49:07,412 org.xpra.Server.Get(idle-timeout)=0 2017-01-10 11:49:07,412 org.xpra.Server.Get(name)= 2017-01-10 11:49:07,412 org.xpra.Server.GetAll(org.xpra.Server)={'server-idle-timeout': 0, 'sharing': False, 'idle-timeout': 0, 'name': ''} 2017-01-10 11:49:07,412 org.xpra.Server.ResetVideoRegion(1) 2017-01-10 11:49:09,484 org.xpra.Server.Get(server-idle-timeout)=0 2017-01-10 11:49:09,484 org.xpra.Server.Get(sharing)=False 2017-01-10 11:49:09,484 org.xpra.Server.Get(idle-timeout)=0 2017-01-10 11:49:09,484 org.xpra.Server.Get(name)= 2017-01-10 11:49:09,484 org.xpra.Server.GetAll(org.xpra.Server)={'server-idle-timeout': 0, 'sharing': False, 'idle-timeout': 0, 'name': ''} 2017-01-10 11:49:09,485 org.xpra.Server.ResetVideoRegion(1)
Excellent catch! The windowid should always be a number, fixed in r14755. (and obviously I only tested with a single window, id=1... which fits as a boolean)
The DBUS function works now!
I'll pass back to you with a request to backport this feature to 1.0.
I'll pass back to you with a request to backport this feature to 1.0.
This isn't a bug fix so this isn't really suitable for 1.0, I have added this to the 1.1 queue: wiki/Versions/PendingFixes
See also #1060 for the original SetVideoRegionDetection
and SetVideoRegionEnabled
dbus api calls, and #1295 to exclude part of the window from the video region
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1401