how to keep gtk.window always on top level

I am trying to keep a gtk.window on top, but I'm having trouble.

Here is my code so far. The example is in vala gnome (on windows 7).

public void onTop() {
    window.decorated = false;
    window.modal = true;
    window.set_keep_above(true);
}

Looks like this is a very old GTK+ bug which was recently fixed.

You should be able to work around this by calling set_keep_above when the window has already been mapped, ie after show(). Comment 17 (from 2008) in that bug says it doesn't work, but it does on my machine, so YMMV.

链接地址: http://www.djcxy.com/p/56638.html

上一篇: 循环多行代码的好方法是什么?

下一篇: 如何保持gtk.window始终在顶层