Commit Graph

10283 Commits

Author SHA1 Message Date
Uli Schlachter af5d6b683f DPIfy all themes (mostly zenburn)
This makes sure that all sizes that are specified in themes go through
the dpi() function. For most themes this just means that the value 0 is
DPIfied, which should not make much of a difference. However, for
zenburn this actually adds the very first calls to dpi() to this theme.

Fixes: https://github.com/awesomeWM/awesome/issues/1807
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-08 17:09:47 +02:00
Uli Schlachter c8dc563ce1 Add tests for get_children of containers
Fixes: https://github.com/awesomeWM/awesome/issues/1672
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-08 17:00:44 +02:00
Uli Schlachter 72c2f06c01 Add tests for get_children of layouts
Partially-fixes: https://github.com/awesomeWM/awesome/issues/1672
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-08 17:00:44 +02:00
Caleb Maclennan ffca875633 Add aweful.util.pread() so API docs have deprication notice (#1502)
* Add awful.util.pread() so API docs have deprication notice

* Update util.lua

* Update util.lua

* Update util.lua
2017-06-06 00:55:11 +02:00
Uli Schlachter af8288335b Use command line instead of env for passing children
Commit e54361a374 added code so that we pass the list of
currently running children across restart via an environment variable.
As Colin Walters correctly points out, setenv() is not safe in a
multi-threaded processes.

Thus, instead of using the environment, use the command line to pass
this information along.

https://github.com/awesomeWM/awesome/issues/1812
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-04 16:04:44 +02:00
Uli Schlachter d799eea2cf Restart by calling execvp() directly
Before this, we used a_exec() with started a shell and used it to parse
our glued-together command line. That only asks for escaping trouble
(think: Path to the config file is given on the command line and
contains a space), so use execvp() directly.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-04 16:04:44 +02:00
Uli Schlachter 84080c64c5 spawn: Use CLOEXEC for pipes (#1811)
Fixes: https://github.com/awesomeWM/awesome/issues/1193#issuecomment-305705724
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-02 10:13:26 +02:00
Emmanuel Lepage Vallée 6254e6b7d3 Merge pull request #1809 from psychon/reap_children
Reap children even across a restart
2017-06-01 22:32:02 -04:00
Daniel Hahler 105638e920 client: update_implicitly_floating on manage (#1803)
Ref: https://github.com/awesomeWM/awesome/pull/1748#issuecomment-304010490
2017-06-01 21:27:53 +02:00
Uli Schlachter e54361a374 Reap children even across a restart
In Unix, so that a process can learn about the exit status of the child
processes that it started, children become zombie processes until the
parents collects their exit information. We use glib both for starting
and for collecting processes. However, when awesome is restarted, the
new instance inherits children, but does not know about them and does
not inherit them.

Fix this by explicitly tracking a list of running child processes and by
serialising them across a restart via an environment variable. The new
awesome instance can then watch for these child processes, but besides
that it ignores them and does not use their exit status in any way.

Thanks to Colin Walters for the hint with serialising the list of processes.

Fixes: https://github.com/awesomeWM/awesome/issues/1193
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-06-01 15:47:24 +02:00
Emmanuel Lepage Vallée 5544d11405 Merge pull request #1802 from awesomeWM/move-widget-drawing
Move gears.surface.widget_to_svg to wibox.widget.draw_to_svg_file (and widget_to_surface to draw_to_image_surface)
2017-06-01 06:05:21 -04:00
Emmanuel Lepage Vallée a6ec8c0605 Merge pull request #1806 from asmunder/update-porting-tips
Updated porting tips
2017-05-31 03:10:18 -04:00
Åsmund Ervik c172af947e Updated porting tips with new section on how to obtain clean 3.5.9 and 4.0 rc.lua versions to diff existing config with / port into. Fixes issue #1576 2017-05-31 08:51:53 +02:00
Uli Schlachter 5f92eda6bf Makefile: Run cmake less often
Previously, running make in the build/ directory depended on the "cmake"
target which was running the cmake command. This target was phony,
meaning that it was always considered to be out of date and needed to be
re-generated.

Change this so that instead things depend on the CMakeCache.txt file. If
that file is already there, we do not re-run cmake.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-30 11:27:30 +02:00
Uli Schlachter 82b51c2715 Makefile: Stop creating .build-* directories, use build directly
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-30 11:27:30 +02:00
Uli Schlachter 9bf50beab0 Makefile: Add a hint that cmake can be used directly
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-30 11:27:30 +02:00
Uli Schlachter 801a1f0a89 Deprecate widget-drawing functions in gears.surface
This marks the functions gears.surface.widget_to_svg() and
gears.surface.widget_to_surface() as deprecated in awesome 5. This means
that by the time that awesome 6 becomes a thing, we can finally remove
these...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-30 11:22:07 +02:00
Uli Schlachter 0abfed54de example tests: Switch to new API
This makes the templates used by the example tests use the new API added
in the previous commit.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-30 11:22:07 +02:00
Uli Schlachter 6de6419180 Add functions to draw widgets to a cairo surface
These are supposed to eventually replace the already-existing functions
in gears.surface which have a similar signature

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-30 11:22:07 +02:00
Uli Schlachter 0707f52ebf Get rid of broken hint in the readme (#1801)
luaL_dostring(L, s) is a macro that expands to
luaL_loadstring(L,s)||lua_pcall(L,0,LUA_MULTRET,0). Then,
lua_pcall(L,n,r,f) sometimes (since Lua 5.3?) is a macro that expands to
lua_pcallk(L,n,r,f,0,NULL), but can sometimes also just be a function.

Explaining all the above would make this section more complicated and
apparently no one uses this hint anyway, because no one told us yet that
this hint does not work.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-30 10:28:44 +02:00
Uli Schlachter b5cdd06a78 Emit wallpaper_changed less often (#1800)
Commit 222f0a133c optimised the case where we change the wallpaper
so that we can give the new wallpaper to Lua faster. However, contrary
to what was intended, it also caused another wallpaper update later when
the server told us that the wallpaper actually changed. This was because
the juggling with multiple X11 connections went wrong.

Fix this by using the right connection to actually change the wallpaper.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-29 20:08:56 +02:00
Daniel Hahler b8d4257d74 Merge pull request #1797 from psychon/fullscreen_test
Fullscreen tests
2017-05-26 20:13:39 +02:00
Uli Schlachter e90f3ef253 test-maximize.lua: Test all gravities
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-26 18:24:28 +02:00
Uli Schlachter 3e0eefe3bc Add a test case for some recent bug
This test would have caught
https://github.com/awesomeWM/awesome/issues/1607.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-26 18:24:28 +02:00
Uli Schlachter 08555a4fed test-maximize: Restore old border width
When the border width changes, we move the client according to its
gravity. This can cause problems with the following code. Fix this by
restoring the original border width again, which undoes the move.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-26 18:24:28 +02:00
ReVMatthias 9016a9296f Fix comment typo in default config file (#1796)
[ci skip]
2017-05-26 15:35:39 +02:00
Uli Schlachter e7a1745b86 Fix Luacheck warnings (#1798)
This fixes warnings that were introduced with f22ef5014d /
https://github.com/awesomeWM/awesome/pull/1477.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-26 15:33:56 +02:00
Emmanuel Lepage Vallée 27c3b96a08 Merge pull request #1477 from Oblomov/dpifallback
Fall back to reported DPI if Xft.dpi is not present
2017-05-25 16:41:26 -04:00
Emmanuel Lepage Vallée caff37d867 Merge pull request #1791 from Elv13/impl_1508
beautiful: Save the theme path
2017-05-25 16:40:37 -04:00
Emmanuel Lepage Vallee ac8af66005 beautiful: Save the theme path
Fix #1508
2017-05-25 04:40:45 -04:00
Haochen Tong c1bcad5f5e parse_desktop_file: rtrim lines before parsing (#1677) 2017-05-25 01:22:13 +02:00
Uli Schlachter 27eba6c034 Abort on in-source-builds (#1788)
They do not work since we overwrite things in such a way that the build
will fail.

Fixes: https://github.com/awesomeWM/awesome/issues/1786
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-24 21:06:27 +02:00
Emmanuel Lepage Vallée f311a9137e Merge pull request #1789 from psychon/remove-xrdb-warning
Don't print warnings for non-existing xrdb values
2017-05-24 04:37:22 -04:00
Uli Schlachter f4e66bd24b Don't print warnings for non-existing xrdb values
If needed, the Lua code can print a warning instead.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-24 10:06:24 +02:00
Daniel Hahler b98ca2ec98 Merge pull request #1748 from Elv13/fix_maximize_again
Fix maximize again
2017-05-23 23:56:29 +02:00
Emmanuel Lepage Vallee 5d944e3c1a tests: Add client self-resizing support to the tests 2017-05-23 22:34:12 +02:00
Emmanuel Lepage Vallee ae7b173c54 tests: Add resizing support to the test client 2017-05-23 22:33:26 +02:00
Emmanuel Lepage Vallee 710039ed3f tests: Test more maximization corner cases 2017-05-23 22:33:26 +02:00
Emmanuel Lepage Vallee 0eab45520e tests: Add maximization support to the test client
Both a "before manage" and "later" mode.
2017-05-23 22:33:26 +02:00
BuildTools 37d2654d5d client: emit ewmh geometry requests as signals 2017-05-23 22:33:26 +02:00
Emmanuel Lepage Vallee 9bc46e4648 client: Honor the client maximization requests again
This implementes the FIXME added a few commits ago. A new
request::geometry handler turns client requests into normal
lua `c.maximized = true` property changes.
2017-05-23 22:33:26 +02:00
Emmanuel Lepage Vallee b570e6d347 client: Add request::geometry for client maximization
This way the correct logic can be implented in Lua
2017-05-23 22:33:26 +02:00
Emmanuel Lepage Vallee 951386ec5c client: Handle maximize differently at startup
This way max_h+max_h wont happen by accident. This isn't pretty
but it will get the job done.

Fix #1599 #1559
Close #1715 #1712
2017-05-23 22:33:26 +02:00
Benoit de Chezelles be29ee6768 naughty: avoid notification flickering on replace (#1785)
Fixes https://github.com/awesomeWM/awesome/issues/1737.
2017-05-23 15:37:46 +02:00
Emmanuel Lepage Vallée b6e6a04895 Merge pull request #1776 from psychon/emit_property_floating
Always emit property::floating when needed
2017-05-16 13:57:51 -04:00
Emmanuel Lepage Vallée 260002b632 Merge pull request #1780 from psychon/fix-setting-screen
Fix setting screen
2017-05-15 02:38:41 -04:00
Uli Schlachter 498510e810 Add a new disposition to _multi_screen.lua
Without the previous commit, this would make test-awful-client.lua fail.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-15 08:15:59 +02:00
Uli Schlachter 1332288f9d screen_client_moveto: Make sure client ends up on target screen
This function tried to move the client to its new screen based on
shifting around its current geometry. However, it assumed that the
client was actually visible on its current screen, which is not always
the case.

Fix this by just forcing the client into its new screen if our moving
approach does not work.

This also reverts commit d5e365804c which
is no longer necessary. This commit only hid the issue (partly).

Fixes: https://github.com/awesomeWM/awesome/issues/318
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-15 08:15:50 +02:00
Uli Schlachter c57208d1a8 client_resize(): Stop trying to force on screen
The code here made sure that clients were not moved outside of the root
window. However, that's not enough, because clients can still end up
inside the root window, but outside of anything that is visible in some
output. Thus, just remove this.

Related-to: https://github.com/awesomeWM/awesome/issues/318
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-15 08:15:38 +02:00
Daniel Hahler c9bfd934e7 beautiful.load_font: handle font height of 0 (#1782)
This might happen if no fonts are installed.  It now falls back to the
size from the font description.
2017-05-14 20:14:18 +02:00