Skip to content

Commit

Permalink
boost larger areas a bit more, prevents smaller areas covering the sa…
Browse files Browse the repository at this point in the history
…me percentage of the window from winning (ie: glxgears window made larger, larger area should win)

git-svn-id: https://xpra.org/svn/Xpra/trunk@13447 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Aug 23, 2016
1 parent acc89b5 commit 178a213
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/xpra/server/window/video_subregion.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ def scoreinout(region, incount, outcount):
inwindow = float(width*height) / (ww*wh)
ratio = inregion / inwindow
sizeboost = 1+inwindow
return int(100 * ratio**sizeboost)
sslog("scoreinout(%s, %i, %i) inregion=%.3f, inwindow=%.3f, ratio=%.3f, sizeboost=%.3f", region, incount, outcount, inregion, inwindow, ratio, sizeboost)
return int(sizeboost*5 + 100 * ratio**sizeboost)

def score_region(info, region, ignore_size=0):
#check if the region given is a good candidate, and if so we use it
Expand Down

0 comments on commit 178a213

Please sign in to comment.