Re: Patch for gtk_dialog
- From: Owen Taylor <owt1 cornell edu>
- To: Christopher Craig <ccraig cc gatech edu>
- Cc: gtk-list redhat com
- Subject: Re: Patch for gtk_dialog
- Date: 08 Apr 1998 20:18:01 -0400
Christopher Craig <ccraig@cc.gatech.edu> writes:
> I've tried to get this patch put in the main distribution several
> times, but I can't seem to even get a response from anyone.
> gtk_dialog_new creates a new top_level window (according to Xlib), not
> a dialog, so I wrote a patch so that people like me who are picky
> about what type of window X thinks something is would be happy
The problem with this patch is that GtkDialog's are used for
many things in the GIMP, some of them definitely dialogs, some
of them not so much. Should Layer dialog really have the
WM_TRANSIENT_FOR hint set? I tend to think of it as just another
window that I keep up most of the time.
The only difference that this patch would make is that the
XWindow for GtkDialog's would have the WM_TRANSIENT_FOR hint set
pointing to the root window. What difference this makes depends
on your Window manager.
The ICCCM says:
"The WM_TRANSIENT_FOR property contains the ID of another toplevel
window. The implication is that this window is a pop-up on
behalf of the named window and WM's may decide not to decorate
transient windows or may treat them differently in other ways.
In particular WM's should present newly mapped transient windows
without requiring any user interaction..."
That doesn't give me a lot of confidence that the
WM_TRANSIENT_FOR should be blanket set on all GtkDialogs.
(I would be quite upset if my Layers dialog didn't get decorated ;-)
Note that there is another way that generally works to specify
that a window should be mapped without user interaction
gtk_window_position (GTK_DIALOG(window), GTK_WIN_POS_MOUSE)
which says "pop it up where ever the mouse is". This is what
the FileSelection dialog currently does. (That quite possible
that the FileSel should get a WM_TRANSIENT_FOR)
I agree, however, that more attention needs to be payed
to WM_TRANSIENT_FOR. For one thing, there needs to
be a way of specifying _which_ window it is transient_for
for.
Maybe we should have:
gtk_dialog_new_for_window (GtkWindow *window);
(That would require some modification to GtkWindow as well)
Regards,
Owen
> *** gtk/gtkdialog.c~ Thu Jan 15 19:49:30 1998
> --- gtk/gtkdialog.c Wed Mar 18 18:05:29 1998
> ***************
> *** 77,81 ****
> GtkWidget*
> gtk_dialog_new ()
> {
> ! return GTK_WIDGET (gtk_type_new (gtk_dialog_get_type ()));
> }
> --- 77,88 ----
> GtkWidget*
> gtk_dialog_new ()
> {
> ! GtkDialog *dialog;
> !
> ! dialog = gtk_type_new (gtk_dialog_get_type ());
> !
> ! GTK_WINDOW(dialog)->type = GTK_WINDOW_DIALOG;
> !
> ! return GTK_WIDGET (dialog);
> !
> }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]