Nux

Merge lp:~unity-team/nux/areas-unqueue-relayout into lp:nux

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Brandon Schaefer
Approved revision: 853
Merged at revision: 853
Proposed branch: lp:~unity-team/nux/areas-unqueue-relayout
Merge into: lp:nux
Diff against target: 58 lines (+9/-17)
3 files modified
Nux/Area.cpp (+9/-0)
Nux/Layout.cpp (+0/-6)
Nux/View.cpp (+0/-11)
To merge this branch: bzr merge lp:~unity-team/nux/areas-unqueue-relayout
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+234899@code.launchpad.net

Commit message

Area: always make sure we remove an object from layout queue

It was done only for View's and Layout's before, but doing it for each area is better

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Nux/Area.cpp'
--- Nux/Area.cpp 2013-11-08 04:25:39 +0000
+++ Nux/Area.cpp 2014-09-17 01:29:46 +0000
@@ -74,6 +74,15 @@
7474
75 Area::~Area()75 Area::~Area()
76 {76 {
77 // It is possible that the window thread has been deleted before the area
78 // itself, so check prior to calling RemoveObjectFromLayoutQueue.
79 WindowThread* wt = GetWindowThread();
80 if (wt)
81 {
82 // It is possible that the object is in the refresh list. Remove it here
83 // before it is deleted.
84 wt->RemoveObjectFromLayoutQueue(this);
85 }
77 ResetDownwardPathToKeyFocusArea();86 ResetDownwardPathToKeyFocusArea();
78 ResetUpwardPathToKeyFocusArea();87 ResetUpwardPathToKeyFocusArea();
79 }88 }
8089
=== modified file 'Nux/Layout.cpp'
--- Nux/Layout.cpp 2014-02-22 03:50:49 +0000
+++ Nux/Layout.cpp 2014-09-17 01:29:46 +0000
@@ -49,12 +49,6 @@
4949
50 Layout::~Layout()50 Layout::~Layout()
51 {51 {
52 // It is possible that this layout object is in the refresh list. Remove
53 // it here before it is deleted.
54 WindowThread* wt = GetWindowThread();
55 if (wt)
56 wt->RemoveObjectFromLayoutQueue(this);
57
58 std::list<Area *>::iterator it;52 std::list<Area *>::iterator it;
5953
60 for (it = _layout_element_list.begin(); it != _layout_element_list.end(); it++)54 for (it = _layout_element_list.begin(); it != _layout_element_list.end(); it++)
6155
=== modified file 'Nux/View.cpp'
--- Nux/View.cpp 2013-11-06 14:31:20 +0000
+++ Nux/View.cpp 2014-09-17 01:29:46 +0000
@@ -44,17 +44,6 @@
44 backup_texture_.Release();44 backup_texture_.Release();
45 backup_depth_texture_.Release();45 backup_depth_texture_.Release();
46 background_texture_.Release();46 background_texture_.Release();
47
48 // It is possible that the window thread has been deleted before the view
49 // itself, so check prior to calling.
50 WindowThread* wt = GetWindowThread();
51
52 if (wt)
53 {
54 // It is possible that the object is in the refresh list. Remove it here
55 // before it is deleted.
56 wt->RemoveObjectFromLayoutQueue(this);
57 }
5847
59 RemoveLayout();48 RemoveLayout();
60 }49 }

Subscribers

People subscribed via source and target branches