Re: transient windows on win32

Tor Lillqvist wrote:
[...] On X11 the color selector dialog also is only decorated with a
"close" button, it can't be minimized or maximized. Any idea how to
achieve this on Win32, too?

The code I use for dialogs under win32 does this using gdk_window_set_decorations. The actual code that I use looks something like this (pygtk sorry):

    def _set_dialog_realized(w, decor):

    def set_dialog(window, parent,
                   resize=True, minimize=False, maximize=False,
        resize = window.get_resizable()
        maximize = maximize and resize
        decor = gtk.gdk.DECOR_TITLE | gtk.gdk.DECOR_BORDER
        if resize:   decor |= gtk.gdk.DECOR_RESIZEH
        if minimize: decor |= gtk.gdk.DECOR_MINIMIZE
        if maximize: decor |= gtk.gdk.DECOR_MAXIMIZE
        if menu:     decor |= gtk.gdk.DECOR_MENU


        window.connect('realize', _set_dialog_realized, decor)
        if window.flags() & gtk.REALIZED:
            _set_dialog_realized(window, decor)

It probably goes without saying that it would be nice if gtk would do some of this itself. Some of this is really the job of the window manager, but unfortunately windows only comes with one, and it's not all that great :-)

Tim Evans
Applied Research Associates NZ

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]