Re: windows sizing
- From: Owen Taylor <otaylor redhat com>
- To: Havoc Pennington <hp redhat com>
- Cc: "'gtk-list redhat com'" <gtk-list redhat com>
- Subject: Re: windows sizing
- Date: 07 Aug 1999 13:30:42 -0400
Havoc Pennington <hp@redhat.com> writes:
> On Sat, 7 Aug 1999, Sackwitz, Antje wrote:
> > Hi,
> > How do you maximize programmatically a window without the maximize
> > button?
> > How do you disable window functions minimize,maximize, close_window
> > (three buttons top right corner of each window)?
> >
>
> You can't do any of these unless you have a window manager that supports
> some way to do it. This is entirely up to the window manager.
>
> Sometimes gdk_window_show(gtkwindow->window) will deiconify a window.
> There may also be a standard way to disable the close button, some apps
> seem to do it, but I don't think Gtk supports it so you'd have to use
> Xlib calls via gdk/gdkx.h. Emacs iconifies itself if you control-Z (at
> least with my WM), but again I think you'd have to use Xlib - I don't know
> what Emacs does to get the behavior.
For window managers that support Motif hints, you can
do:
gtk_widget_realize (window);
gdk_window_set_decorations (window->window,
GDK_DECOR_ALL | /* subtract the following */,
GDK_DECOR_MENU |
GDK_DECOR_MINIMIZE |
GDK_DECOR_MAXIMIZE);
gdk_window_set_functions (window->window,
GDK_FUNC_ALL | /* subtract the following */,
GDK_FUNC_CLOSE |
GDK_FUNC_MINIMIZE |
GDK_FUNC_MAXIMIZE);
(See gdk/gdktypes.h for the list of possible flag values)
The exact behavior here is very much dependent on your window
manager.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]