From 7fea25030431aba7a64816972b915446e3828dde Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Tue, 4 Jun 2002 22:26:52 +0000 Subject: [PATCH] fix for how we read the input hint, from Hidetoshi Tajima 2002-06-04 Havoc Pennington * src/window.c (update_wm_hints): fix for how we read the input hint, from Hidetoshi Tajima (meta_window_show): from Hidetoshi, don't autofocus windows with input = FALSE wm_take_focus = FALSE when they first appear. We do allow these windows to be focused (so keynav works), but they don't get focused automatically. Now how do we keep them out of the task list? --- ChangeLog | 11 +++++++++++ src/window.c | 8 +++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1112e284c..388df06ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2002-06-04 Havoc Pennington + + * src/window.c (update_wm_hints): fix for how we read the input + hint, from Hidetoshi Tajima + + (meta_window_show): from Hidetoshi, don't autofocus windows with + input = FALSE wm_take_focus = FALSE when they first appear. We do + allow these windows to be focused (so keynav works), but they + don't get focused automatically. Now how do we keep them out of + the task list? + 2002-06-04 Gustavo Giráldez * src/theme.c (draw_op_as_pixbuf): Use icon's instead of image's diff --git a/src/window.c b/src/window.c index 816952ca2..d2e9d926f 100644 --- a/src/window.c +++ b/src/window.c @@ -1298,7 +1298,8 @@ meta_window_show (MetaWindow *window) meta_display_lookup_x_window (window->display, window->xtransient_for); - if (parent && parent->has_focus) + if (parent && parent->has_focus && + (window->input || window->take_focus)) { meta_topic (META_DEBUG_FOCUS, "Focusing transient window '%s' since parent had focus\n", @@ -1309,7 +1310,8 @@ meta_window_show (MetaWindow *window) } /* Always focus new windows in click-to-focus */ - if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK) + if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK && + (window->input || window->take_focus)) { switch (window->type) { @@ -4032,7 +4034,7 @@ update_wm_hints (MetaWindow *window) window->xwindow); if (hints) { - window->input = (hints->flags & InputHint) != 0; + window->input = ((hints->flags & InputHint) != 0) && hints->input; if (hints->flags & StateHint) window->initially_iconic = (hints->initial_state == IconicState);