[pygtk] PyGtk Mac OS top level windows does not show up on top

Vlad vladistan at gmail.com
Tue Oct 30 05:09:45 WST 2007


Dear group,

  Could someone help me with the problem I am having with  PyGtk on
Mac OS X.   Every time I start an application its window is always
burried beneath other windows on the screen, rather then poping up on
the top like all normal application's windows do.   Am I doing
something wrong?   Here is an example of such application:

#!/usr/bin/env python

import pygtk
pygtk.require('2.0')
import gtk

class App:

    def __init__(self):

        self.win = gtk.Window(gtk.WINDOW_TOPLEVEL)
        button = gtk.Button("Hello")
        button.set_size_request(200,300)
        button.show ()

        self.win.add(button)

        self.win.connect ( "destroy"     , gtk.main_quit )
        self.win.connect ( "delete_event", self.delete_event )

        self.win.show()

    def delete_event(self, widget, event, data = None ):
        return False


app = App ()
gtk.main ()

                                 Vlad



More information about the pygtk mailing list