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>
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>
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>
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>
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>
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>
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>
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>
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>
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.