This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Wallpaper won't span across two monitors

Tags: None
(comma "," separated)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
At the moment, Plasma Desktop does not support allowing external applications to cause the wallpaper (or any other Plasma settings) to change - so I doubt a program such as Wallch could help here - unless Plasma Desktop were extended to include such an interface.

The only thing I can think of is that the Image wallpaper plugin may watch the file it is showing for changes - so replacing the wallpaper being shown by cronjob might be a usable workaround if this is the case.

In regards to having this functionality integrated - it would be complex as it would require for the various wallpapers to be aware of the layout of your screens - and multiple wallpaper plugins would have to communicate with each other - particularly concerning settings and the portion of the image they should be displaying.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
scotts
Registered Member
Posts
1
Karma
0
Please excuse me while I beat this horse.

TheBlackCat wrote:

2. It is the only usable solution when dealing with monitors that are not in a straight horizontal or vertical line
3. It is the only usable solution when there are gaps between the two screens
4. It is the only usable solution when monitors might be disconnected, reconnected, or moved


2. Not KDE's problem. Physical positioning of displays is the user's job.
3. Not KDE's problem. All monitors have dead space between them because monitors have framed edges and the laws of physics prevents 2 objects from physically occupying the same space and time making said gap(s) inevitable. Any lack of comprehension of these facts, if present, is the user's problem.
4. KDE already knows this information based on the configuration of the display control panel. If a monitor is disconnected, the display control panel adjusts to 1 monitor automagically. You have no reason to change/reset any wallpaper on the remaining monitor(s).

If the display control panel says the monitors are the same resolution and side-by-side, you extend the wallpaper from upper left of monitor 1 to the bottom right corner of monitor N. All you have to do is span the wallpaper in the orientation declared in the display control panel. If the the monitors are different sizes/shapes/colors/different sexual orientations/evil/turned around backwards/drunk or in different countries, it's not your problem. It's the user's problem. If the user choose to not set the monitors up in numerical order from left to right, that too is the user's problem.

I have a really really hard time accepting this because every other OS on the planet can extend wallpaper to multiple monitors. Mac supports it, Windows has supported it for years, light weight DE's like Cinnamon can do it, and even that trash heap called Gnome 3 can do it.
ssokolow
Registered Member
Posts
1
Karma
0
In case anyone wants it, I just whipped up a workaround for my own use (Python 2.x or 3.x + PyQt 4.x or 5.x).

(I'd also link directly to the GitHub Gist, but that triggers "Error code 15: This request was blocked by the security rules". I'm guessing that's because I'm a brand new user who's trying to post more than one link.)

Anyway, because X11 represents the desktop as a single rectangle where some bits are "dead zones", the simplest "Just Works™" solution is to use the "Scaled & Cropped" scaling code to fill that rectangle, then copy out pieces of the resulting image that match the XRandR-supplied bounding rectangles for the actual monitors. That's basically how other desktops do it.

The only config tweak I can imagine possibly wanting is a cropping gravity control and that's just a shortcoming of the existing "Scaled & Cropped" behaviour which becomes more obvious when you've got three monitors in a very wonky layout while you wait for inexpensive mounting hardware to arrive from Hong Kong.

Boilerplate and line-wrapping aside, each activity would need less than ten lines of code since all inter-activity state is already held by X11:
Code: Select all
    QDesktopWidget desktopWidget = qapplication_instance.desktop();
    QRect desktopRect = QRect(0, 0, desktopWidget.width(), desktopWidget.height());
    QRect monitorRect = desktopWidget.screenGeometry(activityWidget);   // (or XRandR monitor number or a QPoint)
    QImage scaledImage = backgroundImage.scaled(desktopRect.size(), Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation);

    // OPTIONAL: adjust how an aspect ratio mismatch will be reconciled
    desktopRect.moveCenter(QPoint(desktopRect.center().x(), image.height() / 2));
    desktopRect.moveBottom(scaledImage.height());
    scaledImage = scaledImage.copy(desktopRect)

    // OPTIONAL: Cache here so the previous scaled() and copy() calls don't get needlessly re-run for each activity sharing the same spanned background
    // TODO

    QImage activityBackground = scaledImage.copy(monitorRect);
    // ...and now, you just set activityBackground as your background


For someone already confident in their C++ skills, familiar with the Plasma codebase and KDE contribution procedures, and having a developement environment set up (DEFINTELY not me), it should be trivial to add a "Scale to span desktop" option like LXDE and Xfce offer.

Definitely simpler than what I had to do to reinvent code already present in Plasma (eg. path validity checking) and to work around the lack of a "reload backgrounds from disk" D-Bus API call.
mikebutash
Registered Member
Posts
2
Karma
0
I'll beat the dead horse some.

Why is this still not available in kde to stretch a single image across all displays?

I found some value to the ability to choose each on my prior desktop setup, which was 6x 1080p displays horizontally, so no one image ever wrapped that and it was useful. I moved to 3x 4k displays that digital blasphemy beautifully renders images at 11520x2160 match my display framebuffer, happen to work perfectly for my purposes that I want to stretch across all 3, and kde can't/won't easily. I took a fav image, split it 3x ways in gimp, and assigned one to each going the hard way, and sort-of works doing so.

I can't cycle them all in sync across displays even doing that with 70-some 3x4k images, but worse this is complicated because there are bugs with the null display issue in most Qt5.x that when my 4k tv's get turned off, qt, and core kde apps including plasma/kwin all freak out and move stuff poorly trying to adjust. Minor result is my images end up out of order annoyingly as do all apps, doing so it usually screws up enough it's easier to fix with a hard reboot to settle hardware/software and reset kde to last known decent placements. Starts to feel like windoze having to do this every other day.

I'd really like to see some stretch feature across the entire single framebuffer, but each screen now needs to be aware of the others where kde seems to keep them in separate namespaces. Viewing some of said art on 3x 48" 4k tv's is great as a working desktop, said in older posts here, using Cinnamon I set a whole directory to cycle through, that was glorious to watch changing on them all every few minutes. More regular size monitors are coming in 4k too, so this is relevant beyond tv's.

Odd part, what brought me back to try to make kde work for me was it's transparency to idle windows desktop behavior feature cinnamon doesn't match, and I happen to love with the mega-displays. I do this with a 3x4k blasphemy render and sometimes get lost staring at the depths of the art of each through idle clutter windowsl, better or worse. The fact kwin handles a 11520x2160, with gl gaming on real titles, is impressive considering compiz won't even launch by default on it, I'd just like this screen background wrap feature, and there is a good 6-7 years of people grumbling about it beyond just me too. A small annoyance with kde, but one I'd vote to add too.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]