If you entered a multi-byte character into a prompt and then changed your mind
and used backspace to fix the character, only the last byte of the character was
removed. Because pango is intelligent, it noticed the broken utf8 and
complained.
So far nothing new. But since 711d78b50c the textbox will throw a lua error
when it gets an invalid text (= pango complains). Throwing an unprotected lua
error in this context causes the keygrabber to be killed which stops the prompt.
Fix this by removing bytes as long as there are bytes left that can be removed.
This is FS#801.
Signed-off-by: Uli Schlachter <psychon@znc.in>
As with the previous commit, signals on objects will also be emitted on the
appropriate class. This can be used for out ewmh stuff, too.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Since 3fbb5f1535 "luaobject: emit signals on class too" when a signal
is emitted on some object, it will also be emitted on the class. This means that
we don't have to connect our signals via the "new" signal anymore, but can
instead connect to the signal on the class.
(Of course, the signal on the class gets as first argument the object on which
the signal was emitted)
Signed-off-by: Uli Schlachter <psychon@znc.in>
This function is also called from unprotected C contexts and there shouldn't be
any reason why this really has to be fatal.
A warning makes you lose less sessions. ;)
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit makes it an error if an unknown signal is connected, disconnected or
emitted. All signals have to be added before they can be used.
Signed-off-by: Uli Schlachter <psychon@znc.in>
If a library is in a non-standard path, the linker needs an extra argument so
that it knows how to find this library: -L/path/to/lib
pkg_check_modules() sets _LIBRARIES only to the library's name, but _LDFLAGS
also contains a -L flag if one was found.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This reverts commit 27f9c0177a.
This commit broke code like the following because reading client.focus would
still return the previously focused client:
awful.client.focus.byidx(1)
if client.focus then client.focus:raise() end
This moves the appropriate fields for client focus from screen_t to globalconf
since only the first screen's fields were used anyway.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This makes awesome support only a single X11 protocol screen. If you are still
using zaphod mode, you can run multiple instances of awesome on the single
screens, e.g.:
DISPLAY=:1.0 awesome & DISPLAY=:1.1 awesome &
Signed-off-by: Uli Schlachter <psychon@znc.in>
Previously, cmake aborted when execinfo was not found. With this commit the
backtrace code is just disabled when execinfo is not available.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Previously, if a client had nofocus == true, it wasn't unminimized if sth tried
to focus it. Also, if this client had the WM_TAKE_FOCUS protocol, the focusing
would fail since it's an error to set the input focus to an unviewable window.
For consistency, this also moves the code that sets a client's minimized
property to false into client_unban() since it doesn't make sense to have a
minimized client unbanned (i.e. visible).
Signed-off-by: Uli Schlachter <psychon@znc.in>
If this property is true, setting "client.focus" to this client might have some
effect. If it is false, setting "client.focus" will be ignored completely.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This reverts commit 0682499895.
We have to handle all the UnmapNotifies due to ICCCM. The bug this was trying to
fix is now fixed by 9ab8cd4039 ("Set our event
mask on the root window later") instead.
This moves the setting of the event mask after scan() so that we won't receive
any events from scan()'s activity (especially no UnmapNotifies which would cause
us to lose clients).
Signed-off-by: Uli Schlachter <psychon@znc.in>
Ever since awesome.spawn() also returns the pid of the started process, the
prompt accidentally displayed the pid of processes that it started.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The old code used the wrong constants which meant we always returned "word" for
wrap and "end" for ellipsize.
Signed-off-by: Uli Schlachter <psychon@znc.in>