awesomeWM / awesome

awesome window manager
https://awesomewm.org/
GNU General Public License v2.0
6.4k stars 597 forks source link

Qt applications ignore awful.spawn properties #2993

Open obllin opened 4 years ago

obllin commented 4 years ago

awesome v4.3 (Too long) • Compiled against Lua 5.3.5 (running with Lua 5.3) • D-Bus support: ✔ • execinfo support: ✔ • xcb-randr version: 1.6 • LGI version: 0.9.2

Qt applications ignore awful.spawn properties Tested on applications: konsole, qterminal, qbittorrent, virtualbox

awful.key({ modkey }, "v", function () awful.spawn("konsole", {tag = awful.screen.focused().tags[5]}) end)
awful.key({ modkey }, "b", function () awful.spawn("konsole", {width=500, height=500}) end)

But if you use global rule, then the properties work correctly

{   rule = { class = "konsole" }, 
    callback = function( c )
        c:geometry( { width = 1536, height = 864, x=512, y=288 } )
    end
}

P.S. With GTK awful.spawn works fine

psychon commented 4 years ago

As far as I know, Qt does not support startup-notification in a way that allows mapping a SN instance to a window. Google disagrees with me: https://doc.qt.io/qt-5/qx11info.html#nextStartupId

Do you happen to have something something older than Qt 5.4?

I do not have anything Qt-y to test this with myself.

Elv13 commented 4 years ago

Qt4 worked fine, all releases of Qt5 are broken. I tried to get them to merge the fix a few time with little success. The long story is that they did a refactoring to move some of X11 handling to an extra plugin (for Wayland) and broke the code.

There is code to set the property, but it is never called.

psychon commented 4 years ago

@Elv13 Do you happen to have links to the relevant issues / pull requests? I failed to find anything.