diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2018-03-07 21:07:35 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2018-03-07 21:07:35 +0000 |
| commit | f058d3a99c396f21d6e17f201682462da1d305cc (patch) | |
| tree | 9375b3b30a86aca011bb395ca2d6f434a8e458d5 /src/drivers/Android/Fl_Android_Window_Driver.cxx | |
| parent | dcc10a6a0a4cf0ec6e2a2a95f8b110230d65f1aa (diff) | |
Android: using wait_for_expose to sync screen and windows
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12718 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Android/Fl_Android_Window_Driver.cxx')
| -rw-r--r-- | src/drivers/Android/Fl_Android_Window_Driver.cxx | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/drivers/Android/Fl_Android_Window_Driver.cxx b/src/drivers/Android/Fl_Android_Window_Driver.cxx index 42ffe2917..3c8d36ee7 100644 --- a/src/drivers/Android/Fl_Android_Window_Driver.cxx +++ b/src/drivers/Android/Fl_Android_Window_Driver.cxx @@ -69,13 +69,28 @@ void Fl_Android_Window_Driver::show() i(x); x->next = Fl_X::first; Fl_X::first = x; - pWindow->redraw(); + if (Fl_Android_Application::native_window()) { + pWindow->redraw(); + } else { + pWindow->wait_for_expose(); + } } else { // bring window to front } } +void Fl_Android_Window_Driver::expose_all() +{ + for (Fl_X *x = Fl_X::first; x; x = x->next) { + Fl_Window *win = x->w; + win->driver()->wait_for_expose_value = 0; + win->damage(FL_DAMAGE_EXPOSE); + win->redraw(); + } +} + + void Fl_Android_Window_Driver::make_current() { ((Fl_Android_Screen_Driver*)Fl::screen_driver())->pScreenContentChanged = true; |
