diff options
-rw-r--r-- | apps/action.c | 4 | ||||
-rw-r--r-- | apps/gui/bitmap/list.c | 2 | ||||
-rw-r--r-- | apps/keymaps/keymap-android.c | 3 | ||||
-rw-r--r-- | firmware/export/button.h | 12 | ||||
-rw-r--r-- | firmware/target/hosted/android/app/button-target.h | 2 | ||||
-rw-r--r-- | firmware/target/hosted/android/lcd-android.c | 2 |
6 files changed, 13 insertions, 12 deletions
diff --git a/apps/action.c b/apps/action.c index ee6cbaa4cf..5ebcbf771b 100644 --- a/apps/action.c +++ b/apps/action.c | |||
@@ -233,6 +233,10 @@ static int get_action_worker(int context, int timeout, | |||
233 | * multimedia button presses don't go through the action system */ | 233 | * multimedia button presses don't go through the action system */ |
234 | if (button == BUTTON_NONE || button & (SYS_EVENT|BUTTON_MULTIMEDIA)) | 234 | if (button == BUTTON_NONE || button & (SYS_EVENT|BUTTON_MULTIMEDIA)) |
235 | return button; | 235 | return button; |
236 | /* the special redraw button should result in a screen refresh */ | ||
237 | if (button == BUTTON_REDRAW) | ||
238 | return ACTION_REDRAW; | ||
239 | |||
236 | /* Don't send any buttons through untill we see the release event */ | 240 | /* Don't send any buttons through untill we see the release event */ |
237 | if (wait_for_release) | 241 | if (wait_for_release) |
238 | { | 242 | { |
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c index 09a66f3386..2f13d8ba53 100644 --- a/apps/gui/bitmap/list.c +++ b/apps/gui/bitmap/list.c | |||
@@ -587,7 +587,7 @@ static int kinetic_callback(struct timeout *tmo) | |||
587 | data->velocity = 0; | 587 | data->velocity = 0; |
588 | } | 588 | } |
589 | 589 | ||
590 | queue_post(&button_queue, BUTTON_TOUCHSCREEN, 0); | 590 | queue_post(&button_queue, BUTTON_REDRAW, 0); |
591 | /* stop if the velocity hit or crossed zero */ | 591 | /* stop if the velocity hit or crossed zero */ |
592 | if (!data->velocity) | 592 | if (!data->velocity) |
593 | { | 593 | { |
diff --git a/apps/keymaps/keymap-android.c b/apps/keymaps/keymap-android.c index b7b93ac1f0..ea1abbc83a 100644 --- a/apps/keymaps/keymap-android.c +++ b/apps/keymaps/keymap-android.c | |||
@@ -50,9 +50,6 @@ static const struct button_mapping button_context_standard[] = { | |||
50 | { ACTION_STD_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU }, | 50 | { ACTION_STD_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU }, |
51 | { ACTION_STD_CONTEXT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU }, | 51 | { ACTION_STD_CONTEXT, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU }, |
52 | 52 | ||
53 | /* special hack to get a redraw on activity resume, see lcd-android.c */ | ||
54 | { ACTION_REDRAW, BUTTON_FORCE_REDRAW, BUTTON_NONE }, | ||
55 | |||
56 | LAST_ITEM_IN_LIST | 53 | LAST_ITEM_IN_LIST |
57 | }; /* button_context_standard */ | 54 | }; /* button_context_standard */ |
58 | 55 | ||
diff --git a/firmware/export/button.h b/firmware/export/button.h index 3f6052a309..6276a033cc 100644 --- a/firmware/export/button.h +++ b/firmware/export/button.h | |||
@@ -81,13 +81,15 @@ void wheel_send_events(bool send); | |||
81 | int button_apply_acceleration(const unsigned int data); | 81 | int button_apply_acceleration(const unsigned int data); |
82 | #endif | 82 | #endif |
83 | 83 | ||
84 | #define BUTTON_NONE 0x00000000 | 84 | #define BUTTON_NONE 0x00000000 |
85 | 85 | ||
86 | /* Button modifiers */ | 86 | /* Button modifiers */ |
87 | #define BUTTON_REL 0x02000000 | 87 | #define BUTTON_REL 0x02000000 |
88 | #define BUTTON_REPEAT 0x04000000 | 88 | #define BUTTON_REPEAT 0x04000000 |
89 | #define BUTTON_TOUCHSCREEN 0x08000000 | 89 | /* Special buttons */ |
90 | #define BUTTON_MULTIMEDIA 0x10000000 | 90 | #define BUTTON_TOUCHSCREEN 0x08000000 |
91 | #define BUTTON_MULTIMEDIA 0x10000000 | ||
92 | #define BUTTON_REDRAW 0x20000000 | ||
91 | 93 | ||
92 | #define BUTTON_MULTIMEDIA_PLAYPAUSE (BUTTON_MULTIMEDIA|0x01) | 94 | #define BUTTON_MULTIMEDIA_PLAYPAUSE (BUTTON_MULTIMEDIA|0x01) |
93 | #define BUTTON_MULTIMEDIA_STOP (BUTTON_MULTIMEDIA|0x02) | 95 | #define BUTTON_MULTIMEDIA_STOP (BUTTON_MULTIMEDIA|0x02) |
diff --git a/firmware/target/hosted/android/app/button-target.h b/firmware/target/hosted/android/app/button-target.h index 326d65872d..5430d7f600 100644 --- a/firmware/target/hosted/android/app/button-target.h +++ b/firmware/target/hosted/android/app/button-target.h | |||
@@ -56,6 +56,4 @@ void android_ignore_back_button(bool yes); | |||
56 | #define BUTTON_BOTTOMMIDDLE 0x00080000 | 56 | #define BUTTON_BOTTOMMIDDLE 0x00080000 |
57 | #define BUTTON_BOTTOMRIGHT 0x00100000 | 57 | #define BUTTON_BOTTOMRIGHT 0x00100000 |
58 | 58 | ||
59 | #define BUTTON_FORCE_REDRAW 0x00200000 | ||
60 | |||
61 | #endif /* _BUTTON_TARGET_H_ */ | 59 | #endif /* _BUTTON_TARGET_H_ */ |
diff --git a/firmware/target/hosted/android/lcd-android.c b/firmware/target/hosted/android/lcd-android.c index bb0331db69..2b383741d1 100644 --- a/firmware/target/hosted/android/lcd-android.c +++ b/firmware/target/hosted/android/lcd-android.c | |||
@@ -146,7 +146,7 @@ Java_org_rockbox_RockboxFramebuffer_surfaceCreated(JNIEnv *env, jobject this, | |||
146 | send_event(LCD_EVENT_ACTIVATION, NULL); | 146 | send_event(LCD_EVENT_ACTIVATION, NULL); |
147 | /* Force an update, since the newly created surface is initially black | 147 | /* Force an update, since the newly created surface is initially black |
148 | * waiting for the next normal update results in a longish black screen */ | 148 | * waiting for the next normal update results in a longish black screen */ |
149 | queue_post(&button_queue, BUTTON_FORCE_REDRAW, 0); | 149 | queue_post(&button_queue, BUTTON_REDRAW, 0); |
150 | } | 150 | } |
151 | 151 | ||
152 | /* | 152 | /* |