![]() |
Coding for portrait mode/autorotate in GTK
Hi,
I'm having trouble writing a hildonised GTK interface that fully supports autorotation. The attached example code demonstrates my issue. When testing on my device (with CSSU-testing) the application window opens in portrait or landscape mode depending on the device's orientation, and updates its orientation as expected. I expected dialogs in the application to follow the window orientation. However, when a dialog is opened (from the menu) while in portrait mode, the orientation changes to landscape. On dismissing the dialog, the window autorotates back (depending on current orientation). If I set HILDON_PORTRAIT_MODE_REQUEST on the window (instead of _SUPPORT) the window always opens in portrait mode, but the dialog still reorients to landscape. I understood that setting the dialog as task modal should result in the portrait flags being inherited from the window. Doubting this, I tried setting the flags directly on the dialog. Setting _SUPPORT on the dialog as well as the window has no effect. If the window has _REQUEST set and the dialog has _SUPPORT then the dialog does open in portrait mode, but the application is now portrait only. Can anyone point out what I'm missing here? Thanks. Code:
/* |
All times are GMT. The time now is 05:04. |
vBulletin® Version 3.8.8