qi437103 added a comment.
Sorry I should have been more specific. The difference between these two situation is whether the mouse position in global coordinate changed. Inside `onContainsMouseChanged`, if `containsMouse` - If `moved`, select current index - Else if global mouse pos changed, set `moved = true` and select current index - Else, do nothing Inside `onPositionChanged`, - If `!moved` and global mouse pos changed, set `moved = true` and select current index The initial global mouse pos could be recorded at the same time as initializing `moved = false`. This covers the following situation: - Initially mouse is outside the window, it becomes inside the window because of the height change. - Triggers `onContainsMouseChanged`, as the global mouse pos didn't change, it does nothing - Not sure if this triggers `onPositionChanged`, but it also does nothing because the check of global mouse pos - Initially mouse is outside the window, it becomes inside the window because the user moved it. - This triggers both `onPositionChanged` and `onContainsMouseChanged`. The global mouse pos changed, current index selected. - After mouse becomes inside the window because of height change, and is on some list item A, the user moves mouse within list item A - Triggers `onPositionChanged`. The global mouse pos changed, current index selected. REPOSITORY R112 Milou REVISION DETAIL https://phabricator.kde.org/D5490 To: leszeklesner, broulik Cc: ltoscano, qi437103, lfurmetz, anthonyfieroni, davidedmundson, plasma-devel, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol