View Single Post
Old 01-14-2012, 04:14 AM   #41
rastik
Connoisseur
rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.
 
Posts: 65
Karma: 4662
Join Date: Feb 2011
Location: CZ
Device: Kindle Touch 3G, Kindle Keyboard
Quote:
Originally Posted by Mehdi View Post
It's possible to get the screen auto-rotating and not that hard. I have it working on my Touch right now, here are sort of the instructions for it:

Change both occurrences of IS_ACCEL=0 to IS_ACCEL=1 in /etc/init/makexconfig .
(With that change, if you open the keyboard and change orientation it should close)

change /etc/xdg/awesome/lab126_ligl.lua "local function liglReflashWholeScreen" to "function liglReflashWholeScreen"
and add "liglReflashWholeScreen()" after
Code:
lipcH:send_event("orientationChange", { currentOrientation })
in /etc/xdg/awesome/lab126_orientation.lua
Excellent! Sometimes the screen was not refreshed correctly when rotation to landscape. So I made some changes and kind-of solved the problem with no refresh after 6 pages as well.
I've returned liglReflashWholeScreen back to being local and created a new one in the same file:
Code:
function liglReflashWholeScreenX()
    if g_liglRef then
        local size = math.max(g_screenOne.geometry.width, g_screenOne.geometry.height)
        liglPause()
        ligl.display_flash_rect(g_liglRef, 0, 0, size, size)
        liglResume()
    end
end
And in the other file the code around orientationChange send_event is:
Code:
            if orientation == UP or orientation == DOWN then
                lipcH:set_string_property("com.lab126.winmgr", "refreshOnTurn", "false")
            elseif orientation == LEFT or orientation == RIGHT then
                lipcH:set_string_property("com.lab126.winmgr", "refreshOnTurn", "true")
            end
            lipcH:send_event("orientationChange", { currentOrientation })
            liglReflashWholeScreenX()
It is simplified that I don't care if you like refresh after every page or not. In portrait it is off and in landscape mode always on.
rastik is offline   Reply With Quote