https://bugs.kde.org/show_bug.cgi?id=477985

--- Comment #8 from Stefan Hoffmeister <stefan.hoffmeis...@econos.de> ---
The root cause of this seems to be a well-intentioned, but eventually
inapplicable, assertion of configuration change, resulting in faulty
suppression of updating:

The implementation tries hard to _not_ change the mode via `drmModeSetCrtc`.
Alas, in the case of resizing of the window ("connector"? "crtc"?) of the
virtual machine, the _mode_ does not appear to change, but the _resolution_
(width, height) changes.

With at least the following crude hack in place, I get a nicely resizing
desktop under KDE Plasma 6 git master on Wayland:
```
        const bool modeHasChanged = true || m_pending.mode != m_next.mode;
        const bool crtcHasChanged = m_pending.crtc != m_next.crtc;

        if (crtcHasChanged || modeHasChanged) {
            Error err = legacyModeset();
            if (err != Error::None) {
                return err;
            }
        }
```

I currently have a couple more experiments, hacks and log statements in place,
so I am not sure whether the above alone is sufficient - but it is very much
necessary indeed.

Now, obviously, 
```
        const bool modeHasChanged = true || m_pending.mode != m_next.mode;
```
is just ... crass.

In a different location, I poked 
```
const bool isVirtual = (m_conn->connector_type == DRM_MODE_CONNECTOR_VIRTUAL);
```
which may be slight more viable than a simple `true`.

I'd be thrilled to receive suggestions on how to _correctly_ handle "only the
dimensions have changed, but not the mode" scenarios within KDE - I have been
exposed to the combined source code of the Linux DRM kernel subsystem, libdrm,
kwin, Wayland protocols, and QT for only a handful of hours.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to