KDE Developer
|
The minimal example code pasted below works correctly when I have only one monitor active: A widget will appear at the specified location, and some space will be reserved at the bottom of the screen (as can be seen from maximised windows stepping aside).
However, the strut does not work when I have multiple screens. The maximised windows won't move by a pixel. Can someone see what I'm doing wrong? For reference, my WM is (of course) KWin 4.8. Plasma is also running, with one panel at the top of the same screen where I want to reserve the strut. (A top panel should AFAIK not interfere with my bottom strut.)
|
Administrator
|
I've temporarily moved this to the KWin forum to attract the attention of the KWin developers, who maintain this part of kdelibs I believe...
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
KDE Developer
|
please use setExtendedStrut
|
|
struts are only accepted for dock type windows - questionable sanity check, but always been like this
|
KDE Developer
|
This is the minimal example. I observe the same behavior with a dock-shaped window that occupies exactly the strut and has been marked as dock using the corresponding Qt::WA_whatever. Re setExtendedStrut(): I considered it, but the APIDOX say that setStrut() is a convenience shortcut for a common case of setExtendedStrut(). Wait a moment, I'm just looking at the source of setStrut() on api.kde.org, and I think the variables "w" and "h" need to be swapped. (That is: In the line where setExtendedStrut() is called, the expressions for left and right strut end need to use "h", while bottom and top strut end need to use "w".) Can someone with a self-compiled kdelibs please check if this fixes the multi-monitor problem?
Proud kdegames developer since 2008, and member of the KDE forums since March 2009
|
|
sorry, i clipped on the plain QWidget and ignored the essence of your post:
how are the screens arranged? do you run into https://bugs.kde.org/show_bug.cgi?id=167852 |
KDE Developer
|
My monitors stand besides each other, so the primary display is left of the secondary display. Since I want a bottom panel, I don't think this particular bug is relevant for my situation. But admittedly, I'm a bit confused by how the WM knows at all which display I refer to, when the strut message does not include any reference to a display (only pixel metrics).
Proud kdegames developer since 2008, and member of the KDE forums since March 2009
|
|
You cannot refer to a display (by the regular NETWM spec) - the struts only apply to the combined (outer) edges.
Also the physical layout is not relevant, you can check the actual layout with xrandr or "kcmshell4 randr" or in nvidia-settings For a quick check run "openbox --replace" and see how it behaves or how struts on other edges behave. Another pitfall might be screen geometries - please post "xrandr -q" |
KDE Developer
|
OpenBox behaves just like KWin does.
Output follows, with deactivated outputs and modes omitted for brevity. (My xrandr setup of course follows the physical arrangement of the monitors.) LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 331mm x 207mm 1280x800 60.0*+ VGA1 connected 1920x1080+1280+0 (normal left inverted right x axis y axis) 510mm x 287mm 1920x1080 60.0*+
Proud kdegames developer since 2008, and member of the KDE forums since March 2009
|
|
Are struts on the top also affected?
|
Registered users: Bing [Bot], Evergrowing, Google [Bot]