Commit Graph

8950 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee 9e81045d42 tests: Test the input_passthrough property 2017-11-27 00:22:11 -05:00
Emmanuel Lepage Vallee 4e54aea6a9 wibox: Add an input_passthrough property.
Allows, for example, to have semi translucent wibars on top of
the fullscreens clients without having issues with inputs.
2017-11-27 00:20:42 -05:00
Emmanuel Lepage Vallée b44fd6e35b
Merge pull request #2124 from Elv13/doc_tests_and_notif_p2_4
Add spacing widgets to layouts
2017-11-27 00:18:38 -05:00
Emmanuel Lepage Vallee f1b4850bdc tests: Test the spacing widgets 2017-11-24 19:13:59 -05:00
Emmanuel Lepage Vallee e12c000b97 layout: Add separator widget support to 3 layouts
The ratio, fixed and flex layout can now display a widget between
each layout elements.

The align layout was left out because it doesn't support spacing
2017-11-24 19:13:59 -05:00
Emmanuel Lepage Vallee a9c06fb8c5 template: Add configurable margins to the generic layout widget 2017-11-23 23:48:00 -05:00
Emmanuel Lepage Vallée 056af3d48d
Merge pull request #2109 from Elv13/revert_dpi_per_screen
screen: Revert the DPI per screen changes.
2017-11-23 23:42:26 -05:00
Emmanuel Lepage Vallee 14c074fb6b screen: Disable trying to auto-compute the DPI by default.
As long as Awesome provides APIs that uses pixels are points, this
cannot be enabled by default.

For example, a wibar size defined in pixels may be too small to
render the text once a dense display is connected.
2017-11-23 23:28:32 -05:00
Emmanuel Lepage Vallee 314e307cd6 textbox: Ensure that the DPI arguments are not nil
Otherwise it fails. This allows better error message to be sent to the
user.
2017-11-23 23:28:32 -05:00
Uli Schlachter 5ef937c07c textclock: Detect failures from g_date_time_format (#2119)
If g_date_time_format() fails, it returns a NULL pointer. This change
makes the textclock detect this and print a warning. This warning
contains 'g_date_time_format()' so that people can ask their favorite
search engine for the supported formats of this function. This warning
also contains the actual format string so that all the information is
available in one place and possible bug reports hopefully include the
format string.

Reference: https://github.com/awesomeWM/awesome/issues/2118
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-11-23 23:27:18 -05:00
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