Commit Graph

9390 Commits

Author SHA1 Message Date
Daniel Hahler b0220a3804 tests: do not set Xft.dpi with integration tests (#2121)
This should help with covering the methods for detection/fallback during
tests.

Ref: https://github.com/awesomeWM/awesome/pull/2109#issuecomment-346224956

Uses xrdb -q to check for X server being available.

Ignores the following warning:

> W: awesome: beautiful: can't get colorscheme from xrdb (using fallback).
2017-11-23 23:26:54 -05:00
Daniel Hahler 1326ec20fd
Merge pull request #2117 from psychon/invalid_screen_swap
screen:swap(): Avoid segfault on almost-deleted screens
2017-11-20 00:38:11 +01:00
Emmanuel Lepage Vallée 10057ec51c
Merge pull request #2104 from Elv13/fix_2101
Fix the resize/move "after" mode
2017-11-19 14:02:44 -05:00
Emmanuel Lepage Vallée 9580c4ee41
Merge pull request #2116 from Elv13/cleanup_doc
Cleanup doc
2017-11-19 13:45:58 -05:00
Uli Schlachter c51a2c2f47 screen_refresh: Protect against globalconf.screens changing
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-11-19 15:53:07 +01:00
Uli Schlachter ea413969f3 screen:swap(): Avoid segfault on almost-deleted screens
When a screen is in the process of being removed, it is still valid, but
no longer in the global list of screens (globalconf.screens). In this
time frame, trying to swap screens could cause a NULL pointer
dereference.

Fix this by throwing a Lua error in this case instead.

Fixes: https://github.com/awesomeWM/awesome/issues/2110
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-11-19 15:40:20 +01:00
Emmanuel Lepage Vallee fccd35b45c doc: Remove entries for modules that have been moved for a year or more.
To make the index looks smaller.
2017-11-19 00:46:06 -05:00
Emmanuel Lepage Vallee 9f7a365447 doc: Cleanup useless index entries
Entries such as the empty `objects.client` or `awful.hotkeys_popup.keys`
are no longer in the main index.
2017-11-19 00:46:06 -05:00
Daniel Hahler 73ebf452ec
tests: improve coverage with integration tests (#2082)
- install luacov.runner in tests/_runner.lua.
- use Lua's `dofile` to execute the test files, which will give us
  coverage for them.
- CMakeLists.txt: revert DO_COVERAGE env injection
- revert cd: make f absolute if not in source_dir
2017-11-18 01:52:48 +01:00
Daniel Hahler 62c0affa53
Merge pull request #2114 from psychon/more_lua_asserts
.travis.yml: Enable even more assertions for Lua 5.3
2017-11-18 01:51:26 +01:00
Daniel Hahler babc11a9be
Merge pull request #2111 from psychon/glib_keyfile
Menubar: Use GlibKeyFile
2017-11-18 01:51:04 +01:00
Daniel Hahler ef6cf14993
Merge pull request #2112 from psychon/icon_theme_deprecation
Deprecate menubar.icon_theme
2017-11-18 01:49:49 +01:00
Daniel Hahler f4ad2e7517
Merge pull request #2115 from psychon/small_fixes_codacy
Small fixes for codacy
2017-11-18 01:49:12 +01:00
Uli Schlachter 7cf99719b5 'Fix' codacy complaining about unused value
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-11-17 10:31:50 +01:00
Uli Schlachter e7982b7aba Reduce some variable scopes
Codacy things this is a good idea...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-11-17 10:30:56 +01:00
Uli Schlachter 1a8acd3292 Add missing va_end()s to buffer_addvf()
Not only does every va_start() need a corresponding va_end(), this is
also true for va_end(). Thus, buffer_addvf() needs to call va_end().

Found by Codacy.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-11-17 10:23:11 +01:00
Uli Schlachter 5f5bf24aa8 .travis.yml: Enable even more assertions for Lua 5.3
It might be well known that test-menubar.lua fails with "cannot do calls
on non-normal thread" when run under our Lua 5.3 build with coverage
tracking enabled. This new, extra assertion catches the error earlier
and in a different way. Since more assertions means more errors caught,
let's add this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-11-17 09:48:24 +01:00
Uli Schlachter 5363225217 Deprecate menubar.index_theme
The previous commit deprecated its only user.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-11-16 13:58:25 +01:00
Uli Schlachter 0b0b466705 Deprecate menubar.icon_theme
The code in menubar.icon_theme naively implements the algorithm from the
base dir specification. This is a problem: On this system,
/usr/share/icons/{Adwaita,hicolor}/index.theme list 91, respectively 649
subdirectories. Since we check for three file extensions (png, svg,
xpm), this means that a failing icon lookup for the Adwaita theme checks
for (91+649)*3 = 2220 files (in practice it might be a bit better since
the directories have specific meanings, but still). That's insane.

Since we only use this code for looking up category icons anyway, just
deprecate this mess. Category icons are now looked up in the same way
that icons for individual applications are looked up.

Since menubar.init does not require("menubar.icon_theme"), this means
that menubar.icon_theme is no longer actually loaded. That's bad.

(Hopefully) Fixes: https://github.com/awesomeWM/awesome/issues/1496
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-11-16 13:12:59 +01:00
Uli Schlachter 5d21e85bfb menubar.utils.parse_desktop_file: Improve type handling
This is a slight API break, but should not cause many problems for
people. This makes parse_desktop_file() handle the type of keys
correctly, so that e.g. booleans are actually parsed as booleans. Also,
locale-sensitive entries are now looked up in a way that obeys the
current locale.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-11-15 15:27:05 +01:00
Uli Schlachter e88f1e8735 menubar.utils.parse_desktop_file: Use GKeyFile
This replaces our own, hand-written parser of desktop files with the one
that GLib provides. No functional changes intended.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-11-15 15:27:05 +01:00
Uli Schlachter e20068cb4a luaA_warn: Balance stack (#2106)
In Lua 5.2 or newer, this function left a string on the Lua stack. Fix
this by popping this string.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-11-08 18:47:37 +01:00
ikselven b2fac56b9c hotkey: added hotkeys for termite to hotkeys popup widget (#2098) 2017-11-06 20:41:18 +01:00
Emmanuel Lepage Vallée 6a4414eb3d
Merge pull request #2019 from Elv13/doc_tests_and_notif_p1_9
Add a separator widget.
2017-11-06 20:40:28 +01:00
Emmanuel Lepage Vallee dcdd491ce3 tests: Check that the "after" resize mode doesn't print errors
Something is broken elsewhere that makes the test irrelevant, but
it proves there is no errors.
2017-11-06 05:47:12 +01:00
Emmanuel Lepage Vallee 9f6fed4e7b tests: Test the separator widget 2017-11-06 05:19:17 +01:00
Emmanuel Lepage Vallee 33124d8605 widget: Add a separator widget. 2017-11-06 05:19:17 +01:00
Emmanuel Lepage Vallee 3ffbe4c03b client: Prevent an error when using the "after" mode
Fix: #2101
2017-11-05 20:39:07 +01:00
Stefan Loewen 8ebea11df0 Fix doc: get_clients methods belong to screen (#2099)
not to client
2017-11-03 17:27:17 +01:00
Emmanuel Lepage Vallée 8a498d95b2
Merge pull request #2100 from lePerdu/desktop-unescape
Fix typo: "OnlyShownIn" -> "OnlyShowIn"

Ref:
https://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html
2017-11-03 17:26:32 +01:00
lePerdu 926c126738 Fix typo: "OnlyShownIn" -> "OnlyShowIn" 2017-11-02 20:08:48 -04:00
Emmanuel Lepage Vallée f3f0f42b24
Merge pull request #2096 from psychon/iconic_state_across_restart
client.c: Set WM_STATE_NORMAL before checking _NET_WM_STATE
2017-10-31 19:20:37 +01:00
Emmanuel Lepage Vallée 5b8e8dbf80
Merge pull request #2094 from psychon/fix_rules_no_such_tag
awful.rules: Handle non-existing tags
2017-10-31 19:20:12 +01:00
Emmanuel Lepage Vallée bc83eb5636
Merge pull request #2097 from psychon/small_doc_fixes
Three small fixes to the client docs
2017-10-31 19:19:51 +01:00
Emmanuel Lepage Vallée 579c8cae10
Merge pull request #2093 from necauqua/master
Add call_now argument to gears.timer
2017-10-31 19:17:15 +01:00
necauqua aa64978c31
Add call_now argument to gears.timer 2017-10-31 18:24:53 +02:00
Daniel Hahler 032f587dd3
Merge pull request #2069 from awesomeWM/doc-theme
doc: new theme
2017-10-31 16:45:13 +01:00
Uli Schlachter cdb95e6633 Three small fixes to the client docs
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-10-31 15:25:21 +01:00
Uli Schlachter b871c247ba client.c: Set WM_STATE_NORMAL before checking _NET_WM_STATE
_NET_WM_STATE could contain _NET_WM_STATE_HIDDEN, which we interpret as
minimized. Minimized clients have WM_STATE set to WM_STATE_ICONIC, but
the code in client_manage() would later overwrite this to
WM_STATE_NORMAL.

Fix this by setting the initial WM_STATE_NORMAL by doing so before
processing _NET_WM_STATE.

Fixes: https://github.com/awesomeWM/awesome/issues/2095
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-10-31 15:20:34 +01:00
Uli Schlachter 7fda5d3273 awful.rules: Handle non-existing tags
If a tag is specified by name, but no such tags exist, awful.rules would
cause an error (attempt to index a nil value). Fix this and add a test
for this case.

Fixes: https://github.com/awesomeWM/awesome/issues/2087
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-10-31 13:23:12 +01:00
Daniel Hahler fb93003cc5 docs/ldoc.css: just use system fonts 2017-10-28 00:08:31 +02:00
Daniel Hahler 5c9bc988bb navigation: less margin to the left 2017-10-28 00:08:31 +02:00
Daniel Hahler 102e1046b9 add our logo 2017-10-28 00:08:31 +02:00
Daniel Hahler b291880fa1 add css
Source: https://github.com/stevedonovan/LDoc/pull/287
https://raw.githubusercontent.com/hishamhm/LDoc/7214818f0ff580e5607a4de764340aa7e3b55d1a/ldoc/html/ldoc_new_css.lua
2017-10-28 00:08:28 +02:00
Daniel Hahler 65b6d12b44 Merge pull request #2073 from blueyed/fix-examples
tests: examples: remove caching, add depends for ldoc
2017-10-27 00:21:55 +02:00
Daniel Hahler 678ead2634 Add client.object.immobilized_{horizontal,vertical} (#2066)
ewmh.client_geometry_requests: ignore immobilized clients

Fixes https://github.com/awesomeWM/awesome/issues/1676.
Fixes https://github.com/awesomeWM/awesome/issues/2036.
2017-10-25 15:36:00 +02:00
Daniel Hahler 579159a8cc CMakeLists.txt: check-integration: depend on main target (#2081)
This makes `make check-integration DO_COVERAGE=1` on a clean build work.
2017-10-24 20:59:51 +02:00
Daniel Hahler eb5cab5cfe Travis: codecov: use LUANAME as a flag (#2085) 2017-10-24 20:59:31 +02:00
Daniel Hahler a5e00347e1 tests: tests/run.sh: timeout after 30 seconds (#2083) 2017-10-24 00:29:56 +02:00
Daniel Hahler fbb5766359 Travis: checks: unset set -x (#2084) 2017-10-24 00:29:22 +02:00