[maemo-developers] Howto enable portrait mode support on Fremantle
From: Cornelius Hald hald at icandy.deDate: Mon Aug 24 20:44:36 EEST 2009
- Previous message: Howto enable portrait mode support on Fremantle
- Next message: Howto enable portrait mode support on Fremantle
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello again :) Listening to the DBus messages and setting the SUPPORT/REQUEST flags works and the outcome is as described. Now the only problem left is the orientation detection during startup. When doing the call to MCE_DEVICE_ORIENTATION_GET I'm always getting the following error message: "The name com.nokia.mce was not provided by any .service files" Does anyone know what I'm doing wrong? The code is as follows: DBusError error; DBusMessage *message, *reply; message = dbus_message_new_method_call(MCE_SERVICE, MCE_REQUEST_PATH, MCE_REQUEST_IF, MCE_DEVICE_ORIENTATION_GET); dbus_error_init(&error); reply = dbus_connection_send_with_reply_and_block(connection, message, -1, &error); I hope someone can help, oh and by the way I'm a DBus noob, so it might be that I'm missing something obvious. Thanks! Conny On Mon, 2009-08-24 at 10:24 +0300, Kimmo Hämäläinen wrote: > On Fri, 2009-08-21 at 15:53 +0200, ext Alberto Garcia wrote: > > On Fri, Aug 21, 2009 at 02:53:01PM +0200, Cornelius Hald wrote: > > > > I'll try to summarize how it works (I'm adding Kimmo to Cc in case I'm > > forgetting something, as the rotating itself is done by the desktop, > > libhildon only sets a WM hint). > > > > Let's suppose we open a new window. Before we open that window the > > device might already be in portrait mode. > > > > If the portrait flags of the new window are: > > > > 1) No flags -> The screen is rotated to landscape mode. > > Correct. An example: when you are in portrait mode and suddenly a > system-modal dialog pops up without the SUPPORT or REQUEST flag, we go > to the landscape mode. > > > 2) _SUPPORT -> The screen keeps its orientation. > > Correct ...unless some window has the REQUEST flag. The SUPPORT flag on > your window tells that you support the portrait mode, i.e. your window > can relayout itself for the portrait mode. The REQUEST flag on your > window tells that you want to be in the portrait mode (for whatever > reason, not necessarily just because the device is currently in portrait > orientation!). Hildon-desktop is not turning the screen to portrait > unless there is at least one visible window with REQUEST and the rest of > the visible windows have the SUPPORT (explicit or implicit) flag. These > flags are inherited to transient windows, and REQUEST implies the > SUPPORT flag. > > > 3) _SUPPORT + _REQUEST -> The screen is rotated to portrait mode > > 4) _REQUEST alone -> I don't think we're using that. Kimmo? > > REQUEST is the same as REQUEST + SUPPORT. Since there is no sense to > request the portrait mode if you don't support it... > > > To detect whether a device is physically rotated I think you need to > > use the DBus API already mentioned in this thread. > > Correct, the sig_device_orientation_ind signal from MCE. > > > In other words: using this API alone won't change the orientation of > > the screen when the device is physically rotated, am I right Kimmo? > > Hildon-desktop looks at these flags, it does not listen to the > orientation signals, so it does not know how the device is oriented > relative to the Earth's crust. (There is an exception to this, but you > are not affected by it.) > > -Kimmo > > > > > Berto > > _______________________________________________ > maemo-developers mailing list > maemo-developers at maemo.org > https://lists.maemo.org/mailman/listinfo/maemo-developers
- Previous message: Howto enable portrait mode support on Fremantle
- Next message: Howto enable portrait mode support on Fremantle
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]