View Ticket
Not logged in
Ticket Hash: cba0e10251b208f786ada13d8c4fe24d097440d0
Title: systemui returns before completion
Status: Closed Type: Code_Defect
Severity: Cosmetic Priority: Immediate
Subsystem: Resolution: External_Bug
Last Modified: 2019-10-11 19:01:24
Version Found In:
User Comments:
john added on 2016-05-20 10:00:01:
I'm trying to determine the actual pixel dimensions of my Android device.  In order to get the real height, it seems I need to first call "systemui 0x1e02"

The problem is that "borg systemui" returns immediately, but hasn't yet completed.

Here is an example that shows this problem.  I get two different screenheights: "1504" and then one second later: "1600"

------------------
borg systemui 0x1e02
puts [winfo screenheight .]
after 1000 {puts [winfo screenheight .]}
vwait forever
------------------

Might it be possible to have some way to know that systemui has completed?

If not, I can work around this (slight) problem by waiting 500ms.

chw added on 2016-05-20 21:25:13:
Even if the SystemUI.setSystemUI run on the UI thread is synchronized with the caller (Tcl code) it is carried out asynchronously.

A better approach might be to "bind . <<ViewportUpdate>>" or (when your toplevel is in fullscreen mode) to "bind . <Configure>" and to watch out for "winfo screenheight" in the bound code.

chw added on 2019-10-11 19:01:24:
The problem is most likely a designed feature by the Android framework.
And thus impossible to be solved. Therefore, closing this ticket.