wm: Screenshot user-selectable region on Ctrl-Shift-F5.
I am tired of scp-ing screenshots and running Gimp to crop
them whenever I'm filing a bug. This adds a --region flag
to the screenshot program, triggering an interactive mode
where a box can be dragged to take a screenshot. Escape
aborts.
I think that the usual way to do rubber-banding is by
grabbing the server and painting on the root window with an
inverting GC, but I don't think that that'll work with a
compositing window manager. This code just uses four
windows to draw black and white borders around the region
instead.
BUG=none
TEST=manual
Change-Id: If6ebc4efe09413542a8d8f7b131dae8111c5c814
Reviewed-on: http://gerrit.chromium.org/gerrit/4198
Reviewed-by: Daniel Erat <derat@chromium.org>
Tested-by: Daniel Erat <derat@chromium.org>
4 files changed