awful.placement.no_overlap: Ignore desktop clients

EWMH describes desktop windows like this:

"_NET_WM_WINDOW_TYPE_DESKTOP indicates a desktop feature. This can include a
single window containing desktop icons with the same dimensions as the screen,
allowing the desktop environment to have full control of the desktop, without
the need for proxying root window clicks."

An example for such a window is nautilus' virtual root window. Naturally, such a
window would always overlap with any given client, so awful.placement.no_overlap
just didn't do anything at all. The fix is to ignore such clients for placement
calculations.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2010-09-03 17:43:36 +02:00
parent 9b972842c3
commit e77b979092
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ function no_overlap(c)
local areas = { capi.screen[c.screen].workarea }
local geometry = c:geometry()
for i, cl in pairs(cls) do
if cl ~= c and (client.floating.get(cl) or curlay == layout.suit.floating) then
if cl ~= c and cl.type ~= "desktop" and (client.floating.get(cl) or curlay == layout.suit.floating) then
areas = area_remove(areas, cl:geometry())
end
end