Skip to content

Commit

Permalink
#1232: make min scroll percentage configurable with XPRA_SCROLL_MIN_P…
Browse files Browse the repository at this point in the history
…ERCENT

git-svn-id: https://xpra.org/svn/Xpra/trunk@12921 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jun 27, 2016
1 parent b495f4c commit 6ef06ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/xpra/server/window/window_video_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def envint(name, d):
VIDEO_SKIP_EDGE = envint("XPRA_VIDEO_SKIP_EDGE", 0)==1
SCROLL_ENCODING = envint("XPRA_SCROLL_ENCODING", 0)==1
SAVE_SCROLL = envint("XPRA_SAVE_SCROLL", 0)==1
SCROLL_MIN_PERCENT = max(1, min(100, envint("XPRA_SCROLL_MIN_PERCENT", 40)))


class WindowVideoSource(WindowSource):
Expand Down Expand Up @@ -1502,7 +1503,7 @@ def video_fallback():
best_pct = int(100*best/height)
scrolllog("best scroll guess took %ims, matches %i%% of %i lines: %s", (end-start)*1000, best_pct, height, scroll)
#at least 40% of the picture was found as scroll areas:
if best_pct>=40:
if best_pct>=SCROLL_MIN_PERCENT:
return self.encode_scrolling(last_image, image, distances, lcsums, csums, options)
except Exception:
scrolllog.error("Error during scrolling detection!", exc_info=True)
Expand Down

0 comments on commit 6ef06ad

Please sign in to comment.