Commit Graph

7480 Commits

Author SHA1 Message Date
Uli Schlachter b0038c8ddb awful.autofocus: Skip invalid screens
This code uses delayed calls to lazily update things. Thanks to this, it can try
to update a screen long after it was removed. Fix this by just doing nothing on
invalid screens.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:52:31 +02:00
Uli Schlachter bc9b3ca751 tasklist: Stop updating after a screen was invalidated
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:52:31 +02:00
Uli Schlachter 5390913f5a taglist: Stop updating after a screen was invalidated
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:52:31 +02:00
Uli Schlachter e4c3554c22 tests/_client.lua: Don't use GtkApplication
GtkApplication does magic like ensuring that the application ID is unique and
there is only a single instance of each application running. We don't want nor
need that for the tests.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:52:31 +02:00
Uli Schlachter bcc7c65f77 tests/_client.lua: Allow class to be unspecified
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:52:31 +02:00
Uli Schlachter 2da6ec0912 tests/_client.lua: Add missing modelines
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:51:33 +02:00
Uli Schlachter 8a6787bd54 Add functions for faking screen additions and removals
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 14:51:33 +02:00
Emmanuel Lepage Vallée d497cdf081 Merge pull request #875 from psychon/sn-fix
Startup-Notification fix
2016-05-08 01:03:16 -04:00
Emmanuel Lepage Vallée 2d4b8d86a5 Merge pull request #862 from psychon/import-some-docs
Import some docs
2016-05-05 16:40:31 -04:00
Emmanuel Lepage Vallée 504018343b Merge pull request #873 from Elv13/geometry_overhaul_p3.01
Geometry overhaul p3.01
2016-05-05 16:23:11 -04:00
Uli Schlachter 6b4a2625cb test-spawn-snid.lua: Use test client instead of urxvt
Startup notification support in urxvt is optional while GTK always supports
startup notification. Thus, use the new GTK-based test client for the SN tests.

Fixes: https://github.com/awesomeWM/awesome/issues/848
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-05 18:48:24 +02:00
Uli Schlachter 697a88958e client_manage: Check for _NET_STARTUP_ID on WM_CLIENT_LEADER
Apparently the spec allows to set the _NET_STARTUP_ID value on the property that
WM_CLIENT_LEADER points to instead of the window itself. Thus, if we don't find
a _NET_STARTUP_ID on the window itself, check again on the client leader window.

Apparently GTK even does this (for whatever reason...)...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-05 18:29:35 +02:00
Emmanuel Lepage Vallee 3945f13fc4 placement: Fix an semi-infinite loop when attaching to geometries
It would add a new connection each time and eventually get very
slow.

An regression test will be published later.
2016-05-04 23:47:44 -04:00
Emmanuel Lepage Vallee 58ecc69af8 mouse: Add 'current_widget' 2016-05-04 17:25:05 -04:00
Emmanuel Lepage Vallee cf0a4b42b4 mouse: Add `current_widgets` 2016-05-04 17:25:05 -04:00
Emmanuel Lepage Vallee 81064daa42 doc: Fix find_widgets() doc. 2016-05-04 17:25:05 -04:00
Emmanuel Lepage Vallee c1fc222d89 mouse: Fix `current_wibox` 2016-05-04 17:25:05 -04:00
Emmanuel Lepage Vallee baf290a8b2 drawin: Add a get_wibox function
As wibox contain a drawin, but isn't one, it is necessary to map
drawin to wibox.

This could eventually be fixed by turning wibox into drawin just
like the client, tag and screen do.
2016-05-04 17:25:05 -04:00
Emmanuel Lepage Vallee 5404b3c374 drawin: Add a property miss handler 2016-05-04 16:37:39 -04:00
Emmanuel Lepage Vallee 66ca66ca87 tests: Add basic drawin shim 2016-05-03 17:12:54 -04:00
Emmanuel Lepage Vallee d50acedb35 drawin: Hide from ldoc
This object should not be used directly by the vast majority
of users.
2016-05-03 17:12:54 -04:00
Emmanuel Lepage Vallee 1a114e4e57 wibox: Import drawin documentation
This improve consistency.
2016-05-03 17:12:54 -04:00
Daniel Hahler 087d578755 tests: fail if $AWESOME does not exist / is not executable (#872)
Without this the stdout/stderr rediraction when launching it makes the
error regarding the "program not found" disappear(?!).

[ci skip]
2016-05-03 12:08:00 +02:00
Daniel Hahler 7bd9cd7fd1 doc: fix usage of "mouse.move" as a string (#871)
Ref: https://github.com/awesomeWM/awesome/issues/834#issuecomment-216141389.
2016-05-03 12:06:50 +02:00
Daniel Hahler 7b0dcfc3df Travis: apidoc: improve merge commit's message
- This should really add the reference to the PR/commit that triggered
   the apidoc changes.
 - Link to job instead of build.
 - Add URL to commit range.

Closes https://github.com/awesomeWM/awesome/pull/865.
2016-05-02 01:52:56 +02:00
Jajauma 612756ff0e tests: test-resize: use math.ceil to handle uneven screen height
See https://github.com/awesomeWM/awesome/issues/848#issuecomment-216052517.
Closes https://github.com/awesomeWM/awesome/pull/869.
2016-05-02 01:43:11 +02:00
Daniel Hahler 95f1b1ad56 Travis: use new GH_APIDOC_TOKEN
While still being used via Travis' `secure` env mechanism, we could
additionally set it through an env for the repo (not displayed by
default), and revoke/regenerate it when it gets revealed.
The token provides access only to the `apidoc` repo.

Closes https://github.com/awesomeWM/awesome/pull/866.
2016-05-02 00:56:01 +02:00
Daniel Hahler 6b6cbf4a1f Merge pull request #828 from psychon/screen-scan2
Stop restarting on RandR changes
2016-05-01 17:00:05 +02:00
Daniel Hahler e4623d0e20 Merge pull request #864 from psychon/menubar-query-file-type
menubar.utils.parse_dir: Ask Gio for file type
2016-05-01 16:56:07 +02:00
Uli Schlachter 9a42ae87cf awful.wibox: Handle screen removal
When a screen is removed, awful.wibox now hides all wiboxes that it created for
this screen.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-01 10:12:04 +02:00
Uli Schlachter ac81a8df1f c.to_selected_tags(): Handle screenless clients
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-01 10:09:26 +02:00
Uli Schlachter 8ca65cbc26 Update screen geometry and outputs on changes
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-01 10:09:26 +02:00
Uli Schlachter 66ad236d2e Clean up after a removed screen
When a screen is removed, we have to update screen.primary (if it was the
removed screen) and assign a different screen to all clients which were on the
removed screen.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-01 10:09:26 +02:00
Uli Schlachter dceb532d26 Re-add duplicate screen removal
An earlier commit removed this code (back when it was still part of
screen_add()).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-01 10:09:26 +02:00
Uli Schlachter 080609f6ec Add a screen checker.
A client cannot be used any more after it was unmanaged. Similarly, Lua
shouldn't be allowed to e.g. assign a client to a screen that was removed. This
commit adds such a checker which "breaks" all screens which are not in the
global screen list.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-01 10:09:26 +02:00
Uli Schlachter b651373cda Stop restarting on RandR changes
This commit adds a "removed" signal to screens. Together with the "added" signal
that we have since a while, this allows the C code to update the list of
available screens dynamically without needing to restart.

So far, this code received only minimal testing. So far, I don't have a nice
idea on how to easily test this...

Closes: https://github.com/awesomeWM/awesome/issues/672
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-01 10:09:26 +02:00
Uli Schlachter 8de8df1415 Move call to xcb_randr_select_input into screen.c
The code in screen.c should decide about this kind of thing.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-01 10:09:26 +02:00
Uli Schlachter cba8655ca8 Switch to a more specific nvidia binary blob work-around
We once had the problem that with the nvidia blob, the X11 server told us that
"yes, I do support RandR; there is just a single big screen" even though there
were multiple screens and they could be queried for via Xinerama. To work around
this, we started to ignore RandR if it only provided information about a single
screen.

Our long-term goal is to stop restarting on RandR screen changes. Thus, even if
only a single screen is defined during startup, we should still use RandR later
when another screen is added. This means that we cannot just ignore RandR if it
only mentions a single screen.

This commit copies what GTK+ does: If there is an output named "default", then
some compatibility layer is assumed and we ignore RandR.

I have no way to test if this really does the right thing.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-01 10:09:26 +02:00
Uli Schlachter ebe86e32d7 Restructure the way screen_scan() works
Instead of adding all screens directly to globalconf.screens, the individual
"scanner functions" now get a screen_array_t as their argument and add the
screens there. Also, they no longer emit the "added" signal themselves (through
screen_add()), but the caller does now does this instead once all screens are
found.

This commit drops the "deduplication" of screens. This likely means that clone
mode causes duplicate screens. This will have to be re-added later.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-01 10:09:26 +02:00
Uli Schlachter 0c575ee3df Import DoingARelease from the wiki
This was only partly converted to markdown. It still refers to wiki pages with
wiki syntax, because we first have to decide on what happens with the wiki
before this can be updated.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-01 10:08:43 +02:00
Uli Schlachter 86ca5281f4 Import some FAQ
This is the current version of the FAQ in the wiki converted to markdown, but
some IMO bogus content was stripped (e.g. references to awesome being a
non-reparenting WM).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-01 10:08:43 +02:00
Emmanuel Lepage Vallée dbd0931343 Merge pull request #844 from Elv13/geometry_overhaul_p2
Geometry overhaul part 2.5
2016-04-30 23:29:29 -04:00
Uli Schlachter a37f12c0a1 menubar.utils.parse_dir: Ask Gio for file type
When not including standard::type in the query for children of a file then Gio
may not look up this information. This might work on some file systems (e.g.
ext4), but other (apparently XFS) do not provide the needed file type
information (see man readdir on the d_type field). The result was that the
menubar contained no entries because no .desktop files were identified as
regular files and thus read.

Fix this by including standard::type in the queries.

Also, this commit makes the code use some pre-defined string constants from Gio
to make "double sure" that typos are caught.

Thanks to @Jajauma for doing the hard part on debugging this.

Fixes: https://github.com/awesomeWM/awesome/issues/863
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-04-30 19:23:46 +02:00
Daniel Hahler cf4324fd5f Merge pull request #858 from psychon/wallpaper-function
Wallpaper function
2016-04-30 15:53:13 +02:00
Emmanuel Lepage Vallee 3dab42e6a2 mouse: Restore support for layouts with their own mousegrabber 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee e41853a47a tests: Test floating client move, snap and resize 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee cd632e4a84 mouse.dragtotag: Fix and port to the new move API
It wasn't really working as it would in other WM. It might have
been a feature, but I got the behavior in line with KDE and Gnome.
2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee a62e749216 mouse.snap: Add some configuration options 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee e31563b056 mouse.move: Return the corner 2016-04-30 04:27:34 -04:00
Emmanuel Lepage Vallee 6e354cd376 doc: Add proper mouse documentation 2016-04-30 04:27:34 -04:00