equal
deleted
inserted
replaced
40 CGOomWindowGroupList::TGOomWindowGroupProperties::TGOomWindowGroupProperties() : iIdleTickTime(0), iDynamicPriority(EGOomPriorityNormal) |
40 CGOomWindowGroupList::TGOomWindowGroupProperties::TGOomWindowGroupProperties() : iIdleTickTime(0), iDynamicPriority(EGOomPriorityNormal) |
41 { |
41 { |
42 FUNC_LOG; |
42 FUNC_LOG; |
43 } |
43 } |
44 |
44 |
|
45 void CGOomWindowGroupList::GetListOfWindowGroupsWSurfaces(RArray<TInt>& aLowOnMemWgs) |
|
46 { |
|
47 if (!iAlfClient.Handle()) |
|
48 { |
|
49 if(iAlfClient.Connect() != KErrNone) |
|
50 return; |
|
51 } |
|
52 |
|
53 iAlfClient.GetListOfWindowGroupsWSurfaces(&aLowOnMemWgs); |
|
54 } |
|
55 |
|
56 |
45 // Update the list of window groups |
57 // Update the list of window groups |
46 void CGOomWindowGroupList::Refresh(TBool aOptionalOnly) |
58 void CGOomWindowGroupList::Refresh(TBool aOptionalOnly) |
47 { |
59 { |
48 FUNC_LOG; |
60 FUNC_LOG; |
49 |
61 |
70 |
82 |
71 if (!iAlfClient.Handle()) |
83 if (!iAlfClient.Handle()) |
72 { |
84 { |
73 User::LeaveIfError(iAlfClient.Connect()); |
85 User::LeaveIfError(iAlfClient.Connect()); |
74 } |
86 } |
75 iLowOnMemWgs.Reset(); |
87 //iLowOnMemWgs.Reset(); |
76 RArray<TInt> inactiveSurfaces; |
88 RArray<TInt> inactiveSurfaces; |
77 |
89 |
78 // ignore possible errors, we have information from profiling extension anyway |
90 // ignore possible errors, we have information from profiling extension anyway |
79 if (!aOptionalOnly) |
91 if (!aOptionalOnly) |
80 { |
92 { |
81 iAlfClient.GetListOfInactiveWindowGroupsWSurfaces(&inactiveSurfaces); |
93 iAlfClient.GetListOfInactiveWindowGroupsWSurfaces(&inactiveSurfaces); |
82 iAlfClient.GetListOfWindowGroupsWSurfaces(&iLowOnMemWgs); |
94 //iAlfClient.GetListOfWindowGroupsWSurfaces(&iLowOnMemWgs); |
83 } |
95 } |
84 else |
96 else |
85 { // first iteration: try to cope with window group ID's only |
97 { // first iteration: try to cope with window group ID's only |
86 // Most likely that needs to be revisited because apps fail to name their window |
98 // Most likely that needs to be revisited because apps fail to name their window |
87 // groups properly on external screens... |
99 // groups properly on external screens... |
231 iWgIds.ReserveL(numGroups); |
243 iWgIds.ReserveL(numGroups); |
232 User::LeaveIfError(iWs.WindowGroupList(&iWgIds)); |
244 User::LeaveIfError(iWs.WindowGroupList(&iWgIds)); |
233 |
245 |
234 // Remove all child window groups, promote parents to foremost child position |
246 // Remove all child window groups, promote parents to foremost child position |
235 CollapseWindowGroupTree(inactiveSurfaces); |
247 CollapseWindowGroupTree(inactiveSurfaces); |
236 |
248 /* |
237 #ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS |
249 #ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS |
238 TWsEvent event; |
250 TWsEvent event; |
239 event.SetType(KGoomMemoryLowEvent); // naive |
251 event.SetType(KGoomMemoryLowEvent); // naive |
240 |
252 |
241 for (TInt i = iLowOnMemWgs.Count()-1; i>=0; i--) |
253 for (TInt i = iLowOnMemWgs.Count()-1; i>=0; i--) |
242 { |
254 { |
243 iWs.SendEventToWindowGroup(iLowOnMemWgs[i], event); |
255 iWs.SendEventToWindowGroup(iLowOnMemWgs[i], event); |
244 } |
256 } |
245 |
257 |
246 #endif |
258 #endif |
247 |
259 */ |
248 // Note the current foreground window ID (if there is one) |
260 // Note the current foreground window ID (if there is one) |
249 TBool oldForegroundWindowExists = EFalse; |
261 TBool oldForegroundWindowExists = EFalse; |
250 |
262 |
251 TInt oldForegroundWindowId; |
263 TInt oldForegroundWindowId; |
252 if (iWgIds.Count() > 0) |
264 if (iWgIds.Count() > 0) |