summaryrefslogtreecommitdiff
path: root/src/core/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/window.c')
-rw-r--r--src/core/window.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/window.c b/src/core/window.c
index 194f42b7..07886fb5 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -2044,7 +2044,7 @@ window_state_on_map (MetaWindow *window,
/* don't initially focus windows that are intended to not accept
* focus
*/
- if (!(window->input || window->take_focus))
+ if (!meta_window_is_focusable (window))
{
*takes_focus = FALSE;
return;
@@ -4418,7 +4418,7 @@ meta_window_focus (MetaWindow *window,
*/
if (window->frame &&
(window->shaded ||
- !(window->input || window->take_focus)))
+ !meta_window_is_focusable (window)))
{
if (window->frame)
{
@@ -5903,6 +5903,12 @@ meta_window_set_focused_internal (MetaWindow *window,
}
}
+gboolean
+meta_window_is_focusable (MetaWindow *self)
+{
+ return self->input || self->take_focus;
+}
+
static gboolean
process_property_notify (MetaWindow *window,
XPropertyEvent *event)