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

            Bug ID: 436498
           Summary: WindowSystem::window(WId wid) returns the wrong window
           Product: kwayland-integration
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: plasma-b...@kde.org
          Reporter: fab...@ritter-vogt.de
  Target Milestone: ---

It does this:

    const auto &windows =
WaylandIntegration::self()->plasmaWindowManagement()->windows();
    auto it = std::find_if(windows.begin(), windows.end(), [wid] (PlasmaWindow
*w) { return w->internalId() == wid; } );


wid is the internally generated window id in the client process, while
internalId() returns the internally generated window id from the compositor.

Those do not match, which essentially means that any KWindowSystem functions on
wayland which take a WId act on a random window instead.

krunner for instance calls KWindowSystem::forceActiveWindow(winId()); after the
window is shown, but actually activates the desktop (plasmashell) instead.
krunner's View is the first QWaylandWindow instance and gets winId 1, while
plasmashell is the first window created by kwayland-server.

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

Reply via email to