It seems Compiz/Unity on 16.04 has some windowing bugs, such as:
If i set gtk_window_set_focus_on_map to false and then call gtk_window_present myself, the window will not be brought to front (presented), no matter how many times I call it.
I apologise for this “off-topic” question, but since there are many developers with expertise here, maybe someone remembers how to get around this.
Sorry, but Compiz and Unity are not really maintained (they barely were by the time 16.04 was released). You may have more luck asking on a Ubuntu channel, but I’d also want to remind you that Ubuntu 16.04 was end-of-lifed last year and it’s in “extended support”, so if there are any issues you’ll have to reach out to Canonical.