[mutter] clutter/stage: Remove 'accept-focus' property
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/stage: Remove 'accept-focus' property
- Date: Mon, 6 Apr 2020 14:16:09 +0000 (UTC)
commit 6f0e5b0b56be38b58ff11b2a8fcbb8f4ad2afd8c
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Fri Apr 3 14:06:00 2020 +0200
clutter/stage: Remove 'accept-focus' property
Also unused, only valid on X11. Meant for applications. Lets drop it.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1175
clutter/clutter/clutter-stage-window.c | 13 ------
clutter/clutter/clutter-stage-window.h | 3 --
clutter/clutter/clutter-stage.c | 74 ----------------------------------
clutter/clutter/clutter-stage.h | 5 ---
src/backends/x11/meta-stage-x11.c | 15 +------
src/backends/x11/meta-stage-x11.h | 1 -
6 files changed, 1 insertion(+), 110 deletions(-)
---
diff --git a/clutter/clutter/clutter-stage-window.c b/clutter/clutter/clutter-stage-window.c
index a4e871204..fe09aa1db 100644
--- a/clutter/clutter/clutter-stage-window.c
+++ b/clutter/clutter/clutter-stage-window.c
@@ -168,19 +168,6 @@ _clutter_stage_window_clear_update_time (ClutterStageWindow *window)
iface->clear_update_time (window);
}
-void
-_clutter_stage_window_set_accept_focus (ClutterStageWindow *window,
- gboolean accept_focus)
-{
- ClutterStageWindowInterface *iface;
-
- g_return_if_fail (CLUTTER_IS_STAGE_WINDOW (window));
-
- iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window);
- if (iface->set_accept_focus)
- iface->set_accept_focus (window, accept_focus);
-}
-
void
_clutter_stage_window_redraw (ClutterStageWindow *window)
{
diff --git a/clutter/clutter/clutter-stage-window.h b/clutter/clutter/clutter-stage-window.h
index af866d00d..9f78ed25c 100644
--- a/clutter/clutter/clutter-stage-window.h
+++ b/clutter/clutter/clutter-stage-window.h
@@ -49,9 +49,6 @@ struct _ClutterStageWindowInterface
gint64 (* get_update_time) (ClutterStageWindow *stage_window);
void (* clear_update_time) (ClutterStageWindow *stage_window);
- void (* set_accept_focus) (ClutterStageWindow *stage_window,
- gboolean accept_focus);
-
void (* redraw) (ClutterStageWindow *stage_window);
gboolean (* can_clip_redraws) (ClutterStageWindow *stage_window);
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index fb8d8c8db..18fac8ed6 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -148,7 +148,6 @@ struct _ClutterStagePrivate
guint redraw_pending : 1;
guint throttle_motion_events : 1;
guint min_size_changed : 1;
- guint accept_focus : 1;
guint motion_events_enabled : 1;
guint has_custom_perspective : 1;
guint stage_was_relayout : 1;
@@ -162,7 +161,6 @@ enum
PROP_PERSPECTIVE,
PROP_TITLE,
PROP_KEY_FOCUS,
- PROP_ACCEPT_FOCUS,
PROP_LAST
};
@@ -1860,10 +1858,6 @@ clutter_stage_set_property (GObject *object,
clutter_stage_set_key_focus (stage, g_value_get_object (value));
break;
- case PROP_ACCEPT_FOCUS:
- clutter_stage_set_accept_focus (stage, g_value_get_boolean (value));
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -1902,10 +1896,6 @@ clutter_stage_get_property (GObject *gobject,
g_value_set_object (value, priv->key_focused_actor);
break;
- case PROP_ACCEPT_FOCUS:
- g_value_set_boolean (value, priv->accept_focus);
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
break;
@@ -2075,20 +2065,6 @@ clutter_stage_class_init (ClutterStageClass *klass)
CLUTTER_TYPE_ACTOR,
CLUTTER_PARAM_READWRITE);
- /**
- * ClutterStage:accept-focus:
- *
- * Whether the #ClutterStage should accept key focus when shown.
- *
- * Since: 1.6
- */
- obj_props[PROP_ACCEPT_FOCUS] =
- g_param_spec_boolean ("accept-focus",
- P_("Accept Focus"),
- P_("Whether the stage should accept focus on show"),
- TRUE,
- CLUTTER_PARAM_READWRITE);
-
g_object_class_install_properties (gobject_class, PROP_LAST, obj_props);
/**
@@ -3781,56 +3757,6 @@ clutter_stage_maybe_finish_queue_redraws (ClutterStage *stage)
}
}
-/**
- * clutter_stage_set_accept_focus:
- * @stage: a #ClutterStage
- * @accept_focus: %TRUE to accept focus on show
- *
- * Sets whether the @stage should accept the key focus when shown.
- *
- * This function should be called before showing @stage using
- * clutter_actor_show().
- *
- * Since: 1.6
- */
-void
-clutter_stage_set_accept_focus (ClutterStage *stage,
- gboolean accept_focus)
-{
- ClutterStagePrivate *priv;
-
- g_return_if_fail (CLUTTER_IS_STAGE (stage));
-
- accept_focus = !!accept_focus;
-
- priv = stage->priv;
-
- if (priv->accept_focus != accept_focus)
- {
- _clutter_stage_window_set_accept_focus (priv->impl, accept_focus);
- g_object_notify_by_pspec (G_OBJECT (stage), obj_props[PROP_ACCEPT_FOCUS]);
- }
-}
-
-/**
- * clutter_stage_get_accept_focus:
- * @stage: a #ClutterStage
- *
- * Retrieves the value set with clutter_stage_set_accept_focus().
- *
- * Return value: %TRUE if the #ClutterStage should accept focus, and %FALSE
- * otherwise
- *
- * Since: 1.6
- */
-gboolean
-clutter_stage_get_accept_focus (ClutterStage *stage)
-{
- g_return_val_if_fail (CLUTTER_IS_STAGE (stage), TRUE);
-
- return stage->priv->accept_focus;
-}
-
/**
* clutter_stage_set_motion_events_enabled:
* @stage: a #ClutterStage
diff --git a/clutter/clutter/clutter-stage.h b/clutter/clutter/clutter-stage.h
index 45a077686..a86af3de8 100644
--- a/clutter/clutter/clutter-stage.h
+++ b/clutter/clutter/clutter-stage.h
@@ -182,11 +182,6 @@ void clutter_stage_set_motion_events_enabled (ClutterStage
CLUTTER_EXPORT
gboolean clutter_stage_get_motion_events_enabled (ClutterStage *stage);
CLUTTER_EXPORT
-void clutter_stage_set_accept_focus (ClutterStage *stage,
- gboolean accept_focus);
-CLUTTER_EXPORT
-gboolean clutter_stage_get_accept_focus (ClutterStage *stage);
-CLUTTER_EXPORT
gboolean clutter_stage_event (ClutterStage *stage,
ClutterEvent *event);
diff --git a/src/backends/x11/meta-stage-x11.c b/src/backends/x11/meta-stage-x11.c
index 269fafa51..f4d0d3d01 100644
--- a/src/backends/x11/meta-stage-x11.c
+++ b/src/backends/x11/meta-stage-x11.c
@@ -381,21 +381,11 @@ update_wm_hints (MetaStageX11 *stage_x11)
wm_hints.flags = StateHint | InputHint;
wm_hints.initial_state = NormalState;
- wm_hints.input = stage_x11->accept_focus ? True : False;
+ wm_hints.input = True;
XSetWMHints (xdisplay, stage_x11->xwin, &wm_hints);
}
-static void
-meta_stage_x11_set_accept_focus (ClutterStageWindow *stage_window,
- gboolean accept_focus)
-{
- MetaStageX11 *stage_x11 = META_STAGE_X11 (stage_window);
-
- stage_x11->accept_focus = !!accept_focus;
- update_wm_hints (stage_x11);
-}
-
static void
set_stage_x11_state (MetaStageX11 *stage_x11,
MetaStageX11State unset_flags,
@@ -543,8 +533,6 @@ meta_stage_x11_init (MetaStageX11 *stage)
stage->wm_state = STAGE_X11_WITHDRAWN;
- stage->accept_focus = TRUE;
-
stage->title = NULL;
}
@@ -554,7 +542,6 @@ clutter_stage_window_iface_init (ClutterStageWindowInterface *iface)
clutter_stage_window_parent_iface = g_type_interface_peek_parent (iface);
iface->set_title = meta_stage_x11_set_title;
- iface->set_accept_focus = meta_stage_x11_set_accept_focus;
iface->show = meta_stage_x11_show;
iface->hide = meta_stage_x11_hide;
iface->resize = meta_stage_x11_resize;
diff --git a/src/backends/x11/meta-stage-x11.h b/src/backends/x11/meta-stage-x11.h
index b466882e0..9ca4da551 100644
--- a/src/backends/x11/meta-stage-x11.h
+++ b/src/backends/x11/meta-stage-x11.h
@@ -68,7 +68,6 @@ struct _MetaStageX11
MetaStageX11State wm_state;
guint viewport_initialized : 1;
- guint accept_focus : 1;
};
struct _MetaStageX11Class
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]