Commit Graph

8566 Commits

Author SHA1 Message Date
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 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
Daniel Hahler 52fa619506 Merge pull request #1781 from psychon/fullscreen_test
Some changes to fullscreen tests
2017-05-14 19:53:09 +02:00
Uli Schlachter 2eef92a891 test-maximize: Improve error messages
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-14 10:10:03 +02:00
Emmanuel Lepage Vallee e7232c0dc2 test: Use the test client in test-maximize 2017-05-14 09:56:58 +02:00
Emmanuel Lepage Vallee 2da1900d85 tests: Add gravity to the test client 2017-05-14 09:56:54 +02:00
Uli Schlachter 40e9393d94 awful.autofocus: Discriminate sticky clients (#1697)
A relatively common problem with awesome is with mixing sticky clients
and the focus history. Once a sticky client ever had the focus, it will
always get the focus after a tag switch. This is because the focus
history is global and the sticky client is always the most recently
focused and currently visible client in the list.

Work around this by discriminating sticky clients: First try to find a
client to focus, but ignore sticky clients. When this does not find
anything, try again, but this time also consider sticky clients.

(Basically the same issue exists with clients that are on multiple tags,
but I guess that one can be ignored.)

Fixes: https://github.com/awesomeWM/awesome/issues/733
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-13 23:32:28 +02:00
Uli Schlachter f22a69d54e Fix fullscreen clients with gravity != NorthWest (#1764)
Once upon a time, 4b9584fdb1 already fixed this problem: We have to
set the border width to zero before applying the new geometry to the
client, because changing the border width makes the client move
according to its gravity.

Then came e54387904b and made this code use awful.placement instead
of just fullscreening the client itself (without explaining why in the
commit message!). After this commit, the border width was just ignored
and left as-is. This was then fixed in 0bf8bb6a64 (no idea which
callback the commit message refers to, the old code was basically just
c.border_width=0, c:geometry(screen_geo)). However, now the border width
was again changed after the geometry and the bug that was fixed by
4b9584fdb1 was back.

This commit fixes this regression again by making sure that the border
width is set to zero before the geometry is set. This becomes slightly
more complicated, because now it is also awful.placement's job to
restore the old border width.

This is why this commit adds a new option to awful.placement so that it
sets the border width to zero after creating its memento of the old
border width.

Fixes: https://github.com/awesomeWM/awesome/issues/1607
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-13 23:31:14 +02:00
Uli Schlachter 3ed0be6d85 Add a test for gravity handling (#1760)
This adds a C program which tests if the window manager handles
gravities correctly. This program is loosely based on metacity's
test-gravity.c, but completely rewritten and this version does automatic
tests instead of allowing the user to perform testing by hand.

By having this as a self-contained C program, it is possible to compare
awesome's behaviour with the behaviour of other WMs.

In my testing, only metacity and awesome pass this test. This is not
that much of a big surprise since awesome was fixed in
https://github.com/awesomeWM/awesome/pull/505 to work correctly with
metacity's test-gravity.c. However, I am surprised that e.g. Fluxbox
gets this wrong.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-13 23:28:45 +02:00
Daniel Hahler 9d1d5d5461 Merge pull request #1762 from psychon/fix-menubar-traversal
Fix menubar traversal
2017-05-13 23:27:13 +02:00
Uli Schlachter a33527a46c Add signal property::size_hints to clients (#1768)
This signal is already documented, but so far it did not exist.

Fixes: https://github.com/awesomeWM/awesome/issues/1741
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-13 23:25:48 +02:00
Quentin Minster 155c37e759 Fix single layout not appearing in the keyboardlayout widget (#1771)
Change indexing so that a keyboard map with a single group still gets
displayed in awful's keyboardlayout widget.

Signed-off-by: Quentin Minster <quentin@minster.io>
2017-05-13 23:25:09 +02:00
Uli Schlachter 01e61079c3 Add & use a non-fatal kind of assert() (#1779)
Aborting the process is sometimes a bit harsh for a failed assertion.
This adds a non-fatal assert() macro called "check()" and uses it in
some places where we might be able to survive the error.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-13 23:22:15 +02:00
Emmanuel Lepage Vallée 3cfb577387 Merge pull request #1778 from Elv13/fix_1777
menu: Check if the client is still valid before accessing props
2017-05-12 08:24:00 -04:00
Emmanuel Lepage Vallee 0df1586f10 menu: Check if the client is still valid before accessing props
Fix #1777
2017-05-11 12:47:06 -04:00
Uli Schlachter e1bad41fc8 Always emit property::floating when needed
There are some cases where a client's floating state "silently" changes.
For example, a fullscreen client will be considered floating. However,
even though c.floating changes its value in this case, we did not emit
the property::floating signal.

Fix this by explicitly tracking the "implicitly floating" state. When
some property that influences this "implicitly floating" state changes,
we update it and if a client which was not explicitly assigned a
floating state observes a change in this value, property::floating is
emitted.

This was tested by running a terminal and two xeyes in a tag with a
tiling layout where awful.ewmh was patched so that clients do not change
their geometry when fullscreening or maximizing. It was observable that
after this patch e.g. the titlebar and the tasklist update to show the
floating state of the client which became implicitly floating due to
being maximized.

Fixes: https://github.com/awesomeWM/awesome/issues/1662
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-11 16:22:16 +02:00
Emmanuel Lepage Vallée 348abc3ed8 Merge pull request #1775 from psychon/typo
Fix a tiny typo
2017-05-11 09:58:54 -04:00
Uli Schlachter 420d6551c6 Fix a tiny typo
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-11 15:56:58 +02:00
Thomas G 5e431d2fb1 Update notification size in `naughty.replace_text` (#1756)
Fixes #1707
2017-05-07 18:01:35 +02:00