You are not logged in.

#1 2009-09-14 19:16:05

Boris Bolgradov
Member
From: Bulgaria
Registered: 2008-07-27
Posts: 185

[Awesome] Floating windows covering the taskbar.

I was looking for a way to prevent the windows from covering the taskbar when setting them to float.
To do this you must add "placement.no_offscreen(c)" to /usr/share/awesome/lib/awful/client.lua at the end of the floating.set function:

...
function floating.set(c, s)
    local c = c or capi.client.focus
    if c and property.get(c, "floating") ~= s then
        property.set(c, "floating", s)
        local screen = c.screen
        if s == true then
            c:geometry(property.get(c, "floating_geometry"))
        end
        c.screen = screen
        capi.hooks.arrange()(c.screen)
        capi.hooks.property()(c, "floating")
    end
    placement.no_offscreen(c)  --- here
end
...

This will place the client without it being outside the screen.

Thanks, anrxc!

*edit: use client.lua, instead of rc.lua (because of some issues with fullscreen apps, like youtube videos in fullscreen not covering the taskbar, mplayer, etc)

Last edited by Boris Bolgradov (2009-09-24 15:45:02)

Offline

#2 2009-09-15 00:05:28

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 834
Website

Re: [Awesome] Floating windows covering the taskbar.

You didn't see the awful.placement module? You can use the no_offscreen function which prevents floating clients from being placed outside the work area.


You need to install an RTFM interface.

Offline

#3 2009-09-15 05:42:21

Boris Bolgradov
Member
From: Bulgaria
Registered: 2008-07-27
Posts: 185

Re: [Awesome] Floating windows covering the taskbar.

anrxc wrote:

You didn't see the awful.placement module? You can use the no_offscreen function which prevents floating clients from being placed outside the work area.

Hm... I saw that, but didn't tried it, because I thought it wouldn't work because the reference says it prevents the windows from going off the screen (I thought the whole screen, including the taskbar/work area). Thanks!

Offline

Board footer

Powered by FluxBB