summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/qandroidplatformscreen.h
diff options
context:
space:
mode:
authorTinja Paavoseppä <tinja.paavoseppa@qt.io>2023-12-08 11:24:43 +0200
committerTinja Paavoseppä <tinja.paavoseppa@qt.io>2023-12-08 15:53:37 +0200
commit2bc7d38bd63843c4598ed501e3adbf0e39162c61 (patch)
treed3d9ffb035add93e032661095e2ec399b8da3526 /src/plugins/platforms/android/qandroidplatformscreen.h
parent6ff88f97a6d24d1098583421161f8f903f9dafde (diff)
Android: Make QtWindow wrap the QtLayout instead of inherit it
The layout is a ViewGroup, and should be created in the Android UI thread, while for ease of use on C++ side we should be able to construct the Java object in the platform window constructor to avoid later calls not having a valid object reference. Trying to make a blocking call to Android thread from Qt thread can lead to dead locks, so move only the creation of the layout itself into Android thread, making the QtWindow a wrapper for it, which we can immediately return to C++/Qt thread. Most of the calls made to QtWindow are anyway already passed to the Android UI thread. As a drive by, add a missing QtNative.runAction() to bringChildToFront(). Change-Id: Ib2495ddda8267384656557cbe40be5da869f82c3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/android/qandroidplatformscreen.h')
0 files changed, 0 insertions, 0 deletions