This makes the screen objects use our existing infrastructure for implementing
classes and objects with lua instead of hand-rolling an own version.
This results in some small API change: Screen objects no longer have an
add_signal() function and instead this function exists on the parent screen
class.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Setting mouse.screen moves the pointer to the top left corner of that screen.
However, the very next line would then move the pointer elsewhere again. Thus,
the first one wasn't needed at all.
Signed-off-by: Uli Schlachter <psychon@znc.in>
No callers expect a nil result from this function. In fact, this broke
awful.tooltip because it tried to get the workarea of screen nil.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The wrong module names were introduced in commits:
0e2960ebf3 and
d799ac76aa.
Once fixed, client.lua and screen.lua mutually require each other, so we must
use a trick, and load the modules inside the functions that need them.
Signed-off-by: Uli Schlachter <psychon@znc.in>
When changing focus to an other screen, awful.screen.focus keeps relative
position of the cursor, instead of moving to the top left corner. Does not
trigger mouse:enter and mouse:leave signals.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The function awful.screen.focus_bydirection changes the screen focus
according to physical position. The code is based on
awful.client.focus.bydirection.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Given an object's coordinates, `awful.screen.getbycoord` can be used to
determine the screen than the object is, or should be attached to.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This option is no longer valid in modelines, so it has been removed from
all modelines using the following shellscript:
#!/bin/ksh
git ls-tree -r HEAD | cut -f2 | while read f; do
egrep -e '^(//|--) vim: .*encoding=' $f >/dev/null || continue
sed -E -e '/^(\/\/|--) vim:/s/:encoding=utf-8//' $f > /tmp/foo
mv /tmp/foo $f
done
Signed-off-by: Gregor Best <gbe@ring0.de>
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>