Nux

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

Proposed by Marco Trevisan (Treviño) on 2014-09-17
Status: Merged
Approved by: Brandon Schaefer on 2014-09-22
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) 2014-09-17 Approve on 2014-09-22
PS Jenkins bot (community) continuous-integration Approve on 2014-09-17
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.
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Brandon Schaefer (brandontschaefer) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Nux/Area.cpp'
2--- Nux/Area.cpp 2013-11-08 04:25:39 +0000
3+++ Nux/Area.cpp 2014-09-17 01:29:46 +0000
4@@ -74,6 +74,15 @@
5
6 Area::~Area()
7 {
8+ // It is possible that the window thread has been deleted before the area
9+ // itself, so check prior to calling RemoveObjectFromLayoutQueue.
10+ WindowThread* wt = GetWindowThread();
11+ if (wt)
12+ {
13+ // It is possible that the object is in the refresh list. Remove it here
14+ // before it is deleted.
15+ wt->RemoveObjectFromLayoutQueue(this);
16+ }
17 ResetDownwardPathToKeyFocusArea();
18 ResetUpwardPathToKeyFocusArea();
19 }
20
21=== modified file 'Nux/Layout.cpp'
22--- Nux/Layout.cpp 2014-02-22 03:50:49 +0000
23+++ Nux/Layout.cpp 2014-09-17 01:29:46 +0000
24@@ -49,12 +49,6 @@
25
26 Layout::~Layout()
27 {
28- // It is possible that this layout object is in the refresh list. Remove
29- // it here before it is deleted.
30- WindowThread* wt = GetWindowThread();
31- if (wt)
32- wt->RemoveObjectFromLayoutQueue(this);
33-
34 std::list<Area *>::iterator it;
35
36 for (it = _layout_element_list.begin(); it != _layout_element_list.end(); it++)
37
38=== modified file 'Nux/View.cpp'
39--- Nux/View.cpp 2013-11-06 14:31:20 +0000
40+++ Nux/View.cpp 2014-09-17 01:29:46 +0000
41@@ -44,17 +44,6 @@
42 backup_texture_.Release();
43 backup_depth_texture_.Release();
44 background_texture_.Release();
45-
46- // It is possible that the window thread has been deleted before the view
47- // itself, so check prior to calling.
48- WindowThread* wt = GetWindowThread();
49-
50- if (wt)
51- {
52- // It is possible that the object is in the refresh list. Remove it here
53- // before it is deleted.
54- wt->RemoveObjectFromLayoutQueue(this);
55- }
56
57 RemoveLayout();
58 }

Subscribers

People subscribed via source and target branches