Commit Graph

9256 Commits

Author SHA1 Message Date
Uli Schlachter b5ca8bf937 example tests: Save expected test output in a txt file
This commit adds a .txt file next to each example test that generates a
text output. This text file contains the expected output and it is an
error if the actual output does not match the expected output. This
means that we no longer have to run the example tests before we can
expand all the @foo@ expressions that occur.

While touching this, I also fixed some typos and unexpected newlines in
the tests' output.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-07-27 08:56:18 +02:00
mergify[bot] 7469e992ff
Merge pull request #2067 from blueyed/doc-fixes
Small batch of doc fixes
2018-07-26 21:53:48 +00:00
Uli Schlachter 0060d1149b .travis.yml: Enable -Werror
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-07-26 09:12:45 +02:00
Uli Schlachter 7db0188cb2 CMake: Use check_symbol_exists instead of check_function_exists
The documentation for the CheckFunctionExists module says that it is
better to use CheckSymbolExists and lists some reasons. For our purpose,
the reason is that check_function_exists is incompatible with -Werror.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-07-26 09:12:40 +02:00
Uli Schlachter ef110361dc Reduce code duplication with luaA_*_call_handler (#2321)
The functions luaA_class_call_handler() and luaA_mouse_call_handler()
are basically identical. Fix this code duplication by moving this to
luaA_call_handler() in lualib.h.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-07-25 18:31:02 -04:00
Daniel Hahler 3876b18240 doc: Add missing C-object documentation and fix some papercuts.
Ref: https://github.com/awesomeWM/awesome/issues/1373
2018-07-25 18:26:11 -04:00
Emmanuel Lepage Vallée 40a55a3d2f
client: Add client_set_startup_id definition (#2318)
Fixes #2309
2018-07-25 18:03:09 -04:00
actionless 492d07a9cd fixup! fix(awful: placement: no_offsceen): use new placement infrastructure
doc(awful: placement: no_offscreen): update comment and print deprecation warning
2018-07-25 14:31:51 +02:00
mergify[bot] e7251011ac
Merge pull request #2314 from Elv13/add_example_generator_options
Add example generator options
2018-07-25 07:15:18 +00:00
Daniel Hahler def50af439
Mergify: do not use strict mode (#2319)
It has the drawback of having intermediate merge commits for when
Mergify merges master before because of this, and then does not
squash-merge or rebases it when merging.
2018-07-25 00:38:13 +02:00
mergify[bot] 522fd2b5cd
Merge pull request #2311 from psychon/example-tests-images
Example tests: Make it explicit what kind of output is expected
2018-07-24 21:50:11 +00:00
Emmanuel Lepage Vallee 4e8d907044 tests: Restore support for newlines in examples
Since last year luacheck change, trailing spaces are no longer
allowed. This caused all documentaiton examples that used them
as a way to mark newlines to look plain wrong.

This commit add an explicit flag to make longer examples more
readable.
2018-07-24 17:22:41 -04:00
Emmanuel Lepage Vallee c340c14cf2 tests: Improve the CMakeLists.txt
* Add a FOLLOW_SYMLINKS so Awesome 3rd party module can share the
  awesome test infrastructure by adding themselves as symlinks in
  `lib/`, `tests/` and `tests/examples` and otherwise use AwesomeWM
  Travis config.

* Add an option to add examples to the C documentation. Previously only
  Lua functions could be documented using this framework.
2018-07-24 17:22:41 -04:00
Uli Schlachter e1a90ecf5b tests/examples: Explicitly mark tests generating text
This is similar to the previous commit, but for text output that is
produced by some test.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-07-24 14:27:41 +02:00
Uli Schlachter 654eecd40d tests/examples: Explicitly mark tests generating an image
This allows to figure out if a test will generate an image without
having to run it. The long term plan for this is to run the tests during
compiling ("make") and not during configuring ("cmake"). Since the list
of files to e.g. install needs to be known during configuring, this
commit is a necessary step in that direction.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-07-24 14:12:44 +02:00
Uli Schlachter efe23dc7d2 tests/examples: Drop support for PNG output images
No currently existing test produces a PNG image, so why do we even check
for such an output file?

I did 'rm -rf build && make -j9 && cp -r build /tmp', then applied this
patch, and then did another 'rm -rf build && make -j9'. According to
diff, the resulting directories are basically the same (except for lots
of timestamps and some non-determinism in CMake).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-07-24 13:49:43 +02:00
actionless fec8d6aa8f fix(awful: placement: no_offsceen): use new placement infrastructure
fix(tests: examples: awful: placement: no_offscreen): uncomment context

fix(awful: placement): common function to remove border from geometries
2018-07-24 07:38:35 +02:00
mergify[bot] 0958a44781
Merge pull request #2306 from psychon/fix-2299
Fix function pointer casts in client.c
2018-07-23 09:57:42 +00:00
mergify-bot 59a6502790 Merge branch 'master' into 'fix-2299' 2018-07-23 11:50:14 +02:00
Emmanuel Lepage Vallée 7e17bcd026
client: Make startup_id writable (#2275)
And document how to use it on Linux to fix broken startup_id
2018-07-23 04:04:07 -04:00
Uli Schlachter 3553838443 Fix function pointer casts in client.c
The getters for properties already get the object as their second
argument, so there is no need to get the object again from Lua.

Fixes: https://github.com/awesomeWM/awesome/issues/2299
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-07-23 03:48:19 -04:00
Yauhen Kirylau 94d3918d14 fix(awful: widget: only_on_screen): update for screen API changes from #2293 (#2304) 2018-07-22 18:33:59 -04:00
Uli Schlachter 6c27f4295b client_manage(): Check that reparenting works (#2298)
When a new client appears, we reparent its window into a window of our
choice so that we can add decorations. However, windows can be difficult
making the reparenting fail. For example, some snapshots of GTK+ set a
parent-relative background, which means that its parent windows have to
have the same depth as the window itself. This makes reparenting fail if
transparency is used/supported.

Make the failure mode... different, by checking if reparenting
succeeded. If it failed, we print an error message and unmanage the
window immediately. This means that those GTK+ windows just do not
appear at all, instead of behaving weirdly.

This idea of this patch came from i3.

Related-to: https://github.com/awesomeWM/awesome/issues/2279
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-07-22 16:05:11 -04:00
Uli Schlachter 3e24303f15 tile: Apply size hints correctly (#2305)
Layouts work with the client's geometry in "space on screen that is
assigned to this client". This means that the geometry should include
decoration (titlebar and borders) and useless gaps.

Everything else (especially the C code) works with client's geometry in
"space that the client can draw on". This means that the titlebar,
borders and the useless gaps are not included into this size.

Thus, when applying size hints, the tile layout has to convert between
these two representations. Otherwise, size hints are applied incorrectly
and to a wrong geometry.

Fixes: https://github.com/awesomeWM/awesome/issues/1418
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-07-21 20:53:30 +02:00
mergify[bot] abf847961e
Merge pull request #2294 from blueyed/kill
awesome.kill: allow negative PIDs (and 0) to support process groups
2018-07-20 14:32:14 +00:00
mergify-bot b3d2e0388e Merge branch 'master' into 'kill' 2018-07-20 16:20:24 +02:00
mergify[bot] f1c8743e52
Merge pull request #2303 from sigprof/remove-systray_cleanup
Remove systray_cleanup() from drawin_systray_kickout() (#2301)
2018-07-20 13:27:06 +00:00
Sergey Vlasov 41e66c16f8 Remove systray_cleanup() from drawin_systray_kickout() (#2301)
The systray_cleanup() function gives up the _NET_SYSTEM_TRAY_Sn
selection ownership and should be called only when Awesome exits.
Calling systray_cleanup() from drawin_systray_kickout() is not correct,
because drawin_systray_kickout() is called when the system tray window
needs to be hidden, including the case when the last tray icon was
removed and the tray became empty.

Fixes: https://github.com/awesomeWM/awesome/issues/2301
Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2018-07-20 14:11:09 +03:00
Daniel Hahler 89bcb8dc20
Merge branch 'master' into kill 2018-07-18 00:20:56 +02:00
mergify[bot] d14e284413
Merge pull request #2297 from sambanks/master
Correct descriptions of border colors
2018-07-12 14:13:04 +00:00
Sam Banks 6e393917e4 Correct descriptions of border colors 2018-07-12 14:30:46 +10:00
Daniel Hahler b3311674d2 awesome.kill: allow negative PIDs (and 0) to support process groups
From `kill(3p)`:

> If pid is greater than 0, sig shall be sent to the process whose
> process ID is equal to pid.

> If pid is 0, sig shall be sent to all processes (excluding an
> unspecified set of system processes) whose process group ID is equal to
> the process group ID of the sender, and for which the process has
> permission to send a signal.

> If pid is −1, sig shall be sent to all processes (excluding an
> unspecified set of system processes) for which the process has
> permission to send that signal.

> If  pid  is  negative,  but not −1, sig shall be sent to all processes
> (excluding an unspecified set of system processes) whose process group
> ID is equal to the absolute value of pid, and for which the process has
> permission to send a signal.
2018-07-04 14:55:51 +02:00
Julien Danjou d7e09a0439
Merge pull request #2277 from psychon/mergify
Add configuration for https://mergify.io
2018-06-28 22:04:20 +02:00
Uli Schlachter 79d7567a1d screen_refresh(): Fake a screen when the last one is removed (#2223)
Thanks to @ewhac for the suggestion.

Fixes: https://github.com/awesomeWM/awesome/issues/2221
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-06-28 15:36:53 +02:00
Kevin Zander 5d2d296e20 Return nil when indexing screen by number 2018-06-28 15:34:44 +02:00
Kevin Zander 20b1594e17 Return nil for screen string index lookup instead of throwing error 2018-06-28 15:33:35 +02:00
Yauhen Kirylau 4bd5b1940d feat(themes; beautiful): add partial support for GTK+3 themes (#2129) 2018-06-26 10:43:20 -04:00
Emmanuel Lepage Vallée 25adaae594
Merge pull request #2266 from ZipFile/fix-no_overlap
Improve no_overlap placement
2018-06-26 10:05:49 -04:00
Uli Schlachter 13984af8aa awful.spawn.read_lines: Shrink input stream buffer when done (#2289)
I do not know how a GDataInputStream / GBufferedInputStream decides
about the size of its internal buffer when reading input by line, but in
issue #2288, an example where the output of date (about 30 bytes) was
read ten times per second caused ten megabytes of memory usage for this
internal buffer. Try to save some memory by explicitly shrinking the
buffer size when we are done reading from the stream.

Reference: https://github.com/awesomeWM/awesome/issues/2288
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-06-26 09:56:32 -04:00
Yauhen Kirylau b77ffa86e0 fix(naughty: core): don't attempt to upscale small icons (#2283) 2018-06-12 21:57:14 -04:00
Uli Schlachter 619d922538 tests/run.sh: Allow setting timeout via $TEST_TIMEOUT (#2281)
This allows to e.g. easily run awesome from source (for an hour) via
TEST_TIMEOUT=42d tests/run.sh /dev/null.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-06-12 13:16:44 -04:00
Piotr Śliwka dc8229fd5a Default config: Unify mouse dragging behavior (#2278)
* Default config: Unify mouse dragging behavior

When moving or resizing a client by dragging its titlebar with mouse,
the client is automatically focused and raised. However, this behavior
is not replicated by tne other dragging method, i.e. grabbing it with
mouse while pressing the modkey. Sometimes, this causes a client to
disappear below another one while moving.

This commit unifies handling of dragging clients with mouse, by ensuring
that the client is focused and raised, whichever dragging method is
used. The fix applies both to moving and resizing clients.

Signed-off-by: Piotr Śliwka <contact@psliwka.info>

* Default config: Fix clientbuttons style

This commit unifies code style of click handling functions defined in
`clientbuttons` table, to match the style introduced in a228696.

Signed-off-by: Piotr Śliwka <contact@psliwka.info>
2018-06-10 01:35:08 +02:00
Uli Schlachter 2e7547a26e Add configuration for https://mergify.io
Fixes: https://github.com/awesomeWM/awesome/issues/2260
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-05-30 10:49:44 +02:00
Emmanuel Lepage Vallée 7e529eeab2
Merge pull request #2273 from Elv13/fix_doc_signals
Fix doc signals
2018-05-28 20:56:17 -04:00
Emmanuel Lepage Vallée 508b1f5ed5
Merge pull request #2272 from barlik/patch-3
Fix incwfact() error with maximized windows
2018-05-28 20:55:59 -04:00
Kevin Zander 05b8836b01 Fix minor issues with calendar_popup (#2269) 2018-05-28 20:54:58 -04:00
Kevin Zander 6615931a6e Enhance tooltip customization options (#2267) 2018-05-28 20:54:14 -04:00
Emmanuel Lepage Vallee f234dcabf6 doc: Add `[deprecated]` after some function names.
It use a little XSS-ish HTML tag injection, but it works
2018-05-28 14:11:41 -04:00
Emmanuel Lepage Vallee c6491e169c doc: Remove the signal name hack 2018-05-28 14:11:41 -04:00
Emmanuel Lepage Vallee 0a2b05dfbb doc: Use the newer LDoc ability to use special handler for objects types
The `@signal` and `@property` are now correctly rendered. The need for
the extra `.` in front of the signal is no longer needed.
2018-05-28 14:11:41 -04:00