Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to keep gtk.window always on top level

Tags:

gtk

vala

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);
}
like image 296
rChavz Avatar asked Dec 04 '11 16:12

rChavz


1 Answers

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, i.e. after show(). Comment 17 (from 2008) in that bug says it doesn't work, but it does on my machine, so YMMV.

like image 143
Johannes Sasongko Avatar answered Sep 17 '22 15:09

Johannes Sasongko