support for auto-hidden windows to resize
ClosedPublic

Authored by mart on Feb 22 2017, 3:32 PM.

Details

Summary

auto hidden windows were shown again when their geometry
changed, this was done for being as easy as possible as
the unhide zone changed, but the behavior looked very
annoying as autohide panels with an self resize taskbar
would unhide themselves every time any window gets open
or closed.
This makes the edge keep track of
windows that can resize/move themselves while auto hidden

Test Plan

a self-resizing autohidden panel with a taskbar in it doesn't auto unhide
anymore when a window is opened or closed.
the unhide area gets properly updated

Diff Detail

Repository
R108 KWin
Branch
arcpatch-D4718
Lint
No Linters Available
Unit
No Unit Test Coverage
mart created this revision.Feb 22 2017, 3:32 PM
Restricted Application added a project: KWin. · View Herald TranscriptFeb 22 2017, 3:32 PM
Restricted Application added subscribers: KWin, kwin, plasma-devel. · View Herald Transcript
luebking added inline comments.
client.cpp
2086

and if the geometry changes while it's (intentionally) not hidden?

geometry.cpp
2116 ↗(On Diff #11626)

*ggggough*

screenedge.cpp
989

sure the sanity check is now really superfluous?

mart added a comment.Feb 22 2017, 4:27 PM

eww, just seen D4530 that does the same thing in a different way..
so, whatever one you guys prefer, sorry for the noise

mart updated this revision to Diff 11633.Feb 22 2017, 4:31 PM

remove m_edgeGeometryTrackingConnection when we are back to electricnone

Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptFeb 22 2017, 4:31 PM
mart marked an inline comment as done.Feb 22 2017, 4:34 PM
mart added inline comments.
client.cpp
2086

i added a disconnect when it's back to electricnone, that should fix it?

screenedge.cpp
989

this did: if the border is the same, don't bother to re-reserve it, just return.
however, the client geometry may have changed, making the current edge struct useless.

one thing it could be compared is the old client geometry associated to the current edge, but it's info that wasn't saved

graesslin requested changes to this revision.Mar 8 2017, 6:00 AM

Could you please extend autotests/integration/screenedge_client_show_test.cpp with a test case for your change?

This revision now requires changes to proceed.Mar 8 2017, 6:00 AM
mart updated this revision to Diff 12282.Mar 8 2017, 9:43 AM
mart edited edge metadata.

add autotest

Restricted Application edited projects, added KWin; removed Plasma. · View Herald TranscriptMar 8 2017, 9:43 AM
graesslin accepted this revision.Mar 8 2017, 3:48 PM
This revision is now accepted and ready to land.Mar 8 2017, 3:48 PM
This revision was automatically updated to reflect the committed changes.
This revision is now accepted and ready to land.Mar 15 2017, 6:32 PM
mart added a comment.Mar 16 2017, 10:15 AM

this seems because of the patch in line 989 it's now destroying the edge pointer when the edge is reassigned, which i think it's fine, i see some options:

  • remove the test, because the deletion of the edge pointer makes sense
  • reintroduce the check in line 989, but checking also the geometry isn't changed: this would need also tracking the actual client geometry in the edge class to be able to compare it (delete the edge only if the geometry changed)
mart added a comment.Mar 16 2017, 10:30 AM

with tracking the client geometry, i mean
https://paste.kde.org/pn3qlxobc

remove the test, because the deletion of the edge pointer makes sense

With that you mean the offending QCOMPARE (line 740)? If that fixes the test: go for it.

remove the test, because the deletion of the edge pointer makes sense

With that you mean the offending QCOMPARE (line 740)? If that fixes the test: go for it.

mart added a comment.Mar 16 2017, 4:47 PM

remove the test, because the deletion of the edge pointer makes sense

With that you mean the offending QCOMPARE (line 740)? If that fixes the test: go for it.

yes

mart added a comment.Mar 16 2017, 5:31 PM

removed offending test at line 740

mart closed this revision.Mar 16 2017, 5:42 PM