279 //first thing is to cancel the retry AO if it's running for the last event |
279 //first thing is to cancel the retry AO if it's running for the last event |
280 iRetry->CancelRetry(); |
280 iRetry->CancelRetry(); |
281 |
281 |
282 iOwner->IncreaseConfigSpinner(); |
282 iOwner->IncreaseConfigSpinner(); |
283 |
283 |
284 //if the config change comes from a render stage then ensure screen device size |
284 //if the config change comes from a render stage then ensure screen device size |
285 //is also updated |
285 //is also updated |
286 TSize currentRes; |
286 TSize currentRes; |
287 currentConfig.GetResolution(currentRes); |
287 currentConfig.GetResolution(currentRes); |
288 TBool disconnected = (currentRes.iHeight == 0 || currentRes.iWidth == 0) ? ETrue : EFalse; |
288 TBool disconnected = (currentRes.iHeight == 0 || currentRes.iWidth == 0) ? ETrue : EFalse; |
289 |
289 |
290 //if the config change is due to CScreen::SetConfiguration() being called then we |
290 //if the config change is due to CScreen::SetConfiguration() being called then we |
291 //don't want to update it again. Only update if the configs are different and the |
291 //don't want to update it again. Only update if the configs are different and the |
292 //display is connected... |
292 //display is connected... |
293 TDisplayConfiguration lastSetConfig(iLastSetConfig); |
293 TDisplayConfiguration lastSetConfig(iLastSetConfig); |
294 if (!((currentConfig == lastSetConfig) || (disconnected))) |
294 if (!((currentConfig == lastSetConfig) || (disconnected))) |
295 { |
295 { |
296 TDisplayConfiguration1::TRotation rotation; |
296 TDisplayConfiguration1::TRotation rotation; |
297 if (lastSetConfig.GetRotation(rotation)) |
297 if (lastSetConfig.GetRotation(rotation)) |
298 { |
298 { |
299 //use the latest rotation value to ensure we don't get any |
299 //use the latest rotation value to ensure we don't get any |
300 //inconsistencies with the layer extents |
300 //inconsistencies with the layer extents |
301 currentConfig.SetRotation(rotation); |
301 currentConfig.SetRotation(rotation); |
302 } |
302 } |
303 iOwner->UpdateConfiguration(currentConfig); |
303 iOwner->UpdateConfiguration(currentConfig); |
304 } |
304 } |
305 |
305 |
306 //put config change event on queue |
306 //put config change event on queue |
307 RPointerArray<CWsClient> clientArray; |
307 RPointerArray<CWsClient> clientArray; |
308 CleanupClosePushL(clientArray); |
308 CleanupClosePushL(clientArray); |
309 User::LeaveIfError(iOwner->GetNotificationClients(clientArray)); |
309 User::LeaveIfError(iOwner->GetNotificationClients(clientArray)); |
310 TBool eventOnAllQueues = ETrue; |
310 TBool eventOnAllQueues = ETrue; |