Comment 10 for bug 1131385

Revision history for this message
Taihsiang Ho (tai271828) wrote :

why does wm.IsWindowOnTop(xid) return false when the window is set as "Always on Top"

this is because GetTopMostValidWindowInViewport() does not return the xid which is equal to the "Always on Top" window.

please see unity-shared/PluginAdapter.cpp:604

unity::PluginAdapter::IsWindowOnTop (this=0xcc5b30, window_id=65011720) at /build/buildd/unity-7.1.2+13.10.20131014.1/unity-shared/PluginAdapter.cpp:604
604 {
(gdb) list
599
600 return false;
601 }
602
603 bool PluginAdapter::IsWindowOnTop(Window window_id) const
604 {
605 if (window_id == GetTopMostValidWindowInViewport())
606 return true;
607
608 return false;
(gdb) display window_id
13: window_id = 65011720
(gdb) print GetTopMostValidWindowInViewport()
$17 = 46137350
(gdb)