Commit Graph

583 Commits

Author SHA1 Message Date
Xinhao Yuan ab6f7e03ca
Relocate a client window as if it is undecorated when reparenting it back. It eliminates the position offset due to re-decorating when a client trys to restore its previous position. (#3253)
Add tests for geometry changes when managing/unmanaging clients. Also verified that it fixed issue #2308.
2022-02-02 22:59:01 +01:00
Xinhao Yuan 21b908bef9
Fix a regression that only property::x and property::width are emitted when all {x,y,width,height} properties are changed. (#3537) 2021-12-30 13:23:44 -08:00
Aire-One aa378a1d4c
fix(client_get_some_icon) loosness about fail
Review @sclu1034
2021-11-15 22:44:26 +01:00
Aire-One 219cff8726 doc(icon) note on default value 2021-11-15 19:18:02 +01:00
Aire-One ea349cee6a doc(client_get_some_icon) Improve description 2021-11-15 19:18:02 +01:00
Sergey fcef95b1f0 Removing duplicating descriptions of screen properties as read only
Removed "Immutable: true" from readonly properties descriptions.
2021-10-27 14:52:36 -04:00
Sergey 6c3d233893 Mark readonly properties for screen 2021-10-27 14:52:36 -04:00
Sergey 43ff4e07ad Marking readonly properties for client 2021-10-27 14:52:36 -04:00
Emmanuel Lepage Vallee ae71158093 doc: Add documentation for the client "window factor" related functions
It might be a good idea to deprecate them and move them to the tag
class. However, these APIs are not exactly well designed, so
moving them wont solve that. Some day the dynamic client layout will
hopefully be merged and send these functions to the heap of smelly
bad ideas trash.
2021-10-18 14:38:37 -07:00
Emmanuel Lepage Vallee 62685c661d doc: Modernize the tag documentation... again...
The last time this page had a refresh was in parallel with another
massive whole-doc project. Thus, this page still had older
conventions which everything else had already removed.
2021-10-18 14:38:37 -07:00
Emmanuel Lepage Vallee a8d2fa0297 doc: Add a large number of `client` examples.
Backfill some under-documented APIs with yet more shiny images.
2021-10-18 14:38:37 -07:00
Emmanuel Lepage Vallee 028d01590a doc: Add a client.border_width example. 2021-10-15 19:50:03 -07:00
Emmanuel Lepage Vallee 80515c2225 doc: Fix rendering of `client:swap()`. 2021-10-15 14:27:30 -07:00
Lucas Schwiderski 4520f33309
doc(client): Improve signal wording
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-06-20 13:49:23 +02:00
Lucas Schwiderski fcae67cc03
doc: Move inline usage to example files
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-06-20 13:47:27 +02:00
Lucas Schwiderski dc0d5df4da
doc: Implement review suggetions
Co-authored-by: Aire-One <Aire-One@users.noreply.github.com>
2021-06-20 12:25:11 +02:00
Lucas Schwiderski bf4ad3310d
doc(client): Improve signal documentation
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-06-17 15:37:35 +02:00
Lucas Schwiderski 1cd89e7de5
doc(tag): Add example for request::default_layouts
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-06-17 15:37:33 +02:00
Lucas Schwiderski a6864a3e59
doc(tag): Reword signals documentation
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-06-17 15:37:32 +02:00
Lucas Schwiderski 7838e89d7f
doc(client): Fix incorrect documentation
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-06-17 15:37:31 +02:00
Lucas Schwiderski e0dea455c1
doc(client): Document special case for border color
Apparently transparent client borders only work when the border color is
set to `#00000000` specifically.

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-05-22 01:18:16 +02:00
Emmanuel Lepage Vallee 31fcce436c doc: Add a client border color example. 2021-03-22 00:56:02 -07:00
Emmanuel Lepage Vallee 8fb4e2b721 doc: Add a client "sticky" example. 2021-03-22 00:54:00 -07:00
Emmanuel Lepage Vallee a39f66e1c6 doc: Add an example for the client struts. 2021-03-21 23:58:05 -07:00
Uli Schlachter db330e0cfe
Make sure that c.name is never nil (#3251)
Fixes: https://github.com/awesomeWM/awesome/issues/3248
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-02-28 23:02:54 -08:00
Peter Lyons 764b84da56
Doc typo mislabeled height 2020-09-19 08:28:00 -06:00
Emmanuel Lepage Vallee 68bc9eba15 tag: Fix an off-by-one caused by a mutatation during a `foreach`.
Fix #3167
2020-09-14 00:19:38 -07:00
Reiner Herrmann d256d90550 Move variable declarations from header to C file to fix build with GCC 10
GCC 10 builds with -fno-common by default, which causes linker errors when
variables are declared in header files and included in multiple places.

See also: https://gcc.gnu.org/gcc-10/porting_to.html
2020-04-17 19:25:40 +02:00
Uli Schlachter 8df463f971 doc: Improve the client documentation. 2020-01-19 20:30:06 -05:00
Emmanuel Lepage-Vallee 575b0f12dc doc: Remove all type aliases.
They render poorly and serve no purpose.

    #!/bin/bash
    for FILE in $(git ls-files | grep -E "\.(h|c|lua)" | grep -v tests | grep -v spec); do
        sed -i 's/^[ ]*--*[ ]*@client /-- @tparam client /g' $FILE
    done
2020-01-19 20:30:06 -05:00
Emmanuel Lepage-Vallee 5e720c9744 doc: Major client documentation backfill.
This commit mostly rewrite the client documentation and pay the
technical debt accumulated over the years. Most of the client
documentation was still one-liners from the luadoc era. It now
has all the new tags, type. It also has actual description of
what the properties do beyond the name.
2020-01-19 20:11:19 -05:00
Emmanuel Lepage Vallee 20743a9a16 Remove all usage of the now deprecated `awful.rules`. 2020-01-19 02:59:10 -05:00
Emmanuel Lepage Vallee 6ecab5f2f1 doc: Add documentation in each objects which emit request:: signals. 2020-01-11 15:43:31 -08:00
Emmanuel Lepage Vallee 257556793a doc: Document the client request::default_keybindings signal. 2020-01-11 15:43:31 -08:00
Emmanuel Lepage Vallee c5202a4870 tag: Add a context to request::select. 2020-01-11 15:43:31 -08:00
Emmanuel Lepage Vallee 6b427e73a8 tag: Add a request::layouts signal and append/remove layout. 2020-01-11 15:43:31 -08:00
Emmanuel Lepage Vallee efc42b1be1 autofocus: Modify `awful.autofocus` to be a request::.
This also pulls in part of the permission framework to ensure
backward compatibility is kept.

`awful.autofocus` was always weird. It is a module part of `awful`,
but it was never part of `awful` `init.lua`. Rather, `rc.lua` was
the sole place it was used. It behave exactly like a request, but
predate them by years. As I cleanup the request:: API before the
permissions API gets formalized, this has to be fixed now.

It isn't deprecated in this commit because it makes too many tests
fail. Another pull request will solve that by adding the "API level"
concept to AwesomeWM so I can change the behavior without breaking
existing configs. With that, the behavior of `autofocus` will be
enabled by default with the permissions to disable it.
2020-01-11 15:43:15 -08:00
Emmanuel Lepage Vallee 5ad0856fee layout: Add a `request::default_layouts` to fill the list of layouts.
This will allow the default client layout list to be manipulated by
modules without the risk of overwriting each other.

The commit also add a new `--{{{ Tag --}}}` section to `rc.lua`. It will
be expanded once the tag rules get merged.
2020-01-11 15:43:15 -08:00
Emmanuel Lepage Vallee 04c757322c client: Turn `rc.lua` logic into a new `request::border` signal.
The default `rc.lua` was using the focus/unfocus signals to set
the border color along with `awful.rules`. This logic block was
no longer aligned with the rest of `rc.lua` since it was
the only place where `beautiful` variables where only used by
`rc.lua`.

On top of this, the new request handler also has extra contexts
for the urgent and floating/maximixed use cases. So it can be used
by themes to implement much smarter borders than just focus based
ones. They were previously limited by the fact most of the
(un-monkey-patchable) logic was in `rc.lua`.

Note that this commit also shuffle the awful.rules order between
the titlebar and the border and changes the tests accordignly.
After some consideration, I came to the conclusion the previous
behavior was bogus and the fact that the placement tests required
to know about the titlebar height is simply a proof of that. The
change was required in this commit because since the border is no
longer in the default rules, a new buggy edge case surfaced.
2020-01-11 15:43:11 -08:00
Emmanuel Lepage Vallee c10bdc3cfe client: Add a property::active signal. 2020-01-11 14:43:56 -08:00
Emmanuel Lepage Vallee 067bcaca60 client: Rename the `manage` and `unmanage` signals.
They currently fit the general concept of a `request::` in the sense
that they are not property related and have "request handlers".

The commit also add deprecation for signals.

The reason for this fits within the larger standardization project.
Non-namespaced signals will eventually be renamed. This has started
a long time ago.

What is old is new again. Once upon a time, there was a `startup`
parameter to the `manage` signal. It is now back in the form of
a context.

Finally, this commit removes the `manage` section of `rc.lua`. It no
longer did anything worthy of being in the config. Each of its
important parts have been moved out over the years and the last
remaining bit is always required anyway. The code has been moved
to `client.lua`.
2020-01-11 14:43:56 -08:00
Emmanuel Lepage Vallee 44a665d381 awful.rules: Use the `awful.client/mouse` default buttons and keys. 2019-12-05 22:49:59 -05:00
Emmanuel Lepage Vallee d6568993e2 awful.mouse: Add a "request::default_mousebindings" signal.
`rc.lua` and the module must attach to this signal to add buttons
to the default set.
2019-12-05 22:48:52 -05:00
Aire-One 82a2769e04 Fix ldoc modules summaries missing the final `.`. 2019-11-28 13:53:59 +01:00
Emmanuel Lepage Vallee 296ad18922 client: Move the `c:keys()` method to a property. 2019-10-05 18:06:51 -04:00
Emmanuel Lepage Vallee 29e804a4f8 drawin: Turn `:buttons()` into a property. 2019-10-05 18:06:51 -04:00
Emmanuel Lepage Vallée ffe7c4d1cc Apply suggestions from code review
Thanks to @Aire-one for those fixes!

Co-Authored-By: Aire-One <Aire-One@users.noreply.github.com>
2019-10-05 17:16:22 -04:00
Emmanuel Lepage Vallee c2a2c789e6 doc: Add example sequences for the tags. 2019-10-05 17:16:22 -04:00
Emmanuel Lepage Vallee fa2433192a doc: Add some screen example sequences. 2019-10-05 17:16:22 -04:00
Emmanuel Lepage Vallee 9c0e16e623 doc: Add examples for the various maximization. 2019-10-05 17:16:22 -04:00