Skip to content

Commit

Permalink
Respect the order in which -b and -w are given
Browse files Browse the repository at this point in the history
With this, only -w specified after -b will include window borders.
This enables the user to include borders for only some of the windows.

This can also be a double-edged sword, in that now the user has finer
control, but (s)he must be fully aware of the effects of the order in
which options are given.  Yes, you should.
However, the user will most likely want to specify -b at the very
first, which gives the old behavior of a "global" switch.
  • Loading branch information
ropery committed Oct 17, 2011
1 parent 13e9fc8 commit 170f5f5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ffcast.bash
Expand Up @@ -216,7 +216,7 @@ Usage: ${0##*/} [arguments] [ffmpeg command]
Arguments:
-s select a rectangular region by mouse
-w select a window by mouse click
-b include borders of selected window
-b include window borders hereafter
-m trim selected region to be mod 16
-p print region geometry only
-l list supported screencast commands
Expand Down Expand Up @@ -281,7 +281,7 @@ while getopts 'bhlmpqsvw' opt; do
region_select_action+='w'
;;
b)
borderless=0
region_select_action+='b'
;;
p)
print_geometry_only=1
Expand Down Expand Up @@ -333,6 +333,10 @@ while read -n 1; do
corners_list[i++]=$(select_window_get_corners)
debug "corners: %s" "${corners_list[-1]}"
;;
'b')
borderless=0
debug "windows: now including borders"
;;
esac
done <<< "$region_select_action"

Expand Down

0 comments on commit 170f5f5

Please sign in to comment.