when the padding aroun the window changes, update
ClosedPublic

Authored by mart on Mar 17 2017, 11:37 AM.

Details

Summary

update m_visibleRectBeforeGeometryUpdate when the padding
change signal gets emitted: aurorae updates its shadow
and postentially shadow size asynchronously after repainting.
that would make the first addRepaintDuringGeometryUpdates
when the winow is moved *for the first time* have a wrong
m_visibleRectBeforeGeometryUpdate that doesn't take into
account the shadow, leaving some leftover shadow on screen

BUG:377670

Test Plan

shadow leftover not reproducible anymore with maui's kwinrc
replaces D4989
tested both on master and together D4990, which should go in as well

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mart created this revision.Mar 17 2017, 11:37 AM
Restricted Application added a project: KWin. · View Herald TranscriptMar 17 2017, 11:37 AM
Restricted Application added subscribers: KWin, kwin, plasma-devel. · View Herald Transcript
mart edited the test plan for this revision. (Show Details)Mar 17 2017, 11:38 AM
mart edited the test plan for this revision. (Show Details)
mart added a reviewer: davidedmundson.
graesslin added inline comments.Mar 17 2017, 4:24 PM
abstract_client.cpp
88–90

why are you putting that into a lambda?

mart added inline comments.Mar 17 2017, 4:28 PM
abstract_client.cpp
88–90

it's not a slot

graesslin edited edge metadata.Mar 17 2017, 4:28 PM

I'm not sure whether this is the right solution. This yells side-effect and potential breakage in other areas to me.

Also I don't like the idea of having decoration specific workarounds in the core.

abstract_client.cpp
88–90

so what? you can connect to any method

mart updated this revision to Diff 12566.Mar 17 2017, 4:34 PM
  • just connect the method
Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptMar 17 2017, 4:34 PM

So if I understand correctly on the paddingChanged we do not need to repaint, you are only interested in the update of the m_visibleRectBeforeGeometryUpdate? In that case I suggest to update it whenever the shadow changes.

mart added a comment.Mar 17 2017, 4:37 PM

So if I understand correctly on the paddingChanged we do not need to repaint, you are only interested in the update of the m_visibleRectBeforeGeometryUpdate? In that case I suggest to update it whenever the shadow changes.

yes.
so just update that property in a lambda without the actual call to addRepaintDuringGeometryUpdates? (and addLayerRepaint)

mart added a comment.Mar 17 2017, 4:40 PM

I'm not sure whether this is the right solution. This yells side-effect and potential breakage in other areas to me.

Also I don't like the idea of having decoration specific workarounds in the core.

well, this shows that m_visibleRectBeforeGeometryUpdate can become wrong if the window sets a shadow on itself without actually resizing the window geometry (it becomes evident in aurorae because it renders asyncronously and the shadow can be set only after the rendering is actually done)
so i think guarding against it should be a good thing, regardless of aurorae

In D5078#95680, @mart wrote:

So if I understand correctly on the paddingChanged we do not need to repaint, you are only interested in the update of the m_visibleRectBeforeGeometryUpdate? In that case I suggest to update it whenever the shadow changes.

yes.
so just update that property in a lambda without the actual call to addRepaintDuringGeometryUpdates? (and addLayerRepaint)

would be better in my opinion. That would make it more clear what happens and is also more correct. After all the idea of the variable is to include the geometry including the shadow and it doesn't get updated when the shadow changes.

mart updated this revision to Diff 12567.Mar 17 2017, 4:46 PM
  • just update m_visibleRectBeforeGeometryUpdate
Restricted Application edited projects, added KWin; removed Plasma. · View Herald TranscriptMar 17 2017, 4:46 PM
graesslin accepted this revision.Mar 17 2017, 4:46 PM
This revision is now accepted and ready to land.Mar 17 2017, 4:46 PM
This revision was automatically updated to reflect the committed changes.