Commit Graph

17 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee e088fe9aed tests: Improve the awful.screenshot test coverage. 2022-11-13 17:35:32 -08:00
Emmanuel Lepage Vallee f55a334972 awful.screenshot: Add a delay feature.
This can also act as an auto-save feature if the delay is zero. It
also adds more signals. These signals are intended for creating
notifications. `awful` cannot safely depend on `naughty`, so this
intergration will have to be done by the users.
2022-11-13 17:35:32 -08:00
Emmanuel Lepage Vallee b7dcece40c awful.screenshot: Add keyboard support. 2022-11-13 16:53:32 -08:00
Emmanuel Lepage Vallee aca9136b02 screenshot: Cleanup the API.
* Fix all warnings
 * Make indentation consistent across the file
 * Simplify/unify the validation (use `error()` rather
   than try to silently fix problems, move to setters)
   and fallback code (move to the getters rather than...
   everywhere)
 * Write the documentation
 * Finish the tests
 * Remove unnecessary constructors
 * Remove path builder because it belongs in
   `gears.filesystem` and wasn't really used anyway
 * Add more properties and a beautiful variable to
   replace `set_defaults` and hardcoded values.
 * Replace callbacks with signals (common pattern
   in modern AwesomeWM APIs)
 * Moved from `os.date` to GLib and some boilerplate
   code to make Debian devs less angry
 * Changed the way the snipping tool selection wibox works.
   Now it freeze the screenshot before the selection.
   The old way had a bunch of side effects for things
   like Qt/GTK comboboxes. It also could crash.
2022-11-13 16:53:32 -08:00
Brian Sobulefsky 37ec7cd173 Clean up logging from Lua 5.1 and 5.2 error debug. Add a little more
test coverage.
2022-11-13 16:53:32 -08:00
Brian Sobulefsky 00925a3039 Keep debugging lua on GitHub. 2022-11-13 16:53:32 -08:00
Brian Sobulefsky 036b4551c7 Add more descriptive error message to screenshot test. 2022-11-13 16:53:32 -08:00
Brian Sobulefsky 75943e788b Add some more test coverage to get this PR to the requisite 91%. 2022-11-13 16:53:32 -08:00
Brian Sobulefsky 8f7750e6f2 Add tests for the snipper tool and the snip (defined geometry) routine
to increase test coverage.
2022-11-13 16:53:32 -08:00
Brian Sobulefsky 1fdefad750 Fix the failed test case and some issues regarding variable naming.
There will still be one more commit to replace some of the screenshot
module code with available functionality from gears (e.g. the filesystem
module).
2022-11-13 16:53:32 -08:00
Brian Sobulefsky 5a7faa0010 Develop the awful.screenshot module into an object oriented format. Add
tests for the awful.screenshot module.
2022-11-13 16:53:32 -08:00
Aire-One 1f4ce1f4cb fix: flush instead of finish
Co-authored-by: Uli Schlachter <psychon@znc.in>
Co-authored-by: ezz666 <ezz666@yandex.ru>
2021-10-15 18:25:04 +02:00
Aire-One 6d569f9e3b fixup! fix(root) copy_to_image_surface parameters 2021-10-12 21:48:56 +02:00
Aire-One 96710a595e fix(root) copy_to_image_surface parameters 2021-10-12 21:05:41 +02:00
Yauhen Kirylau aedcd0c05c
test(screenshots, spawn): require exact major gtk/gdk versions (#3460) 2021-10-09 16:36:17 -07:00
Aire-One eb89c3688c Update screen.lua 2021-10-04 19:49:22 -07:00
Brian Sobulefsky 4f0c3c5d90 Add tests for the new content API. This includes tests for root.content(),
screen.content, and client.content. Run with TESTS_SCREEN_SIZE set equal
to 1280x800. This test suite will be expanded once the more user
friendly awful.screenshot API is merged.

Signed off: Brian Sobulefsky <brian.sobulefsky@protonmail.com>
2021-10-04 19:49:22 -07:00