Update pointer position whenever a window gets (un)minimized

Summary:
This fixes the following problem:
1. Have two windows maximized
2. Click minimize button on first window
3. Click minimize button on second window

What happened:
Second click was ignored as the pointer was not updated.

BUG: 378704
FIXED-IN: 5.11

Test Plan:
Nested KWin/Wayland, added two maximized windows, minimized
both without moving the mouse

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8145
This commit is contained in:
Martin Flöser 2017-10-04 21:02:16 +02:00
parent af82ddb508
commit 1b01f1b300
3 changed files with 3 additions and 0 deletions

View file

@ -130,6 +130,7 @@ void PointerInputRedirection::init()
connect(m_cursor, &CursorImage::changed, kwinApp()->platform(), &Platform::cursorChanged);
emit m_cursor->changed();
connect(workspace(), &Workspace::stackingOrderChanged, this, &PointerInputRedirection::update);
connect(workspace(), &Workspace::clientMinimizedChanged, this, &PointerInputRedirection::update);
connect(screens(), &Screens::changed, this, &PointerInputRedirection::updateAfterScreenChange);
if (waylandServer()->hasScreenLockerIntegration()) {
connect(ScreenLocker::KSldApp::self(), &ScreenLocker::KSldApp::lockStateChanged, this,

View file

@ -525,6 +525,7 @@ void Workspace::setupClientConnections(AbstractClient *c)
{
connect(c, &Toplevel::needsRepaint, m_compositor, &Compositor::scheduleRepaint);
connect(c, &AbstractClient::desktopPresenceChanged, this, &Workspace::desktopPresenceChanged);
connect(c, &AbstractClient::minimizedChanged, this, std::bind(&Workspace::clientMinimizedChanged, this, c));
}
Client* Workspace::createClient(xcb_window_t w, bool is_mapped)

View file

@ -482,6 +482,7 @@ Q_SIGNALS:
void clientRemoved(KWin::AbstractClient*);
void clientActivated(KWin::AbstractClient*);
void clientDemandsAttentionChanged(KWin::AbstractClient*, bool);
void clientMinimizedChanged(KWin::AbstractClient*);
void groupAdded(KWin::Group*);
void unmanagedAdded(KWin::Unmanaged*);
void unmanagedRemoved(KWin::Unmanaged*);