maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] rotatedaemon: fast rotation for applications to portrait mode and all other screen directions (https://talk.maemo.org/showthread.php?t=56562)

sethkha 2010-11-14 11:30

Re: [Announce] rotatedaemon: fast rotation for applications to portrait mode and all other screen directions
 
Quote:

Originally Posted by Mentalist Traceur (Post 872994)
I really strongly request that you put up the code you already have somewhere...if someone else wishes to take up your work or collaborate with you.

yes
although I don't know how much I can do. I am "working" (thinking about how this could be done) on a portrait home screen.

Wikiwide 2010-11-14 11:46

Re: [Announce] rotatedaemon: fast rotation for applications to portrait mode and all other screen directions
 
2 Attachment(s)
Quote:

Originally Posted by Mentalist Traceur (Post 872994)
Looks promising. I really strongly request that you put up the code you already have somewhere... That way we can always learn from it, and if someone else wishes to take up your work or collaborate with you, they can if they have something to contribute without waiting until it's more done.

Here are some files, binary and source together. It doesn't run at startup, it needs to be run from either qtaemon icon or /opt/usr/bin/qtaemon. It gives some debugging information in both qDebug and DBus messages (dbus-monitor | grep qtaemon).

It's raw. As you could see from screenshots, sometimes screen goes into one of the two difficult-to-use modes, it doesn't freeze, you can launch and close applications, but inputting lock code becomes almost impossible because you see only one or two or three buttons at first; and it's difficult to understand correspondence between touchscreen and image on the screen. So, the qtaemon doesn't reboot the device when you launch particular application, but rather unpredictably tricks you into wishing to reboot the device.

EDIT:
I would really prefer somebody to read into hildon-desktop and write modification of hildon-desktop which natively enables seamless auto-rotation.
http://talk.maemo.org/showthread.php?t=63419

blipnl 2010-11-16 08:27

Re: [Announce] rotatedaemon: fast rotation for applications to portrait mode and all other screen directions
 
This seems awesome, I'd try it if it won't crash my phone when I'm calling someone, for this will make me feel such a douche :)

Any progress m8?

F2thaK 2010-11-16 08:49

Re: [Announce] rotatedaemon: fast rotation for applications to portrait mode and all other screen directions
 
i installed this now my screens stuck upside down!!

HAHA!!

and I cant get portrait to work


edit: all it does for me is rotate screen 180deb and sticks it there

Wikiwide 2010-11-16 12:16

Re: [Announce] rotatedaemon: fast rotation for applications to portrait mode and all other screen directions
 
Quote:

Originally Posted by f2thak (Post 874806)
i installed this now my screens stuck upside down!!

HAHA!!

and I cant get portrait to work


edit: all it does for me is rotate screen 180deb and sticks it there

killall qtaemon
(or gather your patience)

Rotate from reverse landscape through portrait to landscape.
Hildon or qtaemon, will restore you to normal orientation.

Seriously, with patience and practice you can make the switching between three orientations seem seamless.

F2thaK 2010-11-17 02:34

Re: [Announce] rotatedaemon: fast rotation for applications to portrait mode and all other screen directions
 
Patience?? It should be simple.

I tried this multiple times and I got the same result...

Open the app, tilt my phone a bit and the screen rotates 180 degrees and stays there.........

edit: and this command doesnt work for me >> (killall qtaemon)

Wikiwide 2010-11-17 03:49

Re: [Announce] rotatedaemon: fast rotation for applications to portrait mode and all other screen directions
 
1 Attachment(s)
Quote:

Originally Posted by f2thak (Post 875703)
Patience?? It should be simple.

I tried this multiple times and I got the same result...

Open the app, tilt my phone a bit and the screen rotates 180 degrees and stays there.........

edit: and this command doesnt work for me >> (killall qtaemon)

In X Terminal
killall qtaemon
doesn't work??? Strange, the program is /opt/usr/bin/qtaemon



Algorithm for determining orientation is:
Take (x*x+y*y)^(0.5)
Compare it with z
If z is larger, the orientation is 0, undetermined, because the device is practically on its back
If z is smaller, then:
compare absolute values of x and y
the largest of them determines whether it is portrait or landscape
take its sign
it determines whether you are in reverse orientation

When orientation changes and the new orientation isn't zero, rotate.

Rotation:
set the active window's flag "autorotate"
if new and old orientation have opposite signs, reverse the screen

Now, switching to portrait should depend only on built-in autorotation; the main function of qtaemon is to set autorotate flag to each window and to reverse the screen when needed.

Now, attached version sets the flag oftener, even when the orientation hasn't changed, because you could open a new window without changing orientation.

Hope it helps.

EDIT: And one more change: now orientation isn't set to zero, it's just unchanged, because setting to zero erases memory about current reverse-or-not orientation and might contribute to being stuck in reverse landscape. But don't expect wonders...

SSLMM 2010-11-17 04:17

Re: [Announce] rotatedaemon: fast rotation for applications to portrait mode and all other screen directions
 
Quote:

Originally Posted by f2thak (Post 875703)
Patience?? It should be simple.

I tried this multiple times and I got the same result...

Open the app, tilt my phone a bit and the screen rotates 180 degrees and stays there.........

edit: and this command doesnt work for me >> (killall qtaemon)

Same here...Thanks for this and keep it up...is it necessary the 180º rotation?

F2thaK 2010-11-17 04:24

Re: [Announce] rotatedaemon: fast rotation for applications to portrait mode and all other screen directions
 
nope, still does the same... rotatedaemon works better, sorry..

Mentalist Traceur 2010-11-19 01:14

Re: [Announce] rotatedaemon: fast rotation for applications to portrait mode and all other screen directions
 
I haven't tried either yet, but if this auto-sets the rotate flag instead of going through the rotate daemon crash-inducing dance, I'm siding with this by default. Just because it doesn't make usability compromising crashes a constant risk.


All times are GMT. The time now is 22:54.

vBulletin® Version 3.8.8