diff options
author | Dan Mick <dan.mick@sun.com> | 2006-10-29 20:30:18 +0000 |
---|---|---|
committer | Glynn Foster <gman@src.gnome.org> | 2006-10-29 20:30:18 +0000 |
commit | 191baa3c7650a1d68e077cfe2895d9a39f4ea4bb (patch) | |
tree | d43ca15cf346406ea8770aa1d880f60097056551 | |
parent | c8c666f8553ec58eeb4cb3fdd393cff7195c8b39 (diff) | |
download | metacity-191baa3c7650a1d68e077cfe2895d9a39f4ea4bb.tar.gz |
Fix strict focus mode by picking up on res_class. Fixes #361054, strict
2006-10-30 Dan Mick <dan.mick@sun.com>
* src/window.c: (__window_is_terminal): Fix strict focus
mode by picking up on res_class. Fixes #361054, strict focus
mode still not working; should look for res_class, not res_name
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/window.c | 23 |
2 files changed, 20 insertions, 9 deletions
@@ -1,3 +1,9 @@ +2006-10-30 Dan Mick <dan.mick@sun.com> + + * src/window.c: (__window_is_terminal): Fix strict focus + mode by picking up on res_class. Fixes #361054, strict focus + mode still not working; should look for res_class, not res_name + 2006-10-16 Elijah Newren <newren gmail com> * NEWS: 2.17.1 release. diff --git a/src/window.c b/src/window.c index 61170f48..9cc6d018 100644 --- a/src/window.c +++ b/src/window.c @@ -1750,32 +1750,37 @@ intervening_user_event_occurred (MetaWindow *window) gboolean __window_is_terminal (MetaWindow *window) { - if (window == NULL || window->res_name == NULL) + if (window == NULL || window->res_class == NULL) return FALSE; + /* + * Compare res_class, which is not user-settable, and thus theoretically + * a more-reliable indication of term-ness. + */ + /* gnome-terminal -- if you couldn't guess */ - if (strcmp (window->res_name, "gnome-terminal") == 0) + if (strcmp (window->res_class, "Gnome-terminal") == 0) return TRUE; /* xterm, rxvt, aterm */ - else if (strcmp (window->res_name, "XTerm") == 0) + else if (strcmp (window->res_class, "XTerm") == 0) return TRUE; /* konsole, KDE's terminal program */ - else if (strcmp (window->res_name, "Konsole") == 0) + else if (strcmp (window->res_class, "Konsole") == 0) return TRUE; /* rxvt-unicode */ - else if (strcmp (window->res_name, "URxvt") == 0) + else if (strcmp (window->res_class, "URxvt") == 0) return TRUE; /* eterm */ - else if (strcmp (window->res_name, "Eterm") == 0) + else if (strcmp (window->res_class, "Eterm") == 0) return TRUE; /* KTerm -- some terminal not KDE based; so not like Konsole */ - else if (strcmp (window->res_name, "KTerm") == 0) + else if (strcmp (window->res_class, "KTerm") == 0) return TRUE; /* Multi-gnome-terminal */ - else if (strcmp (window->res_name, "Multi-gnome-terminal") == 0) + else if (strcmp (window->res_class, "Multi-gnome-terminal") == 0) return TRUE; /* mlterm ("multi lingual terminal emulator on X") */ - else if (strcmp (window->res_name, "mlterm") == 0) + else if (strcmp (window->res_class, "mlterm") == 0) return TRUE; return FALSE; |