After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 113602 - Provide 'roles' for WM memory.
Provide 'roles' for WM memory.
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
0.14.0
Other other
: Normal trivial
: 0.14.1
Assigned To: Charles Kerr
Pan QA Team
Depends on:
Blocks:
 
 
Reported: 2003-05-23 17:09 UTC by Bobby D. Bryant
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bobby D. Bryant 2003-05-23 17:09:44 UTC
The following patch adds gtk_window_set_role calls for the "post" and
"reply" pop-up windows, so that ICCCM compliant window managers can use the
named 'roles' as keys for remembering the size and placement of these
windows as being distinct from that of the main window.

In the patch I used different role strings for the two windows, thus
providing different WM "memories" for them, though I can't see why anyone
would complain if they were the same.  YMMV!

You might want to provide roles for other windows too, though these are the
ones that I find particularly annoying.

--- pan/message-window.c~       2003-04-23 15:55:33.000000000 -0600
+++ pan/message-window.c        2003-05-23 10:41:38.000000000 -0600
@@ -2191,6 +2191,8 @@
        pan_lock();
        compose->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
        gtk_window_set_title (GTK_WINDOW(compose->window), _("New Message"));
+       gtk_window_set_role (GTK_WINDOW(compose->window),
+                            _("pan-post-window"));
        v = gtk_vbox_new (FALSE, 0);
        gtk_container_add (GTK_CONTAINER(compose->window), v);
 
@@ -2273,6 +2275,8 @@
        pan_lock ();
        compose->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
        gtk_window_set_title (GTK_WINDOW(compose->window), title);
+       gtk_window_set_role (GTK_WINDOW(compose->window),
+                            _("pan-reply-window"));
        v = gtk_vbox_new (FALSE, 0);
        gtk_container_add (GTK_CONTAINER(compose->window), v);


Note: Sawfish users will find that Sawfish incorrectly (as I understand it)
remembers the size and placement based on the 'class' rather than the
'role'.  But I don't want to ask application programmers to program their
applications wrong on that account, so I'm suggesting the above instead,
which AIUI is correct by the ICCCM.  Sawfish can be fixed by changing a
single line of code, and I'll be trying to get them to do that.  Hopefully
some other WMs are already working correctly.

A short, inflammatory discussion of the use of roles and classes can be
found at
http://mail.gnome.org/archives/gtk-app-devel-list/2001-December/msg00067.html

Thanks,
BB