Commit Graph

9464 Commits

Author SHA1 Message Date
Uli Schlachter aa21156ced Make sure we always flush after xcb_ungrab_server()
Between xcb_grab_server() and xcb_ungrab_server(), XCB's output buffer
might fill up. Thus, the GrabServer request might already have been sent
to the server, but the following UngrabServer request could end up in
XCB's output buffer. There, it might sit around for quite a while and
cause problems.

Since we cannot detect when XCB's output buffer fills up, we just always
flush after generating an UngrabServer request.

Very-likely-Fixes: https://github.com/awesomeWM/awesome/issues/2697
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-27 10:20:22 +01:00
mergify[bot] 2d2dba0d80
Merge pull request #2643 from psychon/selection_ownership
Add API for setting clipboard contents
2019-02-26 19:57:05 +00:00
Daniel Hahler 4297c2b645
Travis: use discount instead of lua-discount (#2707)
Fixes https://github.com/awesomeWM/awesome/issues/2700.
2019-02-26 13:50:27 +01:00
mergify[bot] 5413396071
Merge pull request #2708 from psychon/remove_old_comment
Remove useless comment from .travis.yml
2019-02-26 10:13:20 +00:00
Uli Schlachter cdff17ef9b Remove useless comment from .travis.yml
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-25 19:38:45 +01:00
Daniel Hahler 01ad63eaaa
Travis: apidoc: fix build URL (#2705) 2019-02-25 13:50:54 +01:00
Emmanuel Lepage Vallée f049046332
Merge pull request #2696 from alfunx/naughty-legacy-resize-on-update
naughty: Resize notification when setting text
2019-02-24 15:12:35 -05:00
Alphonse Mariya 04c9477f73
test: Test notification resizing on text change 2019-02-24 19:46:25 +01:00
mergify[bot] d119a9a20a
Merge pull request #2689 from blueyed/naughty-legacy
Fix naughty legacy wrt to id
2019-02-24 17:46:32 +00:00
Emmanuel Lepage Vallee e9d44e820d test: Test the notification ids 2019-02-24 12:08:50 -05:00
Alphonse Mariya 494474ba0a
naughty: Resize notification when setting text 2019-02-23 18:54:39 +01:00
Emmanuel Lepage Vallee 347d87418b naughty: Always have an id.
Fixes #2678
2019-02-22 11:47:46 -05:00
Emmanuel Lepage Vallee ecec00f425 tests: Disable a test that's invalid 2019-02-22 11:47:46 -05:00
Daniel Hahler 36d7535cd5
Minor: typos, Makefile aesthetics (#2690)
* lib/awful/mouse/resize.lua: s/extendable/extensible

* Fix code comment typo: s/find/found

* Makefile: remove -n with echo

Missed in e9b5e28d1.
2019-02-22 08:42:43 +01:00
mergify[bot] c4ff89a5fe
Merge pull request #2681 from blueyed/luajit-ubuntu
Travis: use luajit from Ubuntu
2019-02-21 06:07:15 +00:00
Daniel Hahler 4c2d0fd4dc
Merge pull request #2669 from psychon/more_idle
Move more stuff from awesome_refresh to g_idle_add
2019-02-21 04:59:27 +01:00
Daniel Hahler 44bbefac38 Travis: use luajit from Ubuntu
It has 2.0.4 there.

Ref: https://packages.ubuntu.com/search?suite=xenial&searchon=names&keywords=luajit
2019-02-21 04:46:30 +01:00
mergify[bot] a0731023e4
Merge pull request #2682 from blueyed/travis-addons
Travis: install via apt addons
2019-02-20 06:59:15 +00:00
mergify[bot] 3cc364cef4
Merge pull request #2673 from alfunx/recolor-toggle_state
beatiful.theme_assets: recolor titlebar icons for `active` and `inactive` states
2019-02-19 23:05:25 +00:00
Alphonse Mariya 00d38b1a2d
beatiful.theme_assets: recolor titlebar icons for `active` and `inactive` states 2019-02-19 23:33:18 +01:00
Daniel Hahler 909ef8f532
Merge pull request #2667 from psychon/test_runner_timeout
tests/_runner: Don't lower timeouts for later steps
2019-02-19 20:44:55 +01:00
Daniel Hahler 31040a62dc Travis: install packages via apt addon, use stagess
- APT::Install-Recommends is good (0)
- Move TEST_PREV_COMMIT to separate stage, can be skipped via
  commit message
2019-02-19 20:04:56 +01:00
mergify[bot] 799650d887
Merge pull request #2671 from psychon/auto_option
CMake: Add "AUTO" state for WITH_DBUS and GENERATE_MANPAGES
2019-02-19 18:50:43 +00:00
mergify[bot] 5908d9e108
Merge pull request #2683 from psychon/naughty_test_gio_dbus2
test-naughty-legacy: Use GDBus instead of spawning dbus-send
2019-02-19 18:47:07 +00:00
Uli Schlachter 828ce1471e test-naughty-legacy: Use GDBus instead of spawning dbus-send
This is inspired to be a correctness fix: The "hints" argument to
notifications is supposed to have type a{sv}, i.e. this maps from string
keys to some generic value. dbus-send does not support this and instead
it sends an argument of type a{ss}, i.e. a mapping from string to
string. This commit fixes this problem and uses the correct type.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-19 18:35:09 +01:00
Uli Schlachter c7cdb0e479 CMake: Add "AUTO" state for WITH_DBUS and GENERATE_MANPAGES
Previously, these options had two possible values: ON and OFF.

Now, they have three possible values: ON, OFF, and AUTO.

OFF still does what it always did: The feature is just disabled.

With ON and AUTO, we check for the feature. The difference is what
happens when the feature could not be enabled, e.g. because some
dependencies is missing: With AUTO, we just disable the feature (this is
what happened previously with ON). However, with ON, CMake aborts and
prints an error.

Implements: Suggestion by Daniel
    https://github.com/awesomeWM/awesome/pull/2665#pullrequestreview-204595138
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-19 07:55:41 +01:00
Daniel Hahler ddf422dd0d
cmake: fix generate-examples/check-examples (#2545) 2019-02-19 00:15:19 +01:00
mergify[bot] 24dbb1de20
Merge pull request #2670 from psychon/endianness_check
Remove AWESOME_IS_BIG_ENDIAN
2019-02-18 16:02:21 +00:00
mergify[bot] 2d0a35c37d
Merge pull request #2668 from blueyed/fix-naughty
Fix extra newline with legacy naughty layout
2019-02-18 14:52:26 +00:00
Uli Schlachter b50559e71b Remove AWESOME_IS_BIG_ENDIAN
This is unused since commit db3b1fe431 from 2010.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-18 13:55:51 +01:00
Uli Schlachter fb147cf856 XKB update: Use an idle source
Instead of updating the keyboard state at the end of the current main
loop iteration, this now uses a GLib idle source with a very low
priority. This increases the chance of batching multiple refreshes
together. Also, this means that awesome_refresh() does less work.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-18 13:45:34 +01:00
Uli Schlachter a22479c97b Screen scanning: Use an idle source
Instead of refreshing screens at the end of the current main loop
iteration, this now uses a GLib idle source with a very low priority.
This increases the chance of batching multiple refreshes together. Also,
this means that awesome_refresh() does less work.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-18 10:42:29 +01:00
Uli Schlachter d1f15f9839 tests/_runner: Don't lower timeouts for later steps
The first step of a test is called 20 times before a failure is
diagnosed. Later steps only get five calls to finish. I guess the idea
is that the first step sets everything up and opens all necessary
clients, while later steps then do something with these clients.

However, looking at our existing tests, they are not structured like
that. Later steps open more clients etc.

Since this limit has no negative impact on the run-time of tests, but
only means that failures are detected later, let's just remove this
limit of five calls.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-18 08:51:10 +01:00
Daniel Hahler 8072d717cf Fix extra newline with legacy naughty layout
Fixes 9df77e5c76 (commitcomment-32354198).
2019-02-18 08:34:59 +01:00
Uli Schlachter 0ce668857e test-selection-transfer: Explain need for wait_a_bit
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-18 07:16:16 +01:00
mergify[bot] 052f6fb89d
Merge pull request #2659 from psychon/luaA_setfuncs
Migrate a bit away from luaL_register().
2019-02-18 01:43:31 +00:00
mergify[bot] 710278c4b9
Merge pull request #2654 from psychon/luajit-xpcall
gears.protected_call: Automatically detect xpcall features
2019-02-18 01:42:40 +00:00
mergify[bot] c3a8ba7065
Merge pull request #2660 from psychon/selection_setup
Move setup of selection() to selection.c
2019-02-18 01:35:32 +00:00
mergify[bot] 8563895284
Merge pull request #2663 from psychon/rng_init
Initialise Lua's pseudo-RNG from C from a good source
2019-02-18 01:34:35 +00:00
mergify[bot] e7a67d300e
Merge pull request #2664 from psychon/naughty_test_print_warning
Some changes to the new naughty test
2019-02-18 01:33:14 +00:00
mergify[bot] fd38e2fb5c
Merge pull request #2658 from psychon/delayed_call_run_now
Add and use gears.timer.run_delayed_calls_now()
2019-02-17 19:25:04 +00:00
Uli Schlachter b73fa1cc28 Reduce scope of data variable
This fixes a warning from Codacy.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-17 18:43:02 +01:00
Emmanuel Lepage Vallée dd3c270819
Print a warning when trying to destroy the same notification multiple time. (#2662)
* notification: Print a warning when destroying more than once.

* doc: Fix a copy paste issue.
2019-02-17 12:36:02 -05:00
Uli Schlachter a54eb67de0 naughty test: Use array-style spawn() calls
When a string is spawned, the C code has to split this into an array for
the execve() syscall. When an array is given directly, this array does
not need to be transformed in any way. This makes it much more clear
what is actually started.

This commit removes some quotation marks that were previously removed by
the C code. For example,

    array:string:1,"four",2,"five",3,"six"

became

    array:string:1,four,2,five,3,six

because otherwise the action was called "four" instead of four and the
test failed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-17 10:30:31 +01:00
Uli Schlachter 083462e0c1 naughty test: Warn about missing dependencies
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-17 10:21:18 +01:00
Uli Schlachter 3a4bf103b3 Initialise Lua's pseudo-RNG from C from a good source
GLib has an internal pseudo-RNG that it initialises from /dev/urandom.
This commit adds code that uses this RNG to initialise various random
number generators that can be used by Lua.

This also removes some Lua code that initialises the random number
generator badly.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-17 10:17:47 +01:00
Uli Schlachter 01bd2d1896 selection_acquire: Change the API to a table
As requested in the review, instead of just having a single string
argument, selection_acquire() now has a table as its argument. It
searches the string under the "selection" key here.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-17 08:00:57 +01:00
Emmanuel Lepage Vallée 698fce9b4e
Merge pull request #2541 from Elv13/xmas_2k18_9
Split naughty along model/view lines and add an extensive test suite
2019-02-16 16:12:39 -05:00
Emmanuel Lepage Vallee 1b4c1e9f1c tests: Test the naughty deprecated APIs 2019-02-16 15:49:39 -05:00
Emmanuel Lepage Vallee db591b50a4 tests: Add extensive tests for the existing notification features.
This new test suit add a rather extensive coverage to the "legacy"
notification popups. A few minor bugs have been found and fixed
and we can rest assured that the new spec 1.2 support and extended
manipulation API wont regress existing configs.
2019-02-16 15:49:39 -05:00