D29256: [server] Introduce mapped() signal

2020-05-04 Thread Vlad Zahorodnii
zzag closed this revision. REPOSITORY R127 KWayland REVISION DETAIL https://phabricator.kde.org/D29256 To: zzag, #kwin, davidedmundson, apol Cc: apol, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29256: [server] Introduce mapped() signal

2020-04-29 Thread Aleix Pol Gonzalez
apol accepted this revision. REPOSITORY R127 KWayland BRANCH introduce-mapped-signal REVISION DETAIL https://phabricator.kde.org/D29256 To: zzag, #kwin, davidedmundson, apol Cc: apol, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29256: [server] Introduce mapped() signal

2020-04-28 Thread Vlad Zahorodnii
zzag marked an inline comment as done. REPOSITORY R127 KWayland BRANCH introduce-mapped-signal REVISION DETAIL https://phabricator.kde.org/D29256 To: zzag, #kwin, davidedmundson Cc: apol, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

D29256: [server] Introduce mapped() signal

2020-04-28 Thread Vlad Zahorodnii
zzag added inline comments. INLINE COMMENTS > apol wrote in surface_interface.cpp:333 > I don't understand, ^ and != are logically equivalent, ^ is the bitwise > counterpart. > > Am I missing something? Oh, I thought you suggested to do `source->buffer != target->buffer`. REPOSITORY R127

D29256: [server] Introduce mapped() signal

2020-04-28 Thread Vlad Zahorodnii
zzag updated this revision to Diff 81456. zzag marked 2 inline comments as done. zzag added a comment. Use != REPOSITORY R127 KWayland CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D29256?vs=81453=81456 BRANCH introduce-mapped-signal REVISION DETAIL

D29256: [server] Introduce mapped() signal

2020-04-28 Thread Aleix Pol Gonzalez
apol added inline comments. INLINE COMMENTS > zzag wrote in surface_interface.cpp:333 > We can't use != because mapped() will be emitted each time a new buffer is > attached to the surface. I don't understand, ^ and != are logically equivalent, ^ is the bitwise counterpart. Am I missing

D29256: [server] Introduce mapped() signal

2020-04-28 Thread Vlad Zahorodnii
zzag added inline comments. INLINE COMMENTS > apol wrote in surface_interface.cpp:333 > Using != would probably be more readable and accurate (we're don't need it to > be bitwise, we're assuming bool changes it to 1 or 0). We can't use != because mapped() will be emitted each time a

D29256: [server] Introduce mapped() signal

2020-04-28 Thread Vlad Zahorodnii
zzag updated this revision to Diff 81453. zzag added a comment. Check whether the attached buffer flip-flopped between non-null and null only when bufferChanged is true. REPOSITORY R127 KWayland CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D29256?vs=81432=81453 BRANCH

D29256: [server] Introduce mapped() signal

2020-04-28 Thread Aleix Pol Gonzalez
apol added a comment. +1 INLINE COMMENTS > surface_interface.cpp:333 > const bool childrenChanged = source->childrenChanged; > +const bool visibilityChanged = bool(source->buffer) ^ > bool(target->buffer); > bool sizeChanged = false; Using != would probably be more readable

D29256: [server] Introduce mapped() signal

2020-04-28 Thread David Edmundson
davidedmundson accepted this revision. This revision is now accepted and ready to land. REPOSITORY R127 KWayland BRANCH introduce-mapped-signal REVISION DETAIL https://phabricator.kde.org/D29256 To: zzag, #kwin, davidedmundson Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh,

D29256: [server] Introduce mapped() signal

2020-04-28 Thread Vlad Zahorodnii
zzag created this revision. zzag added a reviewer: KWin. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. zzag requested review of this revision. REVISION SUMMARY In KWin, we need to know when a sub-surface becomes mapped or unmapped so we can generate or