Henrik Hedberg wrote: > Murray Cumming wrote: >> On Fri, 2009-05-29 at 13:20 +0200, Alberto Garcia wrote: >>> To detect screen orientation changes you can e.g. use the >>> "size-changed" signal of GdkScreen. >> This seems like a rather long-winded way to detect landscape or portrait >> mode, requiring the hard coding of the dimensions. > > if (width > height) { > /* landscape */ > } else if (width < height) { > /* portrait */ > } else { > /* square :) */ > } > > However, usually developer should not need to know mode but Hildon > widgets should adjust themselves as much as possible during the > relayout. Unfortunately that seems not to be the case, as Conny > demonstrated earlier with some screenshots.
Mmm... what could possibly go wrong ... eg when we look at maemo on a slightly squarer device with a different windowmanager layout. Surely XRRScreenChangeNotifyEvent should be supported since this actually provides 'orientation' which is what IU the UI guidelines suggest working to. Maybe even abstracted to a high level 'RandRChanged' signal? David -- "Don't worry, you'll be fine; I saw it work in a cartoon once..." _______________________________________________ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers