BlingCorp / bling

Utilities for the awesome window manager
https://blingcorp.github.io/bling/
MIT License
852 stars 49 forks source link

The method "get_bounding_geometry" captures the resolution of the other screen #208

Closed SLAYER-CODE closed 1 year ago

SLAYER-CODE commented 1 year ago

Hello, I try to place the preview tag in my "popup" taskbar but when I insert the mouse the following happens.

The code that I use to activate the preview is the following:

bling.widget.tag_preview.enable({
    x = 10,
    y = 10,
    show_client_content = true,
    scale = 0.35,
    -- honor_workarea = true,
    -- honor_padding = true,
    placement_fn = function(c)
        awful.placement.bottom(c, {
            margins = {
                bottom = dpi(60),
            },
            parent = awful.screen.focus(1)
        })
    end,
    background_widget = wibox.widget({
        image = beautiful.wallpaper,
        horizontal_fit_policy = "fit",
        vertical_fit_policy = "fit",
        widget = wibox.widget.imagebox,
    }),
})

And the call to mouse::enter is the same as the example code

I suspect that it is taking the resolution of the other screen.

https://user-images.githubusercontent.com/51754456/232528753-fde09cf2-159a-422d-a337-a4daafbd3c64.mp4

SLAYER-CODE commented 1 year ago

Ok, I fixed it by placing the function in the arguments of placement_fn parent = awful.screen.focused() <--- function