summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Mick <dan.mick@sun.com>2006-10-29 20:37:40 +0000
committerGlynn Foster <gman@src.gnome.org>2006-10-29 20:37:40 +0000
commit923b6eef981134ccf5ce0a38174bddb271f8181e (patch)
treee5c1312f772bee01eb39de383465849b4c185daa
parentbfef5f0a0a597ae6d8571a8a3d52f7be65705497 (diff)
downloadmetacity-923b6eef981134ccf5ce0a38174bddb271f8181e.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--ChangeLog6
-rw-r--r--src/window.c23
2 files changed, 20 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 9ff3d9f5..d4031326 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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-02 Elijah Newren <newren gmail com>
* configure.in: post-release bump to 2.16.5
diff --git a/src/window.c b/src/window.c
index f4a96cea..98fcffb0 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1743,32 +1743,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;