Commit Graph

20 Commits

Author SHA1 Message Date
Uli Schlachter dcc348d75e Fix some random ldoc warnings
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-04-13 18:06:49 +02:00
Uli Schlachter 271f084735 screen: Turn into proper lua object
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>
2014-03-30 16:37:19 +02:00
Uli Schlachter a6466864f9 awful.screen.focus: Don't move mouse to (0, 0) first (FS#1173)
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>
2013-10-04 11:27:35 +02:00
Uli Schlachter 987c2b9b30 awful.screen.getbycoord(): Always return a valid screen
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>
2013-01-05 20:56:20 +01:00
Uli Schlachter 96e03cb45d Lots of random documentation fixes
This is mostly about mis-named parameters, but also other small things.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-19 14:09:10 +01:00
Abdó Roig-Maranges ed9f218669 Fixes module namespace issues in screen.lua and client.lua
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>
2012-09-29 16:52:53 +02:00
Abdó Roig-Maranges 34c1c7d416 Makes awful.screen.focus keep the cursor position on screen
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>
2012-09-27 11:26:57 +02:00
Abdó Roig-Maranges d799ac76aa Added function to change screen focus by direction
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>
2012-09-27 11:14:55 +02:00
Arvydas Sidorenko 61ff9ce2b7 Ported awful to lua 5.2
Tested with lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
2012-06-16 17:37:30 +02:00
Anurag Priyam 7f8ef18cd8 awful.screen: define getbycoord() to compute screen number of a pixel
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>
2012-01-15 16:52:19 +01:00
Gregor Best c2ea920ca0 remove encoding=utf-8 from modelines
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>
2011-09-11 17:34:09 +02:00
Uli Schlachter ab4c151ed8 Add signals before using them
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>
2010-08-25 23:00:36 +02:00
Gregor Best 851889f2b7 awful.screen: fix padding
Signed-off-by: Gregor Best <gbe@intepi.net>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-09 20:05:42 +02:00
Christopher Eatinger 933c958220 awful.screen.focus: Prevent focusing a screen that doesn't exist
Signed-off-by: Christopher Eatinger <christopher.eatinger@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 21:01:06 +02:00
Julien Danjou 0f6125a3f6 awful.screen.focus: make focus() absolute and add focus_relative()
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 16:05:02 +02:00
Julien Danjou 65825bdd22 awful: move hooks to signals
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou e15aab73bf screen: move padding in Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-04 17:51:13 +02:00
Julien Danjou 105e155606 awful.screen: enhance doc
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-04 21:09:35 +01:00
Julien Danjou c51d4d61ac awful.screen: fix focus doc
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-04 21:05:02 +01:00
Julien Danjou 34647e4e75 awful: split in several modules
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-29 18:30:32 +02:00