Why:
* Two different (but related) concepts had the same name
* Users were confused for years on IRC
* The wibar name was already in use in some doc to avoid confusion
This was only partially implemented. The margins were substracted from
the area too early in the pipeline. Now, they are added when getting
the size and substracted when setting it. This way, the margins will
"survive" when a placement function set an absolute value in one of
the field. Previously, this caused one (or more) of the margins to
be lost.
Before this commit, it was necessary to call 'rawset' to be
able to add new fields to the wibox. This is no longer required.
This solution was choosen because wibox is itself a base class of
menus and wibars. Those classes can now add new properties without
hacks.
The problem was that get_square_distance() made the screen one pixel larger to
the bottom/right than it really was. Thus, the (x+0,y+0)-pixel of a screen that
was below or to the right of some other screen had distance zero to both of
these screens.
This commit fixes the screen size computation and adds a small unit test for
getbycoord() and get_square_distance().
Reported by Elv13 here:
https://github.com/awesomeWM/awesome/pull/878#issuecomment-219272864
Signed-off-by: Uli Schlachter <psychon@znc.in>
Commit 7dad0b3b87 made awesome only ask for mouse events on the actual
client window. Obviously, this means that we no longer get reports for clicks on
the titlebar. Whoops.
Fix this by asking for mouse events on *both* the actual client window and the
frame window. The passive grab on the actual client window is actually unneeded,
but we keep it so that the fix that was done by the above commit is still
present (xev will no longer report leave/enter events just for a mouse click).
Since we now get mouse events inside of a client reported twice, the event
handling code in event.c has to be fixed to handle both cases. E.g. x/y are
relative to the top-left corner of the window and thus needs to be fixed for
titlebar size; the second click has to be ignored.
Signed-off-by: Uli Schlachter <psychon@znc.in>
EWMH specifies that
If _NET_WM_WINDOW_TYPE is not set, then managed windows with WM_TRANSIENT_FOR
set MUST be taken as [_NET_WM_WINDOW_TYPE_DIALOG].
We implement this by forcing a window's type to be "dialog" when it has a
WM_TRANSIENT_FOR property. For windows that have a _NET_WM_WINDOW_TYPE property,
this type change is then later undone. However, when a window changes its
WM_TRANSIENT_FOR property during runtime, then we would set its type to "dialog"
unconditionally.
This commit fixes this by explicitly tracking if we found a _NET_WM_WINDOW_TYPE
property on the window and only applying the fallback if we did not find such a
property.
Fixes-one-of-the-sub-issues-from: https://github.com/awesomeWM/awesome/issues/889
Signed-off-by: Uli Schlachter <psychon@znc.in>
Commit 8a6787bd54 added screen.fake_add(). Commit 08845c7a4b made us cache a
screen's workarea in the struct screen_t. This new member needs to be
initialized to the screen's geometry when a new screen is added. Since both
these commits were developed concurrently, the workarea was not initialized in
screen.fake_add().
Fix this by calling in fake_add() the helper function added in 08845c7a4b.
Signed-off-by: Uli Schlachter <psychon@znc.in>