Commit Graph

6540 Commits

Author SHA1 Message Date
Daniel Hahler 917965483d doc: improve docs/02-contributing.md 2015-07-12 17:42:53 +02:00
Daniel Hahler 1050237d04 minor: fix/improve doc comments 2015-07-12 17:42:53 +02:00
Daniel Hahler 5c3734e583 luaA_xrdb_get_value: add resource name/class to warning 2015-07-12 17:30:59 +02:00
Daniel Hahler a7b281294c Makefile: add "tags" to .PHONY targets
It could depend on $(shell git ls-files), but it's not worth the
overhead to get this list then always.
2015-07-11 22:50:11 +02:00
Max d22a65a103 Replace uses of color_strip_alpha with ensure_pango_color, refactor
This simplifies the logic a bit since all of the fg/bg colors are
always set when it gets to checking the client state.
2015-07-10 18:11:45 -04:00
Max 2ba9c8667f Replace color_strip_alpha with ensure_pango_color
color_strip_alpha was used to insert colors into Pango markup, but it
did not correctly check for valid Pango colors. ensure_pango_color
checks if the color is valid in Pango, and returns a placeholder if it
is not.
2015-07-10 18:09:45 -04:00
Daniel Hahler d4c7a7ce04 Make sure "err" is a string in debug::error handler
I've noticed that `Pango.parse_markup` returns "userdata" instead of a
string in case of errors [1], which then causes the `debug::error`
handler to not handle it correctly:

    W: awesome: luaA_dofunction:77: error while running function
    stack traceback:
     [C]: in ?
     [C]: in function 'error'
     /usr/local/share/awesome/lib/wibox/widget/textbox.lua:63: in function 'set_markup'
     [string "require("wibox").widget.textbox():set_markup(..."]:1: in function 'f'
     /usr/local/share/awesome/lib/awful/remote.lua:25: in function </usr/local/share/awesome/lib/awful/remote.lua:21>
    error: attempt to concatenate a userdata value

This patch makes sure that `err` is a string when passing it to
naughty.notify in the default `debug::error` handler.

Closes #302.

1: https://github.com/pavouk/lgi/issues/115
2015-07-10 20:53:12 +02:00
Daniel Hahler 0f3bf03cd2 travis: unpin luassert
Closes #258.

Build tested in https://travis-ci.org/blueyed/awesome/builds/70387485.
2015-07-10 15:54:26 +02:00
Daniel Hahler 4a845ced0f awful.widget.graph: setters: emit widget::updated only on changes
Ref: #284
2015-07-10 15:32:22 +02:00
Daniel Hahler 3be423fcb3 awful.widget.graph: expose properties via getters
This allows to see if a widget is stacked for example.

It uses getters instead of exposing the properties directly, which
should be made readonly then probably (which has drawbacks according to [1]).

1: http://lua-users.org/wiki/ReadOnlyTables

Closes https://github.com/awesomeWM/awesome/pull/284.
2015-07-10 15:32:07 +02:00
Daniel Hahler 611438a892 Add functional tests via Xephyr/Xvfb/xdotool
Closes https://github.com/awesomeWM/awesome/pull/133
2015-07-10 15:19:51 +02:00
Daniel Hahler ae6a1efe65 Fix ewmh.activate to use the hints argument
This was missed in cb7f4b06, where the `raise` argument was changed to
`hints`.
2015-07-10 15:13:16 +02:00
Daniel Hahler 9eb4661cde Fix raising clients with focus=true via awful.rules
In ed09d8e this was changed accidentally, while only `request::focus`
should have been changed:

    -        c:emit_signal('request::activate',"rules")
    +        c:emit_signal('request::activate', "rules", false)
2015-07-10 15:13:16 +02:00
Daniel Hahler bd885f59f5 awful.client.property.set: emit property:: signals only on change
Emit "propery::" signals and call `c:set_xproperty` only if the
properties new value has changed.
2015-07-09 13:04:29 +02:00
Daniel Hahler ae7c7ff382 awful.tag: emit property:: signals only on change
This can have a significant performance impact in case you listen to the
property::hide signal to auto-hide tags for example.
2015-07-09 13:04:29 +02:00
bjp 4f865e66ed Add more keyboard shortcuts to the prompt
This adds the following readline/emacs style shortcuts to the prompt:
Ctrl+p, Ctrl+n, Alt+b, Alt+f, Alt+d, Alt+BackSpace.

Closes https://github.com/awesomeWM/awesome/pull/282.
2015-07-09 12:03:49 +02:00
Daniel Hahler 5630ad1bb2 taglist: call taglist_update only once per main loop
Currently `taglist_update` gets triggered often, because it listens to
a lot of signals.
This patch makes it only call the last one through `timer.delayed_call`.
2015-07-09 11:46:46 +02:00
Daniel Hahler 1924e044f7 tasklist: call tasklist_update only once per main loop
Currently `tasklist_update` gets triggered often, because it listens to
a lot of signals.
This patch makes it only call the last one through `timer.delayed_call`.
2015-07-09 11:46:45 +02:00
Emmanuel Lepage Vallée 49bf635017 Merge pull request #297 from blueyed/tag-delete-single-call-to-client-tags
awful.tag.delete: single call to #c:tags()
2015-07-07 16:24:12 -04:00
Emmanuel Lepage Vallée a09fee243c Merge pull request #295 from blueyed/doc-signals
doc: signals: minor improvements, mainly for "tagged"
2015-07-07 16:09:22 -04:00
Daniel Hahler 367ad2d9a6 awful.tag.delete: single call to #c:tags()
This is a minor performance optimisation I came across.
2015-07-07 18:42:24 +02:00
Daniel Hahler 63b19efef8 doc: signals: minor improvements, mainly for "tagged" 2015-07-07 17:19:41 +02:00
Daniel Hahler d361eeab34 Make use of the new `oldscreen` argument with property::screen handlers
Closes #285
2015-07-05 17:42:57 +02:00
Uli Schlachter 34c059bf23 Document mouse.coords().buttons
This fixes issue #280 as well, just as the previous commit does, because it was
decided that that issue should be about two different things.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-07-05 16:21:30 +02:00
Uli Schlachter 18f6ab107f Mousegrabber: Correctly handle press/release events
When you run a mousegrabber, the C code calls this callback when the pointer is
moved or when a button is pressed/released. However, the button state is totally
bogus on press/release events, always claiming that the button that was
pressed/released is the only button that is pressed (even for release events!).

This commit fixes up the code so that the button state after the press/release
event is passed to the mousegrabber callback function.

Fixes: #280
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-07-05 16:14:41 +02:00
Uli Schlachter 55bffbcc45 Fix for previous commit
Forgot to commit the change that adds _NET_FRAME_EXTENTS to the list of atoms
that we actually query for and export to the C code.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-07-05 15:34:23 +02:00
Uli Schlachter 4a094fa482 Add support for _NET_FRAME_EXTENTS
Support for this property is required since EWMH version 1.3.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-07-05 14:45:51 +02:00
Emmanuel Lepage Vallée d51a647003 Merge pull request #279 from actionless/useless_gapv3
Useless gap v3
2015-07-03 15:51:15 -04:00
Daniel Hahler 768a5b181e Merge pull request #273 from blueyed/cmake-no-recurse-into-build-dir
awesomeConfig.cmake: do not use GLOB_RECURSE with *.c/*.h
2015-07-03 19:11:09 +02:00
actionless c961622fc0 fix(lib: awful: layout): equal useless gaps 2015-07-03 02:34:39 +02:00
actionless 1a32ba6ecb feat(themes): add 'useless_gap' prop to all themes 2015-07-03 00:20:28 +02:00
actionless 82549c04cd feat(lib: awful: tag): get useless_gap from beautiful if no any 2015-07-02 23:24:04 +02:00
actionless 01ac50c5ed feat(lib: awful: layout): set useless gap 2015-07-02 22:49:00 +02:00
Emmanuel Lepage Vallee a7f2600a38 layout: attached_connect_signal is deprecated 2015-07-02 22:11:46 +02:00
Emmanuel Lepage Vallee 056dee0426 layout: Remove dead code 2015-07-02 22:11:39 +02:00
Emmanuel Lepage Vallee 1aacf1efc4 Add useless gap utility functions 2015-07-02 22:11:01 +02:00
Daniel Hahler 33a6ade4d7 Merge pull request #224 from blueyed/request-focus-signal
Add 'request::focus' signal, use it with autofocus
2015-06-25 07:00:22 +02:00
Daniel Hahler cb7f4b06eb Use `hints` table argument with `request::activate` signal 2015-06-25 06:47:39 +02:00
Daniel Hahler b7e2508144 docs: include lib/awful/ewmh.lua 2015-06-25 06:47:39 +02:00
Daniel Hahler 2e2d60a1f9 client.focus.byidx: handle raising in the function itself 2015-06-25 06:47:39 +02:00
Daniel Hahler ed09d8ed4f Use request::activate with raise=false instead
Ref: https://github.com/awesomeWM/awesome/pull/224#issuecomment-101790416
2015-06-25 06:47:39 +02:00
Daniel Hahler 6dc355cf71 autofocus: use request::focus instead of request::activate
In #152 I've changed the autofocus handler to emit the request::activate
signal, instead of setting client.focus only.

This is wrong IMHO, and can be annoying:

If you have two floating clients above a tiled / maximized one, and
close one of the floating ones, with the tiled one being the one
selected by autofocus, it will be raised above the other floating
client.

This is changed now to use the new `request::focus` signal instead.

This basically reverts 20cdb5d (#152), but allows for customizing this
behavior, by overriding the default `request::focus` handler
(`ewmh.focus`).

It would be nice if there was a helper to check if a window's content
isn't visible at all (i.e. covered by other windows), and that could be
used then by the (new) default handler for request::focus - raising the
client only, if it's completely covered by another window.

Fixes https://github.com/awesomeWM/awesome/issues/217
2015-06-25 06:47:39 +02:00
Daniel Hahler 401f21f8e2 Add request::focus signal, with ewmh.focus being the default handler
This still does `client.focus = c` by default, but allows to customize
it.

This was initially suggested in #194, but by using `request::activate`
instead, which would not be the same.  Therefore a new signal is being
used instead.

Helped-by: Samir Benmendil <samir.benmendil@gmail.com>
2015-06-25 06:47:39 +02:00
actionless cec04b2684 Add DPI support and 'xresources' theme
This makes awesome respect DPI settings, and adds a new theme based on
xrdb and xsettingsd color settings ("xresources").

Closes https://github.com/awesomeWM/awesome/pull/229
2015-06-25 06:40:38 +02:00
Daniel Hahler 61275ccba0 Merge branch 'psychon-weak_connect'
Closes https://github.com/awesomeWM/awesome/pull/263
2015-06-25 06:37:42 +02:00
Uli Schlachter d990e7918f Use :weak_connect_signal() for connecting to widget::updated
This way "that other widget" doesn't prevent the current widget from being
garbage collected.

Please note that this in all of these cases the widget under consideration does
have a strong reference to the callback function. This means that the callback
cannot be garbage collected until "this widget" itself is collected. Thanks to
this, this change is safe.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-06-25 06:37:05 +02:00
Uli Schlachter 089ed0e8dd gears.object: Add :weak_connect_signal()
Connecting to a signal weakly has the same effect as connecting to it strongly,
but it allows the garbage collector to disconnect the signal in case nothing
else references this function.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-06-25 06:37:04 +02:00
Daniel Hahler 38840c911b default config: raise with "maximize" and "fullscreen"
After using sloppy mouse focus to select a client (which does not raise
it already), maximizing/fullscreening it should then raise it.

This also uses the new shortcut `c.maximized = not c.maximized`.

Closes https://github.com/awesomeWM/awesome/pull/270
2015-06-24 05:17:00 +02:00
Emmanuel Lepage Vallée 7d430cf51a Merge pull request #274 from blueyed/spawn-warn-for-errors
Call `warn` in case of errors in luaA_spawn
2015-06-22 16:28:42 -04:00
Daniel Hahler 1992e1e429 awesomeConfig.cmake: do not use GLOB_RECURSE with *.c/*.h
This fixes "make (cmake)" picking up the files from the build dir itself
(recursively), i.e. "make cmake" would also create
`.build-HOST-x86_64-linux-gnu-4.9.2/.build-HOST-x86_64-linux-gnu-4.9.2/`.

It could also use `${AWE_SRCS}` etc here probably.
2015-06-22 14:04:57 +02:00