summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2018-03-12 20:54:27 +0000
committerMatthias Melcher <fltk@matthiasm.com>2018-03-12 20:54:27 +0000
commitac04494e913d6091704ea0fcdfc1a164c3c176cb (patch)
treef89e5dd23e0406a6e0a96ca1ee182990a0debe25
parentb0a514366eed9b5ef4d7f99768af0d7e89755728 (diff)
Android: fixed Fl_Rect.H commit.
Cleaned up some driver code. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12743 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--FL/Fl_Rect.H8
-rw-r--r--src/drivers/Android/Fl_Android_Application.H2
-rw-r--r--src/drivers/Android/Fl_Android_Application.cxx8
3 files changed, 6 insertions, 12 deletions
diff --git a/FL/Fl_Rect.H b/FL/Fl_Rect.H
index 91f651392..e3c61f720 100644
--- a/FL/Fl_Rect.H
+++ b/FL/Fl_Rect.H
@@ -52,15 +52,11 @@ public:
Fl_Rect(int X, int Y, int W, int H)
: x_(X), y_(Y), w_(W), h_(H) {}
- /** Copy constructor. */
- Fl_Rect (const Fl_Rect& r)
- : x_(r.x()), y_(r.y()), w_(r.w()), h_(r.h()) {}
-
- /** This constructor creates a rectangle based a widget's position and size. */
+ /** This constructor creates a rectangle based on a widget's position and size. */
Fl_Rect (const Fl_Widget& widget)
: x_(widget.x()), y_(widget.y()), w_(widget.w()), h_(widget.h()) {}
- /** This constructor creates a rectangle based a widget's position and size. */
+ /** This constructor creates a rectangle based on a widget's position and size. */
Fl_Rect (const Fl_Widget* const widget)
: x_(widget->x()), y_(widget->y()), w_(widget->w()), h_(widget->h()) {}
diff --git a/src/drivers/Android/Fl_Android_Application.H b/src/drivers/Android/Fl_Android_Application.H
index 8489f495c..717805845 100644
--- a/src/drivers/Android/Fl_Android_Application.H
+++ b/src/drivers/Android/Fl_Android_Application.H
@@ -220,7 +220,7 @@ private:
static void set_input(AInputQueue* inputQueue);
static void set_window(ANativeWindow* window);
static void set_activity_state(int8_t cmd);
- static void free();
+ static void close_activity();
// ---- Android Native Activity callbacks ----
static void onContentRectChanged(ANativeActivity *activity, const ARect *rect);
diff --git a/src/drivers/Android/Fl_Android_Application.cxx b/src/drivers/Android/Fl_Android_Application.cxx
index ed8be53eb..c1d69b9f8 100644
--- a/src/drivers/Android/Fl_Android_Application.cxx
+++ b/src/drivers/Android/Fl_Android_Application.cxx
@@ -265,7 +265,7 @@ void Fl_Android_Application::pre_exec_cmd(int8_t cmd)
case APP_CMD_DESTROY:
log_v("APP_CMD_DESTROY\n");
pDestroyRequested = 1;
- // FIXME: see Fl::program_should_quit()
+ Fl::program_should_quit(1);
break;
default:
@@ -452,8 +452,6 @@ bool Fl_Android_Application::lock_screen()
if (screen_is_locked())
return true;
- // TODO: or should we wait until the window is mapped?
- // TODO: see also Fl_Window_Driver::wait_for_expose_value
if (!pNativeWindow) {
log_w("Unable to lock window buffer: no native window found.");
return false;
@@ -544,7 +542,7 @@ void Fl_Android_Activity::set_activity_state(int8_t cmd)
}
-void Fl_Android_Activity::free()
+void Fl_Android_Activity::close_activity()
{
pthread_mutex_lock(&pMutex);
write_cmd(APP_CMD_DESTROY);
@@ -593,7 +591,7 @@ void Fl_Android_Activity::onDestroy(ANativeActivity* activity)
{
log_v("Destroy: %p\n", activity);
// FIXME: use the correct free()
- free();
+ close_activity();
}
/**